.auth-page {
    --auth-gold: #baa361;
    --auth-gold-deep: #baa361;
    --auth-ink: #171c21;
    --auth-ink-soft: #171c21;
    --auth-surface: rgba(255, 255, 255, 0.92);
    --auth-surface-strong: rgba(255, 252, 246, 0.98);
    --auth-border: rgba(186, 163, 97, 0.24);
    --auth-shadow: 0 30px 80px rgba(23, 28, 33, 0.10);
    --auth-shadow-hover: 0 36px 100px rgba(23, 28, 33, 0.14);
    --auth-grad-x: 18%;
    --auth-grad-y: 14%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    position: relative;
    background:
        radial-gradient(circle at var(--auth-grad-x) var(--auth-grad-y), rgba(186, 163, 97, 0.24), transparent 28%),
        radial-gradient(circle at 82% 76%, rgba(255, 255, 255, 0.95), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fbfaf7 52%, #f5f2eb 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    animation: authGradientShift 18s ease-in-out infinite alternate;
}

.auth-page .auth-shell {
    position: relative;
    overflow: hidden;
}

.auth-page > .container {
    display: flex;
    align-items: center;
    position: relative;
}

.auth-page .auth-grid {
    position: relative;
    z-index: 1;
    width: 100%;
}

.auth-page .auth-brand-panel,
.auth-page .auth-form-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    min-height: clamp(38rem, 72vh, 44rem);
    height: clamp(38rem, 72vh, 44rem);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.auth-page .auth-brand-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.98)),
        linear-gradient(145deg, rgba(186, 163, 97, 0.08), rgba(255, 255, 255, 0));
    color: var(--auth-ink);
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(186, 163, 97, 0.18);
}

.auth-page .auth-form-card {
    background: var(--auth-surface-strong);
    border: 1px solid rgba(29, 26, 22, 0.06);
    box-shadow: var(--auth-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.auth-page .auth-form-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--auth-shadow-hover);
    border-color: var(--auth-border);
}

.auth-page .auth-brand-inner,
.auth-page .auth-form-inner {
    padding: 1.5rem;
}

.auth-page .auth-brand-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-page .auth-form-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: auto;
}

.auth-page .auth-brand-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 24rem);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.auth-page .auth-brand-home:hover,
.auth-page .auth-brand-home:focus-visible {
    transform: translateY(-2px) scale(1.01);
    opacity: 0.96;
}

.auth-page .auth-brand-logo {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 35px rgba(23, 28, 33, 0.08));
}

.auth-page .auth-kicker {
    margin-bottom: 0.55rem;
    color: var(--auth-gold);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.auth-page .auth-brand-title {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 0.75rem;
    max-width: 14ch;
}

.auth-page .auth-brand-copy {
    color: rgba(23, 28, 33, 0.68);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 34rem;
    margin-bottom: 1rem;
}

.auth-page .auth-brand-points {
    display: grid;
    gap: 0.75rem;
    width: min(100%, 28rem);
}

.auth-page .auth-brand-point {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(23, 28, 33, 0.86);
    padding: 0.75rem 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(186, 163, 97, 0.14);
}

.auth-page .auth-brand-dot {
    width: 0.8rem;
    height: 0.8rem;
    flex: 0 0 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #d8c486, var(--auth-gold));
    box-shadow: 0 0 0 6px rgba(186, 163, 97, 0.12);
}

.auth-page .auth-brand-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(18px);
}

.auth-page .auth-brand-glow-one {
    inset: auto auto -3rem -3rem;
    width: 12rem;
    height: 12rem;
    background: rgba(186, 163, 97, 0.12);
}

.auth-page .auth-brand-glow-two {
    inset: 2rem -2rem auto auto;
    width: 9rem;
    height: 9rem;
    background: rgba(255, 255, 255, 0.88);
}

.auth-page .auth-caption {
    margin-bottom: 0.55rem;
    color: var(--auth-gold-deep);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
}

.auth-page .auth-mode-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
    padding: 0.35rem;
    margin-bottom: 1.1rem;
    border-radius: 1rem;
    background: rgba(186, 163, 97, 0.08);
    border: 1px solid rgba(186, 163, 97, 0.14);
}

