:root {
    color-scheme: dark;
    --auth-bg: #0b0908;
    --auth-panel: rgba(24, 21, 18, .965);
    --auth-panel-2: rgba(36, 31, 26, .92);
    --auth-line: rgba(225, 205, 165, .20);
    --auth-line-strong: rgba(232, 209, 158, .42);
    --auth-text: #eee8dc;
    --auth-muted: #a79e91;
    --auth-gold: #c7a96d;
    --auth-gold-bright: #f0d79e;
    --auth-red: #7b2b1d;
    --auth-red-bright: #b44a2d;
    --auth-danger: #d58d79;
    --auth-ok: #b9d0a2;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
    min-width: 320px;
    color: var(--auth-text);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--auth-bg);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.auth-music-toggle {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 14px 9px 11px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(0,0,0,.34);
    color: #f5f1e8;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.07);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.auth-music-toggle:hover,
.auth-music-toggle:focus-visible {
    border-color: rgba(255,255,255,.34);
    background: rgba(0,0,0,.48);
    box-shadow: 0 10px 26px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.09), 0 0 14px rgba(255,255,255,.08);
    outline: none;
    transform: translateY(-1px);
}
.auth-music-toggle.is-muted {
    color: #d8d3ca;
    border-color: rgba(255,255,255,.14);
    background: rgba(0,0,0,.28);
}
.auth-music-toggle__icon-wrap {
    position: relative;
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 20px;
}
.auth-music-toggle__icon {
    width: 20px;
    height: 20px;
    display: block;
    filter: drop-shadow(0 0 4px rgba(255,255,255,.06));
}
.auth-music-toggle.is-muted .auth-music-toggle__icon-wrap::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #f3f3f3;
    border-radius: 2px;
    transform: rotate(-45deg);
    box-shadow: 0 0 4px rgba(255,255,255,.12);
}
.auth-music-toggle__label {
    font: 12px/1 'ADLaM Display', Georgia, serif;
    letter-spacing: .08em;
    white-space: nowrap;
}

