/* MSA Portal 2.0 design tokens: copied from the approved prototype (src/styles/index.css, "Oasis tokens §4").
   Do not edit values here without design approval. Dark values apply to [data-theme="dark"] on <html> or on any
   subtree (the Overview, hubs, menu and sign-in are always dark). */

/* ───────────────────────── Oasis tokens (§4) ───────────────────────── */
:root {
  color-scheme: light;
  --accent: #1E6B4E;
  --accent-hover: #185A41;
  --accent-soft: #E3F1EA;
  --on-accent: #FFFFFF;
  --gold: #B8862B;
  --gold-text: #8C6418; /* AA on light for small gold text */
  --gold-soft: #F6EDD9;
  --brand-red: #BE1E2D;

  --bg: #F6F4EF;
  --bg-elevated: #FFFFFF;
  --bg-grouped: #EFECE5;
  --separator: rgba(60, 50, 30, 0.12);
  --separator-strong: rgba(60, 50, 30, 0.22);
  --label: #1B1D1B;
  --label-secondary: #5F625D;
  --label-tertiary: #8B8E87;
  --fill: rgba(120, 110, 90, 0.12);
  --fill-strong: rgba(120, 110, 90, 0.2);

  /* Status colours (never colour alone: always pair with an icon or label) */
  --positive: #2E8B57;
  --info: #2F6FB2;
  --warning: #C77C0E;
  --attention: #B4572A;
  --critical: #BE1E2D;
  --neutral: #7A7D77;
  /* text-safe variants (≥4.5:1 on elevated) */
  --positive-text: #23704A;
  --info-text: #2A64A1;
  --warning-text: #925A08;
  --attention-text: #9A4A23;
  --critical-text: #B01B29;
  --neutral-text: #5F625D;

  /* Chart palette */
  --c1: #1E6B4E; --c2: #B8862B; --c3: #2F6FB2; --c4: #C2603A;
  --c5: #6E5BA8; --c6: #3E9AA6; --c7: #8A9A3B; --c8: #A0577A;
  --seq-0: #EAF4EE; --seq-1: #1E6B4E;
  --div-neg: #BE1E2D; --div-mid: #F2EFE8; --div-pos: #1E6B4E;

  /* Liquid Glass (navigation & control layer only) */
  --glass-tint: color-mix(in oklab, var(--bg-elevated) 72%, transparent);
  --glass-edge: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px rgba(40, 30, 10, 0.10), 0 1px 2px rgba(40, 30, 10, 0.06);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --scrim: rgba(20, 18, 12, 0.32);

  /* Type */
  --font-latin: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-arabic: "SF Arabic", "IBM Plex Sans Arabic", "Noto Sans Arabic", -apple-system, "Segoe UI", sans-serif;
  --ar-bump: 0px;

  /* Radii (card 16, controls 10, sheets 20, pills fully rounded) */
  --radius-card: 16px;
  --radius-ctl: 10px;
  --radius-sheet: 20px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --accent: #3FB68B;
  --accent-hover: #5BC9A0;
  --accent-soft: #163A2D;
  --on-accent: #06140E;
  --gold: #D9A949;
  --gold-text: #D9A949;
  --gold-soft: #3A2E14;
  --brand-red: #E5484D;

  --bg: #0F1110;
  --bg-elevated: #191C1A;
  --bg-grouped: #202421;
  --separator: rgba(255, 255, 255, 0.10);
  --separator-strong: rgba(255, 255, 255, 0.18);
  --label: #F2F1EC;
  --label-secondary: #A9ADA6;
  --label-tertiary: #6F736C;
  --fill: rgba(200, 200, 190, 0.14);
  --fill-strong: rgba(200, 200, 190, 0.22);

  --positive: #4CC38A;
  --info: #5A9BE0;
  --warning: #F0A43A;
  --attention: #E07A4C;
  --critical: #E5484D;
  --neutral: #8E928B;
  --positive-text: #4CC38A;
  --info-text: #6EA8E6;
  --warning-text: #F0A43A;
  --attention-text: #E8875C;
  --critical-text: #F06A6E;
  --neutral-text: #A9ADA6;

  --c1: #3FB68B; --c2: #D9A949; --c3: #5A9BE0; --c4: #E0835F;
  --c5: #9A88D6; --c6: #5EC0CC; --c7: #B2C25A; --c8: #CC7BA1;
  --seq-0: #18241E; --seq-1: #3FB68B;
  --div-neg: #E5484D; --div-mid: #2A2D2B; --div-pos: #3FB68B;

  --glass-tint: color-mix(in oklab, var(--bg-elevated) 68%, transparent);
  --glass-edge: rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  --card-shadow: none;
  --scrim: rgba(0, 0, 0, 0.5);
}

[dir="rtl"] { --ar-bump: 2px; }

@media (prefers-contrast: more) {
  :root { --separator: rgba(60, 50, 30, 0.35); --label-secondary: #464943; --glass-tint: var(--bg-elevated); }
  [data-theme="dark"] { --separator: rgba(255, 255, 255, 0.3); --label-secondary: #C8CBC4; --glass-tint: var(--bg-elevated); }
}
