/* ==========================================================================
   Vehicle Collection System — Design System v4 "Native"
   Mobile-first light theme that looks and feels like a real Android app.
   - System font stack: zero font downloads, zero swap-reflow, instant paint.
   - Flat fast surfaces (no fixed backgrounds, no load-time movement).
   - Touch-first: 48px targets, :active press feedback, hover only on mouse.
   - Same class API as before — page markup unchanged.
   ========================================================================== */

:root {
    /* Brand (teal, matches the Android app icons & themes) */
    --brand-900: #06363f;
    --brand-800: #0a4a55;
    --brand-700: #0e6270;
    --brand-600: #117c8c;
    --brand-500: #1898aa;
    --brand-400: #45b3c2;
    --brand-300: #84cdd8;
    --brand-200: #b8e2e8;
    --brand-100: #def0f3;
    --brand-50:  #eef7f8;

    /* Accent (warm clay) */
    --accent-700: #b4541f;
    --accent-600: #d3692e;
    --accent-500: #e88a4f;
    --accent-100: #fdeadd;
    --accent-50:  #fdf4ed;

    /* Status */
    --success-700: #15803d;
    --success-600: #16a34a;
    --success-100: #dcfce7;
    --danger-700:  #b91c1c;
    --danger-600:  #dc2626;
    --danger-100:  #fee2e2;
    --warn-700:    #a16207;
    --warn-600:    #ca8a04;
    --warn-100:    #fef9c3;
    --info-600:    #117c8c;
    --info-100:    #def0f3;

    /* Neutrals — clean light app theme */
    --ink-900: #111827;
    --ink-700: #374151;
    --ink-500: #6b7280;
    --ink-400: #9ca3af;
    --ink-300: #d1d5db;
    --line:    #e5e8ec;
    --line-2:  #eef0f3;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --canvas:  #f2f4f7;

    /* Shape & elevation (soft, app-like) */
    --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px;
    --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
    --shadow-sm: 0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.04);
    --shadow-md: 0 6px 16px -4px rgba(16,24,40,.10);
    --shadow-lg: 0 16px 40px -8px rgba(16,24,40,.18);
    --ring: 0 0 0 3px var(--brand-100);
    --ease: cubic-bezier(.2,.7,.3,1);
    --sidebar-w: 248px;

    /* System fonts — what real native apps use. No download, no reflow. */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-display: var(--font-body);
}

*, *::before, *::after { box-sizing: border-box; }

/* Touch app: no tap highlight boxes, no focus rings on tap. */
* { -webkit-tap-highlight-color: rgba(0,0,0,0) !important; }
:focus, :focus-visible, :active { outline: none !important; }
a:focus, button:focus, .btn:focus, [role="button"]:focus, [onclick]:focus,
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: none !important; box-shadow: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
    margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.5;
    color: var(--ink-900); background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .4em; color: var(--ink-900); }
h1 { font-size: 1.45rem; font-weight: 800; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-700); text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--brand-200); }

