:root {
    --auth-bg: #e6d5c0;
    --auth-surface: #fff8f0;
    --auth-text: #33261c;
    --auth-muted: #8a6f5c;
    --auth-accent: #b07d4a;
    --auth-accent-hover: #945f33;
    --auth-accent-deep: #6b4423;
    --auth-accent-soft: #f0dcc6;
    --auth-border: #cfb89e;
    --auth-input-bg: #faf3eb;
    --auth-shadow: 0 24px 60px rgba(80, 50, 30, 0.14);
    --auth-radius: 1.25rem;
    --auth-radius-sm: 0.75rem;
    --auth-error: #c44d3a;
    --auth-error-bg: #fdf0ee;
    --auth-error-border: #e8b8b0;
    --auth-success-bg: #e8f2e4;
    --auth-success-text: #3d6b3a;
    --auth-success-border: #b8d4b0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(176, 125, 74, 0.28), transparent 42%),
        radial-gradient(circle at 88% 92%, rgba(139, 94, 60, 0.22), transparent 38%),
        linear-gradient(160deg, #efe0ce 0%, var(--auth-bg) 45%, #dcc8b0 100%);
    color: var(--auth-text);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.auth-header,
.auth-footer {
    width: min(100%, 30rem);
}

.auth-brand {
    display: inline-block;
    color: var(--auth-accent-deep);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-brand:hover {
    color: var(--auth-accent);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem 0;
}

.auth-card {
    position: relative;
    width: min(100%, 28rem);
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 2.25rem 2rem 2rem;
    overflow: hidden;
}

.auth-card--wide {
    width: min(100%, 30rem);
}

.auth-card::before {
    content: "";
    position: absolute;
    top: -3.5rem;
    right: -3.5rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 220, 198, 0.95), transparent 70%);
    pointer-events: none;
}

.auth-card::after {
    content: "";
    position: absolute;
    bottom: -2.5rem;
    left: -2.5rem;
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 196, 168, 0.7), transparent 70%);
    pointer-events: none;
}

.auth-card__header {
    position: relative;
    z-index: 1;
    margin-bottom: 1.75rem;
    text-align: center;
}

.auth-card__badge {
    display: inline-block;
    margin-bottom: 0.875rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--auth-accent-soft);
    color: var(--auth-accent-deep);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-card__title {
    margin: 0 0 0.5rem;
    color: var(--auth-text);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-card__subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.auth-alert {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--auth-radius-sm);
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-alert--success {
    background: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: var(--auth-success-text);
}

.auth-alert--error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error);
}

.auth-summary {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error);
    font-size: 0.875rem;
}

.auth-summary ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field__label {
    color: var(--auth-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-input {
    width: 100%;
    margin: 0;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font: inherit;
    line-height: 1.4;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #b39a84;
}

.auth-input:hover {
    border-color: #bfa48a;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(176, 125, 74, 0.22);
}

.auth-input.input-validation-error {
    border-color: var(--auth-error);
    background: #fdf6f5;
}

.auth-field__error {
    min-height: 1.1rem;
    color: var(--auth-error);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.auth-checkbox {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox__input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--auth-accent);
    cursor: pointer;
}

.auth-checkbox__label {
    color: var(--auth-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.auth-submit {
    margin-top: 0.25rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: var(--auth-radius-sm);
    background: linear-gradient(135deg, #c49260, var(--auth-accent));
    color: #fff;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.auth-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 22px rgba(148, 95, 51, 0.32);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(176, 125, 74, 0.28),
        0 8px 22px rgba(148, 95, 51, 0.32);
}

.auth-submit--secondary {
    background: transparent;
    border: 1.5px solid var(--auth-accent);
    color: var(--auth-accent-deep);
    box-shadow: none;
}

.auth-submit--secondary:hover {
    background: var(--auth-accent-soft);
    filter: none;
    box-shadow: none;
}

.auth-links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.35rem;
    text-align: center;
}

.auth-link {
    color: var(--auth-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

.auth-footer-text {
    position: relative;
    z-index: 1;
    margin: 1.35rem 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.9rem;
}

.auth-divider {
    position: relative;
    z-index: 1;
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--auth-border);
}

.auth-secondary__title {
    position: relative;
    z-index: 1;
    margin: 0 0 0.85rem;
    color: var(--auth-text);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.auth-footer {
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.875rem;
}

.field-validation-error {
    color: var(--auth-error);
}

.validation-summary-errors {
    color: var(--auth-error);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .auth-card__title {
        font-size: 1.5rem;
    }
}
