/*
Workspace Theme V.1.0.0
Designed by Live Design
https://livedesign.ro

Same structure and naming as the theme's app-theme.css. The palette is neutral:
near-black ink, cool grey surfaces, green reserved for the primary action.

Token layers, in this order:
  1. raw colours      --lvd-color-*
  2. semantic tokens  --lvd-cc-*      (what a role means, not what colour it is)
  3. component tokens --lvd-wsp-*     (declared inside each module stylesheet)

Components never reference raw colours directly. Restyling the app means editing
layer 2, not hunting through modules.
*/

/*----------------------------- VARIABLES -----------------------------*/
:root
{
/* COLORS */
--lvd-color-text:#3d4249;
--lvd-color-bg:#f2f3f8;
/* One step deeper on the same bluish hue: sections inside the white main panel. */
--lvd-color-bg-deep:#e9ebf3;

/* Ink — neutral near-black, used for headings and primary surfaces */
--lvd-color-ink:#1d2025;
--lvd-color-ink-soft:#33383f;
--lvd-color-ink-on:#ffffff;

/* Primary = the action green from the design */
--lvd-color-primary:#15aa15;
--lvd-color-primary-on:#ffffff;
--lvd-color-primary-dark:#0f960f;
--lvd-color-primary-light:#e6f7ee;
--lvd-color-primary-light-on:#00532a;

/* Neutrals */
--lvd-color-white:#ffffff;
--lvd-color-gray-100:#f6f7f8;
--lvd-color-gray-200:#e9ebee;
--lvd-color-gray-300:#c8cad1;
--lvd-color-gray-350:#b8b9bf;
--lvd-color-gray-400:#9ba1a9;
--lvd-color-gray-500:#6a7079;

/* Status */
/* Intense blue: focus on every form control, and progress. Green stays the action colour. */
--lvd-color-accent:#1f5eff;
--lvd-color-accent-rgb:31, 94, 255;

--lvd-color-success:#00a651;
--lvd-color-success-light:#e6f7ee;
--lvd-color-warning:#e8a300;
--lvd-color-warning-light:#fdf4e0;
/* Chihlimbariul de TEXT. `--lvd-color-warning` (#e8a300) e o culoare de bulină și de bară: pe
   `--lvd-color-warning-light` dă un contrast de 1,98:1, sub pragul de 4,5:1, deci ilizibil ca
   text. Perechea îi lipsea paletei, iar fiecare folosire ar fi inventat alt amber. */
--lvd-color-warning-ink:#9a6100;
--lvd-color-error:#e0464b;
--lvd-color-error-light:#fdeced;
--lvd-color-unknown:#bcc1c8;

/* Semantic tokens */
--lvd-cc-surface:          var(--lvd-color-white);
--lvd-cc-surface-muted:    var(--lvd-color-gray-100);
--lvd-cc-page-bg:          var(--lvd-color-bg);
--lvd-cc-border:           var(--lvd-color-gray-300);
--lvd-cc-border-soft:      var(--lvd-color-gray-200);
/* Field outlines are a step darker than rules: a control has to read as a control. */
--lvd-cc-border-field:     var(--lvd-color-gray-350);
--lvd-cc-title:            var(--lvd-color-ink);
--lvd-cc-text:             var(--lvd-color-text);
--lvd-cc-text-muted:       var(--lvd-color-gray-500);
--lvd-cc-link:             var(--lvd-color-ink);
--lvd-cc-link-hover:       var(--lvd-color-primary);
--lvd-cc-button-bg:        var(--lvd-color-primary);
--lvd-cc-button-text:      var(--lvd-color-primary-on);
--lvd-cc-button-bg-hover:  var(--lvd-color-primary-dark);
--lvd-cc-nav-active-bg:    var(--lvd-color-gray-200);
--lvd-cc-nav-active-text:  var(--lvd-color-ink);
--lvd-cc-value:            var(--lvd-color-primary);

/* Sidebar — exact values from the design, not derived from the neutral ramp:
   the panel and the field inside it are two distinct greys. */
--lvd-cc-sidebar-bg:       #dfe2e6;
--lvd-cc-sidebar-field-bg: #eff1f4;

/* FONTS
   System stack by default: a strict CSP (font-src 'self') rules out CDN fonts.
   To match the design exactly, drop Montserrat woff2 files into
   /assets/fonts/ and uncomment the @font-face block at the end of this file. */
--lvd-primary-font:'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
--lvd-mono-font:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

/* Font size */
--lvd-text-h1:18px;
--lvd-text-h2:15px;
--lvd-text-h3:18px;
--lvd-text-body:14px;
--lvd-text-s1:13px;
--lvd-text-s2:11px;

/* SPACING */
--lvd-gap:16px;
--lvd-space-xs:6px;
--lvd-space-s:10px;
--lvd-space-m:16px;
--lvd-space-l:24px;
--lvd-space-xl:32px;

/* RADIUS — small: panels and controls are squared-off, not pills */
/* Raza badge-urilor, separată de `--lvd-radius-s`. Un badge nu e un control: la rază de
   pastilă arăta ca un buton, iar pe un ecran cu patru badge-uri lângă un buton adevărat ochiul
   nu mai știa pe ce se poate apăsa. 4px spune „etichetă", nu „apasă-mă". */
--lvd-radius-badge:999px;
--lvd-radius-s:4px;
--lvd-radius-m:6px;
--lvd-radius-l:8px;
--lvd-radius-pill:999px;

/* ELEVATION — panels carry a soft, cool-tinted halo rather than a drop shadow: it reads as
   depth on the blue-grey page without a hard lower edge. `--lvd-shadow-tint` is the same
   blue used for the inset of fields and the fade under the page head. */
--lvd-shadow-tint:55, 105, 222;
--lvd-shadow-s:0 0 8px rgba(var(--lvd-shadow-tint), .13);
--lvd-shadow-card:0 1px 2px rgba(0, 0, 0, .1), 0 2px 5px rgba(0, 0, 0, .05);
--lvd-shadow-btn:0 2px 6px rgba(0, 0, 0, .16), 0 0 2px rgba(0, 0, 0, .06);
--lvd-shadow-btn-hover:0 5px 12px rgba(0, 0, 0, .18), 0 0 2px rgba(0, 0, 0, .06);

/* MOTION — one easing for every micro-interaction: quick out, soft landing */
--lvd-ease:cubic-bezier(.2, .8, .2, 1);
--lvd-shadow-m:0 4px 16px rgba(0, 0, 0, .12);

/* LAYOUT */
/* One height for every control on a tools row, so a button and a field line up exactly. */
--lvd-control-height:36px;
--lvd-nav-width:250px;
--lvd-sidebar-width:250px;
--lvd-panel-gap:8px;
--lvd-panel-pad:20px;
}



/*----------------------------- COMMON -----------------------------*/
html            {-webkit-text-size-adjust:100%;}
body            {font-family:var(--lvd-primary-font); font-size:var(--lvd-text-body); line-height:1.5;
                 color:var(--lvd-cc-text); background:var(--lvd-cc-page-bg); -webkit-font-smoothing:antialiased;}

a               {color:var(--lvd-cc-link); text-decoration:none;}
a:hover         {color:var(--lvd-cc-link-hover);}

h1, h2, h3, h4  {color:var(--lvd-cc-title); font-weight:700; line-height:1.25;}

code, pre       {font-family:var(--lvd-mono-font); font-size:var(--lvd-text-s1);}

button          {font-family:inherit; font-size:inherit; cursor:pointer;}

input, select, textarea {font-family:inherit; font-size:var(--lvd-text-body); color:var(--lvd-cc-title);}

