/* =========================================================================
   Jurnal Part-66 — un singur fișier de stiluri
   Mobile-first. Mod luminos / întunecat automat (prefers-color-scheme).
   Culorile se definesc o singură dată, ca variabile (tokens), mai jos.
   ========================================================================= */

/* ---------- 1. Variabile (tokens) ---------------------------------------- */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  /* Navy-ul hangarului (antet, meniu, ecranul de login) — la fel în ambele moduri */
  --chrome-bg: #06122a;
  --chrome-bg-2: #0b1d3f;
  --chrome-text: #e6efff;
  --chrome-muted: #a9bfe3;
  --chrome-line: rgb(148 179 230 / 0.22);
  --glow: #60a5fa;

  /* Fundalul paginilor este MEREU închis (imaginea „Jurnal Part-66”), în ambele moduri.
     De aceea culorile de bază sunt cele pentru fundal închis; în modul luminos devin
     albe doar casetele (carduri, alerte) — vezi blocul de mai jos. */
  color-scheme: dark;
  --bg: #050b18;
  --surface: #0c1730;
  --surface-2: #11203f;
  --text: #e6edf7;
  --text-muted: #a8b8d0;
  --border: #1f3358;
  --input-border: #7088b3;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --on-primary: #ffffff;
  --link: #93bfff;
  --focus: #93bfff;
  --success: #6ee7a0;
  --success-bg: #0c2919;
  --warning: #fdba74;
  --warning-bg: #2e1a08;
  --danger: #fca5a5;
  --danger-bg: #2f1111;
  --danger-solid: #b91c1c;
  --info: #93bfff;
  --info-bg: #0f2347;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.45), 0 8px 24px rgb(0 0 0 / 0.35);

  /* Casete ușor transparente, cu fundalul blurat în spate */
  --glass: rgb(12 23 48 / 0.6);
  --glass-solid: rgb(12 23 48 / 0.94);
  --glass-blur: blur(10px) saturate(140%);

  --radius: 14px;
  --radius-sm: 10px;
  --tap: 52px;            /* înălțimea minimă a butoanelor/câmpurilor (folosit cu mănuși) */
  --gutter: 16px;
  --card-pad: 20px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
}

/* Mod luminos: casetele sunt albe, cu text închis (fundalul paginii rămâne închis) */
@media (prefers-color-scheme: light) {
  .card, .entry-card, .account-card, .alert, .skip-link, .report-panel {
    color-scheme: light;
    color: var(--text);
    --bg: #eef3f9;
    --surface: #ffffff;
    --surface-2: #f3f6fb;
    --text: #0f172a;
    --text-muted: #475569;
    --border: #d3dce8;
    --input-border: #64748b;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --on-primary: #ffffff;
    --link: #1d4ed8;
    --focus: #2563eb;
    --success: #166534;
    --success-bg: #e7f6ec;
    --warning: #9a3412;
    --warning-bg: #fff3e6;
    --danger: #b91c1c;
    --danger-bg: #fdecec;
    --danger-solid: #b91c1c;
    --info: #1e40af;
    --info-bg: #e8f0fe;
    --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 6px 18px rgb(15 23 42 / 0.07);
    --glass: rgb(255 255 255 / 0.93);
    --glass-solid: rgb(255 255 255 / 0.97);
  }
}

/* ---------- 2. Bază ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

/* Fundalul tuturor paginilor (în afară de login, care își păstrează hangarul):
   imaginea „Jurnal Part-66”, fixă, ușor întunecată ca textul să rămână lizibil.
   Pe ecrane înalte (telefon) se folosește varianta verticală, cu logo-ul centrat. */
body:not(.auth)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(4 10 22 / 0.30) 0%, rgb(4 10 22 / 0.50) 100%),
    url("../img/fundal-lat.2fecf16a05d9.webp") center / cover no-repeat,
    #08172b;
}
@media (max-aspect-ratio: 1/1) {
  body:not(.auth)::before {
    background:
      linear-gradient(180deg, rgb(4 10 22 / 0.30) 0%, rgb(4 10 22 / 0.50) 100%),
      url("../img/fundal-telefon.6089744e96d2.webp") center / cover no-repeat,
      #08172b;
  }
}

