@import url("https://fonts.googleapis.com/css2?family=Geologica:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap");

/* styles.css - shared by all pages */
:root {
  --pm-primary: #738b3b;
  --pm-primary-hover: #637832;
  --pm-primary-light: #eaf3d6;
  --pm-primary-soft: #f2f7e7;
  --pm-yellow: #facb34;
  --pm-yellow-light: #fff8dc;
  --pm-black: #111111;
  --pm-white: #f6f5f7;
  --pm-success: #16a34a;
  --pm-success-light: #dcfce7;
  --pm-danger: #dc2626;
  --pm-danger-light: #fee2e2;
  --pm-warning: #f59e0b;
  --pm-warning-light: #fef3c7;
  --pm-disabled: #d1d5db;
  --pm-gray-900: #212429;
  --pm-gray-700: #495057;
  --pm-gray-400: #acb5bd;
  --pm-gray-200: #dde2e5;
  --pm-gray-100: #f8f9fa;
  --pm-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --pm-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --pm-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --pm-radius-card: 16px;
  --pm-radius-btn: 12px;
  --pm-radius-input: 12px;
  --pm-radius-chip: 999px;
  --pm-radius-xs: 8px;
  --pm-motion: 200ms ease-in-out;
  --pm-btn-h: 44px;
  --pm-input-h: 44px;

  /* Backward-compatible aliases */
  --bg: var(--pm-white);
  --card: #ffffff;
  --muted: var(--pm-gray-700);
  --accent: var(--pm-primary);
  --accent-2: var(--pm-primary-hover);
  --success: var(--pm-success);
  --danger: var(--pm-danger);
  --shadow: var(--pm-shadow);
  --radius: var(--pm-radius-card);
  --primary: var(--pm-primary);
  --glass: rgba(255, 255, 255, 0.82);
}

/* ========== Base Reset ========== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--pm-gray-900);
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 28px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
}

body.pm-console {
  padding: 18px 20px 24px;
  background:
    radial-gradient(circle at top left, rgba(115, 139, 59, 0.09), transparent 24%),
    radial-gradient(circle at top right, rgba(250, 203, 52, 0.08), transparent 18%),
    linear-gradient(180deg, #fbfcf8 0%, #f6f5f7 100%);
}

body.pm-auth {
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(250, 203, 52, 0.12), transparent 20%),
    radial-gradient(circle at top right, rgba(115, 139, 59, 0.11), transparent 26%),
    linear-gradient(180deg, #fcfcf8 0%, #f1f5e8 52%, #f6f5f7 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1 {
  font-family: "Geologica", "Inter", sans-serif;
  color: var(--pm-black);
  letter-spacing: -0.02em;
}

p {
  margin-top: 0;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  font-family: "Inter", sans-serif;
}

textarea {
  resize: vertical;
}

:focus-visible {
  outline: 2px solid var(--pm-primary);
  outline-offset: 2px;
}

/* ========== Layout ========== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pm-auth .container {
  max-width: none;
  min-height: 100vh;
  padding: clamp(18px, 2vw, 24px);
}

.pm-console .container {
  max-width: none;
  width: 100%;
}

/* ========== Utility Bar ========== */
.utility-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 4px;
  color: var(--pm-gray-700);
  font-size: 13px;
}

.utility-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.loading-overlay-panel {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 30px 28px;
  border-radius: 28px;
  border: 1px solid rgba(115, 139, 59, 0.16);
  background:
    radial-gradient(circle at top, rgba(115, 139, 59, 0.12), rgba(255, 255, 255, 0) 58%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.12);
  text-align: center;
  backdrop-filter: blur(16px);
}

.loading-overlay-logo {
  width: min(220px, 70%);
  height: auto;
}

.loading-overlay-spinner {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 4px solid rgba(115, 139, 59, 0.12);
  border-top-color: var(--pm-primary);
  animation: spin 0.9s linear infinite;
}

.loading-overlay-title {
  margin: 0;
  font-family: "Geologica", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pm-black);
}

.loading-overlay-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--pm-gray-600);
}

#langSelect {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--pm-radius-chip);
  border: 1px solid var(--pm-gray-200);
  background: rgba(255, 255, 255, 0.94);
  color: var(--pm-gray-900);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

/* ========== Header ========== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.h-title {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(180deg, var(--pm-primary), var(--pm-primary-hover));
  border-radius: 14px;
  color: #f6f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: var(--pm-shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.logo.logo-image {
  width: 120px;
  height: 52px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.92);
}

.logo.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.h1 {
  font-size: clamp(1.2rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.1;
  margin: 0;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions .btn {
  margin-left: 4px;
}

/* ========== App Shell ========== */
.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.pm-console .app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 28px;
}