.auth-page .auth-mode-link {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    color: rgba(23, 28, 33, 0.74);
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.auth-page .auth-mode-link:hover,
.auth-page .auth-mode-link:focus-visible {
    color: var(--auth-ink);
    transform: translateY(-1px);
}

.auth-page .auth-mode-link.is-active {
    background: linear-gradient(135deg, #baa361 0%, #d4c081 100%);
    color: #090909;
    box-shadow: 0 12px 24px rgba(186, 163, 97, 0.22);
}

.auth-page .auth-title {
    color: var(--auth-ink);
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.auth-page .auth-stage {
    position: relative;
    min-height: 28rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-page .auth-subtitle {
    color: rgba(23, 28, 33, 0.68);
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.auth-page .auth-label {
    display: inline-block;
    color: var(--auth-ink);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.auth-page .auth-help {
    margin-top: 0.5rem;
    color: rgba(23, 28, 33, 0.58);
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-page .auth-input,
.auth-page .auth-form-card .form-control {
    min-height: 3.45rem;
    border-radius: 1rem;
    border: 1px solid rgba(29, 26, 22, 0.11);
    background: #fffdfa;
    padding: 0.95rem 1rem;
    color: var(--auth-ink);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
}

.auth-page .auth-input::placeholder,
.auth-page .auth-form-card .form-control::placeholder {
    color: rgba(23, 28, 33, 0.38);
}

.auth-page .auth-input:hover,
.auth-page .auth-form-card .form-control:hover {
    border-color: rgba(186, 163, 97, 0.56);
}

.auth-page .auth-input:focus,
.auth-page .auth-form-card .form-control:focus {
    border-color: var(--auth-gold);
    background: #ffffff;
    box-shadow: 0 0 0 0.28rem rgba(186, 163, 97, 0.22);
    transform: translateY(-1px);
}

.auth-page .auth-field.has-error .auth-input,
.auth-page .auth-field.has-error .form-control {
    border-color: #b02a37;
    background: #fff8f8;
    box-shadow: 0 0 0 0.22rem rgba(176, 42, 55, 0.12);
}

.auth-page .auth-error-list,
.auth-page .auth-error-text {
    margin: 0.5rem 0 0;
    color: #8f1d27;
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-page .auth-error-list {
    padding-left: 1.1rem;
}

.auth-page .auth-alert {
    border-radius: 1rem;
    border: 1px solid rgba(176, 42, 55, 0.18);
    background: #fff5f5;
    color: #7f1d1d;
    padding: 0.95rem 1rem;
    margin-bottom: 0.9rem;
}

.auth-page .auth-actions {
    margin-top: 1rem;
}

.auth-page .auth-submit {
    min-height: 3.45rem;
    border: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, #baa361 0%, #d0ba7d 100%);
    color: #090909;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 18px 30px rgba(186, 163, 97, 0.26);
    transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.auth-page .auth-submit:hover,
.auth-page .auth-submit:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 40px rgba(186, 163, 97, 0.32);
    filter: saturate(1.04);
}

.auth-page .auth-submit:focus-visible,
.auth-page a:focus-visible {
    outline: 3px solid rgba(186, 163, 97, 0.34);
    outline-offset: 3px;
}

.auth-page .auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.auth-page .auth-link,
.auth-page .auth-inline-link {
    color: var(--auth-ink-soft);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.auth-page .auth-link-highlight {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #baa361 0%, #d6c282 100%);
    color: #181614;
    box-shadow: 0 14px 28px rgba(186, 163, 97, 0.24);
}

.auth-page .auth-link-highlight:hover,
.auth-page .auth-link-highlight:focus-visible {
    color: #181614;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(186, 163, 97, 0.3);
}

.auth-page .auth-link:hover,
.auth-page .auth-link:focus-visible,
.auth-page .auth-inline-link:hover,
.auth-page .auth-inline-link:focus-visible {
    color: var(--auth-gold-deep);
}

.auth-page .auth-footer-note {
    margin-top: 1rem;
    color: rgba(23, 28, 33, 0.66);
}

.auth-page .auth-split-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

@keyframes authGradientShift {
    0% {
        background-position: 0% 0%, 0% 0%, 0% 0%;
    }
    100% {
        background-position: 3% -2%, -2% 3%, 0% 0%;
    }
}

@keyframes authSlideInLeft {
    from {
        transform: translateX(-34px);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes authSlideInRight {
    from {
        transform: translateX(34px);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes authSlideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-34px);
    }
}

@keyframes authSlideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(34px);
    }
}

.auth-page.switch-enter-left .auth-brand-panel,
.auth-page.switch-enter-left .auth-form-card {
    animation: authSlideInLeft 0.28s ease both;
}

.auth-page.switch-enter-right .auth-brand-panel,
.auth-page.switch-enter-right .auth-form-card {
    animation: authSlideInRight 0.28s ease both;
}

.auth-page.switch-exit-left .auth-brand-panel,
.auth-page.switch-exit-left .auth-form-card {
    animation: authSlideOutLeft 0.2s ease both;
}

.auth-page.switch-exit-right .auth-brand-panel,
.auth-page.switch-exit-right .auth-form-card {
    animation: authSlideOutRight 0.2s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .auth-page,
    .auth-page .auth-brand-panel,
    .auth-page .auth-form-card,
    .auth-page .auth-home,
    .auth-page .auth-mode-link,
    .auth-page .auth-submit,
    .auth-page .auth-input,
    .auth-page .auth-form-card .form-control {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 991.98px) {
    .auth-page {
        min-height: auto;
    }

    .auth-page > .container {
        display: block;
    }

    .auth-page .auth-brand-inner,
    .auth-page .auth-form-inner {
        padding: 1.5rem;
    }

    .auth-page .auth-brand-panel,
    .auth-page .auth-form-card {
        min-height: 0;
        height: auto;
    }

    .auth-page .auth-brand-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 767.98px) {
    .auth-page .auth-shell {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .auth-page .auth-split-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-page .auth-brand-logo {
        max-width: 18rem;
    }

    .auth-page .auth-links {
        flex-direction: column;
        align-items: flex-start;
    }
}