/* Textul așezat direct pe fundal primește o umbră fină (lizibil și peste logo) */
.page, .site-footer { text-shadow: 0 1px 3px rgb(0 0 0 / 0.55); }
.page :is(.card, .entry-card, .account-card, .alert, .btn, .chip, .badge, input, select, textarea, button) {
  text-shadow: none;
}

/* Un element marcat „hidden” rămâne ascuns chiar dacă are alt stil de afișare */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-color: #08172b; /* albastrul de pe marginile imaginii de fundal */
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--link); text-underline-offset: 3px; }
code { font-family: var(--mono); }
strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px; top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

.icon { width: 24px; height: 24px; flex: none; }
.icon-lg { width: 40px; height: 40px; color: var(--text-muted); }

.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.wrap { overflow-wrap: anywhere; }

/* ---------- 3. Antet (hamburger + 3LC și rol) ---------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  background: linear-gradient(90deg, rgb(6 18 42 / 0.72) 0%, rgb(11 29 63 / 0.72) 100%);
  background-color: rgb(6 18 42 / 0.6);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--chrome-text);
  border-bottom: 1px solid var(--chrome-line);
  box-shadow: 0 1px 0 rgb(96 165 250 / 0.18);
}

.topbar :focus-visible,
.drawer :focus-visible { outline-color: #93bfff; }

.topbar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 1.0625rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  color: var(--chrome-text);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease;
}
.icon-btn:hover { background: rgb(96 165 250 / 0.16); }
.icon-btn:active { background: rgb(96 165 250 / 0.26); }

.who {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 48px;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  color: var(--chrome-text);
  text-decoration: none;
  line-height: 1.15;
}
.who:hover { background: rgb(96 165 250 / 0.16); }
.who-code {
  font-family: var(--mono);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.who-role { font-size: 0.8125rem; color: var(--chrome-muted); }

/* ---------- 4. Meniu lateral glisant ------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgb(2 6 23 / 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-in);
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(86vw, 340px);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  color: var(--chrome-text);
  /* Fundal inspirat din imaginea hangarului: navy adânc + avion și rețea de linii albastre */
  background:
    url("../img/drawer.34ef8e5d3920.svg") center bottom / cover no-repeat,
    radial-gradient(120% 60% at 50% 88%, rgb(16 48 106 / 0.85) 0%, rgb(16 48 106 / 0) 70%),
    linear-gradient(180deg, rgb(7 22 48 / 0.8) 0%, rgb(4 12 29 / 0.88) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid rgb(96 165 250 / 0.28);
  box-shadow: 8px 0 32px rgb(0 0 0 / 0.45);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform 0.2s var(--ease-in), visibility 0s linear 0.2s;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Deschis (prin JavaScript) sau, fără JavaScript, prin link-ul #meniu */
.drawer.is-open,
.drawer:target {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.28s var(--ease-out), visibility 0s;
}
.menu-open .scrim {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.28s var(--ease-out);
}
.menu-open { overflow: hidden; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 6px 18px;
  min-height: 60px;
}
.drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.drawer-brand .icon { color: var(--glow); filter: drop-shadow(0 0 6px rgb(96 165 250 / 0.7)); }
.icon-btn-ghost { color: var(--chrome-muted); }

.drawer-user {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 18px 10px;
  padding: 12px 14px;
  border: 1px solid var(--chrome-line);
  border-radius: var(--radius-sm);
  background: rgb(6 18 42 / 0.55);
}
.drawer-code {
  font-family: var(--mono);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 0 12px rgb(96 165 250 / 0.55);
}
.drawer-role { color: var(--chrome-muted); font-size: 0.9375rem; }

.drawer-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 16px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 20px);
  min-height: 56px;
  margin: 2px 10px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #dbe7ff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.drawer-link .icon { color: #7fb2ff; }
