/*
 * Otix design system — componenti.
 * Richiede tokens.css. Solo var(--…): nessun colore scritto qui.
 * Classi kebab-case semantiche, stati come classi separate (.active, .selected, .visible, .pending…).
 * Regole: mai testo in maiuscolo (nemmeno via CSS), testo minimo var(--text-12).
 */

/* In un layer: le regole dell'app (non in layer) vincono sempre, a parità di specificità o no. */
@layer base, components;
@layer components {

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--text-14)/var(--leading) var(--font-sans); -webkit-font-smoothing: antialiased }
button, input, select, textarea { font: inherit }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent }
button, a { touch-action: manipulation }
a { color: inherit; text-decoration: none }
button { cursor: pointer; border: 0; background: none; color: inherit; padding: 0 }
button:disabled { opacity: .55; cursor: not-allowed }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px }
h1, h2, h3, p { margin: 0 }
h1 { font-size: var(--text-36); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); font-weight: var(--weight-semibold) }
h2 { font-size: var(--text-19); line-height: var(--leading-snug); letter-spacing: var(--tracking-heading); font-weight: var(--weight-semibold) }
h3 { font-size: var(--text-16); font-weight: var(--weight-semibold) }
small { font-size: var(--text-12) }
strong { font-weight: var(--weight-semibold) }

.muted { color: var(--muted) }
.eyebrow { display: block; font-size: var(--text-12); font-weight: var(--weight-display); letter-spacing: .15px; color: var(--muted); margin-bottom: var(--space-12) }
.icon { width: var(--icon); height: var(--icon); flex-shrink: 0 }
.divider { height: 1px; background: var(--line); margin: var(--space-20) 0; border: 0 }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
.skip { position: fixed; left: 15px; top: -80px; background: var(--brand); color: var(--on-brand); padding: var(--space-12); z-index: var(--z-skip); border-radius: var(--radius-8) }
.skip:focus { top: var(--space-10) }
.loading { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 42px; font-weight: var(--weight-semibold); letter-spacing: -2px }
.loading span { font-size: var(--text-12); letter-spacing: 0; font-weight: var(--weight-regular); color: var(--muted); margin-top: var(--space-12) }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh }
.sidebar { width: var(--sidebar-w); position: fixed; top: 0; bottom: 0; background: var(--surface); border-right: 1px solid var(--line); padding: 36px 23px 18px; display: flex; flex-direction: column; z-index: var(--z-sidebar); overflow-y: auto }
.sidebar nav { display: flex; flex-direction: column; gap: 5px }
.nav-label { font-size: var(--text-12); color: var(--muted); padding-left: 13px; margin-bottom: var(--space-12) }
.nav-item { display: flex; align-items: center; gap: var(--space-12); padding: 14px var(--space-12); color: var(--muted); font-size: var(--text-14); border-radius: var(--radius-8); min-height: var(--control-h); transition: background var(--dur-fast) }
.nav-item .icon { width: 18px; height: 18px }
.nav-item:hover { background: var(--slate-100) }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: var(--weight-semibold) }
.nav-item b { margin-left: auto; font-size: var(--text-12); padding: 0 var(--space-6); background: var(--brand); color: var(--on-brand); border-radius: 4px }
.sidebar-bottom { margin-top: auto; padding-top: 35px }
.profile-link { border-top: 1px solid var(--line); padding: var(--space-20) 0 var(--space-12); display: flex; align-items: center; gap: var(--space-10); font-size: var(--text-14); font-weight: var(--weight-semibold) }
.profile-link small { display: block; font-size: var(--text-12); color: var(--muted); font-weight: var(--weight-regular) }
.profile-link > .icon { margin-left: auto; width: 14px }

.main-shell { margin-left: var(--sidebar-w); flex: 1; min-width: 0 }
.topbar { height: var(--topbar-h); border-bottom: 1px solid var(--line); padding: 0 var(--page-pad-x); display: flex; align-items: center; justify-content: space-between; font-size: var(--text-13); background: var(--surface-alt) }
.topbar-right { display: flex; gap: 22px; align-items: center }
.breadcrumb { color: var(--muted); margin-left: var(--space-10) }
.topbar .avatar { width: 32px; height: 32px; font-size: var(--text-12) }
.main-shell main { max-width: var(--page-max); padding: var(--page-pad-y) var(--page-pad-x) var(--space-32); margin: 0 auto; min-height: calc(100vh - 145px) }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); margin-bottom: 29px }
.page-heading h1 { margin-bottom: var(--space-10) }
.page-heading .muted { font-size: var(--text-14) }
.heading-actions { display: flex; gap: var(--space-10); flex-wrap: wrap }
.app-footer { display: flex; justify-content: space-between; padding: var(--space-14) var(--page-pad-x) 22px; color: var(--muted); font-size: var(--text-12) }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; gap: var(--space-10); align-items: center; justify-content: center; min-height: var(--control-h); padding: var(--space-12) 19px; border-radius: var(--radius-9); font-size: var(--text-14); font-weight: var(--weight-semibold); white-space: nowrap; transition: background var(--dur), transform var(--dur) }
.btn:hover { transform: translateY(-1px) }
.btn:disabled:hover { transform: none }
.btn.primary { background: var(--brand); color: var(--on-brand) }
.btn.primary:hover { background: var(--brand-dark) }
.btn.secondary { background: var(--surface); border: 1px solid var(--line) }
.btn.secondary:hover { background: var(--slate-100) }
.btn.reject { background: var(--status-danger-bg); color: var(--status-danger-fg) }
.btn.danger { background: var(--danger-solid); color: var(--on-danger) }
.btn.danger:hover { background: var(--danger-solid-dark) }
.btn.full { width: 100% }
.text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: var(--text-14); font-weight: var(--weight-semibold); padding: 9px 0; color: var(--brand) }
.text-btn:hover { color: var(--brand-dark) }
.text-btn.danger { color: var(--status-danger-fg) }
.icon-btn { width: var(--icon-btn); height: var(--icon-btn); border: 1px solid var(--line); border-radius: var(--radius-8); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0 }
.icon-btn:hover { background: var(--bg) }

/* ---------- Form ---------- */
label, legend { font-size: var(--text-14); font-weight: var(--weight-medium); color: var(--ink-2) }
label { display: block }
label input, label select, label textarea { margin-top: var(--space-8) }
input:not([type=checkbox]):not([type=radio]), select, textarea { display: block; width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-8); padding: var(--space-12) 13px; outline: none; color: var(--ink); min-height: var(--control-h); font-size: var(--text-15); transition: border-color var(--dur), box-shadow var(--dur) }
textarea { resize: vertical }
input::placeholder, textarea::placeholder { color: var(--slate-500) }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: var(--shadow-focus) }
input[type=checkbox], input[type=radio] { accent-color: var(--brand) }
label small, fieldset small { display: block; color: var(--muted); font-size: var(--text-12); font-weight: var(--weight-regular); margin-top: var(--space-8) }
fieldset { padding: 0; border: 0; margin: 0 }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 21px var(--space-18) }
.span-2 { grid-column: 1 / -1 }
.form-error { color: var(--status-danger-fg); font-size: var(--text-13); line-height: 1.6 }
.form-error:empty { display: none }
.optional { font-size: var(--text-12); color: var(--muted); font-weight: var(--weight-regular); margin-left: 5px }
.field-hint, .form-hint { font-size: var(--text-13); color: var(--muted); margin: 0 }
.checkbox-label { display: flex; gap: var(--space-12); align-items: center; border: 1px solid var(--line); padding: 13px; border-radius: var(--radius-8); margin-top: 9px }
.checkbox-label input { margin: 0; width: 17px; height: 17px }
.checkbox-label span small { display: block; color: var(--muted); font-size: var(--text-12); font-weight: var(--weight-regular); margin-top: var(--space-2) }
.search-box { display: flex; align-items: center; gap: 7px; max-width: 220px; border: 1px solid var(--line); border-radius: var(--radius-8); padding: 0 var(--space-10); background: var(--surface) }
.search-box .icon { width: var(--icon-sm); color: var(--slate-500) }
.search-box input:not([type=checkbox]):not([type=radio]) { border: 0; background: none; box-shadow: none; padding: 7px 3px; min-height: 38px; font-size: var(--text-13); margin-top: 0 }
.search-box:focus-within { border-color: var(--focus); box-shadow: var(--shadow-focus) }

/* ---------- Contenitori ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-16); overflow: hidden }
.section-heading { padding: 23px var(--space-24); display: flex; align-items: center; justify-content: space-between; gap: var(--space-12) }
.section-heading h2 { font-size: var(--text-19) }
.section-heading p { font-size: var(--text-13); margin-top: 5px }
.section-heading .text-btn { font-size: var(--text-13); white-space: nowrap }
.section-heading .text-btn .icon { width: 14px }
.list-toolbar { display: flex; justify-content: space-between; gap: var(--space-16); padding: 22px var(--space-24); flex-wrap: wrap }
.list-footer { border-top: 1px solid var(--line); padding: var(--space-14) var(--space-24); display: flex; align-items: center; justify-content: space-between; font-size: var(--text-12); color: var(--muted); gap: var(--space-12) }

/* Riga di elenco (offix .request-row) */
.row { width: 100%; display: flex; align-items: center; text-align: left; padding: var(--space-20) var(--space-24); gap: var(--space-14); border-top: 1px solid var(--line-soft); transition: background var(--dur-fast) }
.row:hover { background: var(--slate-50) }
.row-symbol { width: 38px; height: 40px; border-radius: var(--radius-10); background: var(--tint-slate-bg); color: var(--tint-slate-fg); display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.row-symbol .icon { width: 17px }
.row-symbol.sand { background: var(--tint-sand-bg); color: var(--tint-sand-fg) }
.row-symbol.lavender { background: var(--tint-lavender-bg); color: var(--tint-lavender-fg) }
.row-symbol:has(.avatar) { background: none }
.row-main { flex: 1; min-width: 0 }
.row-main strong { font-size: var(--text-15); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.row-main small { color: var(--muted); font-size: var(--text-12); display: block; margin-top: 3px }
.row-chevron { width: 13px; color: var(--slate-400) }

/* Statistica */
.stat { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-13); padding: var(--space-20) 23px; min-height: 152px }
.stat-top { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-14); color: var(--muted) }
.stat-icon { height: 32px; width: 32px; display: grid; place-items: center; border-radius: var(--radius-9); background: var(--tint-slate-bg); color: var(--tint-slate-fg) }
.stat-icon .icon { width: var(--icon-sm); height: var(--icon-sm) }
.stat-icon.sand { background: var(--tint-sand-bg); color: var(--tint-sand-fg) }
.stat-icon.lavender { background: var(--tint-lavender-bg); color: var(--tint-lavender-fg) }
.stat-value { display: block; font-size: 34px; letter-spacing: -1px; font-weight: var(--weight-display); line-height: var(--leading-snug); margin: 3px 0 4px }
.stat > small { color: var(--muted) }

