@font-face {
  font-family: "Voler Raleway";
  font-display: swap;
  src: url("/fonts/voler/Raleway-Regular.ttf") format("truetype");
}

:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --surface: #ffffff;
  --surface-soft: #f9fbf8;
  --page: #f5f7f2;
  --ink: #1d252c;
  --muted: #66727d;
  --line: #dce3dc;
  --line-strong: #cbd6cf;
  --accent: #147a6f;
  --accent-rgb: 20, 122, 111;
  --accent-strong: #0b5f57;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(var(--accent-rgb), 0.1);
  --accent-surface: rgba(var(--accent-rgb), 0.09);
  --accent-border: rgba(var(--accent-rgb), 0.18);
  --accent-border-strong: rgba(var(--accent-rgb), 0.45);
  --accent-focus: rgba(var(--accent-rgb), 0.15);
  --accent-shadow: rgba(var(--accent-rgb), 0.16);
  --company-secondary: #f4b942;
  --company-secondary-rgb: 244, 185, 66;
  --company-secondary-soft: rgba(var(--company-secondary-rgb), 0.12);
  --success: #1f8a4c;
  --success-soft: #edf8f1;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --warn: #b66a00;
  --warn-soft: #fff7e6;
  --danger: #b42318;
  --danger-surface: #fff3f1;
  --shadow: 0 18px 45px rgba(30, 41, 36, 0.1);
  --shadow-soft: 0 10px 28px rgba(30, 41, 36, 0.08);
  --shadow-tight: 0 8px 18px rgba(30, 41, 36, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.07), transparent 42%),
    linear-gradient(315deg, rgba(var(--company-secondary-rgb), 0.1), transparent 38%),
    var(--page);
  color: var(--ink);
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

main {
  min-height: 100vh;
}

#root {
  min-height: 100vh;
}

.auth-shell {
  align-items: center;
  background:
    radial-gradient(circle at 86% 88%, rgba(var(--company-secondary-rgb), 0.18), transparent 34%),
    linear-gradient(112deg, #edf6f2 0%, #f9fbf7 58%, #fffdf8 100%);
  display: grid;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(16px, 3vh, 32px) clamp(18px, 4vw, 48px);
  position: relative;
}

.auth-green-background {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.auth-green-background::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.42), transparent 18%),
    radial-gradient(circle at 80% 73%, rgba(var(--company-secondary-rgb), 0.16), transparent 24%);
  content: "";
  inset: 0;
  opacity: 0.62;
  position: absolute;
}

.auth-side-curve {
  height: 100%;
  inset: 0;
  overflow: visible;
  position: absolute;
  width: 100%;
}

.auth-side-curve path {
  transform-box: fill-box;
  transform-origin: center;
}

.auth-side-curve-shadow {
  fill: rgba(13, 60, 55, 0.32);
  filter: blur(24px);
  opacity: 0.48;
  transform: translate(32px, 8px);
}

.auth-side-curve-main {
  fill: url("#authGreenGradient");
}

.auth-side-curve-depth {
  fill: rgba(255, 255, 255, 0.08);
  opacity: 0.72;
}

.auth-side-curve-highlight {
  fill: none;
  opacity: 0.28;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.auth-mascot {
  display: block;
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.2));
  left: clamp(-30px, 3vw, 54px);
  max-width: 380px;
  opacity: 0.32;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-51%);
  width: min(28vw, 380px);
  z-index: 1;
}

.auth-dots {
  background-image: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 3px, transparent 4px);
  background-size: 26px 26px;
  height: 128px;
  pointer-events: none;
  position: absolute;
  width: 160px;
  z-index: 0;
}

.auth-dots-right {
  opacity: 0.22;
  right: 8%;
  top: 7%;
}

.auth-dots-left {
  bottom: 13%;
  left: 14px;
  opacity: 0.42;
}

.auth-waves {
  bottom: -110px;
  height: 440px;
  opacity: 0.13;
  pointer-events: none;
  position: absolute;
  right: -92px;
  transform: rotate(-5deg);
  width: min(760px, 58vw);
  z-index: 0;
}

.auth-waves span {
  border-radius: 50%;
  border-top: 1px solid var(--accent);
  height: 138px;
  left: 0;
  position: absolute;
  width: 100%;
}

.auth-waves span:nth-child(1) {
  top: 0;
}

.auth-waves span:nth-child(2) {
  top: 40px;
}

.auth-waves span:nth-child(3) {
  top: 80px;
}

.auth-waves span:nth-child(4) {
  top: 120px;
}

.auth-waves span:nth-child(5) {
  top: 160px;
}

.auth-waves span:nth-child(6) {
  top: 200px;
}

.auth-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 22px;
  box-shadow: 0 26px 72px rgba(16, 42, 46, 0.14);
  max-width: 540px;
  min-height: auto;
  padding: clamp(34px, 4.8vh, 44px) clamp(42px, 5vw, 58px) clamp(28px, 4vh, 36px);
  position: relative;
  width: 100%;
  z-index: 2;
}

.auth-panel::before {
  content: none;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--company-secondary));
  border-radius: 8px;
  color: var(--accent-contrast);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.brand-logo {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  flex: 0 0 auto;
  height: 48px;
  object-fit: contain;
  padding: 5px;
  width: 48px;
}

.login-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 28px;
  text-align: center;
}

.login-logo {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  height: 76px;
  margin-bottom: 10px;
  max-height: none;
  max-width: 86px;
  object-fit: contain;
  object-position: center;
  padding: 0;
  width: auto;
}

.login-heading {
  display: grid;
  gap: 8px;
}

.login-product-name {
  color: var(--accent-strong);
  display: grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.08;
  margin: 0;
}

.login-product-main {
  font-size: 1.22rem;
  font-weight: 820;
}

.login-product-sub {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 800;
  margin: 0;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0;
}

.login-subtitle {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  margin: 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

.auth-panel .field-group {
  gap: 9px;
}

.auth-panel .field-group input {
  background: #fbfdfc;
  border-radius: 9px;
  min-height: 52px;
}

.field-group {
  color: var(--ink);
  display: grid;
  font-size: 0.95rem;
  font-weight: 700;
  gap: 8px;
}

.field-group input,
.field-group select,
.field-group textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  min-height: 46px;
  outline: none;
  padding: 0 13px;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  width: 100%;
}

.input-shell {
  position: relative;
}

.input-shell input {
  padding-left: 56px;
}

.theme-icon {
  display: block;
  flex: 0 0 auto;
}

.input-icon {
  color: var(--accent-strong);
  height: 20px;
  left: 18px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  z-index: 1;
}

.field-group input:hover,
.field-group select:hover,
.field-group textarea:hover {
  border-color: var(--line-strong);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-focus);
}

.field-group.has-error input,
.field-group.has-error select,
.field-group.has-error textarea {
  border-color: #e58a80;
  box-shadow: 0 0 0 3px rgba(205, 69, 55, 0.12);
}

.field-error-message {
  color: var(--danger);
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
  margin-top: -2px;
}

.field-group input[type="color"] {
  cursor: pointer;
  height: 46px;
  padding: 4px;
}

.field-group textarea {
  line-height: 1.45;
  padding: 12px 13px;
  resize: vertical;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-left: 56px;
  padding-right: 52px;
}

.password-toggle-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--accent-strong);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  width: 38px;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible,
.password-toggle-button-visible {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
  outline: none;
}

.password-toggle-icon {
  display: inline-block;
  height: 18px;
  width: 20px;
}

.primary-button,
.secondary-button {
  align-items: center;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.primary-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-contrast);
}

.login-form .primary-button {
  background: linear-gradient(90deg, var(--accent-strong), #00977f);
  border-color: transparent;
  border-radius: 9px;
  box-shadow: 0 12px 22px rgba(var(--accent-rgb), 0.15);
  gap: 12px;
  justify-content: center;
  margin-top: 0;
  min-height: 52px;
  overflow: hidden;
  position: relative;
}

.login-form .primary-button::before {
  background: rgba(255, 255, 255, 0.12);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.18s ease;
}

.login-form .primary-button:hover:not(:disabled),
.login-form .primary-button:focus-visible:not(:disabled) {
  background: linear-gradient(90deg, var(--accent-strong), #00977f);
  box-shadow: 0 14px 28px rgba(var(--accent-rgb), 0.24);
  outline: none;
  transform: none;
}

.login-form .primary-button:hover:not(:disabled)::before,
.login-form .primary-button:focus-visible:not(:disabled)::before {
  opacity: 1;
}

.login-form .primary-button span {
  position: relative;
  z-index: 1;
}

.button-arrow {
  height: 18px;
  position: absolute;
  right: 22px;
  width: 18px;
  z-index: 1;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
  box-shadow: 0 12px 22px var(--accent-shadow);
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.nav-button:focus-visible,
.queue-summary-card:focus-visible {
  outline: 3px solid var(--accent-focus);
  outline-offset: 2px;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.76;
}

.primary-button.is-saving {
  gap: 10px;
  opacity: 0.92;
  pointer-events: none;
}

.primary-button.is-saving::before {
  animation: login-spin 0.8s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  border-top-color: #ffffff;
  content: "";
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.button-spinner {
  animation: login-spin 0.8s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 999px;
  height: 18px;
  position: absolute;
  right: 22px;
  width: 18px;
}

.secondary-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.icon-action-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  padding: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
  width: 36px;
}

.icon-action-button:hover:not(:disabled),
.icon-action-button:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent-border-strong);
  box-shadow: 0 10px 20px rgba(var(--accent-rgb), 0.1);
  color: var(--accent-strong);
  outline: none;
  transform: translateY(-1px);
}

.icon-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.icon-action-button.action-edit,
.icon-action-button.action-use {
  color: var(--accent-strong);
}

.icon-action-button.action-success {
  border-color: rgba(22, 101, 52, 0.24);
  color: #166534;
}

.icon-action-button.action-success:hover:not(:disabled),
.icon-action-button.action-success:focus-visible {
  background: #ecfdf5;
  border-color: #bbf7d0;
  box-shadow: 0 10px 20px rgba(22, 101, 52, 0.1);
  color: #14532d;
}

.icon-action-button.action-danger {
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--danger);
}

.icon-action-button.action-danger:hover:not(:disabled),
.icon-action-button.action-danger:focus-visible {
  background: var(--danger-surface);
  border-color: rgba(180, 35, 24, 0.34);
  box-shadow: 0 10px 20px rgba(180, 35, 24, 0.1);
  color: #8f1d14;
}

.icon-action-symbol {
  display: block;
  height: 18px;
  width: 18px;
}

.icon-action-loading {
  color: currentColor;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  margin-top: -4px;
}

.full-width {
  width: 100%;
}

.error-message {
  align-items: center;
  background: var(--danger-surface);
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 9px;
  color: var(--danger);
  display: flex;
  font-size: 0.92rem;
  gap: 12px;
  line-height: 1.4;
  min-height: 54px;
  padding: 12px 15px;
}