.drawer-link:hover { background: rgb(59 130 246 / 0.16); color: #fff; }
.drawer-link:active { background: rgb(59 130 246 / 0.26); }
.drawer-link.is-active {
  background: rgb(59 130 246 / 0.24);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--glow), 0 0 18px rgb(59 130 246 / 0.18);
}
.drawer-link.is-active .icon { color: #bcd7ff; }

/* Log out: ultimul, separat în partea de jos */
.drawer-logout {
  margin-top: auto;
  padding: 10px 0 max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--chrome-line);
  background: linear-gradient(180deg, rgb(3 10 26 / 0.55) 0%, rgb(3 10 26 / 0.9) 100%);
}
.drawer-link-logout .icon { color: #fca5a5; }

/* ---------- 5. Pagină, carduri, titluri -------------------------------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 20px max(var(--gutter), env(safe-area-inset-right)) 32px max(var(--gutter), env(safe-area-inset-left));
}

.page-title {
  margin: 4px 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
}

.card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-pad);
}
.card + .card { margin-top: 16px; }

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 700;
}
.card-title .icon { color: var(--primary); }
.card-lead { color: var(--text-muted); margin-bottom: 18px; }
.card-note { margin-top: 18px; color: var(--text-muted); font-size: 0.9375rem; text-align: center; }

.empty { text-align: center; display: grid; justify-items: center; gap: 10px; }
.empty .btn { margin-top: 6px; }

.facts { display: grid; gap: 12px; margin: 0 0 18px; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--text-muted); font-size: 0.875rem; }
.facts dd { margin: 0; font-weight: 600; font-size: 1.0625rem; }

.steps { margin: 0 0 16px; padding-left: 1.4rem; display: grid; gap: 6px; }

/* ---------- 6. Formulare --------------------------------------------------- */

.form { display: grid; gap: 18px; }

.label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.input,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.125rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus-visible,
.field input:focus-visible { border-color: var(--primary); }

.field [aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.input-code {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}
.input-otp {
  font-family: var(--mono);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.input-group { display: flex; }
.input-group .input,
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.input-addon {
  flex: none;
  min-width: 76px;
  min-height: var(--tap);
  padding: 0 12px;
  border: 1.5px solid var(--input-border);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
  color: var(--link);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.help { margin: 6px 0 0; color: var(--text-muted); font-size: 0.9375rem; }

.errorlist {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 10px;
  border-left: 3px solid var(--danger);
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9375rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  cursor: pointer;
}
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--primary); }

/* ---------- 7. Butoane ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--input-border);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-secondary .icon { color: var(--primary); }

.btn-danger { background: var(--danger-solid); color: #fff; }
.btn-danger:hover { background: #991b1b; }

.btn-link {
  min-height: 44px;
  padding: 0 8px;
  background: none;
  color: var(--link);
  text-decoration: underline;
  font-weight: 600;
}
.form-inline-end { margin: 14px 0 0; text-align: center; }

/* ---------- 8. Mesaje și etichete ------------------------------------------ */

.messages { display: grid; gap: 10px; margin-bottom: 16px; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-size: 0.975rem;
  margin-bottom: 16px;
}
.messages .alert { margin-bottom: 0; }
.alert .icon { width: 22px; height: 22px; margin-top: 1px; }
.alert p { color: var(--text); }
.alert-info { color: var(--info); background: var(--info-bg); }
.alert-success { color: var(--success); background: var(--success-bg); }
.alert-warning { color: var(--warning); background: var(--warning-bg); }
.alert-error { color: var(--danger); background: var(--danger-bg); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
}
.badge .icon { width: 16px; height: 16px; }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-neutral { color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); }
.badge-warning { color: var(--warning); background: var(--warning-bg); }

.badge-muted { color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }

/* ---------- 8b. Elemente comune de pagină --------------------------------- */

.page-wide { max-width: 880px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.page-head .page-title { margin-bottom: 0; }

.back-link { margin: 0 0 8px; }
.back-link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }

.plain-list { margin: 0 0 18px; padding-left: 1.2rem; display: grid; gap: 8px; }
.list-jump { margin: 4px 0 16px; }

.step-number {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.9375rem;
}

.facts-inline { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }

.btn-danger-outline { background: transparent; color: var(--danger); border-color: currentColor; }
.btn-danger-outline:hover { background: var(--danger-bg); }

/* Cât timp o cerere HTMX este în curs: butonul arată că lucrează */
form.htmx-request button[type="submit"] { opacity: 0.6; cursor: progress; }

/* Grupuri de bife pe rânduri mari, ușor de apăsat cu mănuși */
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
.check-row {
  min-height: 52px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.check-row:last-of-type { border-bottom: 0; }
.field-inline { padding: 4px 0 12px 36px; border-bottom: 1px solid var(--border); }
.field .input-days, .input-days { max-width: 140px; }

/* Alegerea rolului ca opțiuni mari (cont nou) */
.radio-cards { display: grid; gap: 10px; }
.radio-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: start;
  padding: 14px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.radio-card input { grid-row: span 2; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); }
.radio-card-title { font-weight: 700; }
.radio-card-text { color: var(--text-muted); font-size: 0.9375rem; }
.radio-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--info-bg); }

