/* ==========================================================================
   ARAK SERVICE CENTER — DESIGN TOKENS (DIRECTIONS A, B, C)
   Themes:
     - [data-theme="neo-light"]  -> نيو فاتح  (Direction A: Workshop Brutalist)
     - [data-theme="neo-dark"]   -> نيو غامق  (Direction B: Linear-style Dark)
     - [data-theme="odoo"]       -> أودو      (Direction C: Odoo 18 Native)
   Shared Rules:
     - Font: IBM Plex Sans Arabic (min 16px body) + IBM Plex Mono (numbers)
     - Zero gradients, zero glassmorphism/blur, zero glow, zero emoji icons
     - Status colors (green/amber/red) strictly for real semantic status
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type Scale (16px minimum body text) */
  --text-xs: 0.8125rem;   /* 13px - micro labels / column headers */
  --text-sm: 0.875rem;    /* 14px - secondary metadata */
  --text-base: 1rem;      /* 16px - body & controls (minimum body size) */
  --text-lg: 1.125rem;    /* 18px - section titles & prominent values */
  --text-xl: 1.375rem;    /* 22px - screen headings / totals */
  --text-2xl: 1.625rem;   /* 26px - primary grand total */

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

  /* Layout Metrics */
  --header-height: 56px;
  --tabbar-height: 60px;
  --z-header: 20;
  --z-pinned: 25;
  --z-tabbar: 30;
  --z-modal: 50;
}

/* ==========================================================================
   DIRECTION A: نيو فاتح — Workshop Brutalist (Light)
   Built for sunlight & gloved hands: thick 1.5px ink borders, 4px radius,
   hard 3px offset shadow (zero blur), safety yellow accent, 48px+ touch targets
   ========================================================================== */
[data-theme="neo-light"] {
  /* Core Palette */
  --bg: #EEEDE8;
  --surface: #FFFFFF;
  --surface-subtle: #E4E2DA;
  --surface-hover: #F7F6F1;
  --text: #1B1B18;
  --muted: #6B6A63;
  --accent: #F2B705;
  --accent-hover: #DFA700;
  --accent-fg: #1B1B18;
  --accent-soft: #FCF0C2;

  /* Borders & Geometry */
  --border-color: #1B1B18;
  --border-subtle: #C7C5BC;
  --border-width: 1.5px;
  --border: 1.5px solid #1B1B18;
  --divider: 1.5px solid #1B1B18;
  --radius: 4px;
  --radius-chip: 4px;

  /* Hard Offset Shadows (Zero Blur) */
  --shadow-card: 3px 3px 0px #1B1B18;
  --shadow-btn: 3px 3px 0px #1B1B18;
  --shadow-btn-active: 1px 1px 0px #1B1B18;
  --shadow-input: 2px 2px 0px #1B1B18;
  --btn-active-shift: 2px;

  /* Density & Touch Targets */
  --touch-min: 48px;
  --btn-height: 52px;
  --input-height: 48px;
  --card-pad: 16px;
  --row-py: 14px;
  --row-px: 16px;
  --row-gap: 10px;
  --section-gap: 18px;
  --heading-weight: 700;
  --label-weight: 700;

  /* Form Controls */
  --input-bg: #FFFFFF;
  --input-border: 1.5px solid #1B1B18;
  --input-border-bottom: 1.5px solid #1B1B18;
  --input-radius: 4px;
  --input-px: 14px;
  --input-focus-border: #1B1B18;
  --input-focus-outline: 2px solid #F2B705;

  /* Secondary Button */
  --btn-sec-bg: #FFFFFF;
  --btn-sec-fg: #1B1B18;
  --btn-sec-border: 1.5px solid #1B1B18;
  --btn-sec-hover: #F7F6F1;

  /* Semantic Status (Real Status Only) */
  --status-ok-bg: #D9F5E3;
  --status-ok-fg: #115E31;
  --status-ok-border: #1B1B18;
  --status-warn-bg: #F2B705;
  --status-warn-fg: #1B1B18;
  --status-warn-border: #1B1B18;
  --status-danger-bg: #FADBD8;
  --status-danger-fg: #921818;
  --status-danger-border: #1B1B18;
  --status-neutral-bg: #E4E2DA;
  --status-neutral-fg: #1B1B18;
  --status-neutral-border: #1B1B18;
  --status-info-bg: #DBEAFE;
  --status-info-fg: #1E40AF;
  --status-info-border: #1B1B18;
  --star-active: #D97706;

  /* Stage Tracker (4 Bold Segments) */
  --stage-track-bg: #D1CFC6;
  --stage-done-bg: #F2B705;
  --stage-done-fg: #1B1B18;
  --stage-active-bg: #F2B705;
  --stage-active-fg: #1B1B18;
  --stage-bar-height: 8px;

  /* Bottom Tab Bar */
  --tabbar-bg: #FFFFFF;
  --tabbar-border: 1.5px solid #1B1B18;
  --tabbar-fg: #6B6A63;
  --tabbar-active-fg: #1B1B18;
  --tabbar-indicator: #F2B705;
  --tabbar-indicator-h: 4px;
}