/* App chrome is not selectable (content & inputs stay selectable). */
.btn, .sidebar, .s-brand, .s-nav a, .bottom-nav, .bottom-nav a, .app-topbar,
.d-header, .badge, .pill, .stat .label, .card-title, .tb-bell, .segment label,
.pager a, .pager span, .modal header, .modal footer {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

/* ---------------------------------------------------------------------------
   Layout
--------------------------------------------------------------------------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 16px 14px 96px; animation: pageIn .28s var(--ease); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head .subtitle { color: var(--ink-500); font-size: .86rem; margin: 3px 0 0; }
.grid { display: grid; gap: 12px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid { gap: 16px; } .container { padding: 24px 22px 96px; } .page-head { margin-bottom: 22px; } }
@media (max-width: 380px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }   /* fade only — never moves */

/* ---------------------------------------------------------------------------
   Cards & stats
--------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); padding: 16px; }
@media (min-width: 720px) { .card { padding: 20px; } }
.card-pad-lg { padding: 24px; }
.card-title { font-weight: 700; font-size: 1rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; top: 14px; left: 0; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--brand-600); }
.stat.accent::before  { background: var(--accent-600); }
.stat.success::before { background: var(--success-600); }
.stat.info::before    { background: var(--brand-500); }
.stat.danger::before  { background: var(--danger-600); }
.stat.danger .value   { color: var(--danger-700); }
.stat .label { color: var(--ink-500); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.55rem; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; line-height: 1.1; }
.stat .meta  { color: var(--ink-400); font-size: .78rem; margin-top: 4px; }

/* ---------------------------------------------------------------------------
   Buttons — touch-first with press feedback
--------------------------------------------------------------------------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-body); font-weight: 600; font-size: .95rem; min-height: 46px; padding: 10px 18px;
    border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer; line-height: 1.2; white-space: nowrap;
    text-decoration: none; transition: transform .08s var(--ease), background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:active { background: var(--brand-800); }
.btn-accent { background: var(--accent-600); color: #fff; }
.btn-accent:active { background: var(--accent-700); }
.btn-ghost { background: var(--surface); color: var(--ink-700); border-color: var(--line); }
.btn-ghost:active { background: var(--surface-2); }
.btn-danger { background: var(--danger-600); color: #fff; }
.btn-danger:active { background: var(--danger-700); }
.btn-sm { min-height: 38px; padding: 7px 13px; font-size: .84rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2.4px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .65s linear infinite; }
.btn-ghost.is-loading::after { border-color: var(--brand-200); border-top-color: var(--brand-700); }

/* Hover styles only where a mouse exists. */
@media (hover: hover) and (pointer: fine) {
    a:hover { color: var(--brand-600); }
    .btn-primary:hover { background: var(--brand-800); }
    .btn-accent:hover { background: var(--accent-700); }
    .btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-300); }
    .btn-danger:hover { background: var(--danger-700); }
    table.data tbody tr:hover { background: var(--brand-50); }
    .s-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
    .tb-bell:hover { background: var(--brand-50); color: var(--brand-700); }
    .pager a:hover { background: var(--brand-50); }
    .modal .x:hover { background: var(--line); color: var(--ink-900); }
}

