/* ============================================================
   Strumento di Valutazione — app.css
   Designers Italia / Bootstrap Italia 2.x tokens
   Titillium Web · Primary #06c (blu istituzionale)
============================================================ */
:root {
  --bg: #ffffff; --surface: #ffffff;
  --surface-2: #f8f9fa; --surface-3: #e9ecef;
  --ink: #17324d; --ink-2: #455b71; --muted: #5c6f82;
  --line: #e3e5e7; --line-2: #f0f1f2; --line-strong: #c5c7c9;
  --accent: #06c; --accent-2: #004080;
  --accent-soft: #d9e7f5; --accent-faint: #ebf3fb;
  --ok: #008055; --ok-soft: #cce8dd;
  --warn: #a66300; --warn-soft: #ffe6c6;
  --danger: #d9364f; --danger-soft: #f5d3d8;
  --score-0: #d9364f; --score-0-soft: #fbe8ea;
  --score-1: #e58900; --score-1-soft: #ffe6c6;
  --score-2: #b88300; --score-2-soft: #fff3cd;
  --score-3: #008055; --score-3-soft: #cce8dd;
  --score-na: #2778b5; --score-na-soft: #d9ecf7;
  --focus: #fcdf86;
  --r-sm: 4px; --r-md: 4px; --r-lg: 6px; --r-pill: 16px; --r-circle: 50%;
  --shadow-1: 0 1px 2px rgba(23,50,77,.04);
  --shadow-2: 0 4px 12px rgba(23,50,77,.08);
  --font-ui: 'Titillium Web','Helvetica Neue',Arial,sans-serif;
  --font-display: 'Titillium Web','Helvetica Neue',Arial,sans-serif;
  --font-mono: 'Roboto Mono',ui-monospace,monospace;
  --sidebar-w: 252px;
}

