:root {
    --login-navy: #0b1634;
    --login-blue: #2563eb;
    --login-blue-dark: #1746bb;
    --login-cyan: #38bdf8;
    --login-ink: #14213d;
    --login-muted: #6b7690;
    --login-border: #dfe5ef;
    --login-surface: #ffffff;
}

.login-page {
    min-height: 100vh;
    margin: 0;
    background: var(--login-navy);
    color: var(--login-ink);
}

.login-page > .page {
    min-height: 100vh;
}

.login-page > .page > header,
.login-page > .page > .page-wrapper {
    display: none;
}

.login-page .main-login,
.login-page .main-login > .container-fluid {
    min-height: 100vh;
    width: 100%;
    padding: 0 !important;
}

.login-screen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: clamp(18px, 3vw, 46px);
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(125deg, rgba(7, 16, 39, .97), rgba(10, 27, 67, .92)),
        radial-gradient(circle at 10% 15%, rgba(37, 99, 235, .35), transparent 36%);
}

.login-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .18;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to right, #000, transparent 64%);
}

.login-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    pointer-events: none;
}

.login-glow-one {
    width: 420px;
    height: 420px;
    top: -210px;
    right: -80px;
    background: rgba(56, 189, 248, .13);
}

.login-glow-two {
    width: 360px;
    height: 360px;
    left: -140px;
    bottom: -180px;
    background: rgba(37, 99, 235, .25);
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
    width: min(1180px, 100%);
    min-height: min(760px, calc(100vh - 92px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 30px;
    background: var(--login-surface);
    box-shadow: 0 30px 90px rgba(0, 7, 24, .38);
}

.login-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(34px, 4.2vw, 62px);
    color: #fff;
    isolation: isolate;
    background:
        radial-gradient(circle at 88% 74%, rgba(56, 189, 248, .25), transparent 27%),
        radial-gradient(circle at 8% 4%, rgba(65, 122, 255, .42), transparent 34%),
        linear-gradient(145deg, #102f79 0%, #164ab2 52%, #1e63d5 100%);
}

.login-showcase::before,
.login-showcase::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.login-showcase::before {
    width: 470px;
    height: 470px;
    right: -250px;
    top: -180px;
    box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 145px rgba(255, 255, 255, .02);
}

.login-showcase::after {
    width: 310px;
    height: 310px;
    left: -170px;
    bottom: -180px;
    box-shadow: 0 0 0 54px rgba(255, 255, 255, .025);
}

.login-brand,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.login-brand-mark {
    width: 45px;
    height: 45px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 13px;
    color: #fff;
    font-size: 21px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px rgba(255, 255, 255, .22);
}

.login-brand-name {
    color: #fff;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.5px;
}

.login-brand-name span {
    color: #7dd3fc;
}

.showcase-copy {
    position: relative;
    z-index: 2;
    margin-top: clamp(48px, 8vh, 88px);
    max-width: 500px;
}

.showcase-kicker,
.login-eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 2.2px;
}

.showcase-kicker {
    color: #a5e1ff;
}

.showcase-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -2.7px;
}

.showcase-copy p {
    max-width: 450px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
    line-height: 1.7;
}

.receipt-scene {
    position: relative;
    z-index: 2;
    width: 390px;
    height: 230px;
    margin: auto auto 8px;
}

.receipt-card-visual {
    position: absolute;
    left: 18px;
    bottom: 6px;
    width: 225px;
    min-height: 215px;
    padding: 26px 22px 22px;
    color: #34405a;
    border-radius: 17px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 22px 50px rgba(5, 20, 55, .28);
    transform: rotate(-5deg);
}

.receipt-card-visual::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 14px;
    background: linear-gradient(135deg, transparent 7px, #fff 0) 0 0/14px 14px repeat-x;
}

.receipt-handle {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 46px;
    height: 4px;
    border-radius: 10px;
    background: #d8deea;
    transform: translateX(-50%);
}

.receipt-logo-line {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: #1d4ed8;
    font-size: 12px;
}

.receipt-logo-line span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: #2563eb;
}

.receipt-line {
    height: 6px;
    margin: 8px 0;
    border-radius: 10px;
    background: #e1e6ef;
}

.receipt-line-long { width: 84%; }
.receipt-line-medium { width: 58%; }

.receipt-divider {
    margin: 15px 0 12px;
    border-top: 1px dashed #c8d0df;
}

.receipt-row,
.receipt-total-visual {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 9px;
    font-size: 10px;
}

