h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Pagine di accesso (rendering statico, senza componenti interattivi) */
/* Sfondo sfumato nel colore aziendale, scheda chiara con fascia decorativa e logo tondo. I colori della scheda sono
   fissi (non seguono il tema chiaro/scuro): il contrasto è lo stesso in entrambi. */
.account-shell {
    min-height: 100vh; display: grid; place-items: center; padding: 1rem;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--account-color) 65%, #fff) 0, transparent 42%),
        linear-gradient(135deg, var(--account-color), color-mix(in srgb, var(--account-color) 55%, #000));
}
.account-card {
    width: 100%; max-width: 25rem; border-radius: 1.25rem; overflow: hidden;
    font-family: var(--rz-text-font-family, system-ui, sans-serif);
    background: #eef2fb; color: #1b2233; box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.35);
}
/* Fascia in alto: file di archi, disegnate con soli gradienti (nessuna immagine da scaricare) */
.account-hero {
    height: 7rem;
    background-color: color-mix(in srgb, var(--account-color) 14%, #f4f6fb);
    background-image: radial-gradient(ellipse 42% 78% at 50% 100%, color-mix(in srgb, var(--account-color) 70%, #101624) 0 97%, transparent 100%);
    background-size: 2.25rem 2.6rem; background-position: 0.2rem 0.6rem;
}
.account-logo {
    position: relative; width: 5rem; height: 5rem; margin: -2.5rem auto 0; border-radius: 50%; overflow: hidden;
    display: grid; place-items: center; background: #fff; color: var(--account-color); box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 0.18);
}
.account-logo-image { width: 100%; height: 100%; background-repeat: no-repeat; }
.account-logo.preview { margin: 0; flex: none; }
/* Loghi chiari, pensati per l'intestazione colorata: cerchio nel colore aziendale con bordo bianco */
.account-logo.on-color { background: var(--account-color); border: 3px solid #fff; }
.account-brand { margin: 0.5rem 1rem 0; text-align: center; font-size: 0.875rem; color: #4a5468; }
.account-body { padding: 0.75rem 1.75rem 1.5rem; }
.account-card .account-body h1 { margin: 0 0 0.75rem; font-size: 1.25rem; font-weight: 600; color: inherit; }
.account-card form { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.account-card label { font-size: 0.8125rem; font-weight: 500; color: #4a5468; }
.account-card input.rz-textbox {
    width: 100%; margin-top: 0.25rem; padding: 0.7rem 0.8rem; border-radius: 0.6rem;
    border: 1px solid #c3cde0; background: #fff; color: #1b2233;
}
.account-card input.rz-textbox:focus-visible { outline: 2px solid var(--account-color); outline-offset: 1px; }
.account-card .rz-button { width: 100%; justify-content: center; border-radius: 0.6rem; font-weight: 700; letter-spacing: 0.04em; }
.account-card .rz-button.rz-button-md { min-height: 2.75rem; text-transform: uppercase; }
.account-card .rz-button.rz-variant-outlined { background: #fff; }

/* La scheda è sempre chiara, in tema chiaro e scuro. Senza "color-scheme: light" il browser veste i campi (e il
   riempimento automatico dei gestori di password) con i colori scuri del tema, e il testo scuro finisce su fondo nero.
   Le regole con ":root" servono a battere quelle del tema scuro più sotto, che valgono per il resto dell'app. */
.account-shell { color-scheme: light; }
:root .account-shell .account-card input.rz-textbox,
:root .account-shell .account-card input.rz-textbox:hover,
:root .account-shell .account-card input.rz-textbox:focus {
    background: #fff; color: #1b2233; caret-color: #1b2233;
}
:root .account-shell .account-card input.rz-textbox:focus,
:root .account-shell .account-card input.rz-textbox:focus-visible {
    border-color: var(--account-color); outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--account-color) 28%, transparent);
}
:root .account-shell .account-card input.rz-textbox:-webkit-autofill,
:root .account-shell .account-card input.rz-textbox:-webkit-autofill:hover,
:root .account-shell .account-card input.rz-textbox:-webkit-autofill:focus {
    -webkit-text-fill-color: #1b2233; caret-color: #1b2233;
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
}
:root .account-shell .account-card .rz-button.rz-variant-outlined.rz-primary {
    color: color-mix(in srgb, var(--account-color) 75%, #000);
}
:root .account-shell .account-card a:not(.rz-button) { color: color-mix(in srgb, var(--account-color) 75%, #000); }
.account-check { display: flex; align-items: center; gap: 0.5rem; }
.account-error, .account-ok { padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; }
.account-error { color: #8c1d18; background: #fdecea; }
.account-ok { color: #14532d; background: #e6f4ea; }
.account-hint { font-size: 0.875rem; color: #4a5468; }
.account-hint:empty { display: none; }
.passkey-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.passkey-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 0.6rem; background: #fff; border: 1px solid #c3cde0; }
.passkey-list form { margin: 0; }
.passkey-list .rz-button { width: auto; }
.header-profile { color: inherit; }
.account-center { text-align: center; margin: 0; }

.account-steps { margin: 0 0 1rem; padding-left: 1.25rem; display: grid; gap: 0.75rem; }
.account-steps small { display: block; margin-top: 0.5rem; word-break: break-all; }

/* QR del secondo fattore: fondo bianco anche nel tema scuro, altrimenti la fotocamera non lo legge */
.totp-qr { display: inline-block; padding: 0.5rem; background: #fff; border-radius: 0.5rem; }
.totp-qr .label-preview { border: 0; width: 12rem; }

/* Tavolozza dei colori aziendali */
.color-palette { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.color-swatch { width: 2.25rem; height: 2.25rem; padding: 0; border-radius: 50%; border: 2px solid var(--rz-base-400); cursor: pointer; }
.color-swatch:focus-visible { outline: 3px solid var(--rz-primary); outline-offset: 2px; }
.color-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--rz-base-background-color, #fff), 0 0 0 4px var(--rz-text-color, #000); }
.header-user { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; padding-right: 1rem; }
.header-user form { margin: 0; }
.permission-matrix { border-collapse: collapse; }
.permission-matrix th, .permission-matrix td { padding: 0.35rem 0.75rem; border-bottom: 1px solid var(--rz-base-300); text-align: center; }
.permission-matrix th:first-child, .permission-matrix td:first-child { text-align: left; }
.audit-changes { white-space: pre-wrap; word-break: break-word; margin: 0; }

/* Intestazione: logo, ricerca globale */
.header-logo { max-height: 2rem; max-width: 9rem; }
.header-search { margin: 0; }
.header-search input { width: 18rem; max-width: 30vw; padding: 0.3rem 0.6rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Scheda di dettaglio: etichetta e valore affiancati, impilati su schermi stretti */
.detail-list { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 0.4rem 1rem; margin: 0; }
.detail-list dt { font-weight: 500; color: var(--rz-text-secondary-color); }
.detail-list dd { margin: 0; }
@media (max-width: 600px) { .detail-list { grid-template-columns: 1fr; } .detail-list dd { margin-bottom: 0.5rem; } }

.account-demo { padding: 0.5rem 0.75rem; border-radius: 0.5rem; border-left: 4px solid #b26a00; background: #fff4d6; color: #1b2233; }


/* Tema scuro: il blu predefinito dei collegamenti non si legge sul fondo scuro */
:root:has(link[href*="-dark"]) main a:not(.rz-button) { color: #9ecbff; }

/* Tema scuro: tre colori predefiniti di Radzen restano sotto il contrasto 4,5:1 (WCAG AA) */
:root:has(link[href*="-dark"]) .rz-form-field-label,
:root:has(link[href*="-dark"]) .rz-placeholder { color: #a8a8a8 !important; } /* le regole di Radzen sono più specifiche */
:root:has(link[href*="-dark"]) .rz-button.rz-variant-outlined.rz-primary,
:root:has(link[href*="-dark"]) .rz-button.rz-variant-text.rz-primary,
:root:has(link[href*="-dark"]) .rz-pager-page.rz-state-active { color: #9ecbff; }
:root:has(link[href*="-dark"]) .rz-button.rz-variant-filled.rz-secondary { color: #000; }

/* ===== Home: cruscotto =====
   Il contenitore misura la propria larghezza (container query): la griglia si riorganizza in base allo spazio che
   resta accanto al menu, quindi segue la risoluzione dello schermo e la finestra ridimensionata. Altezze dei grafici
   in clamp(): crescono con lo schermo invece di restare minuscole su un monitor grande. */
.dashboard { container-type: inline-size; container-name: dash; display: grid; gap: 1.25rem; }

.dash-hero {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem;
    padding: 1.25rem 1.5rem; border-radius: 1.25rem; color: var(--rz-on-primary, #fff);
    background:
        radial-gradient(circle at 92% 0%, rgb(255 255 255 / 0.22), transparent 45%),
        linear-gradient(120deg, var(--rz-primary), color-mix(in srgb, var(--rz-primary) 55%, #000));
    box-shadow: 0 0.75rem 2rem color-mix(in srgb, var(--rz-primary) 30%, transparent);
}
.dash-title { margin: 0; font-size: clamp(1.6rem, 1.2vw + 1rem, 2.6rem); font-weight: 700; color: inherit; letter-spacing: -0.01em; }
.dash-sub { margin: 0.15rem 0 0; font-size: clamp(0.9rem, 0.4vw + 0.7rem, 1.2rem); opacity: 0.9; text-transform: capitalize; }
.dash-actions { display: flex; align-items: center; gap: 0.75rem; }
.dash-hint { font-size: 0.8rem; opacity: 0.85; }

.dash-alerts, .dash-favorites { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.dash-alert {
    --tone: var(--rz-warning);
    display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.45rem 0.95rem; border-radius: 999px; font-weight: 500;
    color: var(--rz-text-color); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 50%, transparent);
}
.dash-alert .rzi { color: var(--tone); }
.dash-alert.danger { --tone: var(--rz-danger); }
.dash-alert.ok { --tone: var(--rz-success); width: fit-content; }
.dash-favorites a { padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--rz-base-200); }

/* Indicatori: tante colonne quante ne entrano, tutte della stessa larghezza */
/* Gli indicatori crescono per riempire la riga: l'ultimo non resta solo e stretto, qualunque sia la larghezza. */
.kpi-strip { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.kpi-strip > .kpi { flex: 1 1 clamp(11rem, 12vw, 17rem); min-width: 0; }
a.kpi { color: var(--rz-text-color) !important; text-decoration: none; }   /* batte il colore dei collegamenti del tema scuro */
.kpi {
    --tone: var(--rz-primary);
    display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border-radius: 1rem; position: relative; overflow: hidden;
    background: var(--rz-card-background-color, var(--rz-base-background-color)); border: 1px solid var(--rz-base-300); border-left: 5px solid var(--tone);
    transition: transform 0.15s ease, box-shadow 0.15s ease; animation: dash-rise 0.45s ease both;
}
.kpi::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 12%, transparent), transparent 55%); pointer-events: none; }
.kpi:hover, .kpi:focus-visible { transform: translateY(-3px); box-shadow: 0 0.6rem 1.4rem color-mix(in srgb, var(--tone) 28%, transparent); }
.kpi.success { --tone: var(--rz-success); } .kpi.info { --tone: var(--rz-info); } .kpi.warning { --tone: var(--rz-warning); }
.kpi.danger { --tone: var(--rz-danger); } .kpi.muted { --tone: var(--rz-base-500); }
.kpi-content { display: contents; }
.kpi-icon { flex: none; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone); }
.kpi-icon .rzi { font-size: 1.7rem; }
.kpi-body { display: grid; min-width: 0; }
.kpi-value { font-size: clamp(1.7rem, 1.2vw + 0.9rem, 2.9rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--rz-text-secondary-color); font-size: 0.88rem; }
.kpi-note { color: var(--rz-text-secondary-color); font-size: 0.75rem; }

/* Griglia dei grafici: 12 colonne; l'ampiezza di ogni scheda dipende dallo spazio disponibile */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; grid-auto-flow: dense; }
.dash-card { grid-column: span 12; padding: 1rem 1.15rem; border-radius: 1rem; display: flex; flex-direction: column; min-width: 0; animation: dash-rise 0.5s ease both; }
.dash-card h2 { margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.dash-card.tall { height: clamp(19rem, 32vh, 34rem); }
.chart { flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; }
@container dash (min-width: 640px) { .dash-card.span-1 { grid-column: span 6; } }
@container dash (min-width: 960px) { .dash-card.span-1 { grid-column: span 4; } .dash-card.span-2 { grid-column: span 6; } }
@container dash (min-width: 1400px) { .dash-card.span-1 { grid-column: span 3; } .dash-card.span-3 { grid-column: span 9; } }
@container dash (min-width: 1900px) { .dash-card.span-2 { grid-column: span 4; } .dash-card.span-3 { grid-column: span 8; } }
@container dash (min-width: 2400px) { .dash-card.span-1 { grid-column: span 2; } .dash-card.span-2 { grid-column: span 3; } .dash-card.span-3 { grid-column: span 6; } }
@container dash (max-width: 959px) { .dash-card.span-3 { grid-column: span 12; } }

.donut-center { display: grid; justify-items: center; line-height: 1.1; }
.donut-total { font-size: clamp(1.6rem, 1.4vw + 0.8rem, 3rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-caption { color: var(--rz-text-secondary-color); font-size: 0.85rem; }

.gauge { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.gauge-chart { flex: 1 1 auto; min-height: 10rem; }
.gauge-value { font-size: clamp(1.5rem, 1.2vw + 0.8rem, 2.6rem); font-weight: 700; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.gauge-value small { font-size: 0.5em; font-weight: 600; margin-left: 0.1em; }
.gauge-caption { margin: 0.25rem 0 0; text-align: center; color: var(--rz-text-secondary-color); font-size: 0.9rem; }

.rank-icon { vertical-align: middle; color: var(--rz-primary); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; overflow: auto; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.75rem; align-items: baseline; }
.rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.rank-bar { grid-column: 1 / -1; height: 0.45rem; border-radius: 999px; background: var(--rz-base-300); position: relative; overflow: hidden; }
.rank-bar::after {
    content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit;
    background: linear-gradient(90deg, var(--rz-primary), color-mix(in srgb, var(--rz-primary) 50%, #fff));
    animation: dash-grow 0.8s ease both;
}

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; overflow: auto; }
.timeline li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.4rem 0.2rem; border-bottom: 1px solid var(--rz-base-200); }
.timeline-icon { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; color: var(--rz-on-primary, #fff); background: var(--rz-primary); }
.timeline-icon.back { background: var(--rz-success); }
.timeline-icon .rzi { font-size: 1.2rem; }
.timeline-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-meta { color: var(--rz-text-secondary-color); font-size: 0.85rem; white-space: nowrap; }

@keyframes dash-rise { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@keyframes dash-grow { from { width: 0; } to { width: var(--w); } }
@media (prefers-reduced-motion: reduce) { .kpi, .dash-card, .rank-bar::after { animation: none; transition: none; } }

/* Stampa (report e home): solo il contenuto, senza menu, intestazione e comandi */
@media print {
    .rz-sidebar, .rz-header, .rz-paginator, .no-print, #blazor-error-ui { display: none !important; }
    .rz-body, .rz-layout { overflow: visible !important; height: auto !important; display: block !important; }
    .rz-data-grid, .rz-grid-table { overflow: visible !important; font-size: 0.75rem; }
    main { padding: 0 !important; }
}

/* Anteprima etichetta */
.label-preview { display: block; width: 100%; border: 1px solid var(--rz-base-500); border-radius: 4px; background: #fff; }


/* Elenco dei report e pagina di un report: stessa impostazione della home (fascia, riquadri, tessere). */
.dash-sub.no-caps { text-transform: none; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 0.9rem; }
.report-tile { text-decoration: none; }
.report-tile .kpi-body { gap: 0.15rem; }
.report-name { font-weight: 600; font-size: 1.05rem; color: var(--rz-text-color); }
.dashboard .rz-data-grid { border: 0; }

/* Tutte le pagine di lavoro: titolo in fascia come la home, riquadri e tabelle arrotondati. Il titolo di ogni pagina è
   un <h1 class="rz-text-h4">, quindi basta questa regola e non una modifica per pagina. */
main h1.rz-text-h4 {
    margin: 0 0 1.1rem; padding: 1rem 1.4rem; border-radius: 1.1rem; color: var(--rz-on-primary, #fff); font-weight: 700; letter-spacing: -0.01em;
    font-size: clamp(1.4rem, 0.9vw + 1rem, 2.1rem);
    background:
        radial-gradient(circle at 92% 0%, rgb(255 255 255 / 0.22), transparent 45%),
        linear-gradient(120deg, var(--rz-primary), color-mix(in srgb, var(--rz-primary) 55%, #000));
    box-shadow: 0 0.5rem 1.4rem color-mix(in srgb, var(--rz-primary) 26%, transparent);
}
main .rz-card { border-radius: 1rem; }
main .rz-fieldset { border-radius: 1rem; border-color: var(--rz-base-300); }
main .rz-data-grid { border-radius: 1rem; overflow: hidden; border: 1px solid var(--rz-base-300); box-shadow: 0 0.25rem 0.9rem rgb(0 0 0 / 0.06); }
main .rz-data-grid thead th { background: color-mix(in srgb, var(--rz-primary) 9%, var(--rz-base-background-color)); }
main .rz-data-grid tbody tr:hover td { background: color-mix(in srgb, var(--rz-primary) 6%, transparent); }
.dashboard .rz-data-grid { box-shadow: none; }
.toolbar-card { padding: 1rem 1.15rem; border-radius: 1rem; }
.status-badge { font-weight: 600; }
@media print { main h1.rz-text-h4 { background: none; color: inherit; box-shadow: none; padding: 0; } }

/* Avatar dell'utente: immagine o iniziali su sfondo colorato; nell'intestazione sta accanto al pulsante Esci. */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; font-weight: 700; color: #fff; letter-spacing: 0.02em; user-select: none; }
.avatar-default { background: rgb(255 255 255 / 0.24); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.55); }
.header-profile { display: inline-flex; border-radius: 50%; }
.header-profile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
main .avatar-default { background: var(--rz-primary); box-shadow: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.swatch { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: 0 0 0 1px var(--rz-base-400); }
.swatch[aria-checked="true"] { border-color: var(--rz-base-background-color); box-shadow: 0 0 0 3px var(--rz-text-color); }
.swatch-default { background: var(--rz-primary); }

/* Editor delle etichette (disegno in scala con elementi trascinabili). */
.ld-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 0.75rem; }
.ld-group { display: flex; gap: 0.25rem; align-items: center; padding-right: 1rem; border-right: 1px solid var(--rz-base-300); }
.ld-group:last-child { border-right: 0; }
.ld-body { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.ld-stage { display: grid; gap: 0.4rem; max-width: 100%; overflow-x: auto; padding: 0.25rem; }
.ld-side { display: grid; gap: 0.6rem; flex: 1 1 18rem; min-width: 16rem; max-width: 26rem; }
.ld-canvas { position: relative; background: #fff; color: #000; border: 1px solid var(--rz-base-500); box-shadow: 0 0.2rem 0.8rem rgb(0 0 0 / 0.18); touch-action: none; overflow: hidden; }
.ld-grid { background-image: linear-gradient(to right, rgb(0 0 0 / 0.12) 1px, transparent 1px), linear-gradient(to bottom, rgb(0 0 0 / 0.12) 1px, transparent 1px); background-size: var(--grid) var(--grid); }
.ld-el { position: absolute; cursor: move; outline: 1px dashed rgb(0 0 0 / 0.35); user-select: none; box-sizing: border-box; }
.ld-el:hover { outline-color: var(--rz-primary); }
.ld-selected, .ld-el:focus-visible { outline: 2px solid var(--rz-primary); background: color-mix(in srgb, var(--rz-primary) 10%, transparent); }
.ld-text { display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; font-family: Arial, Helvetica, sans-serif; pointer-events: none; }
.ld-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ld-chip { border: 1px solid var(--rz-base-400); background: var(--rz-base-background-color); color: var(--rz-text-color); border-radius: 999px; padding: 0.2rem 0.7rem; cursor: pointer; font: inherit; font-size: 0.85rem; }
.ld-chip-on { background: var(--rz-primary); border-color: var(--rz-primary); color: #fff; }
.ld-chip-off { border-style: dashed; opacity: 0.75; }

/* Postazioni: schede a due colonne e elenco di coppie voce/valore. */
.seat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1.25rem; }
.seat-dl { display: grid; grid-template-columns: 11rem 1fr; gap: 0.35rem 1rem; margin: 0; }
.seat-dl dt { color: var(--rz-text-secondary-color); }
.seat-dl dd { margin: 0; overflow-wrap: anywhere; }
