:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #526079;
    --surface: #fff;
    --border: #d9d9d9;
    --edge: #f0f0f0;
    --brand: #1677ff;
    --focus: #b4d6ff;
    --background: #edf1fc url('/workbench/login-light.webp') center / cover no-repeat;
    --danger: #b42318;
    --warning: #805308;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f1f4fa;
    --muted: #b3bfd2;
    --surface: #182232;
    --border: #526176;
    --edge: #354155;
    --focus: #315885;
    --background: #142238 url('/workbench/login-dark.webp') center / cover no-repeat;
    --danger: #ffa5a0;
    --warning: #f5cb7b;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font: 14px/1.5714 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
}
.login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 16px;
}
.brand { text-align: center; }
.brand-mark {
    width: 48px; height: 48px;
    display: inline-grid; place-items: center;
    border-radius: 6px;
    color: #fff; background: var(--brand);
    font-size: 22px; font-weight: 600;
}
.brand h1 { margin: 10px 0 2px; font-size: 22px; line-height: 1.57; }
.products, .tagline { margin: 0; color: var(--muted); }
.tagline { margin-top: 2px; font-size: 12px; }
.login-card {
    width: min(100%, 420px);
    padding: 20px;
    border: 1px solid var(--edge);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
}
h2 { margin: 0; font-size: 18px; line-height: 1.28; font-weight: 650; }
.intro { margin: 4px 0 12px; color: var(--muted); font-size: 12px; line-height: 20px; }
form, .enrollment { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
label { font-size: 13px; line-height: 20px; }
input, button { font: inherit; }
input {
    display: block; width: 100%; min-height: 34px;
    padding: 5px 11px;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface); color: var(--ink);
    outline: none;
}
input::placeholder { color: var(--muted); opacity: .78; }
input:hover { border-color: #599bff; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 48%, transparent); }
input[aria-invalid="true"] { border-color: var(--danger); }
.with-action { position: relative; }
.with-action input { padding-right: 44px; }
button { cursor: pointer; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.eye {
    position: absolute; inset: 1px 1px 1px auto;
    width: 36px; display: grid; place-items: center;
    padding: 0; border: 0; border-radius: 5px;
    color: var(--muted); background: transparent;
}
.eye:hover, .back:hover { color: var(--brand); }
.primary {
    min-height: 34px; width: 100%; border: 0; border-radius: 6px;
    background: var(--brand); color: #fff; font-weight: 500;
}
.primary:hover:not(:disabled) { background: #0868ed; }
button:disabled { opacity: .65; cursor: default; }
.back { display: block; margin: 0 auto; border: 0; color: var(--muted); background: transparent; }
.login-card > .back { margin-top: 12px; }
.trap { display: none; }
.field-error, .notice { margin: 0; font-size: 13px; }
.notice { margin: 8px 0 12px; overflow-wrap: anywhere; }
.error, .field-error { color: var(--danger); }
.warning { color: var(--warning); }
.notice a, summary { color: var(--brand); }
summary { cursor: pointer; }
details p { margin: 6px 0 0; }
code { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.qr { justify-self: center; background: #fff; padding: 8px; border-radius: 4px; }
.qr canvas, .qr img { max-width: 100%; height: auto; }
@media (max-width: 480px) {
    .login-page { padding: 24px 16px; }
    input, .primary { min-height: 44px; font-size: 16px; }
    .eye { width: 44px; }
}