.receipt-total-visual {
    font-size: 12px;
}

.warranty-badge {
    position: absolute;
    right: 8px;
    bottom: 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 11px;
    width: 205px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 16px;
    color: #1f3159;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 18px 45px rgba(5, 20, 55, .25);
    backdrop-filter: blur(12px);
    transform: rotate(3deg);
}

.warranty-badge > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #0e9f6e;
    background: #dcfce7;
}

.warranty-badge div {
    display: flex;
    flex-direction: column;
}

.warranty-badge small {
    color: #7a859b;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.warranty-badge strong { font-size: 12px; }
.badge-check { color: #10b981; font-size: 13px; }

.showcase-note {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
}

.showcase-note i { color: #7dd3fc; }

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: clamp(34px, 5vw, 68px) clamp(34px, 5.5vw, 76px) 28px;
    background: #fff;
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.mobile-brand {
    display: none;
    margin-bottom: 40px;
}

.mobile-brand .login-brand-mark {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(145deg, var(--login-blue), #3b82f6);
}

.mobile-brand .login-brand-name { color: var(--login-ink); }
.mobile-brand .login-brand-name span { color: var(--login-blue); }

.login-view-stage {
    display: grid;
    overflow: hidden;
}

.login-view {
    grid-area: 1 / 1;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition:
        opacity .32s ease,
        transform .38s cubic-bezier(.22, 1, .36, 1),
        visibility 0s linear;
}

.login-view-recovery {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(42px);
    transition-delay: 0s, 0s, .38s;
}

.login-form-wrap.is-recovery .login-view-auth {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-42px);
    transition-delay: 0s, 0s, .38s;
}

.login-form-wrap.is-recovery .login-view-recovery {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: .08s, .04s, 0s;
}

.login-heading { margin-bottom: 34px; }

.login-eyebrow {
    margin-bottom: 13px;
    color: var(--login-blue);
}

.login-heading h2 {
    margin: 0 0 12px;
    color: var(--login-ink);
    font-size: clamp(34px, 3.4vw, 45px);
    font-weight: 760;
    line-height: 1.06;
    letter-spacing: -1.7px;
}

.login-heading p {
    max-width: 370px;
    margin: 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.65;
}

.login-form { width: 100%; }

.login-field { margin-bottom: 21px; }

.login-field label,
.login-label-row label {
    margin: 0 0 9px;
    color: #293650;
    font-size: 12px;
    font-weight: 700;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.login-label-row a,
.login-link-button {
    margin-bottom: 9px;
    padding: 0;
    border: 0;
    color: var(--login-blue);
    font-size: 11px;
    font-weight: 700;
    line-height: inherit;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

.login-label-row a:hover,
.login-link-button:hover { color: var(--login-blue-dark); text-decoration: underline; }

.login-link-button:focus-visible {
    border-radius: 3px;
    outline: 3px solid rgba(37, 99, 235, .16);
    outline-offset: 3px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    z-index: 2;
    left: 17px;
    display: grid;
    place-items: center;
    width: 18px;
    color: #8a96ab;
    font-size: 14px;
    pointer-events: none;
    transition: color .2s ease;
}

.login-input.form-control {
    height: 54px;
    padding: 0 48px;
    border: 1px solid var(--login-border);
    border-radius: 13px;
    color: #1e2b45;
    font-size: 13px;
    background: #f9fbfd;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login-input.form-control::placeholder { color: #a1aaba; }

.login-input-wrap:focus-within .login-input.form-control {
    border-color: #6a96ff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.login-input-wrap:focus-within .login-input-icon { color: var(--login-blue); }

.login-password-input.form-control { padding-right: 52px; }

.password-toggle {
    position: absolute;
    z-index: 3;
    right: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #7f8ba1;
    background: transparent;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--login-blue);
    background: #edf3ff;
    outline: none;
}

.login-validation {
    display: block;
    min-height: 17px;
    margin-top: 5px;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
}

.login-validation:empty { min-height: 0; margin-top: 0; }

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 26px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #5e6b83;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.remember-option .form-check-input {
    width: 17px;
    height: 17px;
    margin: 0;
    border-color: #cbd3df;
    border-radius: 5px;
    box-shadow: none;
}

.remember-option .form-check-input:checked {
    border-color: var(--login-blue);
    background-color: var(--login-blue);
}

.remember-option .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.login-submit {
    position: relative;
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    overflow: hidden;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    background: linear-gradient(100deg, var(--login-blue-dark), var(--login-blue) 58%, #3b82f6);
    box-shadow: 0 13px 28px rgba(37, 99, 235, .27);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.login-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .16), transparent 70%);
    transform: translateX(-120%);
    transition: transform .5s ease;
}

.login-submit span,
.login-submit i { position: relative; z-index: 1; }
.login-submit i { font-size: 11px; transition: transform .2s ease; }

.login-submit:hover {
    color: #fff;
    box-shadow: 0 16px 32px rgba(37, 99, 235, .34);
    transform: translateY(-1px);
}

.login-submit:hover::before { transform: translateX(120%); }
.login-submit:hover i { transform: translateX(3px); }

.login-submit:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 3px;
}

.login-support {
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 25px;
    color: #8993a6;
    font-size: 11px;
}

.login-support i { color: #76a0f9; }

.recovery-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 31px;
    padding: 7px 4px;
    border: 0;
    color: #66738b;
    font-size: 11px;
    font-weight: 700;
    background: transparent;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.recovery-back:hover {
    color: var(--login-blue);
}

.recovery-back i { transition: transform .2s ease; }
.recovery-back:hover i { transform: translateX(-2px); }

.recovery-back:focus-visible {
    border-radius: 5px;
    outline: 3px solid rgba(37, 99, 235, .16);
    outline-offset: 2px;
}

.recovery-heading { margin-bottom: 27px; }

.recovery-heading h2,
.recovery-success h2 {
    font-size: clamp(31px, 3vw, 40px);
}

.recovery-methods {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

.recovery-methods legend {
    margin: 0 0 9px;
    color: #293650;
    font-size: 12px;
    font-weight: 700;
}

.recovery-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recovery-method {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.recovery-method input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.recovery-method span {
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--login-border);
    border-radius: 12px;
    color: #69758b;
    font-size: 11px;
    font-weight: 700;
    background: #f9fbfd;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.recovery-method input:checked + span {
    border-color: #82a5f9;
    color: var(--login-blue);
    background: #f0f5ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .06);
}

.recovery-method input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.recovery-field { display: none; }
.recovery-field.is-active { display: block; animation: recoveryFieldIn .28s ease both; }

.recovery-hint {
    display: block;
    margin-top: 7px;
    color: #8b95a7;
    font-size: 10px;
}

.recovery-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
}

.recovery-success-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 28px;
    border-radius: 18px;
    color: #0d9f6e;
    font-size: 21px;
    background: #dcfce7;
    box-shadow: 0 12px 28px rgba(13, 159, 110, .13);
}

.recovery-success .login-eyebrow { margin-bottom: 13px; }

.recovery-success h2 {
    margin: 0 0 14px;
    color: var(--login-ink);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -1.4px;
}

.recovery-success p {
    margin: 0 0 31px;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.7;
}

@keyframes recoveryFieldIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 46px;
    color: #a1a9b7;
    font-size: 9px;
}

.login-legal div { display: flex; gap: 15px; }
.login-legal a { color: #7c879a; text-decoration: none; }
.login-legal a:hover { color: var(--login-blue); }

/* Messaggio server già gestito dal layout condiviso. */
.login-page > .page > .page-header {
    position: fixed;
    z-index: 20;
    top: 18px;
    left: 50%;
    width: min(520px, calc(100% - 32px));
    padding: 0;
    transform: translateX(-50%);
}

.login-page > .page > .page-header .container-xl,
.login-page > .page > .page-header .row { margin: 0; padding: 0; }
.login-page > .page > .page-header .row > .col-3 { display: none; }
.login-page > .page > .page-header .col-lg-6 { width: 100%; padding: 0; }
.login-page > .page > .page-header .card { border: 0; border-radius: 14px; box-shadow: 0 18px 45px rgba(0, 7, 24, .26); }
.login-page > .page > .page-header .card-body { padding: 8px; }
.login-page > .page > .page-header .alert { margin: 0; border: 0; border-radius: 10px; }

/* Privacy e condizioni d'uso */
.legal-page .main-login > .container-fluid {
    display: block !important;
}

.legal-screen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    color: var(--login-ink);
    background:
        linear-gradient(135deg, rgba(7, 16, 39, .98), rgba(10, 31, 75, .94)),
        radial-gradient(circle at 12% 12%, rgba(37, 99, 235, .42), transparent 34%);
}

.legal-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .14;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 50%);
}