/* Card cliccabile (offix .dash-card / .person-card) */
.card { display: flex; position: relative; overflow: hidden; flex-direction: column; align-items: stretch; text-align: left; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-16); padding: var(--space-24); color: var(--ink) }
a.card, button.card { min-height: 235px; transition: transform var(--dur), border-color var(--dur), box-shadow var(--dur) }
a.card:hover, button.card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-card-hover) }
a.card:active, button.card:active { transform: translateY(-1px) }
a.card:focus-visible, button.card:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); font-size: var(--text-14); font-weight: var(--weight-medium) }
.card-top .icon { width: 21px; height: 21px; color: var(--brand) }
.card-value { font-size: var(--text-46); line-height: 1.15; letter-spacing: var(--tracking-display); margin: 22px 0 var(--space-8); font-weight: var(--weight-semibold) }
.card-description { font-size: var(--text-13); color: var(--muted); line-height: 1.6; margin-bottom: var(--space-20) }
.card-action { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); margin-top: auto; font-size: var(--text-13); font-weight: var(--weight-semibold); color: var(--brand) }
.card-action .icon { width: 18px; height: 18px; transition: transform var(--dur) }
.card:hover .card-action .icon { transform: translateX(3px) }
.card.featured { background: var(--brand); border-color: var(--brand); color: var(--on-brand) }
.card.featured .card-top .icon, .card.featured .card-action, .card.featured .card-description { color: var(--on-brand) }

/* Banner informativo e tessera icona */
.info-banner { display: flex; gap: var(--space-14); align-items: center; border: 1px solid var(--brand-line); border-radius: var(--radius-12); background: var(--brand-soft); padding: var(--space-20) var(--space-24); margin-bottom: var(--space-24); color: var(--slate-700); font-size: var(--text-14) }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-10); background: var(--tint-slate-bg); color: var(--tint-slate-fg); flex-shrink: 0 }

/* ---------- Etichette ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-5); line-height: var(--leading-relaxed); padding: var(--space-4) 9px; font-size: var(--text-12); white-space: nowrap; font-weight: var(--weight-medium); background: var(--status-cancelled-bg); color: var(--status-cancelled-fg) }
.badge i { width: 4px; height: 4px; border-radius: var(--radius-round); background: currentColor }
.badge.pending { background: var(--status-pending-bg); color: var(--status-pending-fg) }
.badge.approved { background: var(--status-approved-bg); color: var(--status-approved-fg) }
.badge.rejected { background: var(--status-rejected-bg); color: var(--status-rejected-fg) }
.badge.cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-fg) }
.badge.danger { background: var(--status-danger-bg); color: var(--status-danger-fg) }
.badge.ok { background: var(--status-ok-bg); color: var(--status-ok-fg) }
.badge.info { background: var(--status-info-bg); color: var(--status-info-fg) }
/* Chip (offix .role-label): etichetta bordata per ruoli e categorie */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px var(--space-8); border: 1px solid var(--line-strong); border-radius: var(--radius-5); font-size: var(--text-12); color: var(--slate-700); background: var(--slate-100); white-space: nowrap }

/* ---------- Avatar ---------- */
.avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--avatar); color: var(--on-avatar); border-radius: var(--radius-round); font-size: var(--text-12); font-weight: var(--weight-semibold); letter-spacing: .2px; overflow: hidden }
.avatar.small { width: 28px; height: 28px; font-size: var(--text-12) }
.avatar.large { width: 72px; height: 72px; font-size: 24px }
.avatar.has-photo { background: var(--slate-100) center / cover no-repeat; color: transparent }

/* ---------- Tabs (segmentate) ---------- */
.tabs { display: flex; gap: 3px; overflow-x: auto }
.tab { padding: 9px var(--space-12); border-radius: var(--radius-7); font-size: var(--text-13); white-space: nowrap; color: var(--muted); min-height: var(--icon-btn) }
.tab:hover { background: var(--slate-100) }
.tab.selected { color: var(--slate-800); background: var(--slate-200); font-weight: var(--weight-semibold) }

/* ---------- Dialog ---------- */
dialog, .dialog { border: 1px solid var(--line); border-radius: var(--radius-18); padding: 30px; width: min(var(--dialog-w), calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-dialog) }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(4px) }
dialog[open] { animation: otx-modal-enter var(--dur-slow) var(--ease-out) both }
dialog[open]::backdrop { animation: otx-backdrop-enter var(--dur) ease-out both }
@keyframes otx-modal-enter { from { opacity: 0; transform: translateY(18px) scale(.98) } to { opacity: 1; transform: none } }
@keyframes otx-backdrop-enter { from { opacity: 0 } to { opacity: 1 } }
.modal-header { display: flex; justify-content: space-between; gap: var(--space-12); align-items: center }
.modal-header h2 { font-size: var(--text-25); letter-spacing: var(--tracking-title) }
.modal-header .eyebrow { margin-bottom: 7px }
.modal-subtitle { margin-top: var(--space-14); font-size: var(--text-14) }
.modal-section-title { font-size: var(--text-15); margin: 22px 0 4px }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-10); margin-top: var(--space-24) }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: var(--space-24); left: 50%; transform: translate(-50%, 20px); background: var(--brand); color: var(--on-brand); padding: 13px var(--space-20); border-radius: var(--radius-10); box-shadow: var(--shadow-toast); z-index: var(--z-toast); font-size: var(--text-12); opacity: 0; pointer-events: none; transition: opacity var(--dur), transform var(--dur); max-width: calc(100% - 32px); width: max-content }
.toast.visible { opacity: 1; transform: translate(-50%, 0) }
.toast.error { background: var(--danger-solid); color: var(--on-danger) }

/* ---------- Stato vuoto ---------- */
.empty-state { padding: var(--space-48) 25px; text-align: center; color: var(--muted) }
.empty-state > .icon { width: 30px; height: 30px; margin: 0 auto 15px; color: var(--slate-500); display: block }
.empty-state h3 { color: var(--slate-600); font-size: var(--text-15) }
.empty-state p { font-size: var(--text-13); max-width: 300px; margin: var(--space-8) auto var(--space-12) }
.empty-orbit { width: 80px; height: 80px; border: 1px solid var(--line-strong); border-radius: var(--radius-round); display: grid; place-items: center; margin: var(--space-24) auto }
.empty-orbit .icon { width: 30px; height: 30px; color: var(--slate-500) }

/* ---------- Da 721px (desktop e tablet) ---------- */
@media (min-width: 721px) {
  .row { min-height: 90px; padding-top: 22px; padding-bottom: 22px }
  .stat-value { font-size: 39px }
  .section-heading h2 { font-size: 20px }
}

/* ---------- Desktop (≥1100px) ---------- */
@media (min-width: 1100px) {
  .sidebar { width: 252px }
  .main-shell { margin-left: 252px }
}

/* ---------- Tablet ---------- */
@media (min-width: 721px) and (max-width: 1099px) {
  .sidebar { width: 210px; padding-left: 15px; padding-right: 15px }
  .main-shell { margin-left: 210px }
  .topbar { padding: 0 28px }
  .main-shell main { padding: 30px 24px }
  .row { padding-left: 17px; padding-right: 17px; gap: var(--space-10) }
  .section-heading { padding: 22px var(--space-18) }
  .page-heading { flex-wrap: wrap }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .app-shell { display: block }
  .sidebar { position: relative; width: 100%; height: auto; overflow: visible; padding: var(--space-18) var(--space-20) 0; border-right: 0; border-bottom: 1px solid var(--line); display: block }
  .nav-label { display: none }
  .sidebar nav { flex-direction: row; gap: var(--space-6); overflow-x: auto; padding-bottom: 11px; scrollbar-width: none }
  .sidebar nav::-webkit-scrollbar { display: none }
  .nav-item { padding: var(--space-10) var(--space-12); min-height: 43px; white-space: nowrap; gap: 7px; flex-shrink: 0 }
  .nav-item .icon { width: var(--icon-sm); height: var(--icon-sm) }
  .main-shell { margin-left: 0 }
  .topbar { display: none }
  .main-shell main { padding: 27px var(--space-20); min-height: calc(100dvh - 180px) }
  .page-heading { gap: var(--space-20); align-items: flex-start; flex-wrap: wrap; margin-bottom: var(--space-24) }
  .page-heading h1 { font-size: 31px; letter-spacing: -1.1px }
  .page-heading > .btn, .heading-actions { width: 100% }
  .heading-actions .btn { flex: 1 }
  .btn { min-height: var(--control-h-touch) }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: var(--text-16); min-height: var(--control-h-touch) }
  .form-grid { grid-template-columns: 1fr; gap: var(--space-20) }
  .section-heading { padding: 23px var(--space-20) }
  .list-toolbar { padding: 17px; gap: var(--space-12) }
  .tabs { width: 100%; padding-bottom: 3px }
  .search-box { max-width: none; width: 100% }
  .list-footer { padding: 15px var(--space-18); flex-wrap: wrap }
  .row { padding: 21px 19px; gap: 11px; min-height: 92px; flex-wrap: wrap }
  .row-chevron { display: none }
  .stat { min-height: 135px; padding: 17px }
  .stat-value { font-size: 32px }
  a.card, button.card { min-height: 170px; padding: 21px 22px }
  .card-value { font-size: var(--text-36); margin: var(--space-12) 0 4px }
  .info-banner { padding: 19px; align-items: flex-start }
  .icon-btn { width: 37px; height: 37px }
  dialog, .dialog { padding: var(--space-24); width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: var(--radius-16) }
  .modal-header h2 { font-size: 23px }
  .modal-actions .btn { flex: 1; padding: var(--space-12) }
  .empty-state { padding: var(--space-40) 25px }
  .toast { bottom: 15px }
  .app-footer { padding: var(--space-10) var(--space-20) 25px }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important }
  .btn:hover, a.card:hover, button.card:hover, a.card:active, button.card:active, .card:hover .card-action .icon { transform: none }
}

/* =====================================================================
 * Componenti estesi — nati per taska (task e bacheche), stesso stile offix:
 * piatti, bordo 1px --line, raggi della scala, neutri slate, ombra solo su
 * ciò che si solleva (menu, drawer, tooltip, card trascinata).
 * ===================================================================== */

