/* =========================================================================
 * TSync Intelligence v4.0.2 — Design Tokens
 *
 * Single source of truth for the TSync visual identity (spec §14.1). Every
 * widget modernisation override (tsync_widget_modernization.css) and every
 * new component MUST consume these CSS custom properties instead of
 * hard-coding values. That keeps the brand coherent and lets us re-skin in
 * one place.
 *
 * Notes:
 *   - Tokens cover colour, typography, spacing, radius, shadow and motion.
 *   - Legacy base CSS still uses hard-coded values; the modernisation
 *     layer (tsync_widget_modernization.css) overrides them, mapping legacy
 *     selectors to these tokens.
 *   - Dark mode is reserved (tokens prefixed --tsync-dark-* are placeholder).
 * ========================================================================= */
:root {
    /* ── Brand colours ───────────────────────────────────────────────── */
    /* v4.2.3 — unified brand: TSync teal (was blue). Aligns the legacy
     * --tsync-color-primary palette with the modern --tsx-brand used by
     * the design system, login, and error pages. */
    --tsync-color-primary:       #0d7a8a;   /* TSync teal */
    --tsync-color-primary-600:   #0a626f;
    --tsync-color-primary-700:   #084d59;
    --tsync-color-primary-50:    #e6f7f9;
    --tsync-color-primary-hover: #0a626f;
    /* NB: the Tailwind `primary` scale defaults (--tsx-primary-50..900, R G B triplets) live in
     * resources/css/tailwind.css → compiled into assets/builds/tailwind.css (co-located with the
     * tw-*-primary utilities that consume them, so they resolve on every page). The Theme Manager
     * overrides them per client re-brand. [task #17] */

    --tsync-color-success:       #16a34a;
    --tsync-color-success-50:    #f0fdf4;
    /* v9.9.7 — was #d97706, which measures 2.91:1 against surface-2: below even the 3:1 a NON-TEXT
       boundary needs, so a warning dot on a card was hard to separate from the card. #cc7005 clears
       3.26:1 and is a shade darker, nothing more. The readable TEXT value is the -text variant above. */
    --tsync-color-warning:       #cc7005;
    --tsync-color-warning-50:    #fffbeb;
    --tsync-color-danger:        #dc2626;
    --tsync-color-danger-50:     #fef2f2;
    --tsync-color-info:          #0891b2;
    --tsync-color-info-50:       #ecfeff;

    /* ── Umplerea butonului plin — a treia valoare a familiei ────────────
       v13.6.4. Aceeași lecție ca la `-text`, în oglindă: culoarea care e corectă ca UMPLERE de pastilă
       sau ca punct de stare nu e destul de închisă ca să poarte text alb deasupra ei. Măsurat, #fff pe:

         --tsync-color-success  #16a34a   3.30 : 1        --tsync-color-info    #0891b2   3.68 : 1
         --tsync-color-warning  #cc7005   3.57 : 1        --tsync-color-danger  #dc2626   4.83 : 1  ✓

       Trei din patru cad sub 4,5:1 — pragul textului normal, care e ce scrie pe un buton. `primary` are
       deja valoarea asta (`--tsync-color-primary-600`, folosită azi doar la `:hover`); familia o
       primește acum întreagă, ca `.btn-success` să nu mai trebuiască să aleagă între a fi lizibil și a
       păstra paleta. Baza NU se întunecă: ea desenează graficele, bordurile și punctele de stare, unde
       pragul e 3:1 și unde o schimbare s-ar vedea peste tot. */
    --tsync-color-success-600:   #15803d;   /* #fff → 5.02:1 */
    --tsync-color-warning-600:   #a85a04;   /* #fff → 5.09:1 */
    --tsync-color-danger-600:    #c81e1e;   /* #fff → 5.74:1 — baza trecea deja (4,83), aliniat pentru simetrie */
    --tsync-color-info-600:      #0b6e87;   /* #fff → 5.84:1 */

    /* ── Neutral / surface ───────────────────────────────────────────── */
    --tsync-color-bg:            #f8fafc;
    --tsync-color-surface:       #ffffff;
    --tsync-color-surface-2:     #f1f5f9;
    --tsync-color-on-brand:      #ffffff;   /* foreground over brand/colored bg */
    --tsync-color-border:        #e2e8f0;
    --tsync-color-border-strong: #cbd5e1;
    --tsync-color-divider:       #e2e8f0;

    /* ── Semantic colours, as TEXT ───────────────────────────────────────
       v9.9.7 — a fill colour and a text colour are not the same value, and treating them as one is how a
       KPI ends up unreadable. Measured on the three light surfaces this palette itself declares:

         --tsync-color-warning  #f59e0b   1.96 : 1   on #f1f5f9   ← the sales-target figure
         --tsync-color-info     #0891b2   3.36 : 1
         --tsync-color-danger   #dc2626   4.41 : 1
         --tsync-color-text-muted #64748b 4.34 : 1   ← every "muted" label in the product

       WCAG AA asks 4.5:1 for normal text and 3:1 for a non-text boundary — so the same amber that is FINE
       as a 4px accent bar or a status dot is nowhere near readable as a number. Rather than darken the base
       (which would flatten every badge fill and chart series in the product), the palette now carries a
       second value per semantic, used only where the colour becomes text.

       The worst realistic background is not white: it is the 12% tint a badge paints over `surface-2`.
       Each value below was checked against that composite too, and clears 4.9:1 at worst. */
    --tsync-color-warning-text:  #92400e;   /* 6.47:1 on surface-2, 5.96:1 on its own badge tint */
    --tsync-color-danger-text:   #b91c1c;   /* 5.91:1 · 4.91:1 */
    --tsync-color-info-text:     #155e75;   /* 6.63:1 · 5.79:1 */
    --tsync-color-success-text:  #166534;   /* 6.51:1 · 5.74:1 */
    /* v13.6.4 — the fifth member the family never had. The brand teal as TEXT on its own `-50` tint
       measures 4.57:1, which passes but with nothing to spare; this is the existing `primary-hover`
       value, not a new colour, and it clears 6.37:1 on the tint and 6.41:1 on surface-2. */
    --tsync-color-primary-text:  #0a626f;

    /* ── Text ────────────────────────────────────────────────────────── */
    --tsync-color-text:          #0f172a;
    --tsync-color-text-secondary:#475569;
    /* Was #64748b — 4.34:1 on surface-2, i.e. failing on the surface most cards actually sit on, for the
       ONE token every small grey label in the product resolves to. #5b6b7d clears 4.99:1 there. */
    --tsync-color-text-muted:    #5b6b7d;
    --tsync-color-text-inverse:  #ffffff;
    --tsync-color-link:          var(--tsync-color-primary);
    --tsync-color-link-hover:    var(--tsync-color-primary-700);

    /* ── Typography ──────────────────────────────────────────────────── */
    --tsync-font-family:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --tsync-font-family-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --tsync-font-size-xs:        12px;
    --tsync-font-size-sm:        13px;
    --tsync-font-size-base:      14px;
    --tsync-font-size-md:        15px;
    --tsync-font-size-lg:        17px;
    --tsync-font-size-xl:        20px;
    --tsync-font-size-2xl:       24px;
    --tsync-font-size-3xl:       30px;

    --tsync-font-weight-regular: 400;
    --tsync-font-weight-medium:  500;
    --tsync-font-weight-semi:    600;
    --tsync-font-weight-bold:    700;

    --tsync-line-height-tight:   1.2;
    --tsync-line-height-normal:  1.5;
    --tsync-line-height-loose:   1.75;

    /* ── Spacing scale (8px grid) ────────────────────────────────────── */
    --tsync-space-0:             0;
    --tsync-space-1:             4px;
    --tsync-space-2:             8px;
    --tsync-space-3:             12px;
    --tsync-space-4:             16px;
    --tsync-space-5:             20px;
    --tsync-space-6:             24px;
    --tsync-space-8:             32px;
    --tsync-space-10:            40px;
    --tsync-space-12:            48px;
    --tsync-space-16:            64px;

    /* ── Radius ─────────────────────────────────────────────────────────
       v13.6.6 — FOAIA ASTA E ACUM SINGURA SURSĂ A SCĂRII. Trei foi o declarau, toate la `:root`, fără
       calificator de temă, iar câștigătorul îl decidea ordinea de încărcare: `tsync-theme.min.css` (#9),
       foaia asta (#11), `ui-kit.css` (#26). **Ultima câștiga**, și ultima era a unui modul OPȚIONAL —
       emisă din cârligul `app_admin_head` al bootstrap-ului `tsync_ui_kit`, deci absentă în clipa în care
       modulul e dezactivat. Măsurat blocând acea foaie: **cinci tokeni se mișcau tăcut**, iar
       `--tsync-shadow` rămânea **gol**.
       **Valorile de mai jos sunt CELE CARE SE RANDAU** — preluate din ui-kit fără nicio modificare, ca
       mutarea să fie de proprietate, nu de aspect. `getComputedStyle` dă identic înainte și după. */
    --tsync-radius-none:         0;
    --tsync-radius-sm:           6px;   /* era 4px aici; 6px e ce se randa, din ui-kit */
    --tsync-radius:              8px;   /* fără sufix — folosit de foaia ui-kit, declarat doar acolo */
    --tsync-radius-md:           8px;
    --tsync-radius-lg:           12px;
    --tsync-radius-xl:           16px;
    --tsync-radius-pill:         9999px;

    /* ── Elevation / shadows ─────────────────────────────────────────────
       ATENȚIE LA TREAPTA `md`, și e deliberat NEATINSĂ aici: până acum `xs`/`sm`/`lg` veneau din ui-kit
       iar `md`/`xl` de aici, deci scara urca 2 → 4 → **8** → 32 → 40 px de rază, cu un salt la `md → lg`
       produs de proveniența mixtă. Acum că toate stau în același loc, **saltul e o alegere vizibilă, nu
       un accident** — dar se decide separat, cu ochii pe ecran, fiindcă `--tsync-shadow-md` e cea mai
       folosită dintre umbre (12 utilizări) și orice schimbare acolo atinge cele mai multe suprafețe.
       Schimbând-o aici, n-ar mai fi atribuibilă. */
    --tsync-shadow-xs:           0 1px 2px rgba(15,23,42,.05);
    --tsync-shadow-sm:           0 2px 4px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --tsync-shadow:              0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
    --tsync-shadow-md:           0 4px 8px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --tsync-shadow-lg:           0 12px 32px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.05);
    --tsync-shadow-xl:           0 20px 40px rgba(15, 23, 42, .12);
    --tsync-shadow-inset:        inset 0 1px 2px rgba(15, 23, 42, .08);

    /* ── Motion ─────────────────────────────────────────────────────── */
    --tsync-motion-fast:         120ms;
    --tsync-motion-base:         200ms;
    --tsync-motion-slow:         320ms;
    --tsync-motion-ease:         cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Z-index scale ──────────────────────────────────────────────── */
    --tsync-z-base:              0;
    --tsync-z-dropdown:          1000;
    --tsync-z-sticky:            1020;
    --tsync-z-fixed:             1030;
    --tsync-z-modal-backdrop:    1040;
    --tsync-z-modal:             1050;
    --tsync-z-popover:           1060;
    --tsync-z-tooltip:           1070;
    --tsync-z-toast:             1080;

    /* ── Component-specific (semantic shorthands) ────────────────────── */
    --tsync-card-bg:             var(--tsync-color-surface);
    --tsync-card-border:         var(--tsync-color-border);
    --tsync-card-shadow:         var(--tsync-shadow-sm);
    --tsync-card-radius:         var(--tsync-radius-lg);
    --tsync-card-padding:        var(--tsync-space-5);

    --tsync-button-radius:       var(--tsync-radius-md);
    --tsync-input-radius:        var(--tsync-radius-md);
    /* v13.6.5 — era `--tsync-color-border-strong` (#cbd5e1, **1,36:1**). Bordura unui `<input>` NU e o
       linie decorativă: e granița unui control, deci pragul ei e 3:1, nu zero. Măsurat viu, câmpurile
       rămâneau la 1,48:1 chiar după ce stratul de modernizare le declara altă bordură — fiindcă
       `input.form-control` (0,0,1,1) bate un `.form-control` (0,0,1,0) scris mai jos. Se repară ÎN
       TOKEN, unde specificitatea nu mai are cuvânt. */
    --tsync-input-border:        var(--tsync-control-border);
    --tsync-input-focus:         var(--tsync-color-primary);

    /* ── Inelul de focus ─────────────────────────────────────────────────
       v13.6.4. Nicio culoare nu trece 3:1 pe AMBELE teme — măsurat: teala mărcii dă 4,60:1 pe cea mai
       rea suprafață deschisă și 2,06:1 pe cea mai rea suprafață întunecată; teala deschisă face exact
       invers (1,55 și 6,09). De aceea inelul e un TOKEN, nu un literal, și de aceea se desenează în
       două tonuri: un halou de culoarea suprafeței lipit de control, apoi inelul propriu-zis. Dacă
       elementul stă pe un fundal neprevăzut — un buton colorat, o bară închisă — cel puțin unul dintre
       cele două tonuri contrastează cu ce e dedesubt. */
    --tsync-focus-ring:          #0d7a8a;   /* 5.04 pe alb · 4.60 pe surface-2 · 4.82 pe bg */

    /* ── Granița unui CONTROL, separată de a unei linii decorative ───────
       v13.6.5 — adăugat după TRECEREA VIE, care a arătat că v13.6.4 reparase jumătatea greșită.
       `--tsync-color-border-strong` (#cbd5e1) măsoară **1,36:1** pe cea mai rea suprafață deschisă:
       perfect pentru un separator, mult sub cele 3:1 pe care le cere granița unui control (1.4.11).
       Se declară un token propriu, ca alegerea între «linie» și «margine de control» să fie explicită
       și să nu mai fie ghicită de la caz la caz. */
    --tsync-control-border:      #5b6b7d;   /* 4.99:1 pe cea mai rea suprafață deschisă */
    --tsync-focus-halo:          var(--tsync-color-surface);

    --tsync-table-row-hover:     var(--tsync-color-surface-2);
    --tsync-table-border:        var(--tsync-color-border);
}

