/* ======================================================================
   Autora WEB (obd.kawanda.net) tokens
   Part 1 is a verbatim copy of the Android app tokens (/workspace/autora-design/tokens.css),
   so the website and the app share one palette, type scale and shape language.
   check.py fails if any shared value here drifts from the app file.
   Part 2 adds ONLY web-specific tokens: layout widths, sidebar, table density, desktop sizes.
   ====================================================================== */

/* [APP TOKENS — copied 1:1] Autora garage app — design tokens
   Palette aligned to the CURRENT logo (navy #023471, cyan #01BAE6). Signal amber kept for Scan / Add only.
   (maps 1:1 to a Compose MaterialTheme ColorScheme + custom StatusColors)
   Light is default; dark via [data-theme="dark"]. All text pairs checked for WCAG AA (see FLOW.md). */
@font-face{font-family:"Inter";src:url("/fonts/Inter.ttf") format("truetype");font-weight:100 900;}
@font-face{font-family:"Autora Mono";src:url("/fonts/RobotoMono.ttf") format("truetype");font-weight:100 700;}
@font-face{font-family:"Plex Arabic";src:url("/fonts/IBMPlexSansArabic-400-arabic.woff2") format("woff2");font-weight:400;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200F;}
@font-face{font-family:"Plex Arabic";src:url("/fonts/IBMPlexSansArabic-500-arabic.woff2") format("woff2");font-weight:500;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200F;}
@font-face{font-family:"Plex Arabic";src:url("/fonts/IBMPlexSansArabic-600-arabic.woff2") format("woff2");font-weight:600;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200F;}
@font-face{font-family:"Plex Arabic";src:url("/fonts/IBMPlexSansArabic-700-arabic.woff2") format("woff2");font-weight:700;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200F;}

:root{ --ff: var(--font); }
html[lang=ar]{ --ff: var(--font-ar); }
:root{
  /* type */
  --font: "Inter", system-ui, sans-serif;
  --font-ar: "Plex Arabic", "Inter", sans-serif;
  --font-mono: "Autora Mono", ui-monospace, monospace;
  --t-display: 600 28px/36px var(--ff);   /* headlineMedium */
  --t-title-l: 600 22px/28px var(--ff);   /* titleLarge */
  --t-title-m: 600 17px/24px var(--ff);   /* titleMedium (bumped from 16 for glove use) */
  --t-body-l: 400 16px/24px var(--ff);    /* bodyLarge */
  --t-body-m: 400 14px/20px var(--ff);    /* bodyMedium */
  --t-label-l: 600 15px/20px var(--ff);   /* labelLarge (buttons) */
  --t-label-s: 600 12px/16px var(--ff);   /* labelSmall */

  /* spacing (4dp grid) & shape */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px; --s8:32px;
  --r-s:8px; --r-m:12px; --r-l:16px; --r-xl:28px;
  --tap:48px;          /* minimum touch target */
  --btn-h:56px;        /* primary buttons: glove-friendly */

  /* LIGHT colour scheme */
  --bg:#F3F5F8;            /* background */
  --surface:#FFFFFF;       /* surface / cards */
  --surface-2:#E9EDF2;     /* surfaceContainerHigh */
  --surface-3:#DCE2EA;     /* surfaceContainerHighest */
  --ink:#121821;           /* onSurface            16.9:1 on surface */
  --ink-2:#414C5A;         /* onSurfaceVariant      8.9:1 on surface, 8.0:1 on bg */
  --ink-3:#5B6676;         /* tertiary text         5.8:1 on surface */
  --outline:#8592A3;       /* field borders (3:1 non-text) */
  --outline-2:#D3DAE3;     /* dividers */

  /* BRAND (sampled from the current Autora logo pixels, brand/derive-report.json) — never recolour the logo */
  --brand-navy:#023471;    /* logo navy (mark/lockup ink) */
  --brand-cyan:#01BAE6;    /* logo cyan (arcs, heartbeat). Non-text only on light surfaces (2.3:1 on white) */
  --primary:#023471;       /* = logo navy (was #0D3B66) — onPrimary white 12.1:1 */
  --on-primary:#FFFFFF;
  --primary-fg:#023471;    /* primary used as text/icon on light surfaces */
  --primary-c:#D9E6F7;     /* primaryContainer */
  --on-primary-c:#01224A;  /* on primaryContainer */

  --accent:#F5A524;        /* signal amber — SCAN / ADD actions only */
  --on-accent:#1F1400;     /* 10.4:1 on accent (never white on amber) */
  --accent-c:#FFE7BF;

  --ok:#16794A;  --ok-c:#DDF3E6;  --on-ok-c:#0E5233;      /* "No faults" */
  --warn:#9A5800; --warn-c:#FFEBC7; --on-warn-c:#6A3C00;  /* "Check soon" */
  --fault:#B42318; --fault-c:#FDE3E0; --on-fault-c:#8A1A12;/* "Fix now" */
  --info:#00677F; --info-c:#DCF3FB; --on-info-c:#004A5C;  /* cyan-family info (brand highlight): "Never scanned" / low / tips */

  --scrim:rgba(10,16,24,.45);
  --shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.10);
  --shadow-fab:0 4px 10px rgba(16,24,40,.18),0 2px 4px rgba(16,24,40,.12);
}

