/* ============================================================
   Design System Engine 2 — Bundle: apple.dark
   Auto-generated by build-theme.js — DO NOT EDIT
   Includes: tokens + components in one file
   Usage: copy into GAS Styles.html or inline in <style>
   Set data-theme="apple" data-mode="dark" on <html> element
   ============================================================ */
[data-theme="apple"] {
  --color-primary: #0066CC;
  --color-primary-hover: #0054A8;
  --color-on-primary: #ffffff;
  --color-background: #F2F2F7;
  --color-surface: #ffffff;
  --color-surface2: #E5E5EA;
  --color-surface3: #C7C7CC;
  --color-border: #C6C6CB;
  --color-text-primary: #1c1c1e;
  --color-text-secondary: #6D6D72;
  --color-text-muted: #606063;
  --color-success: #1e7e34;
  --color-on-success: #ffffff;
  --color-warning: #f9ab00;
  --color-on-warning: #1f1f1f;
  --color-error: #d32f2f;
  --color-on-error: #ffffff;
  --color-success-soft: rgba(52,199,89,.12);
  --color-warn-soft: rgba(255,159,10,.12);
  --color-error-soft: rgba(255,59,48,.12);
  --color-info-soft: rgba(0,122,255,.12);
  --color-chart1: #007aff;
  --color-chart2: #34c759;
  --color-chart3: #ff9f0a;
  --color-chart4: #ff3b30;
  --color-chart5: #af52de;
  --color-chart6: #5ac8fa;
  --color-chart-heat: 0, 122, 255;
  --color-chart-heat-color: #007aff;
  --color-focus-ring: 0 0 0 4px rgba(0,122,255,.20);
  --color-glass-bg: rgba(255,255,255,0.72);
  --color-glass-border: rgba(255,255,255,0.30);
  --color-accent: #1a73e8;
  --color-accent-hover: #1666c1;
  --color-accent-soft: rgba(26,115,232,.14);
  --color-surface-inverse: #1f1f1f;
  --color-on-surface-inverse: #ffffff;
  --color-border-on-dark: rgba(255,255,255,.14);
  --spacing-xs: 4px;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --typography-font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  --typography-font-size-base: 16px;
  --typography-heading-font-size: 24px;
  --typography-heading-font-weight: 600;
  --typography-heading-letter-spacing: -0.4px;
  --typography-button-font-weight: 500;
  --typography-label-font-weight: 500;
  --typography-font-size-small: 12px;
  --typography-font-size-display: 48px;
  --typography-font-size-h1: 32px;
  --typography-font-size-h2: 24px;
  --typography-font-size-h3: 20px;
  --typography-font-size-lead: 18px;
  --typography-font-size-kpi-value: 36px;
  --motion-dur1: 120ms;
  --motion-dur2: 250ms;
  --motion-dur3: 320ms;
  --motion-dur4: 400ms;
  --motion-ease-out: cubic-bezier(0.25,0.46,0.45,0.94);
  --motion-ease-in-out: cubic-bezier(0.45,0,0.55,1);
  --page-bg: #F2F2F7;
  --page-section-gap: 32px;
  --button-bg: #0066CC;
  --button-text: #ffffff;
  --button-hover-bg: #0054A8;
  --button-disabled-bg: #ffffff;
  --button-disabled-text: #6D6D72;
  --button-radius: 12px;
  --button-padding-y: 10px;
  --button-padding-x: 20px;
  --button-font-weight: 500;
  --button-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --card-bg: #ffffff;
  --card-padding: 20px;
  --card-radius: 18px;
  --card-border-color: #C6C6CB;
  --card-shadow: 0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --text-primary: #1c1c1e;
  --text-secondary: #6D6D72;
  --text-muted: #606063;
  --surface-bg: #ffffff;
  --surface-bg2: #E5E5EA;
  --surface-bg3: #C7C7CC;
  --heading-color: #1c1c1e;
  --heading-font-size: 24px;
  --heading-font-weight: 600;
  --heading-letter-spacing: -0.4px;
  --input-bg: #F2F2F7;
  --input-text: #1c1c1e;
  --input-border: #C6C6CB;
  --input-radius: 8px;
  --input-padding: 10px;
  --input-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --label-color: #1c1c1e;
  --label-font-size: 16px;
  --label-font-weight: 500;
  --select-bg: #F2F2F7;
  --select-text: #1c1c1e;
  --select-border: #C6C6CB;
  --select-radius: 8px;
  --select-padding: 10px;
  --select-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --table-header-bg: #ffffff;
  --table-header-text: #1c1c1e;
  --table-border-color: #C6C6CB;
  --table-cell-padding: 10px;
  --table-row-hover-bg: #ffffff;
  --badge-radius: 8px;
  --badge-padding-y: 4px;
  --badge-padding-x: 10px;
  --badge-font-size: 12px;
  --badge-font-weight: 500;
  --badge-success-bg: #1e7e34;
  --badge-success-text: #ffffff;
  --badge-warning-bg: #f9ab00;
  --badge-warning-text: #1f1f1f;
  --badge-error-bg: #d32f2f;
  --badge-error-text: #ffffff;
  --badge-neutral-bg: #ffffff;
  --badge-neutral-text: #6D6D72;
  --nav-bg: #ffffff;
  --nav-text: #1c1c1e;
  --nav-brand-color: #0066CC;
  --nav-border-color: #C6C6CB;
  --nav-padding-y: 10px;
  --nav-padding-x: 20px;
  --layout-bg: #F2F2F7;
  --layout-sidebar-bg: #ffffff;
  --layout-sidebar-border-color: #C6C6CB;
  --layout-sidebar-text: #1c1c1e;
  --layout-sidebar-active-text: #0066CC;
  --textarea-bg: #F2F2F7;
  --textarea-text: #1c1c1e;
  --textarea-border: #C6C6CB;
  --textarea-radius: 8px;
  --textarea-padding: 10px;
  --textarea-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --checkbox-border: #C6C6CB;
  --checkbox-checked-bg: #0066CC;
  --checkbox-checked-border: #0066CC;
  --checkbox-check-color: #ffffff;
  --checkbox-radius: 8px;
  --checkbox-size: 20px;
  --alert-radius: 8px;
  --alert-padding-y: 10px;
  --alert-padding-x: 20px;
  --alert-success-bg: #1e7e34;
  --alert-success-text: #ffffff;
  --alert-warning-bg: #f9ab00;
  --alert-warning-text: #1f1f1f;
  --alert-error-bg: #d32f2f;
  --alert-error-text: #ffffff;
  --alert-info-bg: #ffffff;
  --alert-info-text: #1c1c1e;
  --alert-info-border: #C6C6CB;
  --pagination-item-bg: #F2F2F7;
  --pagination-item-text: #1c1c1e;
  --pagination-item-border: #C6C6CB;
  --pagination-item-radius: 8px;
  --pagination-item-padding-y: 4px;
  --pagination-item-padding-x: 10px;
  --pagination-active-bg: #0066CC;
  --pagination-active-text: #ffffff;
  --pagination-active-border: #0066CC;
  --status-success-soft: rgba(52,199,89,.12);
  --status-warn-soft: rgba(255,159,10,.12);
  --status-error-soft: rgba(255,59,48,.12);
  --status-info-soft: rgba(0,122,255,.12);
  --chart-color1: #007aff;
  --chart-color2: #34c759;
  --chart-color3: #ff9f0a;
  --chart-color4: #ff3b30;
  --chart-color5: #af52de;
  --chart-color6: #5ac8fa;
  --chart-heat: 0, 122, 255;
  --chart-heat-color: #007aff;
  --chart-grid: #C6C6CB;
  --chart-axis: #606063;
  --chart-padding: 20px;
  --chart-gap: 10px;
  --chart-radius: 8px;
  --glass-bg: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.30);
  --focus-ring: 0 0 0 4px rgba(0,122,255,.20);
  --animation-duration-fast: 120ms;
  --animation-duration-normal: 250ms;
  --animation-duration-slow: 320ms;
  --animation-ease-out: cubic-bezier(0.25,0.46,0.45,0.94);
  --animation-ease-in-out: cubic-bezier(0.45,0,0.55,1);
  --switch-track-bg: #C6C6CB;
  --switch-track-active-bg: #0066CC;
  --switch-thumb-bg: #ffffff;
  --tab-bg: #F2F2F7;
  --tab-text: #6D6D72;
  --tab-active-bg: #F2F2F7;
  --tab-active-text: #1c1c1e;
  --tab-indicator-color: #0066CC;
  --tab-border-color: #C6C6CB;
  --accordion-border: #C6C6CB;
  --accordion-bg: #ffffff;
  --accordion-head-bg: #F2F2F7;
  --accordion-head-text: #1c1c1e;
  --dropdown-bg: #F2F2F7;
  --dropdown-border: #C6C6CB;
  --dropdown-text: #1c1c1e;
  --dropdown-item-hover-bg: #ffffff;
  --progress-track-bg: #ffffff;
  --progress-fill-color: #0066CC;
  --progress-radius: 8px;
  --type-scale-display-size: 48px;
  --type-scale-h1-size: 32px;
  --type-scale-h2-size: 24px;
  --type-scale-h3-size: 20px;
  --type-scale-lead-size: 18px;
  --type-scale-small-size: 12px;
  --chip-bg: #ffffff;
  --chip-text: #6D6D72;
  --chip-border: #C6C6CB;
  --chip-active-bg: #0066CC;
  --chip-active-text: #ffffff;
  --chip-radius: 8px;
  --kpi-value-size: 36px;
  --kpi-value-font-weight: 600;
  --kpi-value-color: #1c1c1e;
  --kpi-label-color: #6D6D72;
  --kpi-delta-up-color: #1e7e34;
  --kpi-delta-down-color: #d32f2f;
  --datepicker-bg: #F2F2F7;
  --datepicker-border: #C6C6CB;
  --datepicker-radius: 12px;
  --datepicker-cell-size: 32px;
  --datepicker-cell-radius: 8px;
  --datepicker-header-text: #1c1c1e;
  --datepicker-weekday-text: #606063;
  --datepicker-day-text: #1c1c1e;
  --datepicker-day-hover-bg: #E5E5EA;
  --datepicker-today-bg: rgba(0,122,255,.12);
  --datepicker-today-text: #1c1c1e;
  --datepicker-today-border: #0066CC;
  --datepicker-selected-bg: #0066CC;
  --datepicker-selected-text: #ffffff;
  --datepicker-disabled-text: #606063;
  --datepicker-nav-hover-bg: #E5E5EA;
  --datepicker-shadow: 0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
}