.app-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--pm-gray-200);
  border-radius: 24px;
  box-shadow: var(--pm-shadow-sm);
  backdrop-filter: blur(8px);
}

.pm-console .app-sidebar {
  top: 16px;
  min-height: calc(100vh - 52px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 245, 247, 0.94)),
    linear-gradient(180deg, rgba(115, 139, 59, 0.03), rgba(250, 203, 52, 0.02));
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pm-gray-200);
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.sidebar-brand strong {
  display: block;
  font-family: "Geologica", sans-serif;
  font-size: 1rem;
  color: var(--pm-black);
}

.sidebar-brand span {
  font-size: 12px;
  color: var(--pm-gray-700);
}

.sidebar-profile {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(115, 139, 59, 0.12), rgba(115, 139, 59, 0.04));
  border: 1px solid rgba(115, 139, 59, 0.16);
}

.sidebar-profile strong {
  display: block;
  font-size: 0.95rem;
  color: var(--pm-black);
}

.sidebar-profile span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--pm-gray-700);
}

.sidebar-group-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pm-gray-400);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-button {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pm-gray-700);
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--pm-motion),
    color var(--pm-motion),
    border-color var(--pm-motion),
    transform var(--pm-motion);
}

.sidebar-button:hover {
  background: var(--pm-gray-100);
  color: var(--pm-primary);
  border-color: rgba(115, 139, 59, 0.18);
}

.sidebar-button.active {
  background: var(--pm-primary-soft);
  color: var(--pm-primary);
  border-color: rgba(115, 139, 59, 0.32);
  box-shadow: inset 0 0 0 1px rgba(115, 139, 59, 0.12);
}

.sidebar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
  flex-shrink: 0;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pm-console .app-main {
  gap: 22px;
}

.panel-host {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-block {
  display: none;
}

.panel-block.active {
  display: block;
}

.pm-console .panel-block.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.page-hero-copy h2,
.page-hero-copy h3 {
  margin: 0 0 8px;
}

.page-hero-copy p {
  margin: 0;
  color: var(--pm-gray-700);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--pm-primary-soft);
  color: var(--pm-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-grid.metric-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #ffffff);
  border: 1px solid var(--pm-gray-200);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--pm-shadow-sm);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.metric-card.metric-card-highlight {
  background: linear-gradient(135deg, rgba(115, 139, 59, 0.98), rgba(99, 120, 50, 0.92));
  color: #ffffff;
  border-color: rgba(115, 139, 59, 0.4);
}

.metric-card.metric-card-highlight .metric-kicker,
.metric-card.metric-card-highlight .metric-meta,
.metric-card.metric-card-highlight .metric-value {
  color: inherit;
}

.metric-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pm-gray-400);
}

.metric-value {
  font-family: "Geologica", sans-serif;
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.8rem);
  line-height: 1;
  color: var(--pm-black);
}

.metric-meta {
  font-size: 13px;
  color: var(--pm-gray-700);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
  grid-auto-rows: minmax(0, auto);
}

.chart-card,
.insight-card {
  background: #ffffff;
  border: 1px solid var(--pm-gray-200);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--pm-shadow-sm);
  align-self: start;
  min-height: 0;
  overflow: hidden;
}

.chart-card h3,
.insight-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.chart-card p,
.insight-card p {
  margin: 0 0 16px;
  color: var(--pm-gray-700);
}

.chart-card-throughput {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-stage {
  position: relative;
  width: 100%;
  height: clamp(220px, 30vw, 270px);
  min-height: 220px;
  max-height: 270px;
}

.chart-stage.chart-stage-tall {
  height: clamp(248px, 34vw, 320px);
  min-height: 248px;
  max-height: 320px;
}

.chart-stage > canvas {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: -2px 0 2px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pm-gray-700);
}

.chart-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.chart-legend-swatch-primary {
  background: var(--pm-primary);
}

.chart-legend-swatch-accent {
  background: var(--pm-yellow);
}

.chart-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 249, 250, 0.99));
  color: var(--pm-gray-700);
}

.chart-empty-state strong {
  color: var(--pm-black);
  font-size: 15px;
}

.chart-empty-state span {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.5;
}

.chart-stage.is-empty > canvas {
  pointer-events: none;
}

.chart-stage .no-data-message {
  display: none !important;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-filters .field {
  min-width: 172px;
}

.dashboard-filters label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pm-gray-700);
}

.insight-list,
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-item,
.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--pm-gray-100);
  border: 1px solid var(--pm-gray-200);
}

.insight-item strong,
.status-item strong {
  font-size: 14px;
  color: var(--pm-black);
}