/* ---------- Varianti piccole di base ---------- */
.btn.small { min-height: var(--icon-btn); padding: var(--space-8) var(--space-14); font-size: var(--text-13); gap: var(--space-8) }
.btn.small .icon { width: var(--icon-sm); height: var(--icon-sm) }
.btn.ok { background: var(--status-ok-bg); color: var(--status-ok-fg); border: 1px solid color-mix(in srgb, var(--status-ok-fg) 22%, var(--surface)) }
.btn.ok:hover { background: color-mix(in srgb, var(--status-ok-fg) 16%, var(--surface)) }
.icon-btn.small { width: 32px; height: 32px; border-color: transparent; color: var(--slate-600) }
.icon-btn.small .icon { width: var(--icon-sm); height: var(--icon-sm) }
.icon-btn.small:hover { background: var(--slate-100); color: var(--ink) }
.icon-btn.small.danger:hover { background: var(--status-danger-bg); color: var(--status-danger-fg) }
.avatar.xsmall { width: 24px; height: 24px; font-size: var(--text-12); letter-spacing: 0 }
.info-banner.warn { border-color: color-mix(in srgb, var(--status-pending-fg) 24%, var(--surface)); background: var(--status-pending-bg); color: var(--status-pending-fg) }

/* Contatore numerico (colonna kanban, filtri attivi, gruppi) */
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 var(--space-6); border-radius: var(--radius-pill); background: var(--slate-200); color: var(--slate-800); font-size: var(--text-12); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; line-height: 1 }
.count.brand { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line) }

/* Testo in colore brand: --brand-text (di default --brand-ink, ≥ 4.5:1 anche con brand chiari), mai --brand puro.
   Corregge .text-btn e .card-action della base senza toccarla; .card.featured resta su --on-brand. */
.text-btn, .card-action { color: var(--brand-text) }
.text-btn:hover { color: var(--ink) }
.text-btn.danger, .text-btn.danger:hover { color: var(--status-danger-fg) }
.card.featured .card-action { color: var(--on-brand) }

/* ---------- Menu e popover ---------- */
/* .dropdown = <details> col <summary> come attivatore; il menu si apre sotto. */
.dropdown { position: relative; display: inline-block }
.dropdown > summary { list-style: none; cursor: pointer }
.dropdown > summary::-webkit-details-marker { display: none }
.dropdown > .menu, .dropdown > .popover { position: absolute; top: calc(100% + var(--space-6)); left: 0; z-index: var(--z-dropdown) }
.dropdown.end > .menu, .dropdown.end > .popover { left: auto; right: 0 }
.dropdown.start > .menu, .dropdown.start > .popover { left: 0; right: auto }
.dropdown.up > .menu, .dropdown.up > .popover { top: auto; bottom: calc(100% + var(--space-6)) }
.dropdown[open] > summary .dropdown-caret { transform: rotate(180deg) }
.dropdown-caret { width: var(--icon-sm); height: var(--icon-sm); color: var(--slate-500); transition: transform var(--dur) }

.menu { display: flex; flex-direction: column; min-width: var(--menu-w); max-width: calc(100vw - 32px); max-height: min(420px, 70vh); overflow-y: auto; padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-12); box-shadow: var(--shadow-raised); color: var(--ink) }
/* Floating: menu (o popover) fuori dal flusso, posizionato dal JS con top/left in px rispetto al viewport.
   Con l'attributo popover sta nel top layer: non lo taglia nessun overflow, nemmeno dentro un dialog. */
.menu.floating, .popover.floating { position: fixed; inset: auto; margin: 0; z-index: var(--z-dropdown) }
/* display:flex di .menu/.popover vincerebbe sulla regola del browser che nasconde i popover chiusi: senza questa riga Esc e clic fuori non li tolgono. */
.menu.floating[popover]:not(:popover-open), .popover.floating[popover]:not(:popover-open) { display: none }
.menu-label { padding: var(--space-8) var(--space-10) var(--space-4); font-size: var(--text-12); color: var(--muted) }
.menu-item { display: flex; align-items: center; gap: var(--space-10); width: 100%; min-height: var(--icon-btn); padding: var(--space-8) var(--space-10); border-radius: var(--radius-8); font-size: var(--text-14); text-align: left; color: var(--ink); transition: background var(--dur-fast) }
.menu-item > .icon { width: var(--icon-sm); height: var(--icon-sm); color: var(--slate-500) }
.menu-item > span { flex: 1; min-width: 0 }
.menu-item small { display: block; font-size: var(--text-12); font-weight: var(--weight-regular); color: var(--muted); margin-top: 1px }
.menu-item:hover, .menu-item:focus-visible { background: var(--slate-100) }
.menu-item:focus-visible { outline-offset: -2px }
.menu-item .menu-check { visibility: hidden; color: var(--brand-text) }
.menu-item.selected { font-weight: var(--weight-semibold) }
.menu-item.selected .menu-check { visibility: visible }
.menu-item.danger, .menu-item.danger > .icon { color: var(--status-danger-fg) }
.menu-item.danger:hover { background: var(--status-danger-bg) }
.menu-item:disabled, .menu-item[aria-disabled=true] { opacity: .55; cursor: not-allowed; background: none }
.menu-divider { height: 1px; background: var(--line-soft); margin: var(--space-6) calc(var(--space-6) * -1); border: 0 }
/* Popover: pannello sospeso con campi (es. «Vista e filtri») */
.popover { display: flex; flex-direction: column; gap: var(--space-18); width: min(320px, calc(100vw - 32px)); max-height: 75vh; overflow-y: auto; padding: var(--space-18); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-12); box-shadow: var(--shadow-raised) }
.popover-field > span:first-child { display: block; font-size: var(--text-12); font-weight: var(--weight-semibold); color: var(--ink-2); margin-bottom: var(--space-8) }
.popover-field select, .popover-field input { margin-top: 0 }

/* ---------- Drawer (pannello laterale destro) ---------- */
/* Nativo: <dialog class="drawer"> con showModal(). Non nativo: <aside class="drawer"> + .open. */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(var(--drawer-w), 100%); max-width: 100%; height: 100dvh; max-height: none; display: flex; flex-direction: column; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); overflow: hidden }
.drawer.wide { width: min(var(--drawer-w-wide), 100%) }
dialog.drawer:not([open]) { display: none }
dialog.drawer[open] { animation: otx-drawer-enter var(--dur-slow) var(--ease-out) both }
aside.drawer, div.drawer { z-index: var(--z-drawer); transform: translateX(100%); visibility: hidden; transition: transform var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow) }
aside.drawer.open, div.drawer.open { transform: none; visibility: visible; transition: transform var(--dur-slow) var(--ease-out) }
@keyframes otx-drawer-enter { from { transform: translateX(32px); opacity: 0 } to { transform: none; opacity: 1 } }
.drawer-header, .dialog-header { flex: none; display: flex; align-items: flex-start; gap: var(--space-14); padding: var(--space-24) 28px var(--space-20); border-bottom: 1px solid var(--line) }
.drawer-header h2, .dialog-header h2 { flex: 1; min-width: 0; font-size: var(--text-25); letter-spacing: var(--tracking-title); line-height: var(--leading-tight) }
.drawer-header .eyebrow, .dialog-header .eyebrow { margin-bottom: var(--space-8) }
.drawer-actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: var(--space-10); margin-top: var(--space-16) }
.drawer-body, .dialog-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-24) 28px; display: flex; flex-direction: column; gap: var(--space-24) }
.drawer-footer, .dialog-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); padding: var(--space-16) 28px; border-top: 1px solid var(--line); background: var(--surface-alt) }
.drawer-grid, .dialog-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-24); align-items: start }

/* ---------- Dialog grande (pannello task e sotto-attività di taska) ---------- */
/* <dialog class="dialog large">: centrato, intestazione e piede fermi, corpo che scorre.
   Riusa .drawer-section, .props e le parti .dialog-header/-body/-footer/-grid. */
.dialog.large { width: min(var(--dialog-w-large), calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; display: flex; flex-direction: column; overflow: hidden }
dialog.dialog.large:not([open]) { display: none }

/* Contesto: da quale task viene la sotto-attività (riquadro sopra il titolo) */
.context-box { display: block; padding: var(--space-10) var(--space-14); border-radius: var(--radius-10); background: var(--slate-100); border: 1px solid var(--line) }
.context-box > small { display: block; font-size: var(--text-12); color: var(--muted) }
.context-box > a, .context-box > button { display: block; width: 100%; text-align: left; font-size: var(--text-15); font-weight: var(--weight-semibold); line-height: var(--leading-snug); color: var(--ink); overflow-wrap: anywhere }
.context-box > a:hover, .context-box > button:hover { color: var(--brand-text); text-decoration: underline }
.context-trail { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4); font-size: var(--text-12); color: var(--muted) }
.context-trail .icon { width: 12px; height: 12px }

/* Codice da consegnare (credenziali, invito): monospazio, selezione intera al click, bottone copia */
.code-field { display: flex; align-items: stretch; gap: var(--space-8) }
.code-box { flex: 1; min-width: 0; margin: 0; padding: var(--space-10) 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-8); background: var(--slate-50); font-family: var(--font-mono); font-size: var(--text-15); color: var(--ink); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; word-break: break-all }
.code-field .icon-btn { height: auto; min-height: var(--icon-btn) }
/* Sezione del pannello (Descrizione, Dettagli, Commenti…), uguale nel drawer e nel .dialog.large */
.drawer-section { display: flex; flex-direction: column; gap: var(--space-12) }
.drawer-section + .drawer-section { border-top: 1px solid var(--line-soft); padding-top: var(--space-24) }
.drawer-section > h3 { display: flex; align-items: center; gap: var(--space-8); font-size: var(--text-15) }
.drawer-section > h3 .icon { width: var(--icon-sm); height: var(--icon-sm); color: var(--slate-500) }
.drawer-section > h3 .count, .drawer-section > h3 .text-btn { margin-left: auto }
.drawer-section > h3 .text-btn { font-size: var(--text-13); padding: 0 }
/* Coppie etichetta/valore (Priorità, Scadenza, Assegnato a) */
.props { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-10) var(--space-14); align-items: center; font-size: var(--text-14) }
.props dt { color: var(--muted); font-size: var(--text-13) }
.props dd { margin: 0; min-width: 0 }

