/* ===== In-PACT — stile self-contained ===== */
@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/outfit-400.woff2") format("woff2");
}
@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/outfit-600.woff2") format("woff2");
}
@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/outfit-700.woff2") format("woff2");
}
@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}
@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/source-sans-3-700.woff2") format("woff2");
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --primary: #1E2761;
    --primary-light: #3a4490;
    --accent: #00A896;
    --accent-strong: #028090;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    --shadow: 0 2px 8px rgba(30,39,97,.08);
    --font-display: "Outfit", "Segoe UI", sans-serif;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
    --space: 8px;
    --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(0,168,150,.07), transparent 55%),
        radial-gradient(800px 380px at 100% 0%, rgba(30,39,97,.06), transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main.main { flex: 1; padding: 28px 0 56px; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--primary);
    color: white;
    padding: 10px 14px;
    z-index: 1000;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ===== Topbar ===== */
.topbar {
    background: linear-gradient(120deg, #1E2761 0%, #2a3480 55%, #1E2761 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(30,39,97,.18);
}
.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.brand {
    color: white; text-decoration: none;
    display: flex; flex-direction: column;
}
.brand-mark {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700; letter-spacing: .5px;
}
.brand-sub  { font-size: 11px; opacity: .8; }

.topnav {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.topnav a {
    color: white; text-decoration: none;
    padding: 8px 12px; border-radius: 8px;
    font-size: 14px;
    transition: background .15s;
}
.topnav a:hover { background: rgba(255,255,255,.12); }
.topnav .logout { opacity: .9; }
.user-chip {
    font-size: 13px; padding: 4px 10px;
    background: rgba(255,255,255,.15); border-radius: 999px;
}

/* ===== Footer ===== */
.footer {
    background: rgba(255,255,255,.8);
    border-top: 1px solid rgba(30,39,97,.06);
    padding: 18px 0;
    color: var(--muted);
    text-align: center;
    backdrop-filter: blur(6px);
}

/* ===== Flash / toast ===== */
.toast-stack {
    position: sticky;
    top: 12px;
    z-index: 40;
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.flash {
    padding: 12px 16px; border-radius: 8px;
    border-left: 4px solid;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    animation: toast-in .22s ease-out;
}
.toast.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s, transform .25s;
}
.toast-close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.flash-success { border-color: var(--success); }
.flash-danger  { border-color: var(--danger); }
.flash-warning { border-color: var(--warning); }
.flash-info    { border-color: var(--info); }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

/* ===== Cards & headings ===== */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }
h1 { font-size: clamp(1.6rem, 2vw + 1rem, 2rem); margin: 0 0 8px; color: var(--primary); }
h2 { font-size: 1.35rem; margin: 24px 0 12px; color: var(--primary); }
h3 { font-size: 1.05rem; margin: 18px 0 8px; color: var(--primary-light); }
p  { margin: 8px 0; }
.lead { color: var(--muted); margin-bottom: 18px; max-width: 46rem; }
.page-header { margin-bottom: 22px; }
.page-kicker {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}
.page-kicker a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}
.page-kicker a:hover { text-decoration: underline; }
.ok-mark { color: var(--success); }
.hint-block { font-size: 13px; line-height: 1.45; }
.radio-line {
    display: flex; align-items: center; gap: 8px;
    font-weight: 400; margin: 10px 0;
}
.weight-row { margin: 6px 0 0 26px; }
.empty-state {
    text-align: center;
    padding: 36px 24px;
    border: 1px dashed var(--border);
    background:
        linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,247,251,.95));
}
.empty-state p {
    max-width: 36rem;
    margin: 0 auto 14px;
    color: var(--muted);
}
.peer-list { margin: 0; }
.peer-list .peer-row,
.peer-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; flex-wrap: wrap;
    padding: 14px 4px;
}
.peer-list li:first-child { padding-top: 4px; }
.path-card { margin-top: 20px; }

.card {
    background: var(--surface);
    border: 1px solid rgba(30,39,97,.06);
    border-radius: 16px;
    padding: 22px 22px 20px;
    box-shadow: 0 8px 24px rgba(30,39,97,.06);
    margin-bottom: 18px;
}
.card-tight { padding: 16px 18px; }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}
.stat {
    background: var(--surface);
    border: 1px solid rgba(30,39,97,.06);
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 24px rgba(30,39,97,.05);
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}
.stat-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 6px;
    letter-spacing: -.02em;
}
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.shortcut-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.shortcut-list a:hover { text-decoration: underline; }

/* ===== Forms ===== */
form { margin: 0; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=range]),
select, textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 14px;
    background: white; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
input[type=date], input[type=datetime-local], input[type=time] { min-height: 42px; }
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(58,68,144,.15);
}
textarea { min-height: 80px; resize: vertical; }
small.hint { color: var(--muted); font-size: 12px; }

/* Campo con errore di validazione (es. form nuova organizzazione) */
input.input-error:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=range]),
select.input-error, textarea.input-error {
    border-color: var(--danger);
    background: #fff7f7;
}
input.input-error:focus, select.input-error:focus, textarea.input-error:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}
small.field-error {
    display: block;
    margin-top: 4px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}

button, .btn {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 10px; border: none;
    background: var(--primary); color: white;
    font-weight: 600; font-size: 14px;
    cursor: pointer; text-decoration: none;
    transition: background .15s, transform .12s, box-shadow .15s;
    box-shadow: 0 6px 14px rgba(30,39,97,.18);
}
button:hover, .btn:hover {
    background: var(--primary-light);
    box-shadow: 0 8px 18px rgba(30,39,97,.22);
}
button:active, .btn:active { transform: translateY(1px); }
button:disabled, .btn:disabled {
    opacity: .55; cursor: not-allowed; box-shadow: none;
}
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn-ghost:hover {
    background: var(--bg);
    box-shadow: none;
}
.btn-accent { background: var(--accent); box-shadow: 0 6px 14px rgba(0,168,150,.25); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-danger { background: var(--danger); box-shadow: 0 6px 14px rgba(220,38,38,.2); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* ===== Tables ===== */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(30,39,97,.05);
    margin: 12px 0;
}
table {
    width: 100%; border-collapse: collapse;
    background: var(--surface); border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30,39,97,.05);
    margin: 12px 0;
    border: 1px solid rgba(30,39,97,.06);
}
.table-wrap table { margin: 0; box-shadow: none; border: none; }
th, td { text-align: left; padding: 12px 14px; font-size: 14px; }
th {
    background: #f3f5fb; color: var(--primary);
    font-weight: 700; border-bottom: 1px solid var(--border);
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8f9ff; }

