:root {
    --auth-bg: #08090c;
    --auth-surface: #12151b;
    --auth-surface-soft: #181b23;
    --auth-border: rgba(255, 255, 255, 0.09);
    --auth-border-gold: rgba(246, 167, 53, 0.34);
    --auth-text: #f8f3eb;
    --auth-muted: #9da0a9;
    --auth-gold: #f6a735;
    --auth-gold-light: #ffd47d;
    --auth-orange: #f06a24;
    --auth-green: #53d5a2;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
}

body.premium-auth-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    margin: 0;
    color: var(--auth-text);
    background:
        linear-gradient(100deg, rgba(8, 9, 12, 0.98), rgba(8, 9, 12, 0.91) 48%, rgba(8, 9, 12, 0.8)),
        url('../../../back.jpg') center / cover fixed no-repeat,
        var(--auth-bg);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.premium-auth-shell h1,
body.premium-auth-shell h2,
body.premium-auth-shell h3,
body.premium-auth-shell h4,
body.premium-auth-shell strong {
    font-family: "Philosopher", Georgia, serif;
}

.auth-skip-link {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 10000;
    padding: 10px 15px;
    border-radius: 10px;
    color: #161006;
    background: #fff7e8;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 180ms ease;
}

.auth-skip-link:focus {
    transform: translateY(0);
}

.auth-topbar {
    position: relative;
    z-index: 20;
    min-height: 78px;
    border-bottom: 1px solid rgba(246, 167, 53, 0.18);
    background: rgba(8, 9, 12, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-topbar .container,
.auth-footer .container,
.auth-login-page .container {
    width: min(100% - 40px, 1240px);
    max-width: 1240px;
    margin-inline: auto;
    padding-right: 0;
    padding-left: 0;
}

.auth-topbar__inner {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-text);
    text-decoration: none;
}

.auth-brand:hover {
    color: #fff;
}

.auth-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(246, 167, 53, 0.28));
}

.auth-brand > span {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.auth-brand strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.auth-brand small {
    margin-top: 5px;
    color: #83868f;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-back-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    color: #c9cad0;
    background: rgba(255, 255, 255, 0.025);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.auth-back-link:hover {
    border-color: rgba(246, 167, 53, 0.38);
    color: var(--auth-gold-light);
    transform: translateY(-1px);
}

.premium-auth-main {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: calc(100vh - 136px);
    flex: 1;
    flex-direction: column;
}

.premium-auth-main::before,
.premium-auth-main::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(110px);
}

.premium-auth-main::before {
    top: 12%;
    right: -170px;
    background: rgba(240, 106, 36, 0.13);
}

.premium-auth-main::after {
    bottom: -220px;
    left: -130px;
    background: rgba(246, 167, 53, 0.09);
}

.auth-login-page {
    display: flex;
    min-height: calc(100vh - 136px);
    align-items: center;
    padding: 56px 0;
}

.auth-login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.82fr);
    align-items: stretch;
    gap: 0;
    min-height: 610px;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 30px;
    background: rgba(13, 15, 19, 0.88);
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.43);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.auth-login-story {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    padding: 58px;
    overflow: hidden;
    border-right: 1px solid var(--auth-border);
    background:
        radial-gradient(circle at 70% 70%, rgba(246, 167, 53, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(19, 21, 27, 0.96), rgba(9, 10, 13, 0.92));
}

.auth-login-story::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255, 255, 255, 0.025) 25%),
        repeating-linear-gradient(0deg, transparent 0, transparent calc(25% - 1px), rgba(255, 255, 255, 0.02) 25%);
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000);
}

.auth-login-story__glow {
    position: absolute;
    top: -110px;
    left: -100px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(240, 106, 36, 0.13);
    filter: blur(90px);
}

.auth-login-story__content {
    position: relative;
    z-index: 2;
    max-width: 560px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-gold);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.auth-eyebrow i {
    display: block;
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, var(--auth-gold), var(--auth-orange));
}

.auth-login-story h1 {
    margin: 20px 0 22px;
    color: #fff;
    font-size: clamp(52px, 5.6vw, 78px);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.auth-login-story h1 em {
    color: transparent;
    font-style: normal;
    background: linear-gradient(100deg, var(--auth-gold-light), var(--auth-gold), var(--auth-orange));
    -webkit-background-clip: text;
    background-clip: text;
}

.auth-login-story__content > p {
    max-width: 520px;
    margin: 0;
    color: #aaaeb7;
    font-size: 16px;
    line-height: 1.75;
}

.auth-login-story__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 28px;
}

.auth-login-story__trust span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #858892;
    font-size: 11px;
    font-weight: 700;
}

.auth-login-story__trust i {
    color: var(--auth-green);
}

.auth-login-story__brand {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 250px;
    margin-top: 30px;
    place-items: center;
}

.auth-login-story__brand img {
    position: relative;
    z-index: 2;
    width: min(290px, 65%);
    height: auto;
    filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.45));
}

.auth-login-story__orbit {
    position: absolute;
    border: 1px solid rgba(246, 167, 53, 0.19);
    border-radius: 50%;
}