/* ---------------------------------------------------------------------------
   Forms — native input feel (filled, 16px so WebView never zooms)
--------------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .84rem; color: var(--ink-700); margin-bottom: 6px; }
.field .req { color: var(--danger-600); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 12px 14px; font-family: var(--font-body); font-size: 16px;
    color: var(--ink-900); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
    transition: border-color .15s var(--ease), background .15s var(--ease); -webkit-appearance: none; appearance: none; }
.input::placeholder { color: var(--ink-400); }
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--brand-500); background: var(--surface); box-shadow: var(--ring); }
.input:disabled { background: var(--line-2); color: var(--ink-400); }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 40px; }
textarea.input { min-height: 92px; resize: vertical; }
.help { font-size: .78rem; color: var(--ink-400); margin-top: 5px; }

.segment { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment label { padding: 12px 22px; font-weight: 600; font-size: .9rem; cursor: pointer; margin: 0; color: var(--ink-500); min-height: 46px; display: inline-flex; align-items: center; transition: background .15s var(--ease), color .15s var(--ease); }
.segment input:checked + label { background: var(--brand-700); color: #fff; }

/* ---------------------------------------------------------------------------
   Tables — card-style lists with horizontal scroll on small screens
--------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .88rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.data th { font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); background: var(--surface-2); position: sticky; top: 0; }
table.data tbody tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------------------
   Badges · pills · alerts · toasts
--------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-collection { background: var(--brand-100); color: var(--brand-700); }
.badge-delivery { background: var(--success-100); color: var(--success-700); }
.badge-muted { background: var(--line-2); color: var(--ink-500); }
.badge-warn { background: var(--warn-100); color: var(--warn-700); }
.badge-danger { background: var(--danger-100); color: var(--danger-700); }
.pill { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); display: inline-block; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: .9rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--success-100); color: var(--success-700); border-color: #bbf7d0; }
.alert-error { background: var(--danger-100); color: var(--danger-700); border-color: #fecaca; }
.alert-info { background: var(--brand-100); color: var(--brand-700); border-color: var(--brand-200); }

.toast-stack { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 600; color: #fff; max-width: 480px; width: 100%; animation: toastIn .3s var(--ease); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.9); flex: none; }
.toast.success { background: var(--success-600); }
.toast.error { background: var(--danger-600); }
.toast.info { background: var(--brand-700); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (min-width: 720px) { .toast-stack { left: auto; right: 18px; align-items: flex-end; } }

/* ---------------------------------------------------------------------------
   Empty states · loaders
--------------------------------------------------------------------------- */
.empty { text-align: center; padding: 44px 20px; color: var(--ink-400); font-size: .92rem; }
.empty .icon { font-size: 0; line-height: 0; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
    background: var(--brand-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230e6270' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / 26px 26px no-repeat; }
.empty .empty-title { font-weight: 700; color: var(--ink-500); font-size: 1rem; margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, var(--line-2) 25%, var(--line) 37%, var(--line-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
.spinner-dark { border-color: var(--brand-200); border-top-color: var(--brand-700); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------------
   Pager
--------------------------------------------------------------------------- */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--brand-700); background: var(--surface); min-height: 42px; display: inline-flex; align-items: center; }
.pager a:active { background: var(--brand-50); }
.pager .cur { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.pager .disabled { color: var(--ink-300); pointer-events: none; background: var(--surface-2); }

/* ---------------------------------------------------------------------------
   Modal — bottom sheet on phones, centered dialog on bigger screens
--------------------------------------------------------------------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.5); display: none; align-items: flex-end; justify-content: center; z-index: 1800; }
.modal-bg.open { display: flex; animation: pageIn .18s var(--ease); }
.modal { background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; max-width: 560px; width: 100%; box-shadow: var(--shadow-lg); max-height: 88vh; max-height: 88dvh; overflow-y: auto; animation: sheetUp .26s var(--ease); }
@keyframes sheetUp { from { transform: translateY(28px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal header h3 { margin: 0; font-size: 1.05rem; }
.modal .body { padding: 18px; }
.modal footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface); }
.modal footer .btn { flex: 1; }
.modal .x { background: var(--surface-2); border: 1px solid var(--line); width: 36px; height: 36px; border-radius: 50%; font-size: 1.25rem; cursor: pointer; color: var(--ink-500); line-height: 1; display: grid; place-items: center; }
@media (min-width: 720px) {
    .modal-bg { align-items: center; padding: 24px; }
    .modal { border-radius: var(--r-lg); max-height: 90vh; }
    .modal footer .btn { flex: none; }
}

/* ===========================================================================
   ADMIN / MANAGER SHELL — drawer on phone, fixed sidebar on tablet/desktop
   =========================================================================== */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar { width: var(--sidebar-w); flex: none; background: var(--brand-900); color: #d7ecef;
    display: flex; flex-direction: column; z-index: 60;
    position: fixed; left: 0; top: 0; height: 100vh; height: 100dvh;
    transform: translateX(-100%); transition: transform .24s var(--ease); will-change: transform; }
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sidebar .s-brand { display: flex; align-items: center; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 18px 14px; }
.sidebar .s-brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-600); display: grid; place-items: center; color: #fff; flex: none; }
.sidebar .s-brand .logo svg { width: 22px; height: 22px; }
.sidebar .s-brand .s-name { font-weight: 800; font-size: 1rem; color: #fff; line-height: 1.15; }
.sidebar .s-brand .s-sub { font-size: .7rem; color: var(--brand-300); letter-spacing: .02em; }
.sidebar .s-nav { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar .s-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 13px; border-radius: var(--r-md); color: #b9dde2; font-weight: 600; font-size: .93rem; min-height: 48px; }
.sidebar .s-nav a svg { width: 20px; height: 20px; flex: none; }
.sidebar .s-nav a:active { background: rgba(255,255,255,.1); }
.sidebar .s-nav a.active { background: var(--brand-600); color: #fff; }
.sidebar .s-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); }
.sidebar .s-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar .s-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.sidebar .s-user .nm { font-weight: 600; font-size: .87rem; color: #fff; line-height: 1.2; word-break: break-word; }
.sidebar .s-logout { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--r-sm); background: rgba(255,255,255,.1); color: #e6f4f6; font-weight: 600; font-size: .85rem; }
.sidebar .s-logout:active { background: rgba(255,255,255,.2); }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 50; min-height: 56px; display: flex; align-items: center; gap: 10px;
    padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
    background: var(--surface); border-bottom: 1px solid var(--line); }
.app-topbar .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: none; color: var(--ink-700); cursor: pointer; border-radius: var(--r-sm); flex: none; }
.app-topbar .menu-btn svg { width: 24px; height: 24px; }
.app-topbar .menu-btn:active { background: var(--surface-2); }
.app-topbar .tb-title { font-weight: 800; font-size: 1.05rem; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar .tb-spacer { flex: 1; }
.app-topbar .tb-user { display: none; font-size: .88rem; color: var(--ink-500); font-weight: 600; }
.tb-bell { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-500); flex: none; }
.tb-bell svg { width: 21px; height: 21px; }
.tb-bell:active { background: var(--brand-50); }
.tb-bell.has-due { color: var(--accent-600); }
.tb-bell-count { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger-600); color: #fff; font-size: .62rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }

/* Tablet / desktop: sidebar becomes permanent, hamburger hides. */
@media (min-width: 901px) {
    .sidebar { position: sticky; transform: none; box-shadow: none; }
    .sidebar-backdrop { display: none; }
    .app-topbar .menu-btn { display: none; }
    .app-topbar { padding-left: 22px; padding-right: 22px; }
    .app-topbar .tb-user { display: inline; }
}

/* ===========================================================================
   DRIVER SHELL — app bar + bottom navigation
   =========================================================================== */
.d-header { position: sticky; top: 0; z-index: 40; background: var(--brand-700); color: #fff;
    padding: calc(14px + env(safe-area-inset-top)) 16px 14px; display: flex; align-items: center; justify-content: space-between; }
.d-header .t { font-weight: 700; font-size: 1.08rem; }
.d-header a { color: #fff; display: inline-flex; align-items: center; min-width: 40px; min-height: 40px; }
.d-main { max-width: 620px; margin: 0 auto; padding: 16px 14px calc(86px + env(safe-area-inset-bottom)); animation: pageIn .28s var(--ease); width: 100%; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--surface);
    border-top: 1px solid var(--line); display: flex; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; max-width: 96px; text-align: center; color: var(--ink-400); font-size: .66rem; font-weight: 700; padding: 6px 2px 4px; border-radius: var(--r-md); }
.bottom-nav a .ic { display: grid; place-items: center; height: 30px; margin: 0 auto 2px; width: 52px; border-radius: 999px; }
.bottom-nav a .ic svg { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--brand-700); }
.bottom-nav a.active .ic { background: var(--brand-100); }
.bottom-nav a:active { color: var(--brand-600); }

/* ===========================================================================
   AUTH screens
   =========================================================================== */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: 30px 24px 26px; animation: pageIn .3s var(--ease); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-700); color: #fff; flex: none; }
.auth-logo svg { width: 26px; height: 26px; }
.auth-brand h1 { font-size: 1.1rem; margin: 0; line-height: 1.15; }
.auth-brand .tag { font-size: .76rem; color: var(--ink-400); }
.auth-card h2 { font-size: 1.35rem; margin: 0 0 4px; }
.auth-sub { color: var(--ink-500); font-size: .9rem; margin: 0 0 22px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--ink-400); width: 44px; height: 44px; font-size: 1.05rem; line-height: 1; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 20px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--brand-700); cursor: pointer; flex: none; }
.check-row label { font-size: .88rem; color: var(--ink-700); cursor: pointer; margin: 0; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .8rem; color: var(--ink-400); }

/* ---------------------------------------------------------------------------
   Utilities & icon badges
--------------------------------------------------------------------------- */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.muted { color: var(--ink-500); } .small { font-size: .82rem; }
.text-right { text-align: right; } .text-center { text-align: center; }
.hidden { display: none !important; }

.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.icon-badge svg { width: 22px; height: 22px; }
.icon-badge.success { background: var(--success-100); color: var(--success-700); }
.icon-badge.brand { background: var(--brand-100); color: var(--brand-700); }
.icon-badge.accent { background: var(--accent-100); color: var(--accent-700); }
.icon-badge.lg { width: 56px; height: 56px; } .icon-badge.lg svg { width: 30px; height: 30px; }
.empty .icon-badge { margin: 0 auto 12px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
