:root {
    --auth-bg: #050505;
    --auth-bg-soft: #09090b;
    --auth-surface: #0f0f12;
    --auth-surface-2: #141418;
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-border-solid: #27272a;
    --auth-crimson: #ef4444;
    --auth-crimson-hover: #dc2626;
    --auth-glow: rgba(239, 68, 68, 0.25);
    --auth-success: #10b981;
    --auth-warning: #f59e0b;
    --auth-danger: #f43f5e;
    --auth-text: #ffffff;
    --auth-muted: #8b8b95;
    --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.auth-page,
.auth-page * {
    box-sizing: border-box;
}

.auth-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--auth-font);
    -webkit-font-smoothing: antialiased;
}

.auth-page button,
.auth-page input {
    font: inherit;
}

.auth-page button,
.auth-page a {
    -webkit-tap-highlight-color: transparent;
}

.auth-page [x-cloak] {
    display: none !important;
}

.auth-split-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
}

.auth-language-switcher {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 20;
}

.auth-language-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: rgba(15, 15, 18, 0.86);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
}

.auth-language-button {
    min-width: 38px;
    min-height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    transition: color 150ms ease, background 150ms ease;
}

.auth-language-button:hover,
.auth-language-button.is-active {
    background: rgba(239, 68, 68, 0.14);
    color: var(--auth-text);
}

.auth-language-button.is-active {
    color: #fca5a5;
}

.auth-language-divider {
    color: #3f3f46;
    font-size: 12px;
}

.auth-hero-banner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 10vw;
    isolation: isolate;
    background-color: var(--auth-bg);
    background-image: radial-gradient(circle at 18% 18%, rgba(239, 68, 68, 0.16), transparent 34%), radial-gradient(circle at 80% 82%, rgba(127, 29, 29, 0.2), transparent 36%), linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, auto, 36px 36px, 36px 36px;
}

.auth-hero-banner::before,
.auth-hero-banner::after {
    position: absolute;
    content: '';
    pointer-events: none;
}

.auth-hero-banner::before {
    right: -16%;
    bottom: -25%;
    width: 62%;
    height: 72%;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    filter: blur(90px);
    z-index: -1;
}

.auth-hero-banner::after {
    inset: 0;
    background: linear-gradient(120deg, transparent 0 42%, rgba(239, 68, 68, 0.05) 58%, transparent 78%);
    z-index: -1;
}

.auth-hero-content {
    width: min(100%, 620px);
}

.auth-hero-brand,
.auth-form-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.22);
}

.auth-brand-wordmark {
    color: #fafafa;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 900;
    letter-spacing: -0.06em;
}

.auth-eyebrow,
.auth-kicker {
    display: block;
    margin-top: 58px;
    color: #f87171;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-transform: uppercase;
}

.auth-kicker {
    margin-top: 0;
    color: #a1a1aa;
    font-size: 10px;
    letter-spacing: 0.18em;
}

.auth-hero-title {
    max-width: 560px;
    margin: 18px 0 0;
    color: #fafafa;
    font-size: clamp(42px, 5.4vw, 82px);
    font-weight: 900;
    letter-spacing: -0.075em;
    line-height: 0.98;
}

.auth-hero-copy {
    max-width: 470px;
    margin: 24px 0 0;
    color: #a1a1aa;
    font-size: 16px;
    line-height: 1.7;
}

.auth-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 44px;
}

.auth-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: rgba(15, 15, 18, 0.58);
    color: #d4d4d8;
    font-size: 11px;
    font-weight: 700;
}

.auth-hero-meta svg,
.auth-alert-error svg,
.auth-btn-loading svg {
    width: 15px;
    height: 15px;
}

.auth-console,
.auth-register-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 88px 7vw 48px;
    background: linear-gradient(145deg, #08080a, #0b0b0e 55%, #10090b);
}

.auth-card {
    width: min(100%, 500px);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(20, 20, 24, 0.96), rgba(11, 11, 14, 0.96));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.015) inset;
    backdrop-filter: blur(16px);
}

.auth-login-card {
    padding: 42px;
}

.auth-register-shell {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 10%, rgba(239, 68, 68, 0.11), transparent 32%), linear-gradient(145deg, #08080a, #0b0b0e 55%, #10090b);
}