.auth-login-story__orbit--outer {
    width: 340px;
    height: 340px;
    animation: auth-spin 38s linear infinite;
}

.auth-login-story__orbit--outer::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-gold);
    box-shadow: 0 0 15px rgba(246, 167, 53, 0.8);
}

.auth-login-story__orbit--inner {
    width: 250px;
    height: 250px;
    border-style: dashed;
    animation: auth-spin 28s linear infinite reverse;
}

.auth-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 54px;
    background: rgba(10, 12, 16, 0.88);
}

.auth-login-card {
    width: min(100%, 430px);
}

.auth-login-card__heading {
    margin-bottom: 34px;
}

.auth-login-card__heading h2 {
    margin: 12px 0 7px;
    color: #fff;
    font-size: clamp(38px, 4vw, 50px);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.auth-login-card__heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-login-form {
    display: grid;
    gap: 20px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field > label {
    color: #c8cad0;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.auth-field__control {
    position: relative;
}

.auth-field__control > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    color: #6f737d;
    font-size: 14px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color 180ms ease;
}

.auth-field__control input {
    width: 100%;
    min-height: 54px;
    padding: 0 48px 0 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    font-size: 14px;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.auth-field__control input::placeholder {
    color: #666a74;
}

.auth-field__control:focus-within input {
    border-color: var(--auth-gold);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 0 0 4px rgba(246, 167, 53, 0.1);
}

.auth-field__control:focus-within > i {
    color: var(--auth-gold);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #83868f;
    background: transparent;
    place-items: center;
    transform: translateY(-50%);
    transition: color 180ms ease, background 180ms ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: var(--auth-gold-light);
    background: rgba(246, 167, 53, 0.08);
}

.auth-login-form__options {
    display: flex;
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #a3a6af;
    cursor: pointer;
    font-size: 12px;
}

.auth-remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    accent-color: var(--auth-gold);
}

.auth-login-form__options > a {
    color: var(--auth-gold-light);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.auth-login-form__options > a:hover {
    color: #fff;
}

.auth-submit-button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 20px;
    border: 1px solid rgba(255, 212, 125, 0.38);
    border-radius: 14px;
    color: #1c1004;
    background: linear-gradient(135deg, var(--auth-gold-light), var(--auth-gold) 50%, var(--auth-orange));
    box-shadow: 0 16px 38px rgba(240, 106, 36, 0.18);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.auth-submit-button:hover,
.auth-submit-button:focus-visible {
    box-shadow: 0 20px 44px rgba(240, 106, 36, 0.28);
    transform: translateY(-2px);
}

.auth-submit-button i {
    transition: transform 180ms ease;
}

.auth-submit-button:hover i {
    transform: translateX(4px);
}

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: -4px;
    color: #747781;
    font-size: 10px;
}

.auth-security-note i {
    color: var(--auth-green);
}

.auth-alternative-login {
    position: relative;
    display: grid;
    gap: 13px;
    margin-top: 3px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.auth-alternative-login > span {
    position: absolute;
    top: 0;
    left: 50%;
    padding: 0 10px;
    color: #666a73;
    background: #0c0e12;
    font-size: 10px;
    text-transform: uppercase;
    transform: translate(-50%, -50%);
}

.auth-alternative-login > a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--auth-border);
    border-radius: 13px;
    color: #d6d7dc;
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.auth-alternative-login > a:hover {
    border-color: var(--auth-border-gold);
    color: var(--auth-gold-light);
    background: rgba(246, 167, 53, 0.055);
}

.auth-register-link {
    margin: 0;
    color: #858891;
    font-size: 12px;
    text-align: center;
}

.auth-register-link a {
    color: var(--auth-gold-light);
    font-weight: 850;
    text-decoration: none;
}

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

.auth-footer {
    position: relative;
    z-index: 2;
    min-height: 58px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    background: rgba(8, 9, 12, 0.86);
}

.auth-footer .container {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #656872;
    font-size: 10px;
    letter-spacing: 0.025em;
}

/* Other authentication screens continue to use the shared card component. */
.premium-auth-main > .container {
    width: min(100% - 40px, 1080px);
    max-width: 1080px;
    margin: auto;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

.premium-auth-main .card {
    overflow: hidden;
    border: 1px solid var(--auth-border-gold);
    border-radius: 24px;
    color: var(--auth-text);
    background: rgba(16, 18, 23, 0.96);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.premium-auth-main .card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--auth-border);
    color: #fff;
    background: rgba(246, 167, 53, 0.07);
    font-family: "Philosopher", Georgia, serif;
    font-size: 26px;
}

.premium-auth-main .card-body {
    padding: 28px;
}

.premium-auth-main .card .form-control {
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.premium-auth-main .card .form-control:focus {
    border-color: var(--auth-gold);
    box-shadow: 0 0 0 4px rgba(246, 167, 53, 0.1);
}

.premium-auth-main .card .btn-primary {
    border: 0;
    border-radius: 13px;
    color: #1b1004;
    background: linear-gradient(135deg, var(--auth-gold-light), var(--auth-orange));
    font-weight: 850;
}

.premium-auth-main .card a {
    color: var(--auth-gold-light);
}

/* Password strength elements used by registration. */
div#pass-meter {
    display: flex;
    height: 100%;
    flex-direction: column-reverse;
}

div#pass-meter .segment {
    display: block;
    min-height: 8px;
    flex: 1;
    border: 1px solid #363942;
    background: #2a2d35;
}

