:root {
      color-scheme: dark;
      --bg: #0b0f19;
      --surface: #141928;
      --surface-2: #1a2035;
      --ink: #e8ecf4;
      --muted: #8a94a6;
      --line: #232b3e;
      --blue: #4f8cff;
      --teal: #2dd4bf;
      --amber: #f59e0b;
      --red: #f87171;
      --green: #34d399;
      --slate: #cbd5e1;
      --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
      --accent-gradient: linear-gradient(135deg, #4f8cff 0%, #6c5ce7 100%);
      --scrollbar-thumb: rgba(79, 140, 255, 0.42);
      --scrollbar-thumb-hover: rgba(79, 140, 255, 0.7);
      --scrollbar-track: rgba(8, 12, 21, 0.3);
    }

    * {
      box-sizing: border-box;
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }

    *::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    *::-webkit-scrollbar-track {
      background: var(--scrollbar-track);
      border-radius: 999px;
    }

    *::-webkit-scrollbar-thumb {
      min-height: 36px;
      background: var(--scrollbar-thumb);
      border: 2px solid transparent;
      border-radius: 999px;
      background-clip: padding-box;
    }

    *::-webkit-scrollbar-thumb:hover {
      background: var(--scrollbar-thumb-hover);
      border: 2px solid transparent;
      background-clip: padding-box;
    }

    *::-webkit-scrollbar-corner {
      background: transparent;
    }

    body {
      margin: 0;
      height: 100vh;
      overflow: hidden;
      font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
      line-height: 1.25;
      text-rendering: geometricPrecision;
      -webkit-font-smoothing: antialiased;
      background: var(--bg);
      color: var(--ink);
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
      font-size: 16px;
      letter-spacing: 0;
    }

    button {
      min-height: 40px;
      border: 0;
      border-radius: 8px;
      background: var(--accent-gradient);
      color: white;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 16px;
      white-space: nowrap;
      transition: all 0.2s ease;
      position: relative;
      overflow: hidden;
    }

    button:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 4px 15px rgba(79, 140, 255, 0.3);
    }

    button:active:not(:disabled) {
      transform: translateY(0);
    }

    button.secondary {
      background: linear-gradient(135deg, #475569 0%, #334155 100%);
    }

    button.light {
      background: var(--surface-2);
      color: var(--ink);
      border: 1px solid var(--line);
    }

    button.light:hover:not(:disabled) {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    button.success {
      background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    }

    button.success:hover:not(:disabled) {
      box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
    }

    button.warning {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    }

    button.warning:hover:not(:disabled) {
      box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }

    button.danger {
      background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    }

    button.danger:hover:not(:disabled) {
      box-shadow: 0 4px 15px rgba(248, 113, 113, 0.3);
    }

    button.icon {
      width: 40px;
      padding: 0;
    }

    button:disabled {
      opacity: 0.48;
      cursor: not-allowed;
    }

    input,
    select,
    textarea {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface-2);
      color: var(--ink);
      padding: 9px 12px;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    textarea {
      min-height: 86px;
      resize: vertical;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
    }

    .app {
      height: 100vh;
      overflow: hidden;
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr);
    }

    .sidebar {
      background: var(--surface);
      border-right: 1px solid var(--line);
      padding: 18px;
      position: sticky;
      top: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 4px 14px;
      border-bottom: 1px solid var(--line);
    }

    .mark {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      overflow: hidden;
      background: var(--surface-2);
      box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
    }

    .mark img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }

    .brand strong {
      display: block;
      font-size: 18px;
      line-height: 1.1;
    }

    .brand span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-top: 2px;
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav button {
      width: 100%;
      justify-content: flex-start;
      background: transparent;
      color: var(--slate);
      border: 1px solid transparent;
      font-weight: 800;
    }

    .nav button.active {
      background: rgba(79, 140, 255, 0.12);
      color: var(--blue);
      border-color: rgba(79, 140, 255, 0.25);
      box-shadow: 0 0 12px rgba(79, 140, 255, 0.08);
    }

    .workspace {
      min-width: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .topbar {
      min-height: 74px;
      background: var(--surface);
      border-bottom: 1px solid var(--line);
      padding: 14px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .title h1 {
      margin: 0;
      font-size: 22px;
      line-height: 1.2;
    }

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

    .login-inline {
      display: grid;
      grid-template-columns: 230px 180px auto;
      align-items: center;
      gap: 8px;
      min-width: 560px;
    }

    .admin-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border: 1px solid rgba(79, 140, 255, 0.2);
      background: rgba(79, 140, 255, 0.08);
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 13px;
      font-weight: 800;
    }

    .content {
      padding: 14px 12px 8px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      flex: 1;
      overflow: hidden;
    }

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

    .metric {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 18px;
      min-height: 92px;
      display: grid;
      align-content: space-between;
      box-shadow: var(--shadow);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      position: relative;
      overflow: hidden;
    }

    .metric::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--accent-gradient);
      border-radius: 12px 12px 0 0;
    }

    .metric:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    }

    .metric span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .metric strong {
      font-size: 28px;
      line-height: 1;
      background: var(--accent-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .panel {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 12px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-head {
      padding: 14px 18px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      background: var(--surface-2);
    }

    .panel-head h2 {
      margin: 0;
      font-size: 17px;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      width: 100%;
    }

    .toolbar input {
      flex: 1 1 200px;
      min-width: 180px;
    }

    .toolbar select {
      flex: 0 1 170px;
      min-width: 140px;
    }

    .toolbar button {
      flex: 0 0 auto;
    }

    .table-wrap {
      display: block;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-x pan-y;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 1040px;
    }

    th,
    td {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: top;
      font-size: 13px;
    }

    th {
      color: var(--muted);
      background: rgba(26, 32, 53, 0.6);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 700;
    }

    tr {
      transition: background 0.15s ease;
    }

    tr:hover td {
      background: rgba(79, 140, 255, 0.04);
    }

    tr:last-child td {
      border-bottom: 0;
    }

    .cell-main strong {
      display: block;
      font-size: 14px;
      margin-bottom: 3px;
    }

    .cell-main span,
    .muted {
      color: var(--muted);
      font-size: 12px;
    }

    .cell-main span {
      display: block;
      margin-top: 3px;
    }

    .driver-approved-meta {
      display: flex;
      align-items: center;
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      line-height: 1.35;
      white-space: nowrap;
    }

    .driver-approved-copy {
      display: grid;
      gap: 2px;
    }

    .driver-approved-by {
      color: var(--slate);
      font-size: 11px;
      font-weight: 500;
    }

    .actions {
      display: inline-flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 6px;
      width: max-content;
      min-width: max-content;
    }

    .actions button {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 24px;
      border-radius: 999px;
      padding: 0 9px;
      font-size: 11px;
      font-weight: 900;
      border: 1px solid var(--line);
      background: var(--surface-2);
      color: var(--slate);
      white-space: nowrap;
    }

    .badge.green {
      background: rgba(52, 211, 153, 0.12);
      color: var(--green);
      border-color: rgba(52, 211, 153, 0.25);
    }

    .badge.orange {
      background: rgba(245, 158, 11, 0.12);
      color: var(--amber);
      border-color: rgba(245, 158, 11, 0.25);
    }

    .badge.red {
      background: rgba(248, 113, 113, 0.12);
      color: var(--red);
      border-color: rgba(248, 113, 113, 0.25);
    }

    .badge.blue {
      background: rgba(79, 140, 255, 0.12);
      color: var(--blue);
      border-color: rgba(79, 140, 255, 0.25);
    }

    .registration-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 30px;
      padding: 3px 11px 3px 4px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 999px;
      color: #e8edf5;
      background: rgba(15, 23, 42, 0.72);
      font-size: 12px;
      font-weight: 750;
      letter-spacing: 0.05px;
      white-space: nowrap;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
    }

    .registration-google {
      border-color: rgba(66, 133, 244, 0.24);
      background: linear-gradient(135deg, rgba(66, 133, 244, 0.09), rgba(52, 168, 83, 0.07));
    }

    .registration-icon {
      display: grid;
      place-items: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.96);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    }

    .registration-google-icon svg {
      width: 16px;
      height: 16px;
    }

    .registration-whatsapp {
      border-color: rgba(37, 211, 102, 0.3);
      background: linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(18, 140, 126, 0.05));
    }

    .registration-whatsapp-icon {
      color: #fff;
      background: #25d366;
    }

    .registration-whatsapp-icon svg {
      width: 15px;
      height: 15px;
      stroke-width: 2.25;
    }

    .service-badges {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      width: max-content;
      min-width: 0;
    }

    .service-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 24px;
      padding: 0 9px;
      border-radius: 999px;
      border: 1px solid rgba(79, 140, 255, 0.20);
      background: rgba(79, 140, 255, 0.08);
      color: var(--slate);
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .service-badge svg {
      width: 13px;
      height: 13px;
    }

    .service-badge.vip {
      border-color: rgba(245, 158, 11, 0.25);
      background: rgba(245, 158, 11, 0.10);
      color: #fbbf24;
    }

    .service-badge.delivery {
      border-color: rgba(45, 212, 191, 0.25);
      background: rgba(45, 212, 191, 0.10);
      color: var(--teal);
    }

    .drawer-grid {
      display: grid;
      grid-template-columns: 1fr;
    }

    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.2s ease;
    }

