:root {
    --auth-night: #071826;
    --auth-deep: #0c2740;
    --auth-mid: #173b5d;
    --auth-accent: #e4a249;
    --auth-accent-soft: rgba(228, 162, 73, 0.18);
    --auth-surface: rgba(255, 255, 255, 0.94);
    --auth-surface-strong: #ffffff;
    --auth-line: rgba(255, 255, 255, 0.12);
    --auth-panel-line: rgba(12, 39, 64, 0.12);
    --auth-text: #10263d;
    --auth-text-soft: #58708a;
    --auth-hero-text: rgba(238, 246, 252, 0.86);
    --auth-shadow: 0 30px 70px rgba(2, 12, 21, 0.35);
    --auth-panel-shadow: 0 26px 52px rgba(3, 15, 26, 0.2);
    --auth-radius-xl: 30px;
    --auth-radius-lg: 22px;
    --auth-radius-md: 16px;
    --auth-radius-sm: 12px;
    --auth-input-bg: rgba(244, 247, 250, 0.9);
    --auth-input-border: rgba(16, 38, 61, 0.1);
    --auth-input-focus: rgba(12, 39, 64, 0.22);
    --auth-success: #18794e;
    --auth-danger: #c64545;
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: #eff5f9;
    background:
        radial-gradient(circle at top left, rgba(71, 145, 209, 0.28), transparent 28%),
        radial-gradient(circle at bottom right, rgba(228, 162, 73, 0.15), transparent 24%),
        linear-gradient(135deg, #071826 0%, #0c2740 48%, #04121d 100%);
}

body.auth-page::before,
body.auth-page::after {
    content: '';
    position: fixed;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(24px);
    opacity: 0.7;
}

body.auth-page::before {
    width: 18rem;
    height: 18rem;
    top: 8%;
    right: 10%;
    background: rgba(74, 137, 204, 0.2);
}

body.auth-page::after {
    width: 16rem;
    height: 16rem;
    bottom: 6%;
    left: 10%;
    background: rgba(228, 162, 73, 0.16);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
    gap: 28px;
    max-width: 1180px;
    min-height: 100svh;
    margin: 0 auto;
    padding: 24px;
    align-items: center;
}

.auth-shell.auth-shell--wide {
    grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
}

.auth-hero,
.auth-panel {
    position: relative;
    border-radius: var(--auth-radius-xl);
    overflow: hidden;
    animation: auth-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    min-height: 700px;
    padding: 42px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 36%),
        linear-gradient(180deg, rgba(6, 21, 34, 0.55), rgba(6, 21, 34, 0.16)),
        linear-gradient(140deg, #0b2238 0%, #173b5d 58%, #0b2135 100%);
    border: 1px solid var(--auth-line);
    box-shadow: var(--auth-shadow);
}

.auth-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -18% auto;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(228, 162, 73, 0.24), transparent 65%);
}

.auth-panel {
    min-height: 700px;
    padding: 36px;
    color: var(--auth-text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 249, 0.94));
    border: 1px solid var(--auth-panel-line);
    box-shadow: var(--auth-panel-shadow);
}

.auth-panel.auth-panel--compact {
    min-height: 620px;
}