/* Dark-mode token reservation (not active by default; activated by adding
   `data-tsync-theme="dark"` to <html>). */
/* v11.6.7 — THE DARK BLOCK ANSWERED AN ATTRIBUTE NOBODY SETS.
 *
 * This was written for `[data-tsync-theme="dark"]`, but the admin's dark theme is
 * `html[data-theme="dark"]` — a different attribute. So even once the sheet loads, its night half
 * would never apply, and every status colour would keep its light value on a dark surface.
 *
 * Both selectors are kept: the original in case anything sets it, and the one the product really
 * uses. `prefers-color-scheme` is deliberately NOT among them — this admin's dark mode is opt-in
 * via the attribute, and a machine whose OS is dark would otherwise get dark tokens inside a light
 * page. */
[data-tsync-theme="dark"],
html[data-theme="dark"] {
    --tsync-color-bg:            #0f172a;
    --tsync-color-surface:       #1e293b;
    --tsync-color-surface-2:     #334155;
    --tsync-color-border:        #334155;
    --tsync-color-text:          #f1f5f9;
    --tsync-color-text-secondary:#cbd5e1;
    /* v9.9.7 — was #94a3b8, which is 5.71:1 on this block's `surface` but only 4.04:1 on its
       `surface-2` (#334155), the darker card. #a3b1c4 clears 4.75:1 on both. This block is a RESERVATION
       (activated by `data-tsync-theme="dark"`, not by the shipped night mode) — fixed anyway, because a
       reserved palette is what somebody will switch on without re-measuring. */
    --tsync-color-text-muted:    #a3b1c4;

    /* v13.6.4 — THE NIGHT HALF REPEATED, ON A DARK SURFACE, THE EXACT MISTAKE THE LIGHT HALF WARNS ABOUT.
     *
     * v9.9.7 wrote "on a dark surface the bright base IS the readable choice" and pointed every text
     * variant back at the FILL colour. It is not readable, and the light block twenty lines above says
     * why in its own words: *a fill colour and a text colour are not the same value*. The bright base was
     * chosen to be legible against WHITE; a dark surface is the other direction, and moving the background
     * does not move the foreground with it.
     *
     * Measured, base value against the three surfaces THIS BLOCK declares (worst of the three):
     *
     *   --tsx-green  #16a34a   3.14 : 1        --tsx-red    #dc2626   2.14 : 1   ← worst in the product
     *   --tsx-blue   #0891b2   2.81 : 1        --tsx-amber  #cc7005   2.90 : 1
     *
     * Not one clears 4.5:1; two do not clear even the 3:1 a NON-TEXT boundary needs. And on the tinted
     * pill these same tokens usually sit on (`--tsx-*-tint`, 18 % of the base over the surface) it is
     * worse again: 2.07 : 1 for red.
     *
     * ~180 call sites read `--tsx-*-text`, so this is one correction and not a sweep. The values below are
     * the 300-level shade of each semantic, checked against surface / surface-2 / bg BOTH bare and over
     * the tint — worst case 5.26 : 1, best 12.71 : 1.
     *
     * `--tsync-color-*-text` is corrected in the same movement. It is read by NOTHING today, which is
     * precisely why it drifted: a token nobody consumes is never seen to be wrong. `.label-*` and
     * `.alert-*` start reading it in this version. */
    --tsync-color-warning-text:  #fcd34d;   /* pe tinta 6.13:1 · pe suprafata simpla 7.18:1 */
    --tsync-color-danger-text:   #fca5a5;   /* 5.26 · 5.46 */
    --tsync-color-info-text:     #67e8f9;   /* 6.00 · 7.14 */
    --tsync-color-success-text:  #86efac;   /* 6.03 · 7.37 */
    --tsync-color-primary-text:  #7dd3e8;   /* 5.42 · 6.09 — teal, nu cyan: pastila ramine pe marca */
    --tsx-green-text: var(--tsync-color-success-text);
    --tsx-amber-text: var(--tsync-color-warning-text);
    --tsx-red-text:   var(--tsync-color-danger-text);
    --tsx-blue-text:  var(--tsync-color-info-text);

    /* Fundalul de pastila/alertă trebuie să se întunece ODATĂ cu textul, altfel perechea se rupe: până
       aici `--tsync-color-*-50` rămânea valoarea DESCHISĂ (#f0fdf4 …) și pe tema de noapte, deci
       `.label-success` era verde pe alb în mijlocul unui ecran întunecat — cele 3,15:1 măsurate pe 400.
       Sînt aceleași tinte pe care le declară deja familia `--tsx-*`, ca să nu existe două valori. */
    --tsync-color-success-50:    var(--tsx-green-tint);
    --tsync-color-warning-50:    var(--tsx-amber-tint);
    --tsync-color-danger-50:     var(--tsx-red-tint);
    /* `--tsx-blue-tint` NU merge aici, deși ar fi fost reflexul: familia `--tsx-blue` e albastrul
       #2563eb, iar `--tsync-color-info` e cyanul #0891b2. Tinta ar fi fost dintr-o culoare, textul din
       alta — trece pragul (6,41:1), și tot e o pastilă cyan pe un fundal albastru. Aceeași construcție
       ca surorile ei, din propria bază. */
    --tsync-color-info-50:       rgba(8, 145, 178, 0.18);
    --tsync-color-primary-50:    rgba(13, 122, 138, 0.18);

    /* Inelul de focus se răstoarnă odată cu fundalul: 8,61:1 pe surface, 6,09:1 pe surface-2,
       10,50:1 pe bg. Teala mărcii ar fi dat 2,06:1 pe cea mai rea dintre ele. */
    --tsync-focus-ring:          #7dd3e8;
    /* Măsurat pe suprafețele pe care `tsync-dark-mode.css` chiar le pictează — #2a2f38 (control),
       #262b34 (card), #1b1f27 (pagină), #1e222a (bara de sus). Bordura livrată acolo, #3a414d, dă
       **1,31 · 1,38 · 1,61 · 1,55** — niciuna nu atinge 3. #7a8798 dă 3,68:1 în cel mai rău caz. */
    --tsync-control-border:      #7a8798;
    --tsync-input-border:        var(--tsync-control-border);
    --tsync-focus-halo:          var(--tsync-color-surface);

    /* v11.6.7 — the dark half. A light tint under a bright colour would glare, so the tint is the
       colour itself at low alpha over the dark surface, and the border a little stronger. Alpha
       rather than a fixed hex, so it composites correctly over whichever surface it lands on. */
    --tsx-green-tint:   rgba(22, 163, 74, 0.18);
    --tsx-amber-tint:   rgba(204, 112, 5, 0.18);
    --tsx-red-tint:     rgba(220, 38, 38, 0.18);
    --tsx-blue-tint:    rgba(37, 99, 235, 0.18);

    --tsx-green-border: rgba(22, 163, 74, 0.38);
    --tsx-amber-border: rgba(204, 112, 5, 0.38);
    --tsx-red-border:   rgba(220, 38, 38, 0.38);
    --tsx-blue-border:  rgba(37, 99, 235, 0.38);

    /* v13.1.5 -- jumatatea de noapte a celor doua de mai jos. `--tsx-amber-strong` primeste #92400e,
       adica exact ce se randeaza azi pe intunecat: bara „Vezi ca" isi scrisese propria regula
       `html[data-theme="dark"]` pentru asta. Mutata in token, regula aceea dispare -- si odata cu ea
       si posibilitatea ca cele doua sa se desincronizeze. Marginea de brand urmeaza familia ei:
       alfa peste suprafata, nu un hex deschis care ar ramine deschis pe fond intunecat. */
    --tsx-amber-strong: #92400e;
    --tsx-brand-border: rgba(13, 122, 138, 0.38);
}