.badge {
    display: inline-block;
    padding: 2px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
    background: var(--bg); color: var(--muted);
}
.badge-ok      { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-warn    { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* ===== Accesso (login / primo cambio password) ===== */
body.page-auth {
    background:
        radial-gradient(1100px 520px at 50% -8%, rgba(0,168,150,.16), transparent 58%),
        radial-gradient(900px 480px at 100% 110%, rgba(30,39,97,.12), transparent 52%),
        radial-gradient(700px 360px at 0% 100%, rgba(30,39,97,.06), transparent 45%),
        var(--bg);
}
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    gap: 12px;
}
.auth-flashes {
    width: 100%;
    max-width: 440px;
}
.auth-hero {
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(30,39,97,.08);
}
.auth-brand {
    margin: 0;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -.02em;
    text-transform: none;
    color: var(--primary);
    line-height: 1.1;
}
.auth-tagline {
    margin: 6px 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-strong);
}
.login-box {
    width: 100%;
    max-width: 440px;
    margin: 0;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(30,39,97,.08);
    border-radius: 20px;
    padding: 34px 30px 28px;
    box-shadow: 0 18px 48px rgba(30,39,97,.1);
}
.login-box h1 {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 650;
    margin: 0 0 8px;
    color: var(--primary);
}
.login-box .sub {
    text-align: center;
    color: var(--muted);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}
.login-box label:first-of-type { margin-top: 4px; }
.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
    margin-bottom: 2px;
    border-radius: 10px;
    padding: 12px 14px;
}
.btn-block { width: 100%; }
.auth-actions { margin-top: 24px; }
.auth-actions .btn-block {
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 15px;
}
.auth-foot {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.auth-foot a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }
.auth-credit {
    margin: 14px 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .02em;
}
.auth-shell-wide .legal-box {
    max-width: 720px;
}
.legal-box h1 { margin-bottom: 6px; }
.legal-body {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text);
}
.legal-body h2 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin: 22px 0 8px;
    color: var(--primary);
}
.legal-body p { margin: 0 0 10px; }
.legal-body ul {
    margin: 0 0 12px;
    padding-left: 1.2em;
}
.legal-body li { margin-bottom: 4px; }
.legal-body code {
    font-size: 12.5px;
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
}
.legal-note {
    margin-top: 18px !important;
    font-size: 12.5px;
    color: var(--muted);
}
.footer a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer a:hover { color: var(--primary); }

/* ===== Hub scelta ruolo operativo ===== */
.hub {
    max-width: 860px;
    margin: 12px auto 0;
}
.hub-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-strong);
}
.hub-lead { margin-bottom: 28px; font-size: 1.05rem; }
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.hub-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 22px 22px 26px;
    background: var(--surface);
    border: 1px solid rgba(30,39,97,.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(30,39,97,.06);
    text-decoration: none;
    color: var(--text);
    transition: border-color .18s, transform .18s, box-shadow .18s;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}
.hub-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}
.hub-card:hover {
    border-color: rgba(30,39,97,.18);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(30,39,97,.1);
}
.hub-card-role {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent-strong);
}
.hub-card-title {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    letter-spacing: -.02em;
}
.hub-card-text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
}
.hub-card-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
    font-weight: 600;
}
.hub-card-meta-action { color: var(--accent-strong); }
body.page-hub .main { padding-top: 40px; }

/* ===== Charts wrapper ===== */
.chart-wrap {
    background: var(--surface);
    border: 1px solid rgba(30,39,97,.06);
    border-radius: 16px;
    padding: 18px 18px 12px;
    box-shadow: 0 8px 24px rgba(30,39,97,.05);
    margin-bottom: 18px;
}
.chart-wrap canvas { max-width: 100%; }

/* ===== Two-column / responsive ===== */
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col { flex: 1; min-width: 280px; }

/* ===== Util ===== */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

ul.clean { list-style: none; padding-left: 0; }
ul.clean li { padding: 6px 0; border-bottom: 1px solid var(--border); }
ul.clean li:last-child { border-bottom: none; }

/* ===== Questionario rev. 2026: scale BARS e frequenza ===== */
.variable-block {
    margin: 18px 0 8px;
    padding-top: 8px;
}
.variable-block + .variable-block { border-top: 1px solid var(--border); }
.item-block { margin: 12px 0 22px; }
.item-title { font-weight: 600; margin: 8px 0 10px; }

/* BARS: 6 card selezionabili con descrizione comportamentale */
.bars-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}
.bars-option { margin: 0; cursor: pointer; display: block; font-weight: 400; position: relative; }
/* Non usare display:none: con required il browser blocca l'invio senza messaggio. */
.bars-option input[type=radio] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.bars-card {
    display: flex; flex-direction: column; gap: 6px;
    height: 100%;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: white;
    transition: all .12s;
    font-size: 12.5px; line-height: 1.4;
    color: var(--text);
}
.bars-option:hover .bars-card { border-color: var(--primary-light); }
.bars-option input[type=radio]:checked + .bars-card {
    border-color: var(--primary);
    background: #eef0fb;
    box-shadow: 0 0 0 2px rgba(30,39,97,.15);
}
.bars-score {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--primary);
    font-weight: 700; font-size: 13px;
}
.bars-option input[type=radio]:checked + .bars-card .bars-score {
    background: var(--primary); color: white;
}
.bars-text { color: var(--muted); }
.bars-option input[type=radio]:checked + .bars-card .bars-text { color: var(--text); }

