:root { font-family: "Segoe UI", system-ui, sans-serif; color: #191514; background: #f6f5f1; font-synthesis: none; --accent: #f1e900; --ink: #191514; --muted: #67615d; }
* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: #9c9400; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button, .button { cursor: pointer; }
button:disabled, fieldset:disabled .button { opacity: .6; cursor: wait; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #918900; outline-offset: 3px; }
.site-shell { max-width: 1240px; margin: auto; padding: 0 40px; min-height: 100dvh; display: flex; flex-direction: column; }
.site-header { min-height: 120px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; padding: 16px 0; border-bottom: 1px solid #dfdbd4; }
.brand { display: inline-flex; flex-shrink: 0; text-decoration: none; }
.brand img { display: block; width: 250px; height: auto; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { text-decoration: none; font-size: 14px; font-weight: 600; }
nav a.active:not(.button) { border-bottom: 3px solid var(--accent); padding-bottom: 5px; }
main { flex: 1; padding: 48px 0; }
.site-footer { color: var(--muted); font-size: 12px; padding: 26px 0; border-top: 1px solid #dfdbd4; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; letter-spacing: -1.4px; margin-bottom: 18px; }
h1:focus { outline: none; }
h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.6px; margin-bottom: 12px; }
h3 { font-size: 14px; margin: 25px 0 12px; }
p { line-height: 1.65; }
.eyebrow { color: var(--ink); font-size: 10px; font-weight: 750; letter-spacing: 2px; margin-bottom: 18px; border-left: 3px solid var(--accent); padding-left: 9px; }
.muted, .page-heading > p:last-child { color: var(--muted); font-size: 14px; }
.card { background: white; padding: 32px; border: 1px solid #e4e0d9; border-radius: 18px; box-shadow: 0 8px 28px #19151405; min-width: 0; }
.auth-layout { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 70px; padding: 24px 0 55px; }
.welcome-panel { padding: 26px 0; }
.welcome-panel h1 { max-width: 520px; font-size: clamp(34px, 4vw, 51px); line-height: 1.18; }
.welcome-panel > p:not(.eyebrow) { color: var(--muted); max-width: 380px; }
.welcome-detail { margin-top: 55px; border-top: 1px solid #dfdbd4; padding-top: 24px; display: flex; align-items: flex-start; gap: 20px; }
.welcome-detail > span { color: var(--ink); background: var(--accent); border-radius: 5px; font-size: 13px; padding: 5px 8px; }
.welcome-detail p { font-size: 13px; color: var(--muted); margin: 0; }
.auth-card { padding: 38px; }
.auth-card .eyebrow { margin-bottom: 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 19px; font-weight: 650; padding: 0; margin-bottom: 20px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 20px 0 8px; }
input:not([type="checkbox"]) { width: 100%; background: #fcfbf9; color: var(--ink); border: 1px solid #d5d0c8; padding: 12px 14px; border-radius: 8px; min-height: 46px; }
input:not([type="checkbox"]):focus { border-color: #918900; }
.button, button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 8px; font-size: 14px; font-weight: 600; min-height: 45px; padding: 11px 20px; text-decoration: none; border: 1px solid transparent; }
.primary { background: var(--accent); color: var(--ink); border-color: #d9d100; }
.primary:hover { background: #ded600; }
.secondary { background: transparent; border-color: #bfb9af; color: var(--ink); }
.secondary:hover { background: #f8f5d3; border-color: #a49b2e; }
.small { min-height: 36px; padding: 8px 16px; }
.full { width: 100%; }
fieldset > .button { margin-top: 25px; }
.form-footer { margin: 27px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.form-footer a { font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.profile-card > .button { margin-top: 24px; }
input[readonly] { color: var(--muted); background: #f1efea; }
.notice { background: #fffce3; padding: 13px 16px; border-radius: 8px; font-size: 14px; border: 1px solid #e8dfa0; overflow-wrap: anywhere; }
.notice.error { color: #962f35; background: #fff1f1; border-color: #efcece; }
.notice.success { color: #155544; background: #edf8f2; border-color: #c6e5d6; }
.validation-summary-valid { display: none; }
.validation-errors { color: #a52f36; font-size: 13px; padding: 12px 12px 12px 28px; background: #fff3f3; border-radius: 8px; line-height: 1.7; }
input.invalid { border-color: #b84248; }
.page-heading { margin-bottom: 30px; }
.page-heading .eyebrow { margin-bottom: 12px; }
.page-heading h1 { font-size: 36px; margin-bottom: 10px; }
.registration-card { max-width: 850px; margin: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-grid label { margin-top: 12px; }
.span-two { grid-column: 1 / -1; }
.form-section { font-size: 19px; margin-top: 32px; padding-top: 26px; border-top: 1px solid #e9e5de; }
.registration-card fieldset > .muted { margin-top: 22px; margin-bottom: 0; }
.account-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.section-heading .eyebrow { margin-bottom: 10px; }
.status-badge, .badge { display: inline-block; color: #514b12; background: #faf6c7; border-radius: 6px; padding: 6px 9px; font-size: 11px; font-weight: 650; }
.profile-details { margin: 20px 0 0; }
.profile-details > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid #f0ede7; font-size: 14px; }
.profile-details > div:last-child { border: 0; }
dt { color: var(--muted); overflow-wrap: anywhere; }
dd { margin: 0; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.module-list { display: grid; gap: 18px; }
.module-item { border-top: 1px solid #e4e0d9; padding-top: 18px; min-width: 0; overflow-wrap: anywhere; }
.module-item h3 { font-size: 16px; margin: 0 0 8px; }
.module-item p { margin-bottom: 14px; }
.module-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.module-enabled { background: #edf8f2; color: #155544; }
.module-actions button:disabled { cursor: default; }
.compact > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.danger-card { border-color: #e8cccc; }
.danger-card .eyebrow { color: #a33339; }
.danger-card > p:not(.eyebrow) { font-size: 14px; color: var(--muted); }
.danger { background: #a33339; color: white; }
.danger:hover { background: #87262c; }
.checkbox-label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; line-height: 1.6; }
.checkbox-label input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--ink); flex-shrink: 0; }
.result-card { max-width: 650px; margin: 30px auto; }
.result-card h2 { margin-top: 22px; }
.loading-message { text-align: center; padding: 60px 20px; color: var(--muted); }
.startup-error { max-width: 600px; margin: 70px auto; padding: 30px; }
#blazor-error-ui { display: none; background: #fff3cd; color: #473b17; padding: 16px 24px; position: fixed; bottom: 0; width: 100%; z-index: 1000; box-shadow: 0 -2px 12px #0001; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
.loading-progress { position: relative; display: block; width: 80px; height: 80px; margin: 22vh auto 20px; }
.loading-progress circle { fill: none; stroke: #e4e0d9; stroke-width: 5px; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--accent); stroke-dasharray: calc(251.327 * var(--blazor-load-percentage, 0%) / 100), 251.327; }
.loading-progress-text { text-align: center; color: var(--muted); }
.loading-progress-text:after { content: "Caricamento " var(--blazor-load-percentage-text, ""); }
@media (max-width: 850px) {
    .site-shell { padding: 0 24px; }
    .auth-layout { gap: 30px; grid-template-columns: 1fr 1fr; }
    .auth-card, .card { padding: 26px; }
    .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .site-shell { padding: 0 18px; }
    .site-header { min-height: 94px; gap: 14px; }
    .brand img { width: clamp(140px, 38vw, 180px); }
    .site-header nav { margin-left: auto; }
    nav { gap: 12px; }
    nav a { font-size: 12px; }
    nav .small { padding: 7px 10px; font-size: 12px; }
    main { padding: 30px 0; }
    .auth-layout { grid-template-columns: 1fr; gap: 20px; padding: 0; }
    .welcome-panel { padding: 0; }
    .welcome-panel h1 { font-size: 34px; }
    .welcome-detail { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .card { padding: 24px; border-radius: 13px; }
    .profile-details > div { grid-template-columns: 95px minmax(0, 1fr); gap: 10px; font-size: 13px; }
    .compact > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