[data-theme="apple"][data-mode="dark"] {
  --color-primary: #0066CC;
  --color-primary-hover: #0054A8;
  --color-on-primary: #ffffff;
  --color-background: #000000;
  --color-surface: #1c1c1e;
  --color-surface2: #2c2c2e;
  --color-surface3: #3a3a3c;
  --color-border: rgba(255,255,255,0.12);
  --color-text-primary: #F5F5F7;
  --color-text-secondary: #AEAEB2;
  --color-text-muted: #8E8E93;
  --color-success: #1e7e34;
  --color-on-success: #ffffff;
  --color-warning: #f9ab00;
  --color-on-warning: #1f1f1f;
  --color-error: #d32f2f;
  --color-on-error: #ffffff;
  --color-success-soft: rgba(52,199,89,.12);
  --color-warn-soft: rgba(255,159,10,.12);
  --color-error-soft: rgba(255,59,48,.12);
  --color-info-soft: rgba(0,122,255,.12);
  --color-chart1: #007aff;
  --color-chart2: #34c759;
  --color-chart3: #ff9f0a;
  --color-chart4: #ff3b30;
  --color-chart5: #af52de;
  --color-chart6: #5ac8fa;
  --color-chart-heat: 0, 122, 255;
  --color-chart-heat-color: #007aff;
  --color-focus-ring: 0 0 0 4px rgba(0,122,255,.20);
  --color-glass-bg: rgba(28,28,30,0.72);
  --color-glass-border: rgba(255,255,255,0.14);
  --color-accent: #1a73e8;
  --color-accent-hover: #1666c1;
  --color-accent-soft: rgba(26,115,232,.14);
  --color-surface-inverse: #1f1f1f;
  --color-on-surface-inverse: #ffffff;
  --color-border-on-dark: rgba(255,255,255,.14);
  --spacing-xs: 4px;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.55);
  --shadow-md: 0 8px 24px rgba(0,0,0,.65);
  --typography-font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  --typography-font-size-base: 16px;
  --typography-heading-font-size: 24px;
  --typography-heading-font-weight: 600;
  --typography-heading-letter-spacing: -0.4px;
  --typography-button-font-weight: 500;
  --typography-label-font-weight: 500;
  --typography-font-size-small: 12px;
  --typography-font-size-display: 48px;
  --typography-font-size-h1: 32px;
  --typography-font-size-h2: 24px;
  --typography-font-size-h3: 20px;
  --typography-font-size-lead: 18px;
  --typography-font-size-kpi-value: 36px;
  --motion-dur1: 120ms;
  --motion-dur2: 250ms;
  --motion-dur3: 320ms;
  --motion-dur4: 400ms;
  --motion-ease-out: cubic-bezier(0.25,0.46,0.45,0.94);
  --motion-ease-in-out: cubic-bezier(0.45,0,0.55,1);
  --page-bg: #000000;
  --page-section-gap: 32px;
  --button-bg: #0066CC;
  --button-text: #ffffff;
  --button-hover-bg: #0054A8;
  --button-disabled-bg: #1c1c1e;
  --button-disabled-text: #AEAEB2;
  --button-radius: 12px;
  --button-padding-y: 10px;
  --button-padding-x: 20px;
  --button-font-weight: 500;
  --button-shadow: 0 2px 8px rgba(0,0,0,.55);
  --card-bg: #1c1c1e;
  --card-padding: 20px;
  --card-radius: 18px;
  --card-border-color: rgba(255,255,255,0.12);
  --card-shadow: 0 8px 24px rgba(0,0,0,.65);
  --text-primary: #F5F5F7;
  --text-secondary: #AEAEB2;
  --text-muted: #8E8E93;
  --surface-bg: #1c1c1e;
  --surface-bg2: #2c2c2e;
  --surface-bg3: #3a3a3c;
  --heading-color: #F5F5F7;
  --heading-font-size: 24px;
  --heading-font-weight: 600;
  --heading-letter-spacing: -0.4px;
  --input-bg: #000000;
  --input-text: #F5F5F7;
  --input-border: rgba(255,255,255,0.12);
  --input-radius: 8px;
  --input-padding: 10px;
  --input-shadow: 0 2px 8px rgba(0,0,0,.55);
  --label-color: #F5F5F7;
  --label-font-size: 16px;
  --label-font-weight: 500;
  --select-bg: #000000;
  --select-text: #F5F5F7;
  --select-border: rgba(255,255,255,0.12);
  --select-radius: 8px;
  --select-padding: 10px;
  --select-shadow: 0 2px 8px rgba(0,0,0,.55);
  --table-header-bg: #1c1c1e;
  --table-header-text: #F5F5F7;
  --table-border-color: rgba(255,255,255,0.12);
  --table-cell-padding: 10px;
  --table-row-hover-bg: #1c1c1e;
  --badge-radius: 8px;
  --badge-padding-y: 4px;
  --badge-padding-x: 10px;
  --badge-font-size: 12px;
  --badge-font-weight: 500;
  --badge-success-bg: #1e7e34;
  --badge-success-text: #ffffff;
  --badge-warning-bg: #f9ab00;
  --badge-warning-text: #1f1f1f;
  --badge-error-bg: #d32f2f;
  --badge-error-text: #ffffff;
  --badge-neutral-bg: #1c1c1e;
  --badge-neutral-text: #AEAEB2;
  --nav-bg: #1c1c1e;
  --nav-text: #F5F5F7;
  --nav-brand-color: #0066CC;
  --nav-border-color: rgba(255,255,255,0.12);
  --nav-padding-y: 10px;
  --nav-padding-x: 20px;
  --layout-bg: #000000;
  --layout-sidebar-bg: #1c1c1e;
  --layout-sidebar-border-color: rgba(255,255,255,0.12);
  --layout-sidebar-text: #F5F5F7;
  --layout-sidebar-active-text: #0066CC;
  --textarea-bg: #000000;
  --textarea-text: #F5F5F7;
  --textarea-border: rgba(255,255,255,0.12);
  --textarea-radius: 8px;
  --textarea-padding: 10px;
  --textarea-shadow: 0 2px 8px rgba(0,0,0,.55);
  --checkbox-border: rgba(255,255,255,0.12);
  --checkbox-checked-bg: #0066CC;
  --checkbox-checked-border: #0066CC;
  --checkbox-check-color: #ffffff;
  --checkbox-radius: 8px;
  --checkbox-size: 20px;
  --alert-radius: 8px;
  --alert-padding-y: 10px;
  --alert-padding-x: 20px;
  --alert-success-bg: #1e7e34;
  --alert-success-text: #ffffff;
  --alert-warning-bg: #f9ab00;
  --alert-warning-text: #1f1f1f;
  --alert-error-bg: #d32f2f;
  --alert-error-text: #ffffff;
  --alert-info-bg: #1c1c1e;
  --alert-info-text: #F5F5F7;
  --alert-info-border: rgba(255,255,255,0.12);
  --pagination-item-bg: #000000;
  --pagination-item-text: #F5F5F7;
  --pagination-item-border: rgba(255,255,255,0.12);
  --pagination-item-radius: 8px;
  --pagination-item-padding-y: 4px;
  --pagination-item-padding-x: 10px;
  --pagination-active-bg: #0066CC;
  --pagination-active-text: #ffffff;
  --pagination-active-border: #0066CC;
  --status-success-soft: rgba(52,199,89,.12);
  --status-warn-soft: rgba(255,159,10,.12);
  --status-error-soft: rgba(255,59,48,.12);
  --status-info-soft: rgba(0,122,255,.12);
  --chart-color1: #007aff;
  --chart-color2: #34c759;
  --chart-color3: #ff9f0a;
  --chart-color4: #ff3b30;
  --chart-color5: #af52de;
  --chart-color6: #5ac8fa;
  --chart-heat: 0, 122, 255;
  --chart-heat-color: #007aff;
  --chart-grid: rgba(255,255,255,0.12);
  --chart-axis: #8E8E93;
  --chart-padding: 20px;
  --chart-gap: 10px;
  --chart-radius: 8px;
  --glass-bg: rgba(28,28,30,0.72);
  --glass-border: rgba(255,255,255,0.14);
  --focus-ring: 0 0 0 4px rgba(0,122,255,.20);
  --animation-duration-fast: 120ms;
  --animation-duration-normal: 250ms;
  --animation-duration-slow: 320ms;
  --animation-ease-out: cubic-bezier(0.25,0.46,0.45,0.94);
  --animation-ease-in-out: cubic-bezier(0.45,0,0.55,1);
  --switch-track-bg: rgba(255,255,255,0.12);
  --switch-track-active-bg: #0066CC;
  --switch-thumb-bg: #ffffff;
  --tab-bg: #000000;
  --tab-text: #AEAEB2;
  --tab-active-bg: #000000;
  --tab-active-text: #F5F5F7;
  --tab-indicator-color: #0066CC;
  --tab-border-color: rgba(255,255,255,0.12);
  --accordion-border: rgba(255,255,255,0.12);
  --accordion-bg: #1c1c1e;
  --accordion-head-bg: #000000;
  --accordion-head-text: #F5F5F7;
  --dropdown-bg: #000000;
  --dropdown-border: rgba(255,255,255,0.12);
  --dropdown-text: #F5F5F7;
  --dropdown-item-hover-bg: #1c1c1e;
  --progress-track-bg: #1c1c1e;
  --progress-fill-color: #0066CC;
  --progress-radius: 8px;
  --type-scale-display-size: 48px;
  --type-scale-h1-size: 32px;
  --type-scale-h2-size: 24px;
  --type-scale-h3-size: 20px;
  --type-scale-lead-size: 18px;
  --type-scale-small-size: 12px;
  --chip-bg: #1c1c1e;
  --chip-text: #AEAEB2;
  --chip-border: rgba(255,255,255,0.12);
  --chip-active-bg: #0066CC;
  --chip-active-text: #ffffff;
  --chip-radius: 8px;
  --kpi-value-size: 36px;
  --kpi-value-font-weight: 600;
  --kpi-value-color: #F5F5F7;
  --kpi-label-color: #AEAEB2;
  --kpi-delta-up-color: #1e7e34;
  --kpi-delta-down-color: #d32f2f;
  --datepicker-bg: #000000;
  --datepicker-border: rgba(255,255,255,0.12);
  --datepicker-radius: 12px;
  --datepicker-cell-size: 32px;
  --datepicker-cell-radius: 8px;
  --datepicker-header-text: #F5F5F7;
  --datepicker-weekday-text: #8E8E93;
  --datepicker-day-text: #F5F5F7;
  --datepicker-day-hover-bg: #2c2c2e;
  --datepicker-today-bg: rgba(0,122,255,.12);
  --datepicker-today-text: #F5F5F7;
  --datepicker-today-border: #0066CC;
  --datepicker-selected-bg: #0066CC;
  --datepicker-selected-text: #ffffff;
  --datepicker-disabled-text: #8E8E93;
  --datepicker-nav-hover-bg: #2c2c2e;
  --datepicker-shadow: 0 8px 24px rgba(0,0,0,.65);
}

