/* Trang đăng nhập và mật khẩu: một khung, cùng màu với trang quản trị, không cần Tailwind. */
:root {
    --auth-bg: #fafafa;
    --auth-card: #fff;
    --auth-text: #18181b;
    --auth-soft: #6b6b70;
    --auth-faint: #71717a;
    --auth-border: #e4e4e7;
    --auth-ink: #1b1a33;
    --auth-focus: #3d4eeb;
    color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-text);
    background: var(--auth-bg);
}
.auth-wrap { width: 100%; max-width: 380px; min-width: 0; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; min-width: 0; }
.auth-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.auth-brand-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.auth-card { padding: 24px; background: var(--auth-card); border: 1px solid var(--auth-border); border-radius: 10px; }
.auth-card h1 { margin: 0 0 4px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.auth-sub { margin: 0 0 16px; color: var(--auth-soft); font-size: 13.5px; }
.auth-field { display: block; margin: 14px 0 0; }
.auth-field-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.auth-label { display: block; font-size: 13px; font-weight: 500; }
.auth-field > .auth-label { margin-bottom: 6px; }
.auth-input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    font: inherit;
    font-size: 16px;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
}
.auth-input:focus { outline: 0; border-color: var(--auth-focus); box-shadow: 0 0 0 3px rgba(61, 78, 235, .14); }
.auth-input:disabled { background: var(--auth-bg); color: var(--auth-faint); }
.auth-hint { display: block; margin-top: 5px; font-size: 12.5px; color: var(--auth-faint); }
.auth-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--auth-ink); cursor: pointer; }
.auth-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--auth-ink); }
.auth-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: var(--auth-ink);
    border: 0;
    border-radius: 6px 6px 16px 6px;
    cursor: pointer;
}
.auth-btn:hover { background: #2a2950; }
.auth-btn:focus-visible, .auth-link:focus-visible { outline: 2px solid var(--auth-focus); outline-offset: 2px; }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }
.auth-link { color: #5b6aae; font-size: 13px; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 13px; }
.auth-notice { margin: 0 0 14px; padding: 10px 12px; font-size: 13.5px; border-radius: 6px; border: 1px solid var(--auth-border); overflow-wrap: anywhere; }
.auth-notice-error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.auth-notice-success { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --auth-bg: #18181b; --auth-card: #1f1f23; --auth-text: #fafafa; --auth-soft: #a1a1aa; --auth-faint: #a1a1aa; --auth-border: #3f3f46; --auth-ink: #fafafa; color-scheme: dark;
    }
    :root:not([data-theme="light"]) .auth-input { background: #18181b; }
    :root:not([data-theme="light"]) .auth-btn { color: #18181b; }
    :root:not([data-theme="light"]) .auth-btn:hover { background: #e4e4e7; }
    :root:not([data-theme="light"]) .auth-link { color: #a5b4fc; }
    :root:not([data-theme="light"]) .auth-notice-error { color: #fca5a5; background: #2a1414; border-color: #7f1d1d; }
    :root:not([data-theme="light"]) .auth-notice-success { color: #86efac; background: #10241a; border-color: #14532d; }
}
