/* =========================================================
   Najm website themes — the ONLY place theme colours live.

   Every block mirrors a theme users can pick in the Najm app
   (lib/core/theme/app_theme.dart, kSelectableThemeModes), keyed by
   the same enum name. Values are the app's own tokens:

     --t-bg          scaffoldBackgroundColor
     --t-surface     colorScheme.surface (cards)
     --t-ink         colorScheme.onSurface (text)
     --t-muted       colorScheme.onSurfaceVariant (fromSeed-derived)
     --t-line        outlineVariant / divider
     --t-primary     colorScheme.primary      --t-on-primary
     --t-primary-dk  primaryColorDark (header gradient end)
     --t-secondary   colorScheme.secondary    --t-on-secondary
     --t-container   primaryContainer         --t-on-container
     --t-accent      fill-only highlight      --t-on-accent
     --t-cool        the theme's second (cool) accent for routes/links

   Derived roles (fromSeed) were computed with material_color_utilities
   0.13.0 (the package Flutter uses), SchemeTonalSpot / SchemeMonochrome,
   contrast 0. Website-only adaptations are marked "site:" and are listed
   in the theme audit. No other file defines theme colours: styles.css
   only mixes these variables.
   ========================================================= */

:root {
    /* Najm brand constants: the same in every app theme.
       splash_bg / splash_background (android colors.xml), logo gold
       (najm_notification_accent, splash loader), launcher background,
       and NajmDesignTokens status/identity colours. */
    --b-navy: #0F1B3D;
    --b-navy-deep: #0A0E21;
    --b-gold: #D4913A;
    --b-gold-bright: #F4B23E;
    --b-gold-light: #FEDC7B;
    --b-coffee: #5D2E0C;
    --b-blue: #2563EB;          /* statusInProgress */
    /* Home cards (home_selection_cards.dart) — fixed in EVERY app theme:
       domestic = Najm blue, international = Najm amber. */
    --b-card-blue-1: #4A9AFC;
    --b-card-blue-2: #1E75F3;
    --b-card-blue-3: #0050C8;
    --b-card-amber-1: #FDAE21;
    --b-card-amber-2: #E5921D;
    --b-card-amber-3: #B8640A;
    --b-indigo: #3F51B5;        /* tripIdentityColor */
    --b-amber: #B45309;         /* shipmentIdentityColor */
    --b-positive: #16A34A;      /* statusPositive */
    --b-done: #0D9488;          /* statusDone */
    --b-attention: #D97706;     /* statusAttention */
}

/* Desert (صحراء) — the app's default theme (kDefaultThemeMode) and the
   website default. seed #D97706, primary #B15F00, primaryColorDark #894900. */
:root,
[data-theme="desertGold"] {
    --t-bg: #FFFBEB;
    --t-surface: #FFFFFF;
    --t-ink: #451A03;
    --t-muted: #51443B;
    --t-line: #D6C3B6;
    --t-primary: #B15F00;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #894900;
    --t-link: #894900;
    --t-secondary: #745944;        /* derived: coffee brown */
    --t-on-secondary: #FFFFFF;
    --t-container: #FFDCC3;        /* derived */
    --t-on-container: #6C3A07;     /* derived */
    --t-accent: #F4B23E;           /* site: brand gold (splash loader) */
    --t-on-accent: #2A1A12;        /* splash loader ink */
    --t-cool: #1E75F3;             /* site: Najm blue (home domestic card, fixed in all themes) */
    --t-cool-deep: #0050C8;        /* site: Najm deep blue (same card gradient end) */
}

/* Red & Cream (الأحمر والكريمي). seed #E62727, primary #E42526,
   primaryColorDark #B71C1C, surface _creamSurface, bg _cream. */
[data-theme="najmRed"] {
    --t-bg: #F3F2EC;
    --t-surface: #EFECE3;
    --t-ink: #000000;
    --t-muted: #534341;
    --t-line: #DCDCDC;
    --t-primary: #E42526;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #B71C1C;
    --t-link: #B71C1C;
    --t-secondary: #775653;        /* derived */
    --t-on-secondary: #FFFFFF;
    --t-container: #FFDAD6;        /* derived */
    --t-on-container: #73332D;     /* derived */
    --t-accent: #FDDFA6;           /* derived tertiaryContainer */
    --t-on-accent: #000000;
    --t-cool: #1E75F3;             /* site: Najm blue (home domestic card) */
    --t-cool-deep: #0050C8;        /* site: Najm deep blue */
}

/* Blue & Teal (الأزرق والتركوازي). seed/primary #4A70A9, secondary
   #007D93, primaryContainer #8FABD4. primaryColorDark is unset in the
   app, so Flutter uses Colors.blue[700] (#1976D2). */
