/* ============================================================
   DeclaSure, tokens de design (direcția Cerneală, semnul C1)
   Versiunea 1.0, 22 septembrie 2026, AMPLIO pentru DeclaSure

   Se încarcă ÎNAINTEA oricărui alt CSS al aplicației.
   Partea a doua (aliasuri) păstrează variabilele vechi din
   public/styles.css, ca aplicația să preia noul brand fără
   rescrierea claselor generate de app.js.
   ============================================================ */

/* ---------- fonturi, găzduite local (licență OFL) ---------- */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/declasure-brand/fonts/Fraunces-normal-300-900-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/declasure-brand/fonts/Fraunces-normal-300-900-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 900; font-display: swap;
  src: url("/assets/declasure-brand/fonts/Fraunces-italic-300-900-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 900; font-display: swap;
  src: url("/assets/declasure-brand/fonts/Fraunces-italic-300-900-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("/assets/declasure-brand/fonts/IBMPlexSans-normal-100-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("/assets/declasure-brand/fonts/IBMPlexSans-normal-100-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/declasure-brand/fonts/IBMPlexSans-italic-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/declasure-brand/fonts/IBMPlexSans-italic-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ---------- 1. culori de bază ---------- */
  --ds-ink:        #141318;  /* cerneala: text principal, butoane primare, linii de structură */
  --ds-ink-hover:  #34333C;  /* cerneala la hover / active */
  --ds-ink-2:      #4A4950;  /* text secundar, descrieri */
  --ds-muted:      #5A5960;  /* etichete, note, text de ajutor */
  --ds-paper:      #EFEEE9;  /* fundalul aplicației */
  --ds-panel:      #FFFFFF;  /* carduri, tabele, formulare */
  --ds-line:       #C9C8C0;  /* borduri și separatoare */
  --ds-line-2:     #B3B2AA;  /* borduri mai apăsate: inputuri, tabele */
  --ds-selected:   #F4EEE7;  /* rând selectat, element activ */
  --ds-th:         #F4F3EE;  /* antet de tabel */
  --ds-grey-soft:  #E4E3DD;  /* badge neutru, fundal secundar */

  /* ---------- 2. culori de semnificație ---------- */
  --ds-brick:       #C23E1F;  /* DIFERENȚA. Se folosește numai pentru diferențe, erori și accentul de brand */
  --ds-brick-hover: #9E3218;
  --ds-brick-soft:  #F6DED6;
  --ds-brick-text:  #A83315;  /* text mic pe brick-soft sau pe hârtie: 5,2:1 */
  --ds-brick-bg:    #FBF1EC;  /* fundalul rândului de detaliu al unei diferențe */
  --ds-ok:          #2F7A50;  /* potrivit, verificat, oficial */
  --ds-ok-soft:     #DCEBE1;
  --ds-ok-text:     #256540;  /* text mic pe ok-soft: 5,6:1 */
  --ds-warn:        #805709;  /* preliminar, de revizuit; 5,5:1 pe hârtie, 5,2:1 pe warn-soft */
  --ds-warn-soft:   #F3E6C8;
  --ds-focus:       #141318;  /* inelul de focus */

  /* ---------- 3. tipografie ---------- */
  --ds-font-ui:      "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --ds-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ds-text-xs: 12px;   /* note, surse sub cifre */
  --ds-text-sm: 13px;   /* etichete, badge-uri, antete de tabel */
  --ds-text-md: 15px;   /* corpul de text al aplicației */
  --ds-text-lg: 17px;   /* text evidențiat, nume de card */
  --ds-title-sm: 20px;  /* titluri de grup, Fraunces */
  --ds-title-md: 26px;  /* titluri de pagină, Fraunces */
  --ds-title-lg: 34px;  /* tagline, hero, Fraunces */
  --ds-weight-regular: 400;
  --ds-weight-medium: 500;
  --ds-weight-semibold: 600;
  --ds-weight-bold: 700;
  --ds-leading-tight: 1.15;  /* titluri */
  --ds-leading-normal: 1.4;  /* corp */
  --ds-leading-loose: 1.55;  /* paragrafe lungi */
  --ds-tracking-caps: 0.06em; /* etichete cu majuscule */

  /* ---------- 4. spațiere (multipli de 4) ---------- */
  --ds-space-1: 4px;  --ds-space-2: 8px;  --ds-space-3: 12px; --ds-space-4: 16px;
  --ds-space-5: 20px; --ds-space-6: 24px; --ds-space-8: 32px; --ds-space-10: 40px; --ds-space-12: 48px;

  /* ---------- 5. forme ---------- */
  --ds-radius-0: 0;    /* colțuri drepte: carduri, tabele, butoane, inputuri */
  --ds-radius-1: 2px;  /* singura rotunjire permisă: badge-uri, chip-uri */
  --ds-radius-full: 999px; /* avatar */
  --ds-border-1: 1px;
  --ds-border-2: 1.5px; /* inputuri, butoane secundare, context */
  --ds-border-3: 2px;   /* bara de sus, antet de tabel, linia de sus a cardurilor */
  --ds-border-4: 4px;   /* linia de sus a cardului de login, bara laterală a detaliului */
  --ds-shadow: none;    /* Cerneală nu folosește umbre; ierarhia vine din linii */
  --ds-focus-ring: 0 0 0 2px var(--ds-panel), 0 0 0 4px var(--ds-focus);

  /* ---------- 6. mișcare ---------- */
  --ds-motion-fast: 120ms;
  --ds-motion-base: 200ms;
  --ds-ease: cubic-bezier(.2, 0, 0, 1);

  /* ============================================================
     ALIASURI DE COMPATIBILITATE cu public/styles.css (audit 21.09.2026).
     Vechile variabile primesc noile valori. Nu se șterg până când
     stilurile vechi nu au fost migrate pe --ds-*.
     ============================================================ */
  --bg:            var(--ds-paper);
  --panel:         var(--ds-panel);
  --ink:           var(--ds-ink);
  --muted:         var(--ds-muted);
  --line:          var(--ds-line);
  --brand:         var(--ds-ink);
  --brand-deep:    var(--ds-ink-hover);
  --brand-dark:    var(--ds-ink);
  --brand-soft:    var(--ds-grey-soft);
  --accent:        var(--ds-brick);
  --danger:        var(--ds-brick);
  --warn:          var(--ds-warn);
  --ok:            var(--ds-ok);
  --shadow:        var(--ds-shadow);
  --font-interface: var(--ds-font-ui);
  --font-display:   var(--ds-font-display);
}

/* Baza documentului: se aplică o singură dată, la nivel de pagină */
html { color-scheme: light; }
body { font-family: var(--ds-font-ui); font-size: var(--ds-text-md); line-height: var(--ds-leading-normal); color: var(--ds-ink); background: var(--ds-paper); font-variant-numeric: tabular-nums; }
h1, h2, h3, .ds-display { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); line-height: var(--ds-leading-tight); letter-spacing: -0.01em; color: var(--ds-ink); }
:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
@media (prefers-reduced-motion: reduce) { :root { --ds-motion-fast: 0ms; --ds-motion-base: 0ms; } }