/* ---------- Tabella ---------- */
.table-wrap { overflow: auto; max-width: 100% }
/* L'intestazione sticky funziona solo se è .table-wrap a scorrere in verticale: serve .scroll (altezza massima). */
.table-wrap.scroll { max-height: min(70vh, 640px) }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-14); background: var(--surface) }
.table th { position: sticky; top: 0; z-index: 1; background: var(--surface-alt); border-bottom: 1px solid var(--line); padding: var(--space-12) var(--space-16); text-align: left; font-size: var(--text-12); font-weight: var(--weight-semibold); color: var(--muted); white-space: nowrap }
.table td { padding: var(--space-14) var(--space-16); border-top: 1px solid var(--line-soft); vertical-align: middle }
.table tbody tr:first-child td { border-top: 0 }
.table tbody tr { transition: background var(--dur-fast) }
.table tbody tr:hover { background: var(--slate-50) }
.table tbody tr.selected, .table tbody tr.selected:hover { background: var(--brand-wash) }
.table .num { text-align: right; font-variant-numeric: tabular-nums }
.table .cell-main { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--weight-medium) }
.table .cell-sub { display: block; font-size: var(--text-12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px }
.table .empty-cell { color: var(--muted) }
.table tr.done .cell-main { text-decoration: line-through; color: var(--muted) }
/* Intestazione ordinabile: <th aria-sort="ascending"><button class="sort-btn">Scadenza${icon('arrows-up-down')}</button></th> */
.sort-btn { display: inline-flex; align-items: center; gap: var(--space-6); font: inherit; color: inherit; border-radius: var(--radius-5) }
.sort-btn .icon { width: 14px; height: 14px; color: var(--slate-400) }
.sort-btn:hover { color: var(--ink) }
th[aria-sort=ascending] .sort-btn, th[aria-sort=descending] .sort-btn { color: var(--ink) }
th[aria-sort=ascending] .sort-btn .icon, th[aria-sort=descending] .sort-btn .icon { color: var(--brand-text) }
th[aria-sort=descending] .sort-btn .icon { transform: scaleY(-1) }

/* ---------- Kanban ---------- */
.kanban { display: flex; align-items: flex-start; gap: var(--space-16); overflow-x: auto; padding-bottom: var(--space-16); scroll-padding-inline: var(--space-16) }
.kanban-column { flex: 0 0 var(--kanban-col-w); display: flex; flex-direction: column; min-width: 0; max-height: 100%; background: var(--slate-100); border: 1px solid var(--line); border-radius: var(--radius-16); transition: border-color var(--dur-fast), background var(--dur-fast) }
.kanban-column.drop-target { border-color: var(--brand-line); background: var(--brand-wash) }
.kanban-column-header { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-12) var(--space-12) var(--space-8) var(--space-16); min-height: 52px }
.kanban-column-header h2 { flex: 1; min-width: 0; font-size: var(--text-15); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kanban-list { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-4) var(--space-8) var(--space-8); min-height: 56px; overflow-y: auto }
.kanban-card { position: relative; display: flex; flex-direction: column; gap: var(--space-10); padding: var(--space-14) var(--space-16); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-12); color: var(--ink); text-align: left; cursor: pointer; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; transition: border-color var(--dur-fast), box-shadow var(--dur-fast) }
.kanban-card:hover { border-color: var(--line-strong) }
.kanban-card.has-priority { border-left: 3px solid var(--priority, var(--priority-medium)) }
.kanban-card.dragging { box-shadow: var(--shadow-raised); border-color: var(--line-strong); cursor: grabbing; z-index: var(--z-dropdown) }
.kanban-card.placeholder { background: none; border: 1px dashed var(--line-strong); box-shadow: none }
.kanban-card.done { background: var(--surface-alt) }
.kanban-card.done .kanban-card-title { text-decoration: line-through; color: var(--muted) }
.kanban-card-title { display: flex; align-items: flex-start; gap: var(--space-8); font-size: var(--text-14); font-weight: var(--weight-medium); line-height: var(--leading-snug); overflow-wrap: anywhere }
.kanban-card-title > .icon, .kanban-card-title > .priority-dot { margin-top: 2px }
.kanban-card-title > .icon { width: var(--icon-sm); height: var(--icon-sm); color: var(--slate-500) }
.kanban-card-title > .icon.ok { color: var(--status-ok-fg) }
.kanban-card-title > .icon.blocked { color: var(--priority-high) }
.kanban-card-tags { display: flex; flex-wrap: wrap; gap: var(--space-4) }
.kanban-card-meta { display: flex; align-items: center; gap: var(--space-12); font-size: var(--text-12); color: var(--muted); font-variant-numeric: tabular-nums }
.kanban-card-meta > span { display: inline-flex; align-items: center; gap: 3px }
.kanban-card-meta .icon { width: 14px; height: 14px }
.kanban-card-meta .avatar-stack { margin-left: auto }
.kanban-add { display: flex; align-items: center; justify-content: center; gap: var(--space-6); width: calc(100% - var(--space-16)); margin: 0 var(--space-8) var(--space-8); min-height: var(--icon-btn); border: 1px dashed var(--line-strong); border-radius: var(--radius-9); color: var(--muted); font-size: var(--text-13); font-weight: var(--weight-medium) }
.kanban-add:hover { border-color: var(--brand); color: var(--brand-text); background: var(--surface) }
.kanban-add .icon { width: var(--icon-sm); height: var(--icon-sm) }

/* ---------- Priorità e scadenza ---------- */
.priority-dot { width: 8px; height: 8px; border-radius: var(--radius-round); flex-shrink: 0; background: var(--priority, var(--priority-medium)) }
.priority-dot.urgent { background: var(--priority-urgent) }
.priority-dot.high { background: var(--priority-high) }
.priority-dot.medium { background: var(--priority-medium) }
.priority-dot.low { background: var(--priority-low) }
.due { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap }
.due.soon { color: var(--status-pending-fg); font-weight: var(--weight-semibold) }
.due.overdue { color: var(--status-danger-fg); font-weight: var(--weight-semibold) }

/* ---------- Tag (colore scelto dall'utente) ---------- */
/* style="--tag-color:#…": sfondo al 16%, testo ricavato dal colore e scurito
   in oklch fino a L 0.5, così resta ≥ 4.5:1 con QUALSIASI colore (anche bianco e giallo). */
.tag { --tag-c: var(--tag-color, var(--slate-600)); display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 1px var(--space-8); border-radius: var(--radius-5); border: 1px solid color-mix(in srgb, var(--tag-c) 26%, var(--line)); background: color-mix(in srgb, var(--tag-c) 16%, var(--surface)); color: color-mix(in srgb, var(--tag-c) 35%, var(--ink)); color: oklch(from color-mix(in srgb, var(--tag-c) 70%, var(--ink)) min(l, .5) c h); font-size: var(--text-12); font-weight: var(--weight-medium); line-height: var(--leading-relaxed); white-space: nowrap }
.tag-label { min-width: 0; overflow: hidden; text-overflow: ellipsis }
/* Area di tocco 24px: i margini negativi la tengono dentro l'altezza del tag. */
.tag-remove { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; margin: -4px -8px -4px -6px; border-radius: var(--radius-5); color: inherit; opacity: .7 }
.tag-remove:hover { opacity: 1 }
.tag-remove .icon { width: 12px; height: 12px }
.tag-dot { width: 10px; height: 10px; border-radius: var(--radius-round); flex-shrink: 0; background: var(--tag-color, var(--slate-500)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent) }

/* ---------- Checkbox e toggle ---------- */
.checkbox, .toggle { appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0; cursor: pointer; display: inline-grid; place-content: center; vertical-align: middle }
.checkbox { width: var(--checkbox); height: var(--checkbox); border: 1px solid var(--slate-500); border-radius: var(--radius-5); background: var(--surface); transition: background var(--dur-fast), border-color var(--dur-fast) }
.checkbox::before { content: ""; width: 10px; height: 10px; background: var(--on-brand); clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 85% 8%, 39% 70%); transform: scale(0); transition: transform var(--dur-fast) }
.checkbox:hover { border-color: var(--slate-700) }
.checkbox:checked, .checkbox:indeterminate { background: var(--brand); border-color: var(--brand) }
.checkbox:checked::before { transform: scale(1) }
.checkbox:indeterminate::before { clip-path: inset(40% 10%); transform: scale(1) }
.checkbox.round { border-radius: var(--radius-round) }
.checkbox.round:checked { background: var(--status-ok-fg); border-color: var(--status-ok-fg) }
.checkbox.round::before { background: var(--on-solid) }
.checkbox:disabled, .toggle:disabled { opacity: .5; cursor: not-allowed }
.checkbox:focus-visible, .toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px }
.toggle { width: 38px; height: 22px; padding: 0 2px; place-content: center start; border: 1px solid var(--slate-500); border-radius: var(--radius-pill); background: var(--slate-200); transition: background var(--dur), border-color var(--dur) }
.toggle::before { content: ""; width: 16px; height: 16px; border-radius: var(--radius-round); background: var(--slate-600); transition: transform var(--dur) var(--ease-out), background var(--dur) }
.toggle:checked { background: var(--brand); border-color: var(--brand) }
.toggle:checked::before { transform: translateX(16px); background: var(--on-brand) }
/* Riga etichettata: <label class="check"><input class="checkbox"><span>Testo<small>…</small></span></label> */
.check { display: flex; align-items: center; gap: var(--space-10); min-height: var(--control-h-sm); font-size: var(--text-14); font-weight: var(--weight-regular); color: var(--ink); cursor: pointer }
.check input { margin: 0 }
.check > span { flex: 1; min-width: 0 }
.check small { display: block; font-size: var(--text-12); color: var(--muted); margin-top: 1px }
.check.toggle-row { justify-content: space-between; gap: var(--space-16) }
.check-list { display: flex; flex-direction: column; padding: var(--space-4) var(--space-12); border: 1px solid var(--line-strong); border-radius: var(--radius-8); max-height: 220px; overflow-y: auto }

/* ---------- Segmented (scelta di un valore: Bacheca / Lista) ---------- */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--slate-100); border: 1px solid var(--line); border-radius: var(--radius-9) }
.segment { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-6); min-height: var(--control-h-sm); padding: var(--space-6) var(--space-12); border-radius: var(--radius-7); font-size: var(--text-13); font-weight: var(--weight-medium); color: var(--muted); white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast) }
.segment .icon { width: var(--icon-sm); height: var(--icon-sm) }
.segment:hover { color: var(--ink) }
.segment.selected, .segment[aria-pressed=true] { background: var(--surface); color: var(--ink); font-weight: var(--weight-semibold); box-shadow: 0 0 0 1px var(--line) }
.segmented.full { display: flex }
.segmented.full .segment { flex: 1 }

/* Chip di filtro attivabile (Non lette, In evidenza, filtri applicati) */
.filter-chip { display: inline-flex; align-items: center; gap: var(--space-6); min-height: var(--control-h-sm); padding: var(--space-6) var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); font-size: var(--text-13); color: var(--ink-2); white-space: nowrap; transition: background var(--dur-fast), border-color var(--dur-fast) }
.filter-chip:hover { background: var(--slate-100) }
.filter-chip.selected, .filter-chip[aria-pressed=true] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-text); font-weight: var(--weight-semibold) }
.filter-chip .icon { width: 14px; height: 14px }