/* Autofill keeps the field readable instead of the browser's yellow */
input:-webkit-autofill,
input:-webkit-autofill:focus {-webkit-text-fill-color:var(--lvd-cc-title); -webkit-box-shadow:0 0 0 1000px var(--lvd-color-white) inset;}



/*----------------------------- TYPOGRAPHY -----------------------------*/
.lvd-wsp-page-title    {font-size:var(--lvd-text-h1); letter-spacing:-.01em;}
.lvd-wsp-card-title    {font-size:var(--lvd-text-h2); text-transform:uppercase; letter-spacing:.06em;
                        color:var(--lvd-cc-title); font-weight:700;}
.lvd-wsp-card-lead     {font-size:var(--lvd-text-s1); color:var(--lvd-cc-text-muted); margin-top:var(--lvd-space-xs);}
.lvd-wsp-note          {font-size:var(--lvd-text-s2); color:var(--lvd-color-gray-400); margin-top:var(--lvd-space-s);}
.lvd-wsp-mono          {font-family:var(--lvd-mono-font); font-size:var(--lvd-text-s1); color:var(--lvd-cc-title);}
.lvd-wsp-hint          {font-size:var(--lvd-text-s2); color:var(--lvd-color-gray-400); margin-top:4px;}
.lvd-wsp-req           {color:var(--lvd-color-error);}
/* A required field marks its own label. Derived from the `required` attribute, so the star
   and the browser's check cannot disagree; a label that already carries a hand-written
   `.lvd-wsp-req` is left alone. */
.lvd-wsp-field:has(:required) > .lvd-wsp-label:not(:has(.lvd-wsp-req))::after {
                        content:" *"; color:var(--lvd-color-error);}



/*----------------------------- BUTTONS -----------------------------*/
/* One height for every control that can share a line: buttons, inputs, selects, search
   (`--lvd-control-height`). `min-height`, so a long label may still wrap. */
.lvd-wsp-btn            {display:inline-flex; align-items:center; gap:8px;
                         min-height:var(--lvd-control-height); padding:0 16px;
                         background:var(--lvd-cc-button-bg); color:var(--lvd-cc-button-text);
                         border:1px solid transparent; border-radius:var(--lvd-radius-s);
                         font-size:var(--lvd-text-body); font-weight:700; line-height:20px;
                         white-space:nowrap; cursor:pointer; transition:background .15s ease;}
.lvd-wsp-btn:hover      {background:var(--lvd-cc-button-bg-hover); color:var(--lvd-cc-button-text);}
.lvd-wsp-btn svg        {fill:currentColor;}

.lvd-wsp-btn-block      {width:100%; justify-content:center;}

.lvd-wsp-btn-ghost      {background:transparent; color:var(--lvd-cc-title); border-color:var(--lvd-cc-border);}
.lvd-wsp-btn-ghost:hover{background:var(--lvd-cc-surface-muted); color:var(--lvd-cc-title);}

