/* ---------------------------------------------------------------------------
 * Design tokens.
 *
 * Ported from the existing Return System stylesheet so the new application
 * looks like a continuation of it, then extended with the semantic tones the
 * status badges need (six return statuses became fifteen) and with logical
 * spacing/radius scales.
 * ------------------------------------------------------------------------ */

:root {
  /* Typography — Cairo carries both Arabic and Latin, so one family keeps
     mixed strings (product names, SKUs, invoice numbers) visually coherent. */
  --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'SF Mono', monospace;

  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;

  /* Surfaces */
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --panel-3: #f1f5f9;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: #1e293b;
  --topbar-bg: #ffffff;

  /* Text */
  --text: #1e293b;
  --text-heading: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Lines */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-strong: #cbd5e1;

  /* Brand */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;

  /* Semantic tones — background / foreground / border for each badge tone */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-fg: #047857;
  --success-border: #a7f3d0;

  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-fg: #b45309;
  --warning-border: #fde68a;

  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-fg: #b91c1c;
  --danger-border: #fecaca;

  --info: #3b82f6;
  --info-bg: #eff6ff;
  --info-fg: #1d4ed8;
  --info-border: #bfdbfe;

  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;
  --purple-fg: #6d28d9;
  --purple-border: #ddd6fe;

  --neutral: #6b7280;
  --neutral-bg: #f3f4f6;
  --neutral-fg: #4b5563;
  --neutral-border: #e5e7eb;

  /* Forms */
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --input-disabled-bg: #f3f4f6;
  --focus-ring: rgba(37, 99, 235, 0.2);

  /* Shape & motion */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.16);

  --transition: 150ms ease;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --sidebar-width: 248px;
  --topbar-height: 58px;
  --content-max: 1440px;
}

[data-theme='dark'] {
  --bg: #0b1220;
  --panel: #0f1a2e;
  --panel-2: #111f36;
  --panel-3: #16263f;
  --sidebar-bg: #070e1a;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: #16263f;
  --topbar-bg: #0f1a2e;

  --text: #e5e7eb;
  --text-heading: #f3f4f6;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: #1e293b;
  --border-light: #16233a;
  --border-strong: #2b3a55;

  --accent-soft: #162b47;
  --accent-border: #1e3a5f;

  --success-bg: #052e23;
  --success-fg: #6ee7b7;
  --success-border: #065f46;

  --warning-bg: #2e2205;
  --warning-fg: #fcd34d;
  --warning-border: #92400e;

  --danger-bg: #2e0b0b;
  --danger-fg: #fca5a5;
  --danger-border: #991b1b;

  --info-bg: #0d2247;
  --info-fg: #93c5fd;
  --info-border: #1e40af;

  --purple-bg: #221340;
  --purple-fg: #c4b5fd;
  --purple-border: #5b21b6;

  --neutral-bg: #1a2537;
  --neutral-fg: #cbd5e1;
  --neutral-border: #2b3a55;

  --input-bg: #0f1a2e;
  --input-border: #2b3a55;
  --input-disabled-bg: #16233a;
  --focus-ring: rgba(37, 99, 235, 0.35);

  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
}
