/* SBA design tokens. GENERATED by scripts/build_tokens.py - do not edit by hand.
   Brand seeds: orange #C97B34, gray #484C54.
   Only --sba-orange and --sba-gray are official brand colours. Every other
   colour below is derived from them and verified for WCAG AA contrast. */

@font-face { font-family: "Sharjah"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/Sharjah-Regular.woff2") format("woff2"), url("../fonts/Sharjah-Regular.ttf") format("truetype"); }
@font-face { font-family: "Sharjah"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/Sharjah-Bold.woff2") format("woff2"), url("../fonts/Sharjah-Bold.ttf") format("truetype"); }

:root {
  color-scheme: light;
  /* ---- Brand (official) ---- */
  --sba-orange: #C97B34;
  --sba-gray: #484C54;

  /* ---- Ramps (derived). Use roles below in components, not ramp steps. ---- */
  --orange-50: #FFF5ED;
  --orange-100: #FFE9D9;
  --orange-200: #FED3B1;
  --orange-300: #F8B681;
  --orange-400: #E59958;
  --orange-500: #C97B34;
  --orange-600: #B06416;
  --orange-700: #945101;
  --orange-800: #733D00;
  --orange-900: #532A00;
  --neutral-0: #FFFFFF;
  --neutral-25: #F9FAFD;
  --neutral-50: #F4F5F8;
  --neutral-100: #EBEDEF;
  --neutral-200: #DBDEE4;
  --neutral-300: #C4C7CD;
  --neutral-400: #A2A5AA;
  --neutral-500: #7E8085;
  --neutral-600: #5F636C;
  --neutral-700: #484C54;
  --neutral-800: #2F333A;
  --neutral-900: #1D2027;
  --neutral-950: #11141A;

  /* ---- Colour roles, light ---- */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-sunken: #F4F5F8;
  --surface-raised: #FFFFFF;
  --surface-hover: #F4F5F8;
  --surface-selected: #FFF5ED;
  --surface-muted: #EBEDEF;
  --surface-muted-strong: #DBDEE4;
  --text: #484C54;
  --text-secondary: #6B6F78;
  --text-disabled: #A2A5AA;
  --text-inverse: #FFFFFF;
  --border: #DBDEE4;
  --border-strong: #898D94;
  --accent: #C97B34;
  --accent-soft: #FFF5ED;
  --accent-soft-border: #FED3B1;
  --on-accent-soft: #733D00;
  --action: #A75C05;
  --action-hover: #955105;
  --action-pressed: #854804;
  --on-action: #FFFFFF;
  --link: #A75C05;
  --focus-ring: #A75C05;
  --scrim: rgb(20 22 26 / 0.48);
  --glass-bg: rgb(255 255 255 / 0.78);
  --glass-bg-thick: rgb(255 255 255 / 0.9);
  --glass-border: rgb(72 76 84 / 0.14);
  --glass-highlight: rgb(255 255 255 / 0.7);
  --success: #208548;
  --success-soft: #E5F8E9;
  --success-border: #B2DEBC;
  --on-success-soft: #1E7640;
  --danger: #D53D38;
  --danger-soft: #FFEEEC;
  --danger-border: #FEBFB7;
  --on-danger-soft: #B02A27;
  --warning: #8D7207;
  --warning-soft: #F9F2DF;
  --warning-border: #DFD0A5;
  --on-warning-soft: #786102;
  --info: #2879BD;
  --info-soft: #E9F4FF;
  --info-border: #B0D6FA;
  --on-info-soft: #1F67A2;

  /* ---- Chart colours, in order of use (derived after the first two) ---- */
  --chart-1: #484C54;
  --chart-2: #C97B34;
  --chart-3: #289DA9;
  --chart-4: #678FDA;
  --chart-5: #C276A2;
  --chart-6: #6F9C55;

  /* ---- Type. The Sharjah typeface has two weights only: 400 and 700. ---- */
  --font-sans: "Sharjah", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  --font-numeric: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif; /* tabular figures, numeric table cells only */
  --weight-regular: 400;
  --weight-bold: 700;

  /* The three largest sizes are fluid: they shrink on narrow windows and stop
     at the stated maximum. The rem part keeps them responsive to text zoom. */
  --text-display: clamp(2rem, 1.5rem + 2vw, 2.75rem);     /* 32 to 44px  page-level statement, once per screen at most */
  --text-h1: clamp(1.5rem, 1.25rem + 1vw, 2rem);          /* 24 to 32px  page title */
  --text-h2: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);     /* 20 to 24px  section title */
  --text-h3: 1.25rem;        /* 20px  group title */
  --text-lead: 1.125rem;     /* 18px  introductory paragraph */
  --text-body: 1rem;         /* 16px  default */
  --text-small: 0.875rem;    /* 14px  secondary text, table cells, labels */
  --text-caption: 0.75rem;   /* 12px  minimum size anywhere */

  --leading-tight: 1.25;     /* display and titles */
  --leading-snug: 1.4;       /* h3, controls, table rows */
  --leading-body: 1.6;       /* Latin running text */
  --leading-body-ar: 1.8;    /* Arabic running text */
  --measure: 68ch;           /* maximum line length for running text */

  /* ---- Space: 4px base. Use only these steps. ---- */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;  --space-4: 1rem;
  --space-5: 1.25rem;  --space-6: 1.5rem;  --space-8: 2rem;     --space-10: 2.5rem;
  --space-12: 3rem;    --space-16: 4rem;   --space-20: 5rem;    --space-24: 6rem;

  /* ---- Size ---- */
  --control-sm: 2rem;        /* 32px  dense tools, pointer only */
  --control-md: 2.5rem;      /* 40px  default */
  --control-lg: 3rem;        /* 48px  touch-first and primary actions on mobile */
  --target-min: 2.75rem;     /* 44px  minimum hit area on touch */
  --icon-sm: 1rem;  --icon-md: 1.25rem;  --icon-lg: 1.5rem;
  --content-max: 75rem;      /* 1200px */
  --page-gutter: clamp(1rem, 0.25rem + 3vw, 2rem);   /* page side padding, 16 to 32px */
  --topbar-height: 5rem;     /* twice the logo height: gives the logo its clear space */
  --sidebar-width: 16.5rem;  /* side navigation, expanded windows and wider */
  --rail-width: 5rem;        /* navigation rail, medium windows */
  --bottombar-height: 4rem;  /* bottom navigation, compact windows */

  /* ---- Frosted glass (navigation layer only). Tints are in the colour roles. ---- */
  --glass-blur: 20px;
  --glass-saturate: 1.6;
  --scrim-blur: 6px;

  /* ---- Shape. Nested corners are concentric: inner = outer - padding. ---- */
  --radius-xs: 4px;   /* checkboxes, tags */
  --radius-sm: 8px;   /* buttons, inputs */
  --radius-md: 12px;  /* cards, panels, menus */
  --radius-lg: 16px;  /* dialogs, sheets */
  --radius-full: 999px; /* avatars, status dots, switches only */

  /* ---- Elevation. Borders separate; shadows only lift things off the page. ---- */
  --shadow-1: 0 1px 2px rgb(20 22 26 / 0.06), 0 1px 1px rgb(20 22 26 / 0.04);
  --shadow-2: 0 4px 12px rgb(20 22 26 / 0.08), 0 1px 3px rgb(20 22 26 / 0.06);
  --shadow-3: 0 16px 40px rgb(20 22 26 / 0.16), 0 4px 12px rgb(20 22 26 / 0.08);

  /* ---- Motion ---- */
  --duration-fast: 100ms;    /* hover, press, focus */
  --duration-base: 200ms;    /* toggles, menus, tabs */
  --duration-slow: 300ms;    /* dialogs, drawers, page-level change */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0, 0, 0, 1);
  --ease-exit: cubic-bezier(0.3, 0, 1, 1);

  /* ---- State layers: an overlay of the content colour on any surface. ---- */
  --state-hover: 0.08;
  --state-pressed: 0.12;
  --opacity-disabled: 0.45;

  /* ---- Layers ---- */
  --z-sticky: 100;  --z-dropdown: 200;  --z-overlay: 300;  --z-dialog: 400;  --z-toast: 500;

  /* Breakpoints (custom properties cannot be used in media queries; use the values):
     compact < 600px | medium 600-839px | expanded 840-1199px | large 1200-1599px | extra-large >= 1600px */
}

