/* ------------------------------------------------------------------------
   Design tokens — الأثير للتطوير الصناعي
   Brand seed matches the previous Flutter build (ColorScheme.fromSeed
   0xFF0B5FA5) so the new interface reads as the same product, just with a
   more considered visual system on top.
   ------------------------------------------------------------------------ */

:root {
  /* Brand */
  --color-primary: #0b5fa5;
  --color-primary-600: #094a82;
  --color-primary-700: #073a67;
  --color-primary-100: #e3f0fb;
  --color-primary-50: #f2f8fd;
  --color-on-primary: #ffffff;

  /* Semantic (kept identical to the values already carried by order/
     notification data from the backend, so status colors don't drift) */
  --color-success: #2e7d32;
  --color-success-100: #e8f5e9;
  --color-info: #1565c0;
  --color-info-100: #e3f0fb;
  --color-danger: #c62828;
  --color-danger-100: #fdecea;
  --color-warning: #b26a00;
  --color-warning-100: #fff3e0;
  --color-neutral: #616161;

  /* Surfaces (light) */
  --bg-app: #f4f7fb;
  --bg-surface: #ffffff;
  --bg-surface-raised: #ffffff;
  --bg-surface-muted: #eef2f7;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Text (light) */
  --text-primary: #14202b;
  --text-secondary: #56636f;
  --text-tertiary: #8a97a3;
  --text-on-primary: #ffffff;
  --text-disabled: #b0b9c2;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20, 32, 43, 0.06), 0 1px 1px rgba(20, 32, 43, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 32, 43, 0.08), 0 2px 4px rgba(20, 32, 43, 0.04);
  --shadow-lg: 0 12px 32px rgba(20, 32, 43, 0.12), 0 4px 10px rgba(20, 32, 43, 0.06);
  --shadow-primary: 0 8px 20px rgba(11, 95, 165, 0.28);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Type */
  --font-family: "Cairo", "Tajawal", -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-base: 15px;
  --fs-md: 16.5px;
  --fs-lg: 19px;
  --fs-xl: 23px;
  --fs-2xl: 28px;

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-app: #0e1620;
    --bg-surface: #16202c;
    --bg-surface-raised: #1c2836;
    --bg-surface-muted: #1a2530;
    --border-subtle: #263342;
    --border-strong: #34455a;

    --text-primary: #eef2f7;
    --text-secondary: #a9b6c2;
    --text-tertiary: #7c8996;
    --text-disabled: #4c5866;

    --color-primary-100: #16324a;
    --color-primary-50: #10263a;
    --color-success-100: #143122;
    --color-info-100: #122c47;
    --color-danger-100: #3a1616;
    --color-warning-100: #3a2810;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.5);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg-app: #0e1620;
  --bg-surface: #16202c;
  --bg-surface-raised: #1c2836;
  --bg-surface-muted: #1a2530;
  --border-subtle: #263342;
  --border-strong: #34455a;

  --text-primary: #eef2f7;
  --text-secondary: #a9b6c2;
  --text-tertiary: #7c8996;
  --text-disabled: #4c5866;

  --color-primary-100: #16324a;
  --color-primary-50: #10263a;
  --color-success-100: #143122;
  --color-info-100: #122c47;
  --color-danger-100: #3a1616;
  --color-warning-100: #3a2810;

  color-scheme: dark;
}
