:root {
    --auth-green-950: #082f22;
    --auth-green-900: #0d5a3f;
    --auth-green-800: #10744f;
    --auth-green-700: #159565;
    --auth-green-100: #e8f4ee;
    --auth-gold: #d6a93b;
    --auth-ink: #13231d;
    --auth-muted: #64746d;
    --auth-line: rgba(15, 63, 47, .14);
    --auth-glass: rgba(255, 255, 255, .68);
    --auth-glass-strong: rgba(255, 255, 255, .84);
}

html,
body.auth-page {
    min-height: 100%;
}

body.auth-page {
    margin: 0;
    color: var(--auth-ink);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(214, 169, 59, .18), transparent 28%),
        radial-gradient(circle at 86% 72%, rgba(23, 107, 79, .16), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f7fbf8 46%, #eef7f1 100%) !important;
    background:
        radial-gradient(circle at 12% 18%, rgba(214, 169, 59, .18), transparent 28%),
        radial-gradient(circle at 86% 72%, rgba(23, 107, 79, .16), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f7fbf8 46%, #eef7f1 100%) !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.auth-shell {
    min-height: 100vh;
    position: relative;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.auth-shell::before {
    width: 430px;
    height: 430px;
    top: -170px;
    right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 63, 47, .20), rgba(15, 63, 47, 0) 66%);
}

.auth-shell::after {
    width: 320px;
    height: 320px;
    left: -120px;
    bottom: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 169, 59, .22), rgba(214, 169, 59, 0) 68%);
}

.auth-shell > * {
    position: relative;
    z-index: 1;
}

.auth-top-menu {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.auth-page .auth-top-menu.navbar,
body.auth-page .auth-top-menu .navbar,
body.auth-page .navbar.bg-light {
    min-height: 64px;
    padding: 7px 20px;
    background:
        linear-gradient(135deg, rgba(8, 78, 52, .96), rgba(18, 110, 76, .86)),
        linear-gradient(90deg, rgba(214, 169, 59, .16), rgba(255, 255, 255, .08)) !important;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 18px 52px rgba(8, 47, 34, .24);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

body.auth-page .navbar-brand {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .42);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .16);
}

body.auth-page .navbar-brand img {
    width: 30px;
    height: 30px;
}

body.auth-page .navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    font-weight: 600;
    transition: color .18s ease, background .18s ease;
}

body.auth-page .navbar-light .navbar-nav .nav-link:hover,
body.auth-page .navbar-light .navbar-nav .nav-link:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, .14);
}

body.auth-page .navbar-light .navbar-nav .nav-link.dropdown-toggle,
body.auth-page .navbar-light .navbar-nav .nav-link[href="/forced-support"] {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
}

body.auth-page .navbar-light .navbar-nav .nav-link.dropdown-toggle:hover,
body.auth-page .navbar-light .navbar-nav .nav-link[href="/forced-support"]:hover {
    background: rgba(255, 255, 255, .14);
}

body.auth-page .navbar-light .navbar-toggler {
    border-color: rgba(255, 255, 255, .24);
    border-radius: 8px;
    background: rgba(255, 255, 255, .18);
}

body.auth-page .navbar-light .navbar-toggler-icon {
    filter: invert(1) brightness(1.6);
}

body.auth-page .dropdown-menu {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(15, 63, 47, .12);
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 24px 64px rgba(8, 47, 34, .22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.auth-page .dropdown-item {
    border-radius: 7px;
    color: var(--auth-green-900);
    font-weight: 700;
}

body.auth-page .dropdown-item:hover,
body.auth-page .dropdown-item:focus {
    background: rgba(232, 244, 238, .86);
    color: var(--auth-green-950);
}

.auth-stage {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 120px);
    margin: 0 auto;
    padding: 46px 0 54px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .72fr);
    gap: 34px;
    align-items: center;
}

.auth-hero,
.auth-panel {
    position: relative;
}

.auth-hero {
    min-height: 520px;
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .70), rgba(255, 255, 255, .36)),
        linear-gradient(145deg, rgba(15, 63, 47, .08), rgba(214, 169, 59, .08));
    box-shadow: 0 28px 80px rgba(15, 63, 47, .13);
    overflow: hidden;
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(15, 63, 47, .08);
    border-radius: 8px;
    pointer-events: none;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 76px;
}

.auth-brand-mark {
    width: 58px;
    height: 58px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .74);
    border: 1px solid rgba(15, 63, 47, .12);
    box-shadow: 0 18px 42px rgba(15, 63, 47, .10);
}

.auth-kicker,
.auth-eyebrow {
    margin: 0 0 6px;
    color: var(--auth-green-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-brand h1 {
    max-width: 720px;
    margin: 0;
    color: var(--auth-green-950);
    font-size: 46px;
    line-height: 1.04;
    font-weight: 800;
}

.auth-lead {
    max-width: 660px;
    margin: 0;
    color: #31443c;
    font-size: 19px;
    line-height: 1.62;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 58px;
}

.auth-feature {
    min-height: 132px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .70);
    border-radius: 8px;
    background: rgba(255, 255, 255, .52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88), 0 12px 36px rgba(15, 63, 47, .08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-feature span {
    display: block;
    margin-bottom: 20px;
    color: var(--auth-gold);
    font-size: 13px;
    font-weight: 800;
}

.auth-feature strong {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-green-950);
    font-size: 17px;
}

.auth-feature small {
    display: block;
    color: var(--auth-muted);
    line-height: 1.45;
}

.auth-card {
    position: relative;
    width: min(440px, 100%);
    margin-left: auto;
    padding: 28px;
    border-radius: 8px;
}

.auth-liquid {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .56)),
        linear-gradient(320deg, rgba(23, 107, 79, .12), rgba(214, 169, 59, .10));
    border: 1px solid rgba(255, 255, 255, .82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        inset 0 -1px 0 rgba(15, 63, 47, .06),
        0 30px 90px rgba(15, 63, 47, .18);
    backdrop-filter: blur(28px) saturate(155%);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
    overflow: hidden;
}

.auth-liquid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, .72), transparent 34%, rgba(255, 255, 255, .28) 68%, transparent);
    opacity: .76;
    pointer-events: none;
}

