/* ============================================================
   DESIGN TOKENS — Enterprise DMS Portal
   Blueprint / engineering-document aesthetic
   ============================================================ */
:root {
  /* ---- Color: Dark (default) ---- */
  --c-bg:            #0F1417;
  --c-surface:       #171D22;
  --c-surface-2:     #1D242A;
  --c-surface-3:     #232B32;
  --c-line:          #2A333A;
  --c-line-strong:   #37424B;

  --c-text:          #E7EBEE;
  --c-text-dim:      #9AA6AD;
  --c-text-faint:    #6B7680;

  --c-accent:        #14B8A6;   /* blueprint teal */
  --c-accent-dim:    #0E7C70;
  --c-accent-glow:   rgba(20,184,166,0.18);

  --c-amber:         #F5A623;   /* pending / review */
  --c-amber-dim:     rgba(245,166,35,0.16);
  --c-coral:         #EF5350;   /* rejected / obsolete */
  --c-coral-dim:     rgba(239,83,80,0.16);
  --c-blue:          #4C8DFF;   /* informational / draft-working */
  --c-blue-dim:      rgba(76,141,255,0.16);
  --c-violet:        #9B7BFF;   /* superseded */
  --c-violet-dim:    rgba(155,123,255,0.16);
  --c-green:         #3DD68C;   /* released */
  --c-green-dim:     rgba(61,214,140,0.16);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.50);
  --shadow-glow: 0 0 0 1px var(--c-accent-glow), 0 8px 24px rgba(20,184,166,0.12);

  /* ---- Typography ---- */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body:    "Inter", "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --fs-2xs: 0.6875rem;  /* 11 */
  --fs-xs:  0.75rem;    /* 12 */
  --fs-sm:  0.8125rem;  /* 13 */
  --fs-base:0.875rem;   /* 14 */
  --fs-md:  1rem;       /* 16 */
  --fs-lg:  1.25rem;    /* 20 */
  --fs-xl:  1.625rem;   /* 26 */
  --fs-2xl: 2.25rem;    /* 36 */

  /* ---- Spacing (8px system) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ---- Radius ---- */
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* ---- Layout ---- */
  --rail-w: 64px;
  --sidebar-w: 264px;
  --topbar-h: 56px;
  --panel-w: 340px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(.2,.7,.3,1);
  --dur-fast: 120ms;
  --dur-med: 220ms;
  --dur-slow: 380ms;
}

/* ---- Color: Light mode override ---- */
[data-theme="light"] {
  --c-bg:            #F5F6F4;
  --c-surface:       #FFFFFF;
  --c-surface-2:     #F1F3F1;
  --c-surface-3:     #E9ECEA;
  --c-line:          #DDE1DE;
  --c-line-strong:   #C9CFCB;

  --c-text:          #16201E;
  --c-text-dim:      #56635F;
  --c-text-faint:    #8A968F;

  --shadow-sm: 0 1px 2px rgba(20,30,25,0.06);
  --shadow-md: 0 4px 16px rgba(20,30,25,0.08);
  --shadow-lg: 0 12px 40px rgba(20,30,25,0.12);
  --shadow-glow: 0 0 0 1px rgba(20,184,166,0.25), 0 8px 24px rgba(20,184,166,0.10);
}

/* Lifecycle state colors — used everywhere a document state appears */
[data-state="draft"]      { --state-c: var(--c-blue);   --state-bg: var(--c-blue-dim); }
[data-state="review"]     { --state-c: var(--c-amber);  --state-bg: var(--c-amber-dim); }
[data-state="released"]   { --state-c: var(--c-green);  --state-bg: var(--c-green-dim); }
[data-state="obsolete"]   { --state-c: var(--c-coral);  --state-bg: var(--c-coral-dim); }
[data-state="superseded"] { --state-c: var(--c-violet); --state-bg: var(--c-violet-dim); }
