/* 登录是后台的入口变体；基础颜色消费 theme-modern.css 的 --tm-*。 */
.admin-login-page {
    --auth-radius: var(--tm-radius-lg);
    --auth-panel-radius: calc(var(--tm-radius-lg) * 2);
    --auth-action-color: var(--tm-primary-active);
    --auth-on-color: var(--tm-card-bg);
    --auth-success-color: var(--tm-success-strong);
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 40px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    background: var(--tm-bg);
    line-height: 1.6;
}
.admin-login-page *, .admin-login-page *::before, .admin-login-page *::after { box-sizing: border-box; }
.admin-login-page [hidden] { display: none !important; }
.admin-login-page button, .admin-login-page input { font: inherit; }
.admin-login-page button { cursor: pointer; }
.admin-login-page button:disabled { cursor: default; }
.admin-login-page svg { display: block; }
.admin-login-page button:focus-visible, .admin-login-page a:focus-visible { outline: 2px solid var(--tm-primary-active); outline-offset: 4px; }
.auth-layout { display: grid; grid-template-columns: 43% 57%; width: min(1120px, 100%); min-height: 700px; border: 1px solid var(--tm-border); border-radius: var(--auth-panel-radius); background: var(--tm-card-bg); box-shadow: var(--tm-shadow-lg); }
.auth-aside { display: flex; flex-direction: column; padding: 40px; background: var(--tm-shell-bg); color: var(--auth-on-color); border-radius: var(--auth-panel-radius) 0 0 var(--auth-panel-radius); min-width: 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.auth-brand-mark { display: grid; flex: 0 0 38px; height: 38px; place-items: center; background: var(--tm-primary-active); border-radius: var(--tm-radius); }
.auth-brand-mark svg { width: 22px; height: 22px; }
.auth-aside-content { margin-top: auto; padding: 56px 0 36px; }
.auth-eyebrow { margin: 0 0 16px; color: var(--tm-shell-text); font-size: 12px; letter-spacing: .18em; }
.auth-aside h2 { margin: 0; font-size: clamp(26px, 2.3vw, 32px); line-height: 1.6; font-weight: 600; letter-spacing: -.04em; }
.auth-aside-description { margin: 18px 0 28px; color: var(--tm-shell-text); font-size: 14px; line-height: 1.9; }
.auth-workspace { border: 1px solid color-mix(in srgb, var(--tm-shell-text) 30%, transparent); border-radius: var(--tm-radius-lg); background: color-mix(in srgb, var(--tm-card-bg) 4%, var(--tm-shell-bg)); transform: rotate(-3deg); transform-origin: center; }
.auth-workspace-top { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid color-mix(in srgb, var(--tm-shell-text) 20%, transparent); color: var(--tm-shell-text); font-size: 11px; }
.auth-workspace-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tm-primary-hover); }
.auth-workspace-top-line { width: 36px; height: 3px; margin-left: auto; border-radius: 3px; background: var(--tm-shell-text); opacity: .35; }
.auth-workspace-main { display: flex; min-height: 180px; }
.auth-workspace-nav { display: flex; flex-direction: column; gap: 18px; width: 50px; padding: 22px 16px; border-right: 1px solid color-mix(in srgb, var(--tm-shell-text) 20%, transparent); }
.auth-workspace-nav i { width: 16px; height: 5px; border-radius: 2px; background: var(--tm-shell-text); opacity: .3; }
.auth-workspace-nav i:first-child { background: var(--tm-primary-hover); opacity: 1; }
.auth-workspace-chart { flex: 1; min-width: 0; padding: 20px; color: var(--tm-shell-text); font-size: 10px; }
.auth-workspace-chart svg { width: 100%; height: 105px; margin-top: 8px; }
.auth-chart-grid { stroke: var(--tm-shell-text); stroke-opacity: .15; stroke-dasharray: 3 5; }
.auth-chart-area { fill: var(--tm-primary); fill-opacity: .12; }
.auth-chart-line { stroke: var(--tm-primary-hover); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-chart-point { fill: var(--tm-primary-hover); stroke: var(--tm-shell-bg); stroke-width: 3; }
.auth-workspace-records { display: flex; gap: 12px; margin-top: 14px; }
.auth-workspace-records i { width: 25%; height: 4px; background: var(--tm-shell-text); opacity: .2; border-radius: 3px; }
.auth-aside-footer { display: flex; align-items: center; gap: 12px; margin-top: auto; color: var(--tm-shell-text); font-size: 11px; letter-spacing: .06em; }
.auth-footer-rule { width: 22px; height: 1px; background: currentColor; }
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 40px 48px 30px; }
.auth-main-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--tm-text-2); font-size: 12px; }
.auth-access-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.auth-access-label svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.auth-form-content { width: min(380px, 100%); margin: auto; padding: 52px 0 20px; }
.auth-heading { margin-bottom: 34px; }
.auth-form-eyebrow { margin: 0 0 8px; color: var(--tm-primary-active); font-size: 13px; font-weight: 600; }
.auth-heading h1 { margin: 0 0 10px; color: var(--tm-text); font-size: 30px; line-height: 1.5; letter-spacing: -.03em; font-weight: 600; }
.auth-heading > p:last-child { margin: 0; color: var(--tm-text-2); font-size: 13px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; margin-bottom: 8px; color: var(--tm-text); font-size: 13px; font-weight: 500; }
.auth-input-wrap { position: relative; }
.auth-input-wrap input { width: 100%; min-height: 52px; padding: 13px 16px 13px 44px; border: 1px solid var(--tm-text-3); border-radius: var(--auth-radius); background: var(--tm-card-bg); color: var(--tm-text); font-size: 14px; line-height: 24px; outline: none; transition: border-color 180ms, box-shadow 180ms; }
.auth-input-wrap input::placeholder { color: var(--tm-text-2); }
.auth-input-wrap input:hover { border-color: var(--tm-text-2); }
.auth-input-wrap input:focus { border-color: var(--tm-primary-active); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm-primary) 14%, transparent); }
.auth-input-wrap input[aria-invalid="true"] { border-color: var(--tm-danger); }
.auth-input-wrap input:read-only { background: var(--tm-bg); }
#login-password { padding-right: 52px; }
.auth-field-icon { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; stroke: var(--tm-text-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.auth-password-toggle { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--tm-radius); color: var(--tm-text-2); background: transparent; transition: background-color 180ms, color 180ms; }
.auth-password-toggle:hover { background: var(--tm-hover-bg); color: var(--tm-text); }
.auth-password-toggle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye-slash { display: none; }
.auth-password-toggle[aria-pressed="true"] .auth-eye-slash { display: block; }
.auth-field-error { display: block; min-height: 22px; padding-top: 4px; color: var(--tm-danger-strong); font-size: 12px; line-height: 18px; }
.auth-message-slot { min-height: 30px; margin: -2px 0 10px; }
.auth-form-error { margin: 0; color: var(--tm-danger-strong); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.auth-submit-wrap { position: relative; height: 56px; }
.auth-submit { position: relative; display: grid; place-items: center; width: 100%; height: 56px; padding: 0; border: 0; border-radius: var(--auth-radius); color: var(--auth-on-color); background: transparent; -webkit-tap-highlight-color: transparent; }
.auth-button-surface { position: absolute; inset: 0; border-radius: var(--auth-radius); background: var(--auth-action-color); clip-path: inset(0 0 round var(--auth-radius)); transition: clip-path 780ms cubic-bezier(.65, 0, .35, 1), background-color 240ms, filter 180ms; }
.auth-submit:not(:disabled):hover .auth-button-surface { filter: brightness(.92); }
.auth-submit:not(:disabled):active .auth-button-surface { filter: brightness(.85); }
.auth-button-label { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; font-size: 15px; font-weight: 500; transition: opacity 130ms, transform 180ms; }
.auth-button-arrow { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-spinner { display: none; width: 17px; height: 17px; border: 2px solid color-mix(in srgb, var(--auth-on-color) 40%, transparent); border-top-color: var(--auth-on-color); border-radius: 50%; animation: auth-spin 700ms linear infinite; }
.auth-success-check { position: absolute; top: 14px; left: calc(50% - 14px); width: 28px; height: 28px; opacity: 0; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-success-check path { stroke-dasharray: 36; stroke-dashoffset: 36; }
.auth-form[data-state="loading"] .auth-button-surface { opacity: .6; }
.auth-form[data-state="submitting"] .auth-spinner { display: block; }
.auth-form[data-state="submitting"] .auth-button-arrow { display: none; }
.auth-form[data-state="success"] .auth-button-surface { background: var(--auth-success-color); clip-path: inset(0 var(--auth-collapse-inset) round 28px); }
.auth-form[data-state="success"] .auth-button-label { opacity: 0; transform: translateY(-8px); }
.auth-form[data-state="success"] .auth-success-check { opacity: 1; transition: opacity 140ms 650ms; }
.auth-form[data-state="success"] .auth-success-check path { stroke-dashoffset: 0; transition: stroke-dashoffset 320ms 720ms; }
.auth-particles { position: absolute; inset: 0; pointer-events: none; }
.auth-particle { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--tm-primary); }
.auth-particle:nth-child(3n) { background: var(--auth-success-color); border-radius: 1px; }
.auth-particle:nth-child(3n + 1) { background: var(--tm-primary-hover); }
.auth-status-slot { min-height: 62px; padding-top: 16px; text-align: center; }
#login-status { margin: 0; color: var(--tm-text-2); font-size: 12px; line-height: 20px; }
.auth-form[data-state="success"] #login-status { color: var(--auth-success-color); }
#login-continue { display: inline-block; margin-top: 4px; color: var(--tm-primary-active); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.auth-resource-error { color: var(--tm-danger-strong); font-size: 12px; }
.auth-resource-error button { border: 0; padding: 12px 0; background: none; color: var(--tm-primary-active); text-decoration: underline; }
.auth-main-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; padding-top: 20px; color: var(--tm-text-2); font-size: 11px; }
.auth-main-footer span { border-left: 1px solid var(--tm-border-strong); padding-left: 16px; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 960px) {
    .admin-login-page { padding: 24px; }
    .auth-layout { grid-template-columns: 40% 60%; min-height: 660px; }
    .auth-aside { padding: 30px 24px; }
    .auth-main { padding: 30px; }
    .auth-aside h2 { font-size: 24px; }
    .auth-workspace-nav { display: none; }
}
@media (max-width: 720px) {
    .admin-login-page { padding: 20px; }
    .auth-layout { display: block; max-width: 500px; min-height: auto; }
    .auth-aside { padding: 24px; border-radius: var(--auth-panel-radius) var(--auth-panel-radius) 0 0; }
    .auth-brand { font-size: 15px; }
    .auth-brand-mark { flex-basis: 32px; height: 32px; }
    .auth-aside-content, .auth-aside-footer { display: none; }
    .auth-main { padding: 28px 24px 24px; }
    .auth-main-top { font-size: 11px; }
    .auth-form-content { padding: 32px 0 0; }
    .auth-heading { margin-bottom: 26px; }
    .auth-heading h1 { font-size: 27px; }
    .auth-main-footer { padding-top: 12px; }
}
@media (max-width: 380px) {
    .admin-login-page { padding: 12px; }
    .auth-main, .auth-aside { padding-left: 20px; padding-right: 20px; }
    .auth-main-footer span { padding-left: 0; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-login-page *, .admin-login-page *::before, .admin-login-page *::after { transition: none !important; animation: none !important; }
    .auth-workspace { transform: none; }
    .auth-form[data-state="success"] .auth-button-label { transform: none; }
}
@media (forced-colors: active) {
    .auth-button-surface { background: ButtonText; }
    .auth-submit { color: ButtonFace; }
    .auth-input-wrap input { border-color: ButtonText; }
}

.auth-field-help { margin: 6px 0 0; color: var(--tm-text-3); font-size: 12px; line-height: 1.6; }