[data-theme="najmBlue"] {
    --t-bg: #F3F2EC;
    --t-surface: #EFECE3;
    --t-ink: #000000;
    --t-muted: #43474E;
    --t-line: #DCDCDC;
    --t-primary: #4A70A9;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #1976D2;
    --t-link: #3E5F90;             /* site: derived tonal primary (blue[700] is 4.1:1 on cream) */
    --t-secondary: #007D93;
    --t-on-secondary: #FFFFFF;
    --t-container: #8FABD4;
    --t-on-container: #000000;
    --t-accent: #8FABD4;
    --t-on-accent: #000000;
    --t-cool: #007D93;
    --t-cool-deep: #254777;        /* derived onPrimaryContainer */
}

/* Emerald Green (الأخضر الزمردي). primary #0F7B5F, secondary and
   primaryColorDark #0B5E48, mint #34D399 is fill-only with ink text. */
[data-theme="najmEmerald"] {
    --t-bg: #F3F2EC;
    --t-surface: #FFFFFF;
    --t-ink: #17211D;
    --t-muted: #404944;
    --t-line: #DCDCDC;
    --t-primary: #0F7B5F;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #0B5E48;
    --t-link: #0B5E48;
    --t-secondary: #0B5E48;
    --t-on-secondary: #FFFFFF;
    --t-container: #A5F2D4;        /* derived */
    --t-on-container: #00513D;     /* derived */
    --t-accent: #34D399;
    --t-on-accent: #17211D;
    --t-cool: #3F6375;             /* derived tertiary */
    --t-cool-deep: #0B5E48;
}

/* Royal Burgundy (العنابي الملكي). primary #8B1E3F, secondary #6B1530,
   primaryColorDark #5C1129, soft gold #E0B65A fill-only. */
[data-theme="najmBurgundy"] {
    --t-bg: #F3F2EC;
    --t-surface: #FFFFFF;
    --t-ink: #241418;
    --t-muted: #524345;
    --t-line: #DCDCDC;
    --t-primary: #8B1E3F;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #5C1129;
    --t-link: #5C1129;
    --t-secondary: #6B1530;
    --t-on-secondary: #FFFFFF;
    --t-container: #FFD9DE;        /* derived */
    --t-on-container: #713341;     /* derived */
    --t-accent: #E0B65A;
    --t-on-accent: #241418;
    --t-cool: #795832;             /* derived tertiary */
    --t-cool-deep: #5C1129;
}

/* Royal Black (الأسود الملكي). Light theme with black chrome: primary
   #1F1F22, primaryColorDark #0A0A0B, antique gold #7D5F12 carries white
   text, bright gold #C9A227 is fill-only. Monochrome derived roles. */
[data-theme="najmRoyalBlack"] {
    --t-bg: #F5F3EE;
    --t-surface: #FFFFFF;
    --t-ink: #111111;
    --t-muted: #474747;
    --t-line: #DCDCDC;
    --t-primary: #1F1F22;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #0A0A0B;
    --t-link: #0A0A0B;
    --t-secondary: #7D5F12;
    --t-on-secondary: #FFFFFF;
    --t-container: #E8E2D0;        /* site: ivory-gold tint (monochrome #D4D4D4 reads grey) */
    --t-on-container: #3B3B3B;
    --t-accent: #C9A227;
    --t-on-accent: #111111;
    --t-cool: #7D5F12;
    --t-cool-deep: #1F1F22;
}

/* Najm Navy — site: the WEBSITE's default palette (owner brand palette,
   2026-11-09). NOT an app theme: the theme picker labels it "website
   colours"; the app's own default stays Desert (desertGold, isDefault).
   Brand: deep navy #101E35, navy blue #192D49, gold #F3C544, white,
   soft background #F4F6FA. Contrast (WCAG 2.x): ink #101E35 on #F4F6FA
   16.0:1; muted #46546E on #F4F6FA 7.2:1; white on primary #192D49 13.4:1;
   on-accent #101E35 on gold #F3C544 10.9:1. */
[data-theme="najmNavy"] {
    --t-bg: #F4F6FA;
    --t-surface: #FFFFFF;
    --t-ink: #101E35;
    --t-muted: #46546E;
    --t-line: #D9DFEA;
    --t-primary: #192D49;
    --t-on-primary: #FFFFFF;
    --t-primary-dk: #101E35;
    --t-link: #192D49;
    --t-secondary: #2D4A72;
    --t-on-secondary: #FFFFFF;
    --t-container: #E6EBF4;
    --t-on-container: #101E35;
    --t-accent: #F3C544;
    --t-on-accent: #101E35;
    --t-cool: #1E75F3;
    --t-cool-deep: #0050C8;
}