.insight-item span,
.status-item span {
  font-size: 13px;
  color: var(--pm-gray-700);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.success {
  background: var(--pm-success-light);
  color: var(--pm-success);
}

.status-pill.warning {
  background: var(--pm-warning-light);
  color: #92400e;
}

.status-pill.danger {
  background: var(--pm-danger-light);
  color: var(--pm-danger);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.table-toolbar h3 {
  margin: 0;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--pm-gray-100);
  border: 1px solid var(--pm-gray-200);
}

.summary-item strong {
  display: block;
  font-size: 14px;
  color: var(--pm-black);
}

.summary-item span {
  font-size: 13px;
  color: var(--pm-gray-700);
}

.admin-workspace-grid,
.superadmin-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workspace-card {
  margin-bottom: 0;
}

.workspace-wide {
  grid-column: 1 / -1;
}

/* ========== Cards ========== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(221, 226, 229, 0.9);
  margin-bottom: 18px;
}

.pm-console .card {
  border-radius: 20px;
}

.card h2,
.card h3,
.card h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

/* ========== Login Panels ========== */
.login-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(450px, 0.9fr);
  gap: 0;
  align-items: stretch;
  margin-top: 0;
  flex: 1;
  min-height: calc(100vh - clamp(36px, 4vw, 48px));
  height: calc(100vh - clamp(36px, 4vw, 48px));
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.login-panel {
  padding: clamp(24px, 2.7vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 244, 0.98));
  box-shadow: none;
}

.login-panel::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -68px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 203, 52, 0.18), rgba(250, 203, 52, 0) 68%);
  pointer-events: none;
}

.login-panel::after {
  content: "";
  position: absolute;
  inset: auto 26px 24px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 139, 59, 0.08), rgba(115, 139, 59, 0) 72%);
  pointer-events: none;
}

.login-panel > * {
  position: relative;
  z-index: 1;
}

.login-panel h2 {
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem);
  margin-bottom: 10px;
}

.login-showcase {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  padding: clamp(34px, 3.8vw, 56px);
  min-height: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 24%),
    linear-gradient(138deg, rgba(28, 37, 15, 0.98), rgba(62, 82, 30, 0.98) 28%, rgba(115, 139, 59, 0.96) 68%, rgba(154, 176, 79, 0.9) 100%),
    radial-gradient(circle at bottom left, rgba(250, 203, 52, 0.28), transparent 34%);
  color: #f6f5f7;
  border: none;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}

.login-showcase::after {
  content: "";
  position: absolute;
  inset: auto -6% -28% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(250, 203, 52, 0.18);
  filter: blur(2px);
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.1) 1.2px, transparent 1.2px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 36%),
    linear-gradient(0deg, rgba(17, 17, 17, 0.1), transparent 50%);
  background-size: 24px 24px, auto, auto;
  pointer-events: none;
  opacity: 0.34;
}

.login-brand {
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.login-brand-plate {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: min(700px, 78vw);
  min-height: clamp(144px, 10.5vw, 188px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  position: relative;
  overflow: visible;
}

.login-brand-plate::before {
  content: none;
}

.login-brand-wordmark {
  display: block;
  width: 100%;
  height: auto;
  max-height: 236px;
  object-fit: contain;
  object-position: left center;
  transform: scale(1.6) translateX(4%);
  transform-origin: left center;
  filter: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.login-brand-heading {
  display: grid;
  gap: 12px;
  padding-top: 10px;
}

.login-brand-system {
  margin: 0;
  font-size: clamp(2.7rem, 2.15rem + 1.08vw, 3.95rem);
  line-height: 0.92;
  color: #ffffff;
  max-width: 840px;
}

.login-showcase-copy {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.login-rotator {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 0 12px;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 245, 247, 0.82);
  position: relative;
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    color var(--pm-motion);
}

.login-rotator::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 240px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(250, 203, 52, 0.96), rgba(250, 203, 52, 0.12));
  box-shadow: 0 0 18px rgba(250, 203, 52, 0.22);
}

.login-rotator.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}

.login-showcase-copy h2 {
  font-size: clamp(2rem, 1.58rem + 1vw, 2.85rem);
  line-height: 1.02;
  margin-bottom: 10px;
  color: #ffffff;
  max-width: 720px;
}

.login-showcase-copy p {
  max-width: 540px;
  color: rgba(246, 245, 247, 0.9);
  font-size: 1rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

.showcase-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: var(--pm-radius-card);
  border: 1px solid rgba(246, 245, 247, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(12px);
  min-height: 138px;
  transition: transform var(--pm-motion), box-shadow var(--pm-motion), border-color var(--pm-motion);
}

.showcase-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  border-color: rgba(246, 245, 247, 0.26);
}