/* Scala di frequenza per soft-skill */
.freq-scale { display: flex; gap: 6px; flex-wrap: wrap; }
.freq-option { margin: 0; cursor: pointer; font-weight: 400; position: relative; }
.freq-option input[type=radio] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.item-block.is-incomplete {
    outline: 2px solid var(--danger);
    outline-offset: 6px;
    border-radius: 8px;
}
.freq-pill {
    display: inline-block;
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
    background: white;
    transition: all .12s;
}
.freq-option:hover .freq-pill { border-color: var(--primary-light); color: var(--primary); }
.freq-option input[type=radio]:checked + .freq-pill {
    background: var(--primary); border-color: var(--primary); color: white;
}
.freq-pill strong { margin-right: 4px; }

/* Tabella confronto: delta */
.delta-pos { color: var(--success); font-weight: 700; }
.delta-neg { color: var(--danger); font-weight: 700; }
.delta-zero { color: var(--muted); }

/* Mostra/nascondi password */
.pw-field { display: flex; gap: 8px; align-items: center; }
.pw-field input { flex: 1; }
.pw-toggle {
    padding: 6px 10px; font-size: 12px; white-space: nowrap;
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; color: var(--muted);
}
.pw-toggle:hover { color: var(--primary); border-color: var(--primary-light); }
.change-pw { opacity: .85; }

/* ===== Questionario scroll ===== */
.q-shell { max-width: 820px; margin: 0 auto; padding-bottom: 110px; }
.q-sticky-head {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(245,247,251,.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(30,39,97,.08);
    margin: 0 -4px 10px;
    padding: 12px 4px 14px;
    box-shadow: 0 8px 20px rgba(30,39,97,.04);
}
.q-sticky-inner { display: grid; gap: 10px; }
.q-sticky-title h1 {
    font-size: 1.35rem;
    margin: 0;
}
.q-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--accent-strong);
}
.q-intro { margin: 8px 0 20px; }
.q-progress-track {
    height: 8px;
    background: #e8ebf5;
    border-radius: 999px;
    overflow: hidden;
}
.q-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    border-radius: 999px;
    transition: width .25s ease;
}
.q-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}
.q-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.q-sec-link {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
}
.q-sec-link.is-active {
    color: var(--primary);
    border-color: var(--primary);
    background: #eef0fb;
}
.q-sec-link.is-complete {
    color: var(--accent-strong);
    border-color: var(--accent);
}
.q-section {
    margin: 0 0 32px;
    padding: 18px 18px 10px;
    scroll-margin-top: 160px;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(30,39,97,.06);
    border-radius: 18px;
}
.q-section-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.q-section-num {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-strong);
    margin-bottom: 4px;
}
.q-section-head h2 {
    margin: 0 0 4px;
    font-size: 1.4rem;
}
.q-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
.q-var {
    background: var(--surface);
    border: 1px solid rgba(30,39,97,.08);
    border-radius: 16px;
    padding: 18px 18px 10px;
    margin-bottom: 14px;
    box-shadow: 0 6px 18px rgba(30,39,97,.04);
}
.q-var h3 { margin-top: 0; }
.q-choose { color: var(--muted); font-weight: 500; }
.bars-scroll {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.bars-scroll .bars-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
}
.bars-option:hover .bars-card {
    transform: translateY(-1px);
}
.bars-scroll .bars-text {
    font-size: 14px;
    line-height: 1.45;
}
.freq-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.freq-scroll .freq-pill {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}
.freq-scroll .freq-pill strong {
    display: inline-flex;
    width: 26px; height: 26px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg);
    margin-right: 0;
}
.freq-option input[type=radio]:checked + .freq-pill strong {
    background: rgba(255,255,255,.22);
    color: white;
}
.q-item-scroll.is-incomplete {
    outline: 2px solid var(--danger);
    outline-offset: 6px;
    border-radius: 10px;
}
.q-nav {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 14px 16px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(30,39,97,.1);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(30,39,97,.08);
    backdrop-filter: blur(10px);
    z-index: 20;
}
.q-nav-spacer { flex: 1; }
.q-nav-hint {
    font-size: 13px;
    color: var(--muted);
}
body.page-questionnaire .footer { display: none; }

/* ===== Wizard admin ===== */
.wizard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0 24px;
}
.wizard-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 16px;
    background: var(--surface);
    border: 1px solid rgba(30,39,97,.08);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 8px 20px rgba(30,39,97,.05);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.wizard-step:hover {
    border-color: rgba(30,39,97,.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(30,39,97,.08);
}
.wizard-step.is-done { border-color: rgba(0,168,150,.45); }
.wizard-num {
    flex: 0 0 auto;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg);
    color: var(--primary);
    font-weight: 700; font-size: 13px;
}
.wizard-step.is-done .wizard-num {
    background: var(--accent); color: white;
}
.wizard-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wizard-body strong {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--primary);
}
.wizard-body small { color: var(--muted); font-size: 12px; line-height: 1.35; }