.legal-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
}

.legal-glow-one {
    width: 440px;
    height: 440px;
    top: -230px;
    right: -100px;
    background: rgba(56, 189, 248, .13);
}

.legal-glow-two {
    width: 380px;
    height: 380px;
    left: -190px;
    top: 45%;
    background: rgba(37, 99, 235, .16);
}

.legal-container {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 28px clamp(18px, 3vw, 36px) 36px;
}

.legal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.legal-brand:hover { text-decoration: none; }

.legal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 11px;
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, .07);
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.legal-back-link:hover {
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .12);
}

.legal-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    overflow: hidden;
    min-height: 335px;
    padding: clamp(42px, 6vw, 72px);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 30px;
    color: #fff;
    isolation: isolate;
    background:
        radial-gradient(circle at 92% 18%, rgba(125, 211, 252, .25), transparent 25%),
        linear-gradient(135deg, #11337e, #1b57c2 62%, #2473dd);
    box-shadow: 0 28px 70px rgba(0, 7, 24, .31);
}

.legal-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    right: -180px;
    top: -230px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    box-shadow: 0 0 0 72px rgba(255, 255, 255, .025), 0 0 0 145px rgba(255, 255, 255, .018);
}

.legal-hero-copy { max-width: 720px; }

.legal-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(39px, 5vw, 63px);
    font-weight: 760;
    line-height: 1.03;
    letter-spacing: -2.6px;
}

