:root {
    --lb-bg: #F7FBF9;
    --lb-surface: #FFFFFF;
    --lb-surface-2: #F3F8F5;
    --lb-ink: #0F172A;
    --lb-muted: #64748B;
    --lb-border: rgba(15,23,42,.10);
    --lb-accent: #059669;
    --lb-accent-2: #1F5E4B;
    --lb-accent-soft: rgba(5,150,105,.12);
    --lb-radius: 18px;
    --lb-radius-sm: 14px;
    --lb-shadow: 0 14px 40px rgba(15,23,42,.08);
    --lb-shadow-sm: 0 10px 24px rgba(15,23,42,.08);
    --lb-max: 1280px;
}

* { font-family: Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; }

.lb-body { background: var(--lb-bg); color: var(--lb-ink); }

.lb-topbar {
    position: sticky; top: 0; z-index: 1050;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--lb-bg) 84%, white 16%);
    border-bottom: 1px solid var(--lb-border);
}

.lb-topbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }

.lb-brand-text { font-weight: 800; letter-spacing: -0.02em; color: var(--lb-ink); }

.lb-logo {
    width: 34px; height: 34px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-weight: 800;
    background: linear-gradient(135deg, var(--lb-accent), var(--lb-accent-2));
    box-shadow: 0 10px 24px rgba(5,150,105,.25);
}

.lb-shell { display: flex; min-height: calc(100vh - 64px); }

.lb-sidebar { width: 280px; border-right: 1px solid var(--lb-border); background: color-mix(in srgb, var(--lb-bg) 88%, white 12%); }

.lb-sidebar-inner {
    display: flex; flex-direction: column;
    height: calc(100vh - 64px); padding: 16px;
    position: sticky; top: 64px;
}

.lb-sidebar-footer { padding: 12px 10px; border-top: 1px dashed var(--lb-border); }

.lb-main { flex: 1; padding-bottom: 96px; }

.lb-main-inner { max-width: 1120px; margin: 0 auto; padding: 18px; padding-bottom: 96px; }

@media (min-width: 992px) {
    .lb-main { padding-bottom: 24px; }
}

/* Cards */
.lb-card { background: var(--lb-surface); border: 1px solid var(--lb-border); border-radius: var(--lb-radius); box-shadow: var(--lb-shadow-sm); }
.lb-card-soft { background: var(--lb-surface-2); border: 1px solid var(--lb-border); border-radius: var(--lb-radius); }
.lb-card-header { padding: 16px 16px 8px 16px; display: flex; align-items: flex-start; justify-content: space-between; }
.lb-card-body { padding: 0 16px 16px 16px; }

/* Buttons */
.btn-ghost { border: 1px solid transparent; background: transparent; color: var(--lb-ink); border-radius: 14px; padding: 10px 12px; }
.btn-ghost:hover { background: rgba(15,23,42,.06); }
.btn-soft { background: var(--lb-accent-soft); border: 1px solid rgba(5,150,105,.22); color: var(--lb-accent-2); border-radius: 14px; padding: 10px 14px; font-weight: 600; }
.btn-soft:hover { filter: brightness(.98); }

/* Pills */
.lb-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 10px; border: 1px solid rgba(5,150,105,.24); background: rgba(5,150,105,.10); color: var(--lb-accent-2); font-weight: 600; font-size: .85rem; }
.lb-pill2 { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; border: 1px solid rgba(15,23,42,.12); background: rgba(15,23,42,.05); color: rgba(15,23,42,.6); font-weight: 500; font-size: .78rem; }
.lb-pill-ooz { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; border: 1px solid rgba(239,68,68,.25); background: rgba(239,68,68,.08); color: #b91c1c; font-weight: 600; font-size: .78rem; }
.lb-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--lb-accent); box-shadow: 0 0 0 4px rgba(5,150,105,.14); }

/* Nav (sidebar) */
.lb-nav { display: flex; flex-direction: column; gap: 14px; }
.lb-nav-group { display: flex; flex-direction: column; gap: 6px; }
.lb-nav-title { font-size: .78rem; color: var(--lb-muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; }
.lb-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: var(--lb-ink); text-decoration: none; border: 1px solid transparent; }
.lb-nav-item:hover { background: rgba(15,23,42,.05); border-color: rgba(15,23,42,.08); }
.lb-nav-item i { color: var(--lb-muted); }

/* Active nav state */
.lb-active { background: rgba(5,150,105,.10) !important; border-color: rgba(5,150,105,.22) !important; color: var(--lb-accent-2) !important; }
.lb-active i { color: var(--lb-accent) !important; }