@media (max-width: 900px) {
    .wizard { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .container { padding: 0 14px; }
    main.main { padding: 18px 0 72px; }
    .topbar-inner {
        padding: 12px 14px;
        align-items: flex-start;
    }
    .topnav {
        width: 100%;
        gap: 6px;
    }
    .topnav a, .topnav .user-chip {
        font-size: 13px;
        padding: 8px 10px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
    .brand-sub { display: none; }
    .user-chip {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    h1 { font-size: 1.45rem; line-height: 1.25; }
    .lead { font-size: 14px; }
    .card { padding: 16px; }
    .cards-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 26px; }
    .col { min-width: 100%; }
    .table-wrap, table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table thead, table tbody, table tr {
        /* keep structure; scroll container is table/table-wrap */
    }
    th, td {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    td .btn-sm, td button {
        white-space: nowrap;
    }
    .peer-row { align-items: flex-start; }
    .invite-url { font-size: 11px; }
    .login-box, .legal-box { padding: 22px 18px 20px; }
    .auth-shell { padding: 20px 12px 28px; }
    .pw-field { flex-wrap: wrap; }
    .pw-toggle { min-height: 44px; }
    /* Evita zoom automatico iOS sui campi */
    input[type=text], input[type=password], input[type=email],
    input[type=number], input[type=date], select, textarea {
        font-size: 16px;
    }
    .btn-row { gap: 10px; }
    button, .btn, .btn-sm {
        min-height: 44px;
        touch-action: manipulation;
    }
    .btn-sm { padding: 8px 12px; font-size: 13px; }
    .panel-assign-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }
    .panel-assign-actions form { width: 100%; }
    .panel-assign-actions button { width: 100%; }
    .freq-scale {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .freq-pill {
        display: flex;
        width: 100%;
        justify-content: center;
        padding: 12px 10px;
        border-radius: 12px;
        text-align: center;
    }
    .bars-options { grid-template-columns: 1fr; }
    .bars-card { padding: 12px; font-size: 13.5px; }
    .q-section-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .q-sec-link { flex: 0 0 auto; }
}
@media (max-width: 600px) {
    .wizard { grid-template-columns: 1fr; }
    .q-sticky-title h1 { font-size: 1.2rem; }
    .q-nav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        margin: 0;
        border-radius: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        z-index: 30;
    }
    .q-nav-hint { display: none; }
    .q-cancel { display: none; }
    .hub-grid { grid-template-columns: 1fr; }
    .hub-card { min-height: 140px; }
    body.page-questionnaire .main {
        padding-bottom: 96px;
    }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .toast, .q-progress-bar { animation: none; transition: none; }
}

/* ===== Invite activation ===== */
.invite-summary {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.invite-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.invite-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.invite-url {
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    font-size: 12px;
    line-height: 1.4;
}
.invite-link-box {
    margin: 8px 0 12px;
    padding: 10px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px dashed var(--border);
}

/* ===== Loading overlay (operazioni lunghe: import massivo, ecc.) ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.loading-overlay.is-active { display: flex; }
.loading-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .30);
    padding: 28px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: loading-pop .18s ease-out;
}
.loading-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.loading-sub {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}
.spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 16px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loading-pop {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 1.6s; }
    .loading-card { animation: none; }
}
.loading-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* ===== Campo di caricamento file (drop zone) ===== */
.file-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 26px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.file-drop:hover { border-color: var(--accent); background: var(--surface); }
.file-drop:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, .25);
}
.file-drop.is-dragover {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.file-drop.has-file { border-style: solid; border-color: var(--accent); }
.file-drop-icon { color: var(--accent); margin-bottom: 4px; }
.file-drop-title { font-weight: 600; color: var(--primary); }
.file-drop-hint { font-size: 12px; color: var(--muted); }
/* input nativo nascosto ma accessibile (resta nel tab order) */
.file-native {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.file-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--surface);
}
.file-selected-info { display: flex; flex-direction: column; min-width: 0; }
.file-selected-name { font-size: 14px; font-weight: 600; word-break: break-all; }
.file-selected-size { font-size: 12px; color: var(--muted); }
.file-error { margin: 8px 0 0; font-size: 13px; color: var(--danger); }

/* ===== Pagina profilo ===== */
.profile-list {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: 7px 16px;
    margin: 0;
}
.profile-list dt { color: var(--muted); font-size: 13px; }
.profile-list dd { margin: 0; font-weight: 500; word-break: break-word; }
@media (max-width: 600px) {
    .profile-list { grid-template-columns: 1fr; gap: 2px 0; }
    .profile-list dt { margin-top: 8px; }
}

/* Intestazione profilo */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: var(--shadow);
}
.profile-ident h1 { margin: 0 0 6px; font-size: 24px; }
.profile-sub { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Schede (tab) */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
}
.tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 16px;
    font: inherit;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--accent); }
.tab:focus-visible {
    outline: 3px solid rgba(0, 168, 150, .35);
    outline-offset: -3px;
    border-radius: 8px 8px 0 0;
}
.tab-panel { animation: profile-fade .18s ease-out; }
.tab-panel[hidden] { display: none; }
@keyframes profile-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .tab-panel { animation: none; }
}

/* ===== Selettore lingua (topbar) ===== */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px;
}
.lang-switch a {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.3;
}
.lang-switch a:hover { color: var(--primary); }
.lang-switch a.is-active { background: var(--primary); color: #fff; }

/* ===== Selettore lingua (menu a tendina) ===== */
.lang-select { position: relative; display: inline-block; margin-left: 6px; }
.lang-select-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid var(--border);
    border-radius: 999px; padding: 5px 10px; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
    line-height: 1;
}
.lang-select-btn:hover { color: var(--primary); border-color: var(--primary-light); background: #fff; }
.lang-select-btn:focus-visible { outline: 3px solid rgba(0,168,150,.35); outline-offset: 2px; }
.lang-globe { flex: 0 0 auto; }
.lang-chevron { transition: transform .18s ease; }
.lang-select.is-open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
    min-width: 190px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15,23,42,.16);
    padding: 6px; animation: lang-pop .14s ease-out;
}
.lang-menu[hidden] { display: none; }
.lang-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px; border-radius: 8px;
    text-decoration: none; color: var(--text); font-size: 14px;
}
.lang-item:hover { background: var(--bg); }
.lang-item .lang-name { flex: 1; }
.lang-item .lang-code { color: var(--muted); font-size: 12px; font-weight: 600; }
.lang-item .lang-check { color: var(--accent); font-weight: 700; visibility: hidden; }
.lang-item.is-active { background: rgba(0,168,150,.08); }
.lang-item.is-active .lang-check { visibility: visible; }
.lang-item.is-active .lang-name { font-weight: 600; color: var(--primary); }
@keyframes lang-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .lang-menu { animation: none; }
    .lang-chevron { transition: none; }
}
.auth-lang { display: flex; justify-content: center; margin: 6px 0 12px; }