.auth-panel.auth-panel--tall {
    min-height: 740px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #071826;
    background: linear-gradient(145deg, #f2b663 0%, #d98f28 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.auth-brand-copy {
    display: grid;
    gap: 4px;
}

.auth-brand-name,
.auth-headline,
.auth-panel-title,
.auth-form-title {
    font-family: 'Sora', sans-serif;
}

.auth-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-brand-subtitle {
    font-size: 0.92rem;
    color: var(--auth-hero-text);
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(244, 248, 251, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-headline-wrap {
    display: grid;
    gap: 18px;
    max-width: 34rem;
}

.auth-headline {
    margin: 0;
    font-size: clamp(2.35rem, 4vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.auth-lead {
    margin: 0;
    max-width: 32rem;
    color: var(--auth-hero-text);
    font-size: 1rem;
    line-height: 1.72;
}

.auth-copy-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-copy-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(244, 248, 251, 0.92);
    font-size: 0.96rem;
}

.auth-copy-list i {
    color: var(--auth-accent);
}

.auth-hero-foot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.auth-stat {
    padding: 16px;
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-stat-value {
    display: block;
    margin-bottom: 4px;
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.auth-stat-label {
    color: rgba(236, 245, 250, 0.72);
    font-size: 0.82rem;
}

.auth-panel-head {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-panel-kicker {
    color: var(--auth-text-soft);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-panel-title {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.auth-panel-copy {
    margin: 0;
    color: var(--auth-text-soft);
    line-height: 1.68;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
    padding: 7px;
    border-radius: 18px;
    background: rgba(228, 234, 240, 0.88);
}

.auth-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--auth-text-soft);
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-tab:hover {
    color: var(--auth-text);
    transform: translateY(-1px);
}

.auth-tab.is-active {
    color: var(--auth-text);
    background: var(--auth-surface-strong);
    box-shadow: 0 10px 24px rgba(14, 34, 54, 0.08);
}

.auth-form,
.auth-form-grid {
    display: grid;
    gap: 18px;
}

.auth-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-field,
.auth-checkbox-row,
.auth-note,
.auth-links,
.auth-inline,
.auth-aside-note {
    position: relative;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-input,
.auth-select,
.auth-textarea {
    width: 100%;
    min-height: 54px;
    padding: 15px 16px;
    border: 1px solid var(--auth-input-border);
    border-radius: 16px;
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.auth-textarea {
    min-height: 116px;
    resize: vertical;
}

.auth-input::placeholder,
.auth-textarea::placeholder {
    color: #8298ae;
}

.auth-input:focus,
.auth-select:focus,
.auth-textarea:focus {
    outline: none;
    border-color: var(--auth-mid);
    box-shadow: 0 0 0 4px var(--auth-input-focus);
    background: #ffffff;
}

.auth-input--with-icon {
    padding-right: 54px;
}

.auth-icon-btn {
    position: absolute;
    top: 43px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-text-soft);
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.auth-icon-btn:hover {
    color: var(--auth-text);
    background: rgba(16, 38, 61, 0.06);
}

.auth-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--auth-text-soft);
    font-size: 0.94rem;
}

.auth-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-text-soft);
    font-size: 0.94rem;
}

.auth-checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-mid);
}

.auth-link {
    color: var(--auth-mid);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 58px;
    padding: 16px 18px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #102f4b 0%, #234e77 100%);
    color: #ffffff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(13, 39, 64, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 38px rgba(13, 39, 64, 0.28);
    filter: saturate(1.05);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.82;
}

.auth-note {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(16, 38, 61, 0.04);
    border: 1px solid rgba(16, 38, 61, 0.08);
    color: var(--auth-text-soft);
    font-size: 0.92rem;
    line-height: 1.6;
}

.auth-note strong {
    color: var(--auth-text);
}

.auth-footer {
    display: grid;
    gap: 8px;
    text-align: center;
    color: var(--auth-text-soft);
    font-size: 0.95rem;
}

.auth-footer strong,
.auth-footer a {
    color: var(--auth-mid);
    font-weight: 800;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8a9cae;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(16, 38, 61, 0.12);
}

.auth-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-alert--error {
    color: var(--auth-danger);
    background: rgba(198, 69, 69, 0.1);
    border: 1px solid rgba(198, 69, 69, 0.2);
}

.auth-alert--success {
    color: var(--auth-success);
    background: rgba(24, 121, 78, 0.1);
    border: 1px solid rgba(24, 121, 78, 0.2);
}

.auth-hidden {
    display: none !important;
}

.auth-submit-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    animation: auth-spin 800ms linear infinite;
}

.auth-muted {
    color: var(--auth-text-soft);
}

.auth-mobile-brand {
    display: none;
}

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

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .auth-shell,
    .auth-shell.auth-shell--wide {
        grid-template-columns: 1fr;
        max-width: 720px;
        padding: 18px;
    }

    .auth-panel {
        order: 1;
    }

    .auth-hero {
        order: 2;
    }

    .auth-hero,
    .auth-panel,
    .auth-panel.auth-panel--compact,
    .auth-panel.auth-panel--tall {
        min-height: auto;
    }

    .auth-hero {
        padding: 32px 28px;
    }

    .auth-panel {
        padding: 28px 24px;
    }

    .auth-hero-foot {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body.auth-page::before,
    body.auth-page::after,
    .auth-hero::after {
        display: none;
    }

    .auth-shell {
        padding: 12px;
        gap: 16px;
    }

    .auth-hero,
    .auth-panel {
        border-radius: 24px;
    }

    .auth-hero {
        padding: 26px 22px;
        gap: 24px;
    }

    .auth-hero-foot {
        display: none;
    }

    .auth-panel {
        padding: 24px 20px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

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

    .auth-tabs {
        grid-template-columns: 1fr;
    }

    .auth-mobile-brand {
        display: flex;
        margin-bottom: 8px;
    }
}
