﻿* {
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --bg-subtle: #fafafa;
    --border: #e5e7eb;
    --text: #0a0a0a;
    --muted: #6b7280;
    --accent: #0a0a0a;
    --accent-h: #1f2937;
    --error: #dc2626;
    --success: #059669;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ============ Layout ============ */
.shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ============ Левая панель ============ */
.brand-panel {
    background: #0a0a0a;
    color: #fafafa;
    padding: 40px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .brand-panel::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(600px circle at 0% 100%, rgba(99,102,241,.18), transparent 60%), radial-gradient(500px circle at 100% 0%, rgba(236,72,153,.12), transparent 50%);
        pointer-events: none;
    }

.brand-top, .brand-hero, .brand-foot {
    position: relative;
    z-index: 1;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fafafa;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.01em;
}

    .brand-mark svg {
        color: #818cf8;
        flex-shrink: 0;
    }

    .brand-mark span {
        font-size: 14px;
    }

.brand-hero {
    max-width: 480px;
}

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #a1a1aa;
    letter-spacing: .02em;
    margin: 0 0 28px;
}

.brand-hero h1 {
    font-size: clamp(36px, 4.4vw, 56px);
    line-height: 1.02;
    letter-spacing: -.035em;
    font-weight: 600;
    margin: 0 0 24px;
    color: #fafafa;
}

    .brand-hero h1 em {
        font-style: normal;
        background: linear-gradient(90deg, #818cf8, #f472b6);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.lede {
    font-size: 16px;
    line-height: 1.6;
    color: #a1a1aa;
    margin: 0;
    max-width: 380px;
}

.stat-row {
    display: flex;
    gap: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    color: #fafafa;
    letter-spacing: -.02em;
}

.stat-label {
    font-size: 12px;
    color: #71717a;
    margin-top: 2px;
    letter-spacing: .02em;
}

/* ============ Правая панель ============ */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 56px;
    background: var(--bg);
}

.form-container {
    width: 100%;
    max-width: 380px;
}

.form-head {
    margin-bottom: 32px;
}

    .form-head h2 {
        font-size: 26px;
        font-weight: 600;
        letter-spacing: -.025em;
        margin: 0 0 6px;
        color: var(--text);
    }

    .form-head p {
        font-size: 14px;
        color: var(--muted);
        margin: 0;
    }

/* ============ Форма ============ */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-size: 13px;
        font-weight: 500;
        color: var(--text);
    }

.field-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-link {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}

    .field-link:hover {
        color: var(--text);
    }

.field input {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

    .field input::placeholder {
        color: #9ca3af;
    }

    .field input:hover {
        border-color: #d1d5db;
    }

    .field input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(10,10,10,.08);
    }

/* ============ Checkbox ============ */
.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    margin-top: 4px;
}

    .check input {
        width: 15px;
        height: 15px;
        accent-color: var(--accent);
        cursor: pointer;
    }

/* ============ Кнопки ============ */
.btn-submit {
    margin-top: 8px;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .05s;
    width: 100%;
}

    .btn-submit:hover {
        background: var(--accent-h);
    }

    .btn-submit:active {
        transform: scale(.985);
    }

.btn-inline {
    display: inline-block;
    width: auto;
    margin-top: 24px;
    text-decoration: none;
    text-align: center;
    padding: 11px 20px;
}

/* ============ Divider ============ */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 12px;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* ============ OAuth ============ */
.oauth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

    .btn-ghost:hover {
        border-color: #d1d5db;
        background: var(--bg-subtle);
    }

/* ============ Alerts ============ */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.alert-ok {
    background: #ecfdf5;
    color: var(--success);
    border: 1px solid #a7f3d0;
}

/* ============ Футер формы ============ */
.form-foot {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

    .form-foot a {
        color: var(--text);
        font-weight: 500;
        text-decoration: none;
        margin-left: 4px;
        border-bottom: 1px solid var(--border);
        transition: border-color .15s;
    }

        .form-foot a:hover {
            border-color: var(--text);
        }

/* ============ Welcome ============ */
.welcome {
    text-align: left;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #ecfdf5;
    color: var(--success);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
}

.welcome h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.025em;
    margin: 0 0 8px;
}

.welcome p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

/* ============ Адаптив ============ */
@media (max-width: 900px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        padding: 32px 24px;
        min-height: auto;
    }

    .brand-hero h1 {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .lede {
        font-size: 14px;
    }

    .stat-row {
        gap: 24px;
        margin-top: 32px;
        padding-top: 20px;
    }

    .form-panel {
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 32px 20px;
    }

    .brand-panel {
        padding: 24px 20px;
    }

    .brand-hero h1 {
        font-size: 28px;
    }

    .stat-row {
        display: none;
    }
}