/* ---------- 8c. Pagina Accese ------------------------------------------------ */

.filters { display: grid; gap: 12px; margin: 16px 0; }
.filters .field { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.chip:hover { background: var(--surface-2); }
.chip.is-selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.account-list { display: grid; gap: 12px; }

.account-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  scroll-margin-top: 76px;
}
.account-card.is-invitat { border-left-color: var(--warning); }
.account-card.is-dezactivat { border-left-color: var(--input-border); }
.account-card:target { box-shadow: 0 0 0 3px var(--focus), var(--shadow); }

.account-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.account-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.account-email { margin: 4px 0 10px; color: var(--text-muted); }

.badge-role { border: 1px solid currentColor; }
.role-owner { color: #6d28d9; background: #f3ecff; }
.role-admin { color: var(--info); background: var(--info-bg); }
.role-inspector { color: #0f766e; background: #e6f7f5; }
.role-user { color: var(--text-muted); background: var(--surface-2); }

.account-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }

.card-flash {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  color: var(--success);
  font-weight: 600;
}
.card-flash .icon { width: 20px; height: 20px; }

.account-details { margin-top: 12px; border-top: 1px solid var(--border); }
.account-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  font-weight: 700;
  color: var(--link);
  cursor: pointer;
  list-style: none;
}
.account-details > summary::-webkit-details-marker { display: none; }
.account-details > summary::after {
  content: "";
  width: 10px; height: 10px;
  margin-left: auto;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s var(--ease-out);
}
.account-details[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.account-details > summary .icon { width: 20px; height: 20px; }
.account-details[open] { padding-bottom: 4px; }
.account-details > *:not(summary) + * { margin-top: 14px; }

.perm-form legend { font-weight: 700; margin-bottom: 4px; }

.lock-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.lock-note .icon { width: 20px; height: 20px; margin-top: 2px; }

.perm-readonly { list-style: none; margin: 0; padding: 0; }
.perm-readonly li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}
.perm-readonly li:last-child { border-bottom: 0; }
.perm-readonly .icon { width: 20px; height: 20px; }
.perm-readonly .is-on .icon { color: var(--success); }
.perm-readonly .is-off { color: var(--text-muted); }

.role-form .input-group select { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }

.account-actions { display: grid; gap: 10px; }
.account-actions form { margin: 0; }

@media (min-width: 768px) {
  .account-actions { grid-template-columns: 1fr 1fr; }
  .account-actions .btn-danger-outline { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr auto; align-items: end; }
}

