/* ============================================================
   CuraSovo — Design Tokens
   Foundation layer. No component styles here.
   All values are CSS custom properties → handoff-friendly
   for the FastAPI/Jinja build (drop into :root, no inline styles).
   ============================================================ */

:root {
  /* ---- Brand -------------------------------------------------
     Derived from the CuraSovo infinity mark (purple → teal).
     Purple is the single interactive/brand colour.
     Teal is a quiet secondary used for trust & accents only. */
  --brand:            #5b53b5;   /* primary — actions, active nav, links   */
  --brand-rgb:        91,83,181; /* @kind color */
  --brand-600:        #4f48a3;   /* hover                                   */
  --brand-700:        #423c8a;   /* pressed                                 */
  --brand-tint:       #ecebf8;   /* soft fill behind brand elements         */
  --brand-tint-2:     #f5f4fb;   /* faintest brand wash                     */
  --brand-ring:       #c9c5ee;   /* focus ring                              */

  --teal:             #3f8e8c;   /* secondary / trust marker                */
  --teal-tint:        #e3f1f0;
  --teal-700:         #2f6f6d;

  /* ---- Neutrals (cool slate, calm & Swiss, not cold-clinical) */
  --bg:               #f6f7f9;   /* app canvas                              */
  --surface:          #ffffff;   /* cards                                   */
  --surface-2:        #f1f3f6;   /* inset / hover rows / skeleton base      */
  --surface-3:        #e9ecf1;
  --border:           #e4e7ec;   /* hairline                                */
  --border-2:         #d4d9e1;   /* stronger divider                        */
  --border-strong:    #c2c9d3;

  --text:             #1f2530;   /* primary ink (cool near-black)           */
  --text-2:           #5b6573;   /* secondary                               */
  --text-3:           #8b95a3;   /* muted / meta                            */
  --text-4:           #aab1bd;   /* faint / de-emphasized (placeholders)    */
  --text-on-brand:    #ffffff;

  /* ---- Status pills (semantics fixed by spec §8) -------------
     Each: --*-bg / --*-bd (darker border) / --*-fg (readable ink) */
  --st-read-bg:   #dbeafe;  --st-read-bd:  #93c0f7;  --st-read-fg:  #1e4e8c; /* Eingelesen */
  --st-draft-bg:  #f3f4f6;  --st-draft-bd: #cdd2da;  --st-draft-fg: #4b5360; /* Entwurf    */
  --st-open-bg:   #dbeafe;  --st-open-bd:  #93c0f7;  --st-open-fg:  #1e4e8c; /* Offen      */
  --st-over-bg:   #fecdd3;  --st-over-bd:  #f59aa6;  --st-over-fg:  #9f1f33; /* Überfällig */
  --st-part-bg:   #ffedd5;  --st-part-bd:  #f7c98c;  --st-part-fg:  #9a5710; /* Teilweise  */
  --st-paid-bg:   #dcfce7;  --st-paid-bd:  #95d8ad;  --st-paid-fg:  #1d6b3f; /* Bezahlt    */
  --st-canc-bg:   #fee2e2;  --st-canc-bd:  #f1b9b9;  --st-canc-fg:  #98443f; /* Storniert  */

  /* ---- Revenue stack (by law) — pastel fills + soft tag bg --- */
  --law-kvg-soft: #e0e7ff;  --law-kvg: #aab0f5;  /* Indigo  */
  --law-uvg-soft: #cffafe;  --law-uvg: #86d4e4;  /* Cyan    */
  --law-ivg-soft: #f3e8ff;  --law-ivg: #cdaaf1;  /* Lavendel*/
  --law-mvg-soft: #fef3c7;  --law-mvg: #f1cb8e;  /* Bernstein*/

  /* ---- Law TAG badges — graduated brand-purple, dark text ---- */
  --tag-kvg-bg: #ece9f8;  --tag-kvg-fg: #423c8a;  /* @kind color */
  --tag-uvg-bg: #ddd9f2;  --tag-uvg-fg: #3d3780;  /* @kind color */
  --tag-ivg-bg: #cbc5ec;  --tag-ivg-fg: #353072;  /* @kind color */
  --tag-mvg-bg: #b8b1e3;  --tag-mvg-fg: #2c2862;  /* @kind color */

  /* ---- Feedback (boxes) -------------------------------------- */
  --hint-bg:  #eef4fd;  --hint-bd: #c5dbf6;  --hint-fg: #1f4d86;  --hint-ic: #2f74d0;  --hint-ic-rgb: 47,116,208; /* @kind color */
  --warn-bg:  #fff7e6;  --warn-bd: #f4d99a;  --warn-fg: #875309;  --warn-ic: #c1810f;
  --ok-bg:    #ecfaf1;  --ok-bd:   #b5e6c6;  --ok-fg:   #1d6b3f;  --ok-ic: #1d8a4f;
  --success: #1d8a4f;  --success-600: #16753f;  --success-700: #105c31;  --success-tint: #ecfaf1;  /* @kind color */
  --drift-bg: #fff7ed;  --drift-bd:#f8cd9a;  --drift-fg:#9a5710;  /* drift row */

  /* ---- Typography -------------------------------------------- */
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-xs:   12px;   /* pill text, micro-meta            */
  --fs-sm:   13px;   /* table cells, secondary           */
  --fs-base: 14px;   /* body                             */
  --fs-md:   15px;
  --fs-lg:   17px;   /* card titles                      */
  --fs-xl:   21px;   /* section / page sub               */
  --fs-2xl:  27px;   /* page title, medium stats         */
  --fs-3xl:  34px;   /* hero stat numbers                */

  --lh-tight: 1.2;   /* @kind font */
  --lh-snug:  1.35;  /* @kind font */
  --lh-base:  1.5;   /* @kind font */

  --fw-regular: 400; /* @kind font */
  --fw-medium:  500; /* @kind font */
  --fw-semi:    600; /* @kind font */
  --fw-bold:    700; /* @kind font */
  --fw-x:       800; /* @kind font */

  --tracking-cap: 0.06em;  /* uppercase labels @kind font */

  /* ---- 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: 48px; --sp-10: 64px;

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

  /* ---- Elevation (soft, low-contrast) ------------------------ */
  --shadow-xs:   0 1px 2px rgba(24,33,51,.05);
  --shadow-card: 0 1px 2px rgba(24,33,51,.04), 0 2px 6px rgba(24,33,51,.05);
  --shadow-pop:  0 6px 16px rgba(24,33,51,.12), 0 2px 6px rgba(24,33,51,.08);

  /* ---- Layout ------------------------------------------------ */
  --sidebar-w: 248px;
  --topbar-h:  60px;
  --content-max: 1240px;

  /* ---- Motion ------------------------------------------------ */
  --ease: cubic-bezier(.4, 0, .2, 1); /* @kind other */
  --t-fast: 120ms; /* @kind other */
  --t-base: 180ms; /* @kind other */
}