.showcase-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pm-yellow);
  background: rgba(17, 17, 17, 0.14);
  border: 1px solid rgba(250, 203, 52, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.showcase-item-icon svg {
  width: 19px;
  height: 19px;
}

.showcase-item-body {
  display: grid;
  gap: 6px;
}

.showcase-item strong {
  display: block;
  font-size: 1.14rem;
  color: #ffffff;
}

.showcase-item p {
  margin: 0;
  color: rgba(246, 245, 247, 0.8);
  font-size: 0.98rem;
  line-height: 1.55;
}

.login-panel-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.login-language-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 244, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.login-language-control label {
  font-size: 12px;
  font-weight: 700;
  color: var(--pm-gray-700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-language-control #langSelect {
  min-height: 34px;
  width: auto;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: none;
}

.login-panel-body {
  max-width: 430px;
  width: 100%;
  margin: clamp(4px, 1.3vh, 14px) auto 0;
}

.login-panel-header {
  margin-bottom: 24px;
}

.login-panel-header .small {
  font-size: 14px;
  line-height: 1.7;
  color: var(--pm-gray-700);
}

.field-hint {
  font-size: 12px;
  color: var(--pm-gray-500);
  line-height: 1.5;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid var(--pm-gray-200);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition:
    border-color var(--pm-motion),
    box-shadow var(--pm-motion),
    transform var(--pm-motion);
}

.input-shell:focus-within {
  border-color: rgba(115, 139, 59, 0.8);
  box-shadow: 0 0 0 4px rgba(115, 139, 59, 0.12);
}

.input-icon {
  width: 44px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pm-gray-400);
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

.input-shell input {
  min-height: 52px !important;
  padding: 0 14px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.input-shell input:focus {
  box-shadow: none !important;
}

.password-field input {
  padding-right: 8px !important;
}

.password-toggle {
  width: 40px;
  height: 40px;
  margin-right: 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pm-gray-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color var(--pm-motion),
    border-color var(--pm-motion),
    box-shadow var(--pm-motion),
    transform var(--pm-motion);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle:hover {
  background: rgba(115, 139, 59, 0.08);
  border-color: rgba(115, 139, 59, 0.2);
  box-shadow: 0 8px 16px rgba(115, 139, 59, 0.08);
}

.login-submit-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(180deg, #829948, #738b3b);
  box-shadow: 0 18px 36px rgba(115, 139, 59, 0.24);
}

.login-submit-btn:hover {
  box-shadow: 0 22px 42px rgba(115, 139, 59, 0.28);
}

.login-message {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--danger);
}

.login-panel-footer {
  margin-top: auto;
  padding-top: 18px;
  text-align: center;
  color: var(--pm-gray-400);
  font-size: 12px;
}

@media (max-height: 940px) and (min-width: 901px) {
  .login-wrap {
    height: calc(100vh - 28px);
  }

  .login-showcase,
  .login-panel {
    padding: 28px 30px;
  }

  .login-showcase {
    gap: 16px;
  }

  .login-brand-plate {
    width: 520px;
    min-height: 126px;
  }

  .login-brand-wordmark {
    max-height: 166px;
  }

  .login-brand-system {
    font-size: clamp(2rem, 1.86rem + 0.8vw, 3rem);
  }

  .login-showcase-copy h2 {
    font-size: clamp(1.7rem, 1.45rem + 0.8vw, 2.35rem);
    margin-bottom: 10px;
  }

  .login-showcase-copy p {
    font-size: 0.92rem;
    max-width: 600px;
  }

  .showcase-grid {
    gap: 18px;
  }

  .showcase-item {
    min-height: 120px;
    padding: 20px;
  }

  .showcase-item p {
    font-size: 0.9rem;
  }

  .login-panel-topbar {
    margin-bottom: 8px;
  }

  .login-panel-body {
    margin-top: 8px;
  }

  .login-panel-header {
    margin-bottom: 12px;
  }
}

@keyframes loginPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-1px);
    opacity: 1;
  }
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-date-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: min(100%, 220px);
  max-width: 100%;
}

.pm-date-shell.pm-date-shell-fluid {
  width: 100%;
}

.pm-date-shell > .pm-date-text-input {
  width: 100% !important;
  padding-right: 48px !important;
  cursor: pointer;
}

.pm-date-shell > .pm-date-text-input:not([readonly]) {
  cursor: text;
}

.pm-date-trigger {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: 0;
  transform: translateY(-50%);
  border-radius: 10px;
  border: 1px solid rgba(115, 139, 59, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,247,236,0.96));
  color: var(--pm-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition:
    transform var(--pm-motion),
    box-shadow var(--pm-motion),
    border-color var(--pm-motion),
    background-color var(--pm-motion);
}

.pm-date-trigger:hover {
  transform: translateY(-50%) translateY(-1px);
  border-color: rgba(115, 139, 59, 0.32);
  box-shadow: 0 12px 24px rgba(115, 139, 59, 0.14);
}