@media (prefers-color-scheme: dark) {
  .role-owner { color: #c4b5fd; background: #241a3d; }
  .role-inspector { color: #5eead4; background: #0b2a28; }
}

/* ---------- 8d. Lucrare nouă, liste, rânduri simple -------------------------- */

.page-actions { display: grid; gap: 10px; }
@media (min-width: 768px) { .page-actions { grid-template-columns: 1fr 1fr; } }

.alert-compact { padding: 10px 12px; font-size: 0.9375rem; }

/* Butoane rapide (aeronave recente, ore, colegi, dată) */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
button.chip { font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation; }
button.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip-lg { min-width: 64px; min-height: 52px; justify-content: center; font-size: 1.125rem; }
.chip-sub { margin-left: 6px; font-weight: 400; color: var(--text-muted); font-size: 0.875rem; }
.chip[aria-pressed="true"] .chip-sub { color: inherit; }
.quick-hours { margin: 0 0 10px; }

.field-with-quick { display: grid; gap: 0; }
.field-with-quick .quick { margin-top: 10px; }

.input-reg { font-family: var(--mono); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.field .input-hours, .input-hours { max-width: 160px; font-variant-numeric: tabular-nums; }
.field .input-ata-code, .input-ata-code { max-width: 120px; font-family: var(--mono); }
textarea.input { min-height: 104px; resize: vertical; line-height: 1.45; }

.help-ok { display: flex; gap: 6px; align-items: center; color: var(--success); font-weight: 600; }
.help-ok .icon { width: 18px; height: 18px; }

/* Căutarea capitolului ATA */
.ata-field { position: relative; }
.ata-options {
  list-style: none;
  margin: 6px 0 0;
  padding: 4px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: 60vh;
  overflow-y: auto;
}
.ata-options li {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.ata-options li:hover,
.ata-options li[aria-selected="true"] { background: var(--info-bg); color: var(--info); font-weight: 600; }
.ata-options .is-hidden { display: none; }

/* Butonul „Salvează” rămâne la îndemână în partea de jos a ecranului */
.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter) max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgb(5 11 24 / 0) 0%, rgb(5 11 24 / 0.82) 30%);
}
/* În interiorul unei casete (formularul Lucrare nouă), bara ia culoarea casetei */
.card .sticky-actions {
  margin: 0 calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad));
  padding: 12px var(--card-pad) max(var(--card-pad), env(safe-area-inset-bottom));
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, transparent 0%, var(--glass-solid) 30%);
}

.error-summary ul { margin: 6px 0 0; padding-left: 1.1rem; }
.error-summary a { color: inherit; font-weight: 600; }
.error-summary:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Rânduri simple (ultimele lucrări, liste, mai târziu Istoric și Logs) */
.row-list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: 0; }
.row-main { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { grid-column: 1; color: var(--text-muted); font-size: 0.9375rem; }
.row > .badge { grid-column: 2; grid-row: 1 / span 2; }
.row-link { padding: 0; }
.row-link > a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2px 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 4px;
  color: var(--text);
  text-decoration: none;
}
.row-link > a:hover { background: var(--surface-2); }
.row-link .row-sub { grid-column: 1; }
.row-link .badge { grid-column: 2; grid-row: 1 / span 2; }
.row-link .icon { grid-column: 3; grid-row: 1 / span 2; width: 20px; height: 20px; color: var(--link); }

.add-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.latest { margin-top: 24px; }

/* ---------- 8e. Validare lucrări, lucrări respinse --------------------------- */

/* Numărul din meniu (lucrări în așteptare / respinse) și punctul de pe butonul ☰ */
.nav-badge {
  margin-left: auto;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #1c1300;
  font-size: 0.875rem;
  font-weight: 800;
  text-align: center;
}
.icon-btn { position: relative; }
.menu-dot {
  position: absolute;
  top: 9px; right: 9px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 2px var(--chrome-bg);
}

.alert-link { text-decoration: none; font-weight: 600; }
.alert-link:hover { filter: brightness(0.97); }

.tabs { margin: 4px 0 16px; }
.chip-count {
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.875rem;
}
.chip.is-selected .chip-count { background: rgb(255 255 255 / 0.22); color: inherit; }