/* ==========================================================================
   DIRECTION B: نيو غامق — Linear-style Dark
   Dense, quiet, flat hairline-bordered list rows instead of cards,
   6px radius, zero shadows, single warm amber accent (#F5A524)
   ========================================================================== */
[data-theme="neo-dark"] {
  /* Core Palette */
  --bg: #0E0F11;
  --surface: #16181B;
  --surface-subtle: #1C1F24;
  --surface-hover: #1E2127;
  --text: #ECEDEE;
  --muted: #8A8F98;
  --accent: #F5A524;
  --accent-hover: #E09316;
  --accent-fg: #0E0F11;
  --accent-soft: #261E11;

  /* Borders & Geometry */
  --border-color: #2A2D33;
  --border-subtle: #212429;
  --border-width: 1px;
  --border: 1px solid #2A2D33;
  --divider: 1px solid #22252A;
  --radius: 6px;
  --radius-chip: 6px;

  /* Shadows (Strictly None) */
  --shadow-card: none;
  --shadow-btn: none;
  --shadow-btn-active: none;
  --shadow-input: none;
  --btn-active-shift: 0px;

  /* Density & Touch Targets (Quiet & Dense) */
  --touch-min: 44px;
  --btn-height: 46px;
  --input-height: 44px;
  --card-pad: 12px;
  --row-py: 11px;
  --row-px: 14px;
  --row-gap: 10px;
  --section-gap: 14px;
  --heading-weight: 600;
  --label-weight: 500;

  /* Form Controls */
  --input-bg: #111316;
  --input-border: 1px solid #2A2D33;
  --input-border-bottom: 1px solid #2A2D33;
  --input-radius: 6px;
  --input-px: 12px;
  --input-focus-border: #F5A524;
  --input-focus-outline: none;

  /* Secondary Button */
  --btn-sec-bg: #16181B;
  --btn-sec-fg: #ECEDEE;
  --btn-sec-border: 1px solid #2A2D33;
  --btn-sec-hover: #1E2127;

  /* Semantic Status (Real Status Only) */
  --status-ok-bg: #10241A;
  --status-ok-fg: #4ADE80;
  --status-ok-border: #1E4631;
  --status-warn-bg: #2A1F0D;
  --status-warn-fg: #F5A524;
  --status-warn-border: #593E12;
  --status-danger-bg: #291316;
  --status-danger-fg: #F87171;
  --status-danger-border: #5B2328;
  --status-neutral-bg: #1C1F24;
  --status-neutral-fg: #8A8F98;
  --status-neutral-border: #2A2D33;
  --status-info-bg: #122036;
  --status-info-fg: #60A5FA;
  --status-info-border: #1E3A5F;
  --star-active: #F5A524;

  /* Stage Tracker (4 Quiet Slim Segments) */
  --stage-track-bg: #2A2D33;
  --stage-done-bg: #F5A524;
  --stage-done-fg: #0E0F11;
  --stage-active-bg: #F5A524;
  --stage-active-fg: #0E0F11;
  --stage-bar-height: 4px;

  /* Bottom Tab Bar */
  --tabbar-bg: #0E0F11;
  --tabbar-border: 1px solid #2A2D33;
  --tabbar-fg: #8A8F98;
  --tabbar-active-fg: #ECEDEE;
  --tabbar-indicator: #F5A524;
  --tabbar-indicator-h: 2px;
}