/* ── Component styles ─────────────────────────────────────── */

body {
  background: var(--page-bg);
  color: var(--text-primary);
}

section {
  margin-bottom: var(--page-section-gap);
}

.button {
  background: var(--button-bg);
  color: var(--button-text);
  padding: var(--button-padding-y) var(--button-padding-x);
  border-radius: var(--button-radius);
  border: none;
  box-shadow: var(--button-shadow);
  cursor: pointer;
  font-weight: var(--button-font-weight);
}

.button:hover,
.button.is-hover {
  background: var(--button-hover-bg);
}

.button:disabled,
.button.is-disabled {
  background: var(--button-disabled-bg);
  color: var(--button-disabled-text);
  cursor: not-allowed;
  opacity: 0.6;
}

.card {
  background: var(--card-bg);
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  border: 1px solid var(--card-border-color);
  box-shadow: var(--card-shadow);
}

.input {
  background: var(--input-bg);
  color: var(--input-text);
  padding: var(--input-padding);
  border-radius: var(--input-radius);
  border: 1px solid var(--input-border);
  box-shadow: var(--input-shadow);
}

.text {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.heading {
  color: var(--heading-color);
  font-size: var(--heading-font-size);
  font-weight: var(--heading-font-weight);
  letter-spacing: var(--heading-letter-spacing);
}

.label {
  display: inline-block;
  color: var(--label-color);
  font-size: var(--label-font-size);
  font-weight: var(--label-font-weight);
}

.select {
  background: var(--select-bg);
  color: var(--select-text);
  padding: var(--select-padding);
  border-radius: var(--select-radius);
  border: 1px solid var(--select-border);
  box-shadow: var(--select-shadow);
  width: 100%;
  cursor: pointer;
}

.table {
  border-collapse: collapse;
  width: 100%;
}

.table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  padding: var(--table-cell-padding);
  border: 1px solid var(--table-border-color);
  text-align: left;
}