.entry-list { display: grid; gap: 12px; }
.entry-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-left: 4px solid var(--input-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.entry-card.is-pending { border-left-color: var(--warning); }
.entry-card.is-validated { border-left-color: var(--success); }
.entry-card.is-rejected { border-left-color: var(--danger); }

.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.entry-title { margin: 0; font-size: 1.125rem; font-weight: 700; }
.entry-head .badge { margin-left: auto; }
.entry-select {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  margin: -6px 0 -6px -6px;
  cursor: pointer;
}
.entry-select input { width: 26px; height: 26px; accent-color: var(--primary); cursor: pointer; }

.entry-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 12px 0 8px;
}
.entry-facts div { min-width: 0; }
.entry-facts dt { color: var(--text-muted); font-size: 0.8125rem; }
.entry-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.entry-desc {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow-wrap: anywhere;
}
.entry-meta { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 0.9375rem; }
.entry-meta .icon { width: 18px; height: 18px; }
.entry-meta-ok { color: var(--success); font-weight: 600; }

.reject-note {
  margin: 8px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  overflow-wrap: anywhere;
}
.reject-title { display: flex; align-items: center; gap: 6px; color: var(--danger); margin-bottom: 4px; }
.reject-title .icon { width: 18px; height: 18px; }
.page > .reject-note { margin: 0 0 16px; }

.entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.entry-card .lock-note, .entry-card > .btn-block { margin-top: 12px; }