/* ==========================================================================
   DIRECTION C: أودو — Odoo 18 Native (Light)
   Matches Odoo 18 backend: form-view underline fields, breadcrumb header,
   arrow-shaped RTL statusbar, Odoo purple (#714B67), 4px radius, no shadows
   ========================================================================== */
[data-theme="odoo"] {
  /* Core Palette */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-subtle: #F8F9FA;
  --surface-hover: #F1F3F5;
  --text: #212529;
  --muted: #6C757D;
  --accent: #714B67;
  --accent-hover: #5D3D54;
  --accent-fg: #FFFFFF;
  --accent-soft: #F3ECF1;

  /* Borders & Geometry */
  --border-color: #DEE2E6;
  --border-subtle: #E9ECEF;
  --border-width: 1px;
  --border: 1px solid #DEE2E6;
  --divider: 1px solid #DEE2E6;
  --radius: 4px;
  --radius-chip: 4px;

  /* Shadows (Strictly None) */
  --shadow-card: none;
  --shadow-btn: none;
  --shadow-btn-active: none;
  --shadow-input: none;
  --btn-active-shift: 0px;

  /* Density & Touch Targets (Odoo 18 Form & List Rhythm) */
  --touch-min: 44px;
  --btn-height: 44px;
  --input-height: 44px;
  --card-pad: 16px;
  --row-py: 10px;
  --row-px: 14px;
  --row-gap: 10px;
  --section-gap: 14px;
  --heading-weight: 600;
  --label-weight: 600;

  /* Form Controls (Odoo Form-View Underline Style) */
  --input-bg: transparent;
  --input-border: 0px solid transparent;
  --input-border-bottom: 1px solid #CED4DA;
  --input-radius: 0px;
  --input-px: 2px;
  --input-focus-border: #714B67;
  --input-focus-outline: none;

  /* Secondary Button (Odoo Control Panel Button) */
  --btn-sec-bg: #FFFFFF;
  --btn-sec-fg: #212529;
  --btn-sec-border: 1px solid #CED4DA;
  --btn-sec-hover: #F8F9FA;

  /* Semantic Status (Real Status Only — Odoo 18 Semantics) */
  --status-ok-bg: #E6F4EA;
  --status-ok-fg: #1E7E34;
  --status-ok-border: #B7DFC0;
  --status-warn-bg: #FFF3CD;
  --status-warn-fg: #856404;
  --status-warn-border: #FFE69C;
  --status-danger-bg: #F8D7DA;
  --status-danger-fg: #842029;
  --status-danger-border: #F1AEB5;
  --status-neutral-bg: #E9ECEF;
  --status-neutral-fg: #495057;
  --status-neutral-border: #DEE2E6;
  --status-info-bg: #E7F1FF;
  --status-info-fg: #0D47A1;
  --status-info-border: #B6D4FE;
  --star-active: #D97706;

  /* Stage Tracker (Odoo Arrow-Shaped Statusbar) */
  --stage-track-bg: #E9ECEF;
  --stage-done-bg: #F3ECF1;
  --stage-done-fg: #714B67;
  --stage-active-bg: #714B67;
  --stage-active-fg: #FFFFFF;
  --stage-bar-height: 38px;

  /* Bottom Tab Bar */
  --tabbar-bg: #FFFFFF;
  --tabbar-border: 1px solid #DEE2E6;
  --tabbar-fg: #6C757D;
  --tabbar-active-fg: #714B67;
  --tabbar-indicator: #714B67;
  --tabbar-indicator-h: 3px;
}
