/* Page-scoped styles for account.html */
/* ── Account header (replaces global nav) ── */
    .account-header {
      background: #0f1117; color: #fff; padding: .75rem 2rem;
      display: flex; align-items: center; justify-content: space-between;
      position: sticky; top: 0; z-index: 100;
    }
    .account-header .brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
    .account-header .brand-link img { height: 28px; }
    .account-header .brand-link span { font-weight: 700; font-size: 1rem; letter-spacing: -.02em; }
    .account-header .header-right { display: flex; align-items: center; gap: 1.25rem; }
    .account-header .user-pill {
      display: flex; align-items: center; gap: 8px;
      background: rgba(255,255,255,.08); border-radius: 999px; padding: .4rem .9rem .4rem .6rem;
      font-size: .85rem; font-weight: 600;
    }
    .account-header .user-pill .avatar {
      width: 26px; height: 26px; border-radius: 50%; background: #c47315;
      display: flex; align-items: center; justify-content: center;
      font-size: .7rem; font-weight: 800; color: #fff;
    }
    .account-header .logout-link {
      color: rgba(255,255,255,.5); font-size: .8rem; font-weight: 600;
      cursor: pointer; transition: color .15s; background: none; border: none;
    }
    .account-header .logout-link:hover { color: #fff; }

    /* ── Layout ── */
    .account-grid { display: grid; grid-template-columns: 220px 1fr; gap: 0; align-items: start; min-height: calc(100vh - 56px); }
    .account-sidebar {
      background: #fafaf8; border-right: 1px solid var(--line); padding: 1.5rem 0;
      position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
    }
    .account-sidebar nav { display: grid; gap: 2px; padding: 0 .5rem; }
    .account-sidebar nav a {
      padding: .7rem 1rem; border-radius: 8px; font-weight: 600; font-size: .9rem;
      color: var(--muted); transition: all .15s; display: flex; align-items: center; gap: 10px;
      text-decoration: none;
    }
    .account-sidebar nav a:hover { background: rgba(79,139,208,.06); color: var(--ink); text-decoration: none; }
    .account-sidebar nav a.active { background: rgba(79,139,208,.1); color: var(--blue); }
    .account-sidebar nav a .nav-count {
      margin-left: auto; background: var(--line); border-radius: 999px;
      padding: .1rem .5rem; font-size: .72rem; font-weight: 700; color: var(--muted);
    }
    .account-sidebar nav a.active .nav-count { background: rgba(79,139,208,.15); color: var(--blue); }

    .account-main { padding: 2rem; min-height: 400px; max-width: 960px; }
    .account-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 18px; }
    .account-card h3 { margin-bottom: .5rem; }

    /* ── Booking items (clickable) ── */
    .booking-item {
      display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
      padding: 1rem; margin: -1px -1.5rem; border-bottom: 1px solid var(--line);
      cursor: pointer; transition: background .12s;
    }
    .booking-item:hover { background: rgba(79,139,208,.04); }
    .booking-item:last-child { border-bottom: none; }
    .booking-route { font-weight: 700; font-size: 1rem; }
    .booking-vehicle { font-size: .88rem; color: var(--muted); }
    .booking-status {
      padding: .35rem .8rem; border-radius: 999px; font-size: .72rem;
      font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    }
    .booking-status.deposit_paid, .booking-status.confirmed { background: #e8f5e9; color: #2e7d32; }
    .booking-status.in_transit { background: #e3f2fd; color: #1565c0; }
    .booking-status.completed { background: #f3e5f5; color: #7b1fa2; }
    .booking-status.delivered { background: #f3e5f5; color: #7b1fa2; }
    .booking-status.pending_quote, .booking-status.quoted { background: #fff3e0; color: #e65100; }
    .booking-status.cancelled { background: #fce4ec; color: #c62828; }

    /* ── Quote items (clickable) ── */
    .quote-item {
      padding: 1rem; margin: 0 -1.5rem; border-bottom: 1px solid var(--line);
      cursor: pointer; transition: background .12s;
    }
    .quote-item:hover { background: rgba(79,139,208,.04); }
    .quote-item:last-child { border-bottom: none; }
    .quote-route { font-weight: 700; }
    .quote-details { font-size: .88rem; color: var(--muted); margin-top: .25rem; }
    .quote-price { font-weight: 700; color: var(--accent); }

    .empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
    .empty-state h3 { color: var(--ink); }

    /* ── Active booking cards ── */
    .active-booking {
      background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
      padding: 0; margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
      transition: box-shadow .15s;
    }
    .active-booking:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
    .active-booking-header {
      padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
      display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    }
    .active-booking-header .route { font-size: 1.1rem; font-weight: 700; }
    .active-booking-header .vehicle { font-size: .88rem; color: var(--muted); margin-top: .15rem; }
    .active-booking-map { height: 320px; width: 100%; background: #f3f4f6; }
    .active-booking-meta {
      padding: 1rem 1.5rem; display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem;
      border-top: 1px solid var(--line); font-size: .88rem;
    }
    .active-booking-meta .label {
      font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
      color: var(--muted); display: block; margin-bottom: .2rem;
    }
    .active-booking-meta .value { font-weight: 600; color: var(--ink); }
    .live-dot {
      display: inline-block; width: 8px; height: 8px; border-radius: 50%;
      background: #ea580c; margin-right: 6px; animation: pulse 2s ease-in-out infinite;
    }
    @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

    .map-fallback {
      display: flex; align-items: center; justify-content: center;
      padding: 2rem; color: var(--muted); text-align: center; height: 100%;
    }

    /* ── Detail drawer (slides in from right) ── */
    .detail-overlay {
      display: none; position: fixed; inset: 0; z-index: 500;
      background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s;
    }
    .detail-overlay.open { display: block; opacity: 1; }
    .detail-panel {
      position: fixed; top: 0; right: -520px; bottom: 0; width: 500px; max-width: 90vw;
      background: #fff; z-index: 501; overflow-y: auto;
      box-shadow: -4px 0 24px rgba(0,0,0,.15); transition: right .25s ease;
    }
    .detail-panel.open { right: 0; }
    .detail-panel-header {
      padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
      display: flex; align-items: center; justify-content: space-between;
      position: sticky; top: 0; background: #fff; z-index: 1;
    }
    .detail-panel-header h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
    .detail-panel-close {
      background: none; border: none; font-size: 1.5rem; cursor: pointer;
      color: var(--muted); line-height: 1; padding: 4px;
    }
    .detail-panel-close:hover { color: var(--ink); }
    .detail-panel-body { padding: 1.5rem; }

    /* ── Status timeline ── */
    .status-timeline { position: relative; padding-left: 28px; margin: 1.25rem 0; }
    .status-timeline::before {
      content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px;
      width: 2px; background: var(--line);
    }
    .timeline-step { position: relative; padding-bottom: 1.25rem; }
    .timeline-step:last-child { padding-bottom: 0; }
    .timeline-step::before {
      content: ''; position: absolute; left: -23px; top: 4px;
      width: 12px; height: 12px; border-radius: 50%;
      background: var(--line); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line);
    }
    .timeline-step.done::before { background: #22c55e; box-shadow: 0 0 0 2px #bbf7d0; }
    .timeline-step.active::before { background: #3b82f6; box-shadow: 0 0 0 2px #bfdbfe; animation: pulse 2s ease-in-out infinite; }
    .timeline-step .step-title { font-weight: 700; font-size: .88rem; }
    .timeline-step .step-date { font-size: .78rem; color: var(--muted); }
    .timeline-step.future .step-title { color: var(--muted); }

    /* ── Detail sections ── */
    .detail-section { margin-bottom: 1.5rem; }
    .detail-section h4 {
      font-size: .72rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .06em; color: var(--muted); margin-bottom: .75rem;
      padding-bottom: .5rem; border-bottom: 1px solid var(--line);
    }
    .detail-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .9rem; }
    .detail-row .label { color: var(--muted); }
    .detail-row .value { font-weight: 600; text-align: right; }
    .detail-row.total { border-top: 2px solid var(--ink); padding-top: .6rem; margin-top: .4rem; font-size: 1rem; }
    .detail-row.total .value { color: var(--accent); }

    .detail-map { height: 250px; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }

    .detail-driver-card {
      display: flex; align-items: center; gap: 14px;
      background: #fafaf8; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
    }
    .detail-driver-card .driver-avatar {
      width: 44px; height: 44px; border-radius: 50%; background: #c47315;
      display: flex; align-items: center; justify-content: center;
      font-size: .9rem; font-weight: 800; color: #fff; flex-shrink: 0;
    }
    .detail-driver-card .driver-name { font-weight: 700; }
    .detail-driver-card .driver-phone { font-size: .85rem; color: var(--muted); }

    .pay-btn {
      display: block; width: 100%; padding: .75rem; border: none; border-radius: 999px;
      background: #c47315; color: #fff; font-weight: 700; font-size: 1rem;
      cursor: pointer; text-align: center; transition: background .15s;
    }
    .pay-btn:hover { background: #a86210; }

    /* ── Auth ── */
    .auth-container { max-width: 420px; margin: 0 auto; }
    .auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
    .auth-card h2 { text-align: center; margin-bottom: 1.5rem; }
    .auth-card .form-grid { grid-template-columns: 1fr; }
    .auth-toggle { text-align: center; margin-top: 1rem; font-size: .92rem; }
    .auth-toggle a { color: var(--blue); font-weight: 600; cursor: pointer; }
    .auth-error { color: #c0392b; font-size: .88rem; font-weight: 600; display: none; text-align: center; margin-bottom: 1rem; }
    .sso-divider { display: flex; align-items: center; gap: 12px; margin: 1.25rem 0; color: var(--muted); font-size: .85rem; }
    .sso-divider::before, .sso-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
    .btn-sso { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--card); font-weight: 700; font-size: .94rem; cursor: pointer; color: var(--ink); transition: background .15s, border-color .15s; text-decoration: none; }
    .btn-sso:hover { background: rgba(79,139,208,.06); border-color: var(--blue); color: var(--blue); }

    .success-banner { background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 16px; padding: 1rem 1.5rem; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
    .success-banner .icon { font-size: 24px; }
    .success-banner p { margin: 0; color: #2e7d32; font-weight: 600; }

    @media (max-width: 768px) {
      .account-grid { grid-template-columns: 1fr; }
      .account-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); padding: .75rem 0; }
      .account-sidebar nav { display: flex; overflow-x: auto; gap: 4px; padding: 0 .75rem; }
      .account-sidebar nav a { white-space: nowrap; font-size: .82rem; padding: .5rem .75rem; }
      .account-main { padding: 1rem; }
      .detail-panel { width: 100%; max-width: 100%; }
      .account-header { padding: .75rem 1rem; }
    }
