/* ── AUTH LAYOUT ─────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── LEFT PANEL — branding ───────────────────── */
.auth-left {
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Decorative graph nodes background */
.auth-left::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(91, 138, 245, 0.08) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(180, 142, 245, 0.06) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.auth-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    letter-spacing: -1px;
}

.auth-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-hero {
    position: relative;
    z-index: 1;
}

.auth-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--accent-glow);
    border: 1px solid rgba(91, 138, 245, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.auth-hero h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.auth-hero h2 span {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 380px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* SVG graph decoration */
.auth-graph-svg {
    position: absolute;
    right: -40px;
    bottom: 80px;
    opacity: 0.12;
    pointer-events: none;
}

/* ── RIGHT PANEL — form ──────────────────────── */
.auth-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
}

/* Theme toggle in corner */
.auth-theme-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.auth-theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.auth-form-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.auth-form-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Alert boxes */
.auth-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-alert.error {
    background: rgba(240, 112, 112, 0.1);
    border: 1px solid rgba(240, 112, 112, 0.35);
    color: var(--red);
}

.auth-alert.success {
    background: rgba(78, 201, 160, 0.1);
    border: 1px solid rgba(78, 201, 160, 0.35);
    color: var(--green);
}

.auth-alert ul {
    margin: 0;
    padding-left: 16px;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.auth-field input {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-accent);
    border-radius: 8px;
    padding: 11px 14px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
    width: 100%;
}

.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-field input::placeholder {
    color: var(--text-muted);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.auth-checkbox-label input {
    accent-color: var(--accent);
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 13px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.18s,
        box-shadow 0.18s,
        transform 0.1s;
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
}

.auth-submit:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 24px var(--accent-glow);
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-back:hover {
    color: var(--text-primary);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 2rem 1.5rem;
        justify-content: flex-start;
        padding-top: 4rem;
    }
}