/* Bandierine nel selettore lingua */
.lang-flag {
    display: inline-block; width: 20px; height: 14px;
    border-radius: 3px; overflow: hidden; flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.14);
    vertical-align: middle; line-height: 0;
}
.lang-flag svg { display: block; width: 100%; height: 100%; }
.lang-item .lang-flag { width: 22px; height: 15px; border-radius: 4px; }
.lang-select-btn .lang-flag { margin-right: -1px; }

/* Leggibilità selettore lingua */
.lang-select-btn { font-size: 14px; color: var(--text); padding: 6px 12px; gap: 8px; }
.lang-select-btn .lang-current {
    font-weight: 700; font-size: 14px; color: var(--primary);
    letter-spacing: .01em;
}
.lang-item .lang-name { font-weight: 600; }

/* Selettore lingua: testo bianco su sfondo blu (leggibilità) */
.lang-select-btn {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.lang-select-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #ffffff;
}
.lang-select-btn .lang-current,
.lang-select-btn .lang-chevron { color: #ffffff; }
.lang-select-btn .lang-flag { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

/* ===== Persone e report: leggibilità "chi valuta chi" ===== */
.people-table td { vertical-align: top; }
.person-chip {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 4px 8px; margin: 0 0 4px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; font-size: 13px; line-height: 1.3;
}
.person-chip .badge { font-size: 10.5px; white-space: nowrap; }
.progress-mini {
    width: 100%; max-width: 130px; height: 7px;
    background: var(--border); border-radius: 999px; overflow: hidden;
    margin-bottom: 4px;
}
.progress-mini > span { display: block; height: 100%; background: var(--accent); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Dimensioni più leggibili (era troppo piccolo) ===== */
body { font-size: 17px; }
button, .btn { font-size: 15px; }
th, td { font-size: 15.5px; padding: 14px 16px; }
th { font-size: 12.5px; }
.badge { font-size: 12px; padding: 3px 11px; }
.btn-sm { font-size: 13px; padding: 8px 14px; }
small.hint, .stat-sub, .hint-block { font-size: 13.5px; }
.person-chip { font-size: 14.5px; padding: 7px 10px; gap: 10px; }
.person-chip .badge { font-size: 12px; }
.progress-mini { height: 9px; max-width: 170px; }
.lead { font-size: 17px; }

/* ===== Persone e report: layout migliorato ===== */
.people-header { margin-bottom: 6px; }
.people-hint { margin: 6px 0 0; font-size: 13.5px; }
.people-reminder { font-size: 13.5px; margin: 10px 0 18px; }
.people-stats { margin-bottom: 18px; }
.people-toolbar { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.people-search {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 9px 14px; min-width: 260px;
    color: var(--muted);
}
.people-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,168,150,.18); }
.people-search input {
    border: 0; outline: 0; background: transparent; font: inherit;
    font-size: 15px; width: 100%; color: var(--text);
}
.people-table thead th { position: sticky; top: 0; z-index: 2; }
.people-table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s ease; }
.people-table tbody tr:nth-child(even) { background: rgba(244,246,251,.55); }
.people-table tbody tr:hover { background: rgba(0,168,150,.06); }
.people-table .col-rel { background: rgba(30,39,97,.025); }
.people-table tbody tr:hover .col-rel { background: rgba(0,168,150,.05); }
.person-name { font-weight: 700; color: var(--primary); font-size: 15.5px; }
@media (max-width: 700px) {
    .people-toolbar { justify-content: stretch; }
    .people-search { width: 100%; }
}

/* Layout: sfrutta meglio lo spazio orizzontale */
.container { max-width: 1320px; }
.people-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin: 0 0 10px;
}
.people-filter-wrap { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.people-filter {
    font: inherit; font-size: 15px; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); cursor: pointer;
}
.people-filter:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,168,150,.18); }

/* ===== Persone/report: schede su mobile ===== */
@media (max-width: 760px) {
    .people-table thead { display: none; }
    .people-table, .people-table tbody, .people-table tr, .people-table td {
        display: block; width: 100%;
    }
    .people-table { border: 0; box-shadow: none; background: transparent; border-radius: 0; }
    .people-table tbody tr {
        border: 1px solid var(--border); border-radius: 14px;
        margin: 0 0 12px; padding: 6px 2px; background: var(--surface);
        box-shadow: 0 6px 18px rgba(30,39,97,.05);
    }
    .people-table tbody tr:nth-child(even) { background: var(--surface); }
    .people-table td { border: 0; padding: 8px 14px; }
    .people-table td::before {
        content: attr(data-label);
        display: block; font-size: 11px; text-transform: uppercase;
        letter-spacing: .04em; color: var(--muted); margin-bottom: 4px;
    }
    .people-table .col-rel,
    .people-table tbody tr:hover .col-rel { background: transparent; }
    .row-actions { flex-wrap: wrap; }
    .people-toolbar { flex-direction: column; align-items: stretch; }
    .people-search { min-width: 0; width: 100%; }
    .people-filter-wrap { justify-content: space-between; }
    .people-filter { width: 100%; }
}

