/* =============================================
   ZeroArc / ZeroBot — Design Tokens
   Single source of truth for all visual values.
   NO component styles here — only variables.
   ============================================= */

/* --- Web Font (DM Sans as Aeonik stand-in) --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;700&display=swap');

/* -----------------------------------------------
   DARK MODE (default)
   ----------------------------------------------- */
:root {
  /* --- Brand primaries --- */
  --midnight:   #262430;
  --lime:       #e8ffbe;
  --beige:      #f9faef;
  --forest:     #193441;

  /* --- Neutrals --- */
  --charcoal:   #4c4b54;
  --dust:       #d8d8d8;

  /* --- Accents --- */
  --azure:      #6b5cff;
  --blush:      #f7618f;
  --sriracha:   #ef4660;
  --sunshine:   #ffbe78;

  /* --- Derived / semantic (dark) --- */
  --bg:              var(--midnight);
  --bg-card:         #2e2d3a;
  --bg-input:        rgba(0, 0, 0, 0.3);
  --bg-hover:        rgba(255, 255, 255, 0.06);
  --border:          #3a3948;
  --text:            var(--beige);
  --text-muted:      #7a7986;
  --accent:          var(--lime);
  --accent-dim:      rgba(232, 255, 190, 0.15);
  --accent-mid:      rgba(232, 255, 190, 0.4);
  --accent-on:       var(--midnight);  /* text on accent bg */

  /* --- Font sizes (25% increase from base) --- */
  --text-xs:   14px;
  --text-sm:   16px;
  --text-base: 19px;
  --text-md:   20px;
  --text-lg:   23px;
  --text-xl:   25px;
  --text-2xl:  31px;
  --text-3xl:  44px;

  /* --- Spacing --- */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 48px;

  /* --- Radius (ZeroArc: tight corners) --- */
  --radius: 4px;

  /* --- Font families --- */
  --font: 'Aeonik', 'DM Sans', -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;

  /* --- Status colors (theme-independent) --- */
  --status-online:  #22c55e;
  --status-working: var(--sunshine);
  --status-error:   var(--sriracha);
  --status-offline: var(--charcoal);

  /* --- Layout --- */
  --sidebar-width:  260px;
  --header-height:  48px;
  --topbar-height:  36px;
  --tab-height:     32px;
  --settings-width: 420px;

  /* --- Shadows --- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.4);

  /* --- Transitions --- */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.4s ease;

  /* --- Z-indices --- */
  --z-sidebar:  100;
  --z-header:   110;
  --z-settings: 120;
  --z-modal:    130;
  --z-toast:    140;
  --z-terminal: 150;
}

/* -----------------------------------------------
   LIGHT MODE — override derived tokens only
   ----------------------------------------------- */
[data-theme="light"] {
  --bg:              #f5f6eb;
  --bg-card:         #ffffff;
  --bg-input:        #f0f1e8;
  --bg-hover:        rgba(0, 0, 0, 0.04);
  --border:          #d0d2d8;
  --text:            #1a1a2e;
  --text-muted:      #4a5060;
  --accent:          var(--forest);
  --accent-dim:      rgba(25, 52, 65, 0.08);
  --accent-mid:      rgba(25, 52, 65, 0.25);
  --accent-on:       #ffffff;

  /* Light mode specific overrides */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);

  /* Badge / severity semantic overrides */
  --badge-ok-bg:     rgba(45, 184, 75, 0.12);
  --badge-ok-text:   #1a8a35;
  --badge-warn-bg:   rgba(212, 149, 32, 0.12);
  --badge-warn-text: #b87a20;
  --badge-crit-bg:   rgba(208, 48, 64, 0.12);
  --badge-crit-text: #d03040;
}

/* Dark-mode badge defaults (so we can use them uniformly) */
:root {
  --badge-ok-bg:     rgba(232, 255, 190, 0.15);
  --badge-ok-text:   var(--lime);
  --badge-warn-bg:   rgba(255, 190, 120, 0.15);
  --badge-warn-text: var(--sunshine);
  --badge-crit-bg:   rgba(239, 70, 96, 0.15);
  --badge-crit-text: var(--sriracha);
}
