* {
    box-sizing: border-box;
}

:root {
    --bg: #16120d;
    --card: #fffaf0;
    --text: #21180f;
    --muted: #6d5e4f;
    --accent: #c39a2e;
    --accent-dark: #8b6418;
    --danger: #b3261e;
    --border: #eadfc9;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(195, 154, 46, 0.25), transparent 35%),
        var(--bg);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 440px);
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.1;
}

.muted,
.switch-link {
    color: var(--muted);
}

form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    background: #fff;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(195, 154, 46, 0.18);
}

button,
.button-link {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: var(--accent-dark);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

button:hover,
.button-link:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

a {
    color: var(--accent-dark);
    font-weight: 700;
}

.switch-link {
    margin: 20px 0 0;
    text-align: center;
}

.error-text {
    margin-top: 6px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 400;
}

.success-card {
    text-align: center;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 28px 22px;
    }

    h1 {
        font-size: 28px;
    }
}


/* Общая тема для страниц входа и регистрации */
html[data-theme="light"] {
    --bg: #f7f2e8;
    --card: #fffaf0;
    --text: #21180f;
    --muted: #6d5e4f;
    --accent: #c39a2e;
    --accent-dark: #8b6418;
    --danger: #b3261e;
    --border: #eadfc9;
    --input-bg: #ffffff;
    --button-text: #ffffff;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #15100c;
    --card: #21180f;
    --text: #f8ead3;
    --muted: #cdbb9e;
    --accent: #d8aa3c;
    --accent-dark: #f0d184;
    --danger: #ff8f8f;
    --border: #513b25;
    --input-bg: #18110c;
    --button-text: #20150c;
}

input {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

input::placeholder {
    color: var(--muted);
}

button,
.button-link {
    color: var(--button-text);
}

html[data-theme="dark"] button,
html[data-theme="dark"] .button-link {
    background: var(--accent-dark);
}

html[data-theme="dark"] button:hover,
html[data-theme="dark"] .button-link:hover {
    background: var(--accent);
}

html[data-compact="true"] .auth-card {
    padding: 24px;
}

html[data-large-text="true"] body {
    font-size: 18px;
}