.table td {
  padding: var(--table-cell-padding);
  border: 1px solid var(--table-border-color);
}

.table tr:hover td {
  background: var(--table-row-hover-bg);
}

.badge {
  display: inline-block;
  border-radius: var(--badge-radius);
  padding: var(--badge-padding-y) var(--badge-padding-x);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
}

.badge-success {
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
}

.badge-warning {
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}

.badge-error {
  background: var(--badge-error-bg);
  color: var(--badge-error-text);
}

.badge-neutral {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
}

.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border-color);
  padding: var(--nav-padding-y) var(--nav-padding-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  color: var(--nav-brand-color);
  font-weight: var(--heading-font-weight);
  font-size: var(--heading-font-size);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--nav-padding-y);
}

.page-layout {
  display: flex;
  min-height: 100vh;
}

.page-sidebar {
  background: var(--layout-sidebar-bg);
  border-right: 1px solid var(--layout-sidebar-border-color);
  padding: var(--nav-padding-x);
  width: 200px;
  flex-shrink: 0;
}

.page-content {
  background: var(--layout-bg);
  padding: var(--nav-padding-x);
  flex: 1;
}

.sidebar-link {
  display: block;
  color: var(--layout-sidebar-text);
  padding: var(--nav-padding-y) 0;
  text-decoration: none;
}

