:root {
    --bg-dark: #061421;
    --bg-card: #0B1F33;
    --bg-card-soft: #102A44;
    --gold: #F5B942;
    --gold-dark: #C8891E;
    --gold-soft: rgba(245, 185, 66, 0.14);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --success: #22C55E;
    --danger: #EF4444;
    --pending: #FACC15;
    --border: #1E3A5F;
    --input-bg: #071A2F;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 185, 66, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.08), transparent 30%),
        linear-gradient(135deg, #030B14 0%, var(--bg-dark) 50%, #02070D 100%);
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-page {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    background: rgba(245, 185, 66, 0.08);
    filter: blur(6px);
    pointer-events: none;
}

.auth-page::before {
    top: -180px;
    right: 12%;
}

.auth-page::after {
    bottom: -200px;
    left: 8%;
    background: rgba(30, 58, 95, 0.45);
}

.auth-shell {
    width: min(1180px, 100%);
    min-height: 720px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    background: rgba(7, 26, 47, 0.72);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.auth-brand {
    position: relative;
    padding: 42px;
    background:
        linear-gradient(160deg, rgba(245, 185, 66, 0.13), transparent 35%),
        linear-gradient(180deg, rgba(11, 31, 51, 0.98), rgba(6, 20, 33, 0.98));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    pointer-events: none;
}

.brand-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(245, 185, 66, 0.16);
    top: 70px;
    left: -90px;
    filter: blur(20px);
}

.brand-logo,
.mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background:
        linear-gradient(145deg, rgba(245, 185, 66, 0.24), rgba(245, 185, 66, 0.06)),
        #071A2F;
    border: 1px solid rgba(245, 185, 66, 0.42);
    box-shadow: 0 16px 36px rgba(245, 185, 66, 0.14);
}

.brand-mark svg {
    width: 34px;
    height: 34px;
    stroke-width: 2.4;
}

.brand-logo strong,
.mobile-logo strong {
    display: block;
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}

.brand-logo small,
.mobile-logo small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.premium-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(245, 185, 66, 0.34);
    background: var(--gold-soft);
    color: var(--gold);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
}

.premium-pill svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
}

.brand-content h1 {
    margin: 26px 0 18px;
    font-size: clamp(2rem, 4vw, 3.65rem);
    line-height: 1.02;
    letter-spacing: -0.065em;
}

.brand-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.bonus-card {
    margin-top: 28px;
    padding: 20px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background:
        linear-gradient(135deg, rgba(245, 185, 66, 0.18), rgba(11, 31, 51, 0.86)),
        rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(245, 185, 66, 0.28);
}

.bonus-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.bonus-card strong {
    font-size: 1.8rem;
    color: var(--gold);
    letter-spacing: -0.04em;
}

.bonus-card svg {
    width: 48px;
    height: 48px;
    color: var(--success);
}

.brand-points {
    margin-top: 26px;
    display: grid;
    gap: 14px;
}

.brand-points div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #DCE7F4;
    font-size: 0.95rem;
}

.point-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--gold);
    background: rgba(245, 185, 66, 0.12);
    border: 1px solid rgba(245, 185, 66, 0.18);
}

.point-icon svg {
    width: 18px;
    height: 18px;
}

.brand-footer {
    position: relative;
    z-index: 1;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.auth-card {
    padding: 42px;
    background:
        radial-gradient(circle at top right, rgba(245, 185, 66, 0.08), transparent 36%),
        rgba(5, 17, 29, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-logo {
    display: none;
    margin-bottom: 30px;
}

.form-header {
    margin-bottom: 24px;
}

.form-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 800;
}

.form-header h2 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3.5vw, 2.45rem);
    line-height: 1.12;
    letter-spacing: -0.055em;
}

.form-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.form-header strong {
    color: var(--gold);
}