@media (max-width: 599.98px) { :root { --topbar-height: 4rem; } }

/* Dark theme: opt in with data-theme="dark" on <html>. Offer it only when asked for. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11141A;
  --surface: #1D2027;
  --surface-sunken: #11141A;
  --surface-raised: #2F333A;
  --surface-hover: #2F333A;
  --surface-selected: #43260C;
  --surface-muted: #2F333A;
  --surface-muted-strong: #484C54;
  --text: #F4F5F8;
  --text-secondary: #999CA1;
  --text-disabled: #5F636C;
  --text-inverse: #11141A;
  --border: #2F333A;
  --border-strong: #797D84;
  --accent: #C97B34;
  --accent-soft: #43260C;
  --accent-soft-border: #6C421D;
  --on-accent-soft: #E9B083;
  --action: #C97B34;
  --action-hover: #E59958;
  --action-pressed: #F8B681;
  --on-action: #11141A;
  --link: #D38C50;
  --focus-ring: #E59958;
  --scrim: rgb(0 0 0 / 0.6);
  --glass-bg: rgb(29 32 39 / 0.72);
  --glass-bg-thick: rgb(29 32 39 / 0.88);
  --glass-border: rgb(255 255 255 / 0.12);
  --glass-highlight: rgb(255 255 255 / 0.06);
  --success: #66B27C;
  --success-soft: #13361F;
  --success-border: #285937;
  --on-success-soft: #98CDA5;
  --danger: #F67469;
  --danger-soft: #511815;
  --danger-border: #802E29;
  --on-danger-soft: #FFA196;
  --warning: #B59C4F;
  --warning-soft: #382D08;
  --warning-border: #5B4C18;
  --on-warning-soft: #CEBD88;
  --info: #64A4E0;
  --info-soft: #13304A;
  --info-border: #275075;
  --on-info-soft: #96C3EE;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-2: 0 4px 12px rgb(0 0 0 / 0.5);
  --shadow-3: 0 16px 40px rgb(0 0 0 / 0.6);
}
