.auth-body {
    background: #050505;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 78%, rgba(196, 155, 51, 0.1), transparent 34%),
        linear-gradient(90deg, #050505 0%, #080705 54%, #040404 100%);
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        radial-gradient(circle at 12% 20%, #fff 0 0.65px, transparent 1px),
        radial-gradient(circle at 82% 15%, #d9b85e 0 0.75px, transparent 1.1px),
        radial-gradient(circle at 74% 66%, #fff 0 0.55px, transparent 1px),
        radial-gradient(circle at 34% 75%, #fff 0 0.5px, transparent 1px);
    background-size: 390px 390px, 510px 510px, 430px 430px, 360px 360px;
}

.auth-shell {
    position: relative;
    z-index: 2;
    padding: 0;
}

.auth-story-panel {
    position: relative;
    align-items: flex-end;
    min-height: 100vh;
    padding: calc(var(--yuno-header-height) + 80px) clamp(48px, 7vw, 116px) 70px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-story-panel::after {
    content: "";
    position: absolute;
    top: 14%;
    right: -240px;
    width: 560px;
    height: 560px;
    border: 1px solid rgba(230, 196, 98, 0.16);
    border-radius: 50%;
    box-shadow:
        0 0 100px rgba(198, 158, 61, 0.08),
        inset 0 0 100px rgba(198, 158, 61, 0.04);
}

.auth-story-copy {
    position: relative;
    z-index: 2;
    max-width: 610px;
}

.auth-kicker,
.auth-mobile-kicker {
    margin-bottom: 24px;
    color: #d7b454;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.auth-story-copy h1 {
    margin: 0;
    font-family: var(--yuno-serif);
    font-size: clamp(66px, 6vw, 104px);
    font-weight: 500;
    line-height: 0.89;
}

.auth-story-copy h1 em {
    color: #d7b454;
    font-style: normal;
}

.auth-story-copy > p:last-child {
    max-width: 500px;
    margin: 36px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
    line-height: 1.8;
}

.auth-coordinate {
    position: absolute;
    top: calc(var(--yuno-header-height) + 42px);
    left: clamp(48px, 7vw, 116px);
    display: flex;
    gap: 18px;
    color: rgba(255, 255, 255, 0.27);
    font-size: 9px;
    letter-spacing: 0.14em;
}

.auth-form-panel {
    min-height: 100vh;
    padding: calc(var(--yuno-header-height) + 46px) clamp(26px, 6vw, 100px) 50px;
}

.auth-form-wrap {
    max-width: 500px;
    margin: 0 auto;
}

.auth-form-wrap-wide {
    max-width: 720px;
}

.auth-back-link {
    display: inline-flex;
    margin-bottom: 42px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-decoration: none;
    transition: color 180ms ease;
}

.auth-back-link:hover {
    color: #fff;
}

.auth-form-wrap h2 {
    margin: 0;
    font-family: var(--yuno-serif);
    font-size: clamp(46px, 4vw, 64px);
    font-weight: 500;
    line-height: 1;
}

.auth-form-intro {
    margin: 14px 0 30px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.yuno-floating > .form-control {
    height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.025);
    color: #fff;
    box-shadow: none;
}

.yuno-floating > .form-control:focus {
    border-color: rgba(220, 184, 82, 0.72);
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(198, 158, 61, 0.08);
}

.yuno-floating > label {
    color: rgba(255, 255, 255, 0.45);
}

.yuno-floating > .form-control:focus ~ label,
.yuno-floating > .form-control:not(:placeholder-shown) ~ label {
    color: rgba(239, 210, 122, 0.78);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 78px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 6;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    transform: translateY(-50%);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    margin-top: 6px;
    padding: 0 22px;
    border: 1px solid rgba(255, 227, 145, 0.48);
    border-radius: 3px;
    background: linear-gradient(135deg, #d7b657, #b98f2c);
    color: #100d06;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 180ms ease, filter 180ms ease;
}

.auth-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.auth-switch {
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.auth-switch a {
    color: #e5c367;
    text-decoration: none;
}

.yuno-alert {
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 12px;
}

.alert-danger.yuno-alert {
    border-color: rgba(217, 100, 79, 0.35);
    background: rgba(151, 53, 37, 0.13);
}

.alert-success.yuno-alert {
    border-color: rgba(104, 173, 119, 0.3);
    background: rgba(55, 122, 70, 0.12);
}

.password-hint {
    margin: -6px 0 0;
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
}

.yuno-check {
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

.yuno-check .form-check-input {
    border-color: rgba(255, 255, 255, 0.22);
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.yuno-check .form-check-input:checked {
    border-color: #c5a03d;
    background-color: #c5a03d;
}

.auth-orbit {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(198, 158, 61, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.auth-orbit-one {
    top: 18%;
    right: -120px;
    width: 500px;
    height: 500px;
}

.auth-orbit-two {
    right: 90px;
    bottom: -310px;
    width: 620px;
    height: 620px;
}

@media (max-width: 991.98px) {
    .auth-form-panel {
        padding-top: calc(var(--yuno-header-height) + 44px);
    }

    .auth-form-wrap,
    .auth-form-wrap-wide {
        max-width: 640px;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        align-items: flex-start !important;
        padding: calc(var(--yuno-header-height) + 32px) 20px 38px;
    }

    .auth-back-link {
        margin-bottom: 34px;
    }

    .auth-form-wrap h2 {
        font-size: 46px;
    }

    .auth-submit {
        min-height: 54px;
    }
}

.yuno-floating > .form-control:focus ~ label::after,
.yuno-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background: transparent !important;
}

/*
|--------------------------------------------------------------------------
| YUNO Auth V8.0 — pannello visuale cinematico dalla demo storica
|--------------------------------------------------------------------------
*/

.auth-story-panel {
    isolation: isolate;
    overflow: hidden;
    background: #080705;
}

.auth-story-media,
.auth-story-shade {
    position: absolute;
    inset: 0;
}

.auth-story-media {
    z-index: -3;
    background-position: center;
    background-size: cover;
    filter: sepia(10%) brightness(0.42) contrast(1.12) saturate(0.82);
    transform: scale(1.055);
    animation: yuno-auth-breathe 14s ease-in-out infinite alternate;
}

.auth-story-media-login {
    background-image: url('/assets/images/journeys/patagonia.webp');
}

.auth-story-media-register {
    background-image: url('/assets/images/journeys/bali.webp');
}

.auth-story-shade {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.06) 0%, rgba(5, 5, 5, 0.28) 55%, #080705 100%),
        linear-gradient(0deg, rgba(5, 5, 5, 0.88) 0%, transparent 60%);
}

.auth-story-credit {
    position: absolute;
    top: calc(var(--yuno-header-height) + 42px);
    right: clamp(32px, 4vw, 62px);
    z-index: 3;
    margin: 0;
    color: rgba(245, 239, 227, 0.38);
    font-size: 9px;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.auth-story-panel::after {
    z-index: -1;
}

.auth-coordinate,
.auth-story-copy {
    z-index: 3;
}

.auth-form-wrap {
    animation: yuno-auth-form-in 760ms cubic-bezier(.16, 1, .3, 1) both;
}

.auth-submit {
    position: relative;
    overflow: hidden;
}

.auth-submit-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #d5b55d;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.auth-submit-loader i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #100d06;
    animation: yuno-auth-dot 800ms ease-in-out infinite;
}

.auth-submit-loader i:nth-child(2) { animation-delay: 120ms; }
.auth-submit-loader i:nth-child(3) { animation-delay: 240ms; }

.auth-submit.is-loading .auth-submit-label,
.auth-submit.is-loading .auth-submit-arrow {
    opacity: 0;
}

.auth-submit.is-loading .auth-submit-loader {
    opacity: 1;
}

@keyframes yuno-auth-breathe {
    from { transform: scale(1.055); }
    to { transform: scale(1.015); }
}

@keyframes yuno-auth-form-in {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes yuno-auth-dot {
    0%, 80%, 100% { opacity: 0.38; transform: scale(0.65); }
    40% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-story-media,
    .auth-form-wrap,
    .auth-submit-loader i {
        animation: none !important;
    }
}

/* Correzione stacking del pannello fotografico. */
.auth-story-media { z-index: 0; }
.auth-story-shade { z-index: 1; }
.auth-story-panel::after { z-index: 2; }
.auth-story-copy,
.auth-coordinate,
.auth-story-credit { z-index: 3; }

/*
|--------------------------------------------------------------------------
| YUNO Auth V10.0 — sottotitolo narrativo, senza card sovrapposta
|--------------------------------------------------------------------------
*/

.auth-story-copy {
    max-width: 610px;
    padding-bottom: 0;
}

.auth-story-subtitle {
    position: relative;
    max-width: 500px;
    margin: 34px 0 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.78;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
}

.auth-story-subtitle::before {
    content: "";
    position: absolute;
    top: 0.55em;
    left: 0;
    width: 1px;
    height: calc(100% - 0.75em);
    min-height: 28px;
    background: linear-gradient(180deg, rgba(232, 105, 58, 0.95), rgba(232, 105, 58, 0.08));
}

.auth-story-media-partner {
    background-image: url('/assets/images/journeys/yucatan.webp');
}

.auth-story-media-recovery {
    background-image: url('/assets/images/journeys/marocco.webp');
}

.auth-story-media-reset {
    background-image: url('/assets/images/journeys/islanda.webp');
}

.role-selector {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
}

.role-selector legend {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.role-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.role-option {
    position: relative;
    min-height: 132px;
    padding: 20px 20px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.018);
    cursor: pointer;
    transition:
        border-color 220ms ease,
        background 220ms ease,
        transform 220ms ease,
        box-shadow 220ms ease;
}

.role-option:hover,
.role-option.is-selected {
    border-color: rgba(220, 184, 82, 0.66);
    background:
        radial-gradient(circle at 90% 10%, rgba(213, 180, 83, 0.13), transparent 38%),
        rgba(255, 255, 255, 0.03);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

.role-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.role-option-index {
    position: absolute;
    top: 18px;
    right: 18px;
    color: rgba(220, 184, 82, 0.5);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.role-option strong {
    display: block;
    margin: 10px 0 9px;
    color: #f5f0e7;
    font-family: var(--yuno-serif);
    font-size: 28px;
    font-weight: 500;
}

.role-option small {
    display: block;
    max-width: 250px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    line-height: 1.55;
}

.role-option.is-selected::after {
    content: "✓";
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: #d9b857;
    font-size: 13px;
}

.role-help {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
    line-height: 1.55;
}

.role-help strong {
    color: rgba(224, 190, 94, 0.8);
    font-weight: 600;
}

.partner-register-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.018);
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
}

.partner-register-callout a,
.auth-form-tools a,
.auth-inline-cta {
    color: #e1bd5c;
    text-decoration: none;
}

.partner-register-callout a:hover,
.auth-form-tools a:hover,
.auth-inline-cta:hover {
    color: #f4d981;
}

.auth-form-tools {
    display: flex;
    justify-content: flex-end;
    margin-top: -7px;
    font-size: 11px;
}

.auth-switch-secondary {
    margin-top: 10px;
}

.auth-inline-cta {
    display: inline-flex;
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.password-recovery-page .auth-form-wrap {
    max-width: 560px;
}

.partner-register-page .auth-form-panel {
    padding-top: calc(var(--yuno-header-height) + 28px);
    padding-bottom: 34px;
}

.partner-register-page .auth-form-wrap h2 {
    font-size: clamp(42px, 3.4vw, 58px);
}

.partner-register-page .auth-form-intro {
    margin-bottom: 22px;
}

@media (max-width: 1500px) and (min-width: 992px) {
    .auth-story-copy {
        max-width: 560px;
    }

    .auth-story-subtitle {
        max-width: 450px;
    }
}

@media (max-width: 991.98px) {
    .role-selector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .role-selector-grid {
        grid-template-columns: 1fr;
    }

    .role-option {
        min-height: 116px;
    }

    .partner-register-callout {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }
}