.error-icon {
  align-items: center;
  background: var(--danger);
  border-radius: 7px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.login-divider {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 0.92rem;
  gap: 18px;
  grid-template-columns: 1fr auto 1fr;
  margin: 2px 0 0;
}

.login-divider::before,
.login-divider::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.password-recovery-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

.password-recovery-button:hover,
.password-recovery-button:focus-visible {
  color: var(--accent-strong);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.recovery-icon {
  height: 20px;
  width: 18px;
}

.success-message {
  background: var(--accent-surface);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  color: var(--accent-strong);
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 12px 13px;
}

.toast-viewport {
  display: grid;
  gap: 10px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  position: fixed;
  top: 18px;
  transform: translateX(-50%);
  width: 420px;
  z-index: 60;
}

.toast {
  align-items: start;
  animation: toast-in 0.18s ease-out;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 13px 13px 13px 14px;
}

.toast-success {
  background: var(--success);
  border-color: #176b3b;
  border-left-color: #0f5d32;
  box-shadow: 0 18px 42px rgba(31, 138, 76, 0.28);
}

/* Driver payment finance center */
.finance-center { gap: 1.15rem; }
.finance-header { align-items: flex-start; }
.finance-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .85rem; }
.finance-kpi { background: var(--surface, #fff); border: 1px solid #e5e9ef; border-radius: 14px; box-shadow: 0 8px 22px rgba(28, 39, 49, .05); display: grid; gap: .35rem; padding: 1rem; }
.finance-kpi > span, .finance-kpi small { color: #66727e; font-size: .78rem; }
.finance-kpi strong { color: #1d252c; font-size: 1.35rem; }
.finance-kpi.success { border-top: 3px solid #24a46d; }
.finance-kpi.warning { border-top: 3px solid #e3a008; }
.finance-kpi.danger { border-top: 3px solid #d64545; }
.finance-kpi.info { border-top: 3px solid #3f7fc4; }
.finance-filter-panel { padding: 1rem; }
.finance-filter-bar { grid-template-columns: minmax(145px, .7fr) minmax(145px, .7fr) minmax(180px, 1fr) minmax(220px, 1.4fr); }
.finance-search { min-width: 220px; }
.finance-payments-panel, .finance-batches-panel { overflow: hidden; padding: 0; }
.finance-panel-heading { align-items: center; border-bottom: 1px solid #e8edf2; display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; }
.finance-panel-heading h3 { margin: 0 0 .2rem; }
.finance-selection-actions { align-items: center; display: flex; gap: .8rem; font-size: .85rem; }
.finance-table-wrap { overflow-x: auto; }
.finance-table { border-collapse: collapse; min-width: 1120px; width: 100%; }
.finance-table th { background: #f6f8fa; color: #66727e; font-size: .72rem; letter-spacing: .035em; padding: .75rem; text-align: left; text-transform: uppercase; }
.finance-table td { border-top: 1px solid #edf0f3; font-size: .82rem; padding: .75rem; vertical-align: middle; }
.finance-table td small { color: #73808c; display: block; margin-top: .2rem; }
.finance-table tr.overdue { background: #fff8f7; }
.finance-link-button { background: none; border: 0; color: var(--accent, #247660); cursor: pointer; font-weight: 700; padding: 0; text-decoration: underline; }
.finance-status { background: #edf1f4; border-radius: 999px; color: #4c5964; display: inline-flex; font-size: .72rem; font-weight: 700; padding: .3rem .55rem; white-space: nowrap; }
.finance-status.paid, .finance-status.batch-completed { background: #e4f5ec; color: #16734a; }
.finance-status.partiallypaid, .finance-status.batch-partiallycompleted { background: #fff2d7; color: #8b5d00; }
.finance-status.overdue { background: #fde7e5; color: #ae2f2f; }
.finance-status.batch-awaitingapproval { background: #e8effb; color: #345f9f; }
.finance-status.batch-processing { background: #e8f5f7; color: #246e78; }
.finance-status.batch-cancelled { background: #f1f1f1; color: #6a6a6a; }
.finance-empty { color: #6c7883; margin: 0; padding: 1.4rem; text-align: center; }
.finance-batch-list { display: grid; }
.finance-batch-card { align-items: center; border-top: 1px solid #edf0f3; display: grid; gap: 1rem; grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(160px, .7fr) auto; padding: .9rem 1.15rem; }
.finance-batch-card:first-child { border-top: 0; }
.finance-batch-main { display: grid; gap: .18rem; }
.finance-batch-main span, .finance-batch-main small { color: #6d7984; }
.finance-batch-progress { display: grid; font-size: .78rem; gap: .35rem; }
.finance-batch-progress progress { accent-color: var(--accent, #247660); height: .45rem; width: 100%; }
.finance-batch-meta { align-items: center; display: flex; gap: .6rem; }
.finance-batch-meta > span:last-child { color: #6d7984; font-size: .78rem; }
.finance-modal { max-width: 620px; width: min(620px, calc(100vw - 2rem)); }
.finance-batch-modal { max-width: 820px; width: min(820px, calc(100vw - 2rem)); }
.finance-modal .modal-body { display: grid; gap: 1rem; max-height: 68vh; overflow-y: auto; }
.finance-modal-summary, .finance-batch-detail-summary { align-items: center; background: #f5f8f7; border: 1px solid #e4eae7; border-radius: 12px; display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; }
.finance-batch-detail-summary { justify-content: flex-start; }
.finance-detail-list, .finance-event-list { border: 1px solid #e7ebef; border-radius: 12px; display: grid; overflow: hidden; }
.finance-detail-list article, .finance-event-list article { align-items: center; border-top: 1px solid #edf0f3; display: grid; gap: 1rem; grid-template-columns: 1.4fr .8fr auto; padding: .75rem .9rem; }
.finance-detail-list article:first-child, .finance-event-list article:first-child { border-top: 0; }
.finance-detail-list article > div { display: grid; gap: .15rem; }
.finance-detail-list small, .finance-event-list small { color: #73808c; }
.finance-event-list article { align-items: start; grid-template-columns: 1fr auto; }
.finance-event-list article p { color: #596570; grid-column: 1 / -1; margin: 0; }
.finance-separation-warning { background: #fff4db; border-left: 3px solid #e3a008; border-radius: 8px; color: #72500b; margin: 0; padding: .75rem .9rem; }
.finance-item-actions { align-items: center; display: flex !important; flex-direction: row; flex-wrap: wrap; gap: .4rem !important; }
.finance-remittance { border: 1px solid #dfe9e5; border-radius: 12px; display: grid; gap: .8rem; overflow: hidden; }
.finance-remittance .finance-panel-heading { background: #f5f8f7; padding: .75rem .9rem; }
.finance-remittance .finance-detail-list { border: 0; border-radius: 0; }
.finance-reconciliation-form { align-items: end; display: grid; gap: .75rem; grid-template-columns: 1fr auto; padding: 0 .9rem; }
.finance-file-hint { color: #66727e; font-size: .78rem; margin: 0; padding: 0 .9rem .8rem; }
.finance-payout-summary { align-items: flex-start; background: #f5f8f7; border-radius: 10px; display: grid; gap: .35rem; padding: .8rem; }
.finance-status.payout-verified, .finance-status.reconciliation-confirmed { background: #e4f5ec; color: #16734a; }
.finance-status.payout-rejected, .finance-status.reconciliation-rejected { background: #fde7e5; color: #ae2f2f; }
.finance-status.payout-pendingverification, .finance-status.reconciliation-pending { background: #fff2d7; color: #8b5d00; }
.finance-batch-actions { flex-wrap: wrap; }

@media (max-width: 1100px) {
  .finance-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-batch-card { grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) auto; }
  .finance-batch-meta { grid-column: 1 / 3; }
}

@media (max-width: 720px) {
  .finance-kpi-grid { grid-template-columns: 1fr 1fr; }
  .finance-filter-bar { grid-template-columns: 1fr; }
  .finance-panel-heading, .finance-selection-actions { align-items: stretch; flex-direction: column; }
  .finance-batch-card { align-items: stretch; grid-template-columns: 1fr; }
  .finance-batch-meta { grid-column: auto; }
  .finance-detail-list article, .finance-event-list article { grid-template-columns: 1fr; }
  .finance-event-list article p { grid-column: auto; }
}

.toast-success .toast-content strong,
.toast-success .toast-content span {
  color: #ffffff;
}

.toast-success .toast-close {
  color: #ffffff;
}

.toast-success .toast-close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-warning {
  border-left-color: var(--warn);
}

.toast-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toast-content strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.25;
}

.toast-content span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.toast-close {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  line-height: 1;
  width: 30px;
}

.toast-close:hover {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signed-in-panel {
  display: grid;
  gap: 18px;
}

.session-summary {
  align-items: center;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.session-summary strong,
.session-summary span {
  display: block;
}

.session-summary span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.status-dot {
  background: var(--company-secondary);
  border-radius: 999px;
  flex: 0 0 auto;
  height: 10px;
  width: 10px;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-pill {
  background: rgba(182, 106, 0, 0.1);
  border: 1px solid rgba(182, 106, 0, 0.2);
  border-radius: 999px;
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

.scope-line {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
}

.scope-line span {
  color: var(--muted);
}

.action-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.app-shell {
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.055), transparent 36%),
    linear-gradient(315deg, rgba(var(--company-secondary-rgb), 0.09), transparent 34%),
    var(--page);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.18s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.side-navigation {
  align-content: start;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 rgba(30, 41, 36, 0.03);
  display: grid;
  gap: 22px;
  grid-template-rows: auto auto 1fr auto;
  max-height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  padding: 22px;
  position: sticky;
  top: 0;
  transition: padding 0.18s ease;
  z-index: 2;
}

.side-navigation-brand {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 0;
}

.side-navigation-brand > div {
  min-width: 0;
}

.side-navigation-brand .eyebrow,
.side-navigation-brand h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-navigation h1 {
  font-size: 1.2rem;
  margin: 0;
}

.sidebar-toggle-button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  width: 36px;
}

.sidebar-toggle-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.reports-section {
  gap: 16px;
}

.reports-header {
  align-items: end;
  padding-bottom: 2px;
}

.reports-actions {
  align-items: center;
  gap: 8px;
}

.reports-filter-panel {
  padding: 14px;
}

.reports-filter-bar {
  align-items: end;
  background: #fbfcff;
  gap: 10px;
  grid-template-columns: minmax(140px, 0.55fr) minmax(140px, 0.55fr) minmax(220px, 1.1fr) minmax(180px, 0.8fr);
  padding: 12px;
}

.reports-driver-filter {
  min-width: 0;
}

.reports-export-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.reports-period-button.active {
  background: rgba(var(--accent-rgb, 20, 122, 111), 0.1);
  border-color: rgba(var(--accent-rgb, 20, 122, 111), 0.28);
  color: var(--accent-strong);
}

.reports-overview-strip {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.1fr 1.5fr 0.8fr 0.8fr;
}

.reports-overview-item {
  background: #fff;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(25, 42, 70, 0.04);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}

.reports-overview-item small {
  color: #66737f;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reports-overview-item strong {
  color: #1f315f;
  font-size: 0.98rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-overview-item em {
  color: #66737f;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 700;
}

.reports-section .reports-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.reports-section .reports-metric {
  background: #fff;
  border: 1px solid #e4ebf4;
  border-left: 4px solid #d7dee5;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(25, 42, 70, 0.04);
  min-height: 94px;
  padding: 14px;
}

.reports-section .reports-metric.active {
  border-left-color: var(--accent);
}

.reports-section .reports-metric.success {
  border-left-color: var(--success);
}

.reports-section .reports-metric.info {
  border-left-color: #236fb4;
}

.reports-section .reports-metric.warning {
  border-left-color: #bf7a00;
}

.reports-section .reports-metric .dashboard-metric-copy {
  gap: 4px;
}

.reports-section .reports-metric .dashboard-metric-copy > small {
  color: #66737f;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reports-section .reports-metric .dashboard-metric-copy > strong {
  color: #1f315f;
  font-size: 1.28rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.reports-section .reports-metric .dashboard-metric-copy > span {
  color: #66737f;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.reports-table-panel {
  padding: 18px;
}

.reports-settlement-panel {
  padding: 18px;
}

.reports-pendency-panel {
  padding: 18px;
}

.reports-pendency-panel.has-pendencies {
  border-color: rgba(191, 122, 0, 0.24);
}

.reports-empty-panel {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb, 20, 122, 111), 0.08), transparent 42%),
    #fff;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 22px;
}

.reports-empty-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reports-empty-copy strong {
  color: #1f315f;
  font-size: 1.08rem;
  line-height: 1.2;
}

.reports-empty-copy span {
  color: #66737f;
  font-size: 0.88rem;
  line-height: 1.4;
}

.reports-empty-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reports-panel-subtitle {
  color: #66737f;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 3px;
}

.reports-pendency-list {
  display: grid;
  gap: 8px;
}

.reports-pendency-row {
  align-items: center;
  background: #fffdf8;
  border: 1px solid rgba(191, 122, 0, 0.18);
  border-left: 4px solid #d7dee5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 0.85fr) minmax(260px, 1.2fr) minmax(220px, auto) auto;
  padding: 12px;
}

.reports-pendency-row.critical {
  border-left-color: var(--danger);
}

.reports-pendency-row.warning {
  border-left-color: #bf7a00;
}

.reports-pendency-main,
.reports-pendency-detail {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.reports-pendency-main strong,
.reports-pendency-detail strong {
  color: #1d252c;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.reports-pendency-main small,
.reports-pendency-detail small,
.reports-pendency-detail span {
  color: #66737f;
  font-size: 0.76rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.reports-pendency-values {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reports-pendency-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reports-pendency-open-button {
  justify-self: end;
}

.reports-adjustment-modal {
  max-width: 640px;
  width: min(100%, 640px);
}

.reports-adjustment-body {
  gap: 16px;
}

.reports-modal-description {
  color: #53606b;
  line-height: 1.5;
  margin: 0;
}

.reports-settlement-details-modal {
  max-height: min(86vh, 860px);
  max-width: 820px;
  width: min(100%, 820px);
}

.reports-settlement-details-body {
  gap: 20px;
  overflow-y: auto;
}

.reports-settlement-detail-section,
.reports-settlement-snapshot-list,
.reports-settlement-event-list {
  display: grid;
  gap: 8px;
}

.reports-settlement-detail-section h4 {
  margin: 0;
}

.reports-settlement-snapshot-item,
.reports-settlement-event {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.reports-settlement-snapshot-item {
  grid-template-columns: minmax(180px, 1fr) minmax(110px, auto) minmax(130px, auto);
}

.reports-settlement-snapshot-item span,
.reports-settlement-event {
  color: #53606b;
}

.reports-settlement-snapshot-item span {
  display: grid;
  gap: 2px;
}

.reports-settlement-snapshot-item strong,
.reports-settlement-event strong {
  color: #1d252c;
}

.reports-settlement-event span,
.reports-settlement-event small,
.reports-settlement-snapshot-item small {
  color: #66737f;
  font-size: 0.76rem;
}

.reports-payment-modal {
  max-width: 720px;
  width: min(100%, 720px);
}

.reports-payment-body,
.reports-payment-details-body,
.reports-payment-history {
  display: grid;
  gap: 16px;
}

.reports-payment-details-modal {
  max-height: min(88vh, 900px);
  max-width: 900px;
  width: min(100%, 900px);
}

.reports-payment-details-body {
  overflow-y: auto;
}

.reports-payment-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-payment-proof-field small {
  color: #66737f;
  font-size: 0.78rem;
}

.reports-payment-proof-field input[type="file"] {
  border-style: dashed;
}

.reports-payment-transaction {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-left: 4px solid #2f855a;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
  padding: 12px;
}

.reports-payment-transaction.reversal {
  border-left-color: #b45309;
}

.reports-payment-transaction-main,
.reports-payment-transaction-detail {
  display: grid;
  gap: 4px;
}

.reports-payment-transaction-main small,
.reports-payment-transaction-detail span,
.reports-payment-transaction-detail small {
  color: #66737f;
  font-size: 0.76rem;
}

.payment-transaction-type {
  color: #53606b;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reports-payment-transaction-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reports-payment-reversed-label {
  color: #b45309;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.reports-nested-modal {
  z-index: 30;
}

.payment-status-chip {
  border: 1px solid #d6e0eb;
  border-radius: 999px;
  color: #53606b;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  justify-self: start;
  padding: 4px 8px;
}

.payment-status-chip.partiallypaid {
  background: #fff8e6;
  border-color: #efd99f;
  color: #765000;
}

.payment-status-chip.paid {
  background: var(--success-soft);
  border-color: rgba(31, 138, 76, 0.28);
  color: var(--success);
}

.reports-settlement-title-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reports-settlement-list {
  display: grid;
  gap: 8px;
}

.reports-settlement-row {
  align-items: center;
  background: #fff;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 0.8fr) minmax(248px, auto);
  padding: 12px;
}

.reports-settlement-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.reports-settlement-main strong {
  color: #1d252c;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.reports-settlement-main small {
  color: #66737f;
  font-size: 0.76rem;
  line-height: 1.3;
}

.reports-settlement-values,
.reports-settlement-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reports-settlement-value {
  display: grid;
  gap: 2px;
  min-width: 68px;
  text-align: right;
}

.reports-settlement-value strong {
  color: #1d252c;
  font-size: 0.86rem;
}

.reports-settlement-value small {
  color: #66737f;
  font-size: 0.72rem;
}

.reports-adjusted-value-note {
  color: #66737f;
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 2px;
  text-transform: uppercase;
}

.reports-settlement-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.reports-driver-list {
  display: grid;
  gap: 8px;
}

.reports-driver-row {
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.reports-driver-summary {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(82px, auto)) minmax(74px, auto);
  min-height: 68px;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.reports-driver-summary:hover,
.reports-driver-summary:focus-visible {
  background: rgba(var(--accent-rgb, 20, 122, 111), 0.06);
  outline: none;
}

.reports-driver-main,
.reports-driver-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reports-driver-main strong,
.reports-driver-stat strong {
  color: #1d252c;
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.reports-driver-main small,
.reports-driver-stat small {
  color: #66737f;
  font-size: 0.76rem;
  line-height: 1.25;
}

.reports-driver-stat {
  text-align: right;
}

.reports-driver-toggle {
  align-items: center;
  background: #f7faff;
  border: 1px solid #e4ebf4;
  border-radius: 999px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
}

.reports-delivery-table {
  border-top: 1px solid rgba(20, 32, 42, 0.1);
  display: grid;
}

.reports-delivery-header,
.reports-delivery-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1.2fr) minmax(112px, 0.8fr) minmax(86px, 0.6fr) minmax(96px, 0.7fr);
  padding: 10px 16px;
}

.reports-delivery-header {
  background: #f3f6f8;
  color: #66737f;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.reports-delivery-row {
  color: #34414d;
  font-size: 0.86rem;
}

.reports-delivery-row + .reports-delivery-row {
  border-top: 1px solid rgba(20, 32, 42, 0.08);
}

.reports-delivery-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.organization-report-table {
  border-top: 1px solid rgba(20, 32, 42, 0.1);
  display: grid;
}

.organization-report-header,
.organization-report-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(170px, 1.5fr) minmax(78px, 0.6fr) minmax(86px, 0.7fr) minmax(112px, 0.8fr) minmax(112px, 0.8fr) minmax(96px, 0.7fr);
  padding: 10px 16px;
}

.organization-report-header {
  background: #f3f6f8;
  color: #66737f;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.organization-report-row {
  color: #34414d;
  font-size: 0.86rem;
}

.organization-report-row + .organization-report-row {
  border-top: 1px solid rgba(20, 32, 42, 0.08);
}

.organization-report-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.organization-report-row small {
  color: #77828c;
  font-size: 0.72rem;
}

@media (max-width: 920px) {
  .reports-header {
    align-items: stretch;
  }

  .reports-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .reports-actions .compact-button {
    justify-content: center;
    min-width: 0;
  }

  .reports-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .reports-overview-strip {
    grid-template-columns: 1fr 1fr;
  }

  .reports-section .reports-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reports-driver-summary {
    grid-template-columns: 1fr 1fr;
  }

  .reports-driver-filter {
    min-width: 0;
    width: 100%;
  }

  .reports-driver-stat {
    text-align: left;
  }

  .reports-driver-toggle {
    justify-self: start;
  }

  .reports-settlement-row {
    grid-template-columns: 1fr;
  }

  .reports-settlement-snapshot-item {
    grid-template-columns: 1fr;
  }

  .reports-payment-form-grid,
  .reports-payment-transaction {
    grid-template-columns: 1fr;
  }

  .reports-payment-transaction-actions {
    justify-content: flex-start;
  }

  .reports-empty-panel {
    grid-template-columns: 1fr;
  }

  .reports-empty-actions {
    justify-content: flex-start;
  }

  .reports-pendency-row {
    grid-template-columns: 1fr;
  }

  .reports-settlement-actions,
  .reports-settlement-values,
  .reports-settlement-title-actions,
  .reports-pendency-actions,
  .reports-pendency-values {
    justify-content: flex-start;
  }

  .reports-pendency-open-button {
    justify-self: stretch;
  }

  .reports-settlement-value {
    text-align: left;
  }

  .reports-delivery-header,
  .organization-report-header {
    display: none;
  }

  .reports-delivery-row,
  .organization-report-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .reports-section {
    gap: 12px;
  }

  .reports-actions {
    grid-template-columns: 1fr 1fr;
  }

  .reports-filter-panel,
  .reports-pendency-panel,
  .reports-settlement-panel,
  .reports-table-panel {
    padding: 12px;
  }

  .reports-filter-bar,
  .reports-overview-strip,
  .reports-section .reports-summary-grid {
    grid-template-columns: 1fr;
  }

  .reports-section .reports-metric {
    min-height: 82px;
  }

  .reports-empty-panel {
    padding: 16px;
  }

  .reports-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reports-pendency-row,
  .reports-settlement-row,
  .reports-driver-summary {
    padding: 11px;
  }

  .reports-pendency-actions .compact-button {
    flex: 1 1 140px;
  }

  .reports-settlement-actions .compact-button {
    flex: 1 1 92px;
    justify-content: center;
    min-width: 92px;
    white-space: nowrap;
  }
}

.mobile-sidebar-signout-button {
  display: none;
}

.side-navigation-controls {
  display: grid;
  gap: 12px;
}

.side-navigation .company-switcher {
  align-items: stretch;
  display: grid;
  gap: 8px;
  min-height: auto;
  padding: 10px 12px;
}

.side-navigation .company-switcher select {
  background: transparent;
  max-width: 100%;
  min-width: 0;
}

.scope-switcher {
  display: grid;
  gap: 10px;
  padding: 10px 8px;
}

.scope-switcher-heading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-content: space-between;
  text-transform: uppercase;
}

.scope-switcher-heading small {
  color: var(--accent-strong);
  font-size: 0.68rem;
}

.admin-scope-switcher {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
}

.scope-mode-button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  min-height: 34px;
  padding: 0 12px;
}

.scope-mode-button.active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  color: var(--text);
}

.scope-fields {
  display: grid;
  gap: 10px;
}

.scope-field {
  display: grid;
  gap: 6px;
}

.scope-field span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.scope-field select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  min-height: 40px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.scope-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 3px 8px rgba(var(--accent-rgb), 0.12);
  outline: 0;
}

.company-required-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.side-nav {
  align-content: start;
  display: grid;
  gap: 10px;
}

.side-nav-group {
  display: grid;
  gap: 6px;
}

.side-nav-heading {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  font-size: 0.72rem;
  font-weight: 900;
  gap: 8px;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  letter-spacing: 0;
  margin: 0;
  min-height: 32px;
  padding: 0 8px;
  text-align: left;
  text-transform: uppercase;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.side-nav-heading:hover,
.side-nav-heading.active {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-strong);
}

.side-nav-heading span:not(.side-nav-heading-caret) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav-heading small {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.68rem;
  height: 20px;
  justify-content: center;
  min-width: 24px;
  padding-inline: 6px;
}

.side-nav-heading-caret {
  color: currentColor;
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
}

.side-nav-items {
  display: grid;
  gap: 6px;
  padding-left: 10px;
}

.side-nav-group.collapsed .side-nav-items {
  display: none;
}

.side-nav-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  font-weight: 800;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 44px;
  padding: 0 12px;
  text-align: left;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.side-nav-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  display: block;
  height: 20px;
  width: 20px;
}

.side-nav-button:hover,
.side-nav-button.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.side-nav-button:hover {
  transform: translateX(2px);
}

.side-navigation-footer {
  display: grid;
  gap: 8px;
}

.side-action-button {
  align-items: center;
  display: inline-grid;
  gap: 9px;
  grid-template-columns: 20px minmax(0, auto);
  justify-content: center;
  justify-self: stretch;
}

.side-navigation.collapsed {
  gap: 18px;
  justify-items: center;
  padding: 18px 14px;
}

.side-navigation.collapsed .side-navigation-brand {
  gap: 12px;
  grid-template-columns: 1fr;
  justify-items: center;
}

.side-navigation.collapsed .side-navigation-brand > div {
  display: none;
}

.side-navigation.collapsed .side-navigation-controls {
  display: none;
}

.side-navigation.collapsed .brand-logo,
.side-navigation.collapsed .brand-mark {
  height: 44px;
  width: 44px;
}

.side-navigation.collapsed .sidebar-toggle-button {
  height: 38px;
  width: 38px;
}

.side-navigation.collapsed .side-nav {
  width: 100%;
}

.compact-side-nav {
  gap: 8px;
  justify-items: center;
}

.side-navigation.collapsed .side-nav-button {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 44px;
  padding: 0;
  width: 48px;
}

.side-navigation.collapsed .side-nav-button:hover {
  transform: none;
}

.side-navigation.collapsed .side-nav-button span,
.side-navigation.collapsed .side-action-button span {
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.side-navigation.collapsed .side-navigation-footer {
  justify-items: center;
  width: 100%;
}

.side-navigation.collapsed .side-action-button {
  grid-template-columns: 1fr;
  min-height: 44px;
  padding: 0;
  width: 48px;
}

.topbar {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  display: grid;
  gap: 12px;
  padding: 14px clamp(18px, 4vw, 42px) 10px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.topbar-main {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-width: 0;
}

.topbar-brand {
  margin-bottom: 0;
  min-width: 220px;
}

.topbar h1 {
  font-size: 1.35rem;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topbar-nav {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.company-switcher {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
}

.company-switcher span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.company-switcher select {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  max-width: 190px;
  outline: none;
}

.nav-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  position: relative;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-button:hover,
.nav-button.active {
  background: #ffffff;
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.nav-button.active {
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.1);
}

.nav-button.active::after {
  background: var(--accent);
  border-radius: 999px;
  bottom: -5px;
  content: "";
  height: 3px;
  left: 14px;
  position: absolute;
  right: 14px;
}

.compact-button {
  min-height: 40px;
  padding: 0 12px;
}

.workspace {
  margin: 0;
  max-width: none;
  min-height: auto;
  min-width: 0;
  padding: 28px clamp(22px, 2.4vw, 34px) 48px;
  width: 100%;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.embedded-admin-shell {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  min-height: auto;
  overflow: hidden;
}

.admin-sidebar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 22px;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 22px;
  position: sticky;
  top: 0;
}

.embedded-admin-shell .admin-sidebar {
  min-height: auto;
  position: relative;
  top: auto;
}

.admin-sidebar-brand {
  margin-bottom: 0;
}

.admin-sidebar h1 {
  font-size: 1.2rem;
  margin: 0;
}

.admin-company-switcher {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-company-switcher span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-company-switcher select {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
}

.admin-nav {
  align-content: start;
  display: grid;
  gap: 8px;
}

.admin-nav-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0 12px;
  text-align: left;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.admin-nav-button:hover,
.admin-nav-button.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.admin-nav-button:hover {
  transform: translateX(2px);
}

.admin-signout {
  justify-self: end;
}

.admin-main {
  min-width: 0;
  padding: 32px clamp(18px, 4vw, 42px) 48px;
}

.admin-main-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 14px 16px;
  position: sticky;
  top: 16px;
  z-index: 11;
}

.admin-main-header strong {
  color: var(--ink);
  display: block;
  font-size: 0.98rem;
}

.embedded-admin-shell .admin-main {
  padding: 24px;
}

.admin-main > .content-section {
  margin: 0;
  max-width: none;
  width: 100%;
}

.content-section {
  display: grid;
  gap: 22px;
  width: 100%;
}

.section-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.section-header h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.summary-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.04);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.summary-tile:hover:not(.passive) {
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-tight);
  transform: translateY(-2px);
}

.summary-tile.passive {
  cursor: default;
}

.summary-tile span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-tile strong {
  font-size: 1.45rem;
}

.summary-tile small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.dashboard-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-metric {
  border-top: 4px solid var(--line-strong);
  min-height: 126px;
}

.dashboard-metric.metric-active {
  border-top-color: var(--accent);
}

.dashboard-metric.metric-success {
  border-top-color: var(--success);
}

.dashboard-metric.metric-warning {
  border-top-color: var(--warn);
}

.dashboard-metric.metric-danger {
  border-top-color: var(--danger);
}

.dashboard-metric.metric-done {
  border-top-color: var(--info);
}

.dashboard-metric strong {
  font-size: 1.7rem;
}

.shortcut-grid .summary-tile {
  min-height: 132px;
}

.dashboard-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operations-home .management-panel {
  overflow: hidden;
}

.dashboard-count-list {
  display: grid;
  gap: 10px;
}

.dashboard-count-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 42px;
  padding: 2px 0 11px;
}

.dashboard-count-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-count-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-count-row strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.dashboard-alerts-panel {
  display: grid;
  gap: 14px;
}

.operational-pendencies-panel {
  display: grid;
  gap: 14px;
}

.operational-pendency-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.operational-pendency-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #64748b;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 12px;
  text-align: left;
}

.operational-pendency-card:hover:not(:disabled),
.operational-pendency-card:focus-visible:not(:disabled) {
  box-shadow: var(--shadow-tight);
  outline: none;
  transform: translateY(-1px);
}

.operational-pendency-card:disabled {
  cursor: default;
  opacity: 0.68;
}

.operational-pendency-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.operational-pendency-card strong {
  font-size: 1.55rem;
}

.operational-pendency-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.operational-pendency-card.severity-critical {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.operational-pendency-card.severity-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}

.operational-pendency-card.severity-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}

.dashboard-alert-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.dashboard-alert {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #64748b;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.04);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-alert:hover {
  box-shadow: var(--shadow-tight);
  transform: translateY(-1px);
}

.dashboard-alert strong {
  font-size: 1rem;
}

.dashboard-alert span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.dashboard-alert small {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-alert.severity-critical {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.dashboard-alert.severity-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}

.dashboard-alert.severity-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}

.alert-severity {
  align-self: start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem !important;
  font-weight: 900;
  justify-self: start;
  min-height: 24px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.realtime-pill {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
}

.realtime-pill::before {
  background: #94a3b8;
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.realtime-pill.online::before {
  background: #16a34a;
}

.realtime-pill.reconnecting::before,
.realtime-pill.connecting::before {
  background: #f59e0b;
}

.realtime-pill.offline::before {
  background: #dc2626;
}

.realtime-update {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 10px 12px;
}

.panel-title-row h3 {
  letter-spacing: 0;
}

.operations-map-section {
  max-width: none;
  width: 100%;
}

.map-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.operations-map-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.operations-map-canvas-shell {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: clamp(420px, 62vh, 680px);
  overflow: hidden;
  position: relative;
}

.operations-map-canvas {
  inset: 0;
  position: absolute;
}

.map-loading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.operations-map-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  display: grid;
  gap: 12px;
  max-height: clamp(420px, 62vh, 680px);
  overflow: auto;
  padding: 14px;
}

.map-driver-list {
  display: grid;
  gap: 8px;
}

.map-panel-subtitle {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.map-driver-row {
  align-items: start;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
  text-align: left;
}

.map-driver-row:hover,
.map-driver-row:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.45);
  outline: none;
}

.map-driver-row strong,
.map-info-window strong {
  display: block;
  font-size: 0.94rem;
}

.map-driver-row span,
.map-driver-row small {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
}

.map-marker-dot {
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(29, 37, 32, 0.12);
  height: 14px;
  margin-top: 3px;
  width: 14px;
}

.map-marker-dot.available {
  background: #22a06b;
}

.map-marker-dot.busy {
  background: #147a6f;
}

.map-marker-dot.stale {
  background: #d19a2a;
}

.map-marker-dot.muted {
  background: #7a8580;
}

.map-marker-dot.delivery {
  border-radius: 4px;
  transform: rotate(45deg);
}

.map-marker-dot.delivery-active {
  background: #2f5d8c;
}

.map-marker-dot.waiting {
  background: #d19a2a;
}

.map-marker-dot.failed {
  background: #b42318;
}

.map-marker-dot.attempted {
  background: #d97706;
}

.map-marker-dot.completed {
  background: #216b34;
}

.map-coordinate-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.map-coordinate-warning strong {
  font-size: 0.88rem;
}

.map-coordinate-warning span {
  font-size: 0.8rem;
  line-height: 1.35;
}

.map-info-window {
  color: #1d2520;
  display: grid;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  gap: 4px;
  min-width: 180px;
}

.state-box {
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 22px;
  place-content: center;
  text-align: center;
}

.state-box strong {
  color: var(--ink);
}

.delivery-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  overflow: hidden;
}

.delivery-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px 18px;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.delivery-row-detailed {
  align-items: flex-start;
}

.delivery-row:hover {
  background: #fbfdfc;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.06);
}

.delivery-row + .delivery-row {
  border-top: 1px solid var(--line);
}

.delivery-row strong,
.delivery-row span {
  display: block;
}

.delivery-row-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.delivery-row span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.status-chip {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent-strong) !important;
  flex: 0 0 auto;
  font-size: 0.82rem !important;
  font-weight: 800;
  margin-top: 0 !important;
  padding: 6px 10px;
  white-space: nowrap;
}

.status-chip.status-awaiting-acceptance {
  background: var(--warn-soft);
  border-color: #f5d18a;
  color: #8a5200 !important;
}

.status-chip.status-delivery-attempted {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e !important;
}

.status-chip.status-driver-assigned,
.status-chip.status-heading-to-pickup,
.status-chip.status-arrived-at-pickup,
.status-chip.status-picked-up,
.status-chip.status-heading-to-destination,
.status-chip.status-arrived-at-destination {
  background: var(--info-soft);
  border-color: #bfdbfe;
  color: #1d4ed8 !important;
}

.status-chip.status-completed,
.status-chip.status-checked-out {
  background: var(--success-soft);
  border-color: #b8dfc2;
  color: #216b34 !important;
}

.status-chip.status-failed {
  background: var(--danger-surface);
  border-color: #f5b7af;
  color: var(--danger) !important;
}

.assignment-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.delivery-status-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 460px;
}

.assignment-actions select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  min-height: 38px;
  min-width: 160px;
  outline: none;
  padding: 0 10px;
}

.compact-button {
  font-size: 0.86rem;
  min-height: 38px;
  padding: 0 12px;
}

.management-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
}

.customer-management-grid {
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
}

.delivery-management-grid {
  grid-template-columns: minmax(340px, 560px) minmax(0, 1fr);
}

.management-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  display: grid;
  gap: 16px;
  padding: 20px;
}

.management-panel h3 {
  font-size: 1.05rem;
  margin: 0;
}

.panel-title-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.panel-title-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-bar {
  align-items: end;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 180px);
  padding: 14px;
}

.single-filter-bar {
  grid-template-columns: minmax(220px, 1fr);
}

.company-filter-bar {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr) minmax(150px, 180px);
}

.delivery-filter-bar {
  grid-template-columns:
    minmax(240px, 1.7fr)
    minmax(145px, 0.8fr)
    minmax(135px, 0.75fr)
    minmax(135px, 0.75fr)
    minmax(145px, 0.75fr)
    minmax(160px, 0.9fr)
    minmax(135px, 0.7fr);
}

.queue-panel {
  gap: 18px;
}

.queue-title-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.batch-select-all {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 8px;
  min-height: 30px;
}

.batch-select-all input,
.batch-select-cell input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

.queue-filter-bar {
  align-items: end;
}

.filter-field input,
.filter-field select {
  min-height: 42px;
}

.count-pill {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 9px;
}

.compact-scope {
  border-top: 0;
  padding-top: 0;
}

.compact-state {
  min-height: 96px;
}

.queue-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.queue-summary-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.04);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 11px 12px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.queue-summary-card:hover,
.queue-summary-card.active {
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-tight);
  transform: translateY(-1px);
}

.queue-summary-card.active {
  background: linear-gradient(180deg, #ffffff, var(--accent-surface));
}

.queue-summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.queue-summary-card strong {
  font-size: 1.3rem;
}

.operational-delivery-list {
  border-radius: 8px;
}

.operational-delivery-row {
  border-left: 4px solid transparent;
  padding-left: 16px;
}

.operational-delivery-row.selected-for-batch {
  background: var(--accent-surface);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.batch-select-cell {
  align-items: center;
  align-self: stretch;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  margin: 0;
  min-width: 28px;
}

.batch-select-cell.disabled {
  opacity: 0.38;
}

.operational-delivery-row.has-issue {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.95), #ffffff 46%);
}

.operational-delivery-row.selected-for-batch.has-issue {
  background: linear-gradient(90deg, var(--accent-surface), #ffffff 62%);
}

.operational-delivery-row.issue-critical {
  border-left-color: #dc2626;
}

.operational-delivery-row.issue-warning {
  border-left-color: #d97706;
}

.operational-delivery-row.issue-info {
  border-left-color: #2563eb;
}

.delivery-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delivery-title-row strong {
  font-size: 1.02rem;
}

.delivery-reference {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.delivery-destination {
  color: var(--ink) !important;
  font-weight: 650;
  line-height: 1.35;
}

.delivery-meta-line {
  color: var(--muted) !important;
  font-size: 0.84rem !important;
}

.queue-alert-chip {
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex !important;
  font-size: 0.72rem !important;
  font-weight: 900;
  margin-top: 0 !important;
  min-height: 24px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.queue-alert-chip.issue-critical {
  color: #b91c1c !important;
}

.queue-alert-chip.issue-warning {
  color: #b45309 !important;
}

.queue-alert-chip.issue-info {
  color: #1d4ed8 !important;
}

.queue-alert-detail {
  color: var(--muted);
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  margin-top: 6px;
}

.queue-time-chip {
  background: #f8fafc;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  margin-top: 7px;
  padding: 4px 9px;
  width: fit-content;
}

.queue-time-chip.is-overdue {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.operational-delivery-row.issue-critical .queue-alert-detail {
  color: #b91c1c;
}

.operational-delivery-row.issue-warning .queue-alert-detail {
  color: #b45309;
}

.operational-delivery-row.issue-info .queue-alert-detail {
  color: #1d4ed8;
}

.delivery-detail-modal {
  max-width: min(1040px, calc(100vw - 32px));
  width: min(100%, 1040px);
}

.detail-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-summary-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
}

.detail-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-summary-card strong {
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.detail-section h3,
.detail-action-panel h3,
.detail-evidence-panel h3,
.detail-timeline-panel h3 {
  font-size: 1rem;
  margin: 0;
}

.detail-section dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-field {
  display: grid;
  gap: 3px;
}

.detail-field dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-field dd {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-alert {
  border: 1px solid var(--line);
  border-left: 4px solid #64748b;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.detail-alert strong {
  font-size: 0.96rem;
}

.detail-alert span {
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-alert.issue-critical {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.detail-alert.issue-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}

.detail-alert.issue-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}

.detail-time-alert {
  background: #f8fafc;
  border: 1px solid #dbe5ef;
  border-left: 4px solid #64748b;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.detail-time-alert strong {
  font-size: 0.96rem;
}

.detail-time-alert span {
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-time-alert.is-overdue {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}

.detail-action-panel,
.detail-evidence-panel,
.detail-timeline-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.detail-action-panel {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.detail-action-panel span {
  color: var(--muted);
  display: block;
  font-size: 0.88rem;
  margin-top: 4px;
}

.evidence-list {
  display: grid;
  gap: 10px;
}

.evidence-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.evidence-item strong,
.evidence-item span,
.evidence-item small {
  display: block;
}

.evidence-item span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.evidence-item small {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 6px;
}

.evidence-upload-body {
  display: grid;
  gap: 14px;
}

.evidence-file-field input[type="file"] {
  border-style: dashed;
  cursor: pointer;
}

.evidence-file-field small {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.driver-workspace {
  max-width: none;
  width: 100%;
}

.driver-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.driver-availability-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px;
}

.driver-availability-panel > div:first-child {
  display: grid;
  gap: 6px;
}

.driver-availability-panel strong {
  font-size: 1rem;
}

.driver-availability-panel small {
  color: var(--muted);
  line-height: 1.4;
}

.driver-availability-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.driver-notification-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.driver-notification-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.driver-notification-header > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.driver-notification-header strong {
  font-size: 0.98rem;
}

.driver-realtime-status {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  min-height: 24px;
  padding: 3px 8px;
}

.driver-realtime-status::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 7px;
  margin-right: 6px;
  width: 7px;
}

.driver-realtime-status.online {
  border-color: rgba(57, 218, 138, 0.32);
  color: var(--success);
}

.driver-realtime-status.connecting,
.driver-realtime-status.reconnecting {
  border-color: rgba(90, 141, 238, 0.28);
  color: var(--accent-strong);
}

.driver-realtime-status.offline {
  border-color: rgba(255, 91, 92, 0.24);
  color: var(--danger);
}

.driver-notification-empty {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.driver-notification-list {
  display: grid;
  gap: 8px;
}

.driver-notification-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.driver-notification-item.is-read {
  opacity: 0.72;
}

.driver-notification-item.success {
  border-left-color: var(--success);
}

.driver-notification-item.warning {
  border-left-color: #ffb020;
}

.driver-notification-item > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.driver-notification-item strong {
  font-size: 0.9rem;
}

.driver-notification-item span,
.driver-notification-item small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.driver-notification-item > .driver-notification-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.driver-notification-action {
  min-height: 30px;
}

.driver-toggle {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 900;
  gap: 8px;
  min-height: 38px;
  white-space: nowrap;
}

.driver-toggle input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

.driver-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
}

.driver-summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-summary-card strong {
  font-size: 1.45rem;
}

.driver-tabs {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  width: fit-content;
}

.driver-tab-button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 900;
  min-height: 34px;
  padding: 7px 12px;
}

.driver-tab-button:hover,
.driver-tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.driver-delivery-list {
  display: grid;
  gap: 14px;
}

.driver-delivery-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.driver-card-header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.driver-delivery-identity {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.driver-card-header h3 {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.2;
  margin: 0;
}

.driver-delivery-destination {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}

.driver-card-reference-row {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.driver-delivery-reference {
  color: var(--muted);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
}

.driver-card-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.driver-delivery-card.is-selected {
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 0 2px var(--accent-focus), var(--shadow-soft);
}

.driver-delivery-selector {
  align-items: center;
  color: var(--accent-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  gap: 7px;
}

.driver-delivery-selector input {
  accent-color: var(--accent);
  height: 20px;
  margin: 0;
  width: 20px;
}

.driver-priority-chip {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 28px;
  padding: 5px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.driver-priority-chip.priority-normal {
  background: var(--surface-soft);
  color: var(--muted);
}

.driver-priority-chip.priority-high {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.driver-priority-chip.priority-urgent {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.driver-priority-alert {
  border: 1px solid var(--line);
  border-left: 4px solid #64748b;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.driver-priority-alert strong {
  font-size: 0.92rem;
}

.driver-priority-alert span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.driver-priority-alert.priority-high {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left-color: #f97316;
}

.driver-priority-alert.priority-urgent {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.driver-time-alert {
  background: #f8fafc;
  border: 1px solid #dbe5ef;
  border-left: 4px solid #64748b;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.driver-time-alert strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.driver-time-alert span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.driver-time-alert.is-overdue {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}

.driver-geofence-status {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0284c7;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.driver-geofence-status strong {
  color: #075985;
  font-size: 0.92rem;
}

.driver-geofence-status span {
  color: #475569;
  font-size: 0.86rem;
  font-weight: 750;
}

.driver-geofence-status.is-inside {
  background: #ecfdf5;
  border-color: #a7f3d0;
  border-left-color: #059669;
}

.driver-geofence-status.is-inside strong {
  color: #047857;
}

.driver-geofence-status.is-unavailable {
  background: #f8fafc;
  border-color: #dbe5ef;
  border-left-color: #64748b;
}

.driver-geofence-status.is-unavailable strong {
  color: #334155;
}

.driver-card-meta .driver-time-chip {
  background: #f8fafc;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  padding: 4px 9px;
}

.driver-card-meta .driver-time-chip.is-overdue {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.driver-route {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.driver-route > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.driver-route span,
.driver-card-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.driver-route strong {
  font-size: 0.98rem;
}

.driver-route small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.driver-notes {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
  padding: 12px;
}

.driver-card-meta,
.driver-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.driver-card-actions {
  justify-content: flex-end;
}

.driver-selected-delivery-value {
  color: var(--accent-strong) !important;
}

.driver-mobile-selection-toolbar,
.driver-batch-selection-bar {
  display: none;
}

.driver-earnings-view {
  display: grid;
  gap: 14px;
}

.driver-earnings-heading {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--accent-border-strong);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
}

.driver-earnings-heading > div {
  display: grid;
  gap: 3px;
}

.driver-earnings-heading span,
.driver-earnings-heading small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.driver-earnings-heading strong {
  color: var(--accent-strong);
  font-size: 1.5rem;
}

.driver-earnings-summary {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.driver-earnings-summary-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 10px;
}

.driver-earnings-summary-item + .driver-earnings-summary-item {
  border-left: 1px solid var(--line);
}

.driver-earnings-summary-item span,
.driver-earnings-summary-item small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.driver-earnings-summary-item strong {
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.driver-earnings-summary-item.confirmed strong {
  color: var(--success);
}

.driver-earnings-summary-item.review strong {
  color: var(--danger);
}

.driver-earnings-batches {
  display: grid;
  gap: 12px;
}

.driver-earnings-batch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.driver-earnings-batch-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.driver-earnings-batch-header > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.driver-earnings-batch-header small {
  color: var(--muted);
  font-size: 0.76rem;
}

.driver-earnings-batch-progress,
.statement-batch-progress {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 9px 14px;
}

.driver-earnings-batch-progress span,
.statement-batch-progress span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.driver-earnings-batch-progress .review,
.statement-batch-progress .review {
  color: var(--danger);
}

.driver-earnings-deliveries {
  display: grid;
}

.driver-earnings-delivery {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 14px;
}

.driver-earnings-delivery + .driver-earnings-delivery {
  border-top: 1px solid var(--line);
}

.driver-earnings-delivery > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.driver-earnings-delivery span {
  color: var(--muted);
  font-size: 0.76rem;
}

.financial-status-chip {
  background: #fff8e6;
  border: 1px solid #efd99f;
  border-radius: 999px;
  color: #765000;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 900;
  justify-self: start;
  line-height: 1;
  padding: 5px 8px;
}

.financial-status-chip.confirmed {
  background: var(--success-soft);
  border-color: rgba(31, 138, 76, 0.28);
  color: var(--success);
}

.financial-status-chip.approved {
  background: var(--success-soft);
  border-color: rgba(31, 138, 76, 0.28);
  color: var(--success);
}

.financial-status-chip.paid {
  background: #eef6ff;
  border-color: rgba(35, 111, 180, 0.25);
  color: #236fb4;
}

.financial-status-chip.review {
  background: var(--danger-surface);
  border-color: rgba(180, 35, 24, 0.25);
  color: var(--danger);
}

.financial-status-chip.inreview {
  background: #fff8e6;
  border-color: #efd99f;
  color: #765000;
}

.financial-status-chip.awaitingapproval {
  background: #f1edff;
  border-color: rgba(100, 72, 190, 0.26);
  color: #5f43a9;
}

.financial-status-chip.draft {
  background: #f3f6f8;
  border-color: rgba(20, 32, 42, 0.12);
  color: #66737f;
}

@media (max-width: 760px) {
  .driver-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .driver-tab-button {
    min-width: 0;
    padding-inline: 6px;
    white-space: normal;
  }

  .driver-mobile-selection-toolbar {
    display: flex;
    justify-content: flex-end;
  }

  .driver-mobile-selection-toolbar .compact-button {
    min-height: 44px;
    width: 100%;
  }

  .driver-card-header-actions {
    align-items: flex-end;
    display: grid;
    justify-items: end;
  }

  .driver-batch-selection-bar {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--accent-border-strong);
    border-radius: 8px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 12px 34px rgba(29, 37, 44, 0.2);
    display: grid;
    gap: 10px;
    left: 50%;
    padding: 12px;
    position: fixed;
    transform: translateX(-50%);
    width: min(calc(100vw - 24px), 620px);
    z-index: 70;
  }

  .driver-batch-selection-summary {
    display: grid;
    gap: 3px;
  }

  .driver-batch-selection-summary span,
  .driver-batch-selection-summary small {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
  }

  .driver-batch-selection-summary strong {
    color: var(--accent-strong);
    font-size: 1.08rem;
  }

  .driver-batch-selection-summary small {
    color: var(--danger);
  }

  .driver-batch-selection-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .driver-batch-selection-actions .compact-button {
    min-height: 44px;
    min-width: 0;
    white-space: normal;
  }

  .driver-workspace.has-mobile-batch-bar {
    padding-bottom: 160px;
  }
}

.driver-action-hint {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.pickup-checklist-modal {
  max-width: 640px;
  width: min(100%, 640px);
}

.pickup-checklist-body {
  gap: 18px;
}

.checklist-route {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.pickup-checklist-options {
  display: grid;
  gap: 10px;
}

.pickup-checklist-option {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 10px 12px;
}

.signature-field {
  display: grid;
  gap: 8px;
}

.signature-pad {
  background: #ffffff;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  cursor: crosshair;
  height: 160px;
  touch-action: none;
  width: 100%;
}

.signature-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.signature-actions small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.company-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.03);
  overflow: hidden;
}

.company-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
  padding: 13px 15px;
  transition: background-color 0.16s ease;
}

.company-row:hover {
  background: var(--surface-soft);
}

.company-row + .company-row {
  border-top: 1px solid var(--line);
}

.company-row strong,
.company-row span {
  display: block;
}

.company-row span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 3px;
}

.row-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.organization-row-main {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.organization-logo-thumb {
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 0 0 auto;
  height: 44px;
  object-fit: contain;
  padding: 5px;
  width: 44px;
}

.organization-logo-thumb,
.company-logo-thumb {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.company-row-main {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.company-logo-thumb {
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 0 0 auto;
  height: 44px;
  object-fit: contain;
  padding: 5px;
  width: 44px;
}

.company-color-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.company-color-item {
  align-items: center;
  display: inline-flex !important;
  gap: 5px;
  margin-top: 0 !important;
}

.company-color-swatch {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block !important;
  height: 13px;
  margin-top: 0 !important;
  width: 13px;
}

.admin-crud-section .section-header {
  border-bottom: 1px solid rgba(203, 214, 207, 0.75);
  padding-bottom: 16px;
}

.admin-crud-section .section-header h2 {
  letter-spacing: 0;
}

.crud-panel {
  gap: 18px;
}

.admin-crud-section .filter-bar {
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px);
}

.admin-crud-section .company-filter-bar {
  grid-template-columns: minmax(170px, 0.75fr) minmax(260px, 1.25fr) minmax(160px, 220px);
}

.admin-crud-section .driver-filter-bar {
  grid-template-columns: minmax(260px, 1.35fr) minmax(170px, 0.8fr) minmax(160px, 0.75fr);
}

.admin-crud-section .pricing-filter-bar {
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px);
}

.admin-crud-section .admin-filter-bar {
  grid-template-columns: minmax(190px, 0.8fr) minmax(240px, 1fr) minmax(260px, 1.2fr);
}

.crud-list {
  background: #ffffff;
  box-shadow: var(--shadow-tight);
}

.crud-row {
  min-height: 84px;
  padding: 16px 18px;
}

.crud-row:hover {
  background: linear-gradient(90deg, #ffffff, var(--surface-soft));
}

.crud-row-main {
  min-width: 0;
}

.crud-row-copy {
  display: grid;
  gap: 3px;
}

.crud-row-copy strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.crud-row-copy span {
  line-height: 1.35;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.crud-meta-status {
  font-weight: 800;
}

.crud-meta-status.active {
  color: var(--success) !important;
}

.crud-meta-status.inactive {
  color: var(--muted) !important;
}

.status-chip.status-active,
.status-chip.status-available,
.status-chip.status-default {
  background: var(--success-soft);
  border-color: #b8dfc2;
  color: #216b34 !important;
}

.status-chip.status-count,
.status-chip.status-role {
  background: var(--info-soft);
  border-color: #bfdbfe;
  color: #1d4ed8 !important;
}

.status-chip.status-unavailable,
.status-chip.status-inactive {
  background: #f3f5f2 !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
}

.crud-row .row-actions {
  gap: 7px;
}

.crud-row .icon-action-button {
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.04);
}

.selected-action {
  border-color: var(--accent-border-strong);
  color: var(--accent-strong);
}

.pricing-row .status-chip {
  white-space: nowrap;
}

.readiness-summary-grid .summary-tile {
  min-height: 122px;
}

.readiness-summary-grid .metric-active {
  border-top: 4px solid var(--accent);
}

.readiness-summary-grid .metric-success {
  border-top: 4px solid var(--success);
}

.readiness-summary-grid .metric-warning {
  border-top: 4px solid var(--warn);
}

.readiness-summary-grid .metric-danger {
  border-top: 4px solid var(--danger);
}

.readiness-list {
  background: var(--surface);
}

.readiness-row {
  align-items: flex-start;
}

.readiness-row.status-blocked {
  border-left: 4px solid var(--danger);
}

.readiness-row.status-warning {
  border-left: 4px solid var(--warn);
}

.readiness-row.status-ready {
  border-left: 4px solid var(--success);
}

.readiness-row-main {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.readiness-area {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted) !important;
  flex: 0 0 auto;
  font-size: 0.74rem !important;
  font-weight: 800;
  letter-spacing: 0;
  margin-top: 1px !important;
  padding: 4px 8px;
  text-transform: uppercase;
}

.status-chip.status-ready {
  background: var(--success-soft);
  border-color: #b8dfc2;
  color: #216b34 !important;
}

.status-chip.status-warning {
  background: var(--warn-soft);
  border-color: #f3c46f;
  color: var(--warn) !important;
}

.status-chip.status-blocked {
  background: var(--danger-surface);
  border-color: #f2b8b5;
  color: var(--danger) !important;
}

.pricing-component-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-check-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.pricing-check-card > input {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.pricing-check-card > input:disabled {
  color: var(--muted);
  opacity: 0.72;
}

.pricing-tier-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.pricing-tier-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(80px, 0.7fr) minmax(80px, 0.7fr) minmax(120px, 1fr) 42px;
}

.pricing-remove-tier {
  aspect-ratio: 1;
  min-height: 42px;
  padding: 0;
  text-transform: uppercase;
}

.danger-action {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--danger);
}

.danger-action:hover:not(:disabled) {
  border-color: rgba(180, 35, 24, 0.45);
  box-shadow: 0 10px 20px rgba(180, 35, 24, 0.1);
}

.warning-action {
  border-color: rgba(217, 119, 6, 0.35);
  color: #92400e;
}

.warning-action:hover:not(:disabled) {
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.1);
}

.muted-chip {
  background: #f3f5f2 !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
}

.form-grid-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-with-action {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-with-action .inline-add-button {
  align-items: center;
  aspect-ratio: 1;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  display: inline-flex;
  font-size: 1.25rem;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  width: 44px;
}

.field-with-action .inline-add-button:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: 0 10px 22px rgba(var(--accent-rgb), 0.22);
}

.form-section-title-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 18px;
}

.form-section-title-row h3 {
  margin: 0;
}

.address-validation-chip {
  align-items: center;
  background: #f7f8f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  min-height: 26px;
  padding: 4px 10px;
  white-space: nowrap;
}

.address-validation-chip.is-valid {
  background: #eef8f1;
  border-color: #b8dfc2;
  color: #216b34;
}

.delivery-geocode-panel {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-inline: 2px;
  padding: 12px;
}

.delivery-geocode-panel strong,
.delivery-geocode-panel span {
  display: block;
}

.delivery-geocode-panel strong {
  font-size: 0.92rem;
}

.delivery-geocode-panel span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.delivery-geocode-panel.is-warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.delivery-geocode-panel.is-valid {
  background: #eef8f1;
  border-color: #b8dfc2;
}

.delivery-coordinate-picker {
  display: grid;
  gap: 8px;
}

.delivery-coordinate-picker > strong {
  font-size: 0.88rem;
}

.delivery-coordinate-map {
  aspect-ratio: 16 / 7;
  background: #eef1f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 180px;
  overflow: hidden;
  width: 100%;
}

.cep-field-stack {
  display: grid;
  gap: 6px;
}

.cep-field-stack .field-group {
  margin: 0;
}

.cep-feedback {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
  min-height: 30px;
  padding: 5px 10px;
  width: fit-content;
}

.cep-feedback.is-loading {
  background: var(--info-soft);
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.cep-feedback.is-success {
  background: var(--success-soft);
  border-color: #b8dfc2;
  color: #216b34;
}

.cep-feedback.is-warning {
  background: var(--warn-soft);
  border-color: #f5d18a;
  color: #8a5200;
}

.cep-feedback.is-error {
  background: var(--danger-surface);
  border-color: #f5b7af;
  color: var(--danger);
}

.form-divider {
  border-top: 1px solid rgba(203, 214, 207, 0.85);
  height: 1px;
  margin: 4px 0;
}

.modal-backdrop {
  align-items: center;
  background: rgba(20, 29, 34, 0.48);
  backdrop-filter: blur(8px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.nested-modal-backdrop {
  z-index: 30;
}

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(20, 29, 34, 0.26);
  display: flex;
  flex-direction: column;
  max-height: min(calc(100vh - 48px), 820px);
  max-height: min(calc(100dvh - 48px), 820px);
  max-width: 560px;
  overflow: hidden;
  width: min(100%, 560px);
}

.large-modal-panel {
  max-width: 840px;
  width: min(100%, 840px);
}

.delivery-modal-panel {
  max-width: 940px;
  width: min(100%, 940px);
}

.quick-modal-panel {
  max-width: 780px;
  width: min(100%, 780px);
}

.driver-statement-modal {
  max-width: 920px;
  width: min(100%, 920px);
}

.modal-header {
  align-items: start;
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 24px 18px;
}

.modal-header h3 {
  font-size: 1.24rem;
  line-height: 1.2;
  margin: 0;
}

.modal-close-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  text-transform: uppercase;
  width: 34px;
}

.modal-close-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-tight);
}

.modal-close-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.statement-filter-form {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(150px, auto) auto;
  padding: 16px 24px;
}

.statement-open-filter {
  margin-bottom: 9px;
}

.driver-statement-body {
  gap: 16px;
}

.statement-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.statement-summary-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.statement-summary-card strong {
  font-size: 1.08rem;
}

.statement-delivery-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.statement-batch-list {
  display: grid;
  gap: 14px;
}

.statement-batch {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.statement-batch-header {
  align-items: start;
  background: #ffffff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.statement-batch-title,
.statement-batch-total {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.statement-batch-title small,
.statement-batch-total span {
  color: var(--muted);
  font-size: 0.78rem;
}

.statement-batch-total {
  justify-items: end;
  text-align: right;
}

.statement-batch-total strong {
  color: var(--accent-strong);
  font-size: 1.08rem;
}

.statement-batch .statement-delivery-list {
  border: 0;
  border-radius: 0;
}

.statement-delivery-row {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  padding: 14px 16px;
}

.statement-delivery-row + .statement-delivery-row {
  border-top: 1px solid var(--line);
}

.statement-delivery-main,
.statement-delivery-values {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.statement-delivery-main strong,
.statement-delivery-values strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.statement-delivery-main span,
.statement-delivery-values span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.statement-delivery-values {
  justify-items: end;
  text-align: right;
}

.modal-body {
  display: grid;
  flex: 1 1 auto;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px;
  scrollbar-gutter: stable;
}

.modal-form-body h3 {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 1.02rem;
  gap: 9px;
  margin: 4px 0 0;
}

.modal-form-body h3::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 18px;
  width: 4px;
}

.modal-form-body {
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.025), transparent 170px),
    #ffffff;
}

.modal-summary-strip {
  align-items: center;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px 24px;
}

.modal-summary-strip span {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.delivery-step-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.delivery-step-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 34px;
  padding: 4px 12px;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.delivery-step-button span {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.delivery-step-button strong {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.delivery-step-button:hover,
.delivery-step-button:focus-visible {
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-tight);
  color: var(--accent-strong);
  outline: none;
}

.delivery-step-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.delivery-step-button.active span {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  color: var(--accent-contrast);
}

.delivery-step-button.completed {
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.delivery-step-button.completed span {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.first-form-section {
  border-top: 0;
  padding-top: 0;
}

.delivery-modal-body {
  gap: 17px;
}

.delivery-modal-body > .form-grid-2,
.delivery-modal-body > .field-group,
.delivery-modal-body > .field-with-action,
.delivery-modal-body > .form-section-title-row,
.delivery-modal-body > h3 {
  margin-inline: 2px;
}

.modal-body .field-group {
  min-width: 0;
}

.modal-body .field-group > span,
.modal-body .field-group > label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.modal-body .field-group input,
.modal-body .field-group select,
.modal-body .field-group textarea {
  background: #ffffff;
  min-height: 44px;
}

.modal-body .field-group input:read-only,
.modal-body .field-group textarea:read-only {
  background: #f4f7f4;
  color: var(--muted);
}

.modal-body .field-group input[aria-busy="true"] {
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 0 3px var(--accent-focus);
}

.delivery-review-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-review-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(30, 41, 36, 0.04);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.delivery-review-card h3 {
  margin: 0;
}

.delivery-review-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.delivery-review-field {
  display: grid;
  gap: 3px;
}

.delivery-review-field dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.delivery-review-field dd {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.delivery-step-actions {
  gap: 10px;
}

.pac-container {
  z-index: 10000;
}

.history-list {
  display: grid;
  gap: 14px;
}

.batch-modal-body {
  gap: 18px;
}

.batch-preview-total {
  align-items: center;
  background: var(--accent-surface);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 14px;
}

.batch-preview-total span {
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 850;
}

.batch-preview-total strong {
  color: var(--ink);
  font-size: 1.12rem;
}

.batch-delivery-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.batch-delivery-row {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 14px;
  grid-template-columns: 36px minmax(0, 1fr) minmax(96px, 120px) minmax(220px, auto);
  min-height: 74px;
  padding: 12px 14px;
}

.batch-delivery-row + .batch-delivery-row {
  border-top: 1px solid var(--line);
}

.batch-delivery-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.batch-delivery-main strong {
  font-size: 0.96rem;
}

.batch-delivery-main span {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.batch-order-actions {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.batch-order-button {
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  height: 28px;
  min-height: 28px;
  padding: 0;
  width: 30px;
}

.batch-distance-field {
  gap: 4px;
}

.batch-distance-field input {
  min-height: 38px;
}

.batch-value-breakdown {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.batch-value-breakdown span,
.batch-value-breakdown strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
  min-height: 28px;
  padding: 5px 9px;
  white-space: nowrap;
}

.batch-value-breakdown span {
  background: var(--surface-soft);
  color: var(--muted);
}

.batch-value-breakdown strong {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.history-item {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
}

.history-item strong,
.history-item span,
.history-item small {
  display: block;
}

.history-item span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 3px;
}

.history-item small {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 6px;
}

.modal-actions {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
  border-top: 1px solid var(--line);
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
}

.modal-actions .secondary-button {
  min-width: 118px;
  order: 1;
}

.modal-actions .primary-button {
  box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.12);
  min-width: 168px;
  order: 2;
}

.modal-actions .primary-button:disabled {
  box-shadow: none;
}

.modal-actions .danger-action {
  border-color: var(--danger);
  color: var(--danger);
}

.customer-row {
  min-height: 74px;
}

.checkbox-field {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 0.94rem;
  font-weight: 700;
  gap: 10px;
}

.checkbox-field input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

@media (max-width: 900px) {
  .auth-shell {
    background:
      linear-gradient(160deg, #e8f4f1, #ffffff 68%),
      #fbfcfa;
  }

  .auth-green-background {
    opacity: 0.76;
  }

  .auth-side-curve {
    transform: translateX(-12%);
    width: 126%;
  }

  .auth-side-curve-shadow {
    opacity: 0.36;
    transform: translate(22px, 6px);
  }

  .auth-mascot {
    display: none;
  }

  .auth-dots,
  .auth-waves {
    display: none;
  }

  .auth-panel {
    max-width: 520px;
    padding: 42px 32px 36px;
  }
}

@media (max-height: 760px) and (min-width: 701px) {
  .auth-shell {
    padding-block: 14px;
  }

  .auth-panel {
    border-radius: 18px;
    max-width: 510px;
    padding: 26px 48px 24px;
  }

  .login-brand {
    gap: 7px;
    margin-bottom: 20px;
  }

  .login-logo {
    margin-bottom: 4px;
    height: 58px;
    max-width: 66px;
  }

  .login-heading {
    gap: 6px;
  }

  .login-product-name {
    gap: 1px;
  }

  .login-product-main {
    font-size: 1.08rem;
  }

  .login-product-sub {
    font-size: 0.76rem;
  }

  .login-subtitle {
    font-size: 0.95rem;
  }

  .login-form {
    gap: 11px;
  }

  .auth-panel .field-group input,
  .login-form .primary-button {
    min-height: 48px;
  }

  .login-divider {
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    align-items: stretch;
    padding: 16px;
  }

  .auth-green-background {
    opacity: 0.52;
  }

  .auth-side-curve {
    height: 64%;
    transform: translateX(-30%);
    width: 162%;
  }

  .auth-panel {
    align-self: center;
    border-radius: 18px;
    padding: 32px 22px;
  }

  .login-brand {
    margin-bottom: 32px;
  }

  .login-logo {
    height: 70px;
    margin-bottom: 10px;
    max-width: 80px;
  }

  .login-product-name {
    gap: 1px;
  }

  .login-product-main {
    font-size: 1.12rem;
  }

  .login-product-sub {
    font-size: 0.78rem;
  }

  .auth-panel .field-group input {
    min-height: 55px;
  }

  .button-arrow {
    right: 16px;
  }

  .button-spinner {
    right: 16px;
  }

  .action-row {
    display: grid;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .side-navigation {
    max-height: none;
    min-height: auto;
    padding: 16px;
    position: static;
  }

  .side-navigation.collapsed {
    align-content: start;
    gap: 16px;
    justify-items: stretch;
    padding: 16px;
  }

  .side-navigation.collapsed .side-navigation-brand {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: stretch;
  }

  .side-navigation.collapsed .side-navigation-brand > div {
    display: block;
  }

  .side-navigation.collapsed .side-navigation-controls {
    display: grid;
  }

  .side-navigation.collapsed .side-nav-button {
    grid-template-columns: 22px minmax(0, 1fr);
    justify-items: stretch;
    padding: 0 12px;
    width: auto;
  }

  .side-navigation.collapsed .side-nav-button span,
  .side-navigation.collapsed .side-action-button span {
    height: auto;
    overflow: hidden;
    position: static;
    white-space: nowrap;
    width: auto;
  }

  .side-navigation.collapsed .side-action-button {
    grid-template-columns: 20px minmax(0, auto);
    padding: 0 14px;
    width: auto;
  }

  .side-nav {
    gap: 12px;
  }

  .side-nav-group {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    padding: 12px 16px 8px;
  }

  .topbar-main {
    align-items: stretch;
    display: grid;
    gap: 12px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-nav {
    margin-inline: -2px;
    padding-bottom: 6px;
  }

  .nav-button {
    min-height: 42px;
  }

  .company-switcher {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .company-switcher select {
    max-width: min(220px, 58vw);
  }

  .workspace {
    padding: 22px 16px 36px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
    position: static;
  }

  .admin-nav {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 22px 16px 32px;
  }

  .section-header,
  .delivery-row,
  .batch-delivery-row,
  .batch-preview-total,
  .assignment-actions {
    align-items: stretch;
    display: grid;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .map-summary-grid,
  .operations-map-layout {
    grid-template-columns: 1fr;
  }

  .operations-map-canvas-shell,
  .operations-map-list {
    max-height: none;
    min-height: 360px;
  }

  .management-grid {
    grid-template-columns: 1fr;
  }

  .company-row {
    align-items: stretch;
    display: grid;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .delivery-geocode-panel {
    grid-template-columns: 1fr;
  }

  .field-with-action {
    grid-template-columns: 1fr;
  }

  .modal-form-body .field-with-action {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .admin-crud-section .filter-bar,
  .admin-crud-section .company-filter-bar,
  .admin-crud-section .driver-filter-bar,
  .admin-crud-section .pricing-filter-bar,
  .admin-crud-section .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-summary-grid,
  .detail-grid,
  .detail-action-panel,
  .evidence-item,
  .batch-delivery-row,
  .statement-filter-form,
  .statement-summary-grid,
  .statement-delivery-row,
  .pricing-component-grid,
  .pricing-tier-row,
  .driver-summary,
  .driver-route {
    grid-template-columns: 1fr;
  }

  .statement-delivery-values {
    justify-items: start;
    text-align: left;
  }

  .driver-availability-panel,
  .driver-availability-actions {
    align-items: stretch;
    display: grid;
  }

  .detail-header-actions {
    justify-content: flex-start;
  }

  .queue-title-actions,
  .batch-value-breakdown {
    justify-content: flex-start;
  }

  .driver-card-header,
  .driver-card-actions {
    align-items: stretch;
    display: grid;
  }

  .driver-card-actions .compact-button {
    min-height: 46px;
  }

  .row-actions {
    justify-content: stretch;
  }

  .row-actions > * {
    flex: 1 1 auto;
  }

  .row-actions > .icon-action-button {
    flex: 0 0 40px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    width: 100%;
  }

  .modal-header,
  .modal-body,
  .modal-actions,
  .modal-summary-strip {
    padding-left: 18px;
    padding-right: 18px;
  }

  .modal-summary-strip {
    display: flex;
    overflow-x: auto;
  }

  .modal-summary-strip span {
    flex: 0 0 auto;
    min-width: 112px;
  }

  .delivery-step-button {
    flex: 0 0 auto;
    min-width: 118px;
  }

  .delivery-review-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr;
  }

  .modal-actions .primary-button,
  .modal-actions .secondary-button {
    min-width: 0;
    width: 100%;
  }

  .toast-viewport {
    left: 12px;
    max-width: none;
    right: 12px;
    top: 12px;
    transform: none;
    width: auto;
  }
}

/* Voler portal theme final overrides */
:root {
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --page: #f7faff;
  --ink: #25396f;
  --muted: #7c8db5;
  --line: #e8edf7;
  --line-strong: #d8e1f1;
  --accent: #5a8dee;
  --accent-rgb: 90, 141, 238;
  --accent-strong: #3f75df;
  --accent-contrast: #ffffff;
  --accent-soft: #e8f3ff;
  --accent-surface: rgba(90, 141, 238, 0.1);
  --accent-border: rgba(90, 141, 238, 0.18);
  --accent-border-strong: rgba(90, 141, 238, 0.45);
  --company-secondary: #41b1f9;
  --company-secondary-rgb: 65, 177, 249;
  --success: #39da8a;
  --success-soft: #d2ffe8;
  --info: #00cfdd;
  --info-soft: #ccf5f8;
  --warn: #fdac41;
  --warn-soft: #ffeed9;
  --danger: #ff5b5c;
  --danger-surface: #ffdede;
  --shadow: -8px 12px 18px rgba(25, 42, 70, 0.13);
  --shadow-soft: -6px 10px 16px rgba(25, 42, 70, 0.1);
  --shadow-tight: 0 6px 14px rgba(25, 42, 70, 0.08);
}

body,
button,
input,
select,
textarea {
  font-family: "Voler Raleway", Raleway, "Segoe UI", Arial, sans-serif;
}

body {
  background: #f7faff;
  color: #25396f;
}

.app-shell {
  background:
    radial-gradient(circle at 100% 0%, rgba(65, 177, 249, 0.18), transparent 32%),
    #f7faff;
  grid-template-columns: 260px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.side-navigation,
.admin-sidebar {
  background: #ffffff;
  border-right: 1px solid #eef3fb;
  box-shadow: 0 0 10px #ececec;
  gap: 18px;
  padding: 28px 0 18px;
}

.side-navigation-brand,
.side-navigation-controls,
.side-nav,
.side-navigation-footer,
.admin-sidebar-brand,
.admin-nav {
  padding-left: 18px;
  padding-right: 18px;
}

.side-navigation-brand {
  padding-bottom: 18px;
}

.brand-mark {
  background: transparent;
  border-radius: 0;
  color: #41b1f9;
  font-size: 1.5rem;
  height: 42px;
  width: 42px;
}

.brand-logo {
  border-color: #eef3fb;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(25, 42, 70, 0.06);
}

.side-navigation-brand .eyebrow,
.workspace-breadcrumb,
.admin-company-switcher span {
  color: #7c8db5;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
}

.side-navigation h1,
.admin-sidebar h1 {
  color: #25396f;
  font-size: 1.26rem;
  font-weight: 700;
}

.sidebar-toggle-button,
.workspace-menu-button,
.workspace-icon-chip,
.mobile-sidebar-signout-button {
  background: #ffffff;
  border: 1px solid #eef3fb;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(25, 42, 70, 0.06);
  color: #7c8db5;
}

.sidebar-toggle-button:hover,
.workspace-menu-button:hover,
.workspace-icon-chip:hover,
.mobile-sidebar-signout-button:hover,
.mobile-sidebar-signout-button:focus-visible {
  background: #e8f3ff;
  border-color: #d7e7ff;
  color: #5a8dee;
}

.side-navigation .company-switcher,
.admin-company-switcher select {
  background: #f7faff;
  border: 1px solid #eef3fb;
  border-radius: 8px;
}

.side-nav-heading {
  color: #a3afbd;
  font-size: 0.68rem;
  padding: 0 10px;
}

.side-nav-heading:hover,
.side-nav-heading.active {
  background: transparent;
  border-color: transparent;
  color: #5a8dee;
}

.side-nav-heading small {
  background: #f7faff;
  border-color: #eef3fb;
  color: #7c8db5;
}

.side-nav-items {
  gap: 4px;
  padding-left: 0;
}

.side-nav-button,
.admin-nav-button {
  border-radius: 0;
  color: #053382;
  font-size: 0.86rem;
  font-weight: 500;
  min-height: 44px;
  opacity: 0.82;
  padding: 0 16px;
  position: relative;
}

.side-nav-button::before,
.admin-nav-button::before {
  background: rgba(46, 170, 244, 0.55);
  content: "";
  inset: 0 auto 0 -18px;
  opacity: 0;
  position: absolute;
  width: 5px;
}

.side-nav-button:hover,
.side-nav-button.active,
.admin-nav-button:hover,
.admin-nav-button.active {
  background: #e8f3ff;
  border-color: transparent;
  color: #25396f;
  opacity: 1;
  transform: none;
}

.side-nav-button.active::before,
.admin-nav-button.active::before {
  opacity: 1;
}

.side-navigation.collapsed {
  padding-left: 12px;
  padding-right: 12px;
}

.side-navigation.collapsed .side-navigation-brand,
.side-navigation.collapsed .side-nav,
.side-navigation.collapsed .side-navigation-footer {
  padding-left: 0;
  padding-right: 0;
}

.workspace {
  display: grid;
  gap: 24px;
  padding: 0;
}

.workspace-navbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #eef3fb;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px clamp(22px, 2.4vw, 34px);
}

.workspace-navbar-left,
.workspace-navbar-actions,
.workspace-user-chip {
  align-items: center;
  display: flex;
  gap: 12px;
}

.workspace-company-chip {
  align-items: center;
  background: #f7faff;
  border: 1px solid #eef3fb;
  border-radius: 999px;
  color: #475f7b;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 8px;
  min-height: 34px;
  max-width: min(360px, 42vw);
  padding: 0 13px;
}

.workspace-company-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-company-dot {
  background: #5a8dee;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(90, 141, 238, 0.12);
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.workspace-navbar-left strong {
  color: #25396f;
  display: block;
  font-size: 1.2rem;
}

.workspace-menu-button,
.workspace-icon-chip {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.workspace-user-chip {
  color: #475f7b;
  font-size: 0.88rem;
  font-weight: 600;
}

.workspace-signout-button {
  border-color: #eef3fb;
  color: #5a6f8c;
  gap: 8px;
  min-height: 38px;
  white-space: nowrap;
}

.workspace-signout-button:hover,
.workspace-signout-button:focus-visible {
  background: #fff4f4;
  border-color: #ffd9d9;
  color: #b42318;
}

.workspace-avatar {
  align-items: center;
  background: linear-gradient(180deg, #25a6f1, #54b9ff);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.workspace > .content-section,
.workspace > .driver-workspace,
.workspace > .admin-shell,
.workspace > .embedded-admin-shell {
  margin: 0 clamp(22px, 2.4vw, 34px) 44px;
}

.section-header,
.admin-crud-section .section-header {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-header h2 {
  color: #25396f;
  font-size: 1.45rem;
  font-weight: 700;
}

.eyebrow {
  color: #7c8db5;
}

.summary-tile,
.management-panel,
.embedded-admin-shell,
.auth-panel,
.modal-panel,
.company-list,
.delivery-row,
.driver-delivery-card,
.delivery-review-card,
.pricing-tier-panel,
.delivery-geocode-panel {
  background: #ffffff;
  border: 0;
  box-shadow: -8px 12px 18px rgba(25, 42, 70, 0.13);
}

.summary-tile,
.management-panel,
.embedded-admin-shell,
.modal-panel,
.company-list {
  border-radius: 5px;
}

.summary-tile {
  min-height: 132px;
}

.summary-tile span,
.management-panel h3,
.panel-title-row h3 {
  color: #25396f;
}

.summary-tile strong {
  color: #25396f;
}

.dashboard-metric,
.summary-tile:hover:not(.passive) {
  border-top: 0;
  box-shadow: -8px 12px 18px rgba(25, 42, 70, 0.13);
}

.dashboard-metric.metric-active,
.dashboard-metric.metric-success,
.dashboard-metric.metric-warning,
.dashboard-metric.metric-danger,
.dashboard-metric.metric-done {
  border-top: 0;
}

.filter-bar,
.admin-crud-section .filter-bar {
  background: #f7faff;
  border: 1px solid #eef3fb;
  border-radius: 5px;
}

.field-group span,
.checkbox-field span {
  color: rgba(35, 28, 99, 0.7);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.field-group input,
.field-group select,
.field-group textarea,
.company-switcher select {
  background: #ffffff;
  border: 1px solid #dfe3e7;
  border-radius: 4px;
  color: #555252;
  min-height: 42px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus,
.company-switcher select:focus {
  border-color: #5a8dee;
  box-shadow: 0 3px 8px rgba(25, 42, 70, 0.1);
  outline: 0;
}

.primary-button {
  background: #5a8dee;
  border-color: #5a8dee;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(90, 141, 238, 0.35);
  color: #ffffff;
}

.primary-button:hover:not(:disabled) {
  background: #497fdd;
  border-color: #497fdd;
  box-shadow: 0 4px 14px rgba(90, 141, 238, 0.42);
}

.secondary-button {
  background: #ffffff;
  border-color: #dfe3e7;
  border-radius: 4px;
  color: #475f7b;
}

.secondary-button:hover:not(:disabled) {
  background: #f7faff;
  border-color: #bfd3fb;
  color: #5a8dee;
}

.company-row {
  background: #ffffff;
}

.company-row:hover,
.delivery-row:hover {
  background: #f7faff;
}

.company-row + .company-row,
.delivery-row + .delivery-row {
  border-top-color: #eef3fb;
}

.status-chip {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.status-chip.status-active,
.status-chip.status-available,
.status-chip.status-completed,
.status-chip.status-checked-out,
.status-chip.status-default {
  background: #d2ffe8;
  color: #14874e;
}

.status-chip.status-awaiting-acceptance,
.status-chip.status-count,
.status-chip.status-role {
  background: #e2ecff;
  color: #3f75df;
}

.status-chip.status-driver-assigned,
.status-chip.status-heading-to-pickup,
.status-chip.status-arrived-at-pickup,
.status-chip.status-picked-up,
.status-chip.status-heading-to-destination,
.status-chip.status-arrived-at-destination {
  background: #ccf5f8;
  color: #008d99;
}

.status-chip.status-failed,
.status-chip.status-unavailable,
.status-chip.status-inactive {
  background: #ffdede;
  color: #d33f45;
}

.modal-backdrop {
  background: rgba(37, 57, 111, 0.28);
}

.modal-header {
  background: #ffffff;
  border-bottom-color: #eef3fb;
}

.modal-close-button {
  border-radius: 50%;
}

.auth-shell {
  background: linear-gradient(112deg, rgba(37, 166, 241, 0.08), #f7faff 58%, #ffffff 100%);
}

.auth-panel {
  border-radius: 5px;
}

.login-form .primary-button::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

@media (max-width: 900px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .side-navigation {
    box-shadow: 0 12px 24px rgba(25, 42, 70, 0.12);
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .side-navigation-brand {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .mobile-sidebar-signout-button {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
  }

  .workspace-navbar {
    min-height: 64px;
  }

  .workspace-signout-button {
    display: none;
  }
}

@media (max-width: 640px) {
  .workspace-navbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .workspace-navbar-actions {
    justify-content: space-between;
    width: 100%;
  }

  .workspace > .content-section,
  .workspace > .driver-workspace,
  .workspace > .admin-shell,
  .workspace > .embedded-admin-shell {
    margin: 0 16px 28px;
  }
}

/* Keep the login screen in the original visual language. */
.auth-shell {
  --surface: #ffffff;
  --surface-soft: #f9fbf8;
  --page: #f5f7f2;
  --ink: #1d252c;
  --muted: #66727d;
  --line: #dce3dc;
  --line-strong: #cbd6cf;
  --accent: #147a6f;
  --accent-rgb: 20, 122, 111;
  --accent-strong: #0b5f57;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(var(--accent-rgb), 0.1);
  --accent-surface: rgba(var(--accent-rgb), 0.09);
  --accent-border: rgba(var(--accent-rgb), 0.18);
  --accent-border-strong: rgba(var(--accent-rgb), 0.45);
  --accent-focus: rgba(var(--accent-rgb), 0.15);
  --accent-shadow: rgba(var(--accent-rgb), 0.16);
  --company-secondary: #f4b942;
  --company-secondary-rgb: 244, 185, 66;
  --company-secondary-soft: rgba(var(--company-secondary-rgb), 0.12);
  --success: #1f8a4c;
  --success-soft: #edf8f1;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --warn: #b66a00;
  --warn-soft: #fff7e6;
  --danger: #b42318;
  --danger-surface: #fff3f1;
  --shadow: 0 18px 45px rgba(30, 41, 36, 0.1);
  --shadow-soft: 0 10px 28px rgba(30, 41, 36, 0.08);
  --shadow-tight: 0 8px 18px rgba(30, 41, 36, 0.07);
  background:
    radial-gradient(circle at 86% 88%, rgba(var(--company-secondary-rgb), 0.18), transparent 34%),
    linear-gradient(112deg, #edf6f2 0%, #f9fbf7 58%, #fffdf8 100%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.auth-shell button,
.auth-shell input,
.auth-shell select,
.auth-shell textarea {
  font-family: inherit;
}

.auth-shell .auth-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 22px;
  box-shadow:
    0 42px 92px rgba(16, 42, 46, 0.24),
    0 18px 36px rgba(16, 42, 46, 0.16);
  max-width: 540px;
  padding: clamp(34px, 4.8vh, 44px) clamp(42px, 5vw, 58px) clamp(28px, 4vh, 36px);
}

.auth-shell .brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--company-secondary));
  border-radius: 8px;
  color: var(--accent-contrast);
  font-size: 0.86rem;
  height: 48px;
  width: 48px;
}

.auth-shell .brand-logo {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.auth-shell .eyebrow {
  color: var(--accent);
}

.auth-shell .field-group span,
.auth-shell .checkbox-field span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.auth-shell .field-group input,
.auth-shell .field-group select,
.auth-shell .field-group textarea,
.auth-shell .company-switcher select {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  min-height: 46px;
  padding: 0 13px;
}

.auth-shell .auth-panel .field-group input {
  background: #fbfdfc;
  border-radius: 9px;
  min-height: 52px;
}

.auth-shell .input-shell input {
  padding-left: 56px;
}

.auth-shell .password-field input {
  padding-left: 56px;
  padding-right: 52px;
}

.auth-shell .input-icon {
  color: var(--accent-strong);
  left: 18px;
}

.auth-shell .password-toggle-button {
  color: var(--accent-strong);
  right: 8px;
}

.auth-shell .field-group input:focus,
.auth-shell .field-group select:focus,
.auth-shell .field-group textarea:focus,
.auth-shell .company-switcher select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-focus);
}

.auth-shell .primary-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  box-shadow: none;
  color: var(--accent-contrast);
}

.auth-shell .login-form .primary-button {
  background: linear-gradient(90deg, var(--accent-strong), #00977f);
  border-color: transparent;
  border-radius: 9px;
  box-shadow: 0 12px 22px rgba(var(--accent-rgb), 0.15);
}

.auth-shell .login-form .primary-button::before {
  background: rgba(255, 255, 255, 0.12);
}

.auth-shell .login-form .primary-button:hover:not(:disabled),
.auth-shell .login-form .primary-button:focus-visible:not(:disabled) {
  background: linear-gradient(90deg, var(--accent-strong), #00977f);
  box-shadow: 0 14px 28px rgba(var(--accent-rgb), 0.24);
}

@media (max-width: 900px) {
  .auth-shell .auth-panel {
    max-width: 520px;
    padding: 42px 32px 36px;
  }
}

@media (max-height: 760px) and (min-width: 701px) {
  .auth-shell .auth-panel {
    max-width: 510px;
    padding: 26px 48px 24px;
  }
}

@media (max-width: 520px) {
  .auth-shell .auth-panel {
    padding: 32px 22px;
    width: 100%;
  }
}

/* Let the navigation list scroll without mixing session actions into it. */
.side-navigation {
  align-content: stretch;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.side-navigation .side-nav {
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 8px;
}

@media (max-width: 900px) {
  .side-navigation {
    max-height: none;
    min-height: auto;
    overflow: visible;
  }

  .side-navigation .side-nav {
    overflow: visible;
  }
}

/* Voler fine tuning for lists, actions and scroll containers. */
.workspace *,
.modal-panel *,
.side-navigation * {
  scrollbar-color: #c8d8f5 transparent;
  scrollbar-width: thin;
}

.workspace *::-webkit-scrollbar,
.modal-panel *::-webkit-scrollbar,
.side-navigation *::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.workspace *::-webkit-scrollbar-track,
.modal-panel *::-webkit-scrollbar-track,
.side-navigation *::-webkit-scrollbar-track {
  background: transparent;
}

.workspace *::-webkit-scrollbar-thumb,
.modal-panel *::-webkit-scrollbar-thumb,
.side-navigation *::-webkit-scrollbar-thumb {
  background: #c8d8f5;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.workspace *::-webkit-scrollbar-thumb:hover,
.modal-panel *::-webkit-scrollbar-thumb:hover,
.side-navigation *::-webkit-scrollbar-thumb:hover {
  background: #9ebcf2;
  background-clip: padding-box;
}

.workspace-navbar {
  box-shadow: 0 1px 0 rgba(90, 141, 238, 0.06);
  position: sticky;
  top: 0;
  z-index: 12;
}

.workspace-navbar-left {
  min-width: 0;
}

.workspace-navbar-left > div {
  min-width: 0;
}

.workspace-navbar-left strong,
.workspace-breadcrumb {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-navigation {
  box-shadow: 0 0 10px #ececec;
}

.side-navigation .side-nav {
  padding-right: 10px;
}

.side-nav-group {
  gap: 3px;
}

.side-nav-heading {
  border-radius: 0;
  min-height: 34px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.side-nav-heading-caret {
  color: #a3afbd;
}

.side-nav-button,
.admin-nav-button {
  min-width: 0;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.side-nav-button .nav-icon,
.admin-nav-button .nav-icon {
  color: #5a8dee;
}

.side-nav-button.active .nav-icon,
.admin-nav-button.active .nav-icon {
  color: #25396f;
}

.workspace > .content-section,
.workspace > .driver-workspace,
.workspace > .admin-shell,
.workspace > .embedded-admin-shell {
  min-width: 0;
}

.management-panel,
.embedded-admin-shell,
.company-list,
.delivery-list,
.statement-delivery-list,
.batch-delivery-list {
  border: 0;
  border-radius: 5px;
  box-shadow: -8px 12px 18px rgba(25, 42, 70, 0.13);
}

.company-list,
.delivery-list,
.statement-delivery-list,
.batch-delivery-list {
  background: #ffffff;
  overflow-x: auto;
}

.company-row,
.delivery-row,
.statement-delivery-row,
.batch-delivery-row {
  background: #ffffff;
  border-color: #eef3fb;
}

.company-row:hover,
.delivery-row:hover,
.statement-delivery-row:hover,
.batch-delivery-row:hover {
  background: #f7faff;
}

.crud-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 1fr) auto;
  min-width: 720px;
  padding: 16px 18px;
}

.crud-row-main,
.company-row-main,
.organization-row-main {
  min-width: 0;
}

.crud-row-copy {
  min-width: 0;
}

.crud-row-copy strong,
.delivery-title-row strong,
.statement-delivery-main strong,
.batch-delivery-main strong {
  color: #25396f;
  font-weight: 700;
}

.crud-row-copy span,
.delivery-row span,
.statement-delivery-main span,
.statement-delivery-values span,
.batch-delivery-main span {
  color: #7c8db5;
  line-height: 1.4;
}

.row-actions,
.delivery-status-actions,
.assignment-actions,
.driver-card-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.row-actions {
  flex-wrap: nowrap;
}

.icon-action-button {
  align-items: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(25, 42, 70, 0.06);
  display: inline-flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
  width: 38px;
}

.icon-action-button:hover:not(:disabled),
.icon-action-button:focus-visible {
  box-shadow: 0 4px 12px rgba(90, 141, 238, 0.18);
  transform: translateY(-1px);
}

.icon-action-symbol {
  height: 17px;
  width: 17px;
}

.delivery-row {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, auto) minmax(320px, 1fr) auto;
  min-width: 780px;
  padding: 16px 18px;
}

.delivery-row-main {
  min-width: 0;
}

.delivery-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delivery-destination,
.delivery-meta-line,
.queue-alert-detail {
  overflow-wrap: anywhere;
}

.batch-select-cell {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  margin: 0;
  min-width: 28px;
}

.batch-select-cell input,
.checkbox-field input {
  accent-color: #5a8dee;
}

.statement-delivery-row {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 220px);
  min-width: 560px;
}

.batch-delivery-row {
  grid-template-columns: 36px minmax(240px, 1fr) minmax(100px, 130px) minmax(220px, auto);
  min-width: 760px;
}

.filter-bar,
.admin-crud-section .filter-bar,
.admin-crud-section .company-filter-bar,
.admin-crud-section .driver-filter-bar,
.admin-crud-section .pricing-filter-bar,
.admin-crud-section .admin-filter-bar {
  align-items: end;
  background: #ffffff;
  border: 0;
  border-radius: 5px;
  box-shadow: -6px 10px 16px rgba(25, 42, 70, 0.1);
  gap: 14px;
  overflow-x: auto;
  padding: 16px;
}

.filter-field,
.compact-filter {
  min-width: 180px;
}

.field-group input,
.field-group select,
.field-group textarea {
  box-shadow: none;
}

.field-group input:hover,
.field-group select:hover,
.field-group textarea:hover {
  border-color: #cbd8f3;
}

.status-chip,
.crud-meta-status {
  min-height: 28px;
  padding: 6px 10px;
}

.driver-delivery-card,
.delivery-review-card,
.pricing-tier-panel,
.delivery-geocode-panel {
  border-radius: 5px;
}

@media (max-width: 900px) {
  .workspace-navbar {
    position: sticky;
  }

  .workspace-navbar-actions {
    flex-wrap: wrap;
  }

  .crud-row,
  .delivery-row,
  .statement-delivery-row,
  .batch-delivery-row {
    min-width: 0;
  }

  .crud-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-row {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  }

  .delivery-row .delivery-status-actions,
  .delivery-row .assignment-actions,
  .delivery-row .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .statement-delivery-row,
  .batch-delivery-row {
    grid-template-columns: 1fr;
  }

  .statement-delivery-values {
    justify-items: start;
    text-align: left;
  }

  .row-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .workspace-navbar-left strong {
    font-size: 1.05rem;
  }

  .admin-main-header {
    align-items: stretch;
    flex-direction: column;
    top: 8px;
  }

  .admin-signout {
    justify-self: stretch;
    width: 100%;
  }

  .workspace-company-chip {
    max-width: 100%;
  }

  .workspace-user-chip > span:last-child,
  .workspace-icon-chip {
    display: none;
  }

  .filter-field,
  .compact-filter {
    min-width: 100%;
  }

  .company-list,
  .delivery-list,
  .statement-delivery-list,
  .batch-delivery-list {
    border-radius: 5px;
  }
}

/* Responsive polish pass requested after visual review. */
html,
body {
  scrollbar-color: #b9caf0 #f7faff;
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  height: 9px;
  width: 9px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #f7faff;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #b9caf0;
  border: 2px solid #f7faff;
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #91aee8;
}

.section-header {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.section-header > div:first-child {
  min-width: 0;
}

.section-header h2,
.section-header p {
  overflow-wrap: anywhere;
}

.section-header > .primary-button,
.section-header > .secondary-button,
.section-header .dashboard-actions {
  justify-self: end;
  max-width: 100%;
}

.section-header > .primary-button.compact-button {
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.section-header > .primary-button.compact-button::before {
  align-items: center;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  content: "+";
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.sidebar-toggle-button {
  background: #ffffff;
  border: 1px solid #e5ecfb;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(90, 141, 238, 0.14);
  color: #5a8dee;
  height: 38px;
  width: 38px;
}

.sidebar-toggle-button .nav-icon {
  height: 18px;
  stroke-width: 2.3;
  width: 18px;
}

.sidebar-toggle-button:hover,
.sidebar-toggle-button:focus-visible {
  background: #5a8dee;
  border-color: #5a8dee;
  box-shadow: 0 5px 14px rgba(90, 141, 238, 0.32);
  color: #ffffff;
  outline: none;
}

.side-nav-heading-caret {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.side-nav-heading-caret .nav-icon {
  height: 15px;
  stroke-width: 2.2;
  width: 15px;
}

.side-nav-button .nav-icon,
.workspace-icon-chip .nav-icon,
.side-action-button .nav-icon,
.workspace-signout-button .nav-icon,
.mobile-sidebar-signout-button .nav-icon {
  stroke-width: 2;
}

.icon-action-button {
  background: #ffffff;
  border: 1px solid #e5ecfb;
  color: #5a8dee;
}

.icon-action-button.action-edit,
.icon-action-button.action-neutral {
  background: #eef4ff;
  border-color: #dce8ff;
  color: #5a8dee;
}

.icon-action-button.action-success,
.icon-action-button.action-use {
  background: #d2ffe8;
  border-color: #baf3d6;
  color: #178654;
}

.icon-action-button.action-danger {
  background: #ffdede;
  border-color: #ffc7c7;
  color: #d33f45;
}

.icon-action-button:hover:not(:disabled),
.icon-action-button:focus-visible {
  background: #5a8dee;
  border-color: #5a8dee;
  color: #ffffff;
}

.icon-action-button.action-success:hover:not(:disabled),
.icon-action-button.action-success:focus-visible,
.icon-action-button.action-use:hover:not(:disabled),
.icon-action-button.action-use:focus-visible {
  background: #39da8a;
  border-color: #39da8a;
  color: #ffffff;
}

.icon-action-button.action-danger:hover:not(:disabled),
.icon-action-button.action-danger:focus-visible {
  background: #ff5b5c;
  border-color: #ff5b5c;
  color: #ffffff;
}

.icon-action-symbol {
  stroke-width: 2.1;
}

@media (max-width: 900px) {
  .section-header {
    grid-template-columns: 1fr;
  }

  .section-header > .primary-button,
  .section-header > .secondary-button,
  .section-header .dashboard-actions {
    justify-self: stretch;
  }

  .section-header > .primary-button.compact-button {
    justify-content: center;
    width: 100%;
  }

  .dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace {
    overflow-x: hidden;
  }

  .section-header > .primary-button.compact-button {
    min-height: 44px;
    padding-inline: 12px;
    white-space: normal;
  }

  .section-header > .primary-button.compact-button::before {
    height: 17px;
    width: 17px;
  }

  .row-actions,
  .delivery-status-actions,
  .assignment-actions,
  .driver-card-actions {
    gap: 7px;
  }

  .icon-action-button {
    flex-basis: 36px;
    height: 36px;
    min-height: 36px;
    width: 36px;
  }
}

/* Stop workspace sections from becoming wider than the viewport. */
.app-shell {
  max-width: 100vw;
  overflow-x: hidden;
  width: 100%;
}

.workspace {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  width: auto;
}

.workspace > .content-section,
.workspace > .driver-workspace,
.workspace > .admin-shell,
.workspace > .embedded-admin-shell {
  box-sizing: border-box;
  max-width: none;
  min-width: 0;
  width: auto;
}

.content-section,
.management-panel,
.crud-panel,
.admin-crud-section,
.pricing-section {
  min-width: 0;
}

.section-header {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.section-header > .primary-button.compact-button {
  max-width: min(220px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-panel {
  max-width: 100%;
  overflow: hidden;
}

.filter-bar,
.company-list,
.delivery-list,
.statement-delivery-list,
.batch-delivery-list {
  max-width: 100%;
}

@media (max-width: 900px) {
  .workspace > .content-section,
  .workspace > .driver-workspace,
  .workspace > .admin-shell,
  .workspace > .embedded-admin-shell {
    margin-left: 16px;
    margin-right: 16px;
  }

  .section-header {
    overflow: visible;
  }

  .section-header > .primary-button.compact-button {
    max-width: 100%;
  }
}

/* Let the sidebar use the full available height before showing a scroll. */
.side-navigation {
  align-content: start;
  display: flex;
  flex-direction: column;
  grid-template-rows: auto auto auto minmax(0, auto);
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.side-navigation .side-nav {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: 0;
}

.side-navigation-footer {
  flex: 0 0 auto;
  margin-top: auto;
  position: static;
  z-index: 2;
}

.side-navigation.collapsed {
  grid-template-rows: auto auto minmax(0, auto);
}

.side-navigation.collapsed .side-navigation-footer {
  margin-top: auto;
}

@media (max-width: 900px) {
  .side-navigation,
  .side-navigation .side-nav {
    max-height: none;
    overflow: visible;
  }

  .side-navigation-footer {
    position: static;
  }
}

/* Prefer page scrolling over an internal sidebar scrollbar. */
.side-navigation {
  height: auto;
  max-height: none;
  min-height: 100vh;
  overflow: visible;
  position: relative;
  top: auto;
}

.side-navigation .side-nav {
  overflow: visible;
}

.side-navigation-footer {
  margin-top: auto;
}

/* Deliveries workspace: structured flow, filters and responsive operational list. */
.deliveries-section {
  gap: 18px;
}

.delivery-page-header {
  overflow: visible;
}

.delivery-page-actions {
  flex-wrap: wrap;
}

.delivery-refresh-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.delivery-action-icon {
  flex: 0 0 auto;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.delivery-workbench {
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.delivery-workbench-header {
  border-bottom: 1px solid #eef3fb;
  padding: 18px 20px;
}

.delivery-workbench-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.delivery-workbench-title > span {
  color: #7c8db5;
  font-size: 0.82rem;
}

.delivery-status-tabs {
  background: #f7f9fc;
  border-bottom: 1px solid #e8eef8;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 20px;
}

.delivery-status-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #7c8db5;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  min-height: 54px;
  min-width: 0;
  padding: 10px 8px 8px;
}

.delivery-status-tab:hover,
.delivery-status-tab:focus-visible {
  color: #25396f;
}

.delivery-status-tab.active {
  border-bottom-color: #5a8dee;
  color: #25396f;
}

.delivery-status-tab strong {
  align-items: center;
  background: #e9f0ff;
  border-radius: 999px;
  color: #4b77cf;
  display: inline-flex;
  font-size: 0.72rem;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
}

.delivery-status-tab.active strong {
  background: #5a8dee;
  color: #ffffff;
}

.delivery-alert-toolbar {
  align-items: center;
  border-bottom: 1px solid #eef3fb;
  display: flex;
  gap: 12px;
  padding: 14px 20px;
}

.delivery-alert-label {
  color: #25396f;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.delivery-workbench .queue-summary {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  grid-template-columns: none;
}

.delivery-workbench .queue-summary-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe7f5;
  border-radius: 999px;
  box-shadow: none;
  color: #607197;
  display: inline-flex;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  width: auto;
}

.delivery-workbench .queue-summary-card:hover,
.delivery-workbench .queue-summary-card.active {
  background: #eef4ff;
  border-color: #9fbcf4;
  box-shadow: none;
  color: #25396f;
  transform: none;
}

.delivery-workbench .queue-summary-card span {
  color: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  text-transform: none;
}

.delivery-workbench .queue-summary-card strong {
  align-items: center;
  background: #edf2fb;
  border-radius: 999px;
  color: #4b77cf;
  display: inline-flex;
  font-size: 0.72rem;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.delivery-workbench .queue-summary-card.active strong {
  background: #5a8dee;
  color: #ffffff;
}

.delivery-filter-panel {
  background: #fbfcff;
  border-bottom: 1px solid #e8eef8;
  display: grid;
  gap: 12px;
  padding: 16px 20px 18px;
}

.delivery-filter-primary {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.delivery-filter-panel .delivery-search-field,
.delivery-filter-panel .filter-field,
.delivery-filter-panel .compact-filter {
  min-width: 0;
}

.delivery-filter-panel .filter-bar {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  padding: 0;
}

.delivery-clear-filters {
  white-space: nowrap;
}

.delivery-workbench .state-box {
  border: 0;
  border-radius: 0;
  margin: 20px;
}

.delivery-workbench .operational-delivery-list {
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.delivery-workbench .delivery-row {
  align-items: stretch;
  background: #ffffff;
  border-left: 4px solid transparent;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.58fr);
  min-width: 0;
  padding: 18px 20px 18px 16px;
}

.delivery-workbench .delivery-row:hover {
  background: #fbfcff;
  box-shadow: none;
}

.delivery-workbench .operational-delivery-row.has-issue,
.delivery-workbench .operational-delivery-row.selected-for-batch.has-issue {
  background: #ffffff;
}

.delivery-workbench .operational-delivery-row.has-issue:hover,
.delivery-workbench .operational-delivery-row.selected-for-batch.has-issue:hover {
  background: #fbfcff;
}

.delivery-workbench .operational-delivery-row.selected-for-batch {
  background: #f4f8ff;
  box-shadow: inset 0 0 0 1px #cbdcfb;
}

.delivery-workbench .batch-select-cell {
  align-self: start;
  min-height: 38px;
  padding-top: 8px;
}

.delivery-row-content {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.65fr);
  min-width: 0;
}

.delivery-workbench .delivery-row-main {
  align-content: start;
  gap: 5px;
}

.delivery-workbench .delivery-title-row {
  margin-bottom: 3px;
}

.delivery-workbench .delivery-title-row > strong {
  color: #25396f;
  font-size: 1rem;
}

.delivery-recipient {
  color: #405276;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-workbench .delivery-destination {
  color: #7c8db5 !important;
  font-size: 0.82rem !important;
  font-weight: 500;
  line-height: 1.45;
  margin-top: 0;
}

.delivery-priority-chip {
  background: #f1f4fa;
  border: 1px solid #dfe7f5;
  border-radius: 999px;
  color: #607197 !important;
  display: inline-flex !important;
  font-size: 0.7rem !important;
  font-weight: 700;
  margin: 0 !important;
  padding: 3px 8px;
}

.delivery-priority-chip.priority-alta {
  background: #fff7e8;
  border-color: #f6d69b;
  color: #946200 !important;
}

.delivery-priority-chip.priority-urgente {
  background: #fff0f0;
  border-color: #f4b7ba;
  color: #b4232c !important;
}

.delivery-row-timing {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin-top: 6px;
}

.delivery-workbench .queue-time-chip,
.delivery-workbench .queue-alert-detail {
  margin-top: 0;
}

.delivery-workbench .queue-alert-detail {
  flex: 1 1 220px;
  font-size: 0.76rem;
  font-weight: 600;
}

.delivery-row-facts {
  align-content: start;
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  min-width: 0;
}

.delivery-row-facts > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.delivery-row-facts dt {
  color: #98a5c0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.delivery-row-facts dd {
  color: #405276;
  font-size: 0.8rem;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}

.delivery-row-facts .delivery-value-fact dd {
  color: #1f8f61;
}

.delivery-row-controls {
  align-content: start;
  border-left: 1px solid #edf1f8;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-left: 18px;
}

.delivery-row-status-line {
  display: flex;
  justify-content: flex-end;
}

.delivery-row-action-line {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: none;
}

.delivery-row-action-line .compact-button {
  min-height: 36px;
}

.delivery-icon-action {
  flex-basis: 36px;
  height: 36px;
  min-height: 36px;
  width: 36px;
}

.delivery-assignment-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.delivery-assignment-form select {
  background: #ffffff;
  border: 1px solid #dfe7f5;
  border-radius: 5px;
  color: #405276;
  font: inherit;
  font-size: 0.82rem;
  min-height: 38px;
  min-width: 0;
  padding: 0 9px;
  width: 100%;
}

.detail-action-panel .delivery-row-controls {
  border-left: 0;
  padding-left: 0;
}

.detail-action-panel .delivery-row-status-line,
.detail-action-panel .delivery-row-action-line {
  justify-content: flex-start;
}

@media (max-width: 1280px) {
  .delivery-workbench .delivery-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-workbench .delivery-row-controls {
    border-left: 0;
    border-top: 1px solid #edf1f8;
    grid-column: 1;
    padding-left: 0;
    padding-top: 12px;
  }

  .delivery-workbench .delivery-row-status-line,
  .delivery-workbench .delivery-row-action-line {
    justify-content: flex-start;
  }

  .delivery-workbench .delivery-assignment-form {
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .delivery-page-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .delivery-page-actions > button {
    justify-content: center;
    width: 100%;
  }

  .delivery-filter-panel .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .delivery-workbench-header,
  .delivery-alert-toolbar {
    align-items: flex-start;
    display: grid;
  }

  .delivery-status-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 14px;
  }

  .delivery-status-tab {
    border-bottom-width: 2px;
    justify-content: space-between;
    min-height: 46px;
  }

  .delivery-status-tab:last-child {
    grid-column: 1 / -1;
  }

  .delivery-alert-toolbar,
  .delivery-filter-panel,
  .delivery-workbench-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .delivery-filter-primary,
  .delivery-row-content {
    grid-template-columns: 1fr;
  }

  .delivery-clear-filters {
    justify-self: stretch;
  }

  .delivery-workbench .delivery-row {
    gap: 12px;
    padding: 16px 14px 16px 10px;
  }
}

@media (max-width: 520px) {
  .delivery-page-actions,
  .delivery-filter-panel .filter-bar {
    grid-template-columns: 1fr;
  }

  .delivery-refresh-button span {
    display: inline;
  }

  .delivery-row-facts {
    grid-template-columns: 1fr 1fr;
  }

  .delivery-workbench .delivery-row-controls {
    grid-column: 1 / -1;
  }

  .delivery-assignment-form {
    grid-template-columns: 1fr;
  }

  .delivery-assignment-form .compact-button {
    width: 100%;
  }
}

/* Operations home: compact dashboard hierarchy and flat operational lists. */
.operations-home {
  gap: 18px;
}

.operations-home-header {
  overflow: visible;
}

.home-refresh-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.home-icon {
  flex: 0 0 auto;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 18px;
}

.operations-home .management-panel,
.operations-home .summary-tile {
  box-shadow: 0 5px 16px rgba(37, 57, 111, 0.08);
}

.operations-home .home-dashboard-panel,
.operations-home .home-shortcuts-panel {
  background: #ffffff;
  border: 1px solid #e8eef8;
  border-radius: 5px;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.home-panel-header {
  border-bottom: 1px solid #eef3fb;
  min-height: 58px;
  padding: 14px 18px;
}

.home-panel-title {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.home-panel-title h3 {
  color: #25396f;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.home-panel-icon {
  align-items: center;
  background: #edf3ff;
  border-radius: 5px;
  color: #5a8dee;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.operations-home .home-panel-header .count-pill {
  background: #f4f7fc;
  border-color: #dfe7f5;
  color: #607197;
}

.home-shortcut-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.home-shortcut-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #405276;
  cursor: pointer;
  display: grid;
  flex: 1 1 170px;
  font: inherit;
  gap: 10px;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 64px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.home-shortcut-button:hover,
.home-shortcut-button:focus-visible {
  background: #f2f6ff;
  box-shadow: inset 0 0 0 1px #d9e5fb;
  color: #25396f;
  outline: none;
  transform: translateY(-1px);
}

.home-shortcut-icon {
  align-items: center;
  background: #edf3ff;
  border-radius: 5px;
  color: #5a8dee;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.home-shortcut-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-shortcut-copy strong {
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.25;
}

.home-shortcut-copy small {
  color: #8a99b8;
  font-size: 0.7rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-home .dashboard-summary-grid {
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.operations-home .dashboard-metric {
  align-items: center;
  border: 1px solid #e8eef8;
  border-top: 1px solid #e8eef8;
  display: grid;
  gap: 11px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 104px;
  padding: 14px;
}

.dashboard-metric-icon {
  align-items: center;
  background: #edf3ff;
  border-radius: 6px;
  color: #5a8dee;
  display: inline-flex !important;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dashboard-metric-icon .home-icon {
  height: 20px;
  width: 20px;
}

.dashboard-metric-copy {
  display: grid !important;
  gap: 1px;
  min-width: 0;
}

.operations-home .dashboard-metric-copy > small {
  color: #7c8db5;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.operations-home .dashboard-metric-copy > strong {
  color: #25396f;
  font-size: 1.45rem;
  line-height: 1.15;
}

.operations-home .dashboard-metric-copy > span {
  color: #98a5c0;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: none;
}

.operations-home .metric-warning .dashboard-metric-icon {
  background: #fff5df;
  color: #c57a00;
}

.operations-home .metric-active .dashboard-metric-icon {
  background: #e9f8fb;
  color: #0794a3;
}

.operations-home .metric-success .dashboard-metric-icon {
  background: #eaf9f1;
  color: #198754;
}

.operations-home .metric-danger .dashboard-metric-icon {
  background: #fff0f0;
  color: #c2373f;
}

.operations-home .metric-done .dashboard-metric-icon {
  background: #f1efff;
  color: #6954c7;
}

.operations-home .operational-pendency-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operations-home .operational-pendency-card {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eef3fb;
  border-left: 0;
  border-radius: 0;
  color: #405276;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr) auto 16px;
  min-height: 70px;
  padding: 11px 14px;
  transition: background-color 0.16s ease;
}

.operations-home .operational-pendency-card:nth-child(odd) {
  border-right: 1px solid #eef3fb;
}

.operations-home .operational-pendency-card:hover:not(:disabled),
.operations-home .operational-pendency-card:focus-visible:not(:disabled) {
  background: #f7faff;
  box-shadow: none;
  transform: none;
}

.operations-home .operational-pendency-card:disabled {
  background: #fcfdff;
  opacity: 0.62;
}

.operational-pendency-icon,
.dashboard-alert-icon {
  align-items: center;
  background: #edf3ff;
  border-radius: 5px;
  color: #5a8dee !important;
  display: inline-flex !important;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.severity-warning .operational-pendency-icon,
.dashboard-alert.severity-warning .dashboard-alert-icon {
  background: #fff5df;
  color: #c57a00 !important;
}

.severity-critical .operational-pendency-icon,
.dashboard-alert.severity-critical .dashboard-alert-icon {
  background: #fff0f0;
  color: #c2373f !important;
}

.operational-pendency-copy {
  display: grid !important;
  gap: 2px;
  min-width: 0;
}

.operations-home .operational-pendency-copy strong {
  color: #405276;
  font-size: 0.82rem;
  line-height: 1.25;
}

.operations-home .operational-pendency-copy small {
  color: #8a99b8;
  font-size: 0.7rem;
  line-height: 1.3;
}

.operational-pendency-count {
  align-items: center;
  background: #f1f4fa;
  border-radius: 999px;
  color: #405276 !important;
  display: inline-flex !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 7px;
}

.operations-home .dashboard-alert-list {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

.operations-home .dashboard-alert {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eef3fb;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 11px;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  min-height: 80px;
  padding: 12px 16px;
}

.operations-home .dashboard-alert:last-child,
.operations-home .operational-pendency-card:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.operations-home .dashboard-alert:hover {
  background: #f7faff;
  box-shadow: none;
  transform: none;
}

.dashboard-alert-copy {
  display: grid !important;
  gap: 4px;
  min-width: 0;
}

.dashboard-alert-title {
  align-items: center;
  display: flex !important;
  flex-wrap: wrap;
  gap: 7px;
}

.operations-home .dashboard-alert-title strong {
  color: #405276;
  font-size: 0.84rem;
}

.operations-home .dashboard-alert-copy > span:not(.dashboard-alert-title) {
  color: #7c8db5;
  font-size: 0.76rem;
  line-height: 1.35;
}

.operations-home .dashboard-alert-copy > small {
  color: #98a5c0;
  font-size: 0.68rem;
}

.operations-home .alert-severity {
  background: #f4f7fc;
  border: 0;
  color: #607197;
  font-size: 0.62rem !important;
  min-height: 20px;
  padding: 3px 7px;
}

.operations-home .severity-critical .alert-severity {
  background: #fff0f0;
  color: #b4232c;
}

.operations-home .severity-warning .alert-severity {
  background: #fff5df;
  color: #946200;
}

.operations-home .history-list {
  gap: 0;
  padding: 6px 18px 12px;
}

.operations-home .history-item {
  gap: 12px;
  grid-template-columns: 12px minmax(0, 1fr);
  padding: 12px 0;
  position: relative;
}

.operations-home .history-item + .history-item {
  border-top: 1px solid #f0f3f9;
}

.operations-home .status-dot {
  background: #5a8dee;
  border: 3px solid #e8f0ff;
  height: 11px;
  margin-top: 5px;
  width: 11px;
}

.history-item-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.history-item-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.operations-home .history-item-title strong {
  color: #405276;
  font-size: 0.84rem;
}

.operations-home .history-status-chip {
  background: #edf3ff;
  border-radius: 999px;
  color: #4b77cf;
  display: inline-flex;
  font-size: 0.64rem;
  font-weight: 700;
  margin: 0;
  padding: 3px 7px;
}

.operations-home .history-item-content > span {
  color: #7c8db5;
  font-size: 0.76rem;
  margin: 0;
}

.history-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.operations-home .history-item-meta small,
.operations-home .history-observation {
  color: #98a5c0;
  font-size: 0.68rem;
  margin: 0;
}

.operations-home .state-box {
  box-shadow: none;
}

.home-shortcut-button:nth-child(2) .home-shortcut-icon {
  background: #eaf9f1;
  color: #198754;
}

.home-shortcut-button:nth-child(3) .home-shortcut-icon {
  background: #e9f8fb;
  color: #0794a3;
}

.home-shortcut-button:nth-child(4) .home-shortcut-icon {
  background: #fff5df;
  color: #c57a00;
}

.home-shortcut-button:nth-child(5) .home-shortcut-icon {
  background: #f1efff;
  color: #6954c7;
}

.home-dashboard-columns {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

.home-dashboard-column {
  align-content: start;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.home-charts-body {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-width: 0;
}

.home-chart-cell {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px 18px;
}

.home-chart-cell + .home-chart-cell {
  border-left: 1px solid #eef3fb;
}

.home-chart-cell h4 {
  color: #405276;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0;
}

.home-chart-canvas-shell {
  height: 210px;
  min-height: 210px;
  min-width: 0;
  position: relative;
}

.home-priority-chart .home-chart-canvas-shell {
  height: 290px;
}

.home-chart-canvas-shell canvas {
  height: 100% !important;
  max-height: 100%;
  max-width: 100%;
  width: 100% !important;
}

.home-chart-legend {
  display: grid;
  gap: 6px 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-chart-legend > div {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-width: 0;
}

.home-chart-legend > div > span {
  border-radius: 50%;
  display: block;
  height: 8px;
  width: 8px;
}

.home-chart-legend small {
  color: #7c8db5;
  font-size: 0.62rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.home-chart-legend strong {
  color: #405276;
  font-size: 0.68rem;
}

@media (max-width: 1500px) {
  .operations-home .dashboard-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .home-charts-body {
    grid-template-columns: 1fr;
  }

  .home-chart-cell + .home-chart-cell {
    border-left: 0;
    border-top: 1px solid #eef3fb;
  }
}

@media (max-width: 1100px) {
  .home-dashboard-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .operations-home .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .operations-home .operational-pendency-grid {
    grid-template-columns: 1fr;
  }

  .operations-home .operational-pendency-card:nth-child(odd) {
    border-right: 0;
  }

  .operations-home .operational-pendency-card:nth-last-child(2) {
    border-bottom: 1px solid #eef3fb;
  }

  .home-chart-legend {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .operations-home-header .dashboard-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .home-refresh-button {
    justify-content: center;
    width: 100%;
  }

  .home-shortcut-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-shortcut-button {
    width: 100%;
  }

  .operations-home .dashboard-metric {
    min-height: 92px;
  }

  .operations-home .operational-pendency-card {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .operations-home .operational-pendency-card > .home-icon {
    display: none;
  }
}

/* Operations monitoring */
.operations-monitoring-section {
  max-width: none;
  width: 100%;
}

.monitoring-header {
  align-items: flex-end;
  gap: 24px;
}

.monitoring-header h2 {
  margin-bottom: 3px;
}

.monitoring-subtitle {
  color: #6c7a91;
  margin: 0;
}

.monitoring-header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.monitoring-refresh-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.monitoring-icon {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.monitoring-connection {
  align-items: center;
  background: #edf8f1;
  border: 1px solid #cdebd8;
  border-radius: 999px;
  color: #167341;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  white-space: nowrap;
}

.monitoring-connection > span {
  background: #20a35a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(32, 163, 90, 0.12);
  height: 7px;
  width: 7px;
}

.monitoring-connection.connecting,
.monitoring-connection.reconnecting {
  background: #fff7e6;
  border-color: #f4dfad;
  color: #8a5900;
}

.monitoring-connection.connecting > span,
.monitoring-connection.reconnecting > span {
  animation: monitoring-pulse 1.2s infinite;
  background: #d19a2a;
  box-shadow: 0 0 0 4px rgba(209, 154, 42, 0.13);
}

.monitoring-connection.offline {
  background: #f3f5f7;
  border-color: #dde2e8;
  color: #667085;
}

.monitoring-connection.offline > span {
  background: #8a94a3;
  box-shadow: none;
}

@keyframes monitoring-pulse {
  50% { opacity: 0.35; }
}

.monitoring-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.monitoring-metric {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f2;
  border-radius: 7px;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 82px;
  padding: 14px 16px;
}

.monitoring-metric-icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 7px;
  color: #4b74c8;
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.monitoring-metric.online .monitoring-metric-icon {
  background: #e9f8ef;
  color: #19884b;
}

.monitoring-metric.route .monitoring-metric-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.monitoring-metric.critical .monitoring-metric-icon {
  background: #fff0ee;
  color: #c43b31;
}

.monitoring-metric.quiet .monitoring-metric-icon {
  background: #f2f4f7;
  color: #758195;
}

.monitoring-metric strong,
.monitoring-metric span {
  display: block;
}

.monitoring-metric strong {
  color: #263858;
  font-size: 1.5rem;
  line-height: 1.05;
}

.monitoring-metric div > span {
  color: #718099;
  font-size: 0.78rem;
  margin-top: 5px;
}

.monitoring-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 390px);
  min-width: 0;
}

.monitoring-map-shell {
  background: #eef2f6;
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  height: clamp(520px, calc(100vh - 310px), 720px);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.monitoring-map-toolbar,
.monitoring-map-legend {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(214, 223, 234, 0.95);
  border-radius: 6px;
  box-shadow: 0 5px 16px rgba(30, 50, 75, 0.1);
  display: flex;
  position: absolute;
  z-index: 2;
}

.monitoring-map-toolbar {
  gap: 14px;
  left: 12px;
  padding: 8px 10px;
  top: 12px;
}

.monitoring-map-toolbar span {
  align-items: center;
  color: #586981;
  display: inline-flex;
  font-size: 0.75rem;
  gap: 6px;
  white-space: nowrap;
}

.monitoring-map-toolbar .monitoring-icon {
  height: 14px;
  width: 14px;
}

.monitoring-route-card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(204, 215, 230, 0.96);
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(30, 50, 75, 0.16);
  max-width: calc(100% - 24px);
  padding: 12px;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 310px;
  z-index: 3;
}

.monitoring-route-card-header {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
}

.monitoring-route-card-icon {
  align-items: center;
  background: #e8f0ff;
  border-radius: 6px;
  color: #2563eb;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.monitoring-route-card-icon .monitoring-icon {
  height: 18px;
  width: 18px;
}

.monitoring-route-card-title,
.monitoring-route-card-title strong,
.monitoring-route-card-title small {
  display: block;
  min-width: 0;
}

.monitoring-route-card-title strong {
  color: #2c3f5e;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitoring-route-card-title small {
  color: #74839a;
  font-size: 0.69rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitoring-route-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #8390a3;
  cursor: pointer;
  display: flex;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.monitoring-route-close:hover,
.monitoring-route-close:focus-visible {
  background: #f0f3f7;
  color: #354762;
  outline: none;
}

.monitoring-route-close .monitoring-icon {
  height: 16px;
  width: 16px;
}

.monitoring-route-state,
.monitoring-route-error {
  align-items: center;
  border-top: 1px solid #e8edf4;
  color: #65758c;
  display: flex;
  font-size: 0.72rem;
  gap: 7px;
  margin-top: 10px;
  padding-top: 9px;
}

.monitoring-route-spinner {
  animation: monitoring-spin 0.85s linear infinite;
  border: 2px solid #d8e0eb;
  border-radius: 50%;
  border-top-color: #2563eb;
  height: 15px;
  width: 15px;
}

.monitoring-route-metrics {
  border-top: 1px solid #e8edf4;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  padding-top: 9px;
}

.monitoring-route-metrics > span {
  display: block;
  min-width: 0;
}

.monitoring-route-metrics > span + span {
  border-left: 1px solid #e8edf4;
  padding-left: 9px;
}

.monitoring-route-metrics strong,
.monitoring-route-metrics small {
  display: block;
}

.monitoring-route-metrics strong {
  color: #263c60;
  font-size: 0.86rem;
}

.monitoring-route-metrics small {
  color: #8793a5;
  font-size: 0.63rem;
  margin-top: 1px;
}

.monitoring-route-error {
  color: #a13a32;
}

.monitoring-route-error .monitoring-icon {
  flex: 0 0 auto;
  height: 15px;
  width: 15px;
}

.monitoring-map-legend {
  bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
  left: 12px;
  padding: 8px 10px;
}

.monitoring-map-legend > span {
  align-items: center;
  color: #56657a;
  display: inline-flex;
  font-size: 0.72rem;
  gap: 5px;
}

.monitoring-legend-dot {
  background: #22a06b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(28, 42, 58, 0.16);
  height: 9px;
  width: 9px;
}

.monitoring-legend-dot.busy { background: #147a6f; }
.monitoring-legend-dot.stale { background: #d19a2a; }
.monitoring-legend-dot.muted { background: #7a8580; }

.map-loading,
.monitoring-map-empty {
  align-items: center;
  background: #f7f9fc;
  color: #65748b;
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 1;
}

.map-loading {
  flex-direction: row;
  gap: 10px;
}

.monitoring-loader {
  animation: monitoring-spin 0.85s linear infinite;
  border: 2px solid #d8e0eb;
  border-radius: 50%;
  border-top-color: var(--accent);
  height: 22px;
  width: 22px;
}

@keyframes monitoring-spin {
  to { transform: rotate(360deg); }
}

.monitoring-map-empty {
  flex-direction: column;
  gap: 8px;
  padding: 30px;
  text-align: center;
}

.monitoring-map-empty .monitoring-icon {
  color: #6d8fd2;
  height: 38px;
  width: 38px;
}

.monitoring-map-empty strong {
  color: #30415f;
}

.monitoring-map-empty span {
  font-size: 0.85rem;
  max-width: 360px;
}

.monitoring-side-panel {
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: clamp(520px, calc(100vh - 310px), 720px);
  min-width: 0;
  overflow: hidden;
}

.monitoring-tabs {
  background: #f7f9fc;
  border-bottom: 1px solid #e2e8f1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 58px;
}

.monitoring-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #718099;
  cursor: pointer;
  display: flex;
  font-size: 0.72rem;
  gap: 5px;
  justify-content: center;
  min-width: 0;
  padding: 10px 6px 8px;
}

.monitoring-tab:hover,
.monitoring-tab:focus-visible {
  background: #f0f4fa;
  outline: none;
}

.monitoring-tab.active {
  background: #ffffff;
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

.monitoring-tab .monitoring-icon {
  height: 15px;
  width: 15px;
}

.monitoring-tab small {
  align-items: center;
  background: #e9eef7;
  border-radius: 999px;
  color: #687890;
  display: inline-flex;
  font-size: 0.65rem;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
}

.monitoring-tab.active small {
  background: var(--accent-soft);
  color: var(--accent);
}

.monitoring-panel-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
  scrollbar-color: #bdc9da transparent;
  scrollbar-width: thin;
}

.monitoring-panel-body::-webkit-scrollbar { width: 7px; }
.monitoring-panel-body::-webkit-scrollbar-track { background: transparent; }
.monitoring-panel-body::-webkit-scrollbar-thumb {
  background: #bdc9da;
  border: 2px solid #ffffff;
  border-radius: 8px;
}

.monitoring-search {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  color: #7a879a;
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
}

.monitoring-search:focus-within {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 3px var(--accent-focus);
}

.monitoring-search .monitoring-icon {
  height: 16px;
  width: 16px;
}

.monitoring-search input {
  background: transparent;
  border: 0;
  color: #2d3f5d;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.monitoring-presence-note {
  color: #8793a5;
  font-size: 0.7rem;
  margin: 8px 2px 10px;
}

.monitoring-driver-list,
.monitoring-feed-list {
  display: grid;
  gap: 7px;
}

.monitoring-driver-row,
.monitoring-feed-row {
  background: #ffffff;
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  color: #31425f;
  cursor: pointer;
  min-width: 0;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.monitoring-driver-row:hover,
.monitoring-driver-row:focus-visible,
.monitoring-feed-row:hover,
.monitoring-feed-row:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.38);
  box-shadow: 0 5px 14px rgba(45, 65, 92, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.monitoring-driver-row.selected {
  background: #f2f6ff;
  border-color: #7da4ef;
  box-shadow: inset 3px 0 0 #2563eb, 0 5px 14px rgba(45, 65, 92, 0.08);
}

.monitoring-driver-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  padding: 10px;
}

.monitoring-driver-row > .monitoring-icon {
  color: #9aa5b5;
  height: 15px;
  width: 15px;
}

.monitoring-driver-avatar {
  align-items: center;
  background: #eef1f5;
  border: 2px solid #9ca3af;
  border-radius: 50%;
  color: #687384;
  display: flex;
  font-size: 0.68rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.monitoring-driver-avatar.online { background: #eaf8ef; border-color: #28a962; color: #177a43; }
.monitoring-driver-avatar.busy { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.monitoring-driver-avatar.stale { background: #fff7e6; border-color: #d19a2a; color: #95630a; }
.monitoring-driver-avatar.unavailable,
.monitoring-driver-avatar.offline { background: #f0f2f5; border-color: #9ca3af; color: #697586; }

.monitoring-driver-copy,
.monitoring-driver-copy > span,
.monitoring-driver-copy > small {
  display: block;
  min-width: 0;
}

.monitoring-driver-heading {
  align-items: center;
  display: flex !important;
  gap: 7px;
  justify-content: space-between;
}

.monitoring-driver-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitoring-driver-copy > span:not(.monitoring-driver-heading) {
  color: #65758d;
  font-size: 0.76rem;
  margin-top: 2px;
}

.monitoring-driver-copy > small {
  color: #929cad;
  font-size: 0.67rem;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitoring-status-badge {
  background: #f0f2f5;
  border-radius: 999px;
  color: #6c7686;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 6px;
}

.monitoring-status-badge.online { background: #e9f8ef; color: #187c45; }
.monitoring-status-badge.busy { background: var(--accent-soft); color: var(--accent); }
.monitoring-status-badge.stale { background: #fff4d9; color: #8d5c00; }

.monitoring-feed-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 11px;
}

.monitoring-feed-icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 6px;
  color: #5078c9;
  display: flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.monitoring-feed-row.critical .monitoring-feed-icon { background: #fff0ee; color: #c43b31; }
.monitoring-feed-row.warning .monitoring-feed-icon { background: #fff6e1; color: #a76b00; }

.monitoring-feed-row > span:last-child,
.monitoring-feed-row strong,
.monitoring-feed-row span,
.monitoring-feed-row small {
  display: block;
  min-width: 0;
}

.monitoring-feed-row strong {
  font-size: 0.8rem;
}

.monitoring-feed-row > span:last-child > span {
  color: #687790;
  font-size: 0.72rem;
  line-height: 1.42;
  margin-top: 3px;
}

.monitoring-feed-row small {
  color: #969faf;
  font-size: 0.66rem;
  margin-top: 5px;
}

.monitoring-feed-list.activity {
  gap: 0;
}

.monitoring-feed-list.activity .monitoring-feed-row {
  border: 0;
  border-bottom: 1px solid #edf0f5;
  border-radius: 0;
  grid-template-columns: 14px minmax(0, 1fr);
  padding: 13px 8px;
}

.monitoring-feed-list.activity .monitoring-feed-row:hover {
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}

.monitoring-timeline-dot {
  background: #5f82c7;
  border: 3px solid #eaf0fb;
  border-radius: 50%;
  height: 11px;
  margin-top: 3px;
  width: 11px;
}

.monitoring-panel-state {
  align-items: center;
  color: #7d899b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 230px;
  padding: 24px;
  text-align: center;
}

.monitoring-panel-state .monitoring-icon {
  color: #6e8dcc;
  height: 32px;
  margin-bottom: 10px;
  width: 32px;
}

.monitoring-panel-state strong {
  color: #3d4d68;
  font-size: 0.9rem;
}

.monitoring-panel-state span {
  font-size: 0.76rem;
  margin-top: 5px;
  max-width: 250px;
}

@media (max-width: 1280px) {
  .monitoring-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 350px);
  }
}

@media (max-width: 1040px) {
  .monitoring-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitoring-layout {
    grid-template-columns: 1fr;
  }

  .monitoring-map-shell {
    height: min(58vh, 580px);
    min-height: 420px;
  }

  .monitoring-side-panel {
    height: min(60vh, 620px);
    min-height: 440px;
  }
}

@media (max-width: 640px) {
  .monitoring-header {
    align-items: stretch;
  }

  .monitoring-header-actions {
    justify-content: space-between;
    width: 100%;
  }

  .monitoring-summary-grid {
    gap: 8px;
  }

  .monitoring-metric {
    gap: 9px;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 72px;
    padding: 11px;
  }

  .monitoring-metric-icon {
    height: 34px;
    width: 34px;
  }

  .monitoring-metric strong {
    font-size: 1.25rem;
  }

  .monitoring-metric div > span {
    font-size: 0.69rem;
  }

  .monitoring-map-shell {
    height: 54vh;
    min-height: 360px;
  }

  .monitoring-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .monitoring-route-card {
    left: 12px;
    top: 82px;
    width: auto;
  }

  .monitoring-map-legend {
    gap: 8px;
    max-width: calc(100% - 24px);
  }

  .monitoring-side-panel {
    height: 540px;
    min-height: 0;
  }

  .monitoring-tab {
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .monitoring-header-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .monitoring-connection,
  .monitoring-refresh-button {
    justify-content: center;
    width: 100%;
  }

  .monitoring-tab .monitoring-icon {
    display: none;
  }
}
