/* ═══════════════════════════════════════════════════════════════
   Aviation Ground Service — Dual Theme Bundle
   Provides .dark and .fresh-tech theme overrides for runtime switching.
   Pages should load their primary token file plus this bundle, then
   toggle the <html> class between "dark" and "fresh-tech".
   ═══════════════════════════════════════════════════════════════ */

/* ── Dark theme override: space gray, single blue accent (Apple-grade neutral) ── */
.dark {
  /* surfaces: neutral space gray, no blue tint */
  --color-background: #1D1D1F;
  --color-foreground: #F5F5F7;
  --color-surface: #2C2C2E;
  --color-surface-dim: #242426;
  --color-surface-variant: #3A3A3C;
  --color-surface-container: #2C2C2E;
  --color-surface-container-low: #262628;
  --color-surface-container-high: #3A3A3C;
  --color-surface-container-highest: #48484A;
  --color-card: #2C2C2E;
  --color-card-foreground: #F5F5F7;
  --color-sidebar: #1D1D1F;
  --color-sidebar-foreground: #F5F5F7;
  --color-muted: #3A3A3C;
  --color-muted-foreground: #98989D;
  --color-input: #3A3A3C;
  --color-border: rgba(255, 255, 255, 0.12);
  --color-outline: rgba(255, 255, 255, 0.16);
  --color-outline-variant: rgba(255, 255, 255, 0.08);

  /* brand: single Apple link-blue accent */
  --color-primary: #2997FF;
  --color-primary-hover: #4DA6FF;
  --color-primary-click: #1A7FE0;
  --color-primary-bg: rgba(41, 151, 255, 0.14);
  --color-primary-tag-bg: rgba(41, 151, 255, 0.18);
  --color-ring: rgba(41, 151, 255, 0.55);

  /* brand aliases consumed by Tailwind @theme mapping and legacy refs —
     keep on the same hue so no second blue can leak in */
  --primary: #2997FF;
  --primary-accent: #2997FF;
  --primary-accent-hover: #4DA6FF;
  --primary-link: #2997FF;
  --primary-ring: #2997FF;
  --color-sidebar-accent: rgba(41, 151, 255, 0.14);
  --color-sidebar-accent-foreground: #2997FF;
  --state-hover: rgba(41, 151, 255, 0.08);
  --state-focus: rgba(41, 151, 255, 0.12);
  --state-press: rgba(41, 151, 255, 0.16);
  --state-drag: rgba(41, 151, 255, 0.16);

  /* accent: unified with primary — no second hue */
  --color-accent: #2997FF;
  --color-accent-hover: #4DA6FF;
  --color-accent-foreground: #FFFFFF;
  --color-accent-bg: rgba(41, 151, 255, 0.14);

  /* status: Apple dark system colors */
  --color-success: #30D158;
  --color-success-bg: rgba(48, 209, 88, 0.14);
  --color-warning: #FF9F0A;
  --color-warning-bg: rgba(255, 159, 10, 0.14);
  --color-danger: #FF453A;
  --color-danger-bg: rgba(255, 69, 58, 0.14);

  /* text: neutral ladder */
  --color-text-primary: #F5F5F7;
  --color-text-secondary: #D1D1D6;
  --color-text-tertiary: #98989D;
  --color-text-disabled: #636366;
  --color-text-placeholder: #636366;
  --color-white: #F5F5F7;

  /* shorthands */
  --bg-white: #2C2C2E;
  --bg-4: #1D1D1F;
  --bg-7: #1D1D1F;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-subtle: #242426;
  --border-1: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.12);
  --border-3: rgba(255, 255, 255, 0.16);
  --text-1: #F5F5F7;
  --text-2: #D1D1D6;
  --text-3: #98989D;
  --text-disabled: #636366;
  --primary-hover: #4DA6FF;
  --primary-active: #1A7FE0;
  --success-hover: #4BD96D;
  --warning-hover: #FFB340;
  --danger-hover: #FF6961;

  /* shadows: soft on neutral dark */
  --shadow-1: 0px 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-2: 0px 2px 8px rgba(0, 0, 0, 0.22);
  --shadow-3: 0px 5px 16px rgba(0, 0, 0, 0.26);
  --shadow-4: 0px 15px 35px -2px rgba(0, 0, 0, 0.30);
  --shadow-5: 0px 24px 48px -4px rgba(0, 0, 0, 0.34);

  /* gradients: flattened — premium, not flashy */
  --gradient-hero: linear-gradient(135deg, rgba(41, 151, 255, 0.08) 0%, rgba(41, 151, 255, 0) 100%);
  --gradient-card: none;
  --gradient-sidebar: #1D1D1F;

  /* chart palette: Apple dark system hues */
  --chart-1: #2997FF;
  --chart-2: #64D2FF;
  --chart-3: #FF9F0A;
  --chart-4: #FF453A;
  --chart-5: #BF5AF2;

  /* radius: one card language across both themes — 12px, rounded-xl follows */
  --radius-xl: 12px;
}