/* ============== RESET ============== */
*,*::before,*::after { box-sizing: border-box; }
html,body { margin: 0; padding: 0; }
body { font-family: var(--font-ui); font-size: 14px; line-height: 1.5; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input,textarea,select { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
h1,h2,h3,h4,h5 { color: var(--ink); font-weight: 700; letter-spacing: -.005em; }
.kicker { font-size: 12px; text-transform: uppercase; font-weight: 600; letter-spacing: .08em; color: var(--muted); }

/* ============== FORM CONTROLS ============== */
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .req { color: var(--danger); margin-left: 3px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.field .ro-pill { font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--muted); border-radius: var(--r-pill); padding: 1px 7px; margin-left: 6px; }
.input,.ta,.sel { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 9px 12px; background: var(--surface); color: var(--ink); font-size: 15px; transition: border-color .12s, box-shadow .12s; }
.input:hover,.ta:hover,.sel:hover { border-color: var(--accent); }
.input:focus,.ta:focus,.sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.prefilled { background: var(--surface-2); color: var(--muted); }
.input.error { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ta { resize: vertical; min-height: 72px; }
.sel { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2.5 4.5 L6 8 L9.5 4.5' fill='none' stroke='%235c6f82' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }

/* ============== BUTTONS ============== */
.btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--r-md); padding: 8px 16px; font-weight: 600; font-size: 14px; font-family: var(--font-ui); line-height: 1.2; transition: background .12s, color .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--accent-soft); }
.btn:active { background: var(--accent); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-faint); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.block { display: flex; width: 100%; justify-content: center; }
.btn.big { padding: 11px 20px; font-size: 15px; }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn[disabled],.btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ============== FLASH ============== */
.flash { padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 14px; font-size: 14px; }
.flash.error   { background: var(--danger-soft); color: var(--danger); border: 1px solid #f1b8bf; }
.flash.success { background: var(--ok-soft); color: var(--ok); border: 1px solid #a5d6c4; }
.flash.warning { background: var(--warn-soft); color: var(--warn); border: 1px solid #f5c88a; }

/* ============== AUTH — Login ============== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-side { background: linear-gradient(135deg,#06c 0%,#004080 100%); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: -30% -30% auto auto; width: 80%; height: 80%; background: radial-gradient(circle,rgba(255,255,255,.08) 0%,transparent 60%); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand-mark { width: 40px; height: 40px; border-radius: var(--r-sm); background: #fff; color: var(--accent); display: grid; place-items: center; }
.auth-side h1 { font-family: var(--font-display); font-size: 44px; margin: 4px 0 6px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; max-width: 480px; position: relative; z-index: 1; color: #fff; }
.auth-side p.lead { font-size: 16px; color: rgba(255,255,255,.85); max-width: 460px; position: relative; z-index: 1; line-height: 1.55; }
.auth-features { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.auth-features li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: rgba(255,255,255,.92); }
.auth-features .feat-i { width: 26px; height: 26px; border-radius: var(--r-circle); background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; border: 1px solid rgba(255,255,255,.25); }
.auth-foot { margin-top: auto; font-size: 12px; color: rgba(255,255,255,.55); position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h2 { font-family: var(--font-display); font-size: 32px; margin: 0; font-weight: 700; color: var(--ink); }
.auth-card p.sub { color: var(--muted); margin: 0 0 8px; font-size: 15px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: -4px 0 4px; }
.auth-row a { color: var(--accent); font-weight: 600; }
.auth-foot-l { margin-top: 14px; font-size: 12px; color: var(--muted); padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: var(--r-sm); }
.field-relative { position: relative; }
.pwd-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; padding: 4px 12px; cursor: pointer; }

/* ============== LANDING INVITO ============== */
.landing-page { min-height: 100vh; background: var(--surface-2); display: flex; flex-direction: column; font-family: var(--font-ui); }
.landing-top { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 36px; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.landing-top strong { font-family: var(--font-display); font-size: 17px; color: var(--ink); display: block; font-weight: 700; }
.landing-top em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.landing-top .who { margin-left: auto; font-size: 12.5px; color: var(--muted); text-align: right; line-height: 1.4; }
.landing-top .who b { color: var(--ink); display: block; }
.landing-main { flex: 1; overflow-y: auto; padding: 32px 36px; }
.landing-shell { max-width: 780px; margin: 0 auto; display: grid; gap: 24px; }
.landing-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 32px 36px; box-shadow: var(--shadow-1); }
.landing-card h1 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 0 0 6px; color: var(--ink); line-height: 1.2; }
.landing-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.landing-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin: 22px 0 12px; color: var(--ink); }
.invito-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.invito-brand .brand-mark { width: 36px; height: 36px; }
.invito-brand span { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.land-card { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px 48px; box-shadow: var(--shadow-2); }
.land-card h1 { font-size: 26px; margin: 0 0 6px; }
.land-card p.sub { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.land-card h3 { font-size: 15px; margin: 24px 0 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.land-hello { background: var(--accent-faint); border: 1px solid var(--accent-soft); border-radius: var(--r-md); padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 20px; }

/* Stepper */
.steps { list-style: none; padding: 0; margin: 0 0 32px; display: flex; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex: 1; position: relative; }
.step .n,.step .step-n { width: 26px; height: 26px; border-radius: var(--r-circle); border: 2px solid var(--line-strong); background: var(--surface); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step.done .n,.step.done .step-n  { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.current .n,.step.current .step-n { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-faint); }
.step.current { color: var(--ink); font-weight: 600; }
.step.done { color: var(--ink-2); }
.step.active .lbl { color: var(--ink); font-weight: 600; }
.step.done .lbl { color: var(--ink-2); }
.step::after { content: ""; position: absolute; left: 26px; top: 13px; width: calc(100% - 34px); height: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step.done::after { background: var(--ok); }

/* Consent */
.consent { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; color: var(--muted); margin: 20px 0; }
.consent .cb { color: var(--ok); font-size: 16px; font-weight: 700; flex-shrink: 0; }
.consent input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: var(--accent); cursor: pointer; }

/* Password strength */
.pwd-strength { margin-top: 8px; }
.pwd-bar { display: flex; gap: 4px; margin-bottom: 8px; }
.pwd-bar span { flex: 1; height: 4px; background: var(--line); border-radius: 2px; transition: background .2s; }
.pwd-bar[data-level="1"] span:nth-child(-n+1) { background: var(--score-0); }
.pwd-bar[data-level="2"] span:nth-child(-n+2) { background: var(--score-1); }
.pwd-bar[data-level="3"] span:nth-child(-n+3) { background: var(--score-2); }
.pwd-bar[data-level="4"] span:nth-child(-n+4) { background: var(--ok); }
.pwd-rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.pwd-rules li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pwd-rules li.on { color: var(--ok); }
.pwd-rules .tick { width: 14px; height: 14px; border-radius: var(--r-circle); border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 9px; flex-shrink: 0; }
.pwd-rules li.on .tick { background: var(--ok); color: #fff; border-color: var(--ok); }
.pwd-rules .tick::after { content: "✓"; line-height: 1; }

/* Grid */
.land-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.land-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px 18px; }
.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: span 3; }
.land-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 24px; }
.land-actions .skip { color: var(--muted); font-size: 12.5px; }
.land-actions .skip a { color: var(--accent); cursor: pointer; }

/* Success */
.land-success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.land-success-check { width: 64px; height: 64px; border-radius: var(--r-circle); background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.land-success h1 { font-size: 26px; margin: 0; }
.land-success p { color: var(--muted); font-size: 15px; max-width: 480px; margin: 0; }
.what-next { text-align: left; width: 100%; background: var(--surface-2); border-radius: var(--r-md); padding: 18px 20px; }
.what-next h4 { margin: 0 0 10px; font-size: 14px; }
.what-next ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.what-next li { font-size: 14px; color: var(--ink-2); }

/* ============== APP SHELL ============== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { background: #17324d; color: rgba(255,255,255,.88); padding: 18px 12px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sb-brand strong { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }
.sb-brand em { font-style: normal; font-size: 10px; font-family: var(--font-ui); color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .08em; display: block; font-weight: 600; }
.sb-section { font-family: var(--font-ui); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); padding: 14px 10px 6px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 14px; color: rgba(255,255,255,.78); cursor: pointer; border: none; background: transparent; font-weight: 400; width: 100%; text-align: left; text-decoration: none; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sb-link.active { background: var(--accent); color: #fff; font-weight: 600; }
.sb-link.active:hover { background: var(--accent-2); }
.sb-link .ico { width: 20px; display: inline-flex; justify-content: center; flex-shrink: 0; }
.sb-spacer { flex: 1; }
.sb-user { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 10px 8px 8px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 10px; font-size: 13px; }
.sb-user .avatar { width: 34px; height: 34px; border-radius: var(--r-circle); background: #06c; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; font-size: 13px; }
.sb-user .who b { color: #fff; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .who span { color: rgba(255,255,255,.6); font-size: 11px; }
.sb-user-main { display: flex; gap: 10px; align-items: center; background: transparent; border: none; padding: 6px; border-radius: var(--r-md); color: inherit; text-align: left; cursor: pointer; width: 100%; text-decoration: none; }
.sb-user-main:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sb-logout-link { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; color: rgba(255,255,255,.55); font-size: 11.5px; padding: 6px; border-radius: var(--r-sm); cursor: pointer; text-align: left; margin-left: 44px; text-decoration: none; }
.sb-logout-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }

/* ============== CONTENT AREA ============== */
.content { background: var(--bg); overflow: auto; display: flex; flex-direction: column; min-height: 100vh; }
.topbar2 { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 32px; display: flex; align-items: center; gap: 14px; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.topbar2 .left { display: flex; flex-direction: column; gap: 2px; }
.topbar2 h2 { font-family: var(--font-display); font-size: 28px; margin: 0; font-weight: 700; color: var(--ink); letter-spacing: -.005em; }
.topbar2 .right { display: flex; gap: 8px; align-items: center; }
.page { padding: 28px 32px 80px; max-width: 1280px; }
.page.wide { max-width: 1500px; }

/* ============== TABLES & LISTS ============== */
.list-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.search-input { flex: 1; max-width: 420px; position: relative; }
.search-input input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 9px 14px 9px 38px; background: var(--surface); font-size: 14px; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.search-input input:hover { border-color: var(--accent); }
.search-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filters-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.chip { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: 13px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-family: var(--font-ui); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead { background: var(--surface-2); }
.table th,.table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-family: var(--font-ui); font-weight: 700; font-size: 13px; color: var(--ink); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { cursor: pointer; transition: background .1s; }
.table tbody tr:hover { background: var(--accent-faint); }
.table tbody tr.muted-row td:not(:first-child) { color: var(--muted); }
.cell-name { display: flex; align-items: center; gap: 12px; }
.cell-name .av { width: 36px; height: 36px; border-radius: var(--r-circle); background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.cell-name b { font-weight: 600; color: var(--ink); }
.cell-name em { display: block; font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.cell-arrow { color: var(--muted); text-align: right; }

/* Status & role badges */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.pill.dot::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-circle); display: inline-block; background: currentColor; }
.pill.attivo { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.pill.disattivato { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.pill.in-invito { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pill.bozza { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.pill.in-corso { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pill.conclusa { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.pill.sm { font-size: 11px; padding: 2px 8px; }
.role-badge { display: inline-block; padding: 3px 9px; border-radius: var(--r-sm); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border: 1px solid; }
.role-badge.admin { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.role-badge.operatore { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.role-badge.tutor { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.role-badge.lavoratore { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }

/* KPI cards */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r-md); padding: 18px 20px; }
.kpi-card .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-card .val { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.1; margin: 6px 0 4px; color: var(--ink); }
.kpi-card .delta { font-size: 12px; color: var(--muted); }
.kpi-card .delta.ok { color: var(--ok); }

/* ============== ADMIN LAYOUT ============== */
.admin-grid { display: grid; grid-template-columns: 232px 1fr; gap: 28px; }
.admin-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; height: fit-content; position: sticky; top: 84px; }
.admin-side a,.admin-side button { display: block; width: 100%; text-align: left; background: transparent; border: none; border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px; color: var(--ink-2); font-weight: 500; text-decoration: none; font-family: var(--font-ui); cursor: pointer; }
.admin-side a:hover,.admin-side button:hover { background: var(--accent-faint); color: var(--accent); text-decoration: none; }
.admin-side a.active,.admin-side button.active { background: var(--accent); color: #fff; font-weight: 600; }
.section-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px 32px; }
.section-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section-h h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0; color: var(--ink); }
.section-h p.sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.section-h .right { display: flex; align-items: center; gap: 10px; }
.q-banner { background: #d9e7f5; border: 1px solid #b0cde8; border-radius: var(--r-md); padding: 12px 16px; display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 16px; }

/* ============== MODAL ============== */
.modal-overlay { position: fixed; inset: 0; background: rgba(23,50,77,.55); display: grid; place-items: center; z-index: 100; padding: 24px; backdrop-filter: blur(4px); }
.modal-overlay.hidden { display: none; }
.modal { background: var(--surface); border-radius: var(--r-md); width: 100%; max-width: 520px; box-shadow: var(--shadow-2); border-top: 4px solid var(--accent); }
.modal.wide { max-width: 680px; }
.modal header { padding: 22px 26px 8px; display: flex; align-items: center; justify-content: space-between; }
.modal header h3 { font-family: var(--font-display); font-size: 22px; margin: 0; font-weight: 700; color: var(--ink); }
.modal header .close { border: none; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: var(--r-sm); }
.modal header .close:hover { background: var(--surface-2); color: var(--ink); }
.modal .body { padding: 8px 26px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }

/* ============== PROFILE ============== */
.profile-hero { display: flex; align-items: center; gap: 18px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 18px; }
.profile-avatar { width: 64px; height: 64px; border-radius: var(--r-circle); background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; flex-shrink: 0; }
.profile-id h3 { margin: 0; font-family: var(--font-display); font-size: 22px; }
.profile-id p { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; }

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .land-card { padding: 24px 20px; }
  .land-grid-2,.land-grid-3 { grid-template-columns: 1fr; }
  .field-span-2,.field-span-3 { grid-column: span 1; }
  .pwd-rules { grid-template-columns: 1fr; }
  .land-actions { flex-direction: column-reverse; gap: 12px; align-items: stretch; }
  .land-actions .btn { width: 100%; }
}

/* ============== SCHEDA — shared ============== */
.av { width: 36px; height: 36px; border-radius: var(--r-circle); background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.dot-sep { color: var(--muted); margin: 0 3px; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); text-decoration: underline; }

/* Layout */
.scheda-shell { display: grid; grid-template-columns: 268px 1fr; gap: 24px; align-items: start; }
.scheda-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; }
.scheda-main { min-width: 0; }

/* Subject card */
.subj-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.subj-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.subj-head .av { width: 40px; height: 40px; font-size: 14px; }
.subj-head .who b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.subj-head .who em { font-style: normal; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.subj-meta { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.subj-meta div { display: flex; gap: 6px; }
.subj-meta span:first-child { color: var(--muted); min-width: 62px; flex-shrink: 0; font-weight: 600; font-size: 11.5px; }
.subj-pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* Compilatore badge */
.compilatore-badge { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--r-md); padding: 10px 12px; }
.compilatore-badge.lavoratore { border-left-color: var(--warn); }
.compilatore-badge.tutor { border-left-color: var(--ok); }
.cb-lbl { display: flex; flex-direction: column; gap: 1px; }
.cb-lbl em { font-style: normal; font-size: 11px; color: var(--muted); }
.cb-lbl b { font-size: 13px; color: var(--ink); }

/* Scheda side nav */
.scheda-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.scheda-nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); padding: 10px 14px 3px; }
.scheda-nav a { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; border-bottom: 1px solid var(--line); padding: 9px 14px; font-size: 13.5px; color: var(--ink-2); font-weight: 400; text-decoration: none; font-family: var(--font-ui); }
.scheda-nav a:last-child { border-bottom: none; }
.scheda-nav a:hover { background: var(--accent-faint); color: var(--accent); text-decoration: none; }
.scheda-nav a.active { background: var(--accent-faint); color: var(--accent); font-weight: 600; }
.scheda-nav a .ix { width: 20px; text-align: center; flex-shrink: 0; font-size: 14px; }
.scheda-nav a .lbl { flex: 1; }
.sm-pill { display: inline-block; background: var(--surface-3); border-radius: 10px; padding: 1px 7px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.sm-pill.sm-pill-tutor { background: var(--ok-soft); color: var(--ok); }

/* Subsection header */
.subsection-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 20px 0 12px; }

/* Scheda grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px 18px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* Dual hint banner */
.dual-hint { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 16px; margin-bottom: 14px; font-size: 12.5px; flex-wrap: wrap; gap: 10px; }
.dh-side { display: flex; align-items: center; gap: 6px; }
.dh-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--r-circle); flex-shrink: 0; }
.dh-dot-lavoratore { background: var(--warn); }
.dh-dot-tutor { background: var(--ok); }
.dh-vs { color: var(--muted); font-size: 16px; margin: 0 4px; }
.dh-msg { flex: 1; min-width: 180px; color: var(--muted); font-size: 12px; }
.dh-side em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.dh-side b { font-weight: 600; }

/* Eval meta (date row above table) */
.eval-meta { display: flex; gap: 12px; margin-bottom: 16px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--line); align-items: flex-start; }
.date-input { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.date-error { font-size: 11.5px; color: var(--danger); margin-top: 2px; }
.input.compact { padding: 6px 10px; font-size: 13.5px; }
.input.ro,.ta.ro { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* Eval table */
.eval-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 4px 0 12px; }
.eval-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line-strong); font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--surface-2); }
.eval-table th.lbl-col { width: 36%; }
.eval-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.eval-table td.lbl-col { font-size: 13px; color: var(--ink-2); }
.eval-table tr:last-child td { border-bottom: none; }
.eval-table tr.total td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line-strong); color: var(--ink); font-size: 13px; }
.eval-table .when { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; margin-top: 2px; font-family: var(--font-mono); }
.eval-table .score-cell { text-align: center; min-width: 168px; }
.eval-table td.score-cell[data-score="0"] { background: var(--score-0-soft); }
.eval-table td.score-cell[data-score="1"] { background: var(--score-1-soft); }
.eval-table td.score-cell[data-score="2"] { background: var(--score-2-soft); }
.eval-table td.score-cell[data-score="3"] { background: var(--score-3-soft); }
.eval-table td.score-cell[data-score="na"] { background: var(--score-na-soft); }
.indicator-i { font-size: 11.5px; color: var(--muted); margin-right: 4px; }
.indicator-tip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: var(--r-circle); border: none; background: var(--accent-soft); color: var(--accent); font-size: 10px; cursor: pointer; margin-left: 4px; padding: 0; vertical-align: middle; line-height: 1; }
.indicator-tip:hover { background: var(--accent); color: #fff; }

/* SegScore buttons */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.seg button { min-width: 34px; height: 30px; border: none; border-right: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: var(--font-ui); transition: background .1s; padding: 0 6px; }
.seg button:last-child { border-right: none; }
.seg button:hover:not([disabled]) { background: var(--surface-2); }
.seg button.na { font-size: 11px; font-weight: 600; color: var(--muted); min-width: 40px; }
.seg button[data-score="0"].on { background: var(--score-0); color: #fff; border-color: var(--score-0); }
.seg button[data-score="1"].on { background: var(--score-1); color: #fff; border-color: var(--score-1); }
.seg button[data-score="2"].on { background: var(--score-2); color: #fff; border-color: var(--score-2); }
.seg button[data-score="3"].on { background: var(--score-3); color: #fff; border-color: var(--score-3); }
.seg button[data-score="na"].on { background: var(--score-na); color: #fff; border-color: var(--score-na); }
.seg button[disabled] { opacity: .6; cursor: not-allowed; }

/* Score legend */
.score-legend { display: flex; flex-direction: column; gap: 4px; }
.sw { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.sw .dot { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; border-radius: 3px; font-size: 10.5px; font-weight: 700; color: #fff; padding: 0 3px; }

/* Area note */
.area-note { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; background: var(--warn-soft); border: 1px solid #f5c88a; border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; color: var(--warn); }
.area-note-tag { font-weight: 700; text-transform: uppercase; font-size: 11px; flex-shrink: 0; letter-spacing: .04em; }

/* ============== AMBIENTE ============== */
.amb-progress { height: 4px; background: var(--line); border-radius: 2px; margin: 12px 0 16px; overflow: hidden; }
.amb-progress span { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
.amb-counter { font-size: 13px; text-align: right; line-height: 1.3; }
.amb-counter b { font-size: 26px; font-weight: 700; color: var(--ink); }
.amb-counter span { color: var(--muted); }
.amb-counter em { font-style: normal; font-size: 12px; color: var(--muted); display: block; }
.amb-checklist { list-style: none; padding: 0; margin: 0; }
.amb-li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 6px; transition: border-color .1s; }
.amb-li.on { border-color: var(--accent-soft); background: var(--accent-faint); }
.amb-n { font-size: 11.5px; font-weight: 700; color: var(--muted); font-family: var(--font-mono); min-width: 26px; flex-shrink: 0; }
.amb-text { flex: 1; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.amb-seg { margin-left: auto; flex-shrink: 0; }
.amb-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.amb-leg-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.amb-leg-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; border-radius: 3px; font-size: 10.5px; font-weight: 700; color: #fff; padding: 0 3px; }
.amb-leg-dot[data-score="0"] { background: var(--score-0); }
.amb-leg-dot[data-score="1"] { background: var(--score-1); }
.amb-leg-dot[data-score="2"] { background: var(--score-2); }
.amb-leg-dot[data-score="3"] { background: var(--score-3); }
.amb-leg-dot[data-score="na"] { background: var(--score-na); }
.amb-empty { padding: 24px; text-align: center; color: var(--muted); font-style: italic; }

@media (max-width: 1024px) {
  .scheda-shell { grid-template-columns: 1fr; }
  .scheda-side { position: static; }
  .eval-table { font-size: 12.5px; }
  .seg button { min-width: 28px; height: 28px; font-size: 11.5px; }
}
@media (max-width: 768px) {
  .grid-2,.grid-3 { grid-template-columns: 1fr; }
  .span-2,.span-3 { grid-column: span 1; }
  .eval-meta { flex-direction: column; }
}

/* ============================================================
   SPRINT 5 — GRAFICO / CONFRONTO / FINALE
   ============================================================ */

/* KPI row (shared with schede list) */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r-md); padding: 18px 20px; }
.kpi-card .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-card .val { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.1; margin: 6px 0 4px; color: var(--ink); }
.kpi-card .val em { font-size: 18px; color: var(--muted); font-style: normal; font-weight: 400; }
.kpi-card .delta { font-size: 13px; color: var(--accent); font-weight: 600; }
.kpi-card .delta.ok { color: var(--ok); }

/* Charts grid */
.charts-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; }
.chart-card.full { grid-column: span 2; }
.chart-card h4 { margin: 0 0 14px; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); }
.chart-card .sub { font-size: 13px; color: var(--muted); margin: -8px 0 14px; line-height: 1.5; }
.legend-row { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; margin-top: 12px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
.legend-row i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; }

/* Histogram */
.hist-area { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.hist-area:first-of-type { margin-top: 8px; padding-top: 0; border-top: none; }
.hist-area .hist-title { margin: 0 0 6px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.hist-legend { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 14px; padding: 10px 12px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.hist-legend .hl-item { display: inline-flex; align-items: center; gap: 7px; }
.hist-legend .hl-item i { width: 14px; height: 14px; border-radius: 2px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }

/* ---- Confronto ---- */
.dual-legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); }
.dual-legend span { display: inline-flex; align-items: center; gap: 4px; }
.filters-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.compare-area { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.compare-area-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.compare-area-h h4 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }
.compare-area-h .muted { color: var(--muted); font-size: 12.5px; }

.compare-tbl th, .compare-tbl td { font-size: 13px; vertical-align: middle; }
.compare-tbl tbody tr:hover { background: var(--surface-2); }
.compare-tbl .cmp-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center; }
.compare-tbl .cmp-ind { color: var(--ink); line-height: 1.4; padding-right: 8px; }
.compare-tbl .muted { color: var(--muted); font-style: normal; }

.cmp-row.cmp-agree td { background: rgba(0,128,85,.04); }
.cmp-row.cmp-agree:hover td { background: rgba(0,128,85,.08); }
.cmp-row.cmp-disagree-small td { background: rgba(184,131,0,.06); }
.cmp-row.cmp-disagree-small:hover td { background: rgba(184,131,0,.12); }
.cmp-row.cmp-disagree-big td { background: rgba(217,54,79,.07); }
.cmp-row.cmp-disagree-big:hover td { background: rgba(217,54,79,.14); }
.cmp-row.cmp-disagree-big .cmp-ind { font-weight: 600; }
.cmp-row.cmp-one-only td { background: rgba(138,132,116,.06); }
.cmp-row.cmp-missing td { color: var(--muted); }

.score-badge { display: inline-grid; place-items: center; width: 36px; height: 28px; border-radius: var(--r-sm); font-family: var(--font-display); font-size: 14px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.score-badge[data-score="0"] { background: var(--score-0); color: #fff; border-color: var(--score-0); }
.score-badge[data-score="1"] { background: var(--score-1); color: #fff; border-color: var(--score-1); }
.score-badge[data-score="2"] { background: var(--score-2); color: #fff; border-color: var(--score-2); }
.score-badge[data-score="3"] { background: var(--score-3); color: #fff; border-color: var(--score-3); }
.score-badge[data-score="na"] { background: var(--score-na-soft); color: var(--score-na-ink); border-color: var(--score-na); font-size: 11px; }
.score-badge.empty { background: transparent; border-style: dashed; color: var(--muted); }

.kind-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-ui); white-space: nowrap; }
.kind-agree { background: var(--ok-soft); color: var(--ok); }
.kind-small { background: var(--score-2-soft); color: var(--score-2-ink); }
.kind-big   { background: var(--score-0-soft); color: var(--score-0-ink); }
.kind-one   { background: var(--surface-3); color: var(--ink-2); }
.kind-miss  { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }

.delta-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; font-family: var(--font-mono); }
.delta-pill.ok   { background: var(--ok-soft); color: var(--ok); }
.delta-pill.warn { background: var(--score-2-soft); color: var(--score-2-ink); }
.delta-pill.bad  { background: var(--score-0-soft); color: var(--score-0-ink); }

.note-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.note-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.note-cell p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.np-h { font-size: 11.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.np-h em { font-style: normal; text-transform: capitalize; margin-left: 4px; }
.note-lavoratore { border-color: var(--score-1-soft); }
.note-tutor { border-color: var(--accent-soft); }

/* ---- Finale ---- */
.finale-wrap { display: grid; grid-template-columns: 296px 1fr; gap: 28px; }
.finale-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; align-self: start; }
.finale-side .section-card { padding: 20px; }
.finale-side h4 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 4px 0; color: var(--ink); }

.radio-row { display: flex; flex-direction: column; gap: 6px; }
.cb-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); padding: 5px 0; cursor: pointer; }
.cb { width: 18px; height: 18px; border-radius: var(--r-sm); border: 2px solid var(--line-strong); background: var(--surface); display: inline-grid; place-items: center; flex-shrink: 0; cursor: pointer; transition: background .12s, border-color .12s; }
.cb.on { background: var(--accent); border-color: var(--accent); }
.cb.on::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.cb-row:hover .cb:not(.on) { border-color: var(--accent); }

/* Docpaper */
.docpaper { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 42px 50px; box-shadow: var(--shadow-1); font-family: 'Times New Roman', Times, serif; font-size: 13px; color: var(--ink); line-height: 1.55; max-width: 760px; }
.docpaper .doch1 { font-family: 'Times New Roman', serif; font-size: 22px; font-weight: 700; text-align: center; margin: 0; color: #000; }
.docpaper .docsub { text-align: center; font-style: italic; color: var(--ink-2); margin: 0 0 24px; font-size: 13.5px; }
.docpaper h5 { font-family: 'Times New Roman', serif; font-size: 14.5px; margin: 22px 0 10px; border-bottom: 1.5px solid #000; padding-bottom: 4px; font-weight: 700; color: #000; }
.doctbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0 14px; }
.doctbl th, .doctbl td { border: 1px solid #000; padding: 7px 9px; text-align: left; vertical-align: top; }
.doctbl th { background: #e9ecef; width: 22%; font-weight: 700; font-size: 11.5px; }
.doctbl.small td, .doctbl.small th { padding: 5px 7px; font-size: 11.5px; text-align: center; }
.doctbl.small td:first-child, .doctbl.small th:first-child { text-align: left; }
.doc-check { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid #000; margin-right: 4px; }
.doc-check.on::after { content: "■"; font-size: 10px; line-height: 1; }
.doc-signs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-top: 32px; font-size: 12px; }
.doc-signs span { display: block; text-align: center; }
.doc-signs i { display: block; height: 40px; border-bottom: 1px solid #000; margin-top: 18px; }

.scala-tbl .scala-cell { transition: background .12s; }
.scala-tbl.editable .scala-cell.can-edit { cursor: pointer; }
.scala-tbl.editable .scala-cell.can-edit:hover { background: var(--accent-faint); }
.scala-tbl .scala-cell.on { background: color-mix(in srgb, var(--accent-faint) 60%, transparent); }
.scala-tbl .scala-cell.can-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.scala-tbl.editable .scala-cell.can-edit:hover .doc-check { border-color: var(--accent); }
.scala-tbl.editable .scala-cell.can-edit:hover .doc-check::after { content: "■"; font-size: 10px; color: var(--accent); opacity: .35; }
.scala-tbl.editable .scala-cell.on:hover .doc-check::after { opacity: 1; color: #000; }

@media (max-width: 1100px) {
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.full { grid-column: span 1; }
  .finale-wrap { grid-template-columns: 1fr; }
  .finale-side { position: static; }
  .docpaper { padding: 24px 20px; }
}
@media print {
  .sidebar, .topbar2, .finale-side, .scheda-side { display: none !important; }
  .finale-wrap { grid-template-columns: 1fr; }
  .docpaper { box-shadow: none; border: none; max-width: 100%; padding: 0; }
}