.sidebar-link.active,
.sidebar-link--active {
  color: var(--layout-sidebar-active-text);
  font-weight: var(--heading-font-weight);
}

.textarea {
  background: var(--textarea-bg);
  color: var(--textarea-text);
  padding: var(--textarea-padding);
  border-radius: var(--textarea-radius);
  border: 1px solid var(--textarea-border);
  box-shadow: var(--textarea-shadow);
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

.checkbox {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  accent-color: var(--checkbox-checked-bg);
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--nav-padding-y);
  cursor: pointer;
  color: var(--label-color);
  font-size: var(--label-font-size);
}

.radio {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  accent-color: var(--checkbox-checked-bg);
  cursor: pointer;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--nav-padding-y);
  cursor: pointer;
  color: var(--label-color);
  font-size: var(--label-font-size);
}

.alert {
  border-radius: var(--alert-radius);
  padding: var(--alert-padding-y) var(--alert-padding-x);
  margin-bottom: var(--nav-padding-y);
}

.alert-success {
  background: var(--alert-success-bg);
  color: var(--alert-success-text);
}

.alert-warning {
  background: var(--alert-warning-bg);
  color: var(--alert-warning-text);
}

.alert-error {
  background: var(--alert-error-bg);
  color: var(--alert-error-text);
}

.alert-info {
  background: var(--alert-info-bg);
  color: var(--alert-info-text);
  border: 1px solid var(--alert-info-border);
}

.pagination {
  display: flex;
  gap: var(--pagination-item-padding-x);
  align-items: center;
}

.pagination-item {
  background: var(--pagination-item-bg);
  color: var(--pagination-item-text);
  border: 1px solid var(--pagination-item-border);
  border-radius: var(--pagination-item-radius);
  padding: var(--pagination-item-padding-y) var(--pagination-item-padding-x);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.pagination-item--active {
  background: var(--pagination-active-bg);
  color: var(--pagination-active-text);
  border-color: var(--pagination-active-border);
}

.pagination-item:disabled,
.pagination-item--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Transitions ────────────────────────────────────────────── */

.button {
  transition: background var(--animation-duration-fast) var(--animation-ease-out),
              color var(--animation-duration-fast) var(--animation-ease-out);
}

.input,
.select,
.textarea {
  transition: border-color var(--animation-duration-fast) var(--animation-ease-out),
              box-shadow var(--animation-duration-fast) var(--animation-ease-out);
}

.pagination-item {
  transition: background var(--animation-duration-fast) var(--animation-ease-out),
              color var(--animation-duration-fast) var(--animation-ease-out);
}

/* ── Focus ring ─────────────────────────────────────────────── */

.button:focus-visible, .button.is-focus,
.input:focus-visible, .input.is-focus,
.select:focus-visible, .select.is-focus,
.textarea:focus-visible, .textarea.is-focus,
.pagination-item:focus-visible, .pagination-item.is-focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ── Static state utilities (.is-*) ────────────────────────── */

/* Disabled form fields (mirrors :disabled behaviour) */
.input.is-disabled,
.select.is-disabled,
.textarea.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--button-disabled-bg);
  color: var(--button-disabled-text);
}

/* Selected state (mirrors --active modifier classes) */
.tab.is-selected {
  color: var(--tab-active-text);
  border-bottom-color: var(--tab-indicator-color);
}

.chip.is-selected {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
  border-color: var(--chip-active-bg);
}

/* ── Surface hierarchy utilities ────────────────────────────── */