/* Bottom Nav (mobile) */
.lb-bottomnav {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 2400;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
    background: rgba(255,255,255,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15,23,42,.10); border-radius: 22px;
    box-shadow: 0 18px 48px rgba(15,23,42,.18); padding: 8px;
}

.lb-bottomnav-item {
    appearance: none; border: 0; background: transparent; text-decoration: none;
    color: rgba(15,23,42,.72); display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px; padding: 10px 8px;
    border-radius: 16px; font-weight: 750; font-size: .75rem; line-height: 1;
    transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.lb-bottomnav-item i { font-size: 1.18rem; }
.lb-bottomnav-item:active { transform: scale(.98); }
.lb-bottomnav-item.active { background: rgba(5,150,105,.12); color: #1F5E4B; box-shadow: inset 0 0 0 1px rgba(5,150,105,.22); }
.lb-bottomnav-item.active i { transform: translateY(-1px); }
.lb-bottomnav-btn { cursor: pointer; }

/* Hide bottom nav whenever any Bootstrap modal is open */
.modal-open .lb-bottomnav { display: none !important; }

/* Drawer */
.lb-drawer { position: fixed; inset: 0; display: none; z-index: 2000; }
.lb-drawer[aria-hidden="false"] { display: block; }
.lb-drawer-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.38); }
.lb-drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: 86%; max-width: 360px; background: var(--lb-surface); box-shadow: var(--lb-shadow); }