.lvd-wsp-btn-danger     {background:var(--lvd-color-error);}
.lvd-wsp-btn-danger:hover{background:#c53b40;}

/* Buton rotund, doar icon: „+" și filtrul din barele de listă. Aici, nu în
   module-licence.css, fiindcă e o variantă de buton — orice modul cu o listă îl va
   vrea, iar a doua definiție ar diverge la primul ajustaj de padding.
   `aspect-ratio` în loc de lățime fixă: rămâne cerc dacă se schimbă scara textului. */
.lvd-wsp-btn-round      {padding:0; aspect-ratio:1; width:var(--lvd-control-height); justify-content:center;}

.lvd-wsp-link-btn       {background:none; border:0; padding:0; color:var(--lvd-color-primary);
                         font-size:var(--lvd-text-s1); font-weight:600; text-decoration:underline;}
.lvd-wsp-link-btn:hover {color:var(--lvd-color-primary-dark);}



/*----------------------------- FORMS -----------------------------*/
.lvd-wsp-label          {display:block; font-size:var(--lvd-text-s1); font-weight:600;
                         color:var(--lvd-cc-title); margin-bottom:6px;}

/* Fields are recessed with the same cool inset shade as the header search, and focus in
   the accent blue: border plus a halo, no outline — a hard ring on a rounded field reads
   as a second border. */
.lvd-wsp-input,
.lvd-wsp-select         {width:100%; min-height:var(--lvd-control-height); padding:7px 12px; background:var(--lvd-color-white);
                         border:1px solid var(--lvd-cc-border-field); border-radius:8px;
                         box-shadow:inset 0 3px 7px rgba(var(--lvd-shadow-tint), .13);
                         font-size:var(--lvd-text-body); line-height:20px; color:var(--lvd-cc-title);
                         transition:border-color .15s ease, box-shadow .15s ease;}
/* Fixed height on single-line controls: a date input is otherwise 2px taller than a text
   one, and the two sit on the same row. */
input.lvd-wsp-input:not(.lvd-wsp-input-code),
.lvd-wsp-select         {height:var(--lvd-control-height);}
.lvd-wsp-input::placeholder {color:var(--lvd-color-gray-400); opacity:1;}
.lvd-wsp-input:hover,
.lvd-wsp-select:hover   {border-color:var(--lvd-color-gray-400);}
.lvd-wsp-input:focus,
.lvd-wsp-select:focus,
.lvd-wsp-input:focus-visible,
.lvd-wsp-select:focus-visible {outline:0; border-color:var(--lvd-color-accent);
                         box-shadow:inset 0 3px 7px rgba(var(--lvd-shadow-tint), .08),
                                    0 0 0 3px rgba(var(--lvd-color-accent-rgb), .18);}

/* The native arrow is replaced: it sits at a different inset in every browser and ignores
   the field's padding. The chevron is a background image so the control stays a real
   <select>. */
.lvd-wsp-select         {appearance:none; -webkit-appearance:none; cursor:pointer;
                         padding-right:36px; text-overflow:ellipsis;
                         background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%236a7079' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
                         background-repeat:no-repeat; background-position:right 12px center;}

/*----------------------- SEARCHABLE SELECT -----------------------*/
/* A text field over a real <select> (app-core.js, `data-combobox`): it looks like the select
   it replaces, and its options open under it. The select stays in the form, out of sight. */
.lvd-wsp-combo          {position:relative;}
.lvd-wsp-combo-input    {cursor:text;}
.lvd-wsp-combo-native   {display:none;}
.lvd-wsp-combo-list     {position:absolute; z-index:40; top:calc(100% + 4px); left:0; right:0;
                         max-height:264px; overflow-y:auto; margin:0; padding:4px; list-style:none;
                         background:var(--lvd-cc-surface); border:1px solid var(--lvd-cc-border-soft);
                         border-radius:var(--lvd-radius-l); box-shadow:var(--lvd-shadow-m);}
.lvd-wsp-combo-list[hidden] {display:none;}
.lvd-wsp-combo-option   {padding:7px 10px; border-radius:6px; cursor:pointer;
                         font-size:var(--lvd-text-body); line-height:20px; color:var(--lvd-cc-title);
                         white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.lvd-wsp-combo-option.is-active   {background:var(--lvd-color-bg-deep);}
.lvd-wsp-combo-option.is-selected {font-weight:700;}
.lvd-wsp-combo-empty    {padding:7px 10px; font-size:var(--lvd-text-s1); color:var(--lvd-cc-text-muted);}

.lvd-wsp-input-code     {font-family:var(--lvd-mono-font); font-size:24px; letter-spacing:.4em;
                         text-align:center; padding:14px;}

/* Form wrapper and multi-line fields. Global rather than per-module: the moment a second
   module grew a form, the per-module copy became a class defined in a sheet the page does
   not load — the exact failure `check-css.py` exists to catch, and it caught it here.

   `resize: vertical` because the browser default is `both`, which lets a textarea be
   dragged wider than the card it sits in and breaks the layout around it. */
.lvd-wsp-form           {margin-top:var(--lvd-space-m);}
textarea.lvd-wsp-input  {resize:vertical; min-height:76px;}

/* A date input sized to its content — a full-width one looks like a text field that
   forgot to be filled. Global because Licence and Sites both have date fields; a second
   module using it is exactly how the previous per-module copy became unavailable. */
.lvd-wsp-input-date     {width:auto; padding-left:10px; padding-right:10px;}

/* Plain bullet list inside a card. */
.lvd-wsp-list           {margin:0 0 var(--lvd-space-m); padding-left:20px; list-style:disc;}
.lvd-wsp-list li        {margin-bottom:4px;}

/* `hidden` must win over any component's own `display`.
   The attribute only gets `display:none` from the browser's own stylesheet, at the weakest
   weight there is — so a single class like `.lvd-wsp-field-row {display:grid}` beats it and the
   element stays on screen with `hidden` set. That has now caught us twice: `module-licence.css`
   still carries a one-off patch for the same reason. `!important` is the right tool here rather
   than a code smell: `hidden` means hidden, and there is no case where a component legitimately
   overrules it. */
[hidden]                {display:none !important;}

.lvd-wsp-field          {margin-bottom:var(--lvd-space-m);}
.lvd-wsp-field-row      {display:grid; grid-template-columns:1fr 1fr; gap:var(--lvd-gap);}
.lvd-wsp-form-inline    {display:flex; gap:var(--lvd-space-s); align-items:center; flex-wrap:wrap;
                         margin-top:var(--lvd-space-m);}
.lvd-wsp-form-inline .lvd-wsp-select {width:auto; min-width:280px;}



/*----------------------------- TABLE -----------------------------*/
/* No overflow on the wrap on desktop: a scrolling ancestor would capture the sticky head,
   which has to stick to the main panel instead. Narrow screens get the sideways scroll back
   (see MOBILE) and lose the sticky head, which they could not use anyway. */
.lvd-wsp-table-wrap     {margin-top:var(--lvd-space-m);}

/* Compact grid: every cell is ruled, rows are ~38px. Density is the point — a list screen is
   scanned, not read. `white-space:nowrap` on headers keeps the row height from doubling when
   a column gets narrow.
   Borders are separate, each cell drawing its right and bottom rule: collapsed borders
   belong to the table and would scroll away from under a sticky head. */
.lvd-wsp-table          {width:100%; border-collapse:separate; border-spacing:0;
                         font-size:var(--lvd-text-body); color:var(--lvd-cc-title);
                         border-left:1px solid var(--lvd-cc-border);}
/* The head is a flat tint of the page background. Sticky under the page head, whose height
   `app-core.js` publishes as a custom property; opaque, so rows do not show through. */
.lvd-wsp-table th       {position:sticky; top:var(--lvd-page-head-height, 0px); z-index:2;
                         background:var(--lvd-color-bg);
                         text-align:left; padding:9px 10px;
                         border:solid var(--lvd-cc-border); border-width:1px 1px 1px 0;
                         font-weight:700; white-space:nowrap;}
.lvd-wsp-table td       {padding:8px 10px;
                         border:solid var(--lvd-cc-border); border-width:0 1px 1px 0;
                         vertical-align:middle;}
.lvd-wsp-table tbody tr:hover td {background:var(--lvd-cc-surface-muted);}
/* A column that holds only a state or a number shrinks to its content. */
.lvd-wsp-table .is-tight {width:1%; white-space:nowrap;}
.lvd-wsp-tlink          {font-weight:700; color:var(--lvd-cc-title);}
.lvd-wsp-tlink:hover    {color:var(--lvd-color-primary);}
/* A link to a related record, not the row's own: regular weight, so one column leads. */
.lvd-wsp-tlink.is-plain {font-weight:400;}
/* A record's reference number ("#42"): quiet, fixed-width digits, never wrapped. */
.lvd-wsp-ref           {font-variant-numeric:tabular-nums; color:var(--lvd-cc-text-muted); white-space:nowrap;}
/* As a button, it copies itself to the clipboard. */
button.lvd-wsp-ref     {appearance:none; border:0; background:none; padding:0; font-family:inherit;
                        font-size:inherit; cursor:pointer; border-radius:4px;}
button.lvd-wsp-ref:hover {color:var(--lvd-cc-title); text-decoration:underline;}
button.lvd-wsp-ref:focus-visible {outline:0; box-shadow:0 0 0 3px rgba(var(--lvd-color-accent-rgb), .25);}
/* Inside a cell that holds something else: small, pushed to the right edge. Floated, so the
   cell needs no wrapper and the title keeps wrapping around it. */
.lvd-wsp-ref.is-end    {float:right; margin-left:12px; font-size:var(--lvd-text-s2); line-height:20px;}

/* The link that opens a row's record. At rest it is plain bold text; on hover it lifts into
   a small white card with a pencil, so the row's one real target reads as a button without
   every row carrying one. Negative margins cancel the padding: the text does not shift. */
.lvd-wsp-open           {display:inline-flex; align-items:center; gap:8px;
                         margin:-5px -10px; padding:5px 10px; border-radius:var(--lvd-radius-m);
                         transition:background-color .2s var(--lvd-ease), box-shadow .2s var(--lvd-ease);}
.lvd-wsp-open:hover,
.lvd-wsp-open:focus-visible {background:var(--lvd-cc-surface); color:var(--lvd-cc-title);
                         box-shadow:var(--lvd-shadow-card);}
.lvd-wsp-open-icon      {display:inline-flex; color:var(--lvd-cc-text-muted);
                         opacity:0; transform:translateX(-4px);
                         transition:opacity .2s var(--lvd-ease), transform .2s var(--lvd-ease);}
.lvd-wsp-open-icon svg  {fill:currentColor;}
.lvd-wsp-open:hover .lvd-wsp-open-icon,
.lvd-wsp-open:focus-visible .lvd-wsp-open-icon {opacity:1; transform:none;}
@media (prefers-reduced-motion:reduce)
{
.lvd-wsp-open, .lvd-wsp-open-icon {transition:none;}
}

.lvd-wsp-deflist        {display:grid; grid-template-columns:200px 1fr; gap:0; margin-top:var(--lvd-space-m);
                         font-size:var(--lvd-text-s1);}
.lvd-wsp-deflist dt     {padding:10px 0; color:var(--lvd-cc-text-muted); font-weight:600;
                         border-bottom:1px solid var(--lvd-cc-border-soft);}
.lvd-wsp-deflist dd     {padding:10px 0; color:var(--lvd-cc-title); font-weight:700;
                         border-bottom:1px solid var(--lvd-cc-border-soft);
                         display:flex; align-items:center; gap:var(--lvd-space-s); flex-wrap:wrap;}
.lvd-wsp-deflist dt:last-of-type,
.lvd-wsp-deflist dd:last-of-type {border-bottom:0;}



/*----------------------------- STATUS DOTS & BADGES -----------------------------*/
/* One vocabulary for state across the whole app: the sidebar dot, the table dot
   and the detail badge all read from the same four states. */
.lvd-wsp-dot            {width:8px; height:8px; border-radius:50%; flex-shrink:0; display:inline-block;
                         background:var(--lvd-color-unknown);}
.lvd-wsp-dot.is-ok      {background:var(--lvd-color-success);}
.lvd-wsp-dot.is-warning {background:var(--lvd-color-warning);}
.lvd-wsp-dot.is-critical{background:var(--lvd-color-error);}
.lvd-wsp-dot.is-unknown {background:var(--lvd-color-unknown);}

.lvd-wsp-status         {display:inline-flex; align-items:center; gap:8px; white-space:nowrap;}
.lvd-wsp-status-label   {font-weight:700; color:var(--lvd-cc-title);}

.lvd-wsp-chips          {display:flex; gap:8px; flex-wrap:wrap;}
/* UN SINGUR REGIM DE BADGE pentru toată aplicația.
   Erau patru: `.lvd-wsp-chip` (alb, cu chenar, pastilă — adică forma unui buton),
   `.lvd-wsp-badge` (gri, pastilă), `.lvd-wsp-tag` (mentă, pastilă) și un grup de etichete
   locale cu raze diferite. Patru feluri de a spune același lucru înseamnă că niciunul nu mai
   spune nimic, iar chenarul plus pastila făceau chip-ul să concureze cu butoanele.

   Regula unică: FUNDAL COLORAT, FĂRĂ CHENAR, capsulă (rază completă). Culoarea poartă înțelesul; conturul
   nu adăuga nimic în plus, doar greutate vizuală. Perechile de severitate sunt cele dinainte,
   ca un verde să însemne același lucru în toate ecranele. */
.lvd-wsp-chip,
.lvd-wsp-badge,
.lvd-wsp-tag            {display:inline-block; border:0; border-radius:var(--lvd-radius-badge);
                         font-size:var(--lvd-text-s2); font-weight:700; white-space:nowrap;
                         padding:3px 10px; vertical-align:middle;}

/* Neutru: fundal stins, nu alb-cu-chenar. Alb pe alb avea nevoie de contur ca să existe. */
.lvd-wsp-chip,
.lvd-wsp-badge          {background:var(--lvd-cc-surface-muted); color:var(--lvd-cc-text-muted);}

/* `.lvd-wsp-tag` rămâne menta: e eticheta de PRODUS, iar mentă înseamnă „e în pachet". */
.lvd-wsp-tag            {margin:1px 2px 1px 0;
                         background:var(--lvd-color-primary-light);
                         color:var(--lvd-color-primary-light-on);}

.lvd-wsp-chip.is-ok,       .lvd-wsp-badge.is-ok,       .lvd-wsp-tag.is-ok       {background:var(--lvd-color-success-light); color:#00532a;}
.lvd-wsp-chip.is-warning,  .lvd-wsp-badge.is-warning,  .lvd-wsp-tag.is-warning  {background:var(--lvd-color-warning-light); color:#7a5600;}
.lvd-wsp-chip.is-critical, .lvd-wsp-badge.is-critical, .lvd-wsp-tag.is-critical {background:var(--lvd-color-error-light); color:#8f2226;}
.lvd-wsp-chip.is-unknown,  .lvd-wsp-badge.is-unknown   {background:var(--lvd-cc-surface-muted); color:var(--lvd-cc-text-muted);}
/* A plain fact, not a state ("No project"): outlined and colourless, so it does not compete
   with the status chips beside it. */
.lvd-wsp-chip.is-plain  {background:transparent; color:var(--lvd-cc-text-muted); font-weight:500;
                         box-shadow:inset 0 0 0 1px var(--lvd-cc-border);}



/*----------------------------- TEXT EDITOR -----------------------------*/
/* Bara de deasupra unui textarea cu marcaje. Se lipește de câmp — despărțite, ar arăta ca două
   controale fără legătură, iar butoanele n-ar spune pe ce acționează. */

.lvd-wsp-editor         {display:block;}

/* The real <textarea> stays in the form — it is what gets submitted — but must be neither seen
   nor measured. It cannot use the shared `.lvd-sr-only` helper: that class lives in
   app-core.css, which loads BEFORE app-theme.css, so `.lvd-wsp-input {width:100%}` and
   `textarea.lvd-wsp-input {min-height:76px}` both outrank it. The field kept full width at its
   static position inside a padded card, pushing its right edge past the viewport — a horizontal
   scrollbar on every page with a rich field.

   Hence a dedicated class at (0,2,0), which beats both. Not `display:none`: a `required` field
   that is not rendered makes the browser refuse to submit the form with "an invalid form control
   is not focusable", and the failure is silent to the user. */
.lvd-wsp-input.lvd-wsp-editor-source {
                         position:absolute; width:1px; height:1px; min-height:0;
                         padding:0; margin:-1px; border:0;
                         overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;}

.lvd-wsp-editor-bar     {display:flex; gap:2px; align-items:center; flex-wrap:wrap;
                         padding:3px 4px; border:1px solid var(--lvd-cc-border-field);
                         border-bottom:0;
                         border-radius:8px 8px 0 0;
                         background:var(--lvd-cc-surface-muted);}

/* Zona editabilă împrumută stilul câmpurilor (`.lvd-wsp-input`) și adaugă doar ce-i trebuie:
   înălțime minimă și derulare, ca un text lung să nu împingă formularul în jos la nesfârșit. */
.lvd-wsp-editor-area    {min-height:5.5em; max-height:22em; overflow-y:auto;
                         border-top-left-radius:0; border-top-right-radius:0;
                         line-height:1.5;}

/* Marcajele, vizibile CHIAR ÎN CÂMP — ăsta e tot rostul editorului. Fără regulile astea,
   `contenteditable` moștenește stilul de formular și o listă arată ca text lipit de margine. */
.lvd-wsp-editor-area ul,
.lvd-wsp-editor-area ol {margin:4px 0 4px 18px; padding:0;}
.lvd-wsp-editor-area ul {list-style:disc;}
.lvd-wsp-editor-area ol {list-style:decimal;}
.lvd-wsp-editor-area li {margin:2px 0;}
.lvd-wsp-editor-area p  {margin:0 0 6px;}
.lvd-wsp-editor-area a  {color:var(--lvd-color-primary); text-decoration:underline;}
.lvd-wsp-editor-area strong {font-weight:700;}

.lvd-wsp-editor-btn     {appearance:none; border:0; background:none; cursor:pointer;
                         font:inherit; line-height:0;
                         display:inline-flex; align-items:center; justify-content:center;
                         width:26px; height:26px; border-radius:var(--lvd-radius-badge);
                         color:var(--lvd-cc-text-muted);}
.lvd-wsp-editor-btn:hover  {background:var(--lvd-cc-surface); color:var(--lvd-cc-title);}
.lvd-wsp-editor-btn:active {background:var(--lvd-cc-border);}
.lvd-wsp-editor-btn svg    {width:15px; height:15px; fill:currentColor; display:block;}


/*----------------------------- FLASH -----------------------------*/
.lvd-wsp-flash          {display:flex; align-items:center; justify-content:space-between;
                         gap:var(--lvd-space-m); flex-wrap:wrap;
                         padding:12px 16px; border-radius:var(--lvd-radius-m); margin-bottom:var(--lvd-space-m);
                         font-size:var(--lvd-text-s1); font-weight:600; border:1px solid transparent;}
.lvd-wsp-flash.is-success {background:var(--lvd-color-success-light); color:#00532a; border-color:#a8dfc2;}
.lvd-wsp-flash.is-error   {background:var(--lvd-color-error-light); color:#8f2226; border-color:#f3b6b8;}
.lvd-wsp-flash.is-info    {background:#eaf1fd; color:#1c3f7c; border-color:#bcd2f2;}

/* The action button borrows the message's own colour (`currentColor`) instead of carrying a
   palette of its own: one rule then works on the green bar, the red one and the blue one, and
   an Undo inside a success message cannot end up looking like a warning. */
.lvd-wsp-flash-action   {appearance:none; cursor:pointer; font:inherit; color:inherit;
                         background:rgba(255,255,255,.55); border:1px solid currentColor;
                         border-radius:var(--lvd-radius-s); padding:4px 12px;
                         flex:0 0 auto; transition:background .15s ease;}
.lvd-wsp-flash-action:hover {background:rgba(255,255,255,.95);}
.lvd-wsp-flash-action:focus-visible {outline:2px solid currentColor; outline-offset:2px;}



/*----------------------------- ICONS -----------------------------*/
.lvd-wsp-icon           {fill:currentColor; vertical-align:middle;}



/*----------------------------- TAGS -----------------------------*/
/* Small inline labels: licensed products, config values, dev patterns. Shared
   because more than one module needs them and a module stylesheet only loads on
   that module's own pages. */

.lvd-wsp-tag.is-expired {background:var(--lvd-color-error-light); color:#8f2226;
                         text-decoration:line-through;}

/* Severitățile lui `.lvd-wsp-tag` sunt definite ÎN BLOCUL COMUN de mai sus, împreună cu cele
   ale lui chip și badge. Erau repetate aici cu aceleași valori — două locuri pentru aceeași
   culoare înseamnă că într-o zi rămân două culori. Aici stau doar stările care sunt PROPRII
   tagului, fiindcă descriu produse, nu severități. */
/* Retras deliberat, dar normal („nu e în pachet"): stins, nu alarmant, ȘI tăiat —
   culoarea singură nu spune „nu rulează", iar asta e informația care contează. */
.lvd-wsp-tag.is-neutral  {background:var(--lvd-cc-surface-muted); color:var(--lvd-cc-text-muted);
                          text-decoration:line-through;}

/* Slug-ul e tot un badge, doar că poartă un cod, nu o stare: aceeași rază, ca să nu fie a
   patra formă pe ecranul cheii. */
.lvd-wsp-product-slug   {font-size:var(--lvd-text-s2); color:var(--lvd-cc-text-muted);
                         background:var(--lvd-cc-surface-muted); padding:2px 7px;
                         border-radius:var(--lvd-radius-badge);}



/*----------------------------- CHECKLIST -----------------------------*/
/* One glance status list: installer requirements, migration status. Same dot
   vocabulary as .lvd-wsp-dot, but inline with a label instead of standalone. */
.lvd-wsp-install-list       {margin:0 0 var(--lvd-space-l); font-size:var(--lvd-text-s1);}
.lvd-wsp-install-list li    {display:flex; align-items:center; gap:8px; padding:8px 0;
                             border-bottom:1px solid var(--lvd-cc-border-soft); color:var(--lvd-cc-text);}
.lvd-wsp-install-list li:last-child {border-bottom:0;}
.lvd-wsp-install-list li::before {content:''; width:8px; height:8px; border-radius:50%;
                             flex-shrink:0; background:var(--lvd-color-unknown);}
.lvd-wsp-install-list li.is-ok::before       {background:var(--lvd-color-success);}
.lvd-wsp-install-list li.is-warning::before  {background:var(--lvd-color-warning);}
.lvd-wsp-install-list li.is-critical::before {background:var(--lvd-color-error);}
.lvd-wsp-install-list li.is-unknown::before  {background:var(--lvd-color-unknown);}
.lvd-wsp-install-list li.is-critical         {color:#8f2226; font-weight:600;}



/*############################# MOBILE #############################*/
@media (min-width:1px) and (max-width:767px)
{
.lvd-wsp-table-wrap     {overflow-x:auto;}
.lvd-wsp-table th       {position:static;}
.lvd-wsp-field-row      {grid-template-columns:1fr;}
.lvd-wsp-deflist        {grid-template-columns:1fr;}
.lvd-wsp-deflist dt     {padding-bottom:0; border-bottom:0;}
.lvd-wsp-deflist dd     {padding-top:2px;}
.lvd-wsp-form-inline .lvd-wsp-select {min-width:0; width:100%;}
}
/*############################# END MOBILE #############################*/



/*----------------------------- SELF-HOSTED FONT (optional) -----------------------------*/
/* Drop Montserrat-Regular.woff2 / -SemiBold / -Bold into /assets/fonts/ and
   uncomment. A strict CSP allows only same-origin fonts, which is why this is
   self-hosted rather than a CDN link.

@font-face {
    font-family:'Montserrat';
    src:url('/assets/fonts/Montserrat-Regular.woff2') format('woff2');
    font-weight:400; font-style:normal; font-display:swap;
}
@font-face {
    font-family:'Montserrat';
    src:url('/assets/fonts/Montserrat-SemiBold.woff2') format('woff2');
    font-weight:600; font-style:normal; font-display:swap;
}
@font-face {
    font-family:'Montserrat';
    src:url('/assets/fonts/Montserrat-Bold.woff2') format('woff2');
    font-weight:700; font-style:normal; font-display:swap;
}
*/


/*----------------------- LIST TOOLBAR (search + facets) -----------------------*/
/* Aceeași formă ca panoul gri din stânga, la scară mai mare. Wrap, nu grid fix:
   pe ecran îngust chip-urile și contorul trec pe rândul următor, iar căutarea
   rămâne utilizabilă — o coloană fixă ar fi strivit inputul la 60px. */
.lvd-wsp-toolbar        {display:flex; align-items:center; gap:var(--lvd-space-s);
                         flex-wrap:wrap; margin-bottom:var(--lvd-space-m);}
.lvd-wsp-toolbar-actions{display:flex; align-items:center; gap:var(--lvd-space-s);
                         flex-wrap:wrap; flex:1 1 auto;}

/* Căutarea ia spațiul rămas, dar nu coboară sub o lățime la care nu mai poți citi
   ce ai tastat. */
.lvd-wsp-toolbar-search {position:relative; flex:1 1 240px; min-width:200px;}

/* Contorul e împins la dreapta și nu se rupe: e ancora la care te uiți după ce
   filtrezi, deci trebuie să stea în același loc de fiecare dată. */
.lvd-wsp-toolbar-count  {margin:0 0 0 auto; white-space:nowrap;
                         font-size:var(--lvd-text-s2); color:var(--lvd-cc-text-muted);}

/*----------------------- FILTER / SORT MENUS -----------------------*/
/* Shared by every list: the page head renders them next to the search, Licence still has
   its own toolbar. A panel of checkboxes (filter) or of exclusive choices (sort). */
.lvd-wsp-fmenu          {position:relative;}
.lvd-wsp-fmenu-panel    {position:absolute; z-index:30; top:calc(100% + 8px); left:0;
                         min-width:240px; padding:var(--lvd-space-s);
                         background:var(--lvd-cc-surface); border:1px solid var(--lvd-cc-border-soft);
                         border-radius:var(--lvd-radius-l); box-shadow:var(--lvd-shadow-m);}
.lvd-wsp-fmenu-panel[hidden] {display:none;}

.lvd-wsp-fgroup         {margin:0 0 var(--lvd-space-s); padding:0; border:0;}
.lvd-wsp-fgroup:last-of-type {margin-bottom:0;}

/* Clears every facet from inside the menu; there only while one is on. */
.lvd-wsp-freset         {appearance:none; display:block; width:100%; margin-top:var(--lvd-space-s);
                         padding:8px 0 2px; border:0; border-top:1px solid var(--lvd-cc-border-soft);
                         background:none; font:inherit; font-size:var(--lvd-text-s2); font-weight:600;
                         text-align:left; color:var(--lvd-cc-text-muted); cursor:pointer;}
.lvd-wsp-freset:hover   {color:var(--lvd-cc-title);}
.lvd-wsp-freset[hidden] {display:none;}
.lvd-wsp-fgroup-title   {padding:0 0 4px; font-size:var(--lvd-text-s2); font-weight:700;
                         color:var(--lvd-cc-text-muted); text-transform:uppercase;
                         letter-spacing:.04em;}
.lvd-wsp-fopt           {display:flex; align-items:center; gap:8px; padding:5px 0;
                         font-size:var(--lvd-text-s1); color:var(--lvd-cc-title); cursor:pointer;}
.lvd-wsp-fopt.is-hidden {display:none;}
.lvd-wsp-fopt input     {accent-color:var(--lvd-color-primary);}

/* A long group (clients) gets its own search and scrolls inside the panel. */
.lvd-wsp-fgroup-search  {width:100%; height:30px; margin:2px 0 4px; padding:0 10px;
                         border:1px solid var(--lvd-cc-border-field); border-radius:var(--lvd-radius-s);
                         font:inherit; font-size:var(--lvd-text-s1); color:var(--lvd-cc-title);
                         background:var(--lvd-cc-surface);}
.lvd-wsp-fgroup-search:focus {outline:0; border-color:var(--lvd-color-accent);
                         box-shadow:0 0 0 3px rgba(var(--lvd-color-accent-rgb), .18);}
.lvd-wsp-fgroup-list    {max-height:190px; overflow-y:auto;}
.lvd-wsp-fgroup-hint    {margin:4px 0 0; font-size:var(--lvd-text-s2); color:var(--lvd-cc-text-muted);}

/* Sort choices: one is current at a time, marked by weight and a check. */
.lvd-wsp-sopt           {display:flex; align-items:center; gap:8px; width:100%;
                         padding:7px 8px; border:0; border-radius:var(--lvd-radius-s);
                         background:transparent; font:inherit; font-size:var(--lvd-text-s1);
                         color:var(--lvd-cc-title); text-align:left; cursor:pointer;}
.lvd-wsp-sopt:hover     {background:var(--lvd-cc-surface-muted);}
.lvd-wsp-sopt-check     {display:inline-flex; margin-left:auto; opacity:0; color:var(--lvd-color-primary);}
.lvd-wsp-sopt-check svg {fill:currentColor;}
.lvd-wsp-sopt.is-active {font-weight:700;}
.lvd-wsp-sopt.is-active .lvd-wsp-sopt-check {opacity:1;}

/*----------------------- ACTIVE FACET CHIPS -----------------------*/
/* One chip per active facet, each with an × that clears it, then one that clears them all.
   Real buttons, not spans with a handler: reachable with Tab, cleared with Enter. */
.lvd-wsp-fchips         {display:flex; align-items:center; gap:6px; flex-wrap:wrap;
                         margin-bottom:var(--lvd-space-m);}
.lvd-wsp-fchips:empty   {display:none;}
.lvd-wsp-fchip          {display:inline-flex; align-items:center; gap:6px; padding:4px 10px;
                         background:var(--lvd-color-bg-deep); color:var(--lvd-cc-title);
                         border:0; border-radius:var(--lvd-radius-pill);
                         font:inherit; font-size:var(--lvd-text-s2); font-weight:600; cursor:pointer;
                         transition:background-color .2s var(--lvd-ease);}
.lvd-wsp-fchip:hover    {background:var(--lvd-color-gray-300);}
.lvd-wsp-fchip-x        {font-size:15px; line-height:1; color:var(--lvd-cc-text-muted);}
.lvd-wsp-fchip.is-reset {background:transparent; color:var(--lvd-cc-text-muted);
                         box-shadow:inset 0 0 0 1px var(--lvd-cc-border);}
.lvd-wsp-fchip.is-reset:hover {background:var(--lvd-cc-surface-muted); color:var(--lvd-cc-title);}

/*----------------------- EMPTY AFTER FILTERING -----------------------*/
/* „Nimic nu se potrivește" e altceva decât „nicio cheie emisă", deci mesaj separat.
   Apare prin `:has()`, fără să-l atingă JavaScript-ul: filtrarea pune `is-hidden` pe
   rânduri, iar CSS-ul deduce restul. Un singur mecanism de stare, nu două.
   Fără `:has()` mesajul rămâne ascuns — degradare tăcută, nu una care minte. */
.lvd-wsp-empty-filtered {display:none; margin:var(--lvd-space-m) 0 0;
                         color:var(--lvd-cc-text-muted); font-size:var(--lvd-text-s1);}
.lvd-wsp-table-wrap:not(:has(tbody tr:not(.is-hidden))) + .lvd-wsp-empty-filtered {display:block;}

/* Domeniul declarat, când nu se potrivește cu cel real. Tăiat ȘI colorat: culoarea
   singură nu spune „aici e problema" pentru cine nu distinge nuanțele. */
.lvd-wsp-mismatch       {color:var(--lvd-color-error); text-decoration:line-through;}

/*----------------------------- TABS -----------------------------*/
/* Mutate aici din module-sites.css pe 28 august 2026, când Projects a căpătat și el
   tab-uri pe fișa de detaliu. Regula casei — pe care o impune `check-css.py` — e că orice
   ar vrea un al doilea modul trăiește în foaia comună. Lăsate acolo, tab-urile Projects
   s-ar fi randat ca linkuri simple: `View::style()` încarcă doar foaia modulului curent,
   iar `module-sites.css` nu ajunge niciodată pe /projects. */

/* A segmented control: a pill-shaped track with the current tab raised on it as a white
   capsule. Scrolls sideways instead of wrapping, since a wrapped pill is no longer a pill. */
.lvd-wsp-tabs           {display:flex; gap:2px; align-self:flex-start; max-width:100%;
                         height:30px; padding:2px; margin:0;
                         border-radius:999px; background:var(--lvd-color-bg-deep);
                         overflow-x:auto; scrollbar-width:none;}

.lvd-wsp-tab            {display:inline-flex; align-items:center; gap:8px;
                         padding:0 12px; border-radius:999px;
                         font-size:12px; font-weight:600;
                         color:var(--lvd-cc-text); text-decoration:none;
                         white-space:nowrap;
                         transition:background-color .2s var(--lvd-ease), color .2s var(--lvd-ease),
                                    box-shadow .2s var(--lvd-ease);}
.lvd-wsp-tab:hover      {color:var(--lvd-cc-title);}
.lvd-wsp-tab.is-active  {background:var(--lvd-cc-surface); color:var(--lvd-cc-title);
                         box-shadow:0 1px 3px rgba(0, 0, 0, .14), 0 0 1px rgba(0, 0, 0, .1);}
.lvd-wsp-tab:focus-visible {outline:2px solid var(--lvd-color-primary); outline-offset:-2px;}
/* A tab that is only an icon (a view switch); its name is in `title` and for screen readers. */
.lvd-wsp-tab.is-icon    {padding:0 10px;}
.lvd-wsp-tab.is-icon svg {fill:currentColor; display:block;}

/* A tab whose data does not exist yet stays legible but visibly lighter. It is not
   disabled: the page behind it explains what will appear there, which is the point. */
.lvd-wsp-tab.is-pending {opacity:.72;}

/* Marker at the end of a sidebar row — "archived" and the like. */
.lvd-wsp-sidebar-item-tag {margin-left:auto; font-size:var(--lvd-text-s2);
                           color:var(--lvd-cc-text-muted); text-transform:uppercase;
                           letter-spacing:.04em;}

/* --- Checkbox with a label -------------------------------------------------
   Lived in module-projects.css until System needed the same control. A second copy would have
   drifted, so it moved here rather than being duplicated — the house rule that every class is
   defined exactly once, where it is shared. */

.lvd-wsp-check {display:flex; align-items:center; gap:10px; cursor:pointer;
                padding:9px 0; color:var(--lvd-cc-title);}
.lvd-wsp-check input {flex-shrink:0; width:16px; height:16px;
                      accent-color:var(--lvd-cc-button-bg); cursor:pointer;}

/*----------------------------- TICK -----------------------------*/
/* The tick: a button that reads as a checkbox, because ticking posts a form. */
.lvd-wsp-tick {display:inline-flex; align-items:center; justify-content:center;
               width:20px; height:20px; padding:0; cursor:pointer;
               border:1.5px solid var(--lvd-color-gray-400); border-radius:6px;
               background:var(--lvd-cc-surface); color:transparent;
               transition:background-color .15s ease, border-color .15s ease;}
.lvd-wsp-tick svg {fill:currentColor; display:block;}
.lvd-wsp-tick:hover {border-color:var(--lvd-color-success); color:var(--lvd-color-success);}
.lvd-wsp-tick.is-on {background:var(--lvd-color-success); border-color:var(--lvd-color-success);
                     color:var(--lvd-color-white);}
.lvd-wsp-tick:focus-visible {outline:2px solid var(--lvd-color-primary); outline-offset:2px;}
@media (prefers-reduced-motion:reduce) {
    .lvd-wsp-tick {transition:none;}
}

/* A finished row (task lists, in Tasks and on a project page). */
.lvd-wsp-table .is-done .lvd-wsp-open {color:var(--lvd-cc-text-muted); text-decoration:line-through;}

/* A refusal shown inside the form it belongs to. */
.lvd-wsp-form-error     {margin:0 0 var(--lvd-space-m); padding:9px 12px; border-radius:8px;
                         background:var(--lvd-color-error-light); color:#8f2226;
                         font-size:var(--lvd-text-s1); font-weight:600;}

/* A field row whose first column needs more room (the four status chips on one line). */
.lvd-wsp-field-row.is-wide-first {grid-template-columns:minmax(0, 1.8fr) minmax(0, 1fr);}

/* Up / down arrows of a manually ordered row. Quiet until hovered; the end rows keep the
   disabled arrow, so the pair does not shift from row to row. */
.lvd-wsp-order          {display:inline-flex; align-items:center; gap:2px; vertical-align:middle;}
.lvd-wsp-order form     {margin:0; display:flex;}
.lvd-wsp-order-btn      {appearance:none; border:0; background:transparent; cursor:pointer;
                         display:inline-flex; align-items:center; justify-content:center;
                         width:24px; height:24px; padding:0; border-radius:6px;
                         color:var(--lvd-cc-text-muted); transition:background-color .15s ease, color .15s ease;}
.lvd-wsp-order-btn svg  {fill:currentColor; display:block;}
.lvd-wsp-order-btn:hover:not(:disabled) {background:var(--lvd-color-bg-deep); color:var(--lvd-cc-title);}
.lvd-wsp-order-btn:focus-visible {outline:0; box-shadow:0 0 0 3px rgba(var(--lvd-color-accent-rgb), .25);}
.lvd-wsp-order-btn:disabled {opacity:.25; cursor:default;}

/*----------------------------- CHOICE CHIPS -----------------------------*/
/* A radio group shown as chips: every option visible, the chosen one at full strength and
   the rest at half. Real radios underneath, so keyboard and form submission are native. */
.lvd-wsp-choice         {display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; border:0;}
.lvd-wsp-choice-opt     {position:relative; cursor:pointer;}
.lvd-wsp-choice-opt input {position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer;}
.lvd-wsp-choice-opt .lvd-wsp-chip {display:inline-flex; padding:6px 14px; font-size:var(--lvd-text-s1);
                         opacity:.5; transition:opacity .15s ease, box-shadow .15s ease;}
.lvd-wsp-choice-opt:hover .lvd-wsp-chip {opacity:.8;}
.lvd-wsp-choice-opt input:checked + .lvd-wsp-chip {opacity:1; box-shadow:0 0 0 1.5px currentColor;}
.lvd-wsp-choice-opt input:focus-visible + .lvd-wsp-chip {opacity:1;
                         box-shadow:0 0 0 1.5px currentColor, 0 0 0 4px rgba(var(--lvd-color-accent-rgb), .25);}

/*----------------------------- TWO-COLUMN FORM -----------------------------*/
/* Main fields on the left, one under another; state and notes on the right. No card: the
   form sits directly on the panel. */
.lvd-wsp-form-cols      {display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(0, 1fr);
                         gap:var(--lvd-space-xl) 48px; max-width:980px; margin-top:var(--lvd-space-l);}
.lvd-wsp-form-col > .lvd-wsp-field:last-child {margin-bottom:0;}
.lvd-wsp-form-cols .lvd-wsp-field {margin-bottom:20px;}
.lvd-wsp-form-cols .lvd-wsp-editor-area {min-height:168px;}
.lvd-wsp-form-actions   {grid-column:1 / -1; display:flex; align-items:center; gap:var(--lvd-space-m);
                         padding-top:var(--lvd-space-l); border-top:1px solid var(--lvd-cc-border-soft);}

/* A rare action, pushed to the far end of the row, away from Save. */
.lvd-wsp-form-actions .lvd-wsp-form-actions-end {margin-left:auto;}

@media (max-width:860px) {
    .lvd-wsp-form-cols  {grid-template-columns:1fr; gap:var(--lvd-space-l);}
}
@media (prefers-reduced-motion:reduce) {
    .lvd-wsp-input, .lvd-wsp-select, .lvd-wsp-choice-opt .lvd-wsp-chip {transition:none;}
}

/*----------------------------- STATUS MENU -----------------------------*/
/* The current status as a chip that opens the list of all four. */
.lvd-wsp-status         {position:relative; display:inline-block;}
.lvd-wsp-status-toggle  {appearance:none; border:0; cursor:pointer; font:inherit;
                         display:inline-flex; align-items:center; gap:6px;
                         font-size:var(--lvd-text-s2); font-weight:700;
                         transition:box-shadow .15s ease;}
.lvd-wsp-status-toggle svg {fill:currentColor; opacity:.7;}
.lvd-wsp-status-toggle:hover,
.lvd-wsp-status-toggle[aria-expanded="true"] {box-shadow:0 0 0 1.5px currentColor;}
.lvd-wsp-status-toggle:focus-visible {outline:0;
                         box-shadow:0 0 0 1.5px currentColor, 0 0 0 4px rgba(var(--lvd-color-accent-rgb), .25);}

.lvd-wsp-status-menu    {position:absolute; z-index:30; top:calc(100% + 6px); left:0;
                         min-width:170px; margin:0; padding:6px;
                         background:var(--lvd-cc-surface); border:1px solid var(--lvd-cc-border-soft);
                         border-radius:12px; box-shadow:var(--lvd-shadow-m);}
.lvd-wsp-status-menu.is-right {left:auto; right:0;}
.lvd-wsp-status-menu[hidden] {display:none;}
.lvd-wsp-status-opt     {appearance:none; border:0; background:transparent; cursor:pointer; font:inherit;
                         display:flex; align-items:center; justify-content:space-between; gap:12px;
                         width:100%; padding:6px 8px; border-radius:8px; text-align:left;}
.lvd-wsp-status-opt:hover,
.lvd-wsp-status-opt:focus-visible {background:var(--lvd-cc-surface-muted); outline:0;}
.lvd-wsp-status-check   {display:inline-flex; opacity:0; color:var(--lvd-cc-title);}
.lvd-wsp-status-check svg {fill:currentColor;}
.lvd-wsp-status-opt.is-active .lvd-wsp-status-check {opacity:1;}

/* Medallion — a round picture, or initials when there is none. */
.lvd-wsp-medal         {display:inline-flex; align-items:center; justify-content:center; flex:none;
                         width:28px; height:28px; border-radius:50%; overflow:hidden;
                         background:var(--lvd-cc-bg-soft, #eef1f6); color:var(--lvd-color-ink-soft);
                         font-size:11px; font-weight:700; letter-spacing:.02em; vertical-align:middle;
                         position:relative;}
/* The ring sits over the picture, so a white logo still has an edge. */
.lvd-wsp-medal::after   {content:""; position:absolute; inset:0; border-radius:50%;
                         box-shadow:inset 0 0 0 1px rgb(12 20 38 / .12); pointer-events:none;}
.lvd-wsp-medal img     {width:100%; height:100%; object-fit:cover; display:block;}
.lvd-wsp-medal.is-large {width:96px; height:96px; font-size:28px;}
.lvd-wsp-named          {display:inline-flex; align-items:center; gap:10px; min-width:0; white-space:nowrap;}

/* A titled block of a page that has no cards: the heading, then its table or text. */
.lvd-wsp-section        {margin-top:var(--lvd-space-l);}
.lvd-wsp-section + .lvd-wsp-section {margin-top:var(--lvd-space-xl);}
.lvd-wsp-section-title  {margin:0 0 var(--lvd-space-s); font-size:var(--lvd-text-s1); font-weight:700;
                         letter-spacing:.06em; text-transform:uppercase; color:var(--lvd-color-ink-soft);}

/*----------------------------- MONEY FIGURES -----------------------------*/
/* Headline figures, the paid meter and right-aligned number columns. They keep the
   `lvd-prj-` prefix they were born with in Projects, but live here because the client's
   Financial tab shows the same things. */
.lvd-prj-budget-figure {display:flex; flex-direction:column; gap:2px;}
.lvd-prj-budget-label {font-size:var(--lvd-text-s2); font-weight:600; color:var(--lvd-cc-text-muted);}
.lvd-prj-budget-value {font-size:20px; font-weight:700; color:var(--lvd-cc-title);
                       font-variant-numeric:tabular-nums; white-space:nowrap;}
.lvd-prj-budget-figure.is-overdue .lvd-prj-budget-value {color:var(--lvd-color-error);}
/* An overdue total of zero is good news, not a warning. */
.lvd-prj-budget-figure.is-overdue .lvd-prj-budget-value.is-zero {color:var(--lvd-cc-title);}


/* Native <progress>: the CSP forbids inline styles, so the width cannot be set from markup. */
.lvd-prj-meter {display:block; width:100%; height:6px; margin-top:var(--lvd-space-s);
                border:0; border-radius:999px; overflow:hidden; appearance:none;
                background:var(--lvd-color-bg-deep);}
.lvd-prj-meter::-webkit-progress-bar   {background:var(--lvd-color-bg-deep); border-radius:999px;}
.lvd-prj-meter::-webkit-progress-value {background:var(--lvd-color-accent); border-radius:999px;}
.lvd-prj-meter::-moz-progress-bar      {background:var(--lvd-color-accent); border-radius:999px;}
.lvd-prj-meter.is-small {width:120px; height:4px; margin:4px 0 2px auto; background:var(--lvd-color-bg-deep);}
.lvd-prj-meter.is-small::-webkit-progress-bar {background:var(--lvd-color-bg-deep);}


/* A row of figures between the page head and the table. */
.lvd-prj-totals {display:flex; flex-wrap:wrap; gap:var(--lvd-space-l) 40px; margin:var(--lvd-space-m) 0;}


/* Numbers read down a column: right-aligned, equal-width digits. */
.lvd-prj-num    {text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap;}
th.lvd-prj-num  {text-align:right;}

/* Collecting lists (Payments, a project's budget, a client's payments): the tick and the
   statement date on one line, and the small actions at the end of a row. */
.lvd-prj-pay {display:flex; align-items:center; gap:8px; margin:0;}
/* The date with its shortcut underneath; the tick lines up with the field, not the pair. */
.lvd-prj-pay:has(.lvd-prj-pay-due) {align-items:flex-start;}
.lvd-prj-pay:has(.lvd-prj-pay-due) .lvd-wsp-tick {margin-top:8px;}
.lvd-prj-pay-date {display:inline-flex; flex-direction:column; align-items:flex-start; gap:2px;}
.lvd-prj-pay-due  {padding:0; border:0; background:none; cursor:pointer; font:inherit;
                   font-size:11px; line-height:1.3; color:var(--lvd-cc-text-muted);
                   text-decoration:underline; text-underline-offset:2px;}
.lvd-prj-pay-due:hover {color:var(--lvd-color-primary);}
.lvd-prj-pay-due:focus-visible {outline:2px solid var(--lvd-color-primary); outline-offset:2px;}
.lvd-prj-row-actions {display:flex; align-items:center; justify-content:flex-end;
                      gap:2px; flex-wrap:wrap;}
.lvd-prj-row-actions .lvd-wsp-link-btn {padding:4px 5px; line-height:1;
                                        border-radius:var(--lvd-radius-s);
                                        color:var(--lvd-cc-text-muted); text-decoration:none;}
.lvd-prj-row-actions .lvd-wsp-link-btn:hover {color:var(--lvd-cc-title);
                                              background:var(--lvd-cc-surface-muted);}
.lvd-prj-row-actions .lvd-prj-remove:hover {color:var(--lvd-color-error);}
.lvd-prj-row-actions svg {width:14px; height:14px; fill:currentColor; display:block;}

/* A section of a form that folds — native <details>, the title is the handle. The title
   bar takes the grey the cards used to have, a step deeper than a table head, so sections
   read as blocks of one page. */
.lvd-wsp-acc            {margin-top:var(--lvd-space-m);}
.lvd-wsp-acc-title      {display:flex; align-items:center; justify-content:space-between; gap:12px;
                         padding:9px 12px; cursor:pointer; list-style:none; user-select:none;
                         background:var(--lvd-color-bg-deep); border-radius:8px;
                         box-shadow:0 1px 2px rgb(12 20 38 / .10), 0 2px 6px rgb(12 20 38 / .06);
                         font-weight:700; color:var(--lvd-cc-title);}
.lvd-wsp-acc-title::-webkit-details-marker {display:none;}
.lvd-wsp-acc-title:hover {background:#dfe2ec;}
.lvd-wsp-acc-title:focus-visible {outline:2px solid var(--lvd-color-accent); outline-offset:2px;}
.lvd-wsp-acc-caret      {display:inline-flex; transition:transform .18s ease;}
.lvd-wsp-acc[open] > .lvd-wsp-acc-title .lvd-wsp-acc-caret {transform:rotate(180deg);}
/* A short status beside the title ("41 applied"). */
.lvd-wsp-acc-note       {margin-left:8px; font-weight:400;}
.lvd-wsp-acc-body       {padding:var(--lvd-space-m) 0 4px;}
.lvd-wsp-acc-body > .lvd-wsp-field:last-child,
.lvd-wsp-acc-body > .lvd-wsp-field-row:last-child .lvd-wsp-field {margin-bottom:0;}
@media (prefers-reduced-motion:reduce) { .lvd-wsp-acc-caret {transition:none;} }

/* Paid / budget in one cell, each with its share of the total shown. Used by the projects
   and the clients lists. */
.lvd-prj-paid           {font-variant-numeric:tabular-nums; white-space:nowrap;}
.lvd-prj-paid strong    {color:var(--lvd-cc-title);}
.lvd-prj-share          {font-size:var(--lvd-text-s2); color:var(--lvd-cc-text-muted);}