.surface-2 {
  background: var(--surface-bg2);
}

.surface-3 {
  background: var(--surface-bg3);
}

/* ── Text utilities ─────────────────────────────────────────── */

.text-muted {
  color: var(--text-muted);
}

/* ── Skip link (a11y) ───────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -999px;
  left: var(--button-padding-x);
  background: var(--button-bg);
  color: var(--button-text);
  padding: var(--button-padding-y) var(--button-padding-x);
  border-radius: var(--button-radius);
  border: none;
  text-decoration: none;
  font-weight: var(--button-font-weight);
  z-index: 9999;
}

.skip-link:focus {
  top: var(--button-padding-y);
}

/* ── Reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── Switch / Toggle ────────────────────────────────────────── */

.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--nav-padding-y);
  cursor: pointer;
}

.switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--switch-track-bg);
  transition: background var(--animation-duration-fast) var(--animation-ease-out);
  flex-shrink: 0;
}

.switch input:checked ~ .switch-track {
  background: var(--switch-track-active-bg);
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--switch-thumb-bg);
  transition: transform var(--animation-duration-fast) var(--animation-ease-out);
}

.switch input:checked ~ .switch-track .switch-thumb {
  transform: translateX(16px);
}

.switch:focus-within .switch-track {
  box-shadow: var(--focus-ring);
}

/* ── Tabs ───────────────────────────────────────────────────── */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--tab-border-color);
  gap: 0;
}

.tab {
  padding: var(--button-padding-y) var(--button-padding-x);
  background: var(--tab-bg);
  color: var(--tab-text);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: var(--label-font-size);
  font-weight: var(--label-font-weight);
  transition: color var(--animation-duration-fast) var(--animation-ease-out),
              border-color var(--animation-duration-fast) var(--animation-ease-out);
  margin-bottom: -1px;
}

.tab:hover,
.tab.is-hover {
  color: var(--tab-active-text);
}

.tab--active,
.tab.active {
  color: var(--tab-active-text);
  border-bottom-color: var(--tab-indicator-color);
}

.tab:focus-visible,
.tab.is-focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ── Accordion ──────────────────────────────────────────────── */

.accordion {
  border: 1px solid var(--accordion-border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--accordion-border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--button-padding-y) var(--button-padding-x);
  background: var(--accordion-head-bg);
  color: var(--accordion-head-text);
  cursor: pointer;
  font-weight: var(--heading-font-weight);
  border: none;
  width: 100%;
  text-align: left;
  transition: background var(--animation-duration-fast) var(--animation-ease-out);
}

.accordion-head:hover {
  background: var(--accordion-bg);
}

.accordion-head:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.accordion-icon {
  transition: transform var(--animation-duration-normal) var(--animation-ease-out);
  flex-shrink: 0;
}

.accordion-item--open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  background: var(--accordion-bg);
  color: var(--text-primary);
  padding: 0 var(--button-padding-x);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--animation-duration-slow) var(--animation-ease-out),
              padding var(--animation-duration-slow) var(--animation-ease-out);
}

.accordion-item--open .accordion-body {
  max-height: 500px;
  padding: var(--button-padding-y) var(--button-padding-x);
}

/* ── Dropdown ───────────────────────────────────────────────── */

.dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--input-padding);
  background: var(--dropdown-bg);
  color: var(--dropdown-text);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--input-radius);
  cursor: pointer;
  font-size: var(--label-font-size);
  transition: border-color var(--animation-duration-fast) var(--animation-ease-out);
  user-select: none;
}

.dropdown-head:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dropdown--open .dropdown-head {
  border-color: var(--button-bg);
}

.dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--input-radius);
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity var(--animation-duration-fast) var(--animation-ease-out),
              transform var(--animation-duration-fast) var(--animation-ease-out);
  box-shadow: var(--card-shadow);
}

.dropdown--open .dropdown-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  padding: var(--input-padding);
  color: var(--dropdown-text);
  cursor: pointer;
  font-size: var(--label-font-size);
  transition: background var(--animation-duration-fast) var(--animation-ease-out);
}

.dropdown-item:hover,
.dropdown-item--focused,
.dropdown-item.is-hover {
  background: var(--dropdown-item-hover-bg);
}

.dropdown-item--selected {
  color: var(--button-bg);
  font-weight: var(--heading-font-weight);
}

/* ── Progress ───────────────────────────────────────────────── */

.progress {
  width: 100%;
  height: 6px;
  background: var(--progress-track-bg);
  border-radius: var(--progress-radius);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--progress-fill-color);
  border-radius: var(--progress-radius);
  transition: width var(--animation-duration-normal) var(--animation-ease-out);
}

.progress--indeterminate .progress-fill {
  width: 40%;
  animation: progress-indeterminate var(--animation-duration-slow) var(--animation-ease-in-out) infinite;
}

@keyframes progress-indeterminate {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(400%); }
}

/* Circular progress */
.progress-circle {
  display: inline-block;
  position: relative;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-circle-track {
  stroke: var(--progress-track-bg);
  fill: none;
}

.progress-circle-fill {
  stroke: var(--progress-fill-color);
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--animation-duration-slow) var(--animation-ease-out);
}

/* ── Typography Scale ───────────────────────────────────────── */

.t-display {
  font-size: var(--type-scale-display-size);
  font-weight: var(--heading-font-weight);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--text-primary);
  line-height: 1.1;
}

.t-h1 {
  font-size: var(--type-scale-h1-size);
  font-weight: var(--heading-font-weight);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--text-primary);
  line-height: 1.2;
}

.t-h2 {
  font-size: var(--type-scale-h2-size);
  font-weight: var(--heading-font-weight);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--text-primary);
  line-height: 1.3;
}