.auth-page {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(1,1,1,.36), rgba(4,3,2,.70)),
        url('/img/bg-dashboard.png') center center / cover fixed no-repeat,
        #0b0908;
}
.auth-page--register {
    background:
        linear-gradient(180deg, rgba(1,1,1,.34), rgba(4,3,2,.66)),
        url('/img/bg-account.png') center center / cover fixed no-repeat,
        #0b0908;
}
.auth-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 14%, rgba(204, 166, 95, .13), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(110, 25, 14, .18), transparent 38%),
        linear-gradient(90deg, rgba(0,0,0,.40), transparent 20%, transparent 80%, rgba(0,0,0,.40));
}
.auth-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
    background-size: 42px 42px;
}
.auth-stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 42px 20px;
}
.auth-card {
    position: relative;
    width: min(540px, 100%);
    padding: 30px 34px 26px;
    border: 1px solid var(--auth-line-strong);
    background:
        linear-gradient(145deg, rgba(255,255,255,.035), transparent 34%),
        linear-gradient(180deg, rgba(57,54,51,.30), rgba(14,13,12,.97) 42%),
        var(--auth-panel);
    box-shadow: 0 30px 90px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.05);
}
.auth-page--register .auth-card {
    background:
        linear-gradient(145deg, rgba(255,255,255,.026), transparent 34%),
        linear-gradient(180deg, rgba(18,18,18,.16), rgba(0,0,0,.62) 42%),
        rgba(0,0,0,.32);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 24px 72px rgba(0,0,0,.54), inset 0 1px 0 rgba(255,255,255,.04);
}
.auth-card::before,
.auth-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.auth-card::before {
    inset: 7px;
    border: 1px solid rgba(236, 217, 178, .08);
}
.auth-card::after {
    left: 34px;
    right: 34px;
    bottom: 7px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8a6a36 12%, #efd69b 50%, #8a6a36 88%, transparent);
    opacity: .55;
}
.auth-card--wide { width: min(760px, 100%); }
.auth-card--verify {
    background:
        linear-gradient(145deg, rgba(255,255,255,.03), transparent 34%),
        linear-gradient(180deg, rgba(18,18,18,.32), rgba(0,0,0,.84) 42%),
        rgba(0,0,0,.56);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.auth-brand { display: flex; justify-content: center; align-items: center; min-height: 90px; }
.auth-brand img {
    display: block;
    width: auto;
    max-width: min(420px, 92%);
    max-height: 102px;
    object-fit: contain;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,.52));
}
.auth-card-rule {
    height: 1px;
    margin: 18px 0 24px;
    background: linear-gradient(90deg, transparent, rgba(232,210,166,.24) 8%, rgba(232,210,166,.52) 50%, rgba(232,210,166,.24) 92%, transparent);
}
.auth-heading { text-align: center; }
.auth-eyebrow {
    display: block;
    color: var(--auth-gold);
    font: 11px/1.2 "ADLaM Display", Georgia, serif;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.auth-heading h1 {
    margin: 8px 0 0;
    color: #f2eadb;
    font: 400 clamp(27px, 4vw, 36px)/1.12 "ADLaM Display", Georgia, serif;
    text-shadow: 0 2px 12px rgba(0,0,0,.50);
}
.auth-heading p { margin: 10px auto 0; max-width: 600px; color: var(--auth-muted); font-size: 14px; line-height: 1.55; }

.auth-form { display: grid; gap: 17px; margin-top: 26px; }
.auth-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 16px; }
.auth-field { display: grid; gap: 7px; min-width: 0; }
.auth-field--full { grid-column: 1 / -1; }
.auth-field label,
.auth-label { color: #d5ccbd; font-size: 13px; font-weight: 700; }
.auth-field small { color: #80786d; line-height: 1.4; font-size: 12px; }
.auth-input-wrap { position: relative; }
.auth-field input {
    width: 100%;
    min-height: 47px;
    border: 1px solid rgba(224, 202, 158, .22);
    border-radius: 0;
    padding: 11px 13px;
    color: #f0e9dd;
    background: rgba(8, 7, 6, .68);
    box-shadow: inset 0 1px 7px rgba(0,0,0,.32);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-field input::placeholder { color: #6f685f; }
.auth-field input:focus {
    border-color: rgba(238, 210, 151, .55);
    background: rgba(12, 10, 8, .86);
    box-shadow: inset 0 1px 7px rgba(0,0,0,.32), 0 0 0 2px rgba(202,169,107,.08), 0 0 20px rgba(206,170,99,.08);
}
.auth-field.has-error input { border-color: rgba(204, 96, 72, .62); }
.field-error { color: var(--auth-danger); font-size: 12px; line-height: 1.35; }
.auth-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    padding: 7px 8px;
    color: #b9ad99;
    background: transparent;
    cursor: pointer;
}
.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #f0d79e;
    outline: none;
}
.auth-password-toggle--icon {
    right: 7px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding: 0;
    transition: color .18s ease, background .18s ease, filter .18s ease;
}
.auth-password-toggle--icon:hover,
.auth-password-toggle--icon:focus-visible {
    background: rgba(255,255,255,.045);
    filter: drop-shadow(0 0 5px rgba(238, 202, 133, .24));
}
.auth-eye {
    grid-area: 1 / 1;
    width: 21px;
    height: 21px;
    display: block;
    transition: opacity .15s ease, transform .15s ease;
}
.auth-eye svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.auth-eye--open { opacity: 1; transform: scale(1); }
.auth-eye--closed { opacity: 0; transform: scale(.86); }
.auth-password-toggle[aria-pressed="true"] .auth-eye--open { opacity: 0; transform: scale(.86); }
.auth-password-toggle[aria-pressed="true"] .auth-eye--closed { opacity: 1; transform: scale(1); }
.auth-input-wrap input[type="password"],
.auth-input-wrap input[data-password-input] { padding-right: 58px; }
.auth-password-meter {
    height: 3px;
    margin-top: 2px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}
.auth-password-meter span { display: block; height: 100%; width: 0; background: #8d3a25; transition: width .2s ease, background .2s ease; }
.auth-password-meter--spacer { visibility: hidden; }
.auth-password-meter[data-strength="2"] span { background: #ad7941; }
.auth-password-meter[data-strength="3"] span { background: #b8a25f; }
.auth-password-meter[data-strength="4"] span { background: #9daf78; }

.auth-field--terms { margin-top: 20px; }
.auth-check {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b7ad9f;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
}
.auth-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    position: relative;
    border: 1px solid rgba(226, 201, 153, .42);
    border-radius: 3px;
    background: rgba(5, 4, 3, .72);
    box-shadow: inset 0 1px 5px rgba(0,0,0,.55), 0 0 0 rgba(203,160,81,0);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.auth-check input[type="checkbox"]::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff3d6;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(.55);
    opacity: 0;
    transition: opacity .15s ease, transform .15s ease;
}
.auth-check input[type="checkbox"]:checked {
    border-color: rgba(246, 210, 134, .72);
    background:
        radial-gradient(circle at 30% 20%, rgba(255,238,197,.22), transparent 36%),
        linear-gradient(145deg, #a62918, #67140d);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 0 10px rgba(180,43,24,.20);
}
.auth-check input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}
.auth-check:hover input[type="checkbox"],
.auth-check input[type="checkbox"]:focus-visible {
    border-color: rgba(249, 217, 151, .72);
    box-shadow: inset 0 1px 5px rgba(0,0,0,.48), 0 0 10px rgba(224,177,86,.16);
    outline: none;
}
.auth-check a { color: #d7bd87; }

.auth-primary,
.auth-secondary,
.auth-link-button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 47px;
    border-radius: 3px;
    padding: 12px 18px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-family: "ADLaM Display", Georgia, serif;
    font-size: 13px;
    letter-spacing: .055em;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease, filter .18s ease, transform .18s ease;
}

/* CREA ACCOUNT: valori effettivi di ENTRA IN ARENA della Dashboard. */
.auth-primary {
    min-height: 0;
    padding: 13px 18px;
    border: 0;
    color: #fff7e8;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .045em;
    text-transform: uppercase;
    transition: border-color .25s ease, box-shadow .25s ease, filter .25s ease, background .25s ease;
    background:
        linear-gradient(105deg,
            transparent 0%,
            transparent 38%,
            rgba(255,247,219,0) 43%,
            rgba(255,239,176,.30) 47%,
            rgba(255,255,246,.62) 50%,
            rgba(255,207,83,.30) 54%,
            transparent 61%,
            transparent 100%),
        radial-gradient(circle at 16% 18%, rgba(255,242,194,.22), transparent 31%),
        linear-gradient(135deg,
            rgba(174,126,38,.96) 0%,
            rgba(102,60,23,.97) 45%,
            rgba(123,23,11,.98) 73%,
            #ef1b1c 100%);
    background-repeat: no-repeat;
    background-size: 245% 100%, auto, auto;
    background-position: -165% 0, 0 0, 0 0;
    box-shadow:
        inset 0 1px 0 rgba(255,250,225,.22),
        inset 0 -1px 0 rgba(0,0,0,.35),
        0 0 8px rgba(245,194,83,.13),
        0 0 11px rgba(194,43,24,.08),
        0 6px 16px rgba(0,0,0,.28);
    text-shadow:
        0 1px 2px rgba(0,0,0,.92),
        0 0 5px rgba(255,226,156,.20);
}
.auth-primary::before {
    content: "";
    display: block;
    position: absolute;
    z-index: 5;
    top: -45%;
    bottom: -45%;
    left: 0;
    width: 24%;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-115%) skewX(-18deg);
    transform-origin: center center;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,.04) 15%,
        rgba(255,248,222,.46) 34%,
        rgba(255,255,255,.98) 50%,
        rgba(255,246,207,.58) 66%,
        rgba(255,255,255,.05) 85%,
        transparent 100%
    );
    filter: blur(.25px);
}
.auth-primary:hover,
.auth-primary:focus-visible {
    border: 0;
    color: #fffdf8;
    background:
        linear-gradient(105deg,
            transparent 0%,
            transparent 36%,
            rgba(255,247,219,0) 41%,
            rgba(255,237,157,.46) 46%,
            rgba(255,255,250,.84) 50%,
            rgba(255,204,68,.42) 55%,
            transparent 62%,
            transparent 100%),
        radial-gradient(circle at 16% 18%, rgba(255,249,220,.32), transparent 32%),
        linear-gradient(135deg,
            rgba(211,158,48,.99) 0%,
            rgba(132,76,25,.99) 44%,
            rgba(162,31,14,.99) 72%,
            #ef1b1c 100%);
    background-repeat: no-repeat;
    background-size: 245% 100%, auto, auto;
    box-shadow:
        inset 0 1px 0 rgba(255,253,239,.28),
        0 0 5px rgba(255,255,255,.14),
        0 0 15px rgba(255,205,91,.31),
        0 0 21px rgba(218,52,27,.19),
        0 7px 18px rgba(0,0,0,.34);
    filter: brightness(1.13) saturate(1.12);
    text-shadow:
        0 1px 2px rgba(0,0,0,.90),
        0 0 6px rgba(255,255,255,.70),
        0 0 14px rgba(255,207,108,.56);
    outline: none;
    animation: di-auth-primary-bg-sheen 1.05s cubic-bezier(.22,.72,.18,1) both;
}
.auth-primary:hover::before,
.auth-primary:focus-visible::before {
    animation: di-auth-primary-white-sheen .96s cubic-bezier(.24,.66,.24,1) both;
}
@keyframes di-auth-primary-bg-sheen {
    0%   { background-position: -165% 0, 0 0, 0 0; }
    100% { background-position: 165% 0, 0 0, 0 0; }
}
@keyframes di-auth-primary-white-sheen {
    0%   { opacity: 0;   transform: translateX(-115%) skewX(-18deg); }
    6%   { opacity: .82; }
    14%  { opacity: 1; }
    84%  { opacity: .96; }
    94%  { opacity: .72; }
    100% { opacity: 0;   transform: translateX(520%) skewX(-18deg); }
}

.auth-secondary,
.auth-link-button {
    border: 1px solid rgba(220, 194, 143, .28);
    color: #eadfc9;
    background: linear-gradient(180deg, rgba(206,168,95,.10), rgba(255,255,255,.025));
    box-shadow: none;
    text-shadow: none;
}
.auth-secondary:hover,
.auth-secondary:focus-visible,
.auth-link-button:hover,
.auth-link-button:focus-visible {
    border-color: rgba(240,210,152,.48);
    background: rgba(220,178,98,.14);
    color: #fff2d3;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .auth-primary:hover,
    .auth-primary:focus-visible {
        animation: none;
        background-position: 0 0, 0 0, 0 0;
    }
    .auth-primary:hover::before,
    .auth-primary:focus-visible::before {
        animation: none;
        opacity: 0;
    }
}
.auth-actions { display: grid; gap: 10px; margin-top: 4px; }
.auth-actions--inline { grid-template-columns: 1fr 1fr; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-text-link { color: #d5bb85; text-decoration: none; font-size: 13px; }
.auth-text-link:hover, .auth-text-link:focus-visible { color: #ffe3aa; outline: none; text-decoration: underline; }
.auth-switch { margin: 22px 0 0; padding-top: 19px; border-top: 1px solid rgba(224,205,166,.10); color: #90877b; text-align: center; font-size: 13px; }
.auth-switch a { color: #dcc28b; text-decoration: none; font-weight: 700; }
.auth-switch a:hover { color: #ffe2a8; }
.auth-alert {
    margin-top: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.025);
    font-size: 13px;
    line-height: 1.5;
}
.auth-alert--error { color: #e5b0a2; border-color: rgba(190,91,67,.35); background: rgba(104,34,20,.16); }
.auth-alert--success { color: #ccddba; border-color: rgba(145,172,111,.31); background: rgba(62,86,43,.16); }
.auth-alert--info { color: #c9c0af; border-color: rgba(207,181,130,.25); background: rgba(122,92,47,.10); }

.auth-status-list { display: grid; gap: 10px; margin: 24px 0 0; }
.auth-status-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(224,205,166,.11);
    background: rgba(255,255,255,.018);
}
.auth-status-item strong, .auth-status-item span { display: block; }
.auth-status-item span { margin-top: 4px; color: #91887d; font-size: 12px; }
.auth-badge { padding: 5px 8px; border: 1px solid rgba(255,255,255,.12); color: #aaa195; font-size: 11px; white-space: nowrap; }
.auth-badge--ok { color: #c7d9b5; border-color: rgba(157,183,127,.28); background: rgba(86,111,63,.12); }
.auth-badge--wait { color: #ddc496; border-color: rgba(206,166,91,.28); background: rgba(111,80,28,.12); }
.auth-badge--future { color: #a9a39a; }

.auth-hero-icon {
    width: 60px;
    height: 60px;
    margin: 20px auto 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 212, 148, .42);
    border-radius: 50%;
    color: #fff0d0;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 233, 184, .22), transparent 30%),
        linear-gradient(145deg, rgba(142, 26, 18, .98), rgba(82, 14, 11, .98));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.13),
        inset 0 0 18px rgba(255, 196, 130, .08),
        0 10px 24px rgba(0,0,0,.42),
        0 0 12px rgba(140, 30, 18, .18);
    font: 24px/1 "ADLaM Display", Georgia, serif;
}
.auth-center { text-align: center; }
.auth-center p { color: var(--auth-muted); line-height: 1.55; }
.auth-code { letter-spacing: .34em; text-align: center; font: 20px/1 "ADLaM Display", Georgia, serif; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 21px 0; color: #776f64; font-size: 11px; letter-spacing: .10em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: rgba(225,205,166,.11); }
.auth-provider-placeholder { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-provider {
    min-height: 45px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.08);
    color: #77716a;
    background: rgba(255,255,255,.012);
    font-size: 12px;
}
.auth-provider small { color: #625d57; }
.auth-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid rgba(224,205,166,.10);
    color: #746d63;
    font-size: 10px;
    letter-spacing: .10em;
}
.auth-footer small { color: #686159; letter-spacing: 0; }

@media (max-width: 720px) {
    .auth-stage { padding: 20px 12px; align-items: start; }
    .auth-card { padding: 24px 20px 22px; }
    .auth-card::after { left: 20px; right: 20px; }
    .auth-form-grid { grid-template-columns: 1fr; }
    .auth-field--full { grid-column: auto; }
    .auth-actions--inline, .auth-provider-placeholder { grid-template-columns: 1fr; }
    .auth-footer { flex-direction: column; text-align: center; }
}


@property --di-auth-border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

/* =========================================================
   REGISTRAZIONE — layout compatto e allineato
   ========================================================= */
.auth-page--register .auth-stage {
    padding: 18px 20px;
}
.auth-page--register .auth-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 20px 30px 18px;
    border: 1px solid rgba(226, 232, 241, .46);
    border-radius: 7px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.018), transparent 34%),
        linear-gradient(180deg, rgba(8,8,8,.27), rgba(0,0,0,.66) 42%),
        rgba(0,0,0,.35);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.032),
        inset 0 0 22px rgba(0,0,0,.22),
        0 26px 78px rgba(0,0,0,.56);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.auth-page--register .auth-card::before {
    border-radius: 4px;
    border-color: rgba(232, 238, 246, .075);
}
.auth-page--register .auth-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 20;
    height: auto;
    padding: 1.5px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 1;
    background: conic-gradient(
        from var(--di-auth-border-angle),
        transparent 0deg,
        transparent 300deg,
        rgba(168, 185, 207, .05) 320deg,
        rgba(221, 232, 246, .42) 334deg,
        rgba(255, 255, 255, .98) 344deg,
        rgba(190, 219, 255, .82) 351deg,
        rgba(255, 255, 255, .18) 357deg,
        transparent 360deg
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    filter: drop-shadow(0 0 4px rgba(218, 234, 255, .46));
    animation: di-auth-border-run 14s linear infinite;
}
.auth-page--register .auth-card > * {
    position: relative;
    z-index: 1;
}
@keyframes di-auth-border-run {
    to { --di-auth-border-angle: 360deg; }
}
.auth-page--register .auth-brand {
    min-height: 113px;
}
.auth-page--register .auth-brand img {
    max-width: min(624px, 98%);
    max-height: 134px;
}
.auth-page--register .auth-card-rule {
    margin: 8px 0 12px;
}
.auth-page--register .auth-eyebrow {
    font-size: 10px;
}
.auth-page--register .auth-heading h1 {
    margin-top: 5px;
    font-size: clamp(25px, 3vw, 31px);
}
.auth-page--register .auth-heading p {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.35;
}
.auth-page--register .auth-form {
    gap: 0;
    margin-top: 16px;
}
.auth-page--register .auth-form-grid {
    gap: 12px 16px;
}
.auth-page--register .auth-field {
    gap: 5px;
}
.auth-page--register .auth-field label,
.auth-page--register .auth-label {
    font-size: 12.5px;
}
.auth-page--register .auth-field input:not([type="checkbox"]) {
    min-height: 40px;
    padding: 8px 11px;
}
.auth-page--register .auth-input-wrap input[type="password"] {
    padding-right: 50px;
}
.auth-page--register .auth-password-toggle--icon {
    width: 31px;
    height: 31px;
    right: 6px;
}
.auth-page--register .auth-eye {
    width: 19px;
    height: 19px;
}
.auth-page--register .auth-field small {
    font-size: 11px;
    line-height: 1.25;
}
.auth-page--register .auth-form-grid > .auth-field:has(#password),
.auth-page--register .auth-form-grid > .auth-field:has(#password_confirm) {
    align-self: start;
}
.auth-page--register #password,
.auth-page--register #password_confirm {
    height: 40px;
    min-height: 40px;
}
.auth-page--register .auth-password-help {
    grid-column: 1 / -1;
    margin-top: -6px;
    color: #80786d;
    font-size: 11px;
    line-height: 1.25;
}
/* La checkbox resta 20 px sotto la riga password. */
.auth-page--register .auth-field--terms {
    margin-top: 28px;
}
.auth-page--register .auth-check input[type="checkbox"] {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
    aspect-ratio: 1 / 1;
    padding: 0;
}
.auth-page--register .auth-actions {
    margin-top: 18px;
}
.auth-page--register .auth-primary {
    padding-top: 11px;
    padding-bottom: 11px;
}
.auth-page--register .auth-switch {
    margin-top: 12px;
    padding-top: 11px;
}
.auth-page--register .auth-footer {
    margin-top: 13px;
    padding-top: 10px;
}
.auth-page--register .auth-footer small {
    font-size: 12px;
    line-height: 1.35;
    color: #81786d;
}

@media (prefers-reduced-motion: reduce) {
    .auth-page--register .auth-card::after {
        animation: none;
        background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(210,226,245,.58), rgba(255,255,255,.18));
    }
}

@media (max-width: 720px) {
    .auth-page--register .auth-stage { padding: 12px; }
    .auth-page--register .auth-card { padding: 18px 18px 16px; }
    .auth-page--register .auth-card::after { inset: -1px; }
    .auth-page--register .auth-form-grid { grid-template-columns: 1fr; gap: 10px; }
    .auth-page--register .auth-field--full { grid-column: auto; }
}

/* =========================================================
   LOGIN — stessa larghezza e griglia della registrazione
   ========================================================= */
.auth-page--login .auth-form-grid--login {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}
.auth-page--login .auth-form-grid--login > .auth-field {
    align-self: start;
}
.auth-page--login .auth-form-grid--login .auth-row {
    min-height: 19px;
    flex-wrap: nowrap;
}
.auth-page--login .auth-form-grid--login .auth-text-link {
    white-space: nowrap;
    font-size: 11.5px;
}
.auth-page--login .auth-actions {
    margin-top: 18px;
}
@media (max-width: 720px) {
    .auth-page--login .auth-form-grid--login {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   AUTH — focus TAB coerente e recupero password
   ========================================================= */
.auth-page--login .auth-field--login-password {
    position: relative;
}
.auth-page--login .auth-login-forgot {
    position: absolute;
    top: 0;
    right: 0;
    white-space: nowrap;
    font-size: 11.5px;
}
.auth-page--recovery .auth-card {
    /* Recupero password usa lo stesso pannello/sfondo delle altre pagine Auth. */
}
@media (max-width: 520px) {
    .auth-page--login .auth-login-forgot {
        position: static;
        justify-self: end;
        margin-top: 1px;
    }
}

@media (max-width: 720px) {
    .auth-music-toggle {
        top: 12px;
        right: 12px;
        min-height: 38px;
        padding: 8px 12px 8px 10px;
        gap: 8px;
    }
    .auth-music-toggle__label {
        font-size: 11px;
    }
}

.auth-card--verify .auth-center { max-width: 560px; margin: 0 auto; }