.auth-register-shell::before {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    content: '';
    filter: blur(120px);
    pointer-events: none;
}

.auth-register-card {
    position: relative;
    width: min(100%, 620px);
    padding: 42px;
}

.auth-register-header {
    text-align: left;
}

.auth-logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.auth-title {
    margin: 28px 0 0;
    color: #fafafa;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1.04;
}

.auth-subtitle {
    margin: 10px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-alert-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding: 14px;
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 14px;
    background: rgba(244, 63, 94, 0.08);
    color: #fda4af;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert-error svg {
    flex: 0 0 auto;
    margin-top: 1px;
}

.auth-form {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

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

.auth-label {
    color: #d4d4d8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    outline: none;
    background: #0d0d10;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input.auth-input {
    padding: 0 15px;
}

.auth-input::placeholder {
    color: #52525b;
}

.auth-input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-input:focus {
    border-color: var(--auth-crimson);
    background: #101014;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-input {
    padding-right: 52px;
}

.auth-eye-btn {
    position: absolute;
    top: 50%;
    right: 4px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #71717a;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease;
}

.auth-eye-btn:hover,
.auth-eye-btn:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    outline: none;
}

.auth-eye-btn svg {
    width: 18px;
    height: 18px;
}

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

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 12px;
    user-select: none;
}

.auth-checkbox-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.auth-checkbox-box {
    position: relative;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid #3f3f46;
    border-radius: 5px;
    background: #0d0d10;
    transition: border-color 150ms ease, background 150ms ease;
}

.auth-checkbox-box::after {
    width: 8px;
    height: 4px;
    border-bottom: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    content: '';
    opacity: 0;
    transform: rotate(-45deg) translate(1px, -1px);
    transition: opacity 150ms ease;
}

.auth-checkbox-input:checked + .auth-checkbox-box {
    border-color: var(--auth-crimson);
    background: var(--auth-crimson);
}

.auth-checkbox-input:checked + .auth-checkbox-box::after {
    opacity: 1;
}

.auth-checkbox-input:focus-visible + .auth-checkbox-box {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.auth-btn-primary {
    display: inline-flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-crimson);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.auth-btn-primary:hover:not(:disabled) {
    background: var(--auth-crimson-hover);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.42);
}

.auth-btn-primary:active:not(:disabled) {
    transform: scale(0.99);
}

.auth-btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.auth-btn-loading svg {
    animation: auth-spin 800ms linear infinite;
}

.auth-footer {
    margin: 26px 0 0;
    color: #71717a;
    font-size: 13px;
    text-align: center;
}

.auth-link {
    margin-left: 4px;
    color: #f87171;
    font-weight: 700;
    text-decoration: none;
    transition: color 150ms ease;
}

.auth-link:hover {
    color: #fca5a5;
}

.auth-field-hint {
    color: #71717a;
    font-size: 11px;
    line-height: 1.45;
}

.auth-field-hint-danger {
    color: #fda4af;
}

.auth-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.strength-wrap {
    display: grid;
    gap: 6px;
    margin-top: 1px;
}

.strength-track {
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: #27272a;
}

.strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 200ms ease, background-color 200ms ease;
}

.strength-bar.is-weak {
    background: var(--auth-danger);
}

.strength-label.is-weak {
    color: var(--auth-danger);
}

.strength-bar.is-medium {
    background: var(--auth-warning);
}

.strength-label.is-medium {
    color: var(--auth-warning);
}

.strength-bar.is-strong {
    background: var(--auth-success);
}

.strength-label.is-strong {
    color: var(--auth-success);
}

.strength-label {
    font-size: 11px;
    font-weight: 700;
}

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

@media (max-width: 1023px) {
    .auth-split-wrapper {
        display: block;
    }

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

    .auth-console {
        min-height: 100vh;
        padding: 104px 24px 40px;
    }
}

@media (max-width: 640px) {
    .auth-language-switcher {
        top: 16px;
        right: 16px;
    }

    .auth-console,
    .auth-register-shell {
        padding: 88px 16px 28px;
    }

    .auth-login-card,
    .auth-register-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .auth-password-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-input,
    .auth-btn-primary {
        min-height: 48px;
    }

    .auth-eye-btn {
        width: 44px;
        height: 44px;
    }

    .auth-title {
        font-size: 30px;
    }
}

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

