﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-soft: #f4f2ee;
    --ink: #1b1b1f;
    --ink-soft: #65656d;
    --line: #d9d6d1;
    --primary: #111827;
    --accent: #c9a96a;
    --error: #b42318;
    --success: #047857;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg-soft);
    color: var(--ink);
    min-height: 100vh;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(201, 169, 106, 0.2), transparent 38%),
        linear-gradient(145deg, #12131a, #1f2028 58%, #2a2730 100%);
}

.auth-showcase video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.auth-lite .auth-showcase video {
    display: none;
}

.auth-showcase-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(150deg, rgba(11, 11, 14, 0.62), rgba(11, 11, 14, 0.25));
}

.logo-link img {
    width: 116px;
    filter: brightness(0) invert(1);
}

.auth-showcase-overlay h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 10px;
}

.auth-showcase-overlay p {
    max-width: 420px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 36px;
}

.auth-card {
    width: min(560px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-tabs button {
    border: 1px solid var(--line);
    background: #f9f8f6;
    color: var(--ink-soft);
    border-radius: 10px;
    height: 42px;
    font-weight: 600;
    cursor: pointer;
}

.auth-tabs button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.auth-feedback {
    min-height: 20px;
    margin-bottom: 12px;
    font-size: 13px;
}

.auth-feedback.neutral { color: transparent; }
.auth-feedback.error { color: var(--error); }
.auth-feedback.success { color: var(--success); }

.auth-reset-link {
    margin-bottom: 12px;
    border: 0;
    background: transparent;
    color: #475467;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    padding: 0;
}

.auth-reset-link:hover {
    color: var(--primary);
}

.auth-panel-content {
    display: none;
}

.auth-panel-content.active {
    display: block;
}

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

.auth-role-hint {
    margin-top: -2px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
    background: #f7f4ee;
    border: 1px solid #e8e1d5;
    border-radius: 12px;
    padding: 12px 14px;
}

.auth-form label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #50505a;
}

.auth-form input {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s;
}

.auth-form input:focus {
    border-color: #9f9ca0;
}

.auth-form select {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border-color 0.18s;
}

.auth-form select:focus {
    border-color: #9f9ca0;
}

.terms-row {
    margin-top: 2px;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
    color: #474750;
}

.terms-row input {
    margin-top: 2px;
    height: auto;
}

.btn-primary {
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    height: 48px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #17181f, #2d2d37);
    color: #fff;
    cursor: pointer;
}

.auth-switch {
    margin-top: 14px;
    font-size: 14px;
    color: #5e5e67;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.38);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-overlay.active {
    display: flex;
}

.loading-box {
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #191b22;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

@media (max-width: 980px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        min-height: 28vh;
    }

    .auth-showcase video {
        display: none;
    }

    .auth-showcase-overlay {
        padding: 30px 22px 26px;
        background: linear-gradient(160deg, rgba(11, 11, 14, 0.9), rgba(25, 25, 30, 0.78));
    }

    .auth-panel {
        padding: 20px;
        margin-top: -36px;
        position: relative;
        z-index: 3;
    }
}
