/* =========================
   Auth pages
   ========================= */

:root {
    --auth-bg: #fafafa;
    --auth-card-bg: #ffffff;
    --auth-border: #e9e9e9;
    --auth-text: #111111;
    --auth-muted: #666666;
    --auth-danger: #b42318;
    --auth-success: #166534;
    --auth-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.brand-link {
    color: inherit;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.auth-header {
    border-bottom: 1px solid #d0ddd8;
    background: #ffffff;
    display: flex;
    justify-content: center;
    padding: 22px 16px 14px;
}

.auth-page {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    background: var(--auth-bg);
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: var(--auth-shadow);
    box-sizing: border-box;
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 36px;
    line-height: 1.1;
    color: var(--auth-text);
}

.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 15px;
    line-height: 1.5;
}

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

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

.auth-field label {
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dddddd;
    border-radius: 14px;
    font: inherit;
    color: var(--auth-text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.auth-field input::placeholder {
    color: #999999;
}

.auth-field input:focus {
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.auth-message {
    min-height: 24px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--auth-danger);
}

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

.auth-submit-btn {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    background: #111111;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-submit-btn:hover {
    opacity: 0.92;
}

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

.auth-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.5;
}

.auth-footer p {
    margin: 0 0 8px;
}

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

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

@media (max-width: 640px) {
    .auth-page {
        padding: 28px 14px;
        align-items: flex-start;
    }

    .auth-card {
        border-radius: 20px;
        padding: 24px 18px;
    }

    .auth-title {
        font-size: 30px;
    }
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: auto;
    margin: 0;
}