.pm-date-trigger:active {
  transform: translateY(-50%) scale(0.97);
}

.pm-date-trigger svg {
  width: 16px;
  height: 16px;
}

.pm-date-native-proxy {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pm-date-popover {
  position: fixed;
  z-index: 12000;
  width: 276px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
}

.pm-date-popover[hidden] {
  display: none;
}

.pm-date-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pm-date-popover-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-gray-900);
}

.pm-date-nav {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(115, 139, 59, 0.16);
  background: linear-gradient(180deg, #ffffff, #f7f9f1);
  color: var(--pm-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pm-date-nav svg {
  width: 16px;
  height: 16px;
}

.pm-date-nav:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.pm-date-weekdays,
.pm-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.pm-date-weekdays {
  margin-bottom: 8px;
}

.pm-date-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--pm-gray-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-date-day {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pm-gray-800);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform var(--pm-motion),
    background-color var(--pm-motion),
    border-color var(--pm-motion),
    color var(--pm-motion);
}

.pm-date-day:hover {
  background: rgba(115, 139, 59, 0.1);
  border-color: rgba(115, 139, 59, 0.18);
}

.pm-date-day.is-today {
  border-color: rgba(250, 203, 52, 0.45);
  color: #8a6412;
}

.pm-date-day.is-selected {
  background: var(--pm-primary);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(115, 139, 59, 0.18);
}

.pm-date-day.is-disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.pm-date-day-empty {
  min-height: 34px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--pm-gray-700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Form Controls ========== */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-height: var(--pm-input-h);
  padding: 11px 14px;
  border-radius: var(--pm-radius-input);
  border: 1px solid var(--pm-gray-200);
  background: #ffffff;
  color: var(--pm-gray-900);
  transition:
    border-color var(--pm-motion),
    box-shadow var(--pm-motion),
    background-color var(--pm-motion);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"])::placeholder,
textarea::placeholder {
  color: var(--pm-gray-400);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(115, 139, 59, 0.8);
  box-shadow: 0 0 0 4px rgba(115, 139, 59, 0.12);
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--pm-primary);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--pm-btn-h);
  padding: 10px 18px;
  border-radius: var(--pm-radius-btn);
  background: var(--accent);
  color: #ffffff;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition:
    transform var(--pm-motion),
    background-color var(--pm-motion),
    border-color var(--pm-motion),
    box-shadow var(--pm-motion);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(115, 139, 59, 0.18);
}

.btn:active {
  transform: scale(0.97);
}

.btn.secondary {
  background: #ffffff;
  color: var(--accent);
  border-color: #cdd9af;
}

.btn.secondary:hover {
  background: var(--pm-primary-light);
  color: var(--accent);
  box-shadow: none;
}

.btn[disabled] {
  background: var(--pm-disabled);
  color: var(--pm-gray-700);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab {
  flex: 1;
  text-align: center;
  background: #ffffff;
  padding: 11px 16px;
  border-radius: var(--pm-radius-btn);
  border: 1px solid var(--pm-gray-200);
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition:
    background-color var(--pm-motion),
    color var(--pm-motion),
    border-color var(--pm-motion),
    box-shadow var(--pm-motion);
}

.tab:hover {
  background: var(--pm-gray-100);
  color: var(--accent);
  border-color: #cdd9af;
}

.tab.active {
  background: var(--pm-primary-soft) !important;
  border-color: rgba(115, 139, 59, 0.6) !important;
  box-shadow: inset 0 0 0 1px rgba(115, 139, 59, 0.28);
  color: var(--pm-primary) !important;
}

/* ========== Badge / Status ========== */
.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: var(--pm-radius-chip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.badge {
  min-width: 24px;
  background: var(--pm-yellow);
  color: var(--pm-black);
}

.status-badge {
  background: var(--pm-gray-100);
  color: var(--pm-gray-700);
  border: 1px solid var(--pm-gray-200);
}

.status-badge.success {
  background: var(--pm-success-light);
  color: var(--pm-success);
  border-color: rgba(22, 163, 74, 0.18);
}

.status-badge.warning {
  background: var(--pm-warning-light);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.22);
}

.status-badge.danger {
  background: var(--pm-danger-light);
  color: var(--pm-danger);
  border-color: rgba(220, 38, 38, 0.16);
}

.status-badge.info {
  background: var(--pm-primary-light);
  color: var(--pm-primary);
  border-color: rgba(115, 139, 59, 0.18);
}

/* ========== Car List ========== */
.car-list {
  display: grid;
  gap: 12px;
}

.car-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: var(--pm-radius-btn);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff);
  border: 1px solid var(--pm-gray-200);
  flex-wrap: wrap;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.car-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.car-plate {
  min-width: 96px;
  height: 56px;
  border-radius: var(--pm-radius-xs);
  background: var(--pm-black);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.08);
}