.bulk-tools { margin: -6px 0 8px; }
.validation-form .sticky-actions { margin-top: 12px; }
[data-bulk-submit][disabled] { opacity: 0.5; cursor: not-allowed; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

@media (min-width: 768px) {
  .entry-facts { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 8f. Istoric --------------------------------------------------------- */

.person-picker { margin-bottom: 12px; }
.person-picker select { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }

.filters-box { padding: 0 16px; margin-bottom: 12px; }
.filters-box > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  font-weight: 700;
  color: var(--link);
  cursor: pointer;
  list-style: none;
}
.filters-box > summary::-webkit-details-marker { display: none; }
.filters-box > summary .icon { width: 20px; height: 20px; }
.filters-box[open] { padding-bottom: 16px; }
.filters-grid { display: grid; gap: 14px; }
.filters-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 768px) {
  .filters-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.summary { display: grid; gap: 10px; margin: 4px 0 12px; }
.summary > p { margin: 0; font-size: 1.0625rem; }

.history { padding: 4px 16px; }
.h-row { display: block; padding: 14px 0 14px 12px; border-left: 4px solid transparent; }
.h-row.is-pending { border-left-color: var(--warning); }
.h-row.is-rejected { border-left-color: var(--danger); }
.h-row.is-validated { border-left-color: var(--success); }
.h-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.h-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.h-reg { font-weight: 700; }
.h-top .badge { margin-left: auto; }
.h-ata { margin: 4px 0 2px; color: var(--text-muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.h-desc {
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.h-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.h-reject { display: flex; gap: 6px; margin: 8px 0 0; color: var(--danger); font-size: 0.9375rem; }
.h-reject .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }
.btn-small .icon { width: 18px; height: 18px; }

/* ---------- 8g. Logs ---------------------------------------------------------- */

.log-search { margin-bottom: 12px; }
.log-search .input-code { max-width: 140px; }
.log-card { padding: 4px 16px; }
.log-row { display: block; padding: 12px 0 12px 12px; border-left: 4px solid var(--border); }
.log-row.cat-auth { border-left-color: #6366f1; }
.log-row.cat-works { border-left-color: var(--success); }
.log-row.cat-accounts { border-left-color: var(--warning); }
.log-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.log-time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.9375rem; color: var(--text-muted); }
.log-main { margin: 4px 0 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.log-action { font-weight: 600; }
.log-details { margin: 2px 0; overflow-wrap: anywhere; }
.log-ip { margin: 2px 0 0; color: var(--text-muted); font-size: 0.875rem; font-family: var(--mono); }
.badge-cat { font-size: 0.8125rem; padding: 2px 10px; }
.badge-cat.cat-auth { color: #4338ca; background: #eef0ff; }
.badge-cat.cat-works { color: var(--success); background: var(--success-bg); }
.badge-cat.cat-accounts { color: var(--warning); background: var(--warning-bg); }
@media (prefers-color-scheme: dark) {
  .badge-cat.cat-auth { color: #c7d2fe; background: #1e1b4b; }
  .log-row.cat-auth { border-left-color: #818cf8; }
}

/* ---------- 8h. Coduri de rezervă, tipărire ----------------------------------- */

.stack { display: grid; gap: 10px; }
.input-recovery { font-family: var(--mono); font-size: 1.25rem; letter-spacing: 0.08em; }
.recovery-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 40px;
  margin: 4px 0 16px;
  padding-left: 2.2rem;
}
@media (min-width: 520px) {
  .recovery-list { grid-template-columns: repeat(2, max-content); }
}
.recovery-list code { font-size: 1.125rem; font-weight: 700; letter-spacing: 0.06em; }
.recovery-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.recovery-actions [hidden] { display: none !important; }
.print-only { display: none; }

@media print {
  .topbar, .drawer, .scrim, .site-footer, .no-print, .alert, .skip-link, .messages { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none !important; }
  .page { text-shadow: none; }
  .card, .entry-card, .account-card { background: #fff; color: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card { box-shadow: none; border: 1px solid #999; }
  .print-only { display: block; }
}

/* ---------- 9. Ecranele de autentificare (fundal hangar) ------------------- */

body.auth {
  background:
    url("../img/hangar.e8c901a8965f.svg") center bottom / cover no-repeat fixed,
    radial-gradient(90% 60% at 50% 80%, #12306a 0%, rgb(18 48 106 / 0) 70%),
    linear-gradient(180deg, #030a1a 0%, #06122a 55%, #040c1d 100%);
  background-color: #040c1d;
}

.auth-main {
  flex: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) var(--gutter) 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.auth-brand { display: grid; justify-items: center; gap: 10px; color: var(--chrome-text); }
.auth-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgb(96 165 250 / 0.5);
  background: radial-gradient(circle, rgb(37 99 235 / 0.35) 0%, rgb(6 18 42 / 0.9) 70%);
  box-shadow: 0 0 24px rgb(59 130 246 / 0.45);
  color: #bcd7ff;
}
.auth-logo .icon { width: 30px; height: 30px; }
.auth-app { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; text-shadow: 0 0 14px rgb(96 165 250 / 0.5); }

.auth-card { padding: 24px 20px; }
.auth-card .card-title { font-size: 1.375rem; margin-bottom: 6px; }

.auth-disclaimer {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgb(96 165 250 / 0.3);
  border-radius: var(--radius-sm);
  background: rgb(3 10 26 / 0.72);
  color: #d3e0f5;
  font-size: 0.9375rem;
}
.auth-disclaimer .icon { width: 20px; height: 20px; color: var(--glow); margin-top: 2px; }

.qr { margin: 0 0 20px; display: grid; justify-items: center; gap: 12px; }
.qr-image {
  width: min(232px, 72vw);
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
}
.qr-image svg { display: block; width: 100%; height: auto; }
.qr figcaption { text-align: center; color: var(--text-muted); font-size: 0.9375rem; }
.secret {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--input-border);
  color: var(--text);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  user-select: all;
}

/* ---------- 10. Subsol cu disclaimer -------------------------------------- */

.site-footer {
  padding: 14px var(--gutter) max(14px, env(safe-area-inset-bottom));
  background: rgb(4 10 22 / 0.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
}
.auth .site-footer { border-top-color: var(--chrome-line); color: #b3c4e0; background: rgb(3 10 26 / 0.6); }
.footer-links { margin: 0 0 4px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.footer-links .icon { width: 18px; height: 18px; }

.auth-help { margin: 0; text-align: center; }
.auth-help a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgb(96 165 250 / 0.3);
  border-radius: 999px;
  background: rgb(3 10 26 / 0.72);
  color: #d3e0f5;
  font-weight: 600;
}

/* Pagina Ajutor */
.help-intro { margin-bottom: 16px; }
.help-section { scroll-margin-top: 72px; }
.help-subtitle { margin: 18px 0 8px; font-size: 1.0625rem; font-weight: 700; }
.help-note {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
}
.help-note .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--warning); }
.help-states { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.help-states li { display: grid; gap: 6px; justify-items: start; }

/* ---------- 11. Ecrane mai mari ------------------------------------------- */

@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .page { padding-top: 28px; }
  .page-title { font-size: 1.75rem; }
  :root { --card-pad: 24px; }
  .auth-card { padding: 28px; }
}

/* ---------- 10b. Fereastra „Raportează o problemă” (colțul dreapta-jos) ------- */

.report-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(147 191 255 / 0.35);
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 0.15s var(--ease-out), background-color 0.15s ease;
}
.report-fab:hover { background: var(--primary-hover); }
.report-fab:active { transform: scale(0.95); }
.report-fab:focus-visible { outline: 3px solid #93bfff; outline-offset: 3px; }
.report-fab .icon { width: 26px; height: 26px; }
.report-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #050b18;
  border-radius: 999px;
  background: #f59e0b;
  color: #1c1300;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}
/* Pe paginile cu bara de salvare lipită jos, butonul stă deasupra ei */
body:has(.sticky-actions) .report-fab { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px); }
/* Subsolul lasă loc butonului, ca textul să nu fie acoperit */
body:has(.report-fab) .site-footer { padding-bottom: calc(max(14px, env(safe-area-inset-bottom)) + 72px); }

.report-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  display: flex;
  flex-direction: column;
  height: min(620px, 86dvh);
  color: var(--text);
  background: var(--glass-solid);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgb(0 0 0 / 0.5);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 640px) {
  .report-panel {
    left: auto;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 68px);
    width: 400px;
    height: min(600px, calc(100dvh - 140px));
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
  }
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  border-bottom: 1px solid var(--border);
}
.report-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.0625rem; font-weight: 700; }
.report-title .icon { color: var(--primary); }
.report-head .icon-btn { color: var(--text); background: transparent; border: 0; padding: 0; }
.report-head .icon-btn:hover { background: var(--surface-2); }
.report-body {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.report-page .report-body { padding: 0; overflow: visible; }

.report-intro p { margin: 0 0 6px; }
.report-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.report-messages:empty { display: none; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; }
.bubble.is-mine {
  justify-self: end;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: 4px;
}
.bubble.is-theirs {
  justify-self: start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble-text { margin: 0; overflow-wrap: anywhere; }
.bubble-meta { margin: 4px 0 0; font-size: 0.8125rem; color: var(--text-muted); }
.bubble.is-mine .bubble-meta { color: rgb(255 255 255 / 0.85); }
.bubble-seen .icon { width: 14px; height: 14px; margin-right: 2px; vertical-align: -2px; }
.report-sent { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--success); font-weight: 600; }
.report-sent .icon { width: 18px; height: 18px; }
.report-form { display: grid; gap: 10px; }
.report-form .alert { margin: 0; }
.report-form .help { margin: -4px 0 0; }
.report-back { margin: 0; }
.report-back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.report-person { margin: 0; font-size: 1.0625rem; }
.report-when { font-size: 0.8125rem; font-weight: 400; }
.report-inbox .is-unread .row-main { font-weight: 700; }

/* Browsere fără blur sau sistem setat pe „transparență redusă”: casete opace */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .entry-card, .account-card { background: var(--glass-solid); }
  .topbar { background: linear-gradient(90deg, var(--chrome-bg) 0%, var(--chrome-bg-2) 100%); }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .entry-card, .account-card { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar { background: linear-gradient(90deg, var(--chrome-bg) 0%, var(--chrome-bg-2) 100%); }
}

/* ---------- 12. Mișcare redusă -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .btn:active { transform: none; }
}