/* Auth pages */
.lb-auth-wrap { max-width: 520px; margin: 26px auto; }
.lb-h1 { font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.lb-sub { color: var(--lb-muted); }

/* Forms */
.form-control, .form-select { border-radius: 14px !important; border-color: rgba(15,23,42,.12) !important; padding: 12px 12px !important; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 4px rgba(5,150,105,.14) !important; border-color: rgba(5,150,105,.35) !important; }

/* ── lb-rjob: reusable row card (Driver Job Board, Customer Orders) ─────── */
.lb-rjob { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--lb-border); border-radius: 16px; background: var(--lb-surface); box-shadow: 0 6px 20px rgba(15,23,42,.05); transition: border-color .14s, box-shadow .14s, transform .12s; }
.lb-rjob:hover { border-color: rgba(5,150,105,.28); box-shadow: 0 12px 32px rgba(15,23,42,.09); transform: translateY(-1px); }
.lb-rjob-icon { width: 42px; height: 42px; border-radius: 14px; background: var(--lb-accent-soft); border: 1px solid rgba(5,150,105,.18); display: grid; place-items: center; color: var(--lb-accent); font-size: 1.1rem; flex-shrink: 0; }
.lb-rjob-mid { flex: 1; min-width: 0; }
.lb-rjob-title { font-weight: 800; font-size: .95rem; color: var(--lb-ink); letter-spacing: -.01em; }
.lb-rjob-sub { font-size: .82rem; color: var(--lb-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.lb-money { font-weight: 900; font-size: 1.05rem; color: var(--lb-ink); letter-spacing: -.02em; font-family: ui-monospace, monospace; }
.lb-mini { font-size: .75rem; color: var(--lb-muted); }

/* ── lb-toast (inline page notification) ───────────────────────────────── */
.lb-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 2300; background: #0f172a; color: #f8fafc; border-radius: 14px; padding: 12px 20px; font-size: .88rem; box-shadow: 0 8px 32px rgba(15,23,42,.28); min-width: 220px; max-width: 360px; text-align: left; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.lb-page-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.lb-page-hd-title { font-weight: 900; font-size: 1.5rem; letter-spacing: -.025em; line-height: 1.2; margin: 0; }
.lb-page-hd-sub { color: var(--lb-muted); font-size: .92rem; margin-top: 4px; }
.lb-page-hd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Dashboard stat cards ────────────────────────────────────────────────── */
.lb-stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .lb-stats-grid { grid-template-columns: repeat(4,1fr); } }
.lb-stat { background: var(--lb-surface); border: 1px solid var(--lb-border); border-radius: var(--lb-radius); padding: 18px 18px 16px; box-shadow: 0 6px 20px rgba(15,23,42,.05); }
.lb-stat-label { font-size: .74rem; font-weight: 700; color: var(--lb-muted); text-transform: uppercase; letter-spacing: .055em; margin-bottom: 8px; }
.lb-stat-val { font-size: 1.65rem; font-weight: 900; letter-spacing: -.03em; color: var(--lb-ink); font-family: ui-monospace, monospace; line-height: 1; }
.lb-stat-sub { font-size: .76rem; color: var(--lb-muted); margin-top: 5px; }
.lb-stat.green .lb-stat-val { color: #16a34a; }
.lb-stat.blue  .lb-stat-val { color: #2563eb; }
.lb-stat.amber .lb-stat-val { color: #d97706; }
.lb-stat.red   .lb-stat-val { color: #dc2626; }

/* ── Skeleton loading state ──────────────────────────────────────────────── */
.lb-skeleton { background: linear-gradient(90deg, rgba(15,23,42,.06) 25%, rgba(15,23,42,.10) 50%, rgba(15,23,42,.06) 75%); background-size: 200% 100%; animation: lb-shimmer 1.4s infinite; border-radius: 8px; display: inline-block; }
@keyframes lb-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Quick-action grid ────────────────────────────────────────────────────── */
.lb-quick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 640px) { .lb-quick-grid { grid-template-columns: repeat(4,1fr); } }
.lb-quick-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px 12px; border: 1px solid var(--lb-border); border-radius: var(--lb-radius); background: var(--lb-surface); text-decoration: none; color: var(--lb-ink); font-weight: 700; font-size: .88rem; box-shadow: 0 4px 14px rgba(15,23,42,.04); transition: border-color .14s, box-shadow .14s, transform .12s, background .12s; text-align: center; }
.lb-quick-item:hover { border-color: rgba(5,150,105,.28); box-shadow: 0 10px 28px rgba(15,23,42,.08); transform: translateY(-2px); color: var(--lb-accent-2); }
.lb-quick-item i { font-size: 1.5rem; color: var(--lb-accent); }

/* ── Section heading ─────────────────────────────────────────────────────── */
.lb-section-hd { font-size: .78rem; font-weight: 700; color: var(--lb-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }

/* ── Push notification toast ──────────────────────────────────────────────── */
#lb-toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.lb-push-toast { pointer-events: all; background: #0f172a; color: #f8fafc; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.16); animation: lb-toast-in .3s cubic-bezier(.34,1.56,.64,1); position: relative; overflow: hidden; }
.lb-push-toast.hiding { animation: lb-toast-out .25s ease forwards; }
@keyframes lb-toast-in { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes lb-toast-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-8px) scale(.97); } }
.lb-push-toast-icon { width: 36px; height: 36px; background: rgba(5,150,105,.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #34d399; font-size: 16px; }
.lb-push-toast-title { font-weight: 700; font-size: 14px; color: #f8fafc; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-push-toast-body { font-size: 13px; color: #94a3b8; margin-top: 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-push-toast .btn-close { opacity: .5; padding: 0; width: 20px; height: 20px; }
.lb-push-toast .btn-close:hover { opacity: 1; }
.lb-push-toast-link { position: absolute; inset: 0; z-index: 0; }

/* ── Push notification opt-in banner ──────────────────────────────────────── */
.lb-push-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 1060; display: flex; align-items: center; gap: 12px; background: #0f172a; color: #f8fafc; box-shadow: 0 2px 12px rgba(0,0,0,.28); padding: 12px 16px; animation: lb-banner-in .3s ease; }
.lb-push-banner.lb-push-banner-out { animation: lb-banner-out .25s ease forwards; }
@keyframes lb-banner-in { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes lb-banner-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-100%); } }
.lb-push-banner-icon { flex-shrink: 0; width: 36px; height: 36px; background: rgba(5,150,105,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #10b981; font-size: 16px; }
.lb-push-banner-content { flex: 1; min-width: 0; }
.lb-push-banner-title { font-weight: 700; font-size: 14px; }
.lb-push-banner-body { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.lb-push-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 480px) { .lb-push-banner { flex-wrap: wrap; } .lb-push-banner-actions { width: 100%; justify-content: flex-end; } }

/* ── Google Places autocomplete ──────────────────────────────────────────── */
.pac-container { z-index: 1060 !important; border: 1px solid rgba(15,23,42,.10); border-radius: 14px; box-shadow: 0 14px 40px rgba(15,23,42,.10); font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 13px; margin-top: 4px; overflow: hidden; }
.pac-item { padding: 8px 12px; cursor: pointer; border-top: 1px solid rgba(15,23,42,.06); color: #0f172a; line-height: 1.4; }
.pac-item:first-child { border-top: none; }
.pac-item:hover, .pac-item-selected { background: rgba(5,150,105,.07); }
.pac-item-query { font-weight: 700; font-size: 13px; color: #0f172a; }
.pac-matched { color: #059669; }
.pac-icon, .pac-icon-marker { display: none; }