.modal-overlay.open {
  display: flex;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-stack.open {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20, 25, 40, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  pointer-events: auto;
}

.toast i {
  flex: 0 0 auto;
}

.toast-success {
  border-color: rgba(52, 211, 153, 0.28);
}

.toast-success i {
  color: var(--green);
}

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .editor {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      width: 100%;
      max-width: 480px;
      max-height: 90vh;
      overflow-y: auto;
      animation: slideUp 0.25s ease;
    }

    .confirm-card {
      width: 100%;
      max-width: 420px;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      animation: slideUp 0.25s ease;
    }

    .membership-card {
      width: min(100%, 680px);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
      max-height: min(90vh, 820px);
      overflow-y: auto;
      animation: slideUp 0.25s ease;
    }

    .membership-body {
      display: grid;
      gap: 18px;
      padding: 20px;
    }

    .membership-notice {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 14px;
      border: 1px solid rgba(245, 158, 11, 0.28);
      border-radius: 14px;
      background: rgba(245, 158, 11, 0.08);
    }

    .membership-notice svg {
      flex: 0 0 auto;
      color: var(--orange);
    }

    .membership-notice div {
      display: grid;
      gap: 5px;
    }

    .membership-notice span,
    .membership-current-status {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .membership-current-status {
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
    }

    .membership-actions {
      display: grid;
      grid-template-columns: 1fr 1.35fr;
      gap: 10px;
    }

    .membership-payment-section {
      display: grid;
      gap: 14px;
      padding: 16px;
      border: 1px solid rgba(34, 197, 94, 0.3);
      border-radius: 14px;
      background: rgba(34, 197, 94, 0.06);
    }

    .membership-section-title {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
    }

    .membership-section-title > div { display: grid; gap: 4px; }
    .membership-section-title span { color: var(--muted); font-size: 13px; line-height: 1.4; }
    .membership-section-title svg { flex: 0 0 auto; color: var(--green); }

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

    .membership-money-input {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--surface-2);
      overflow: hidden;
    }

    .membership-money-input span { padding: 0 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
    .membership-money-input input { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
    .membership-register-payment { width: 100%; }
    .membership-register-payment.is-loading svg { animation: driver-map-spin 0.8s linear infinite; }

    .payments-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px 10px;
    }

    .payments-section-head h3 { margin: 0 0 3px; font-size: 15px; }
    @media (max-width: 620px) {
      .membership-payment-grid,
      .membership-actions { grid-template-columns: 1fr; }
    }

    .confirm-body {
      padding: 20px;
      display: grid;
      gap: 16px;
    }

    .confirm-copy {
      display: grid;
      gap: 8px;
      color: var(--ink);
    }

    .confirm-copy p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
    }

    .confirm-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .editor-head {
      padding: 16px 20px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: var(--surface-2);
      position: sticky;
      top: 0;
      z-index: 2;
    }

    .editor-head h2 {
      margin: 0;
      font-size: 17px;
    }

    .editor-body {
      padding: 20px;
      display: grid;
      gap: 12px;
    }

    label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .form-grid.single-column {
      grid-template-columns: 1fr;
    }

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

    .button-grid.single-action {
      grid-template-columns: 1fr;
    }

    .driver-services {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #0e1320;
    }

    .driver-services.hidden {
      display: none;
    }

    .driver-services-head {
      display: grid;
      gap: 3px;
    }

    .driver-services-head strong {
      color: var(--ink);
      font-size: 13px;
      font-weight: 900;
    }

    .driver-services-head span {
      color: var(--muted);
      font-size: 12px;
    }

    .service-options {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .service-option {
      position: relative;
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: center;
      gap: 9px;
      min-height: 62px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
      color: var(--ink);
      cursor: pointer;
      text-transform: none;
      font-size: 12px;
      font-weight: 800;
      overflow: hidden;
    }

    .service-option input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .service-option:has(input:checked) {
      border-color: rgba(52, 211, 153, 0.42);
      background: rgba(52, 211, 153, 0.10);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .service-option-icon {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: rgba(255, 255, 255, 0.06);
      color: var(--slate);
    }

    .service-option:has(input:checked) .service-option-icon {
      color: var(--green);
      background: rgba(52, 211, 153, 0.12);
    }

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

    .service-option strong {
      display: block;
      color: var(--ink);
      font-size: 13px;
      line-height: 1.05;
    }

    .service-option small {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.1;
    }

    .status-box {
      background: #080c15;
      color: #93c5fd;
      border-radius: 10px;
      padding: 14px;
      min-height: 84px;
      max-height: 220px;
      overflow: auto;
      font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      white-space: pre-wrap;
      border: 1px solid var(--line);
    }

    .evolution-status-card {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      height: 100%;
      min-height: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(8, 12, 21, 0.68);
    }

    .evolution-status-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--line);
      background: rgba(79, 140, 255, 0.08);
    }

    .evolution-status-head span {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
    }

    .evolution-status-head svg {
      width: 16px;
      height: 16px;
      color: var(--blue);
    }

    .evolution-status-head small {
      color: var(--muted);
      font-size: 11px;
    }

    #evolutionStatusBox {
      height: 100%;
      min-height: 0;
      max-height: none;
      overflow: auto;
      overflow-wrap: anywhere;
      border: 0;
      border-radius: 0;
      background: #080c15;
      scrollbar-gutter: stable;
    }

    .selected-summary {
      display: grid;
      gap: 12px;
    }

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

    .summary-card,
    .summary-panel {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #0e1320;
    }

    .summary-card {
      padding: 12px;
      display: grid;
      gap: 6px;
      min-height: 88px;
    }

    .summary-card span,
    .summary-panel h3,
    .summary-panel strong {
      letter-spacing: 0;
    }

    .summary-card span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .summary-card strong {
      color: var(--ink);
      font-size: 15px;
      line-height: 1.25;
    }

    .summary-card small {
      color: var(--muted);
      font-size: 12px;
    }

    .summary-panels {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .history-dialog {
      width: 920px;
      height: 640px;
      max-width: calc(100vw - 40px);
      max-height: calc(100vh - 40px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
      animation: slideUp 0.25s ease;
    }

    .history-head-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .history-body {
      flex: 1;
      min-height: 0;
      padding: 18px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .history-person {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      padding: 13px 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
    }

    .history-person-icon {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      color: var(--blue);
      background: rgba(79, 140, 255, 0.12);
      border: 1px solid rgba(79, 140, 255, 0.2);
    }

    .history-person-icon svg {
      width: 21px;
      height: 21px;
    }

    .history-person>div:nth-child(2) {
      min-width: 0;
      display: grid;
      gap: 4px;
    }

    .history-person strong {
      color: var(--ink);
      font-size: 15px;
    }

    .history-person span:not(.badge) {
      overflow: hidden;
      color: var(--muted);
      font-size: 12px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .history-controls {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.32fr);
      align-items: end;
      gap: 10px;
    }

    .history-controls.with-driver-status {
      grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.28fr) minmax(190px, 0.32fr);
    }

    .history-controls.user-trips-only {
      grid-template-columns: 1fr;
    }

    .history-controls label {
      min-width: 0;
    }

    .history-search span {
      position: relative;
      display: block;
    }

    .history-search {
      grid-column: 1;
      grid-row: 1;
      width: 100%;
    }

    #historyTypeWrap {
      grid-column: 2;
      grid-row: 1;
    }

    #historyTripStatusWrap {
      grid-column: 3;
      grid-row: 1;
    }

    .history-search svg {
      position: absolute;
      left: 12px;
      top: 50%;
      width: 17px;
      height: 17px;
      color: var(--muted);
      transform: translateY(-50%);
      pointer-events: none;
    }

    .history-search input {
      width: 100%;
      padding-left: 38px;
    }

    .history-panels {
      display: block;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .history-panels .summary-panel {
      width: 100%;
      height: 100%;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    .history-panels .summary-panel-head h3 {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .history-panels .summary-panel-head h3 svg {
      width: 16px;
      height: 16px;
      color: var(--blue);
    }

    .history-panels .summary-panel-body {
      flex: 1;
      min-height: 0;
      max-height: none;
      overflow-y: auto;
      align-content: start;
      grid-auto-rows: 84px;
    }

    .summary-panel {
      overflow: hidden;
    }

    .summary-panel-head {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      background: rgba(255, 255, 255, 0.02);
    }

    .summary-panel h3 {
      margin: 0;
      font-size: 13px;
      font-weight: 800;
      color: var(--ink);
    }

    .summary-panel-body {
      padding: 10px 14px 14px;
      display: grid;
      gap: 10px;
    }

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

    .mini-item {
      width: 100%;
      height: 84px;
      min-height: 84px;
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 10px;
      padding: 10px 11px;
      background: rgba(255, 255, 255, 0.02);
      display: grid;
      grid-template-rows: repeat(3, minmax(0, auto));
      align-content: center;
      gap: 4px;
      overflow: hidden;
    }

    .mini-item strong {
      font-size: 13px;
      color: var(--ink);
    }

    .mini-item strong .history-trip-status {
      color: var(--ink);
      font-size: inherit;
      font-weight: inherit;
    }

    .mini-item strong .history-trip-status.is-completed {
      color: var(--green);
    }

    .mini-item strong .history-trip-status.is-canceled {
      color: var(--red);
    }

    .mini-item span,
    .mini-item small {
      color: var(--muted);
      font-size: 12px;
    }

    .mini-item strong,
    .mini-item span,
    .mini-item small {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .summary-meta {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .evolution-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 280px;
      align-items: start;
      gap: 14px;
      padding: 14px;
      min-height: calc(100vh - 194px);
    }

    .evolution-side-column {
      display: grid;
      grid-template-rows: minmax(280px, 0.52fr) minmax(0, 0.48fr);
      gap: 14px;
      min-width: 0;
      height: 100%;
    }

    .evolution-form {
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
      gap: 10px;
      height: 100%;
    }

    .evolution-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .evolution-reply-card {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      gap: 12px;
      margin-top: 4px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(8, 12, 21, 0.68);
    }

    .evolution-reply-card > label {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      min-height: 0;
    }

    .evolution-reply-head,
    .evolution-reply-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .evolution-reply-head > div {
      display: grid;
      gap: 4px;
    }

    .evolution-reply-head strong {
      color: var(--text);
      font-size: 14px;
    }

    .evolution-reply-head span,
    .evolution-reply-footer small {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    #evolutionDriverReply {
      height: 100%;
      min-height: 250px;
      line-height: 1.5;
      resize: vertical;
    }

    .evolution-reply-footer button {
      flex: 0 0 auto;
    }

    @media (max-width: 700px) {
      .evolution-reply-head,
      .evolution-reply-footer {
        align-items: stretch;
        flex-direction: column;
      }

      .evolution-reply-footer button {
        width: 100%;
      }
    }

    .qr-box {
      min-height: 280px;
      border: 1px dashed var(--line);
      border-radius: 12px;
      background: var(--surface-2);
      display: grid;
      place-items: center;
      padding: 14px;
      text-align: center;
    }

    .qr-box img {
      width: min(240px, 100%);
      height: auto;
      image-rendering: pixelated;
    }

    .pairing-code {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--surface-2);
      padding: 8px 14px;
      color: var(--ink);
      font-size: 22px;
      font-weight: 900;
      letter-spacing: 2px;
    }

    .empty {
      padding: 36px 20px;
      text-align: center;
      color: var(--muted);
    }

    .drawer-grid {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .drawer-grid>div {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .view-panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .view-panel .panel-head {
      flex-shrink: 0;
    }

    .view-panel .table-wrap {
      flex: 1;
      min-width: 0;
      overflow-y: auto;
      overflow-x: auto;
      scrollbar-width: thin;
      scrollbar-color: rgba(79, 140, 255, 0.25) transparent;
    }

    .view-panel .table-wrap::-webkit-scrollbar {
      width: 6px;
      height: 8px;
    }

    .view-panel .table-wrap::-webkit-scrollbar-track {
      background: transparent;
    }

    .view-panel .table-wrap::-webkit-scrollbar-thumb {
      background: rgba(79, 140, 255, 0.25);
      border-radius: 3px;
    }

    .view-panel .table-wrap::-webkit-scrollbar-thumb:hover {
      background: rgba(79, 140, 255, 0.45);
    }

    .login-screen {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg);
      z-index: 100;
    }

    .login-card {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 36px 32px;
      width: min(400px, 90vw);
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    }

    .hidden {
      display: none !important;
    }

    @media (max-width: 1100px) {
      .app {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }

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

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

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

      .login-inline {
        min-width: 0;
        grid-template-columns: 1fr;
        width: 100%;
      }

      .topbar {
        align-items: stretch;
        flex-direction: column;
      }
    }

    @media (max-width: 680px) {
      .content {
        padding: 14px;
      }

      .topbar {
        padding: 14px;
      }

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

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

      .panel-head {
        align-items: stretch;
        flex-direction: column;
      }

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

      .form-grid,
      .service-options,
      .button-grid {
        grid-template-columns: 1fr;
      }

      .summary-grid,
      .summary-panels {
        grid-template-columns: 1fr;
      }

      .history-panels .summary-panel-body {
        max-height: none;
      }

      .history-controls,
      .history-controls.with-driver-status,
      .history-controls.user-trips-only {
        grid-template-columns: 1fr;
      }

      .history-search,
      #historyTypeWrap,
      #historyTripStatusWrap {
        grid-column: auto;
        grid-row: auto;
      }

      .evolution-layout {
        grid-template-columns: 1fr;
        min-height: auto;
      }

      .evolution-form {
        grid-template-rows: auto;
      }

      .evolution-side-column {
        grid-template-rows: auto auto;
        height: auto;
      }

      #evolutionStatusBox {
        height: 220px;
        min-height: 220px;
      }
    }

    @media (max-width: 460px) {
      .sidebar {
        padding: 12px;
        gap: 12px;
      }

      .brand {
        padding-bottom: 10px;
      }

      .brand strong {
        font-size: 16px;
      }

      .content {
        padding: 10px;
        gap: 12px;
      }

      .topbar {
        min-height: auto;
        padding: 12px;
        gap: 12px;
      }

      .title h1 {
        font-size: 20px;
      }

      .title p {
        font-size: 12px;
      }

      .nav {
        gap: 5px;
      }

      .nav button {
        justify-content: center;
        padding: 0 8px;
      }

      button {
        min-height: 38px;
        padding: 0 11px;
      }

      .metric {
        min-height: 82px;
        padding: 12px;
      }

      .metric strong {
        font-size: 24px;
      }

      .panel-head,
      .editor-head,
      .editor-body {
        padding: 12px;
      }

      .history-body {
        padding: 12px;
      }

      .history-person {
        grid-template-columns: 40px minmax(0, 1fr);
      }

      .history-person-icon {
        width: 40px;
        height: 40px;
      }

      .history-person>.badge {
        grid-column: 2;
        justify-self: start;
      }

      th,
      td {
        padding: 10px 12px;
      }

      .status-box {
        max-height: 180px;
      }
    }

    /* ── Create Admin User Modal ── */
    .create-admin-card {
      width: min(100%, 500px);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      animation: slideUp 0.25s ease;
    }

    .create-admin-body {
      display: grid;
      gap: 14px;
      padding: 20px;
    }

    .create-admin-body .form-grid {
      gap: 12px;
    }

    .create-admin-actions {
      display: grid;
      grid-template-columns: 1fr 1.35fr;
      gap: 10px;
    }

    /* ── Change Role Modal ── */
    .change-role-card {
      width: min(100%, 420px);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      animation: slideUp 0.25s ease;
    }

    .change-role-body {
      display: grid;
      gap: 16px;
      padding: 20px;
    }

    .change-role-user-info {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
    }

    .change-role-user-info .user-avatar {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: rgba(79, 140, 255, 0.12);
      border: 1px solid rgba(79, 140, 255, 0.2);
      color: var(--blue);
      flex: 0 0 auto;
    }

    .change-role-user-info .user-avatar svg {
      width: 20px;
      height: 20px;
    }

    .change-role-user-info div {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .change-role-user-info strong {
      font-size: 14px;
      color: var(--ink);
    }

    .change-role-user-info span {
      font-size: 12px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .change-role-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    /* ── Change Password Panel ── */
    .password-panel {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: 32px 20px;
      overflow-y: auto;
      flex: 1;
    }

    .password-card {
      width: min(100%, 480px);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .password-card-head {
      padding: 20px 24px;
      border-bottom: 1px solid var(--line);
      background: var(--surface-2);
      display: grid;
      gap: 6px;
    }

    .password-card-head h3 {
      margin: 0;
      font-size: 17px;
      color: var(--ink);
    }

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

    .password-card-user {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 24px;
      border-bottom: 1px solid var(--line);
      background: rgba(79, 140, 255, 0.04);
    }

    .password-card-user .user-avatar {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: rgba(79, 140, 255, 0.12);
      border: 1px solid rgba(79, 140, 255, 0.2);
      color: var(--blue);
      flex: 0 0 auto;
    }

    .password-card-user .user-avatar svg {
      width: 22px;
      height: 22px;
    }

    .password-card-user div {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .password-card-user strong {
      font-size: 15px;
      color: var(--ink);
    }

    .password-card-user span {
      font-size: 12px;
      color: var(--muted);
    }

    .password-card-body {
      padding: 24px;
      display: grid;
      gap: 16px;
    }

    .password-field {
      position: relative;
    }

    .password-field input {
      padding-right: 46px;
    }

    .password-field .toggle-password {
      position: absolute;
      right: 6px;
      bottom: 6px;
      width: 34px;
      height: 34px;
      min-height: 34px;
      padding: 0;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--line);
      color: var(--muted);
      cursor: pointer;
      display: grid;
      place-items: center;
      transition: color 0.2s, border-color 0.2s;
    }

    .password-field .toggle-password:hover {
      color: var(--ink);
      border-color: var(--blue);
      transform: none;
      box-shadow: none;
    }

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

    .password-strength {
      display: grid;
      gap: 6px;
    }

    .password-strength-track {
      height: 5px;
      border-radius: 999px;
      background: var(--surface-2);
      border: 1px solid var(--line);
      overflow: hidden;
    }

    .password-strength-bar {
      height: 100%;
      border-radius: 999px;
      width: 0%;
      transition: width 0.35s ease, background 0.35s ease;
    }

    .password-strength-bar.weak {
      width: 30%;
      background: linear-gradient(90deg, var(--red), #ef4444);
    }

    .password-strength-bar.medium {
      width: 60%;
      background: linear-gradient(90deg, var(--amber), #f59e0b);
    }

    .password-strength-bar.strong {
      width: 100%;
      background: linear-gradient(90deg, var(--green), #059669);
    }

    .password-strength-label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .password-strength-label.weak { color: var(--red); }
    .password-strength-label.medium { color: var(--amber); }
    .password-strength-label.strong { color: var(--green); }

    .password-card-status {
      min-height: 44px;
      padding: 12px 14px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--surface-2);
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
    }

    /* ── Membership Cell in Drivers Table ── */
    .membership-cell {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 130px;
    }

    .membership-cell .membership-status {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .membership-cell .membership-date {
      font-size: 11px;
      color: var(--muted);
      white-space: nowrap;
    }

    .membership-cell .edit-membership-btn {
      width: 28px;
      height: 28px;
      min-height: 28px;
      padding: 0;
      border-radius: 7px;
      background: var(--surface-2);
      border: 1px solid var(--line);
      color: var(--muted);
      cursor: pointer;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      transition: color 0.2s, border-color 0.2s;
    }

    .membership-cell .edit-membership-btn:hover {
      color: var(--blue);
      border-color: rgba(79, 140, 255, 0.4);
      transform: none;
      box-shadow: none;
    }

    .membership-cell .edit-membership-btn svg {
      width: 14px;
      height: 14px;
    }

    .badge.purple {
      background: rgba(108, 92, 231, 0.12);
      color: #a78bfa;
      border-color: rgba(108, 92, 231, 0.25);
    }

    /* ── Admin Users Table Overrides ── */
    .admin-users-notice {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 14px;
      border: 1px solid rgba(79, 140, 255, 0.22);
      border-radius: 14px;
      background: rgba(79, 140, 255, 0.06);
      margin-bottom: 4px;
    }

    .admin-users-notice svg {
      flex: 0 0 auto;
      color: var(--blue);
    }

    .admin-users-notice div {
      display: grid;
      gap: 4px;
    }

    .admin-users-notice strong {
      font-size: 13px;
      color: var(--ink);
    }

    .admin-users-notice span {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.45;
    }

    /* ── Responsive for new components ── */
    @media (max-width: 680px) {
      .password-panel {
        padding: 16px 12px;
      }

      .password-card-head,
      .password-card-user,
      .password-card-body {
        padding: 16px;
      }

      .create-admin-actions,
      .change-role-actions {
        grid-template-columns: 1fr;
      }
    }

    /* ── Driver Map Module ── */
    #view-driver-map {
      min-height: 0;
    }

    .driver-map-container,
    .driver-map-wrap {
      display: flex;
      flex-direction: column;
      flex: 1;
      width: 100%;
      height: 100%;
      min-height: 0;
      overflow: hidden;
    }

    .driver-map-header {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      padding: 14px 18px;
      border-bottom: 1px solid var(--line);
      background: var(--surface);
      flex: 0 0 auto;
    }

    .driver-map-header h2 {
      margin: 0;
      font-size: 16px;
      font-weight: 800;
      color: var(--ink);
      flex: 0 0 auto;
    }

    .driver-map-stats {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-left: 6px;
    }

    .driver-map-stats .stat-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid;
    }

    .stat-badge.online-stat {
      background: rgba(52, 211, 153, 0.1);
      color: var(--green);
      border-color: rgba(52, 211, 153, 0.25);
    }

    .stat-badge.offline-stat {
      background: rgba(239, 68, 68, 0.08);
      color: var(--red);
      border-color: rgba(239, 68, 68, 0.2);
    }

    .stat-badge.total-stat {
      background: rgba(79, 140, 255, 0.08);
      color: var(--blue);
      border-color: rgba(79, 140, 255, 0.2);
    }

    .stat-badge svg {
      width: 13px;
      height: 13px;
    }

    .driver-map-filters {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    .driver-map-filters select {
      min-width: 120px;
      font-size: 12px;
    }

    .driver-map-body {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: 1fr 280px;
      overflow: hidden;
      transition: grid-template-columns 0.2s ease;
    }

    .driver-map-body.sidebar-collapsed {
      grid-template-columns: 1fr 52px;
    }

    .driver-map-canvas {
      width: 100%;
      height: 100%;
      min-height: 400px;
      background: #0b0f19;
      position: relative;
      overflow: hidden;
      border-radius: 0 0 0 11px;
    }

    .driver-map-message {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 24px;
      color: var(--muted);
      text-align: center;
      background: #0b0f19;
    }

    .driver-map-message strong {
      color: var(--ink);
      font-size: 15px;
    }

    .driver-map-message svg {
      width: 28px;
      height: 28px;
      color: var(--red);
    }

    .driver-map-message.driver-map-consent svg {
      color: var(--blue);
    }

    .driver-map-message.driver-map-consent > span {
      max-width: 430px;
      font-size: 12px;
      line-height: 1.55;
    }

    .driver-map-open-button {
      margin-top: 4px;
      min-width: 150px;
      justify-content: center;
    }

    .driver-map-open-button svg {
      width: 16px;
      height: 16px;
      color: currentColor !important;
    }

    .map-loading-spinner {
      width: 28px;
      height: 28px;
      border: 3px solid rgba(79, 140, 255, 0.2);
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: driver-map-spin 0.8s linear infinite;
    }

    @keyframes driver-map-spin {
      to { transform: rotate(360deg); }
    }

    #refreshDriverMap.is-loading svg {
      animation: driver-map-spin 0.8s linear infinite;
    }

    .driver-map-sidebar {
      display: flex;
      flex-direction: column;
      border-left: 1px solid var(--line);
      background: var(--surface);
      overflow: hidden;
    }

    .driver-map-sidebar-head {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      background: rgba(255, 255, 255, 0.02);
      flex: 0 0 auto;
    }

    .driver-map-sidebar-title {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .driver-map-sidebar-head .icon {
      flex: 0 0 auto;
      width: 32px;
      height: 32px;
      padding: 0;
    }

    .driver-map-sidebar-head h3 {
      margin: 0;
      font-size: 13px;
      font-weight: 800;
      color: var(--ink);
    }

    .driver-map-sidebar-head span {
      font-size: 11px;
      color: var(--muted);
    }

    .driver-map-sidebar-search {
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      flex: 0 0 auto;
    }

    .driver-map-sidebar-search input {
      width: 100%;
      font-size: 12px;
      min-height: 36px;
    }

    .driver-map-sidebar-list {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      padding: 6px;
      scrollbar-width: thin;
      scrollbar-color: rgba(79, 140, 255, 0.25) transparent;
    }

    .driver-map-sidebar-list::-webkit-scrollbar {
      width: 5px;
    }

    .driver-map-sidebar-list::-webkit-scrollbar-track {
      background: transparent;
    }

    .driver-map-sidebar-list::-webkit-scrollbar-thumb {
      background: rgba(79, 140, 255, 0.25);
      border-radius: 3px;
    }

    .map-driver-item {
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 10px;
      border-radius: 10px;
      cursor: pointer;
      transition: background 0.15s;
      width: 100%;
      min-height: 0;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      box-shadow: none;
    }

    .map-driver-item:hover {
      background: rgba(79, 140, 255, 0.08);
      transform: none;
      box-shadow: none;
    }

    .map-driver-item.is-active {
      background: rgba(79, 140, 255, 0.12);
    }

    .map-driver-item.has-no-location {
      cursor: default;
    }

    .map-driver-item.has-no-location:hover {
      background: transparent;
    }

    .map-driver-item-icon {
      width: 36px;
      height: 36px;
      border-radius: 9px;
      display: grid;
      place-items: center;
      font-size: 0;
    }

    .map-driver-item-icon.is-online {
      background: rgba(52, 211, 153, 0.12);
      color: var(--green);
      border: 1px solid rgba(52, 211, 153, 0.25);
    }

    .map-driver-item-icon.is-offline {
      background: rgba(255, 255, 255, 0.04);
      color: var(--muted);
      border: 1px solid var(--line);
    }

    .map-driver-item-icon svg {
      width: 17px;
      height: 17px;
    }

    .map-driver-item-info {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .map-driver-item-info strong {
      font-size: 13px;
      color: var(--ink);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .map-driver-item-info span {
      font-size: 11px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .map-driver-item .badge {
      font-size: 10px;
      padding: 2px 7px;
    }

    .map-empty-sidebar {
      padding: 24px 14px;
      text-align: center;
      color: var(--muted);
      font-size: 12px;
    }

    /* Google Maps InfoWindow overrides */
    .gm-style-iw,
    .gm-style-iw-d {
      background: #1a2035 !important;
      border-radius: 12px !important;
      padding: 0 !important;
      overflow: hidden !important;
    }

    .gm-style-iw-tc::after {
      background: #1a2035 !important;
    }

    .gm-ui-hover-effect {
      top: 4px !important;
      right: 4px !important;
    }

    .gm-ui-hover-effect > span {
      background-color: #e8ecf4 !important;
    }

    .map-info-card {
      padding: 14px 16px;
      min-width: 220px;
      max-width: 280px;
      font-family: inherit;
    }

    .map-info-card strong {
      display: block;
      font-size: 14px;
      color: #e8ecf4;
      margin-bottom: 8px;
    }

    .map-info-card .map-info-row {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 3px 0;
      font-size: 12px;
      color: #8a94a6;
    }

    .map-info-card .map-info-row svg {
      width: 13px;
      height: 13px;
      flex: 0 0 auto;
      color: #4f8cff;
    }

    .map-info-card .map-info-row span {
      color: #c9d1e0;
    }

    .map-info-card .map-info-row b {
      color: #8a94a6;
      font-weight: 600;
      flex: 0 0 auto;
    }

    .map-info-card .map-info-badge {
      display: inline-block;
      margin-top: 8px;
      padding: 3px 9px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
    }

    .map-info-badge.online {
      background: rgba(52, 211, 153, 0.15);
      color: #34d399;
    }

    .map-info-badge.offline {
      background: rgba(239, 68, 68, 0.12);
      color: #ef4444;
    }

    .driver-map-body.sidebar-collapsed .driver-map-sidebar-title,
    .driver-map-body.sidebar-collapsed .driver-map-sidebar-search,
    .driver-map-body.sidebar-collapsed .driver-map-sidebar-list {
      display: none;
    }

    .driver-map-body.sidebar-collapsed .driver-map-sidebar-head {
      padding: 10px;
      justify-content: center;
      border-bottom: 0;
    }

    @media (max-width: 900px) {
      .driver-map-body {
        grid-template-columns: 1fr;
      }

      .driver-map-sidebar {
        display: none;
      }

      .driver-map-canvas {
        border-radius: 0 0 11px 11px;
      }
    }

    @media (max-width: 680px) {
      .driver-map-header {
        padding: 12px 14px;
        flex-direction: column;
        align-items: stretch;
      }

      .driver-map-filters {
        margin-left: 0;
        flex-wrap: wrap;
      }

      .driver-map-stats {
        margin-left: 0;
        flex-wrap: wrap;
      }

      .driver-map-filters select {
        flex: 1 1 135px;
        min-width: 0;
      }

      .driver-map-filters button {
        flex: 1 1 100%;
      }
    }

    /* ── Billing / Payment Methods Module ── */
    .billing-scroll {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      padding: 20px;
      display: grid;
      gap: 18px;
      align-content: start;
      grid-auto-rows: max-content;
      scrollbar-width: thin;
      scrollbar-color: rgba(79, 140, 255, 0.25) transparent;
    }

    .billing-card {
      min-height: max-content;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
    }

    .billing-card-head {
      padding: 16px 20px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: rgba(255, 255, 255, 0.02);
    }

    .billing-card-head h3 {
      margin: 0;
      font-size: 14px;
      font-weight: 800;
      color: var(--ink);
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .billing-card-head h3 svg {
      width: 16px;
      height: 16px;
      color: var(--blue);
    }

    .billing-card-body {
      padding: 20px;
      display: grid;
      gap: 14px;
    }

    .billing-form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .billing-notification-control {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
      cursor: pointer;
    }

    .billing-notification-control > span {
      display: grid;
      gap: 4px;
    }

    .billing-notification-control strong {
      color: var(--ink);
      font-size: 13px;
    }

    .billing-notification-control small {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .billing-notification-control input {
      width: 44px;
      min-width: 44px;
      height: 24px;
      min-height: 24px;
      accent-color: var(--green);
      cursor: pointer;
    }

    .billing-template-help {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      color: var(--muted);
      font-size: 11px;
    }

    .billing-template-help code {
      padding: 3px 6px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--surface-2);
      color: var(--blue);
      font: 600 10px/1.2 "JetBrains Mono", monospace;
    }

    .billing-template-actions {
      display: flex;
      justify-content: flex-end;
    }

    .billing-template-actions button {
      min-height: 36px;
      font-size: 11px;
    }

    .billing-save-bar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      padding: 14px 20px;
      border-top: 1px solid var(--line);
      background: var(--surface);
      flex: 0 0 auto;
    }

    .billing-save-bar .save-status {
      font-size: 12px;
      color: var(--muted);
      margin-right: auto;
    }

    /* Payment Method Items */
    .pm-list {
      display: grid;
      gap: 10px;
    }

    .pm-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
      transition: opacity 0.2s, border-color 0.2s;
    }

    .pm-item.is-disabled {
      opacity: 0.5;
    }

    .pm-item-info {
      display: grid;
      gap: 5px;
      min-width: 0;
    }

    .pm-item-info .pm-item-title {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .pm-item-info .pm-item-title strong {
      font-size: 14px;
      color: var(--ink);
    }

    .pm-item-info .pm-item-detail {
      font-size: 12px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pm-item-actions {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: nowrap;
    }

    .pm-item-actions button {
      width: 32px;
      height: 32px;
      min-height: 32px;
      padding: 0;
      border-radius: 8px;
      display: grid;
      place-items: center;
      background: var(--surface);
      border: 1px solid var(--line);
      color: var(--muted);
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s;
    }

    .pm-item-actions button:hover {
      color: var(--ink);
      border-color: var(--blue);
      transform: none;
      box-shadow: none;
    }

    .pm-item-actions button.pm-toggle-on {
      color: var(--green);
      border-color: rgba(52, 211, 153, 0.35);
      background: rgba(52, 211, 153, 0.08);
    }

    .pm-item-actions button.pm-toggle-off {
      color: var(--red);
      border-color: rgba(239, 68, 68, 0.25);
      background: rgba(239, 68, 68, 0.06);
    }

    .pm-item-actions button.pm-delete:hover {
      color: var(--red);
      border-color: rgba(239, 68, 68, 0.4);
    }

    .pm-item-actions button svg {
      width: 15px;
      height: 15px;
    }

    .method-type-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      border-radius: 6px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      background: rgba(79, 140, 255, 0.1);
      color: var(--blue);
      border: 1px solid rgba(79, 140, 255, 0.2);
    }

    .method-type-badge.type-mobile_wallet {
      background: rgba(168, 85, 247, 0.1);
      color: #a78bfa;
      border-color: rgba(168, 85, 247, 0.25);
    }

    .method-type-badge.type-bank_transfer {
      background: rgba(79, 140, 255, 0.1);
      color: var(--blue);
      border-color: rgba(79, 140, 255, 0.2);
    }

    .method-type-badge.type-payment_link {
      background: rgba(52, 211, 153, 0.1);
      color: var(--green);
      border-color: rgba(52, 211, 153, 0.2);
    }

    .method-type-badge.type-cash {
      background: rgba(245, 158, 11, 0.1);
      color: var(--amber);
      border-color: rgba(245, 158, 11, 0.2);
    }

    .method-type-badge.type-custom {
      background: rgba(255, 255, 255, 0.06);
      color: var(--muted);
      border-color: var(--line);
    }

    /* Payment Method Modal */
    .pm-modal-card {
      width: min(100%, 520px);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      animation: slideUp 0.25s ease;
    }

    .pm-modal-body {
      padding: 20px;
      display: grid;
      gap: 14px;
      max-height: 65vh;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: rgba(79, 140, 255, 0.25) transparent;
    }

    .pm-modal-body .form-grid {
      gap: 12px;
    }

    .pm-field-group {
      display: grid;
      gap: 12px;
      overflow: hidden;
      transition: max-height 0.25s ease, opacity 0.25s ease;
    }

    .pm-field-group.is-hidden {
      max-height: 0;
      opacity: 0;
      margin: 0;
      padding: 0;
      pointer-events: none;
    }

    .pm-modal-actions {
      display: grid;
      grid-template-columns: 1fr 1.35fr;
      gap: 10px;
      padding: 16px 20px;
      border-top: 1px solid var(--line);
    }

    /* Billing Preview */
    .billing-preview-list {
      display: grid;
      gap: 10px;
    }

    .billing-preview-method {
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2);
      display: grid;
      gap: 6px;
    }

    .billing-preview-method strong {
      font-size: 14px;
      color: var(--ink);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .billing-preview-method .preview-detail {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.5;
    }

    .billing-preview-method .preview-detail span {
      color: var(--ink);
      font-weight: 600;
    }

    .billing-preview-empty {
      padding: 28px 16px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
    }

    .billing-whatsapp-preview {
      overflow: hidden;
      border: 1px solid rgba(34, 197, 94, 0.2);
      border-radius: 14px;
      background: #0b141a;
    }

    .billing-whatsapp-head {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 10px 14px;
      background: #202c33;
      color: #e9edef;
      font-size: 11px;
      font-weight: 800;
    }

    .billing-whatsapp-head svg {
      width: 15px;
      height: 15px;
      color: #25d366;
    }

    .billing-message-bubble {
      width: min(92%, 640px);
      margin: 16px;
      padding: 12px 14px;
      border-radius: 4px 12px 12px 12px;
      background: #202c33;
      color: #e9edef;
      font-size: 12px;
      line-height: 1.55;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    }

    @media (max-width: 680px) {
      .billing-scroll {
        padding: 14px;
      }

      .billing-form-row {
        grid-template-columns: 1fr;
      }

      .billing-notification-control {
        align-items: flex-start;
      }

      .billing-template-actions button {
        width: 100%;
      }

      .billing-card-head,
      .billing-card-body {
        padding: 14px;
      }

      .pm-item {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .pm-item-actions {
        justify-content: flex-end;
      }

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

      .billing-save-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
      }

      .billing-save-bar .save-status {
        margin-right: 0;
        text-align: center;
      }
    }
