/*
 * Clinic on Wheels — "COW Emerald" design system v2 (Oct 2026).
 * One source of truth for colour, type, spacing, radius, elevation, motion and control sizes.
 * Screens that load this file own their layout in one panel stylesheet (unit.css, auth.css, …) — no override layers.
 * v2: one type scale (no raw px font sizes in panel/unit/auth), a warm accent, semantic surface/status tokens and
 * a dark theme. Stylesheets use tokens only, so the dark theme is nothing more than new token values (bottom of :root).
 */
/* v3 "Public Trust" (Nov 2026): navy + blue + green palette, Outfit display / IBM Plex Sans body. Token NAMES from v2 are kept. */
:root {
  color-scheme: light;
  /* Brand: Navy 900 is the primary, Blue 600 the accent, Green 600 for success marks */
  --c-primary: #0B2E59; --c-primary-hover: #16427A; --c-primary-bright: #1D4ED8; --c-primary-glow: rgba(11, 46, 89, .28); --c-primary-glow-strong: rgba(11, 46, 89, .7);
  --c-navy-700: #16427A; --c-green: #16A34A; --c-link: #1D4ED8; /* Blue 600 */
  --c-forest: #071F3D; --c-forest-2: #0B2E59; --c-forest-3: #16427A; --c-forest-ink: #0B2E59; /* navy as text colour / dark surfaces */
  --c-mint: #E8EEF8; --c-mint-2: #F1F5FB; --c-mint-3: #D6E1F2; --c-lime: #BFD4FF;
  /* Accent: Blue 600 for highlights and the active place; amber is --c-warn, used for status only */
  --c-accent: #1D4ED8; --c-accent-ink: #1E40AF; --c-accent-soft: #E6EDFD;
  --c-on-fill: #fff; /* text on solid primary/status fills */
  --c-ring: rgba(29, 78, 216, .16); --c-ring-strong: rgba(29, 78, 216, .45); /* soft accent glows around focused fields */
  --c-focus: #1D4ED8; /* solid keyboard-focus outline: >= 3:1 on the page and on cards (navy bars use --c-side-ink) */
  /* Neutrals and surfaces */
  --c-bg: #F5F7FB; --c-surface: #fff; --c-surface-glass: rgba(255, 255, 255, .88); --c-line: #E2E8F0; --c-line-strong: #CBD5E1;
  --c-ink: #0A1428; --c-ink-2: #243248; --c-muted: #475569; --c-subtle: #5B6B80; /* 4.5:1 on white and on the page: tab labels, weekday names, placeholders */
  --c-overlay: rgba(10, 20, 40, .5);
  /* Status (only for meaning, never decoration): base, soft background, readable text on soft, border on soft */
  --c-ok: #15803D; --c-ok-soft: #E5F6EA; --c-ok-ink: #0B5A34; --c-ok-line: #BFE6CC;
  --c-warn: #B45309; --c-warn-soft: #FDF1DC; --c-warn-ink: #6B3D05; --c-warn-line: #F2D49B;
  --c-bad: #C81E1E; --c-bad-soft: #FDEAEA; --c-bad-ink: #8F1D1D; --c-bad-line: #F3C9C9;
  --c-ok-bright: #16A34A; --c-bad-bright: #DC2626; --c-warn-bright: #F59E0B; --c-idle: #94A3B8; /* dots, map markers */
  --c-bad-strong: #A51818; /* destructive hover / purge */
  --c-solid-ok: #0B5A34; --c-solid-warn: #7A4A00; --c-solid-bad: #8F1D1D; /* toast fills, white text */
  --c-whatsapp: #15803D; --c-whatsapp-hover: #166534;
  --c-amber-300: #FDE68A; --c-amber-800: #6B3A07; --c-amber-900: #4A2604; --c-amber-950: #3D2003; --c-camera: #050B16;
  --c-on-dark-ok: #BBF7D0; --c-on-dark-bad: #FECACA; /* pills on dark hero cards */
  --c-neutral-soft: #EEF2F7; --c-table-head: #F5F7FB;
  /* Stat-card top edges and chart series (Tasks 3-5) */
  --c-edge-info: #1D4ED8; --c-edge-ok: #16A34A; --c-edge-warn: #F59E0B; --c-edge-bad: #C81E1E;
  --c-chart-1: #1D4ED8; --c-chart-2: #0B2E59; --c-chart-3: #16A34A; --c-chart-4: #F59E0B; --c-chart-5: #0891B2;
  /* Office sidebar (navy in both themes) and its active pill */
  --c-side-bg: #0B2E59; --c-side-ink: #fff; --c-side-muted: #B9C7DD; --c-side-hover: rgba(255, 255, 255, .08); --c-side-line: rgba(255, 255, 255, .14); --c-side-active: #1D4ED8;
  /* Application background (light theme): page tint with a soft blue gloss; cards stay white */
  --c-app-bg: linear-gradient(160deg, #F5F7FB 0%, #EEF3FB 50%, #E3ECF8 100%);
  --c-app-sheen: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 220px); --c-app-glow: rgba(29, 78, 216, .2); --c-app-glow-soft: rgba(29, 78, 216, .1); --c-app-gloss: rgba(255, 255, 255, .55);
  --c-app-accent: #1D4ED8; --c-app-teal: #0E7490;
  /* Gradients */
  --g-primary: linear-gradient(135deg, #0B2E59 0%, #16427A 100%);
  --g-forest: radial-gradient(120% 140% at 100% 0%, #16427A 0%, rgba(22, 66, 122, 0) 55%), linear-gradient(160deg, #071F3D 0%, #0B2E59 100%);
  /* Type */
  --font: "IBM Plex Sans", "Plus Jakarta Sans Variable", "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Outfit Variable", "Plus Jakarta Sans Variable", "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-urdu: JameelNooriNastaliq, "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", "Urdu Typesetting", "Noto Naskh Arabic", Tahoma, sans-serif;
  /* Type scale — the only font sizes screens may use. 2xs is for uppercase overlines and badges only;
     input is 16px so phones never zoom into a focused field. */
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 13.5px; --fs-base: 14.5px; --fs-md: 15px; --fs-input: 16px;
  --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 24px; --fs-display: 28px; --fs-3xl: clamp(26px, 6vw, 32px);
  /* Space (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  /* Radius */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  /* Elevation */
  --e-1: 0 1px 2px rgba(11, 46, 89, .06);
  --e-2: 0 1px 2px rgba(11, 46, 89, .05), 0 8px 24px -12px rgba(11, 46, 89, .18);
  --e-3: 0 2px 4px rgba(11, 46, 89, .05), 0 22px 44px -20px rgba(11, 46, 89, .32);
  --e-glow: 0 10px 24px -10px rgba(11, 46, 89, .55);
  /* Control sizes — every button/input uses exactly one of these heights */
  --h-sm: 36px; --h-md: 44px; --h-lg: 52px;
  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 140ms; --t: 240ms; --t-slow: 520ms;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}

/* ---------- Dark theme ----------
 * Applies to the workspaces the layout marks with html.themable (office panels, Unit app, sign-in screens) — the public
 * website keeps its light art direction. html[data-theme] comes from the remembered choice (cookie); without one the
 * phone/computer setting decides. Screen only, so printing always uses the light colours. */
@media screen {
  html.themable[data-theme=dark] {
    color-scheme: dark;
    --c-primary: #60A5FA; --c-primary-hover: #93C5FD; --c-primary-bright: #3B82F6; --c-primary-glow: rgba(96, 165, 250, .3); --c-primary-glow-strong: rgba(96, 165, 250, .6); --c-on-fill: #0A1428; /* primary doubles as text colour, so it is light in dark mode and fills carry dark text */
    --c-navy-700: #1E3A68; --c-green: #22C55E; --c-link: #8AB4FF;
    --c-forest: #07101F; --c-forest-2: #0B1B33; --c-forest-3: #12274A; --c-forest-ink: #BBD0F5;
    --c-mint: #14233F; --c-mint-2: #101D35; --c-mint-3: #1B2F54; --c-lime: #93B4F5;
    --c-accent: #60A5FA; --c-accent-ink: #93C5FD; --c-accent-soft: rgba(96, 165, 250, .16);
    --c-ring: rgba(96, 165, 250, .28); --c-ring-strong: rgba(96, 165, 250, .5); --c-focus: #93C5FD;
    --c-bg: #0A1428; --c-surface: #111C33; --c-surface-glass: rgba(17, 28, 51, .86); --c-line: #22304D; --c-line-strong: #31446B;
    --c-ink: #E8EEF8; --c-ink-2: #C5D0E3; --c-muted: #94A3B8; --c-subtle: #8796AE;
    --c-overlay: rgba(0, 0, 0, .6);
    --c-ok: #4ADE80; --c-ok-soft: rgba(34, 197, 94, .14); --c-ok-ink: #86EFAC; --c-ok-line: rgba(74, 222, 128, .32);
    --c-warn: #FBBF24; --c-warn-soft: rgba(245, 158, 11, .14); --c-warn-ink: #FCD34D; --c-warn-line: rgba(251, 191, 36, .32);
    --c-bad: #F87171; --c-bad-soft: rgba(239, 68, 68, .14); --c-bad-ink: #FCA5A5; --c-bad-line: rgba(248, 113, 113, .32);
    --c-ok-bright: #4ADE80; --c-bad-bright: #F87171; --c-warn-bright: #FBBF24; --c-idle: #64748B; --c-bad-strong: #FCA5A5;
    --c-neutral-soft: #18253F;
    --c-edge-info: #60A5FA; --c-edge-ok: #4ADE80; --c-edge-warn: #FBBF24; --c-edge-bad: #F87171;
    --c-chart-1: #60A5FA; --c-chart-2: #93B4F5; --c-chart-3: #4ADE80; --c-chart-4: #FBBF24; --c-chart-5: #22D3EE;
    --c-side-bg: #0C1730; --c-side-ink: #E8EEF8; --c-side-muted: #A3B1C6; --c-side-hover: rgba(255, 255, 255, .06); --c-side-line: rgba(255, 255, 255, .1); --c-side-active: #1E3A8A;
    --c-app-bg: var(--c-bg); --c-app-sheen: none; --c-app-glow: transparent; --c-app-glow-soft: transparent; --c-app-gloss: transparent; --c-app-accent: #6AA5EE; --c-app-teal: #3FC2C9; --c-table-head: var(--c-mint-2);
    --g-primary: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    --e-1: 0 1px 2px rgba(0, 0, 0, .4);
    --e-2: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --e-3: 0 2px 4px rgba(0, 0, 0, .35), 0 22px 44px -20px rgba(0, 0, 0, .75);
    --e-glow: 0 10px 24px -10px rgba(96, 165, 250, .4);
  }
}
@media screen and (prefers-color-scheme: dark) {
  html.themable:not([data-theme=light]) {
    color-scheme: dark;
    --c-primary: #60A5FA; --c-primary-hover: #93C5FD; --c-primary-bright: #3B82F6; --c-primary-glow: rgba(96, 165, 250, .3); --c-primary-glow-strong: rgba(96, 165, 250, .6); --c-on-fill: #0A1428; /* primary doubles as text colour, so it is light in dark mode and fills carry dark text */
    --c-navy-700: #1E3A68; --c-green: #22C55E; --c-link: #8AB4FF;
    --c-forest: #07101F; --c-forest-2: #0B1B33; --c-forest-3: #12274A; --c-forest-ink: #BBD0F5;
    --c-mint: #14233F; --c-mint-2: #101D35; --c-mint-3: #1B2F54; --c-lime: #93B4F5;
    --c-accent: #60A5FA; --c-accent-ink: #93C5FD; --c-accent-soft: rgba(96, 165, 250, .16);
    --c-ring: rgba(96, 165, 250, .28); --c-ring-strong: rgba(96, 165, 250, .5); --c-focus: #93C5FD;
    --c-bg: #0A1428; --c-surface: #111C33; --c-surface-glass: rgba(17, 28, 51, .86); --c-line: #22304D; --c-line-strong: #31446B;
    --c-ink: #E8EEF8; --c-ink-2: #C5D0E3; --c-muted: #94A3B8; --c-subtle: #8796AE;
    --c-overlay: rgba(0, 0, 0, .6);
    --c-ok: #4ADE80; --c-ok-soft: rgba(34, 197, 94, .14); --c-ok-ink: #86EFAC; --c-ok-line: rgba(74, 222, 128, .32);
    --c-warn: #FBBF24; --c-warn-soft: rgba(245, 158, 11, .14); --c-warn-ink: #FCD34D; --c-warn-line: rgba(251, 191, 36, .32);
    --c-bad: #F87171; --c-bad-soft: rgba(239, 68, 68, .14); --c-bad-ink: #FCA5A5; --c-bad-line: rgba(248, 113, 113, .32);
    --c-ok-bright: #4ADE80; --c-bad-bright: #F87171; --c-warn-bright: #FBBF24; --c-idle: #64748B; --c-bad-strong: #FCA5A5;
    --c-neutral-soft: #18253F;
    --c-edge-info: #60A5FA; --c-edge-ok: #4ADE80; --c-edge-warn: #FBBF24; --c-edge-bad: #F87171;
    --c-chart-1: #60A5FA; --c-chart-2: #93B4F5; --c-chart-3: #4ADE80; --c-chart-4: #FBBF24; --c-chart-5: #22D3EE;
    --c-side-bg: #0C1730; --c-side-ink: #E8EEF8; --c-side-muted: #A3B1C6; --c-side-hover: rgba(255, 255, 255, .06); --c-side-line: rgba(255, 255, 255, .1); --c-side-active: #1E3A8A;
    --c-app-bg: var(--c-bg); --c-app-sheen: none; --c-app-glow: transparent; --c-app-glow-soft: transparent; --c-app-gloss: transparent; --c-app-accent: #6AA5EE; --c-app-teal: #3FC2C9; --c-table-head: var(--c-mint-2);
    --g-primary: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    --e-1: 0 1px 2px rgba(0, 0, 0, .4);
    --e-2: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --e-3: 0 2px 4px rgba(0, 0, 0, .35), 0 22px 44px -20px rgba(0, 0, 0, .75);
    --e-glow: 0 10px 24px -10px rgba(96, 165, 250, .4);
  }
}
html.themable { background: var(--c-bg); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.55; color: var(--c-ink); background: var(--c-bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; text-rendering: optimizeLegibility; }
:where(body.unit-body, body.auth-body) :where(h1, h2, h3, h4) { margin: 0; font-family: var(--font-display); color: var(--c-ink); font-weight: 750; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
:where(body.unit-body, body.auth-body) :where(p) { margin: 0; text-wrap: pretty; }
a { color: var(--c-link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:where(body.unit-body, body.auth-body) :where(img, svg, video, canvas) { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--c-ring); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: var(--r-xs); }
[hidden] { display: none !important; }
[dir=ltr] { unicode-bidi: isolate; }
.ui-icon { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; inset-inline-start: 16px; z-index: 200; padding: 12px 18px; border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-primary); font-weight: 700; box-shadow: var(--e-3); }
.skip-link:focus { top: calc(12px + var(--safe-t)); }
.num, [data-countup] { font-variant-numeric: tabular-nums; }

/* ---------- Alerts ---------- */
.alert { display: block; margin: 0 0 var(--s-4); padding: 14px 16px; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; animation: ds-rise var(--t) var(--ease) both; }
.alert ul { margin: 6px 0 0; padding-inline-start: 20px; }
.alert li + li { margin-top: 4px; }
.alert-error { color: var(--c-bad-ink); background: var(--c-bad-soft); border-color: var(--c-bad-line); }
.alert-success { color: var(--c-ok-ink); background: var(--c-ok-soft); border-color: var(--c-ok-line); }

/* ---------- Shared components (office panels; unit.css and auth.css reuse them) ----------
 * Buttons: primary (navy), secondary (outlined), ghost and danger; heights 36/44/52 (.btn-sm, .btn, .btn-lg); a press
 * scale; .is-loading (or aria-busy) shows a spinner. .admin-button is the office panels' name for .btn. */
:is(.btn, .admin-button) { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h-md); padding: 0 18px; border: 1px solid transparent; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-base); font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .16s var(--ease); }
:is(.btn, .admin-button) .ui-icon { flex: none; width: 18px; height: 18px; }
:is(.btn, .admin-button):active:not(:disabled) { transform: scale(.97); }
.btn-sm { min-height: var(--h-sm); padding: 0 12px; font-size: var(--fs-sm); }
.btn-lg { min-height: var(--h-lg); padding: 0 24px; font-size: var(--fs-md); }
:is(.btn-primary, .admin-button.button-primary) { background: var(--c-primary); color: var(--c-on-fill); box-shadow: var(--e-1); }
:is(.btn-primary, .admin-button.button-primary):hover { background: var(--c-primary-hover); }
:is(.btn-secondary, .admin-button.button-quiet) { border-color: var(--c-line-strong); background: var(--c-surface); color: var(--c-primary); }
:is(.btn-secondary, .admin-button.button-quiet):hover { border-color: var(--c-primary); background: var(--c-mint-2); }
.btn-ghost { background: transparent; color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-mint-2); }
:is(.btn-danger, .admin-button.button-danger) { background: var(--c-bad-bright); color: var(--c-on-fill); }
:is(.btn-danger, .admin-button.button-danger):hover { background: var(--c-bad-strong); }
:is(.btn, .admin-button):disabled { border-color: transparent; background: var(--c-neutral-soft); box-shadow: none; color: var(--c-subtle); cursor: not-allowed; }
.is-loading { cursor: progress; }
:is(.btn, .admin-button):is(.is-loading, .is-busy, [aria-busy=true])::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: ds-spin .7s linear infinite; }
/* Status badges: soft background, dark text (.admin-badge.badge-success/-pending/-error are the panel names) */
:is(.badge, .admin-badge, .badge-ok, .badge-warn, .badge-bad, .badge-info, .badge-neutral) { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-full); background: var(--c-neutral-soft); color: var(--c-ink-2); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
:is(.badge-ok, .admin-badge.badge-success) { background: var(--c-ok-soft); color: var(--c-ok-ink); }
:is(.badge-warn, .admin-badge.badge-pending) { background: var(--c-warn-soft); color: var(--c-warn-ink); }
:is(.badge-bad, .admin-badge.badge-error) { background: var(--c-bad-soft); color: var(--c-bad-ink); }
.badge-info { background: var(--c-accent-soft); color: var(--c-accent-ink); }
.badge-neutral { background: var(--c-neutral-soft); color: var(--c-ink-2); }
/* Cards: crisp white with a thin coloured top edge by type */
.card { border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); box-shadow: var(--e-1); }
.card-edge-info { --edge: var(--c-edge-info); }
.card-edge-ok { --edge: var(--c-edge-ok); }
.card-edge-warn { --edge: var(--c-edge-warn); }
.card-edge-bad { --edge: var(--c-edge-bad); }
:is(.card-edge-info, .card-edge-ok, .card-edge-warn, .card-edge-bad) { position: relative; overflow: hidden; }
:is(.card-edge-info, .card-edge-ok, .card-edge-warn, .card-edge-bad)::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 3px; background: var(--edge); pointer-events: none; }