/* ---------- Testo formattato ed editor ---------- */
.md { font-size: var(--text-14); line-height: var(--leading); color: var(--ink); overflow-wrap: anywhere }
.md > :first-child { margin-top: 0 }
.md > :last-child { margin-bottom: 0 }
.md p { margin: 0 0 .6em }
.md h3 { font-size: 1.15em; font-weight: var(--weight-semibold); margin: 1em 0 .35em }
.md h4 { font-size: 1.05em; font-weight: var(--weight-semibold); margin: .9em 0 .3em }
.md h5 { font-size: 1em; font-weight: var(--weight-semibold); margin: .8em 0 .25em; color: var(--muted) }
.md ul, .md ol { margin: 0 0 .6em; padding-left: 1.4em }
.md ul { list-style: disc }
.md ol { list-style: decimal }
.md li { margin: .15em 0 }
.md strong { font-weight: var(--weight-bold) }
.md em { font-style: italic }
.md a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px }
.md a:hover { color: var(--ink) }
/* <div class="md-field"><div class="md-toolbar">…</div><div class="md md-editor" contenteditable data-placeholder="…"></div></div> */
.md-field { border: 1px solid var(--line-strong); border-radius: var(--radius-8); background: var(--surface); transition: border-color var(--dur), box-shadow var(--dur) }
.md-field:focus-within { border-color: var(--focus); box-shadow: var(--shadow-focus) }
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: var(--space-4); border-bottom: 1px solid var(--line); background: var(--surface-alt); border-radius: var(--radius-8) var(--radius-8) 0 0 }
.md-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 var(--space-8); border-radius: var(--radius-7); font-size: var(--text-13); color: var(--slate-700) }
.md-btn:hover { background: var(--slate-100); color: var(--ink) }
.md-btn.selected, .md-btn[aria-pressed=true] { background: var(--slate-200); color: var(--slate-800) }
.md-toolbar .divider { width: 1px; height: 18px; margin: 0 var(--space-4) }
.md-editor { min-height: 120px; max-height: 24rem; overflow-y: auto; padding: var(--space-12) 13px; outline: none }
.md-editor.compact { min-height: 72px }
.md-editor:empty::before, .md-editor:has(> br:only-child)::before { content: attr(data-placeholder); color: var(--slate-500); pointer-events: none }
.md-editor p:empty::after { content: "\200b" }

/* ---------- Commenti ---------- */
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-16) }
.comment { display: flex; gap: var(--space-12) }
.comment-body { flex: 1; min-width: 0 }
.comment-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-6); font-size: var(--text-12); color: var(--muted); margin-bottom: var(--space-4) }
.comment-meta strong { font-size: var(--text-13); color: var(--ink) }
.comment-meta .text-btn { font-size: var(--text-12); padding: 0; margin-left: auto; color: var(--muted); font-weight: var(--weight-regular) }
.comment-meta .text-btn:hover { color: var(--status-danger-fg) }

/* ---------- Righe compatte (allegati, ore, dipendenze, sotto-attività) ---------- */
.line-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column }
.line-item { display: flex; align-items: center; gap: var(--space-10); min-height: var(--icon-btn); padding: var(--space-6) var(--space-8); border-radius: var(--radius-8); font-size: var(--text-14); transition: background var(--dur-fast) }
.line-item:hover { background: var(--slate-50) }
.line-item > .icon { width: var(--icon-sm); height: var(--icon-sm); color: var(--slate-500) }
.line-item-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
a.line-item-main, .line-item-main a { color: var(--brand-text) }
.line-item-meta { flex-shrink: 0; font-size: var(--text-12); color: var(--muted); font-variant-numeric: tabular-nums }
.line-item.done .line-item-main { text-decoration: line-through; color: var(--muted) }
.line-item .dropdown > summary { display: flex; align-items: center; gap: var(--space-10); min-width: 0 }
.drag-handle { display: inline-flex; color: var(--slate-400); cursor: grab; border-radius: var(--radius-5) }
.drag-handle:hover { color: var(--slate-600) }
.drag-handle .icon { width: var(--icon-sm); height: var(--icon-sm) }
.line-item.drop-before { box-shadow: inset 0 2px 0 var(--brand) }
.line-item.drop-after { box-shadow: inset 0 -2px 0 var(--brand) }
/* Titolo di gruppo con contatore (Mie / Assegnate ad altri / Generali) */
.group-title { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-12) var(--space-8) var(--space-4); font-size: var(--text-13); font-weight: var(--weight-semibold); color: var(--slate-600) }

/* ---------- Upload ---------- */
.upload { position: relative }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-24) var(--space-20); border: 1px dashed var(--slate-400); border-radius: var(--radius-12); background: var(--surface); text-align: center; cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast) }
.dropzone > .icon { width: var(--icon); height: var(--icon); color: var(--slate-500); margin-bottom: var(--space-4) }
.dropzone strong { font-size: var(--text-14); color: var(--ink-2) }
.dropzone small { font-size: var(--text-12); color: var(--muted) }
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-wash) }
.dropzone.dragover { border-style: solid }
input[type=file].sr-only:focus-visible + .dropzone { outline: 2px solid var(--focus-ring); outline-offset: 4px }

/* ---------- Avanzamento, timer, caricamento ---------- */
.progress { height: 6px; border-radius: var(--radius-pill); background: var(--slate-200); overflow: hidden }
.progress > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width var(--dur-slow) var(--ease-out) }
.progress.ok > span { background: var(--status-ok-fg) }
/* Barra in riga (dashboard: task completati per persona) */
.row .progress { width: 128px; flex-shrink: 0 }
.progress-label { display: flex; justify-content: space-between; gap: var(--space-8); margin-top: var(--space-6); font-size: var(--text-12); color: var(--muted); font-variant-numeric: tabular-nums }

.timer { display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--text-15); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; color: var(--ink) }
.timer::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-round); background: var(--slate-400) }
.timer.running::before { background: var(--priority-urgent); animation: otx-pulse 1.6s ease-in-out infinite }
@keyframes otx-pulse { 50% { opacity: .3 } }

.spinner { display: inline-block; width: var(--icon-sm); height: var(--icon-sm); flex-shrink: 0; border: 2px solid color-mix(in srgb, currentColor 28%, transparent); border-top-color: currentColor; border-radius: var(--radius-round); animation: otx-spin .7s linear infinite }
.spinner.large { width: 28px; height: 28px; border-width: 3px }
@keyframes otx-spin { to { transform: rotate(360deg) } }
.btn.busy { pointer-events: none }
.skeleton { display: block; height: 12px; border-radius: var(--radius-5); background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-50) 50%, var(--slate-100) 75%) 0 0 / 200% 100%; animation: otx-shimmer 1.4s linear infinite }
.skeleton.title { height: 20px; width: 55% }
.skeleton.block { height: 88px; border-radius: var(--radius-12) }
@keyframes otx-shimmer { to { background-position: -200% 0 } }

/* ---------- Paginazione ---------- */
.pagination { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--control-h-sm); height: var(--control-h-sm); padding: 0 var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-8); background: var(--surface); font-size: var(--text-13); color: var(--ink-2); font-variant-numeric: tabular-nums }
.page-btn:hover { background: var(--slate-100) }
.page-btn.active, .page-btn[aria-current=page] { background: var(--slate-200); border-color: var(--slate-300); color: var(--slate-800); font-weight: var(--weight-semibold) }
.page-btn .icon { width: var(--icon-sm); height: var(--icon-sm) }
.page-btn:disabled { background: var(--surface) }
.pagination-info { margin-left: var(--space-8); font-size: var(--text-12); color: var(--muted); font-variant-numeric: tabular-nums }

/* ---------- Tooltip ---------- */
/* <span class="has-tooltip"><button class="icon-btn" aria-describedby="t1">…</button><span class="tooltip" role="tooltip" id="t1">Elimina colonna</span></span> */
.has-tooltip { position: relative; display: inline-flex }
.tooltip { --tip-x: -50%; position: absolute; bottom: calc(100% + var(--space-6)); left: 50%; z-index: var(--z-tooltip); width: max-content; max-width: 240px; padding: 5px var(--space-8); border-radius: var(--radius-7); background: var(--slate-900); color: var(--on-solid); font-size: var(--text-12); font-weight: var(--weight-medium); line-height: var(--leading-snug); text-align: center; pointer-events: none; opacity: 0; transform: translate(var(--tip-x), 2px); transition: opacity var(--dur-fast), transform var(--dur-fast); box-shadow: var(--shadow-raised) }
.tooltip.bottom { bottom: auto; top: calc(100% + var(--space-6)) }
.tooltip.start { --tip-x: 0; left: 0 }
.tooltip.end { --tip-x: 0; left: auto; right: 0 }
.has-tooltip:hover > .tooltip, .has-tooltip:focus-within > .tooltip, .tooltip.visible { opacity: 1; transform: translate(var(--tip-x), 0) }
/* Floating: fuori da ogni contenitore che taglia (overflow, scroll). position:fixed, top/left dal JS. */
.tooltip.floating { --tip-x: 0; position: fixed; inset: auto; margin: 0; border: 0 }
.tooltip.floating:popover-open { opacity: 1; transform: none }

/* ---------- Pila di avatar ---------- */
.avatar-stack { display: inline-flex; align-items: center; flex-direction: row }
.avatar-stack > .avatar { box-shadow: 0 0 0 2px var(--surface) }
.avatar-stack > .avatar + .avatar { margin-left: -6px }
.avatar-more { background: var(--slate-200); color: var(--slate-800) }

/* ---------- Intestazione cliente/bacheca con copertina e logo ---------- */
.hero { position: relative; margin-bottom: var(--space-24) }
.hero-cover { position: relative; height: 220px; border-radius: var(--radius-16); border: 1px solid var(--line); background: var(--slate-200) center / cover no-repeat }
.hero-cover .btn { position: absolute; top: var(--space-12); right: var(--space-12) }
.hero-logo { position: absolute; left: var(--space-24); top: calc(220px - 40px); width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-16); font-size: var(--text-25); font-weight: var(--weight-semibold); color: var(--brand-text) }
.hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-8) }
.hero-body { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-16) var(--space-24); flex-wrap: wrap; padding: var(--space-14) 0 0 128px }
.hero-body h1 { display: flex; align-items: center; gap: var(--space-10); font-size: var(--text-33); letter-spacing: var(--tracking-display); min-width: 0 }
.hero-body h1 > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hero-body h1 .icon { width: 28px; height: 28px }
.hero-body p { margin-top: var(--space-6); font-size: var(--text-14); color: var(--muted); max-width: 70ch }
.hero-body .eyebrow { margin-bottom: var(--space-6) }
.hero.bare .hero-body { padding: 0 }

/* ---------- Scelta di icona e colore ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: var(--space-8); max-height: 26rem; overflow-y: auto; padding: 2px }
.icon-option { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-8); background: var(--surface); color: var(--slate-700); transition: border-color var(--dur-fast), background var(--dur-fast) }
.icon-option .icon, .icon-option img { width: 28px; height: 28px }
.icon-option:hover { border-color: var(--line-strong); background: var(--slate-50) }
.icon-option.selected, .icon-option[aria-pressed=true] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text) }
/* Campioni colore (offix .color-presets): <label class="swatch"><input type="radio" name="c"><span style="--swatch:#…"></span></label> */
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-10); align-items: center }
.swatch { position: relative; width: 32px; height: 32px; margin: 0; cursor: pointer }
.swatch input { position: absolute; opacity: 0; margin: 0 }
.swatch span { display: block; width: 32px; height: 32px; border-radius: var(--radius-round); background: var(--swatch); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong) }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--swatch), 0 0 0 3px var(--ink) }
.swatch input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 3px }

