:root {
    color-scheme: light;
    --bg: #f4f7fc;
    --surface: #ffffff;
    --text: #18243a;
    --muted: #64748b;
    --line: #e3e9f2;
    --accent: #2563eb;
    --soft: #edf3ff;
    --field: #f9fbfe;
    --glow: #e6efff;
    --shadow: 0 24px 70px -30px #21417429, 0 2px 8px #203d6510;
    --error: #a32c38;
    --error-bg: #fff2f3;
    --success: #176648;
    --success-bg: #edfaf3;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1523;
    --surface: #151f30;
    --text: #f1f5fc;
    --muted: #a3b1c7;
    --line: #29354a;
    --accent: #88b0ff;
    --soft: #202f49;
    --field: #101a2a;
    --glow: #172b48;
    --shadow: 0 24px 80px -30px #0009, 0 2px 8px #0002;
    --error: #ffb5bd;
    --error-bg: #36232e;
    --success: #8ce0b8;
    --success-bg: #18372e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at 50% 0, var(--glow), transparent 65%), var(--bg);
    color: var(--text);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a, button, input { -webkit-tap-highlight-color: transparent; }
svg {
    width: 22px; height: 22px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.login-header, .login-footer {
    width: min(1160px, calc(100% - 64px));
    margin-inline: auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.login-header { padding-block: 26px; }
.brand {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 16px; letter-spacing: -.45px; font-weight: 650; line-height: 1.25;
}
.brand strong { color: var(--muted); font-weight: 450; }
.brand small {
    display: block; margin-top: 5px;
    font-size: 9px; letter-spacing: 2.5px; font-weight: 700; color: var(--muted);
}
.brand-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    background: #2563eb; color: #fff;
    box-shadow: 0 5px 12px #2563eb1f;
}
.brand-icon svg { width: 23px; height: 23px; }
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 44px; padding: 9px 14px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.sun-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: block; }
:root[data-theme="dark"] .moon-icon { display: none; }
.login-main {
    width: min(460px, calc(100% - 40px));
    margin: auto;
    padding-block: 22px 38px;
}
.login-card {
    position: relative;
    padding: 36px 38px 0;
    border: 1px solid var(--line); border-radius: 24px;
    background: var(--surface); box-shadow: var(--shadow);
}
.login-card::before {
    content: ""; position: absolute; top: -1px; left: calc(50% - 28px);
    width: 56px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent);
}
.card-heading { text-align: center; }
.card-icon {
    width: 56px; height: 56px; margin: 0 auto 21px;
    display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 17px;
    background: var(--soft); color: var(--accent);
}
.card-icon svg { width: 25px; height: 25px; }
.eyebrow {
    display: block; color: var(--muted);
    font-size: 10px; letter-spacing: 1.8px; font-weight: 700;
}
.login-card h1 {
    margin: 11px 0 10px;
    font-size: 29px; font-weight: 700; letter-spacing: -.9px; line-height: 1.2;
}
.card-description { margin: 0 0 29px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg {
    position: absolute; left: 16px; width: 19px; height: 19px;
    color: var(--muted); pointer-events: none;
}
.input-wrap input {
    width: 100%; min-width: 0; height: 52px;
    padding: 13px 15px 13px 45px;
    border: 1px solid var(--line); border-radius: 11px;
    background: var(--field); color: var(--text); font-size: 16px;
    transition: border-color .15s, box-shadow .15s;
}
.input-wrap input::placeholder { color: var(--muted); opacity: .85; }
.input-wrap input:focus {
    outline: 0; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--soft); background: var(--surface);
}
.input-wrap input#password { padding-right: 50px; }
.input-wrap input:autofill { box-shadow: 0 0 0 100px var(--field) inset; }
.input-wrap input:-webkit-autofill {
    -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 100px var(--field) inset;
}
.password-toggle {
    position: absolute; right: 4px;
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 8px; background: transparent; color: var(--muted);
}
.password-toggle:hover { color: var(--accent); background: var(--soft); }
.password-toggle[aria-pressed="true"] { color: var(--accent); background: var(--soft); }
.password-toggle svg { width: 20px; height: 20px; }
.caps-lock { display: block; margin-top: 8px; color: var(--error); font-size: 12px; }
.submit-button {
    width: 100%; min-height: 52px; margin-top: 7px; padding: 13px 20px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    border: 1px solid #2563eb; border-radius: 11px;
    background: #2563eb; color: #fff; font-size: 15px; font-weight: 650;
    box-shadow: 0 5px 12px #2563eb1a; transition: background .15s, box-shadow .15s;
}
.submit-button:hover { background: #1d4ed8; border-color: #1d4ed8; box-shadow: 0 6px 18px #2563eb30; }
.submit-button svg { width: 19px; height: 19px; }
.submit-button:disabled { cursor: wait; opacity: .65; box-shadow: none; }
.form-status { color: var(--muted); font-size: 12px; text-align: center; }
.card-footer {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-top: 30px; padding-block: 22px 24px; border-top: 1px solid var(--line);
    color: var(--muted); font-size: 12px;
}
.card-footer > div { display: flex; flex-direction: column; gap: 2px; }
.support-icon {
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 11px; background: var(--field); border: 1px solid var(--line);
}
.support-icon svg { width: 19px; height: 19px; }
.card-footer a { color: var(--accent); font-size: 13px; font-weight: 600; }
.card-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.access-note {
    display: flex; justify-content: center; align-items: center; gap: 7px;
    margin: 21px 0 0; font-size: 11px; color: var(--muted);
}
.access-note svg { width: 15px; height: 15px; }
.notice {
    margin-bottom: 22px; padding: 12px 14px;
    border: 1px solid currentColor; border-radius: 11px;
    font-size: 13px; line-height: 1.6; overflow-wrap: anywhere;
}
.notice-error { color: var(--error); background: var(--error-bg); }
.notice-success { color: var(--success); background: var(--success-bg); }
.bot-field {
    position: absolute; width: 1px; height: 1px; clip-path: inset(50%);
    overflow: hidden; white-space: nowrap;
}
.login-footer { padding-block: 19px 23px; font-size: 11px; color: var(--muted); }
.login-footer a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; }
.login-footer a:hover { color: var(--accent); }
@media (max-width: 600px) {
    .login-header, .login-footer { width: calc(100% - 40px); }
    .login-header { padding-block: 20px; }
    .login-main { padding-block: 20px 27px; }
    .login-card { padding: 30px 27px 0; border-radius: 21px; }
    .login-footer { flex-direction: column-reverse; gap: 8px; padding-block: 10px 22px; text-align: center; }
}
@media (max-width: 380px) {
    .brand { font-size: 14px; gap: 9px; }
    .brand-icon { width: 38px; height: 38px; }
    .theme-toggle { min-width: 44px; padding-inline: 10px; }
    .theme-toggle [data-theme-label] { display: none; }
    .login-main { width: calc(100% - 32px); }
    .login-card { padding: 27px 22px 0; }
    .login-card h1 { font-size: 25px; }
    .card-description { font-size: 13px; }
    .access-note { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }