:root {
    --auth-bg: #f4f7fb;
    --auth-card: #ffffff;
    --auth-text: #172033;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-primary: #8b1023;
    --auth-primary-dark: #6f0d1c;
    --auth-danger-bg: #fff1f2;
    --auth-danger: #be123c;
}

* { box-sizing: border-box; }

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--auth-text);
    background: radial-gradient(circle at top left, rgba(139, 16, 35, .12), transparent 34%), var(--auth-bg);
}

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

.auth-card {
    width: min(420px, 100%);
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .12);
    padding: 30px;
}

.auth-brand { margin-bottom: 24px; }
.auth-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(139, 16, 35, .1);
    color: var(--auth-primary);
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: 14px;
}

.auth-brand h1 { margin: 0 0 8px; font-size: 28px; }
.auth-brand p { margin: 0; color: var(--auth-muted); line-height: 1.5; }

.auth-alert {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
    font-weight: 700;
    margin-bottom: 16px;
}

.auth-form { display: grid; gap: 10px; }
.auth-form label { font-weight: 800; font-size: 14px; color: #334155; }
.auth-form input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    padding: 0 14px;
    font: inherit;
    outline: none;
}
.auth-form input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(139, 16, 35, .1);
}

.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 82px; }
.auth-password-wrap button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
}

.auth-submit {
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: 14px;
    background: var(--auth-primary);
    color: #fff;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
}
.auth-submit:hover { background: var(--auth-primary-dark); }

.auth-help {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
}
.auth-remember input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--auth-primary);
    flex: 0 0 auto;
}
.auth-remember span {
    display: grid;
    gap: 2px;
}
.auth-remember strong {
    color: #172033;
    font-size: 14px;
}
.auth-remember small {
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.35;
}