.alert {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.alert strong {
    display: block;
    margin-bottom: 8px;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert li + li {
    margin-top: 4px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.11);
    border: 1px solid rgba(239, 68, 68, 0.26);
    color: #FECACA;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 9px;
}

.form-group label {
    color: #DDE8F6;
    font-size: 0.9rem;
    font-weight: 700;
}

.form-group label span {
    color: var(--text-muted);
    font-weight: 500;
}

.input-wrap,
.select-wrap,
.phone-wrap {
    min-height: 54px;
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(7, 26, 47, 0.86);
    border: 1px solid rgba(30, 58, 95, 0.95);
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

.input-wrap:focus-within,
.select-wrap:focus-within,
.phone-wrap:focus-within {
    border-color: rgba(245, 185, 66, 0.76);
    box-shadow: 0 0 0 4px rgba(245, 185, 66, 0.1);
    background: rgba(8, 30, 52, 0.95);
}

.input-icon {
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.input-wrap input,
.select-wrap select,
.phone-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text-main);
    background: transparent;
    padding: 0 16px 0 0;
    height: 54px;
}

.input-wrap input::placeholder,
.phone-wrap input::placeholder {
    color: rgba(148, 163, 184, 0.72);
}

.select-wrap select {
    appearance: none;
    cursor: pointer;
    padding-right: 42px;
}

.select-wrap::after {
    content: "⌄";
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-55%);
    color: var(--gold);
    font-size: 1.2rem;
    pointer-events: none;
}

.country-flag {
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.foreign-code-field {
    display: none;
}

.foreign-code-field.is-visible {
    display: grid;
}

.phone-prefix {
    height: 54px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid rgba(30, 58, 95, 0.95);
    color: var(--text-main);
    background: rgba(245, 185, 66, 0.08);
    white-space: nowrap;
}

.phone-prefix span {
    font-size: 1.15rem;
}

.phone-prefix strong {
    color: var(--gold);
    font-size: 0.92rem;
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.password-toggle {
    width: 48px;
    height: 54px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: var(--gold);
    background: rgba(245, 185, 66, 0.08);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-meter {
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.password-meter span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--danger);
    transition: width 0.25s ease, background 0.25s ease;
}

.password-meter span.is-medium {
    background: var(--pending);
}

.password-meter span.is-strong {
    background: var(--success);
}

.check-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.6;
    cursor: pointer;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--gold);
}

.auth-submit {
    height: 56px;
    border: 0;
    outline: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gold), #FFD77A);
    color: #071421;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 18px 36px rgba(245, 185, 66, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 22px 42px rgba(245, 185, 66, 0.26);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.4;
}

.auth-switch {
    margin: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-switch a {
    color: var(--gold);
    font-weight: 800;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.safe-note {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 980px) {
    .auth-page {
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-brand {
        display: none;
    }

    .auth-card {
        padding: 30px;
    }

    .mobile-logo {
        display: inline-flex;
    }
}

@media (max-width: 680px) {
    .auth-page {
        padding: 0;
        display: block;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-card {
        min-height: 100vh;
        padding: 24px 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .brand-mark svg {
        width: 30px;
        height: 30px;
    }

    .phone-prefix {
        padding: 0 11px;
    }

    .phone-prefix strong {
        font-size: 0.86rem;
    }

    .input-wrap,
    .select-wrap,
    .phone-wrap {
        min-height: 52px;
        border-radius: 14px;
    }

    .input-wrap input,
    .select-wrap select,
    .phone-wrap input,
    .password-toggle {
        height: 52px;
    }

    .auth-submit {
        height: 54px;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 22px 14px;
    }

    .mobile-logo {
        gap: 10px;
    }

    .mobile-logo strong {
        font-size: 0.96rem;
    }

    .mobile-logo small {
        font-size: 0.7rem;
    }

    .input-icon {
        flex-basis: 44px;
    }

    .phone-prefix {
        gap: 6px;
    }
}
.flag-img,
.select-flag img {
    width: 24px;
    height: 18px;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.country-select-wrap .select-flag,
.country-flag {
    flex: 0 0 50px;
    display: grid;
    place-items: center;
}

.country-select-wrap select {
    padding-left: 0;
}

.phone-prefix {
    min-width: 104px;
}
.auth-shell-login {
    min-height: 640px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.11);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #BBF7D0;
}

.form-extra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.form-extra-row a {
    color: var(--gold);
    font-weight: 800;
}

.form-extra-row a:hover {
    text-decoration: underline;
}

@media (max-width: 680px) {
    .auth-shell-login {
        min-height: 100vh;
    }

    .form-extra-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}