/* ArviHR — fundația interfeței noi (tokenuri + componente de bază + cadrul).
   Sursa de design: docs/design/mockups/shared/arvihr-ui.css și navigatie/nav.css.
   Numele variabilelor CSS sunt IDENTICE cu machetele: alte foi (ex. azi.css)
   se bazează pe ele. Clasele cadrului (bară laterală, bară de sus, bară de jos,
   căutare, notificări) au prefixul sh- ca să nu se lovească de clasele paginilor vechi.
   Stilurile paginilor vechi stau în legacy.css (sub .legacy). */

/* ---------- Fonturi (self-hosted, OFL — vezi static/fonts/OFL.txt) ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../../fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../../fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../../fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../../fonts/inter-v20-latin_latin-ext-700.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../../fonts/space-grotesk-v22-latin_latin-ext-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('../../fonts/space-grotesk-v22-latin_latin-ext-600.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../../fonts/space-grotesk-v22-latin_latin-ext-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../../fonts/jetbrains-mono-v24-latin_latin-ext-regular.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../../fonts/jetbrains-mono-v24-latin_latin-ext-500.woff2') format('woff2'); }

/* ---------- Tokenuri (identice cu arvihr-ui.css) ---------- */
:root {
  /* culori de brand */
  --navy: #071B3A; --navy-2: #0C1E3C; --navy-3: #14315C;
  --blue: #1677FF; --blue-strong: #0F5FD6; --cyan: #22D3EE; --teal: #14B8A6; --warm: #F59E0B;
  --red: #E5484D; --green: #16A34A;
  /* suprafețe */
  --bg: #F4F7FB; --surface: #FFFFFF; --surface-2: #F8FAFD;
  --border: #E3E9F2; --border-strong: #CBD5E3;
  --ink: #0B1A33; --ink-2: #2A3B55; --ink-muted: #5B6B82;
  /* nuanțe pentru plăci cu iconiță */
  --tint-blue: #EAF2FF; --tint-cyan: #E6FAFD; --tint-teal: #E6F8F5; --tint-warm: #FEF4E2;
  --tint-red: #FDECEC; --tint-violet: #F1EDFF; --tint-green: #E9F8EE;
  /* formă */
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --shadow: 0 1px 2px rgba(7,27,58,.05), 0 8px 24px rgba(7,27,58,.07);
  --shadow-hover: 0 1px 2px rgba(7,27,58,.06), 0 16px 40px rgba(7,27,58,.12);
  --ring: 0 0 0 4px rgba(34,211,238,.35);
  --grad-btn: linear-gradient(135deg, #1366E0 0%, #0F5FD6 100%);
  --grad-hero: linear-gradient(135deg, #071B3A 0%, #0C1E3C 55%, #14315C 100%);
  --hairline: linear-gradient(90deg, transparent, #22D3EE 35%, #1677FF 65%, transparent);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --tap: 48px;               /* ținta minimă de atingere pentru acțiuni principale */

  /* cadru */
  --side-w: 264px;
  --rail-w: 80px;
  --top-h: 68px;
  --bottom-h: 68px;

  /* compatibilitate cu paginile vechi (foloseau brand.css) */
  --font-mono: var(--font);
  --font-code: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --page-bg: var(--bg);
  --blue-hi: #2E8AFF; --blue-dk: #0F5FD6; --cyan-hi: #6FE3F4;
  --blue-50: #EAF2FF; --blue-100: #CFE1FF; --blue-200: #8FC0FF; --blue-300: #4B9BFF;
  --grad-brand: linear-gradient(135deg, #22D3EE 0%, #1677FF 100%);
  --grad-navy: linear-gradient(135deg, #0A1830 0%, #081326 55%, #060E1F 100%);
}

/* ---------- Bază ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 28px; font-weight: 700; } h2 { font-size: 20px; font-weight: 600; } h3 { font-size: 16px; font-weight: 600; }
a { color: var(--blue-strong); }
code, pre, samp { font-family: var(--font-code); }
.muted { color: var(--ink-muted); }
.link { color: var(--blue-strong); font-weight: 600; }
:focus-visible { outline: none; box-shadow: var(--ring); }
.sr, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
kbd { display: inline-flex; align-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--border-strong);
      border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font: 600 11.5px/1 var(--font); }
/* [hidden] câștigă în cadru (nu și în paginile vechi, care comută singure display) */
.sh-side [hidden], .sh-top [hidden], .sh-bottom [hidden], dialog.sh-dlg [hidden], .badge-count[hidden], .sh-pop[hidden], .sh-sub[hidden] { display: none !important; }

/* ---------- Butoane ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap);
       padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface);
       color: var(--ink); font: 600 15px var(--font); text-decoration: none; cursor: pointer; transition: box-shadow .15s, background .15s, transform .15s; }
.btn:hover { border-color: var(--ink-muted); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(19,102,224,.28); }
.btn-primary:hover { background: linear-gradient(135deg, #1A70EE 0%, #0B57C9 100%); border-color: transparent; }
.btn-lg { min-height: 60px; font-size: 17px; padding: 0 28px; }
.btn-danger { background: var(--red); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #C93A3F; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn .i { width: 20px; height: 20px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-full { width: 100%; }
.btn-spinner { display: inline-block; width: .85em; height: .85em; border: 2px solid currentColor; border-top-color: transparent;
               border-radius: 50%; animation: btn-spin .6s linear infinite; vertical-align: middle; margin-right: .4em; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---------- Card și placă cu iconiță ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s5); }
.tile { display: flex; flex-direction: column; gap: var(--s3); background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s5); text-decoration: none; color: var(--ink);
        transition: box-shadow .15s, transform .15s; min-height: 132px; }
.tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tile:focus-visible { box-shadow: var(--ring), var(--shadow); }
.tile .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--tint-blue); color: var(--blue-strong); }
.tile .ic svg { width: 26px; height: 26px; }
.tile .t { font: 600 16px var(--font-display); }
.tile .n { font: 700 28px var(--font-display); }
.tile .s { color: var(--ink-muted); font-size: 14px; margin-top: auto; }
.grid { display: grid; gap: var(--s4); }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.t-warm { background: var(--tint-warm); color: #92400E; } .t-red { background: var(--tint-red); color: #9F1239; }
.t-blue { background: var(--tint-blue); color: var(--blue-strong); } .t-green { background: var(--tint-green); color: #166534; }
.t-teal { background: var(--tint-teal); color: #166534; } .t-violet { background: var(--tint-violet); color: var(--blue-strong); } .t-cyan { background: var(--tint-cyan); color: var(--navy-3); }

/* ---------- Insigne ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; }
.badge .i { width: 14px; height: 14px; }
.badge-ok { background: var(--tint-green); color: #166534; } .badge-warn { background: var(--tint-warm); color: #92400E; }
.badge-err { background: var(--tint-red); color: #9F1239; } .badge-info { background: var(--tint-blue); color: #0B4FB3; }
.badge-neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }

/* ---------- Avatar ---------- */
.av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--blue);
      color: #fff; font: 600 13px/1 var(--font); }
.av.sm { width: 32px; height: 32px; font-size: 12px; background: var(--tint-blue); color: var(--blue-strong); }
.av.lg { width: 48px; height: 48px; font-size: 16px; }

/* ---------- Antete de pagină și secțiune ---------- */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-h p { margin: 6px 0 0; color: var(--ink-muted); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.sec-h h2 { font-size: 18px; }

/* ---------- Câmpuri de formular ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label, .label { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--ink-muted); }
.input, .field :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1.5px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); font: 500 15px var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field :where(textarea), textarea.input { min-height: 112px; line-height: 1.45; resize: vertical; }
.input:hover, .field :where(input, select, textarea):hover { border-color: var(--ink-muted); }
.input:focus, .field :where(input, select, textarea):focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.field [aria-invalid="true"] { border-color: var(--red); }
.field .err { display: flex; align-items: center; gap: 6px; color: #9F1239; font-size: 13.5px; font-weight: 500; }
.chk { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 14.5px; }
.chk input { width: 20px; height: 20px; accent-color: var(--blue-strong); margin: 0; }

/* ---------- Tabele ---------- */
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font: 600 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted);
          padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--surface-2); }

/* ---------- Mesaje (flash) ---------- */
.flash { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; margin: 0 0 16px;
         font-size: 14.5px; line-height: 1.45; font-weight: 500; border: 1px solid transparent; }
.flash .i { width: 20px; height: 20px; margin-top: 1px; }
.flash-msg { flex: 1; min-width: 0; }
.flash-x { display: grid; place-items: center; width: 32px; height: 32px; margin: -6px -6px -6px 0; border: 0; border-radius: 50%;
           background: none; color: inherit; cursor: pointer; opacity: .7; }
.flash-x:hover { opacity: 1; background: rgba(7,27,58,.06); }
.flash-x .i { width: 16px; height: 16px; }
.flash.flash-error, .flash.flash-danger { background: var(--tint-red); color: #9F1239; border-color: #F7C9CB; }
.flash.flash-success { background: var(--tint-green); color: #166534; border-color: #BFE6CB; }
.flash.flash-info, .flash.flash-message { background: var(--tint-blue); color: #0B4FB3; border-color: #CFE1FF; }
.flash.flash-warning { background: var(--tint-warm); color: #92400E; border-color: #F7DDA9; }

/* ---------- Stare goală ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 32px 20px; }
.empty .art { position: relative; width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; margin-bottom: 6px; background: var(--tint-blue); color: var(--blue-strong); }
.empty .art .i { width: 38px; height: 38px; }
.empty .art::after { content: ""; position: absolute; inset: -8px; border-radius: 32px; border: 1px dashed var(--border-strong); }
.empty h3 { font-size: 17px; }
.empty p { margin: 0; color: var(--ink-muted); font-size: 14px; max-width: 320px; }
.empty .btn { margin-top: 8px; }

/* ═════════════════════════ CADRUL (shell) ═════════════════════════ */
.sh-skip { position: fixed; left: 16px; top: -80px; z-index: 400; background: var(--surface); color: var(--ink); padding: 12px 18px;
           border-radius: var(--r-sm); font-weight: 600; box-shadow: var(--shadow-hover); text-decoration: none; }
.sh-skip:focus { top: 16px; }

/* Logo */
.sh-mk { display: block; flex: none; line-height: 0; }
.sh-mk svg { display: block; width: 54px; height: 20px; filter: drop-shadow(0 2px 10px rgba(34,211,238,.25)); }
.on-light .sh-mk svg { filter: none; }
.sh-mk .brand-mark-a, .sh-mk-a { fill: #fff; } .sh-mk .brand-mark-v, .sh-mk-v { fill: var(--cyan); }
.sh-mk-clock { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--grad-brand); flex: none; }
.sh-mk-clock svg { width: 20px; height: 20px; fill: #fff; }
.sh-wm-wrap { display: flex; flex-direction: column; min-width: 0; }
.sh-wm { font: 700 21px/1 var(--font-display); color: #fff; letter-spacing: -.01em; }
.sh-wm b, .sh-wm .wm-accent { color: var(--cyan); font-weight: 700; }
.sh-by { font: 500 11px/1.2 var(--font); color: rgba(194,205,226,.72); letter-spacing: .02em; margin-top: 4px; }
.on-light .sh-mk .brand-mark-a { fill: url(#arv-ga); } .on-light .sh-mk .brand-mark-v { fill: url(#arv-gv); }
.on-light .sh-wm { color: var(--navy); } .on-light .sh-wm b, .on-light .sh-wm .wm-accent { color: var(--blue); }

/* Schelet */
.sh-app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; background: var(--navy); }
.sh-main { background: var(--bg); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Bara laterală ---------- */
.sh-side { position: sticky; top: 0; height: 100vh; z-index: 30; display: flex; flex-direction: column; gap: 2px;
           background: var(--navy); color: #C2CDE2; padding: 18px 12px 12px; }
.sh-side::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--hairline); opacity: .7; pointer-events: none; }
.sh-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; text-decoration: none; border-radius: 12px; }
.sh-nav { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sh-nav-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 8px; scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.sh-nav ul { list-style: none; margin: 0; padding: 0; }

/* Firma activă */
.sh-co-wrap { position: relative; margin-bottom: 10px; }
.sh-co { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; border-radius: 14px;
         background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); color: #fff; font: 600 14px var(--font); text-align: left; }
button.sh-co { cursor: pointer; }
button.sh-co:hover { background: rgba(255,255,255,.09); }
.sh-co-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--navy-3); color: var(--cyan); flex: none; }
.sh-co-ic .i { width: 18px; height: 18px; }
.sh-co .sh-lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sh-co .sh-lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-co .sh-lbl small { font: 500 11.5px var(--font); color: rgba(194,205,226,.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-co .sh-lbl .warn { color: #FCD34D; }

/* Grupuri și elemente */
.sh-grp { margin-top: 10px; }
.sh-grp-label { display: block; padding: 6px 12px; font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: rgba(194,205,226,.62); }
.sh-ni { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; margin: 1px 0;
         border-radius: 12px; color: #C2CDE2; background: transparent; border: 0; font: 500 15px var(--font); text-align: left; cursor: pointer; text-decoration: none; }
.sh-ni:hover { background: rgba(255,255,255,.06); color: #fff; }
.sh-ni.on { background: rgba(255,255,255,.10); color: #fff; }
.sh-ni.on::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.sh-ni.on > .i:first-child { color: var(--cyan); }
.sh-ni .sh-lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-chev { width: 16px !important; height: 16px !important; opacity: .7; transition: transform .15s; }
.sh-ni[aria-expanded="true"] > .sh-chev { transform: rotate(180deg); }
.sh-sub { position: relative; margin: 2px 0 8px 23px !important; padding-left: 12px !important; border-left: 1px solid rgba(255,255,255,.12); }
.sh-sub a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px; border-radius: 10px; font-size: 14px; line-height: 1.3;
            color: rgba(194,205,226,.88); text-decoration: none; }
.sh-sub a > span:first-child { flex: 1; min-width: 0; }
.sh-sub a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sh-sub a.on { color: #fff; background: rgba(34,211,238,.12); box-shadow: inset 2px 0 0 var(--cyan); }
.sh-sub-title { display: none; }

/* Contoare */
.badge-count { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
               border-radius: var(--r-pill); background: var(--cyan); color: var(--navy); font: 700 12px/1 var(--font); font-variant-numeric: tabular-nums; }
.sh-sub .badge-count { min-width: 20px; height: 20px; font-size: 11.5px; }
.badge-count.warn { background: var(--warm); color: var(--navy); }
.sh-ni .sh-dot { display: none; }

.sh-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255,255,255,.08); }
.sh-collapse { color: rgba(194,205,226,.72); font-size: 14px; }
.sh-user-wrap { position: relative; margin-top: 4px; }
.sh-user { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 10px; border-radius: 14px; background: transparent;
           border: 1px solid transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.sh-user:hover { background: rgba(255,255,255,.06); }
.sh-user .sh-lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sh-user .sh-lbl b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-user .sh-lbl small { color: rgba(194,205,226,.72); font-size: 12px; }

/* Ferestre mici (meniul contului, schimbă firma) */
.sh-pop { position: absolute; z-index: 70; background: var(--surface); color: var(--ink); border: 1px solid var(--border);
          border-radius: var(--r); box-shadow: var(--shadow-hover); padding: 8px; }
.sh-pop-h { margin: 4px 10px 6px; font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.sh-pop ul { list-style: none; margin: 0; padding: 0; }
.sh-co-pop { left: 0; right: 0; top: calc(100% + 6px); max-height: 60vh; overflow-y: auto; }
.sh-user-pop { left: 0; right: 0; bottom: calc(100% + 8px); }
.sh-pop-id { display: flex; gap: 10px; align-items: center; padding: 8px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; min-width: 0; }
.sh-pop-id > span:last-child { min-width: 0; }
.sh-pop-id b { display: block; font-size: 14px; } .sh-pop-id small { display: block; color: var(--ink-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.sh-pop [role=menuitem] { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink);
                          text-decoration: none; font: 500 14.5px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.sh-pop [role=menuitem] .i { width: 20px; height: 20px; color: var(--ink-muted); }
.sh-pop [role=menuitem]:hover, .sh-pop [role=menuitem]:focus-visible { background: var(--surface-2); }
.sh-pop [role=menuitem][aria-current] { background: var(--tint-blue); color: var(--blue-strong); }
.sh-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.sh-pop .danger, .sh-pop .danger .i { color: #9F1239; }
.sh-co-opt b { display: block; font-size: 14px; } .sh-co-opt small { color: var(--ink-muted); font-size: 12px; }
.sh-co-opt > span:nth-child(2) { flex: 1; min-width: 0; }
.sh-co-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--tint-blue); color: var(--blue-strong); font: 700 13px var(--font-display); flex: none; }
.sh-pop [role=menuitem].sh-co-opt { min-height: 52px; }

/* ---------- Bara restrânsă (doar iconițe): tabletă sau la alegere ---------- */
.sh-app.is-rail { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.is-rail .sh-side .sh-lbl, .is-rail .sh-grp-label, .is-rail .sh-ni > .badge-count, .is-rail .sh-chev, .is-rail .sh-wm-wrap, .is-rail .sh-co .sh-chev { display: none; }
.is-rail .sh-brand { justify-content: center; padding: 2px 0 18px; }
.is-rail .sh-ni { justify-content: center; padding: 0; }
.is-rail .sh-co { justify-content: center; padding: 6px 0; }
.is-rail .sh-user { justify-content: center; padding: 8px 0; }
.is-rail .sh-grp { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.is-rail .sh-side, .is-rail .sh-nav-scroll { overflow: visible; }
.is-rail .sh-nav-scroll { overflow-y: auto; overflow-x: visible; }
.is-rail .sh-ni .sh-dot { display: block; position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
                          background: var(--cyan); color: var(--navy); font: 700 10.5px/14px var(--font); border: 2px solid var(--navy); text-align: center; }
.is-rail .sh-ni .sh-dot[hidden] { display: none !important; }
/* etichetă la hover/focus (tooltip) */
.sh-tip { position: fixed; z-index: 90; background: var(--ink); color: #fff; padding: 7px 11px; border-radius: 8px; font: 600 13px var(--font);
          white-space: nowrap; box-shadow: var(--shadow); pointer-events: none; transform: translateY(-50%); }
/* lista flotantă din bara restrânsă */
.is-rail .sh-sub { position: fixed; margin: 0 !important; padding: 8px !important; min-width: 250px; max-height: 80vh; overflow-y: auto; z-index: 80;
                   border: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-hover); }
.is-rail .sh-sub-title { display: block; padding: 6px 10px 8px; font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.is-rail .sh-sub a { color: var(--ink); min-height: 44px; }
.is-rail .sh-sub a:hover, .is-rail .sh-sub a:focus-visible { background: var(--surface-2); color: var(--ink); }
.is-rail .sh-sub a.on { background: var(--tint-blue); color: var(--blue-strong); box-shadow: inset 2px 0 0 var(--blue-strong); }
.is-rail .sh-sub .badge-count { background: var(--blue-strong); color: #fff; }
.is-rail .sh-co-pop, .is-rail .sh-user-pop { position: fixed; min-width: 280px; right: auto; }

/* ---------- Bara de sus ---------- */
.sh-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--top-h); padding: 12px 32px;
          background: rgba(244,247,251,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.sh-tb-brand, .sh-tb-av { display: none; }
.sh-crumbs { flex: 1; min-width: 0; }
.sh-crumbs ol { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; }
.sh-crumbs li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sh-crumbs li:not([aria-current]) { flex: none; }
.sh-crumbs a { color: var(--ink-muted); text-decoration: none; border-radius: 6px; padding: 2px 4px; }
.sh-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.sh-crumbs [aria-current] span { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sh-c-sep { width: 14px !important; height: 14px !important; }
.sh-search { display: flex; align-items: center; gap: 10px; width: min(420px, 40%); min-height: 44px; padding: 0 8px 0 14px; cursor: pointer;
             border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--r-pill); color: var(--ink-muted); font: 500 14px var(--font); }
.sh-search:hover { border-color: var(--blue); }
.sh-search > span { flex: 1; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sh-icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%;
               border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; padding: 0; }
.sh-icon-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.sh-icon-btn.sm { width: 40px; height: 40px; }
.sh-ib-n { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; border: 2px solid var(--bg);
           background: var(--blue-strong); color: #fff; font: 700 11px/16px var(--font); text-align: center; }
.sh-content { padding: 28px 32px 96px; max-width: 1280px; width: 100%; flex: 1; }
.sh-content:focus { outline: none; box-shadow: none; }

/* ---------- Bara de jos (telefon) ---------- */
.sh-bottom { display: none; }
.sh-bn-ic { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: var(--r-pill); }
.sh-bn-n { position: absolute; top: -5px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; border: 2px solid var(--surface);
           background: var(--blue-strong); color: #fff; font: 700 10.5px/14px var(--font); text-align: center; }

/* ---------- Dialoguri ---------- */
dialog.sh-dlg { border: 0; padding: 0; color: var(--ink); background: var(--surface); }
dialog.sh-dlg::backdrop { background: rgba(7,27,58,.48); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* Mai mult (foaie de jos) */
dialog.sh-sheet { inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 88vh; max-height: 88dvh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 8px 16px 24px; }
.sh-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto 10px; }
.sh-sheet-head, .sh-modal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sh-sheet-head h2, .sh-modal-head h2 { flex: 1; }
.sh-sheet-head h2:focus, .sh-drawer-head h2:focus, .sh-modal-head h2:focus { outline: none; box-shadow: none; }
.sh-more-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.sh-more-me > span:nth-child(2) { flex: 1; min-width: 0; } .sh-more-me b { display: block; } .sh-more-me small { color: var(--ink-muted); }
.sh-more-co { margin-top: 8px; }
.sh-more-co summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border);
                      font: 500 14px var(--font); cursor: pointer; list-style: none; }
.sh-more-co summary::-webkit-details-marker { display: none; }
.sh-more-co summary > span { flex: 1; }
.sh-more-co a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; color: var(--ink); text-decoration: none; border-radius: 12px; }
.sh-more-co a[aria-current] { background: var(--tint-blue); color: var(--blue-strong); font-weight: 600; }
.sh-more-g { margin: 18px 4px 6px; font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.sh-more-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.sh-more-list > li + li { border-top: 1px solid var(--border); }
.sh-more-list a, .sh-more-list summary, .sh-more-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px;
            color: var(--ink); text-decoration: none; font: 500 15px var(--font); background: none; border: 0; cursor: pointer; text-align: left; list-style: none; }
.sh-more-list summary::-webkit-details-marker { display: none; }
.sh-more-list .i { color: var(--ink-muted); }
.sh-more-list .sh-lbl { flex: 1; min-width: 0; }
.sh-more-list a.on, .sh-more-list summary.on { color: var(--blue-strong); font-weight: 600; }
.sh-more-list a.on .i, .sh-more-list summary.on .i { color: var(--blue-strong); }
.sh-more-list details[open] > summary .sh-chev { transform: rotate(180deg); }
.sh-more-list details ul { list-style: none; margin: 0; padding: 0 0 8px 48px; }
.sh-more-list details ul a { min-height: 44px; padding: 0 12px; font-size: 14.5px; border-radius: 10px; }
.sh-more-list details ul a.on { background: var(--tint-blue); }
.sh-more-list .badge-count { background: var(--blue-strong); color: #fff; }
.sh-more-list .danger, .sh-more-list .danger .i { color: #9F1239; }

/* Căutare globală (Ctrl+K) */
dialog.sh-cmdk { width: min(680px, calc(100% - 32px)); max-width: none; margin: 10vh auto auto; border-radius: var(--r-lg); box-shadow: var(--shadow-hover); max-height: 78vh; overflow: hidden; }
.sh-cmdk[open] { display: flex; flex-direction: column; }
.sh-cmdk-in { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 20px; border-bottom: 1px solid var(--border); color: var(--ink-muted); }
.sh-cmdk-in input { flex: 1; min-width: 0; height: 64px; border: 0; background: none; font: 500 18px var(--font); color: var(--ink); padding: 0; }
.sh-cmdk-in input:focus, .sh-cmdk-in input:focus-visible { outline: none; box-shadow: none; }
.sh-cmdk-in input::placeholder { color: var(--ink-muted); }
.sh-cmdk-in:focus-within { box-shadow: inset 0 -2px 0 var(--cyan); }
.sh-esc { border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 8px; font: 600 12px var(--font); color: var(--ink-2); min-height: 32px; padding: 0 10px; cursor: pointer; }
.sh-cmdk-list { list-style: none; margin: 0; padding: 6px 8px 10px; overflow-y: auto; flex: 1; }
.sh-cmdk-list ul { list-style: none; margin: 0; padding: 0; }
.sh-cg-h { display: block; padding: 12px 12px 6px; font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.sh-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 12px; cursor: pointer; }
.sh-opt[aria-selected="true"] { background: var(--tint-blue); box-shadow: inset 3px 0 0 var(--blue-strong); }
.sh-opt-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); flex: none; }
.sh-opt-ic .i { width: 18px; height: 18px; }
.sh-opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sh-opt-t b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-opt-t small { color: var(--ink-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-opt-go { width: 18px !important; height: 18px !important; color: var(--blue-strong); opacity: 0; }
.sh-opt[aria-selected="true"] .sh-opt-go { opacity: 1; }
.sh-cmdk-empty { display: flex; gap: 14px; padding: 28px 24px; color: var(--ink-2); }
.sh-cmdk-empty p { margin: 0; }
.sh-cmdk-foot { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--ink-muted); }
.sh-cmdk-foot span { display: inline-flex; gap: 4px; align-items: center; }
.sh-cmdk-foot .sp { flex: 1; }

/* Notificări (sertar din dreapta) */
dialog.sh-drawer { inset: 0 0 0 auto; margin: 0; width: min(440px, 100%); max-width: none; max-height: none; height: 100vh; height: 100dvh; border-radius: var(--r-lg) 0 0 var(--r-lg); box-shadow: var(--shadow-hover); }
.sh-drawer[open] { display: flex; flex-direction: column; }
.sh-drawer-head { display: flex; align-items: center; gap: 8px; padding: 18px 16px 10px 24px; }
.sh-drawer-head h2 { flex: 1; }
.sh-seg { display: flex; gap: 4px; margin: 0 24px 8px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.sh-seg button { flex: 1; min-height: 36px; border: 0; background: none; border-radius: var(--r-pill); font: 600 13px var(--font); color: var(--ink-muted); cursor: pointer; }
.sh-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sh-drawer-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.sh-drawer-body ul { list-style: none; margin: 0; padding: 0; }
.sh-nt { position: relative; display: flex; gap: 12px; width: 100%; padding: 12px 12px 12px 14px; border-radius: 14px; color: var(--ink-2); text-decoration: none;
         font: 400 14px/1.45 var(--font); background: none; border: 0; text-align: left; cursor: pointer; }
.sh-nt:hover { background: var(--surface-2); }
.sh-nt.unread { background: var(--tint-blue); }
.sh-nt-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none; }
.sh-nt-ic .i { width: 18px; height: 18px; }
.sh-nt-x { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sh-nt-x b { color: var(--ink); font-weight: 600; }
.sh-nt.read b { font-weight: 500; }
.sh-nt-x small { font-size: 12.5px; color: var(--ink-muted); }
.sh-nt-dot { position: absolute; right: 12px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-strong); }
.sh-drawer-foot { padding: 12px 24px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.sh-drawer-foot .btn { justify-content: flex-start; }

/* Modal generic (raportare eroare etc.) */
dialog.sh-modal { width: min(560px, calc(100% - 32px)); max-width: none; border-radius: var(--r-lg); padding: 24px 28px 28px; box-shadow: var(--shadow-hover); margin: auto; max-height: 90vh; overflow-y: auto; }
.sh-modal-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; }
.sh-modal p.lead { margin: 0 0 18px; color: var(--ink-2); font-size: 14.5px; }
.sh-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Butonul de raportare erori */
.sh-bug-fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
              border: 1px solid var(--border); background: var(--surface); color: #9F1239; box-shadow: var(--shadow); cursor: pointer; padding: 0; }
.sh-bug-fab:hover { box-shadow: var(--shadow-hover); border-color: #F7C9CB; background: var(--tint-red); }
.sh-bug-fab .i { width: 22px; height: 22px; }

/* Toast */
.sh-toasts { position: fixed; left: 24px; bottom: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.sh-toast { position: relative; display: flex; align-items: center; gap: 10px; min-width: 320px; max-width: 480px; padding: 12px 8px 12px 16px;
            background: var(--navy); color: #fff; border-radius: 14px; box-shadow: var(--shadow-hover); font-size: 14.5px; animation: sh-tin .2s ease-out; }
.sh-toast .i { color: var(--cyan); }
.sh-toast > span { flex: 1; }
.sh-toast button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: rgba(194,205,226,.8); cursor: pointer; }
@keyframes sh-tin { from { transform: translateY(8px); opacity: 0; } }

/* Banner „ai uitat ieșirea?” și avertismentul de închidere */
.sh-banner { position: fixed; top: 80px; right: 16px; z-index: 60; display: flex; gap: 12px; align-items: flex-start; max-width: 380px; padding: 14px 12px 14px 16px;
             background: var(--surface); color: var(--ink); border: 1px solid #F7C9CB; border-left: 4px solid var(--red); border-radius: 14px; box-shadow: var(--shadow-hover); font-size: 14.5px; }
.sh-banner .i { color: #9F1239; margin-top: 1px; }
.sh-banner a { font-weight: 600; }
.sh-banner button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--ink-muted); cursor: pointer; flex: none; }

/* ═════════════════════════ Pe ecrane ═════════════════════════ */
/* Tabletă: bara se restrânge automat (shell.js pune .is-rail; regula de mai jos acoperă și fără JS) */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .sh-app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .sh-top { padding: 12px 20px; }
  .sh-content { padding: 24px 20px 96px; }
  .sh-search { width: min(320px, 46%); }
}

/* Telefon */
@media (max-width: 767.98px) {
  body { font-size: 15px; }
  .sh-app { grid-template-columns: minmax(0, 1fr); }
  .sh-side { display: none; }
  .sh-top { padding: 8px 12px 8px 14px; gap: 6px; min-height: 60px; }
  .sh-tb-brand { display: flex; align-items: center; padding: 6px 4px; border-radius: 10px; text-decoration: none; }
  .sh-tb-brand .brand-mark-a { fill: url(#arv-ga); } .sh-tb-brand .brand-mark-v { fill: url(#arv-gv); }
  .sh-tb-brand .sh-mk svg { width: 38px; height: 24px; }
  .sh-crumbs .c-prev { display: none; }
  .sh-crumbs ol { font-size: 17px; }
  .sh-crumbs [aria-current] span { font-family: var(--font-display); }
  .sh-search { width: 44px; padding: 0; justify-content: center; border-color: var(--border); }
  .sh-search > span, .sh-search kbd { display: none; }
  .sh-tb-av { display: inline-grid; background: none; border: 0; padding: 2px; border-radius: 50%; cursor: pointer; min-width: 44px; min-height: 44px; place-items: center; }
  .sh-content { padding: 16px 12px calc(var(--bottom-h) + 40px + env(safe-area-inset-bottom)); }
  .sh-bottom { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
               background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
               box-shadow: 0 -6px 24px rgba(7,27,58,.06); }
  .sh-bottom a, .sh-bottom button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; justify-content: center;
                 font: 500 11.5px var(--font); color: var(--ink-muted); text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 12px; padding: 0; min-width: 0; }
  .sh-bottom .sh-bn-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .sh-bottom .on { color: var(--blue-strong); font-weight: 600; }
  .sh-bottom .on .sh-bn-ic { background: var(--tint-blue); }
  dialog.sh-cmdk { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .sh-cmdk-foot { display: none; }
  dialog.sh-drawer { border-radius: 0; }
  .sh-drawer-head { padding-left: 16px; } .sh-seg { margin: 0 16px 8px; } .sh-drawer-body { padding: 4px 8px 16px; } .sh-drawer-foot { padding: 12px 16px 20px; }
  .sh-bug-fab { display: none; }
  .sh-toasts { left: 12px; right: 12px; bottom: calc(var(--bottom-h) + 16px); }
  .sh-toast { min-width: 0; max-width: none; }
  .sh-banner { top: auto; bottom: calc(var(--bottom-h) + 16px); left: 12px; right: 12px; max-width: none; }
  dialog.sh-modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; padding: 20px 16px 24px; max-height: 92dvh; }
  .sh-modal-actions { flex-direction: column-reverse; } .sh-modal-actions .btn { width: 100%; }
  .page-h { margin-bottom: 16px; }
}

/* ---------- Mișcare redusă ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Tipărire: doar conținutul ---------- */
@media print {
  .sh-side, .sh-top, .sh-bottom, .sh-bug-fab, .sh-skip, dialog { display: none !important; }
  .sh-app { display: block; background: none; }
  .sh-main { background: none; }
  .sh-content { padding: 0; max-width: none; }
}