/* ---------- Language switch (English | اردو) ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-full); background: var(--c-mint-2); border: 1px solid var(--c-line); flex: none; }
.lang-switch-icon { display: grid; place-items: center; width: 26px; color: var(--c-primary); }
.lang-switch-icon .ui-icon { width: 17px; height: 17px; }
.lang-switch button { min-height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--c-ink-2); font-size: 13px; font-weight: 650; line-height: 1; cursor: pointer; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.lang-switch button[lang=ur] { font-family: var(--font-urdu); font-size: 14px; }
.lang-switch button:hover { background: var(--c-mint); }
.lang-switch button.is-active, .lang-switch button[aria-pressed=true] { background: var(--c-primary); color: var(--c-on-fill); box-shadow: 0 2px 8px -2px var(--c-primary-glow); }
.lang-switch-large { display: flex; width: 100%; }
.lang-switch-large button { flex: 1; min-height: var(--h-md); font-size: 15px; }

/* ---------- Light / dark toggle ---------- */
.theme-toggle { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--c-line); border-radius: var(--r-full); background: var(--c-mint-2); color: var(--c-ink-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), transform var(--t) var(--spring); }
.theme-toggle:hover { background: var(--c-mint); color: var(--c-accent-ink); }
.theme-toggle:active { transform: rotate(-20deg) scale(.94); }
.theme-toggle .ui-icon { width: 19px; height: 19px; }
.theme-icon-sun { display: none; }
html.themable[data-theme=dark] .theme-icon-sun { display: block; }
html.themable[data-theme=dark] .theme-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html.themable:not([data-theme]) .theme-icon-sun { display: block; }
  html.themable:not([data-theme]) .theme-icon-moon { display: none; }
}
.signin-top-tools { display: inline-flex; align-items: center; gap: var(--s-2); }