.car-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.car-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.input-sm {
  padding: 8px 10px;
  border-radius: var(--pm-radius-xs);
  border: 1px solid var(--pm-gray-200);
}

/* ========== Payment Controls ========== */
.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 8px;
}

.payment-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--pm-radius-chip);
  border: 1px solid var(--pm-gray-200);
  background: #ffffff;
  color: var(--pm-gray-900);
  font-weight: 600;
  cursor: pointer;
}

/* ========== Tables ========== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.pm-console table {
  min-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  border-radius: var(--pm-radius-btn);
  overflow: hidden;
}

table tbody tr {
  transition: background-color var(--pm-motion);
}

table th,
table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--pm-gray-200);
}

table th {
  background: var(--pm-gray-100);
  font-weight: 700;
  color: var(--pm-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

table tbody tr:hover {
  background: rgba(115, 139, 59, 0.08);
}

/* ========== Module Selection Grid ========== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.module-card {
  background: var(--pm-primary-light);
  border: 2px solid var(--pm-gray-200);
  border-radius: var(--pm-radius-card);
  padding: 16px;
  cursor: pointer;
  transition:
    border-color var(--pm-motion),
    background-color var(--pm-motion),
    box-shadow var(--pm-motion);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-card:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.module-card.selected {
  border-color: var(--accent);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(115, 139, 59, 0.22);
}

.module-card h4 {
  margin: 0;
  color: var(--pm-gray-900);
  font-size: 15px;
}

.module-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ========== Toasts ========== */
.toasts {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--pm-radius-btn);
  background: #ffffff;
  border-left: 6px solid var(--accent);
  box-shadow: var(--shadow);
  min-width: 240px;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.warn {
  border-left-color: var(--danger);
}

.toast .t-text {
  font-size: 14px;
  color: var(--pm-gray-900);
}

/* ========== Modal (Global) ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 10000;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--pm-radius-card);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--pm-shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-body {
  font-size: 14px;
  line-height: 1.5;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.modal-box {
  background: var(--card);
  border-radius: var(--pm-radius-card);
  padding: 20px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--pm-shadow-lg);
  animation: fadeIn 0.2s ease-in-out;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--pm-gray-700);
}

.driver-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.driver-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--pm-radius-xs);
  border: 1px solid var(--pm-gray-200);
  background: var(--pm-gray-100);
  cursor: pointer;
  transition:
    background-color var(--pm-motion),
    border-color var(--pm-motion),
    transform var(--pm-motion);
}

.driver-item:hover {
  background: var(--pm-primary-light);
  border-color: var(--accent);
}

.driver-item span {
  font-size: 14px;
  font-weight: 600;
}

.driver-item small {
  color: var(--muted);
}

/* ========== Helpers ========== */
.small {
  font-size: 13px;
  color: var(--muted);
}