.t-h3 {
  font-size: var(--type-scale-h3-size);
  font-weight: var(--heading-font-weight);
  color: var(--text-primary);
  line-height: 1.4;
}

.t-lead {
  font-size: var(--type-scale-lead-size);
  color: var(--text-secondary);
  line-height: 1.6;
}

.t-small {
  font-size: var(--type-scale-small-size);
  color: var(--text-secondary);
}

.t-overline {
  font-size: var(--type-scale-small-size);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: var(--label-font-weight);
}

.t-mono {
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--type-scale-small-size);
  color: var(--text-primary);
}

/* ── KPI Card ───────────────────────────────────────────────── */

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: var(--type-scale-small-size);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kpi-label-color);
  font-weight: var(--label-font-weight);
}

.kpi-value {
  font-size: var(--kpi-value-size);
  font-weight: var(--kpi-value-font-weight);
  color: var(--kpi-value-color);
  line-height: 1.1;
}

.kpi-delta {
  font-size: var(--type-scale-small-size);
  font-weight: var(--label-font-weight);
}

.kpi-delta--up {
  color: var(--kpi-delta-up-color);
}

.kpi-delta--down {
  color: var(--kpi-delta-down-color);
}

/* ── Filter Chips ───────────────────────────────────────────── */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--button-padding-y) var(--button-padding-x);
  background: var(--chip-bg);
  color: var(--chip-text);
  border: 1px solid var(--chip-border);
  border-radius: var(--chip-radius);
  cursor: pointer;
  font-size: var(--type-scale-small-size);
  font-weight: var(--label-font-weight);
  transition: background var(--animation-duration-fast) var(--animation-ease-out),
              color var(--animation-duration-fast) var(--animation-ease-out),
              border-color var(--animation-duration-fast) var(--animation-ease-out);
  user-select: none;
}

.chip:hover,
.chip.is-hover {
  border-color: var(--button-bg);
  color: var(--text-primary);
}

.chip--active,
.chip.active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
  border-color: var(--chip-active-bg);
}

.chip:focus-visible,
.chip.is-focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ── Table enhancements ─────────────────────────────────────── */

.table-sortable th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.table-sortable th:hover {
  background: var(--surface-bg2);
}

.table-sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  font-style: normal;
}

th[aria-sort="ascending"] .table-sort-icon,
th[aria-sort="descending"] .table-sort-icon {
  opacity: 1;
  color: var(--button-bg);
}

.table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.table-empty-icon {
  font-size: var(--type-scale-display-size);
  display: block;
  margin-bottom: 12px;
  opacity: 0.4;
}

.table-empty-text {
  font-size: var(--type-scale-lead-size);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.table-empty-hint {
  font-size: var(--type-scale-small-size);
  color: var(--text-muted);
}

/* ── Expandable table row ───────────────────────────────────── */

.table-row-expandable {
  cursor: pointer;
}

.table-row-expandable:hover td {
  background: var(--table-row-hover-bg);
}

.table-expand-cell {
  width: 32px;
  text-align: center;
  padding: var(--table-cell-padding);
  border: 1px solid var(--table-border-color);
}

.table-expand-icon {
  display: inline-block;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform var(--animation-duration-normal) var(--animation-ease-out);
  user-select: none;
}

.table-row-expandable--open .table-expand-icon {
  transform: rotate(180deg);
}

.table-row-expand td {
  padding: 0;
  border-left: 1px solid var(--table-border-color);
  border-right: 1px solid var(--table-border-color);
  border-top: none;
  border-bottom: none;
}

.table-row-expandable--open + .table-row-expand td {
  border-bottom: 1px solid var(--table-border-color);
}

.table-row-expand-body {
  background: var(--surface-bg2);
  color: var(--text-secondary);
  font-size: var(--type-scale-small-size);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--animation-duration-slow) var(--animation-ease-out),
              padding var(--animation-duration-slow) var(--animation-ease-out);
}

.table-row-expandable--open + .table-row-expand .table-row-expand-body {
  max-height: 300px;
  padding: var(--table-cell-padding) calc(var(--table-cell-padding) * 2);
}

/* ============================================================
   CHARTS SUBSYSTEM — Stage 7
   All colors via semantic vars; no hardcoded values.
   ============================================================ */

/* -- Shared chart utilities --------------------------------- */

.chart-card {
  background: var(--surface-bg);
  border: 1px solid var(--chart-grid);
  border-radius: var(--card-radius);
  padding: var(--chart-padding);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.chart-title {
  font-size: var(--type-scale-small-size);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--chart-gap);
}

.chart-svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.chart-grid line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.chart-axis text {
  fill: var(--chart-axis);
  font-size: 11px;
  font-family: inherit;
}

.chart-axis line,
.chart-axis path {
  stroke: var(--chart-grid);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--chart-padding);
  margin-top: var(--chart-gap);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* -- Sparkline ---------------------------------------------- */

.sparkline {
  display: block;
  width: 100%;
}