/* ---------- Text size (Account settings) ---------- */
html.text-lg body { zoom: 1.12; }
html.text-xl body { zoom: 1.25; }
.text-size-switch { display: flex; gap: 6px; }
.text-size-switch button { flex: 1; min-height: var(--h-md); border: 1px solid var(--c-line); background: var(--c-mint-2); border-radius: var(--r-sm); color: var(--c-ink-2); font-weight: 700; cursor: pointer; }
.text-size-switch button[data-size=lg] { font-size: 17px; }
.text-size-switch button[data-size=xl] { font-size: 20px; }
.text-size-switch button.is-active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-fill); }

/* ---------- Urdu / right-to-left ---------- */
@font-face { font-family: JameelNooriNastaliq; src: url(https://cdn.jsdelivr.net/npm/jameel-noori/fonts/jameel-noori-nastaleeq4.woff2) format('woff2'), url(https://unpkg.com/jameel-noori/fonts/jameel-noori-nastaleeq4.woff2) format('woff2'); font-display: swap; size-adjust: 125%; }
html[lang=ur] body, html[lang=ur] input, html[lang=ur] select, html[lang=ur] textarea, html[lang=ur] button { font-family: var(--font-urdu); }
/* Headings, brand names and figures use --font-display: in Urdu, Latin letters and digits stay Outfit (its latin
 * unicode-range) and Urdu text falls through to Nastaliq. Nastaliq needs tall lines, so headings get room. */
html[lang=ur] { --font-display: "Outfit Variable", var(--font-urdu); }
html[lang=ur] body { line-height: 1.95; }
html[lang=ur] :is(h1, h2, h3, h4) { line-height: 1.9; letter-spacing: 0; }
html[lang=ur] label, html[lang=ur] p, html[lang=ur] small { line-height: 2; }
html[lang=ur] [dir=ltr], html[lang=ur] code, html[lang=ur] .num, html[lang=ur] [data-countup], html[lang=ur] input[type=number], html[lang=ur] input[type=tel], html[lang=ur] input[type=date], html[lang=ur] input[type=time] { font-family: var(--font); }
html[dir=rtl] .ui-icon-flip, html[dir=rtl] [data-flip-rtl] .ui-icon { transform: scaleX(-1); }

/* ---------- Motion primitives (used by js/core/motion.js) ---------- */
@keyframes ds-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes ds-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-word { from { opacity: 0; transform: translate3d(0, .55em, 0) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes ds-ripple { from { transform: translate(-50%, -50%) scale(0); opacity: .38; } to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@keyframes ds-shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes ds-pulse { 0% { box-shadow: 0 0 0 0 var(--c-ring-strong); } 100% { box-shadow: 0 0 0 14px rgba(29, 78, 216, 0); } }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.js-motion [data-reveal].is-pending { opacity: 0; }
.js-motion [data-reveal].is-pending.is-in { opacity: 1; animation: ds-rise var(--t-slow) var(--ease) both; animation-delay: var(--d, 0ms); }
[data-split] .w { display: inline-block; white-space: pre; animation: ds-word 720ms var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 80ms); }
.ds-ripple { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); border-radius: 50%; background: currentColor; pointer-events: none; animation: ds-ripple 620ms var(--ease) forwards; }
.skeleton { background: linear-gradient(90deg, var(--c-neutral-soft) 25%, var(--c-mint-2) 37%, var(--c-neutral-soft) 63%); background-size: 400% 100%; animation: ds-shimmer 1.4s ease infinite; border-radius: var(--r-xs); color: transparent !important; } /* loading placeholder; motion.js removes it */

/* Smooth page-to-page transitions (cross-document View Transitions, progressive enhancement) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms var(--ease-in-out) both ds-vt-out; }
::view-transition-new(root) { animation: 320ms var(--ease) both ds-vt-in; }
@keyframes ds-vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes ds-vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js-motion [data-reveal].is-pending { opacity: 1; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
/* Cards still waiting below the fold must print. */
@media print { .js-motion [data-reveal].is-pending { opacity: 1 !important; animation: none !important; transform: none !important; } }

/* Browser autofill keeps fields white */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: var(--c-ink); -webkit-box-shadow: 0 0 0 1000px var(--c-surface) inset; transition: background-color 600000s 0s, color 600000s 0s; }