.kv {
  font-weight: 700;
  color: var(--pm-black);
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

/* ========== Bootstrap Compatibility Layer ========== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -12px;
  margin-left: -12px;
}

.col-lg-6,
.col-md-6,
.col-12 {
  padding-right: 12px;
  padding-left: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .col-md-6 {
    width: 50%;
  }
}

@media (min-width: 992px) {
  .col-lg-6 {
    width: 50%;
  }
}

.g-4 {
  gap: 24px;
}

.mb-5 {
  margin-bottom: 48px;
}

.mb-4 {
  margin-bottom: 24px;
}

.mb-3 {
  margin-bottom: 16px;
}

.mt-3 {
  margin-top: 16px;
}

.p-4 {
  padding: 24px;
}

.h-100 {
  height: 100%;
}

.text-center {
  text-align: center;
}

.fw-bold {
  font-weight: 700;
}

.text-muted {
  color: var(--pm-gray-700);
}

.text-white {
  color: #ffffff;
}

.display-4 {
  font-size: 2.25rem;
  font-weight: 700;
  font-family: "Geologica", sans-serif;
}

.display-5 {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: "Geologica", sans-serif;
}

.shadow-sm {
  box-shadow: var(--pm-shadow-sm) !important;
}

.border-0 {
  border: 0 !important;
}

.rounded-top {
  border-top-left-radius: var(--pm-radius-card);
  border-top-right-radius: var(--pm-radius-card);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bg-danger {
  background-color: var(--pm-danger) !important;
}

/* ========== Animation ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
  }

  .pm-console .app-sidebar {
    min-height: auto;
  }

  .login-wrap {
    gap: 0;
  }

  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-grid,
  .metric-grid.metric-grid-wide,
  .dashboard-grid,
  .admin-workspace-grid,
  .superadmin-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-stage,
  .chart-stage.chart-stage-tall {
    height: clamp(220px, 34vw, 300px);
  }
}

@media (max-width: 900px) {
  body {
    padding: 14px;
  }

  body.pm-auth,
  body.pm-console {
    padding: 12px;
  }

  .login-wrap {
    grid-template-columns: 1fr;
    padding: 0;
    margin-top: 0;
    height: auto;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-panel,
  .login-showcase {
    padding: 22px;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    font-size: 14px;
    padding: 10px 12px;
  }

  .tab {
    flex: 1 1 48%;
  }

  .toast {
    min-width: 200px;
    font-size: 13px;
  }

  .modal-content {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .header {
    gap: 12px;
  }

  .logo {
    width: 44px;
    height: 44px;
    font-size: 15px;
    border-radius: 12px;
  }

  .logo.logo-image {
    width: 104px;
    height: 44px;
    padding: 7px 12px;
  }

  .card {
    padding: 16px;
  }

  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .driver-item img {
    width: 70px;
    height: 70px;
  }

  .login-wrap {
    grid-template-columns: 1fr;
    gap: 12px;
    height: auto;
    min-height: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .login-brand-plate {
    width: min(480px, 84vw);
    min-height: 118px;
  }

  .login-brand-wordmark {
    max-height: 148px;
  }

  .login-showcase {
    justify-content: flex-start;
    gap: 16px;
    min-height: auto;
    padding: 24px;
  }

  .login-brand {
    gap: 14px;
  }

  .login-brand-heading {
    gap: 10px;
    padding-top: 8px;
  }

  .login-brand-system {
    max-width: 10ch;
    font-size: clamp(2.5rem, 7.5vw, 4.15rem);
    line-height: 0.96;
  }

  .login-showcase-copy {
    margin-top: 10px;
  }

  .login-showcase-copy h2 {
    font-size: clamp(1.95rem, 6vw, 2.75rem);
    line-height: 1.02;
    max-width: 11ch;
  }

  .login-showcase-copy p {
    max-width: none;
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .showcase-grid {
    margin-top: 18px;
    gap: 18px;
  }

  .metric-grid,
  .metric-grid.metric-grid-wide,
  .dashboard-grid,
  .admin-workspace-grid,
  .superadmin-workspace-grid {
    grid-template-columns: 1fr;
  }

  .chart-stage,
  .chart-stage.chart-stage-tall {
    height: clamp(220px, 48vw, 280px);
  }

  .car-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .car-left {
    width: 100%;
  }

  .car-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .car-actions .btn,
  .car-actions .input-sm {
    flex: 1 1 auto;
    min-width: 0;
  }

  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 480px;
  }

  select,
  input[type="text"],
  input[type="number"],
  input[type="tel"],
  input[type="password"],
  input[type="email"],
  input[type="date"],
  textarea {
    font-size: 16px !important;
  }

  .modal-content,
  .modal-box {
    max-width: 96vw;
    width: 94%;
  }

  .form-row > div {
    flex-wrap: wrap !important;
  }

  form {
    flex-direction: column;
    align-items: stretch;
  }

  form > input,
  form > select,
  form > button {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px !important;
  }

  .utility-bar {
    justify-content: space-between;
    gap: 8px;
    padding: 0;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .h-title {
    gap: 8px;
  }

  .logo {
    width: 36px;
    height: 36px;
    font-size: 13px;
    border-radius: 10px;
  }

  .card {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: var(--pm-radius-btn);
  }

  .login-wrap {
    gap: 10px;
  }

  .login-panel,
  .login-showcase {
    padding: 18px !important;
    border-radius: 24px;
  }

  .login-showcase {
    gap: 14px;
  }

  .login-brand-plate {
    width: min(390px, 84vw);
    min-height: 102px;
  }

  .login-brand-wordmark {
    max-height: 120px;
  }

  .login-brand-system {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
    max-width: 6ch;
  }

  .login-rotator {
    min-height: 24px;
    padding-bottom: 10px;
    font-size: 11px;
    letter-spacing: 0.11em;
  }

  .login-showcase-copy h2 {
    font-size: clamp(1.8rem, 9.4vw, 2.65rem);
    line-height: 1.04;
    max-width: 8.5ch;
    margin-bottom: 10px;
  }

  .login-showcase-copy p {
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .showcase-item {
    min-height: 124px;
    padding: 20px;
  }

  .login-panel-topbar {
    justify-content: center;
    margin-bottom: 12px;
  }

  .login-language-control {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 8px 8px 12px;
  }

  .login-language-control label {
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .login-language-control #langSelect {
    min-width: 128px;
    padding-inline: 12px;
  }

  .login-panel-body {
    margin-top: 0;
  }

  .login-panel-header {
    margin-bottom: 18px;
  }

  .tabs {
    gap: 4px;
  }

  .tab {
    padding: 8px 6px;
    font-size: 12px;
    flex: 1 1 auto !important;
  }

  .btn {
    font-size: 13px;
    padding: 8px 10px;
  }

  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: 6px 8px;
  }

  .car-card {
    padding: 10px;
  }

  .car-left {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .car-plate {
    min-width: 80px;
    height: 44px;
    font-size: 13px;
  }

  .car-meta p,
  .car-meta small {
    font-size: 12px;
  }

  .car-actions {
    gap: 6px;
    flex-wrap: wrap;
  }

  .car-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .car-actions .input-sm {
    flex: 1 1 100%;
  }

  .input-sm {
    padding: 6px;
    font-size: 13px;
  }

  .module-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .module-card {
    padding: 12px;
  }

  .module-card h4 {
    font-size: 14px;
  }

  .module-card p {
    font-size: 12px;
  }

  .app-sidebar {
    padding: 16px;
    border-radius: 20px;
  }

  .metric-card,
  .chart-card,
  .insight-card {
    padding: 16px;
  }

  .modal-content {
    padding: 14px;
    max-width: 98vw;
  }

  .modal-box {
    padding: 14px;
    width: 96%;
    max-width: 100vw;
  }

  .modal-title {
    font-size: 16px;
  }

  .table-wrapper {
    margin: 0 -4px;
  }

  table {
    min-width: 400px;
    font-size: 11px;
  }

  table th,
  table td {
    padding: 5px 6px;
    white-space: nowrap;
  }

  .toasts {
    right: 8px;
    top: 8px;
    left: 8px;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: 10px 14px;
  }

  .driver-list {
    max-height: 220px;
    gap: 8px;
  }

  .driver-item {
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
  }

  .driver-item img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
  }

  .driver-item span {
    font-size: 13px;
  }

  .footer {
    font-size: 11px;
    padding: 8px;
  }

  .small {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  body {
    padding: 6px !important;
  }

  .header {
    padding: 10px;
    gap: 6px;
  }

  .logo {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .card {
    padding: 10px;
    margin-bottom: 8px;
  }

  .login-showcase,
  .login-panel {
    padding: 16px !important;
  }

  .login-brand-plate {
    width: min(300px, 86vw);
    min-height: 88px;
  }

  .login-brand-wordmark {
    max-height: 98px;
  }

  .login-brand-system {
    font-size: clamp(1.95rem, 12.2vw, 3rem);
  }

  .login-showcase-copy h2 {
    font-size: clamp(1.55rem, 8.7vw, 2.2rem);
    max-width: 9ch;
  }

  .login-language-control {
    padding: 8px 8px 8px 10px;
  }

  .login-language-control label {
    font-size: 10px;
  }

  .btn {
    font-size: 12px;
    padding: 7px 8px;
    gap: 4px;
  }

  .tab {
    padding: 6px 4px;
    font-size: 11px;
  }

  .tabs {
    gap: 3px;
  }

  .car-plate {
    min-width: 64px;
    height: 36px;
    font-size: 11px;
  }

  .toast {
    padding: 8px 10px;
    font-size: 12px;
  }

  .footer {
    font-size: 10px;
    padding: 6px;
  }
}

/* ── Additional mobile polish (360px and below) ──────────────────────────── */
@media (max-width: 480px) {
  /* Dashboard filters — prevent min-width overflow */
  .dashboard-filters .field {
    min-width: 0;
    flex: 1 1 100%;
  }

  /* Tabs — ensure they don't break layout with many items */
  .tabs {
    gap: 4px;
  }

  /* Page hero actions — stack vertically on very small screens */
  .page-hero {
    gap: 12px;
  }

  /* Metric grid — single column at mobile */
  .metric-grid,
  .metric-grid.metric-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Metric cards smaller on mobile */
  .metric-card {
    min-height: 100px;
    padding: 14px;
    gap: 8px;
  }

  /* Summary/insight lists on mobile */
  .summary-list,
  .insight-list,
  .status-list {
    gap: 8px;
  }

  /* Chart stage — slightly taller on mobile to compensate for width */
  .chart-stage {
    height: clamp(220px, 60vw, 280px);
  }
}

/* ── Superadmin sidebar: compact on tablet ───────────────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
  .app-shell {
    grid-template-columns: 200px 1fr;
  }
}

/* ── Print: hide controls, keep charts and tables ────────────────────────── */
@media print {
  .app-sidebar,
  .tabs,
  .btn,
  .header-actions,
  .utility-bar,
  .footer,
  .modal-overlay,
  .toasts {
    display: none !important;
  }
  .container {
    padding: 0;
  }
  .card {
    box-shadow: none;
    border: 1px solid #e0e0e0;
  }
  .chart-stage {
    page-break-inside: avoid;
  }
}