/* =========================================================================
 * v4.2.2 — Global --tsx-* aliases.
 *
 * Why this exists:
 *   The v4.1.8 modern design system (assets/css/tsync-admin-modern.css)
 *   defines tokens inside `.tsx-scope { --tsx-brand: ...; ... }` so they're
 *   only available on opt-in modern pages. The v4.2.1 governance sweep
 *   replaced hex literals in unscoped views (login, error, db-upgrade,
 *   forgot-password) with `var(--tsx-*)`, which broke the brand on those
 *   pages because the tokens never resolved.
 *
 * Fix: re-declare the same --tsx-* names at :root scope so any page using
 * them keeps the brand colors even without `.tsx-scope`. Mirrors the
 * scoped definitions in tsync-admin-modern.css.
 * ========================================================================= */
:root {
    /* Neutral 9-step (Zinc) — mirrors tsync-admin-modern.css .tsx-scope */
    --tsx-n-50:  #fafafa;
    --tsx-n-100: #f4f4f5;
    --tsx-n-200: #e4e4e7;
    --tsx-n-300: #d4d4d8;
    --tsx-n-400: #a1a1aa;
    --tsx-n-500: #71717a;
    --tsx-n-600: #52525b;
    --tsx-n-700: #3f3f46;
    --tsx-n-800: #27272a;
    --tsx-n-900: #18181b;

    /* Brand teal — TSync */
    --tsx-brand:        #0d7a8a;
    --tsx-brand-hover:  #0a626f;
    --tsx-brand-tint:   rgba(13, 122, 138, 0.08);
    --tsx-brand-tint-2: rgba(13, 122, 138, 0.14);

    /* Semantic */
    --tsx-green: #16a34a;
    --tsx-amber: #cc7005;   /* was #d97706 — 2.91:1 as a boundary on surface-2, below the 3:1 minimum */
    --tsx-red:   #dc2626;
    --tsx-blue:  #2563eb;

    /* v9.9.7 — the same split for the `--tsx-*` twin palette. As text on #f1f5f9 the bases measure
       green 3.01, amber 2.91, red 4.41, blue 4.72 — three of four below AA. */
    --tsx-green-text: #166534;   /* 6.51:1 */

    /* SUPRAFATA PLINA CU TEXT DESCHIS. `--tsx-green` (#16a34a) da doar 3,30:1 cu alb -- destul pentru
       o bara sau o bordura (pragul de componenta e 3:1), prea putin pentru text pe ea. Valoarea asta a
       trait pina acum ca suprascriere in `tsync-admin-modern.css`, deci proteja doar paginile care
       incarcau foaia aia; e promovata aici ca sa fie a tuturor. Alb pe ea = 5,02:1. */
    --tsx-green-strong: #15803d;

    /* v13.1.5 -- ACEEASI RATIUNE, PENTRU CHIHLIMBAR. `--tsx-amber` (#cc7005) da 3,57 cu alb: destul
     * pentru o bara sau o margine (pragul de LIMITA e 3:1), prea putin pentru text pe ea (4,5).
     * Masurat, doua pastile purtau azi text alb sub prag prin rezerva lor: `.tsx-sla-badge.is-ok`
     * 3,30 si `.is-warning` 3,19. Nu e o culoare noua -- #b45309 e fix rezerva pe care bara
     * „Vezi ca" o foloseste deja, iar #92400e e cea pe care si-o scrisese de mina pentru noapte.
     * Alb pe amindoua = 5,02 si mai mult. */
    --tsx-amber-strong: #b45309;

    /* Marginea palida a familiei brand, sora cu `--tsx-*-border`. Valoarea e exact rezerva folosita
       azi de nodul activ din arborele de articole, deci pe tema deschisa nu se schimba nimic. */
    --tsx-brand-border: #b2dde2;

    /* v13.0.3 — ALIASURI pentru nume folosite in arbore si definite nicaieri.
       Un `var()` pe un token nedefinit cade pe rezerva DE FIECARE DATA, deci valoarea ramine fixa si tema
       n-o poate atinge. Cind un asemenea nume picteaza FUNDALUL iar textul de deasupra vine dintr-un token
       care se inverseaza, perechea se rupe pe jumatate: pe intunecat iese deschis pe deschis. Masurate 7
       astfel de perechi.
       Sint aliasuri, nu culori noi: `--tsx-red-tint` e exact `#fee2e2` si `--tsx-amber-tint` exact
       `#fef3c7`, adica fix rezervele pe care le inlocuiesc — deci pe tema deschisa nu se schimba nimic.
       Fiind scrise cu `var()`, urmeaza automat redefinirea din fiecare tema; nu se dubleaza in dark. */
    --tsx-surface-2:  var(--tsx-bg-subtle);
    --tsx-red-bg:     var(--tsx-red-tint);
    --tsx-amber-bg:   var(--tsx-amber-tint);
    --tsx-warning-bg: var(--tsx-amber-tint);
    --tsx-brand-50:   var(--tsx-brand-tint);
    --tsx-text-muted: var(--tsx-n-500);
    --tsx-amber-text: #92400e;   /* 6.47:1 */
    --tsx-red-text:   #b91c1c;   /* 5.91:1 */
    --tsx-blue-text:  #1d4ed8;   /* 6.12:1 */

    /* v11.6.7 — THE MISSING HALF OF A STATUS CHIP.
     *
     * The palette had a fill colour and a text colour and nothing to put behind the text, so 91 rules
     * across 32 views wrote `background: var(--tsx-red); color: var(--tsx-red)` — the same value twice,
     * 1.00:1, invisible. They have never been seen because this sheet has never loaded on an admin
     * page; switching it on without these tokens is what would have made them visible as blanks.
     *
     * A chip is TINT behind TEXT, with a border a step darker than the tint — never the full-strength
     * colour behind its own text. Measured as text on the tint, all four clear AA. */
    --tsx-green-tint:   #dcfce7;
    --tsx-amber-tint:   #fef3c7;
    --tsx-red-tint:     #fee2e2;
    --tsx-blue-tint:    #dbeafe;

    --tsx-green-border: #bbf7d0;
    --tsx-amber-border: #fde68a;
    --tsx-red-border:   #fecaca;
    --tsx-blue-border:  #bfdbfe;

    /* Surfaces */
    --tsx-bg:        #ffffff;
    --tsx-bg-page:   #fafafa;
    --tsx-bg-subtle: #f4f4f5;
}