[data-theme="dark"]{
  --bg:#0D1117;
  --surface:#161C24;
  --surface-2:#1F2731;
  --surface-3:#28323E;
  --ink:#E8EDF3;           /* 14.6:1 on surface */
  --ink-2:#B3BECB;         /*  9.0:1 */
  --ink-3:#95A1B0;         /*  6.3:1 */
  --outline:#6E7B8C;
  --outline-2:#2C3643;

  --primary:#2A62B5;       /* button bg role (navy lifted for dark) — onPrimary white */
  --on-primary:#FFFFFF;
  --primary-fg:#7FD3F2;    /* text/icon role on dark = logo-cyan tint */
  --primary-c:#14335E;
  --on-primary-c:#D9E6F7;

  --accent:#FFB840;
  --on-accent:#1F1400;
  --accent-c:#3D2C0C;

  --ok:#5CD08F;  --ok-c:#11321F;  --on-ok-c:#8FE3B2;
  --warn:#F6B850; --warn-c:#3A2A0C; --on-warn-c:#FFD58A;
  --fault:#FF8A80; --fault-c:#3D1614; --on-fault-c:#FFB4AB;
  --info:#4CCBF0; --info-c:#0C3341; --on-info-c:#A6E6F8;

  --shadow:none;
  --shadow-fab:0 4px 12px rgba(0,0,0,.5);
}


/* ===================== Part 2 · web-only additions ===================== */
:root{
  /* layout */
  --page-max:1200px;        /* public pages content width */
  --content-max:1184px;     /* desk content width (1440 - sidebar - gutters) */
  --side-w:256px;           /* desk sidebar (desktop >= 1024px) */
  --top-h:72px;             /* desk top bar */
  --gutter:32px;            /* desktop page gutter */
  --gutter-m:16px;          /* mobile page gutter (fixes edge-to-edge content, audit P6) */
  --bp-tablet:1024px;       /* below: sidebar collapses to bottom nav + More */
  --bp-mobile:600px;

  /* tables (desktop) */
  --row-h:56px;             /* default table row */
  --row-h-compact:48px;     /* dense lists (parts lines, readers) */
  --cell-px:16px;
  --th:600 12.5px/16px var(--ff);

  /* controls */
  --btn-h-desk:44px;        /* pointer UI; mobile keeps --tap 48 / --btn-h 56 */
  --field-h-desk:48px;
  --mnav-h:72px;            /* mobile bottom nav (Today · Customers · Scans · Jobs · More) */
  --mtop-h:64px;

  /* web type additions (same families as the app) */
  --t-hero:700 52px/62px var(--ff);
  --t-hero-m:700 32px/40px var(--ff);
  --t-h1:600 30px/38px var(--ff);
  --t-h2:600 24px/32px var(--ff);

  --hero-bg:linear-gradient(180deg,#E7EEF8 0%,var(--bg) 100%);
  --focus-ring:0 0 0 3px var(--primary-fg);
  --print-ink:#000;
}
html[lang=ar]{ --t-hero:700 46px/66px var(--ff); --t-hero-m:700 30px/46px var(--ff); }
[data-theme="dark"]{
  --hero-bg:linear-gradient(180deg,#0F1E33 0%,var(--bg) 100%);
}