.auth-liquid > * {
    position: relative;
    z-index: 1;
}

.auth-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.auth-card-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--auth-green-900), var(--auth-green-700));
    box-shadow: 0 18px 34px rgba(15, 63, 47, .24);
}

.auth-card-icon span {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 50%;
    position: relative;
}

.auth-card-icon span::after {
    content: "";
    position: absolute;
    width: 11px;
    height: 2px;
    right: -9px;
    bottom: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    transform: rotate(45deg);
}

.auth-card h2 {
    margin: 0;
    color: var(--auth-green-950);
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
}

.auth-description {
    margin: 18px 0 22px;
    color: #40564d;
    line-height: 1.55;
}

.auth-note {
    padding: 13px 14px;
    border-radius: 8px;
    color: #5f4612;
    background: rgba(255, 247, 222, .72);
    border: 1px solid rgba(214, 169, 59, .26);
    font-size: 13px;
    line-height: 1.45;
}

.auth-alert {
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
}

.auth-alert-danger {
    color: #772323;
    background: rgba(255, 236, 236, .78);
    border-color: rgba(180, 45, 45, .16);
}

.auth-alert-success {
    color: var(--auth-green-900);
    background: rgba(232, 244, 238, .82);
    border-color: rgba(23, 107, 79, .16);
}

.auth-alert-warning {
    color: #6b4c0b;
    background: rgba(255, 246, 219, .82);
    border-color: rgba(214, 169, 59, .22);
}

.auth-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.auth-primary-button {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--auth-green-900), var(--auth-green-700));
    box-shadow: 0 18px 36px rgba(15, 63, 47, .24);
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-primary-button:hover,
.auth-primary-button:focus {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--auth-green-950), var(--auth-green-700));
    box-shadow: 0 22px 46px rgba(15, 63, 47, .29);
    outline: none;
}

.auth-secondary-link {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px 0 18px;
    border-radius: 8px;
    color: var(--auth-green-900);
    background: rgba(255, 255, 255, .56);
    border: 1px solid rgba(15, 63, 47, .16);
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
}

.auth-secondary-link:hover,
.auth-secondary-link:focus {
    color: var(--auth-green-950);
    background: rgba(232, 244, 238, .82);
    text-decoration: none;
}

.auth-ornament {
    position: absolute;
    pointer-events: none;
    opacity: .23;
}

.auth-ornament::before,
.auth-ornament::after {
    content: "";
    position: absolute;
    border: 2px solid var(--auth-green-700);
    transform: rotate(45deg);
}

.auth-ornament-left {
    width: 190px;
    height: 190px;
    right: -58px;
    top: 36px;
}

.auth-ornament-right {
    width: 150px;
    height: 150px;
    left: -52px;
    bottom: -42px;
    opacity: .17;
}

.auth-ornament-left::before,
.auth-ornament-right::before {
    width: 92px;
    height: 92px;
    border-radius: 34px 4px 34px 4px;
}

.auth-ornament-left::after,
.auth-ornament-right::after {
    width: 48px;
    height: 48px;
    left: 34px;
    top: 34px;
    border-radius: 20px 4px 20px 4px;
    border-color: var(--auth-gold);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(8, 47, 34, .34);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.auth-modal-card {
    width: min(620px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 8px;
    color: var(--auth-ink);
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .82);
    box-shadow: 0 28px 90px rgba(8, 47, 34, .26);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.auth-modal-danger {
    border-color: rgba(164, 42, 42, .20);
}

.auth-modal-title {
    margin-bottom: 14px;
    color: var(--auth-green-950);
    font-size: 20px;
    font-weight: 800;
}

.auth-modal a {
    color: var(--auth-green-800);
    font-weight: 700;
}

.auth-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-modal .form-control {
    border-radius: 8px;
    border-color: var(--auth-line);
}

.auth-modal .btn-primary {
    border-color: var(--auth-green-800);
    background: var(--auth-green-800);
}

.auth-agreement {
    width: min(720px, 100%);
}

.auth-agreement-scroll {
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
}

@media (max-width: 980px) {
    .auth-stage {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: start;
        padding-top: 28px;
    }

    .auth-hero {
        min-height: auto;
    }

    .auth-brand {
        margin-bottom: 42px;
    }

    .auth-card {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    .auth-stage {
        width: min(100% - 24px, 520px);
        padding: 18px 0 34px;
    }

    .auth-hero {
        padding: 24px;
    }

    .auth-brand {
        align-items: flex-start;
        margin-bottom: 28px;
    }

    .auth-brand h1 {
        font-size: 31px;
        line-height: 1.12;
    }

    .auth-lead {
        font-size: 16px;
    }

    .auth-feature-grid {
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .auth-feature {
        min-height: 0;
    }

    .auth-feature span {
        margin-bottom: 10px;
    }

    .auth-card {
        padding: 22px;
    }

    .auth-card-header {
        align-items: flex-start;
    }

    .auth-card h2 {
        font-size: 22px;
    }
}