.legal-hero p {
    max-width: 650px;
    margin: 23px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    line-height: 1.75;
}

.legal-hero-icon {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 31px;
    color: #fff;
    font-size: 43px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 20px 45px rgba(5, 20, 55, .2);
    backdrop-filter: blur(8px);
    transform: rotate(5deg);
}

.legal-section-nav {
    position: sticky;
    z-index: 8;
    top: 14px;
    width: min(620px, calc(100% - 36px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: -29px auto 32px;
    padding: 6px;
    border: 1px solid rgba(217, 226, 239, .86);
    border-radius: 16px;
    background: rgba(255, 255, 255, .91);
    box-shadow: 0 15px 38px rgba(13, 27, 56, .16);
    backdrop-filter: blur(16px);
}

.legal-section-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 47px;
    padding: 10px 15px;
    border-radius: 11px;
    color: #6c778d;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.legal-section-nav a:hover {
    color: var(--login-blue);
    text-decoration: none;
    background: #f2f6ff;
}

.legal-section-nav a.is-active {
    color: #fff;
    background: linear-gradient(105deg, var(--login-blue-dark), var(--login-blue));
    box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}

.legal-content {
    padding: clamp(27px, 5vw, 62px);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(0, 7, 24, .25);
}

.legal-draft-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    margin-bottom: clamp(45px, 7vw, 75px);
    padding: 18px 20px;
    border: 1px solid #f6d998;
    border-radius: 15px;
    color: #6e5317;
    background: #fffaf0;
}

.legal-draft-note > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #a86f08;
    background: #ffefc8;
}

.legal-draft-note strong {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

.legal-draft-note p {
    margin: 0;
    color: #8b7138;
    font-size: 11px;
    line-height: 1.6;
}

.legal-article { scroll-margin-top: 100px; }

.legal-article-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 21px;
    margin-bottom: 35px;
}

.legal-section-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--login-blue);
    font-size: 12px;
    font-weight: 800;
    background: #edf3ff;
}

.legal-article-heading .login-eyebrow { margin-bottom: 10px; }

.legal-article-heading h2 {
    margin: 0 0 8px;
    color: var(--login-ink);
    font-size: clamp(30px, 4vw, 43px);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -1.6px;
}

.legal-article-heading p {
    margin: 0;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.6;
}

.legal-block-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.legal-block {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 15px;
    min-height: 155px;
    padding: 22px;
    border: 1px solid #e5eaf2;
    border-radius: 17px;
    background: #f9fbfd;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.legal-block:hover {
    border-color: #cfdcf4;
    box-shadow: 0 13px 28px rgba(35, 56, 94, .07);
    transform: translateY(-2px);
}

.legal-block-wide { grid-column: 1 / -1; min-height: auto; }

.legal-block-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--login-blue);
    font-size: 14px;
    background: #eaf1ff;
}

.legal-block h3 {
    margin: 2px 0 8px;
    color: #26334e;
    font-size: 13px;
    font-weight: 750;
}

.legal-block p {
    margin: 0;
    color: #748097;
    font-size: 11px;
    line-height: 1.72;
}

.legal-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: clamp(62px, 9vw, 100px) 0;
}