.auth-page { min-width: 0; background: var(--oc-canvas); color: var(--oc-text); }
.auth-hero-banner { border-color: var(--oc-border); background: radial-gradient(ellipse at 0 30%, #ef44441a, transparent 70%), #0b0c0e; }
.auth-hero-banner::before { opacity: .6; }
.auth-hero-title { font-size: clamp(36px, 4vw, 64px); line-height: 1.1; letter-spacing: -.05em; }
.auth-hero-copy { color: var(--oc-muted); font-size: 15px; line-height: 1.8; }
.auth-hero-meta span { padding: 10px 14px; border: 1px solid var(--oc-border); border-radius: 99px; background: var(--oc-surface); color: #c0c0cd; font-size: 12px; }
.auth-console, .auth-register-shell { background: radial-gradient(ellipse at 100% 0, #ef44440d, transparent 60%), var(--oc-canvas); }
.auth-card { border: 1px solid var(--oc-border); border-radius: 24px; background: var(--oc-surface); box-shadow: 0 24px 80px #0005, inset 0 1px #ffffff06; }
.auth-login-card { padding: 40px; }
.auth-register-card { padding: 36px; }
.auth-title { font-size: 32px; line-height: 1.2; letter-spacing: -.04em; }
.auth-subtitle { color: var(--oc-muted); font-size: 13px; line-height: 1.7; }
.auth-kicker, .auth-eyebrow { color: #ff8383; font-size: 10px; }
.auth-label { color: #d4d4de; font-size: 12px; }
.auth-input { min-height: 50px; padding: 14px; border: 1px solid var(--oc-border); border-radius: 12px; background: var(--oc-well); color: var(--oc-text); font-size: 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.auth-input::placeholder { color: var(--oc-subtle); }
.auth-input:hover { border-color: var(--oc-border-strong); }
.auth-input:focus { outline: none; border-color: var(--oc-crimson); box-shadow: var(--oc-focus); }
.auth-eye-btn { width: 44px; height: 44px; right: 3px; border-radius: 10px; color: var(--oc-muted); }
.auth-eye-btn:hover { color: #ffaaaa; background: #ef444415; }
.auth-input-wrap .auth-input { padding-right: 52px; }
.auth-btn-primary { min-height: 50px; border: 1px solid #f36b6b; border-radius: 12px; background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; font-size: 14px; box-shadow: 0 6px 18px #ef444430; }
.auth-btn-primary:hover:not(:disabled) { box-shadow: 0 8px 24px #ef44444d; transform: translateY(-1px); }
.auth-btn-primary:active:not(:disabled) { transform: scale(.98); }
.auth-footer, .auth-field-hint { color: var(--oc-muted); font-size: 12px; line-height: 1.6; }
.auth-link { color: #ffaaaa; }
.auth-language-form { border-color: var(--oc-border); border-radius: 12px; background: var(--oc-surface); }
.auth-language-button { min-width: 40px; min-height: 40px; color: var(--oc-muted); }
.auth-language-button.is-active { color: #ffaaaa; background: #ef44441a; }
.strength-track { height: 5px; overflow: hidden; border-radius: 99px; background: #292a32; }
.strength-bar { height: 100%; border-radius: 99px; transition: width .25s ease; }
.strength-bar.is-weak { background: var(--oc-danger); }
.strength-bar.is-medium { background: var(--oc-warning); }
.strength-bar.is-strong { background: var(--oc-success); }
.strength-label { font-size: 11px; }
.strength-label.is-weak, .auth-field-hint-danger { color: #ff8ea2; }
.strength-label.is-medium { color: #f9bd61; }
.strength-label.is-strong { color: #5ce0b4; }

@media (max-width: 639px) {
    .auth-console, .auth-register-shell { padding: 84px 16px 32px; }
    .auth-login-card, .auth-register-card { padding: 28px 20px; border-radius: 20px; }
    .auth-title { font-size: 28px; }
    .auth-password-grid { grid-template-columns: minmax(0, 1fr); }
    .auth-input { font-size: 16px; }
}
