:root {
    --bg: #ece6dd;
    --surface: rgba(252, 249, 244, 0.95);
    --line: #d8cec0;
    --line-strong: #bfb19f;
    --text: #2f2922;
    --muted: #6d6357;
    --brand: #233449;
    --brand-soft: #e7ddd1;
    --accent: #b16e3d;
    --success: #71886b;
    --danger: #aa5a53;
    --shadow: 0 26px 70px rgba(70, 56, 43, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 30%),
        radial-gradient(circle at bottom left, rgba(177, 110, 61, 0.1), transparent 24%),
        linear-gradient(155deg, #eae3d8 0%, #dfd7ca 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: min(460px, 100%);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
}

.auth-logo {
    width: 176px;
    max-width: 56%;
    margin-bottom: 10px;
    filter: drop-shadow(0 10px 22px rgba(70, 56, 43, 0.12));
}

.auth-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-header h1 {
    margin: 8px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1.1;
    color: var(--brand);
}

.auth-header p:last-child {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.auth-tabs {
    margin-top: 24px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: var(--brand-soft);
    border-radius: 999px;
}

.auth-tab {
    border: none;
    border-radius: 999px;
    padding: 10px 12px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab.active {
    background: #fffdf9;
    color: var(--brand);
    box-shadow: 0 10px 18px rgba(70, 56, 43, 0.08);
}

.auth-status {
    min-height: 1.3em;
    margin: 14px 0;
    font-size: 0.95rem;
    color: var(--danger);
}

.auth-status.success {
    color: var(--success);
}

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

.auth-form.active {
    display: grid;
}

.auth-form label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fdfbf7;
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(177, 110, 61, 0.12);
    background: #ffffff;
}

.primary-btn {
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--brand) 0%, #314862 100%);
    color: #f9f4ee;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 16px 28px rgba(35, 52, 73, 0.16);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(35, 52, 73, 0.22);
}

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

@media (max-width: 520px) {
    .auth-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .auth-logo {
        width: 142px;
    }

    .auth-header h1 {
        font-size: 1.7rem;
    }
}