.sparkline-line {
  fill: none;
  stroke: var(--chart-color1);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.sparkline-area {
  fill: var(--chart-color1);
  opacity: 0.12;
}

.sparkline-dot {
  fill: var(--chart-color1);
}

/* -- Area chart -------------------------------------------- */

.area-chart {}

.area-chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.area-chart-fill {
  opacity: 0.15;
}

/* -- Bar chart --------------------------------------------- */

.bar-chart {}

.bar-chart-bar {
  transition: opacity var(--animation-duration-fast) var(--animation-ease-out);
}

.bar-chart-bar:hover {
  opacity: 0.8;
}

/* -- Donut chart ------------------------------------------- */

.donut-chart {
  display: flex;
  align-items: center;
  gap: var(--chart-padding);
}

.donut-svg {
  flex-shrink: 0;
}

.donut-segment {
  fill: none;
  stroke-width: 20;
  transition: stroke-dashoffset var(--animation-duration-normal) var(--animation-ease-out);
}

.donut-label {
  fill: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.donut-sublabel {
  fill: var(--text-secondary);
  font-size: 11px;
  text-anchor: middle;
  dominant-baseline: central;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* -- Heatmap chart ----------------------------------------- */

.heatmap {
  display: grid;
  gap: 3px;
}

.heatmap-cell {
  border-radius: var(--chart-radius);
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--chart-heat-color) calc(var(--v, 0) * 100%), transparent);
  transition: background var(--animation-duration-fast) var(--animation-ease-out);
}

.heatmap-cell:hover {
  outline: 2px solid var(--chart-heat-color);
  outline-offset: 1px;
}

.heatmap-label {
  font-size: 10px;
  color: var(--chart-axis);
  text-align: center;
  margin-top: 2px;
}

.heatmap-row-label {
  font-size: 10px;
  color: var(--chart-axis);
  display: flex;
  align-items: center;
}

/* -- Gantt chart ------------------------------------------- */

.gantt {
  overflow-x: auto;
}

.gantt-grid {
  display: grid;
  position: relative;
  border-top: 1px solid var(--chart-grid);
}

.gantt-header {
  display: flex;
  border-bottom: 1px solid var(--chart-grid);
  margin-bottom: 4px;
}

.gantt-header-cell {
  font-size: 11px;
  color: var(--chart-axis);
  text-align: center;
  padding: 2px 4px;
  border-right: 1px solid var(--chart-grid);
  flex: 1;
}

.gantt-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--chart-grid);
  min-height: 32px;
  position: relative;
}

.gantt-row-label {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  padding-right: var(--chart-gap);
  width: 120px;
}

.gantt-track {
  flex: 1;
  position: relative;
  height: 32px;
  --gantt-col-w: calc(100% / var(--gantt-cols, 12));
}

.gantt-bar {
  position: absolute;
  height: 20px;
  top: 6px;
  border-radius: var(--chart-radius);
  left: calc(var(--gantt-col-w) * var(--s, 0));
  width: calc(var(--gantt-col-w) * var(--d, 1));
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  color: var(--button-text);
  background: var(--button-bg);
  transition: opacity var(--animation-duration-fast) var(--animation-ease-out);
}

.gantt-bar:hover {
  opacity: 0.85;
}

.gantt-bar--1 { background: var(--chart-color1); }
.gantt-bar--2 { background: var(--chart-color2); }
.gantt-bar--3 { background: var(--chart-color3); }
.gantt-bar--4 { background: var(--chart-color4); }
.gantt-bar--5 { background: var(--chart-color5); }
.gantt-bar--6 { background: var(--chart-color6); }

/* ============================================================
   GLASS EFFECT — Stage 9
   backdrop-filter values are intentionally literal (not tokens):
   blur()/saturate() are filter functions, not color values.
   ============================================================ */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
}

/* ============================================================
   LAYOUT UTILITIES — Stage 8
   ============================================================ */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--page-section-gap);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--page-section-gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--page-section-gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--page-section-gap); }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--page-section-gap); }

/* ─── Date Picker / Calendar ──────────────────────────────────────────── */
.datepicker {
  display: inline-block;
  background: var(--datepicker-bg);
  border: 1px solid var(--datepicker-border);
  border-radius: var(--datepicker-radius);
  box-shadow: var(--datepicker-shadow);
  padding: 12px;
  user-select: none;
  min-width: 280px;
}

.datepicker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.datepicker-title {
  font-weight: var(--label-font-weight);
  color: var(--datepicker-header-text);
  font-size: var(--label-font-size);
}

.datepicker-nav {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--datepicker-header-text);
  width: var(--datepicker-cell-size);
  height: var(--datepicker-cell-size);
  border-radius: var(--datepicker-cell-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--animation-duration-fast) var(--animation-ease-out);
}

.datepicker-nav:hover,
.datepicker-nav.is-hover {
  background: var(--datepicker-nav-hover-bg);
}

.datepicker-nav:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.datepicker-grid {
  display: grid;
  grid-template-columns: repeat(7, var(--datepicker-cell-size));
  gap: 2px;
  justify-content: center;
}

.datepicker-weekday {
  width: var(--datepicker-cell-size);
  height: var(--datepicker-cell-size);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--label-font-weight);
  color: var(--datepicker-weekday-text);
  text-transform: uppercase;
}

.datepicker-day {
  width: var(--datepicker-cell-size);
  height: var(--datepicker-cell-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--datepicker-cell-radius);
  cursor: pointer;
  font-size: 13px;
  color: var(--datepicker-day-text);
  border: 1px solid transparent;
  transition: background var(--animation-duration-fast) var(--animation-ease-out);
}

.datepicker-day:hover,
.datepicker-day.is-hover {
  background: var(--datepicker-day-hover-bg);
}

.datepicker-day:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.datepicker-day--today {
  background: var(--datepicker-today-bg);
  border-color: var(--datepicker-today-border);
  color: var(--datepicker-today-text);
  font-weight: 600;
}

.datepicker-day--selected {
  background: var(--datepicker-selected-bg);
  color: var(--datepicker-selected-text);
  border-color: transparent;
  font-weight: 600;
}

.datepicker-day--selected:hover {
  background: var(--datepicker-selected-bg);
}

.datepicker-day--disabled,
.datepicker-day--empty {
  color: var(--datepicker-disabled-text);
  cursor: default;
  opacity: 0.4;
  pointer-events: none;
}

.datepicker-day--empty {
  visibility: hidden;
}