/* ---------- Albero della sidebar (cliente → bacheche) ---------- */
.nav-section { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding-left: 13px; margin: var(--space-24) 0 var(--space-8) }
.nav-section .nav-label { padding: 0; margin: 0 }
.nav-group { display: flex; align-items: center; border-radius: var(--radius-8) }
.nav-group > .nav-item { flex: 1; min-width: 0 }
.nav-group > .nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-7); color: var(--slate-500) }
.nav-toggle:hover { background: var(--slate-100); color: var(--ink) }
.nav-toggle .icon { width: var(--icon-sm); height: var(--icon-sm); transition: transform var(--dur) }
.nav-group.open .nav-toggle .icon { transform: rotate(180deg) }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 var(--space-6) 22px; padding-left: var(--space-8); border-left: 1px solid var(--line) }
.nav-sub .nav-item { min-height: var(--control-h-sm); padding: var(--space-6) var(--space-10); font-size: var(--text-13); gap: var(--space-8) }
.nav-logo { width: 18px; height: 18px; flex-shrink: 0; border-radius: var(--radius-5); border: 1px solid var(--line); background: var(--surface); object-fit: contain }

/* ---------- Notifiche ---------- */
.row.unread { background: var(--slate-50) }
.row.unread:hover { background: var(--slate-100) }
.row-main.wrap strong { white-space: normal; overflow: visible; overflow-wrap: anywhere; font-weight: var(--weight-medium); line-height: var(--leading-snug) }
.row.unread .row-main.wrap strong { font-weight: var(--weight-semibold) }
.row.unread .row-main strong::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: var(--space-8); vertical-align: middle; border-radius: var(--radius-round); background: var(--brand) }
.row-actions { display: flex; gap: 2px; flex-shrink: 0 }
.row-actions .icon-btn.small.active { color: var(--priority-high) }

/* ---------- Sidebar a scomparsa e topbar mobile ---------- */
/* Sopra i 720px .sidebar.offcanvas è la sidebar normale. Sotto entra da sinistra con .open,
   animando `left` e non `transform`: un antenato trasformato diventerebbe il blocco
   contenitore dei figli position:fixed (in taska il pannello notifiche è figlio della sidebar). */
.sidebar-backdrop { display: none }
.mobile-topbar { display: none }
.bell-badge { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--danger-solid); color: var(--on-danger); font-size: var(--text-12); font-weight: var(--weight-semibold); line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--surface) }
.bell-badge:empty { display: none }

/* =====================================================================
   Componenti estesi da taska (2026-10-27)
   Nati in taska.css e generici: lista + dettaglio, griglia statistiche, riga
   densa, card con copertina e card compatte, passi, pagine di accesso e di
   errore, pila di toast, pastiglia colore, titolo rinominabile.
   ===================================================================== */

/* ---------- Avvisi: toni di stato e avviso compatto in testata ---------- */
.info-banner.danger { border-color: color-mix(in srgb, var(--status-danger-fg) 24%, var(--surface)); background: var(--status-danger-bg); color: var(--status-danger-fg) }
.info-banner.ok { border-color: color-mix(in srgb, var(--status-ok-fg) 24%, var(--surface)); background: var(--status-ok-bg); color: var(--status-ok-fg) }
/* Avvisi sotto il titolo di un dialog o drawer (nessun assegnatario, archiviato, bloccato) */
:is(.dialog-header, .drawer-header) .info-banner { margin: var(--space-12) 0 0; padding: var(--space-10) var(--space-14); gap: var(--space-10); font-size: var(--text-14) }
:is(.dialog-header, .drawer-header) .info-banner > .icon { flex-shrink: 0 }

/* ---------- Titolo rinominabile al click (dialog e drawer) ---------- */
/* <h2 class="panel-title editable">…</h2> → al click diventa <input class="panel-title-input"> */
:is(.dialog-header, .drawer-header) .panel-title { overflow-wrap: anywhere }
:is(.dialog-header, .drawer-header) .panel-title.editable { margin: -2px 0 -2px -6px; padding: 2px 6px; border-radius: var(--radius-8); cursor: text; transition: background var(--dur-fast) }
:is(.dialog-header, .drawer-header) .panel-title.editable:hover { background: var(--slate-100) }
:is(.dialog-header, .drawer-header) input.panel-title-input,
:is(.dialog-header, .drawer-header) input.panel-title-input:focus { display: block; width: calc(100% + 6px); min-height: 0; margin: -4px 0 -4px -6px; padding: 0 4px; font-size: var(--text-25); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-title); border: 2px solid var(--ink); border-radius: var(--radius-8); box-shadow: none }

/* ---------- Lista + dettaglio (offix .rq-split, taska pagina Team) ---------- */
/* Schede di stato e ricerca in alto, elenco a sinistra, dettaglio della voce scelta a destra.
   Sotto i 900px una colonna sola: con .has-selection il dettaglio prende il posto dell'elenco
   e .split-back riporta indietro. */
.split { display: flex; flex-direction: column; min-width: 0 }
.split-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px var(--space-20); flex-wrap: wrap; padding: var(--space-16) var(--space-20); border-bottom: 1px solid var(--line) }
.split-tabs { display: flex; gap: var(--space-4); overflow-x: auto; min-width: 0; max-width: 100%; padding: 2px }
.split-tab.tab { display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--text-14); padding: var(--space-8) 13px }
.split-tab.tab span { font-size: var(--text-12); font-weight: var(--weight-semibold); min-width: 22px; padding: 1px 7px; border-radius: var(--radius-round); background: var(--slate-100); color: var(--muted); text-align: center }
.split-tab.tab.selected span { background: var(--surface); color: var(--slate-800) }
.split-tab.tab.has-pending span { background: var(--status-pending-bg); color: var(--status-pending-fg) }
.split-search.search-box { width: 250px; max-width: 100% }
.split-search input { width: 100% }
.split-body { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); min-height: 520px }
.split-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0 }
.split-results { flex: 1 }
.split-results > .empty-state { padding: 60px 25px }
.split-item { width: 100%; display: flex; align-items: center; gap: 13px; text-align: left; padding: 13px var(--space-20); border-bottom: 1px solid var(--line-soft); transition: background var(--dur-fast) }
.split-item:hover { background: var(--slate-50) }
.split-item.selected { background: var(--brand-wash) }
.split-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px }
.split-item-lead { flex-shrink: 0; display: inline-flex }
.split-item-lead .avatar { width: 38px; height: 38px; font-size: var(--text-12) }
.split-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px }
.split-item-main strong { font-size: var(--text-15); font-weight: var(--weight-semibold); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.split-item-main small { font-size: var(--text-13); color: var(--muted); overflow-wrap: anywhere }
.split-item-note { font-weight: var(--weight-regular); color: var(--muted) }
.split-item-badges { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-4) }
.split-item .badge, .split-facts .badge { font-size: var(--text-12); padding: 2px var(--space-8) }
.split-item .badge .icon, .split-facts .badge .icon { width: 12px; height: 12px }
.split-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-12); font-size: var(--text-13); color: var(--muted); padding: var(--space-12) var(--space-20); border-top: 1px solid var(--line) }
.split-pane { padding: 28px 32px; min-width: 0 }
.split-pane > * { max-width: 620px }
.split-back { display: none }
.split-pane-head { display: flex; align-items: center; gap: var(--space-16) }
.split-pane-head h2 { font-size: var(--text-25); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-title); color: var(--ink); overflow-wrap: anywhere }
.split-pane-head p { font-size: var(--text-14); color: var(--muted); margin-top: var(--space-4); overflow-wrap: anywhere }
.split-pane-empty { height: 100%; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-12); color: var(--muted); text-align: center; font-size: var(--text-14) }
.split-pane-empty .icon { width: 28px; height: 28px; color: var(--slate-500) }
/* Coppie etichetta/valore del dettaglio: <dl class="split-facts"><div><dt>Email</dt><dd>…</dd></div></dl> */
.split-facts { margin: var(--space-24) 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-10) var(--space-24); font-size: var(--text-14) }
.split-facts > div { display: contents }
.split-facts dt { color: var(--muted) }
.split-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) }
/* Riquadro della decisione (approva/rifiuta) e campo singolo sotto i dati */
.split-review { margin-top: var(--space-24); padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-13); display: flex; flex-direction: column; gap: 14px }
.split-review h3 { font-size: var(--text-16); font-weight: var(--weight-semibold); color: var(--ink) }
.split-field { margin-top: var(--space-24); max-width: 320px }
.split-actions { display: flex; flex-wrap: wrap; gap: var(--space-10); margin-top: var(--space-24) }
.split-review .split-actions { margin-top: 0 }
.split-review .split-actions .btn { min-width: 130px }

/* ---------- Griglia di statistiche ---------- */
/* Una riga di .stat che va a capo da sola; .two = due colonne; .four = quattro da 1024px, due sotto. */
.stat-grid { display: grid; gap: var(--space-16); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) }
.stat-grid.two, .stat-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.stat-value.alert { color: var(--status-danger-fg) }

/* ---------- Riga densa e varianti della riga ---------- */
/* Per elenchi lunghi (scadenze, diario, incontri): la riga da 90px ne mostrerebbe poche.
   Resta su una riga anche su mobile. <ul class="row-list"><li class="row dense">…</li></ul> */
.row-list { list-style: none; margin: 0; padding: 0 }
.row.dense { min-height: 0; padding: var(--space-14) var(--space-24); gap: var(--space-12); flex-wrap: nowrap }
.row.dense .row-main strong { font-size: var(--text-14) }
.row.is-link { cursor: pointer }
.row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px }
.row-symbol.round { width: 32px; height: 32px; border-radius: var(--radius-round) }
.row-symbol.round .icon { width: var(--icon-sm); height: var(--icon-sm) }
.row-symbol.ok { background: var(--status-ok-bg); color: var(--status-ok-fg) }
.row-symbol.info { background: var(--status-info-bg); color: var(--status-info-fg) }
/* Iconcina davanti al titolo (es. «è una sotto-attività») */
.row-mark { display: inline-flex; vertical-align: -3px; margin-right: var(--space-4); color: var(--muted) }
/* Numero allineato a destra (conteggi, ore); .wide per «12 h 30» */
.row-value { flex-shrink: 0; min-width: 32px; text-align: right; font-size: var(--text-15); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums }
.row-value.wide { min-width: 72px }
/* Titolo di gruppo fra le righe (giorni del diario, bacheche) */
.row-group-title { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-12) var(--space-24) var(--space-6); border-top: 1px solid var(--line-soft); font-size: var(--text-13); font-weight: var(--weight-semibold); color: var(--slate-600) }