/* ===== Chi valuta chi: card persona compatta ed espandibile ===== */
.panel-card { padding: 0; overflow: hidden; }
.panel-card > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.panel-card > summary::-webkit-details-marker { display: none; }
.panel-card[open] > summary { border-bottom: 1px solid var(--border); }
.panel-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; }
.panel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-name { font-weight: 600; }
.panel-sub { color: var(--muted); font-size: 13px; }
.panel-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.panel-body { padding: 14px 18px 16px; }
.weight-bar { width: 110px; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.weight-bar > span { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.weight-bar.is-off > span { background: var(--warning); }
.panel-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.panel-add .field { display: flex; flex-direction: column; gap: 3px; }
.panel-add label { font-size: 12px; color: var(--muted); }
@media (max-width: 720px) {
    .panel-meta { justify-content: flex-start; }
    .panel-card > summary { flex-wrap: wrap; }
}

/* ===== Report multipli: righe compatte ===== */
.rep-row-toggle { cursor: pointer; }
.rep-detail > td { background: var(--bg); }
.rep-index { font-weight: 700; }

/* ============================================================
   UX/UI polish pass (secondo skill ux-ui)
   ============================================================ */

/* Selezione testo coerente col brand */
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

/* Link: leggibilità al passaggio */
a { text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Scorrimento morbido, rispettando chi preferisce meno animazioni */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .card, .stat { transition: box-shadow .15s ease, border-color .15s ease; }
    .card:hover { box-shadow: 0 12px 30px rgba(30,39,97,.09); }
    .hub-card:hover .hub-card-title::after { opacity: 1; }
}

/* Affordance: freccia sulle card principali */
.hub-card-title::after {
    content: " →"; color: var(--accent); opacity: 0;
    transition: opacity .18s ease; font-weight: 700;
}

/* Stato vuoto più chiaro e centrato */
.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    text-align: center; padding: 34px 20px;
}
.empty-state::before {
    content: "◍"; font-size: 26px; line-height: 1;
    color: var(--accent); opacity: .55;
}
.empty-state p { max-width: 48ch; margin: 0; }

/* Link "azione" con freccia (per CTA testuali) */
.link-cta { font-weight: 600; color: var(--primary); text-decoration: none; }
.link-cta::after { content: " →"; }
.link-cta:hover { color: var(--accent-strong); }

/* Toolbar filtri: spaziatura uniforme */
.people-toolbar { margin-bottom: 16px; }

/* Stampa pulita per i report HR */
@media print {
    .topbar, .app-nav, .people-toolbar, .btn-row, .skip-link,
    .toast-stack, button, .btn, .js-rep-toggle { display: none !important; }
    body { background: #fff; }
    .card, .table-wrap, table { box-shadow: none !important; border-color: #d8dce6 !important; }
    .table-wrap { overflow: visible !important; }
    .page-header { margin-bottom: 12px; }
    a[href]::after { content: ""; }
}

/* Intestazione tabella sticky nei report */
#rep-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }

/* ============================================================
   Restyling: REPORT e SETUP
   ============================================================ */
.hero-band {
    background: linear-gradient(135deg, var(--primary) 0%, #2b3a8f 100%);
    color: #fff; border-radius: 18px; padding: 24px 26px;
    box-shadow: 0 14px 34px rgba(30,39,97,.16); margin-bottom: 22px;
    display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.hero-band h1 { color: #fff; margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.hero-band .lead { color: rgba(255,255,255,.85); margin: 6px 0 0; font-size: 15px; }
.hero-band .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-band .btn-ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.hero-band .btn-ghost:hover { background: rgba(255,255,255,.22); }
.hero-band .btn { background: #fff; color: var(--primary); box-shadow: none; }
.hero-band .hero-pill { display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.16); border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:600; }

/* Setup: stepper più moderno */
.wizard-step { background: var(--surface); }

/* ============================================================
   Admin: Persone (card grid) e Utenti (tabella pulita)
   ============================================================ */
.person-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.person-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 16px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 12px;
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.person-card:hover { box-shadow: 0 14px 32px rgba(30,39,97,.1); border-color: rgba(30,39,97,.14); }
.person-card-top { display: flex; align-items: center; gap: 12px; }
.person-card-id { min-width: 0; }
.person-card-id .person-name { font-weight: 650; color: var(--primary); font-family: var(--font-display); }
.person-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.person-card-meta { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.person-card-meta .meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.chip-list { display: flex; gap: 6px; flex-wrap: wrap; }
.person-card .detail-panel { border-top: 1px dashed var(--border); padding-top: 10px; }

/* Utenti: barra strumenti + riga espandibile */
.admin-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.admin-toolbar .grow { flex: 1; min-width: 200px; }
.avatar-sm {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
    background: var(--primary); color: #fff; display: flex; align-items: center;
    justify-content: center; font-weight: 600; font-size: 13px;
}
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.user-edit { padding: 6px 2px; }

/* ===== Distinzione ruoli: Valutato / Valutatore ===== */
.role-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.role-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.role-tag.valutato { background: #dbeafe; color: #1e40af; }
.role-tag.valutatore { background: #dcfce7; color: #166534; }
.role-tag.auto { background: #e0e7ff; color: #3730a3; }
.role-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-row .text-muted { font-size: 12.5px; }

/* ===== Persone: card semplificata ===== */
.status-pill {
    margin-left: auto; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.status-pill.ok   { background: #dcfce7; color: #166534; }
.status-pill.warn { background: #fee2e2; color: #991b1b; }
.status-pill.info { background: #dbeafe; color: #1e40af; }
.person-progress { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.person-progress .prog { display: inline-flex; align-items: center; gap: 7px; }
.person-progress .prog .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.person-progress .prog .dot.ok { background: var(--success); }

/* ===== Persone: valutatori in grassetto + vista riga/colonna ===== */
.person-chip strong { font-weight: 650; }
.chip-list.is-col { flex-direction: column; align-items: flex-start; gap: 8px; }
.chip-list.is-col .person-chip { width: 100%; }
.layout-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.layout-toggle button {
    background: transparent; color: var(--muted); border: 0; box-shadow: none;
    padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.layout-toggle button.is-active { background: var(--primary); color: #fff; }
.layout-toggle button:hover:not(.is-active) { background: var(--bg); }

/* L'attributo [hidden] deve sempre vincere sui display delle classi
   (altrimenti griglie/card/tabelle restano visibili). */
[hidden] { display: none !important; }

/* Voce di menu attiva (dove sono) */
.topnav a.is-active { background: var(--accent); color: #fff; font-weight: 700; }
.topnav a.is-active:hover { background: var(--accent-strong); }

/* ===== Topbar a piena larghezza ===== */
.topbar-inner { flex-wrap: nowrap; }
.topnav { flex: 1; display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.topnav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topnav-user { display: flex; align-items: center; gap: 6px; margin-left: auto; }
@media (max-width: 1000px) {
    .topbar-inner { flex-wrap: wrap; }
    .topnav { justify-content: flex-start; }
    .topnav-links { width: 100%; }
}

/* Chi valuta chi: blocco peso */
.weight-box { display: inline-flex; align-items: center; gap: 8px; }
.weight-box strong { font-size: 13px; }

/* ============================================================
   Forme rettangolari + verde accento (come "Importa Excel")
   ============================================================ */
.badge, .role-tag, .status-pill, .hero-pill, .person-chip, .user-chip {
    border-radius: 7px;
}
.avatar-sm, .panel-avatar {
    border-radius: 10px;
    background: var(--accent);
}
/* Badge "positivo" con i toni del verde accento */
.badge-ok {
    background: rgba(0, 168, 150, .14);
    color: #067a6e;
    box-shadow: inset 0 0 0 1px rgba(0, 168, 150, .32);
}
/* Tag ruoli: rettangolari, accento per i valutatori */
.role-tag.valutatore { background: rgba(0,168,150,.14); color: #067a6e; }
.role-tag.valutato   { background: rgba(30,39,97,.10); color: var(--primary); }
.status-pill.ok { background: rgba(0,168,150,.14); color: #067a6e; }

/* Verde accento PIENO e marcato (come "Importa Excel") */
.badge-ok {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}
.role-tag.valutatore { background: var(--accent); color: #fff; }
.status-pill.ok { background: var(--accent); color: #fff; }
.avatar-sm, .panel-avatar { background: var(--accent-strong); }

/* Evita lo spostamento della barra in alto quando la scrollbar compare/scompare */
html { scrollbar-gutter: stable; overflow-y: auto; }
.topbar-inner { min-height: 68px; }

/* ============================================================
   Pesi valutatori: cursori + % effettiva (Chi valuta chi)
   ============================================================ */
.weight-list { display: flex; flex-direction: column; gap: 10px; }
.wrow {
    display: grid;
    grid-template-columns: minmax(170px, 1.3fr) minmax(190px, 1.5fr) 96px auto;
    gap: 12px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface);
}
.wrow.is-excluded { opacity: .5; }
.weight-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.weight-who strong { font-family: var(--font-display); }
.weight-controls { display: flex; align-items: center; gap: 10px; }
.weight-slider {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 4px; background: var(--border); outline: none;
}
.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 16px; border-radius: 6px;
    background: var(--accent); border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.weight-slider::-moz-range-thumb {
    width: 18px; height: 14px; border-radius: 6px;
    background: var(--accent); border: 2px solid #fff; cursor: pointer;
}
.weight-slider:focus-visible { box-shadow: 0 0 0 3px rgba(0,168,150,.3); }
.weight-number { width: 74px; text-align: center; }
.weight-eff { text-align: center; color: var(--muted); }
.weight-eff [data-eff] { font-family: var(--font-display); font-weight: 700; color: var(--primary); }
.weight-eff [data-eff].is-off { color: var(--muted); font-weight: 500; }
.weight-eff small { display: block; font-size: 11px; }
.weight-presets { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.weight-saved { font-size: 12.5px; }
@media (max-width: 760px) {
    .weight-row { grid-template-columns: 1fr; }
    .weight-eff { text-align: left; }
}

/* Confronto risultati (Pesi e confronto) */
.cmp-table td.is-strong { font-family: var(--font-display); font-weight: 700; color: var(--primary); }
.cmp-table tr.cmp-total td { border-top: 2px solid var(--border); font-family: var(--font-display); font-weight: 700; }

/* I miei questionari (task list) */
.mf-group { margin-bottom: 14px; }
.mf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.mf-cycle { font-family: var(--font-display); font-size: 17px; }
.mf-sub { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.mf-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; background: var(--surface); }
.mf-row-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mf-row-main strong { font-family: var(--font-display); }
.mf-row-state { text-align: center; }
.mf-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.hub-card-primary { border-color: var(--accent); }
@media (max-width: 720px) {
    .mf-row { grid-template-columns: 1fr; }
    .mf-row-state { text-align: left; }
    .mf-row-actions { justify-content: flex-start; }
}

/* ===== UX polish condiviso (ottobre 2026) ===== */
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-muted  { background: #f1f5f9; color: #475569; }

.callout {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface);
    box-shadow: var(--shadow); margin: 16px 0;
}
.callout-icon {
    width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700;
    background: #eef2ff; color: var(--primary);
}
.callout-body { min-width: 0; }
.callout-body strong { display: block; margin-bottom: 2px; font-family: var(--font-display); }
.callout-body p { margin: 0; color: var(--muted); font-size: 13.5px; }
.callout-info    { border-left: 4px solid var(--info); }
.callout-warn    { border-left: 4px solid var(--warning); }
.callout-success { border-left: 4px solid var(--success); }
.callout-danger  { border-left: 4px solid var(--danger); }

.kpi-bar { height: 8px; border-radius: 999px; background: #e8ecf5; overflow: hidden; margin-top: 8px; }
.kpi-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.kpi-bar.is-warn > span { background: var(--warning); }
.kpi-bar.is-danger > span { background: var(--danger); }

.status-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.status-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-legend .dot.ok { background: var(--success); }
.status-legend .dot.warn { background: var(--danger); }
.status-legend .dot.info { background: var(--info); }

table tbody tr:hover { background: rgba(0, 168, 150, .045); }
.table-wrap table thead th { position: sticky; top: 0; z-index: 2; }

.form-row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.count-hint { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.count-hint.is-bad { color: var(--danger); }
.count-hint.is-ok { color: var(--success); }

.level-index { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.level-index a { font-size: 12.5px; padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--primary); }
.level-index a:hover { border-color: var(--accent); }

.person-next { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.person-next a { font-size: 12.5px; font-weight: 600; color: var(--accent-strong); text-decoration: none; }
.person-next a:hover { text-decoration: underline; }

.cycle-row.is-active td { background: rgba(0, 168, 150, .06); }
.cycle-row.is-active td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cycle-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; margin-top: 10px; }
.cycle-edit label { font-size: 11.5px; }
.cycle-edit input { min-width: 0; }
.cycle-edit button { align-self: end; }

@media (max-width: 720px) {
    .topnav-links { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
    .topnav-links::-webkit-scrollbar { display: none; }
    .topnav-links a { flex: 0 0 auto; white-space: nowrap; }
    .page-header { gap: 12px; }
}

/* ===== Valutatori: master-detail ===== */
.panels-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.panels-list { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.panels-list-head { padding: 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.panels-list-head .people-filter { width: 100%; }
.panels-list-items { max-height: 62vh; overflow: auto; }
.panel-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border); transition: background .12s; }
.panel-person:hover { background: rgba(0, 168, 150, .05); }
.panel-person.is-selected { background: rgba(0, 168, 150, .10); box-shadow: inset 3px 0 0 var(--accent); }
.panel-person .panel-avatar { width: 34px; height: 34px; flex: 0 0 34px; font-size: 12.5px; }
.panel-person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-person-main strong { font-size: 13.5px; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-person-main small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-person-meta { display: flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.panel-person-meta .badge { font-size: 10.5px; padding: 2px 8px; }
.panels-detail .panel-card { padding: 0; }
.panel-detail-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-detail-head .panel-meta { margin-left: auto; }
.panel-evaluators { padding: 2px 16px; }
.eval-row { display: grid; grid-template-columns: minmax(170px, 1.3fr) 90px auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.eval-row.is-excluded { opacity: .55; }
.eval-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.eval-who strong { font-family: var(--font-display); }
.eval-eff { text-align: right; color: var(--muted); }
.eval-eff [data-eff] { font-weight: 700; color: var(--primary); }
.eval-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.eval-weights { grid-column: 1 / -1; }
.eval-weights > summary { list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-strong); display: inline-block; padding: 2px 0; }
.eval-weights > summary::-webkit-details-marker { display: none; }
.eval-weight-controls { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.eval-weight-controls .weight-slider { flex: 1; }
.panel-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 16px; border-top: 1px dashed var(--border); }
.panel-add .field { display: flex; flex-direction: column; gap: 3px; }
.panel-add .field select { min-width: 200px; }
.panel-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 16px; }
@media (max-width: 900px) {
    .panels-layout { grid-template-columns: 1fr; }
    .panels-list-items { max-height: 38vh; }
    .eval-row { grid-template-columns: 1fr; }
    .eval-eff { text-align: left; }
    .eval-actions { justify-content: flex-start; }
}

/* ===== Intestazioni con azioni e gruppi di pulsanti ===== */
.page-header.has-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header.has-actions > div:first-child { min-width: 0; }
.page-header.has-actions .btn-row,
.page-header.has-actions .actions { margin: 0; flex: 0 0 auto; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-end { justify-content: flex-end; }
.actions > form { margin: 0; display: inline-flex; }
.actions .btn, .actions .btn-sm, .actions button { margin: 0; white-space: nowrap; }
.actions .btn-sm { min-height: 34px; }
.actions .btn { min-height: 42px; }

.btn-sm { min-height: 34px; line-height: 1.1; }
button, .btn { line-height: 1.15; }

.row-actions, .user-actions, .person-card-actions { align-items: center; }

[data-exclude] { min-width: 84px; text-align: center; }

.report-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.report-actions .actions { margin: 0; }

@media (max-width: 720px) {
    .page-header.has-actions { flex-direction: column; align-items: stretch; }
    .page-header.has-actions .actions,
    .page-header.has-actions .btn-row { justify-content: flex-start; }
}

/* Un link con sola classe btn-sm deve comunque sembrare un pulsante primario */
a.btn-sm:not(.btn):not(.btn-ghost):not(.btn-accent):not(.btn-danger) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(30,39,97,.15);
}
a.btn-sm:not(.btn):not(.btn-ghost):not(.btn-accent):not(.btn-danger):hover {
    background: var(--primary-light);
}

/* Scelta 3 soft-skill su 5 */
.skill-option {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
    font-weight: 400; border-radius: 8px; cursor: pointer;
}
.skill-option:last-child { border-bottom: none; }
.skill-option input { margin-top: 4px; }
.skill-option.is-selected { background: rgba(0, 168, 150, .08); box-shadow: inset 3px 0 0 var(--accent); }
.skill-option input:disabled { cursor: not-allowed; }

/* ===== Pesi valutatori: scala 0-10 ===== */
.weight-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.weight-legend strong { color: var(--primary); font-family: var(--font-display); }
.weight-controls-wrap { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.weight-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); padding: 0 2px; }
.weight-number-wrap { display: inline-flex; align-items: center; gap: 3px; }
.weight-number-wrap small { font-size: 10.5px; color: var(--muted); }
.weight-eff { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; color: var(--muted); }
.weight-eff-value { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--primary); }
.weight-eff-value.is-off { color: var(--muted); font-weight: 500; }
.eval-weight-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.eval-weight-controls .weight-slider { flex: 1; }
.eval-weights .weight-scale { margin-top: 2px; }

/* Segnaposto dei titoli Job Grading */
.jg-placeholder {
    display: inline-block;
    padding: 0 5px;
    border-radius: 5px;
    background: #eef2ff;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: .92em;
    font-weight: 600;
}