div#pass-meter.good .segment {
    border-color: var(--bs-success);
    background: var(--bs-success);
}

div#pass-meter.warn .segment {
    border-color: var(--bs-warning);
    background: var(--bs-warning);
}

div#pass-meter.bad .segment {
    border-color: var(--bs-danger);
    background: var(--bs-danger);
}

div#pass-meter.str-1 .segment:nth-child(2),
div#pass-meter.str-1 .segment:nth-child(3),
div#pass-meter.str-1 .segment:nth-child(4),
div#pass-meter.str-2 .segment:nth-child(3),
div#pass-meter.str-2 .segment:nth-child(4),
div#pass-meter.str-3 .segment:nth-child(4) {
    border-color: #363942;
    background: #2a2d35;
}

.pass-match-wrap {
    display: flex;
    width: 53px;
}

.pass-match,
.pass-not-match {
    display: inline-block;
    color: var(--bs-success);
    font-size: 1.5rem;
}

.pass-not-match {
    color: var(--bs-danger);
}

.collapsible .signal {
    position: absolute;
    right: 5px;
}

/* Alerts */
#alerts-wrapper.auth-alerts {
    position: fixed;
    top: 94px;
    right: 18px;
    left: auto;
    z-index: 9999;
    width: min(420px, calc(100vw - 36px));
    min-width: 0;
}

#alerts-wrapper .alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    color: #fff;
    background: rgba(20, 22, 28, 0.97);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.32);
}

#alerts-wrapper .alert-message {
    flex: 1;
}

#alerts-wrapper .alert-primary { border-left: 3px solid var(--bs-primary); }
#alerts-wrapper .alert-info { border-left: 3px solid var(--bs-info); }
#alerts-wrapper .alert-warning { border-left: 3px solid var(--bs-warning); }
#alerts-wrapper .alert-danger { border-left: 3px solid var(--bs-danger); }
#alerts-wrapper .alert-success { border-left: 3px solid var(--bs-success); }

.accordion-button:not(.collapsed) {
    color: #fff;
    background: rgba(246, 167, 53, 0.14);
}

.accordion-item {
    border-color: var(--auth-border-gold);
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .auth-login-layout {
        grid-template-columns: 1fr;
        width: min(100% - 40px, 650px) !important;
    }

    .auth-login-story {
        min-height: 340px;
        padding: 42px;
        border-right: 0;
        border-bottom: 1px solid var(--auth-border);
    }

    .auth-login-story h1 {
        font-size: clamp(48px, 10vw, 68px);
    }

    .auth-login-story__content {
        max-width: 470px;
    }

    .auth-login-story__brand {
        position: absolute;
        right: -50px;
        bottom: -60px;
        width: 340px;
        opacity: 0.42;
    }

    .auth-login-story__brand img {
        width: 58%;
    }

    .auth-login-panel {
        padding: 48px;
    }
}

@media (max-width: 575.98px) {
    .auth-topbar .container,
    .auth-footer .container,
    .auth-login-page .container {
        width: min(100% - 28px, 1240px);
    }

    .auth-brand img {
        width: 39px;
        height: 39px;
    }

    .auth-brand strong {
        font-size: 16px;
    }

    .auth-brand small {
        display: none;
    }

    .auth-back-link {
        width: 42px;
        padding: 0;
        font-size: 0;
    }

    .auth-back-link i {
        font-size: 12px;
    }

    .auth-login-page {
        padding: 22px 0;
    }

    .auth-login-layout {
        width: min(100% - 24px, 650px) !important;
        border-radius: 22px;
    }

    .auth-login-story {
        min-height: 270px;
        padding: 30px 26px;
    }

    .auth-login-story h1 {
        margin: 15px 0;
        font-size: 45px;
    }

    .auth-login-story__content > p {
        font-size: 14px;
    }

    .auth-login-story__trust {
        gap: 8px 15px;
        margin-top: 20px;
    }

    .auth-login-story__brand {
        right: -95px;
        bottom: -105px;
    }

    .auth-login-panel {
        padding: 34px 24px;
    }

    .auth-login-card__heading {
        margin-bottom: 28px;
    }

    .auth-login-card__heading h2 {
        font-size: 38px;
    }

    .auth-login-form__options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .auth-footer .container {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 1px;
        padding: 12px 0;
    }

    .premium-auth-main > .container {
        width: min(100% - 28px, 1080px);
        padding: 28px 0 !important;
    }

    .premium-auth-main .card-body {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.premium-auth-shell :focus-visible {
    outline: 3px solid var(--auth-gold-light);
    outline-offset: 3px;
}