/* ---------- Intestazione di sezione fuori dal riquadro ---------- */
/* Stessa .section-heading, senza padding: titolo + azioni sopra una griglia di card. */
.section-heading.bare { padding: 0; margin-bottom: var(--space-16); flex-wrap: wrap; gap: var(--space-12) var(--space-16) }

/* ---------- Card con copertina e logo (taska: card cliente) ---------- */
.card.cover-card { padding: 0; min-height: 0 }
.cover-card-cover { height: 80px; background: var(--slate-100) center / cover no-repeat; border-bottom: 1px solid var(--line-soft) }
.cover-card-body { display: flex; flex-direction: column; gap: var(--space-4); padding: 0 var(--space-20) var(--space-20); min-width: 0 }
.cover-card-logo { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -22px 0 var(--space-8); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-10); background: var(--surface); color: var(--brand-text) }
.cover-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-4) }
.cover-card-logo .icon { width: 18px; height: 18px }
.cover-card h3 { font-size: var(--text-16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }

/* ---------- Card compatta con testata (taska: bacheca, nota) ---------- */
/* <a class="card compact"><div class="card-head"><img class="card-logo">|<span class="card-symbol">…</span><h3>…</h3></div>
   <p class="card-desc">…</p><div class="progress">…</div></a> — .card-head.wrap: titolo a capo e azioni a destra. */
.card.compact { min-height: 0; padding: var(--space-20); gap: var(--space-8) }
.card.compact .progress { margin-top: auto }
.card.compact .progress-label { margin-top: 0 }
.card.is-muted { pointer-events: none; opacity: .5 }
.card-head { display: flex; align-items: center; gap: var(--space-10); min-width: 0 }
.card-head h3 { flex: 1; min-width: 0; font-size: var(--text-16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.card-head.wrap { align-items: flex-start; justify-content: space-between; gap: var(--space-8) }
.card-head.wrap h3 { flex: 0 1 auto; white-space: normal; overflow: visible; overflow-wrap: anywhere }
.card-logo { width: 32px; height: 32px; flex-shrink: 0; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-8); background: var(--surface) }
.card-symbol { display: inline-flex; flex-shrink: 0; color: var(--brand-text) }
.card-symbol .icon { width: 28px; height: 28px }
.card-desc { font-size: var(--text-13); color: var(--muted); line-height: var(--leading); min-height: 3.2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere }
.card-meta { font-size: var(--text-12); color: var(--muted) }
/* Riordino delle card a trascinamento: bordo tratteggiato, maniglia, card di arrivo */
.card.reorder { cursor: grab; outline: 2px dashed var(--line-strong); outline-offset: 2px }
.card.reorder.drop-target { outline: 2px solid var(--brand) }
.card-handle { display: inline-flex; flex-shrink: 0; border-radius: var(--radius-7); color: var(--slate-500); cursor: grab }
.card-handle:hover { color: var(--ink) }

/* ---------- Passi (configurazione guidata) ---------- */
/* <ol class="steps"><li><a class="step done"><span class="step-dot">1</span><span>Admin</span></a><span class="step-sep"></span></li>…
   Sempre su una riga: scorre senza barra se non ci sta. */
.steps { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-8); margin: 0 0 var(--space-32); padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; font-size: var(--text-13) }
.steps::-webkit-scrollbar { display: none }
.steps li { display: flex; flex-shrink: 0; align-items: center; gap: var(--space-8) }
.step { display: flex; align-items: center; gap: var(--space-8); color: var(--muted) }
.step-dot { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-round); background: var(--surface); color: var(--muted); font-size: var(--text-12); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums }
.step.done .step-dot { border-color: var(--slate-300); background: var(--slate-200); color: var(--slate-700) }
.step.current { color: var(--ink); font-weight: var(--weight-semibold) }
.step.current .step-dot { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-text) }
a.step:hover { color: var(--ink) }
a.step:hover .step-dot { border-color: var(--slate-500) }
.step-sep { width: 20px; height: 1px; flex-shrink: 0; background: var(--line-strong) }

/* ---------- Pila di toast cliccabili (notifiche nuove) ---------- */
/* <div class="toast-stack"><div class="toast-card" role="status">${icon('bell')}<div><strong>Nuova notifica</strong><p>…</p></div></div></div>
   In alto a destra, sopra il drawer mobile; entra da destra (transform dal JS), si chiude da sola. */
.toast-stack { position: fixed; top: var(--space-12); left: var(--space-12); right: var(--space-12); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-8) }
.toast-card { display: flex; align-items: flex-start; gap: var(--space-12); padding: var(--space-12) var(--space-16); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-12); box-shadow: var(--shadow-raised); cursor: pointer; transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) }
.toast-card > .icon { flex-shrink: 0; margin-top: 2px; color: var(--brand-text) }
.toast-card > div { min-width: 0 }
.toast-card strong { display: block; font-size: var(--text-14); font-weight: var(--weight-semibold); color: var(--ink) }
.toast-card p { font-size: var(--text-14); color: var(--ink-2); overflow-wrap: anywhere }

/* ---------- Pastiglia colore (colore libero con etichetta) ---------- */
/* <label class="swatch-pill"><input type="color" class="color-dot" value="#…">Urgente</label> */
input[type=color].color-dot { -webkit-appearance: none; appearance: none; width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; border-radius: var(--radius-round); cursor: pointer }
input[type=color].color-dot::-webkit-color-swatch-wrapper { padding: 0 }
input[type=color].color-dot::-webkit-color-swatch { border: 1px solid var(--line-strong); border-radius: var(--radius-round) }
input[type=color].color-dot::-moz-color-swatch { border: 1px solid var(--line-strong); border-radius: var(--radius-round) }
.swatch-pill { display: inline-flex; align-items: center; gap: var(--space-8); margin: 0; padding: var(--space-4) var(--space-14) var(--space-4) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--slate-100); font-size: var(--text-13); font-weight: var(--weight-medium); color: var(--ink); cursor: pointer }

/* ---------- Pagine di accesso (login, registrazione, password, setup) ---------- */
/* .auth-layout: pannello brand chiaro a sinistra da 1100px, colonna del modulo a destra;
   sotto una colonna sola col marchio compatto (.auth-brand-compact) sopra il titolo.
   Gli elementi (.auth-brand, .auth-field, .auth-control…) valgono anche con un layout proprio. */
.auth-layout { min-height: 100svh; background: var(--surface-alt); color: var(--ink) }
.auth-layout .auth-brand { display: none }
.auth-main { display: flex; min-height: 100svh; align-items: center; justify-content: center; padding: var(--space-48) var(--space-32) }
.auth-form { width: 100%; min-width: 0; max-width: 28rem }
.auth-form.wide { max-width: 42rem }
.auth-form h1 { overflow-wrap: anywhere }
.auth-brand { min-width: 0; padding: var(--space-48) var(--space-48) var(--space-32); background: var(--brand-soft-2); border-right: 1px solid var(--line) }
.auth-brand-link { display: flex; align-items: center; gap: var(--space-10); min-width: 0; max-width: 100%; color: var(--ink); font-size: var(--text-16); font-weight: var(--weight-semibold); letter-spacing: -.2px }
.auth-brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.auth-brand-compact { margin-bottom: var(--space-32) }
/* Quadrato con l'iniziale: tinta brand chiara, la lettera regge 4.5:1 con qualunque --brand. */
.auth-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--brand-line); border-radius: var(--radius-8); background: var(--brand-soft); color: var(--brand-text); font-size: var(--text-16); font-weight: var(--weight-bold); line-height: 1 }
.auth-brand-claim { max-width: 24rem; font-size: var(--text-33); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); color: var(--ink) }
.auth-brand-foot { font-size: var(--text-12); color: var(--slate-600) }
.auth-subtitle { margin-top: var(--space-10); font-size: var(--text-14); color: var(--muted) }
.auth-body { margin-top: var(--space-28) }
.auth-lead { margin-bottom: var(--space-20); font-size: var(--text-15); overflow-wrap: anywhere }
.auth-lead + .auth-secondary { margin-top: var(--space-4) }
.auth-email { color: var(--ink) }
/* Avvisi (flash) e note in riga: .info-banner compatto; il tono con .danger / .ok / .warn */
.auth-alert, .auth-banner { align-items: flex-start; gap: var(--space-10); padding: var(--space-14) var(--space-16); overflow-wrap: anywhere }
.auth-alert { margin: 0 0 var(--space-16) }
.auth-banner { margin: var(--space-20) 0 0 }
.auth-banner + .auth-lead { margin-top: var(--space-20) }
.auth-alert > .icon, .auth-banner > .icon { margin-top: 1px }
/* Campi: label sopra, 20px fra un campo e l'altro */
:is(.auth-field, .auth-note, .auth-row, .auth-otp, .auth-drop-field, .auth-current-file) + :is(.auth-field, .auth-row, .auth-otp, .auth-drop-field) { margin-top: var(--space-20) }
.modal-subtitle + .auth-field { margin-top: var(--space-20) }
.auth-field > label, .auth-drop-label { margin-bottom: var(--space-8) }
.auth-note { margin-top: var(--space-8) }
/* Due campi affiancati (nome e cognome) da 640px; sotto impilati */
.auth-row { display: grid; gap: var(--space-20) var(--space-18) }
.auth-row > .auth-field { margin-top: 0 }
/* Campo con pastiglia a sinistra (@ del nickname) e campo password con mostra/nascondi (.icon-btn.small.auth-eye) */
.auth-control { position: relative }
.auth-prefix { position: absolute; top: 1px; bottom: 1px; left: 1px; display: inline-flex; align-items: center; padding: 0 var(--space-12); border-right: 1px solid var(--line-strong); border-radius: 7px 0 0 7px; background: var(--slate-100); color: var(--slate-700); pointer-events: none }
.auth-control-prefixed input:not([type=checkbox]):not([type=radio]) { padding-left: 50px }
.auth-control-password input:not([type=checkbox]):not([type=radio]) { padding-right: 48px }
.auth-eye { position: absolute; top: 50%; right: var(--space-6); transform: translateY(-50%) }
/* Codice OTP: cifre distanziate e più grandi */
.auth-otp input:not([type=checkbox]):not([type=radio]) { font-family: var(--font-mono); font-size: var(--text-19); letter-spacing: .45em }
/* Ricordami | Password dimenticata? */
.auth-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-12); margin-top: var(--space-14) }
.auth-check { flex: none }
/* Campo file: .dropzone + input ritagliato + riga del file scelto (.is-bad se rifiutato) */
.auth-drop-field { position: relative }
input[type=file].auth-drop-input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
.auth-drop-title, .auth-drop-hint { overflow-wrap: anywhere }
.auth-drop-picked { display: flex; align-items: center; gap: var(--space-10); margin-top: var(--space-8); padding: var(--space-6) var(--space-6) var(--space-6) var(--space-10); border: 1px solid var(--line); border-radius: var(--radius-8); background: var(--surface); font-size: var(--text-14) }
.auth-drop-picked img { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-5); background: var(--slate-100); object-fit: contain }
.auth-drop-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.auth-drop-size { flex: none; font-size: var(--text-12); color: var(--muted) }
.auth-drop-picked.is-bad { border-color: color-mix(in srgb, var(--status-danger-fg) 24%, var(--surface)); background: var(--status-danger-bg) }
.auth-drop-picked.is-bad :is(.auth-drop-name, .auth-drop-size) { color: var(--status-danger-fg) }
.auth-current-file { display: flex; align-items: center; gap: var(--space-12); margin-top: var(--space-12) }
.auth-current-file img { flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius-8); background: var(--surface) }
/* Bottoni e link */
.auth-submit { margin-top: var(--space-28) }
.auth-secondary { margin-top: var(--space-12) }
.auth-foot-note { margin-top: var(--space-32); padding-top: var(--space-24); border-top: 1px solid var(--line); color: var(--muted); overflow-wrap: anywhere }
:is(.auth-foot-note, .auth-inline-actions) .text-btn { padding: 0 }
.text-btn.auth-link-muted { color: var(--muted) }
.text-btn.auth-link-muted:hover { color: var(--ink) }
/* Reinvia il codice | Usa un'altra email */
.auth-inline-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-10) var(--space-16); margin-top: var(--space-16) }

