/* ==========================================================================
   LiftOps — Design Tokens
   Single source of truth for color, type, spacing, radius, elevation.
   Never hard-code a hex value inside a component; add a token here instead.
   ========================================================================== */

:root {
  /* ---- Brand ---- */
  --brand-50:  #EEF3FF;
  --brand-100: #DCE6FF;
  --brand-200: #BACDFF;
  --brand-300: #8EAAFF;
  --brand-400: #5B80FA;
  --brand-500: #2456E6;
  --brand-600: #1B44C4;
  --brand-700: #16359C;
  --brand-800: #122A78;
  --brand-900: #0B1B3A;

  --primary:        var(--brand-500);
  --primary-hover:  var(--brand-600);
  --primary-soft:   var(--brand-50);
  --primary-border: var(--brand-200);
  --on-primary:     #FFFFFF;

  /* ---- Semantic ---- */
  --success:       #12A150;
  --success-soft:  #E7F7EE;
  --success-text:  #0B6B36;

  --warning:       #DE7B08;
  --warning-soft:  #FDF2E2;
  --warning-text:  #9A5405;

  --danger:        #DC2B3C;
  --danger-soft:   #FDECEE;
  --danger-text:   #9E1B29;

  --info:          #0E8FBF;
  --info-soft:     #E4F4FA;
  --info-text:     #0A6386;

  --neutral:       #64748B;
  --neutral-soft:  #F1F5F9;
  --neutral-text:  #475569;

  /* ---- Surfaces ---- */
  --bg:            #F4F6FB;
  --bg-alt:        #EEF1F8;
  --surface:       #FFFFFF;
  --surface-2:     #F8FAFC;
  --surface-inset: #F1F5F9;
  --overlay:       rgba(11, 27, 58, .55);

  --sidebar-bg:    #0B1B3A;
  --sidebar-bg-2:  #0F2551;
  --sidebar-text:  #B9C6E4;
  --sidebar-active:#FFFFFF;

  /* ---- Text ---- */
  --text:      #0F1B33;
  --text-2:    #3D4C68;
  --muted:     #6B7A94;
  --muted-2:   #93A0B6;
  --on-dark:   #FFFFFF;

  /* ---- Borders ---- */
  --border:        #E2E8F2;
  --border-strong: #CBD5E4;
  --divider:       #EDF1F7;

  /* ---- Priority ---- */
  --prio-normal:    var(--neutral);
  --prio-urgent:    var(--warning);
  --prio-emergency: var(--danger);

  /* ---- Elevator status ---- */
  --st-running:    var(--success);
  --st-stopped:    var(--danger);
  --st-maint:      var(--info);
  --st-out:        #7C3AED;
  --st-part:       var(--warning);

  /* ---- Typography ---- */
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", "Tahoma", "Noto Sans Arabic", sans-serif;
  --font-en: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font: var(--font-ar);

  --fs-2xs: 10px;
  --fs-xs:  11.5px;
  --fs-sm:  13px;
  --fs-md:  14.5px;
  --fs-lg:  16px;
  --fs-xl:  19px;
  --fs-2xl: 23px;
  --fs-3xl: 28px;
  --fs-4xl: 34px;

  --lh-tight: 1.3;
  --lh-base:  1.65;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* ---- Spacing (4px base) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;

  /* ---- Radius ---- */
  --r-xs:  6px;
  --r-sm:  9px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  22px;
  --r-pill:999px;

  /* ---- Elevation ---- */
  --sh-xs: 0 1px 2px rgba(15, 27, 51, .06);
  --sh-sm: 0 1px 3px rgba(15, 27, 51, .08), 0 1px 2px rgba(15, 27, 51, .04);
  --sh-md: 0 4px 14px rgba(15, 27, 51, .08), 0 1px 3px rgba(15, 27, 51, .05);
  --sh-lg: 0 12px 32px rgba(15, 27, 51, .14);
  --sh-xl: 0 24px 60px rgba(15, 27, 51, .22);
  --sh-focus: 0 0 0 3px rgba(36, 86, 230, .28);

  /* ---- Layout ---- */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --mobile-max: 430px;
  --bottomnav-h: 62px;
  --tap: 44px;           /* minimum touch target */

  /* ---- Motion ---- */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur-fast: 130ms;
  --dur: 220ms;
  --dur-slow: 380ms;

  /* ---- Z-index scale ---- */
  --z-nav: 40;
  --z-sticky: 50;
  --z-drawer: 60;
  --z-sheet: 70;
  --z-modal: 80;
  --z-lightbox: 90;
  --z-toast: 95;
  --z-splash: 100;
}

/* Reduced motion: honour the OS setting. */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