.legal-divider::before,
.legal-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e6eaf1;
}

.legal-divider span {
    width: 7px;
    height: 7px;
    margin: 0 13px;
    border-radius: 50%;
    background: #a9b8d7;
}

.legal-footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: clamp(55px, 8vw, 88px);
    padding: 25px 27px;
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(120deg, #102f79, #1d5bca);
}

.legal-footer-card > div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.legal-footer-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #a5e1ff;
    background: rgba(255, 255, 255, .12);
}

.legal-footer-card strong { display: block; margin-bottom: 4px; font-size: 12px; }
.legal-footer-card p { margin: 0; color: rgba(255, 255, 255, .68); font-size: 10px; }

.legal-footer-card > a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 11px;
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
    background: rgba(255, 255, 255, .1);
    transition: background-color .2s ease, transform .2s ease;
}

.legal-footer-card > a:hover {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .17);
    transform: translateY(-1px);
}

.legal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 4px 0;
    color: rgba(255, 255, 255, .46);
    font-size: 9px;
}

html:has(.legal-screen) { scroll-behavior: smooth; }

@media (max-width: 991.98px) {
    .login-screen { padding: 20px; }

    .login-shell {
        grid-template-columns: 1fr;
        width: min(560px, 100%);
        min-height: auto;
        border-radius: 25px;
    }

    .login-showcase { display: none; }

    .login-panel {
        min-height: min(760px, calc(100vh - 40px));
        padding: 44px 48px 26px;
    }

    .mobile-brand { display: flex; }

    .legal-hero-icon {
        width: 90px;
        height: 90px;
        font-size: 35px;
    }
}

@media (max-width: 575.98px) {
    .login-screen {
        display: block;
        min-height: 100svh;
        padding: 0;
        background: #fff;
    }

    .login-screen::before,
    .login-glow { display: none; }

    .login-shell {
        width: 100%;
        min-height: 100svh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-panel {
        min-height: 100svh;
        padding: 30px 24px 22px;
    }

    .mobile-brand { margin-bottom: 58px; }
    .login-heading { margin-bottom: 30px; }
    .login-heading h2 { font-size: 36px; }
    .login-legal { align-items: flex-start; margin-top: 40px; }
    .login-legal div { flex-direction: column; gap: 5px; text-align: right; }

    .legal-container { padding: 22px 14px 28px; }
    .legal-topbar { margin-bottom: 22px; }
    .legal-back-link { padding: 9px 11px; }
    .legal-back-link span { display: none; }

    .legal-hero {
        display: block;
        min-height: auto;
        padding: 40px 25px 62px;
        border-radius: 23px;
    }

    .legal-hero h1 { font-size: 38px; letter-spacing: -1.8px; }
    .legal-hero p { font-size: 13px; }
    .legal-hero-icon { display: none; }

    .legal-section-nav {
        top: 8px;
        width: calc(100% - 22px);
        margin-top: -25px;
    }

    .legal-section-nav a { gap: 7px; padding-inline: 8px; }

    .legal-content {
        padding: 25px 18px;
        border-radius: 22px;
    }

    .legal-draft-note { grid-template-columns: 1fr; padding: 17px; }
    .legal-article-heading { grid-template-columns: 1fr; gap: 14px; }
    .legal-article-heading h2 { font-size: 34px; }
    .legal-block-grid { grid-template-columns: 1fr; }
    .legal-block-wide { grid-column: auto; }
    .legal-block { min-height: auto; padding: 19px; }

    .legal-footer-card {
        align-items: stretch;
        flex-direction: column;
        padding: 22px;
    }

    .legal-footer-card > a { justify-content: center; }
    .legal-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding-left: 4px; }
}

@media (max-height: 760px) and (min-width: 992px) {
    .login-shell { min-height: 680px; }
    .showcase-copy { margin-top: 42px; }
    .showcase-copy h1 { font-size: 46px; }
    .receipt-scene { height: 190px; transform: scale(.88); transform-origin: center bottom; }
    .login-panel { padding-top: 34px; padding-bottom: 22px; }
    .login-heading { margin-bottom: 24px; }
    .login-field { margin-bottom: 16px; }
    .login-legal { margin-top: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-submit,
    .login-submit::before,
    .login-submit i,
    .login-input.form-control,
    .login-input-icon,
    .login-view,
    .recovery-back,
    .recovery-method span { transition: none; }

    .recovery-field.is-active { animation: none; }

    html:has(.legal-screen) { scroll-behavior: auto; }
}