/* ── Fresh tech theme override: Apple gray #F5F5F7 + single blue accent ── */
.fresh-tech {
  /* surfaces: signature Apple light gray page, pure white cards */
  --color-background: #F5F5F7;
  --color-foreground: #1D1D1F;
  --color-surface: #FFFFFF;
  --color-surface-dim: #F0F0F2;
  --color-surface-variant: #E8E8EA;
  --color-surface-container: #F5F5F7;
  --color-surface-container-low: #FFFFFF;
  --color-surface-container-high: #FFFFFF;
  --color-surface-container-highest: #FFFFFF;
  --color-card: #FFFFFF;
  --color-card-foreground: #1D1D1F;
  --color-sidebar: #FFFFFF;
  --color-sidebar-foreground: #515154;
  --color-muted: #E8E8EA;
  --color-muted-foreground: #6E6E73;
  --color-input: #FFFFFF;
  --color-border: #E5E5EA;
  --color-outline: #D2D2D7;
  --color-outline-variant: #F0F0F2;

  /* brand: Apple button blue, single accent */
  --color-primary: #0071E3;
  --color-primary-hover: #0077ED;
  --color-primary-click: #0060C0;
  --color-primary-bg: rgba(0, 113, 227, 0.10);
  --color-primary-tag-bg: rgba(0, 113, 227, 0.12);
  --color-ring: rgba(0, 113, 227, 0.35);

  /* brand aliases consumed by Tailwind @theme mapping and legacy refs —
     merged token file only sets these at :root (#2B8AFF), so pin them here
     to keep one single blue across utilities, sidebar and states */
  --primary: #0071E3;
  --primary-accent: #0071E3;
  --primary-accent-hover: #0077ED;
  --primary-link: #0071E3;
  --primary-ring: #0071E3;
  --color-sidebar-accent: rgba(0, 113, 227, 0.08);
  --color-sidebar-accent-foreground: #0071E3;
  --state-hover: rgba(0, 113, 227, 0.06);
  --state-focus: rgba(0, 113, 227, 0.10);
  --state-press: rgba(0, 113, 227, 0.14);
  --state-drag: rgba(0, 113, 227, 0.14);

  /* accent: unified with primary — no second hue */
  --color-accent: #0071E3;
  --color-accent-hover: #0077ED;
  --color-accent-foreground: #FFFFFF;
  --color-accent-bg: rgba(0, 113, 227, 0.10);

  /* status: Apple light system colors */
  --color-success: #34C759;
  --color-success-bg: rgba(52, 199, 89, 0.10);
  --color-warning: #FF9500;
  --color-warning-bg: rgba(255, 149, 0, 0.10);
  --color-danger: #FF3B30;
  --color-danger-bg: rgba(255, 59, 48, 0.10);

  /* text: Apple neutral ladder */
  --color-text-primary: #1D1D1F;
  --color-text-secondary: #515154;
  --color-text-tertiary: #6E6E73;
  --color-text-disabled: #8E8E93;
  --color-text-placeholder: #8E8E93;
  --color-white: #FFFFFF;

  /* shorthands */
  --bg-white: #FFFFFF;
  --bg-4: #F5F5F7;
  --bg-7: #EBEBED;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-subtle: #F0F0F2;
  --border-1: #EEEEEF;
  --border-2: #E5E5EA;
  --border-3: #D2D2D7;
  --text-1: #1D1D1F;
  --text-2: #515154;
  --text-3: #6E6E73;
  --text-disabled: #8E8E93;
  --primary-hover: #0077ED;
  --primary-active: #0060C0;
  --success-hover: #2FB350;
  --warning-hover: #E08600;
  --danger-hover: #E0342B;

  /* shadows: visible layered scale on the gray page — cards must lift off #F5F5F7 */
  --shadow-1: 0px 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-2: 0px 1px 2px rgba(15, 23, 42, 0.06), 0px 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-3: 0px 2px 4px rgba(15, 23, 42, 0.06), 0px 6px 16px rgba(15, 23, 42, 0.10);
  --shadow-4: 0px 4px 8px rgba(15, 23, 42, 0.06), 0px 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-5: 0px 6px 12px rgba(15, 23, 42, 0.08), 0px 20px 44px rgba(15, 23, 42, 0.14);

  /* gradients: cards get a real fill (pure white) so they read as surfaces */
  --gradient-hero: linear-gradient(135deg, rgba(0, 113, 227, 0.05) 0%, rgba(0, 113, 227, 0) 100%);
  --gradient-card: #FFFFFF;
  --gradient-sidebar: #FFFFFF;
  --gradient-button: linear-gradient(135deg, #0071E3 0%, #0071E3 100%);
  --gradient-button-hover: linear-gradient(135deg, #0077ED 0%, #0077ED 100%);
  --gradient-accent-bar: linear-gradient(180deg, #0071E3 0%, #0071E3 100%);

  /* chart palette: Apple light system hues */
  --chart-1: #0071E3;
  --chart-2: #5AC8FA;
  --chart-3: #FF9500;
  --chart-4: #FF3B30;
  --chart-5: #AF52DE;

  /* radius: one card language across both themes — 12px, rounded-xl follows */
  --radius-xl: 12px;

  /* typography: larger scale with a real hierarchy; KPI/display sit at 28-32px */
  --font-size-display: 32px;
  --line-height-display: 40px;
  --font-size-h1: 28px;
  --line-height-h1: 36px;
  --font-size-h2: 20px;
  --line-height-h2: 28px;
  --font-size-h3: 17px;
  --line-height-h3: 25px;
  --font-size-h4: 15px;
  --line-height-h4: 22px;
  --font-size-body: 13px;
  --line-height-body: 21px;
  --font-size-lead: 14px;
  --line-height-lead: 23px;
  --font-size-caption: 11px;
  --line-height-caption: 17px;
  --font-size-eyebrow: 11px;
  --line-height-eyebrow: 16px;
  --font-size-mono: 13px;
  --line-height-mono: 20px;
  --font-size-price: 28px;
  --line-height-price: 36px;
  --type-display-sm: 32px;
  --type-heading-sm: 15px;
  --type-body-md: 13px;
  --type-body-sm: 11px;
  --font-weight-bold: 700;
}

/* ── Fresh tech refinement: tabular numerals so KPI / 数据列对齐跳动消失 ── */
.fresh-tech .type-display,
.fresh-tech .type-h1,
.fresh-tech .type-h2,
.fresh-tech .type-price,
.fresh-tech .type-mono {
  font-variant-numeric: tabular-nums;
}