/* ---------- Pagina di errore (403, 404, 500) ---------- */
/* <body><main class="panel err-card" style="--tone: var(--status-danger-fg)">: una .panel centrata nella pagina. */
body:has(> .err-card) { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: var(--space-40) var(--space-20) }
.err-card { width: 100%; max-width: 34rem; padding: 36px 32px 32px; overflow: visible }
.err-brand { display: inline-flex; align-items: center; gap: var(--space-10); max-width: 100%; color: var(--ink); font-size: var(--text-16); font-weight: var(--weight-semibold); letter-spacing: -.2px }
.err-brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.err-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--brand-line); border-radius: var(--radius-8); background: var(--brand-soft); color: var(--brand-text); font-size: var(--text-16); font-weight: var(--weight-bold); line-height: 1 }
.err-code { margin-top: var(--space-24); font-size: var(--text-46); line-height: 1; font-weight: var(--weight-display); letter-spacing: -1px; color: var(--tone, var(--muted)); font-variant-numeric: tabular-nums }
.err-card .err-title { margin-top: var(--space-12); font-size: var(--text-25); letter-spacing: var(--tracking-title); overflow-wrap: anywhere }
.err-text { margin-top: var(--space-10); color: var(--muted) }
/* Indirizzo richiesto (404): monospazio, a capo ovunque. Arriva dall'utente: sempre escapato. */
.err-path { margin-top: var(--space-18); padding: var(--space-8) var(--space-12); border-radius: var(--radius-8); background: var(--slate-100); color: var(--slate-700); font-family: var(--font-mono); font-size: var(--text-13); overflow-wrap: anywhere }
.err-actions { display: flex; flex-wrap: wrap; gap: var(--space-10); margin-top: var(--space-28) }

/* ---------- Estesi: tablet e mobile ---------- */
@media (max-width: 1099px) {
  .drawer-grid, .dialog-grid { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 720px) {
  .menu-item { min-height: var(--control-h) }
  .drawer, .drawer.wide { width: 100% }
  .drawer-header, .dialog-header { padding: var(--space-18) var(--space-20) var(--space-16) }
  .drawer-header h2, .dialog-header h2 { font-size: 21px }
  .drawer-body, .dialog-body { padding: var(--space-20) }
  .drawer-footer, .dialog-footer { padding: var(--space-12) var(--space-20); flex-wrap: wrap }
  .dialog.large { width: calc(100% - 24px); max-height: calc(100dvh - 24px) }
  /* Dropdown su mobile: foglio in basso, non esce mai dallo schermo */
  /* :is(.start, .end, .up) alza la specificità sopra gli allineamenti desktop, che altrimenti spostano il foglio (o lo portano fuori schermo con .up) */
  .dropdown > .menu, .dropdown > .popover, .dropdown:is(.start, .end, .up) > :is(.menu, .popover) { position: fixed; top: auto; bottom: var(--space-16); left: var(--space-16); right: var(--space-16); width: auto; min-width: 0; max-width: none; max-height: 70dvh }
  .code-box { font-size: var(--text-14) }
  .sidebar.offcanvas { position: fixed; top: 0; bottom: 0; left: calc(min(300px, 86vw) * -1 - 1px); width: min(300px, 86vw); height: 100dvh; display: flex; flex-direction: column; padding: var(--space-24) var(--space-16) var(--space-18); overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); border-bottom: 0; z-index: var(--z-offcanvas); visibility: hidden; transition: left var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow) }
  .sidebar.offcanvas.open { left: 0; visibility: visible; box-shadow: var(--shadow-dialog); transition: left var(--dur-slow) var(--ease-out) }
  .sidebar.offcanvas nav { flex-direction: column; gap: var(--space-4); overflow: visible; padding-bottom: 0 }
  .sidebar.offcanvas .nav-label { display: block }
  .sidebar.offcanvas .nav-item { white-space: normal; min-height: var(--control-h); padding: var(--space-10) var(--space-12); gap: var(--space-12) }
  .sidebar.offcanvas .nav-item .icon { width: 18px; height: 18px }
  .sidebar.offcanvas .nav-sub .nav-item { min-height: var(--icon-btn) }
  .sidebar-backdrop.visible { display: block; position: fixed; inset: 0; z-index: var(--z-offcanvas-backdrop); background: var(--backdrop); animation: otx-backdrop-enter var(--dur) ease-out both }
  .mobile-topbar { position: sticky; top: 0; z-index: var(--z-sidebar); display: flex; align-items: center; gap: var(--space-4); height: 56px; padding: 0 var(--space-8); background: var(--surface); border-bottom: 1px solid var(--line) }
  .mobile-topbar .icon-btn { position: relative; width: 44px; height: 44px; border-color: transparent }
  .mobile-topbar .icon-btn:hover { background: var(--slate-100) }
  .mobile-topbar-title { flex: 1; min-width: 0; padding-left: var(--space-4); font-size: var(--text-16); font-weight: var(--weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .props { grid-template-columns: 100px minmax(0, 1fr) }
  .kanban { scroll-snap-type: x mandatory; gap: var(--space-12) }
  .kanban-column { flex-basis: min(86vw, var(--kanban-col-w)); scroll-snap-align: start }
  .table th, .table td { padding-left: var(--space-12); padding-right: var(--space-12) }
  .segment, .filter-chip, .page-btn { min-height: var(--icon-btn) }
  .hero-cover { height: 140px }
  .hero-logo { width: 60px; height: 60px; top: calc(140px - 30px); left: var(--space-16); font-size: var(--text-19); border-radius: var(--radius-12) }
  .hero-body { padding: var(--space-10) 0 0 88px; align-items: flex-start }
  .hero-body h1 { font-size: 25px; letter-spacing: var(--tracking-title) }
  .hero-body .heading-actions { width: calc(100% + 88px); margin-left: -88px }
  .check { min-height: var(--icon-btn) }
  /* Bersagli compatti da 32px portati a 40px al tocco */
  .icon-btn.small, .nav-toggle { width: var(--icon-btn); height: var(--icon-btn) }
  .md-btn { min-width: var(--icon-btn); height: var(--icon-btn) }
  .nav-section .nav-label { display: block }
  .dropzone { padding: var(--space-20) var(--space-16) }
  .pagination-info { width: 100%; margin: var(--space-4) 0 0 }
}

/* ---------- Estesi: movimento ridotto ---------- */
/* La regola generale sopra azzera già animazioni e transizioni; qui gli stati
   che resterebbero a metà: lo spinner resta un anello fermo leggibile, lo
   scheletro e il timer smettono di pulsare, il drawer appare senza scorrere. */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none !important }                         /* anello fermo, resta visibile */
  .skeleton { background: var(--slate-100) }
  .timer.running::before { opacity: 1 }
  aside.drawer, div.drawer { transition: none }
  .sidebar.offcanvas, .sidebar.offcanvas.open { transition: none }
  .sidebar-backdrop.visible { animation: none }
  .tooltip { transform: translate(var(--tip-x), 0) }
}

/* ---------- Estesi da taska: tablet e mobile ---------- */
@media (min-width: 640px) {
  .toast-stack { top: var(--space-20); left: auto; right: var(--space-20); width: 320px }
  .auth-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
}
@media (min-width: 1024px) {
  .stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
}
@media (min-width: 1100px) {
  .auth-layout { display: grid; grid-template-columns: 2fr 3fr }
  .auth-layout .auth-brand { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: space-between }
  .auth-layout .auth-brand-compact { display: none }
}
@media (max-width: 1099px) {
  .split-body { grid-template-columns: minmax(290px, 340px) minmax(0, 1fr) }
  .split-pane { padding: var(--space-24) }
}
@media (max-width: 900px) {
  .split-body { display: block; min-height: 0 }
  .split-list { border-right: 0 }
  .split-pane { display: none }
  .split-item.selected { background: none }
  .split-item.selected:hover { background: var(--slate-50) }
  .split.has-selection .split-toolbar, .split.has-selection .split-list { display: none }
  .split.has-selection .split-pane { display: block }
  .split-back { display: inline-flex; padding: 0; margin-bottom: var(--space-16) }
}
@media (max-width: 720px) {
  :is(.dialog-header, .drawer-header) input.panel-title-input,
  :is(.dialog-header, .drawer-header) input.panel-title-input:focus { font-size: 21px }
  .split-toolbar { padding: 14px; flex-direction: column; align-items: stretch }
  .split-tabs { margin: 0 -2px }
  .split-search.search-box { width: 100% }
  .split-item { padding: 15px var(--space-16); min-height: 76px }
  .split-footer { padding: 14px var(--space-16); flex-wrap: wrap }
  .split-pane { padding: var(--space-20) var(--space-16) }
  .split-pane-head h2 { font-size: 21px }
  .split-pane-head .avatar.large { width: 56px; height: 56px; font-size: var(--text-19) }
  .split-facts { grid-template-columns: minmax(0, 1fr); gap: 2px }
  .split-facts dd { margin-bottom: var(--space-10) }
  .split-field { max-width: none }
  .split-actions .btn { flex: 1 1 auto }
  .row.dense { padding: var(--space-14) var(--space-16) }
  .row-group-title { padding-inline: var(--space-16) }
  .auth-main { padding: var(--space-40) var(--space-20) }
  .auth-form h1 { font-size: 31px; letter-spacing: -1.1px }
  .auth-brand-compact { margin-bottom: var(--space-24) }
}
@media (max-width: 480px) {
  .err-card { padding: 28px 20px 24px }
  .err-code { font-size: 42px }
  .err-actions .btn { flex: 1 1 100% }
}

} /* @layer components */
