/* ==========================================
   auth.css — 登录页 · 卷宗
   深色桌面 + 冷白档案纸；项目蓝 #007AFF
   落地页：桌面版（≥1024），无背景动效
   ========================================== */

.auth-desk {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    padding: 40px;
    overflow: auto;
    min-width: 1024px;

    --a-desk: #0E141C;
    --a-sheet: #F8F9FB;
    --a-sheet-2: #EEF1F6;
    --a-sheet-3: #E3E8F0;
    --a-ink-1: #0B1220;
    --a-ink-2: #3A4657;
    --a-ink-3: #5A6779;
    --a-border: rgba(13, 26, 45, 0.11);
    --a-border-strong: rgba(13, 26, 45, 0.20);
    --a-accent: #007AFF;
    --a-accent-deep: #0062CC;
    --a-accent-press: #0055B3;
    --a-on-accent: #F8F9FB;
    --a-art-line: #A9CBF2;
    --a-danger: #C62828;
    --a-serif: Georgia, 'Times New Roman', 'Songti SC', 'STSong', 'SimSun', serif;
    --a-sans: var(--font-family);

    font-family: var(--a-sans);
    color: var(--a-ink-1);
    background:
        radial-gradient(640px 420px at 88% 6%, rgba(0, 122, 255, 0.10), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
        var(--a-desk);
}

.auth-sheet {
    position: relative;
    isolation: isolate;
    margin: auto;
    width: min(1120px, 100%);
    background: var(--a-sheet);
    border-radius: 5px;
    box-shadow: 0 40px 90px -46px rgba(4, 8, 16, 0.72);
}

.auth-sheet::before,
.auth-sheet::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 5px;
    z-index: -1;
}

.auth-sheet::before {
    transform: translate(11px, 13px);
    background: var(--a-sheet-3);
}

.auth-sheet::after {
    transform: translate(5px, 6px);
    background: var(--a-sheet-2);
}

/* ---------- 信头 ---------- */
.auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 40px;
    border-bottom: 1px solid var(--a-border);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.auth-seal {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1.5px solid var(--a-accent);
    border-radius: 2px;
    color: var(--a-accent);
    font-family: var(--a-serif);
    font-size: 17px;
    line-height: 1;
}

.auth-brand-name {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--a-ink-1);
}

.auth-brand-sub {
    display: block;
    margin-top: 2px;
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--a-ink-3);
}

.auth-head-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--a-ink-3);
}

.auth-head-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--a-ink-3);
    opacity: 0.55;
}

/* ---------- 正文 ---------- */
.auth-doc {
    display: grid;
    grid-template-columns: 1.36fr 1fr;
    min-height: 512px;
}

.auth-intro {
    display: flex;
    flex-direction: column;
    padding: 50px 46px 42px 40px;
    border-right: 1px solid var(--a-border);
}

.auth-serial {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-family: var(--a-serif);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--a-ink-3);
}

.auth-serial::before {
    content: '';
    width: 14px;
    height: 1px;
    background: var(--a-accent);
}

.auth-title {
    margin: 30px 0 0;
    font-family: var(--a-serif);
    font-size: 58px;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: var(--a-ink-1);
}

.auth-title span {
    color: var(--a-accent);
}

.auth-art {
    display: block;
    width: min(100%, 480px);
    height: auto;
    margin-top: auto;
    color: var(--a-art-line);
    overflow: visible;
}

.auth-art-accent {
    fill: var(--a-accent);
}

/* ---------- 登录区 ---------- */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px 40px 42px 46px;
}

.auth-switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 26px;
    font-size: 11.5px;
    color: var(--a-ink-3);
}

.auth-switch[hidden] {
    display: none;
}

.auth-switch button {
    border: 0;
    border-bottom: 1px solid var(--a-border-strong);
    background: none;
    padding: 0 0 1px;
    font: inherit;
    font-size: 11.5px;
    color: var(--a-ink-1);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-switch button:hover {
    color: var(--a-accent-deep);
    border-color: var(--a-accent-deep);
}

.auth-title-sm {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--a-ink-1);
}

.auth-sub {
    margin: 7px 0 0;
    font-size: 13px;
    color: var(--a-ink-3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.auth-form[hidden] {
    display: none;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field > label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--a-ink-3);
}

.auth-field > label::before,
.auth-field > label::after {
    content: none !important;
}

.auth-field:focus-within > label {
    color: var(--a-accent-deep);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 0;
    border: 0;
    border-bottom: 1.5px solid var(--a-border-strong);
    border-radius: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--a-ink-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
    color: var(--a-ink-3);
    opacity: 0.72;
}

.auth-input:focus {
    border-bottom-color: var(--a-accent);
    box-shadow: inset 0 -1.5px 0 var(--a-accent);
}

.auth-pw-toggle {
    position: absolute;
    right: 0;
    bottom: 1px;
    height: 40px;
    padding: 0 2px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 11px;
    color: var(--a-ink-3);
    cursor: pointer;
    transition: color 0.15s ease;
}

.auth-pw-toggle:hover,
.auth-pw-toggle[aria-pressed="true"] {
    color: var(--a-accent-deep);
}

.auth-hint {
    margin: -2px 0 2px;
    font-size: 11px;
    color: var(--a-ink-3);
}

.auth-hint a {
    color: var(--a-ink-3);
    text-decoration: none;
    border-bottom: 1px solid var(--a-border);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-hint a:hover {
    color: var(--a-accent-deep);
    border-color: var(--a-accent-deep);
}

.auth-register-note {
    margin: -2px 0 2px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--a-ink-3);
}

.auth-error {
    display: none;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--a-danger);
}

.auth-error:not(:empty) {
    display: block;
}

.auth-submit {
    position: relative;
    height: 46px;
    margin-top: 4px;
    border: 0;
    border-radius: 3px;
    background: var(--a-accent-deep);
    color: var(--a-on-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.auth-submit:hover {
    background: var(--a-accent-press);
    box-shadow: 0 10px 24px -12px rgba(0, 98, 204, 0.55);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit.loading {
    pointer-events: none;
    opacity: 0.9;
}

.auth-submit.loading span {
    visibility: hidden;
}

.auth-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(248, 249, 251, 0.35);
    border-top-color: var(--a-on-accent);
    border-radius: 50%;
    animation: authSpin 0.65s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* ---------- 页脚 ---------- */
.auth-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 40px 14px;
    border-top: 1px solid var(--a-border);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    color: var(--a-ink-3);
}

.auth-foot .status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.auth-foot .status::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #34C759;
}

/* ---------- 错误抖动 ---------- */
.auth-shake {
    animation: authShake 0.35s var(--ease-out);
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ---------- 暗色 ---------- */
[data-theme="dark"] .auth-desk {
    --a-desk: #05070C;
    --a-sheet: #16181D;
    --a-sheet-2: #1E2128;
    --a-sheet-3: #242833;
    --a-ink-1: #F2F4F8;
    --a-ink-2: #C3C9D4;
    --a-ink-3: #9AA3B2;
    --a-border: rgba(255, 255, 255, 0.10);
    --a-border-strong: rgba(255, 255, 255, 0.18);
    --a-accent: #0A84FF;
    --a-accent-deep: #0A84FF;
    --a-accent-press: #0070E0;
    --a-on-accent: #F8F9FB;
    --a-art-line: rgba(120, 170, 255, 0.45);
    --a-danger: #FF6B60;

    background:
        radial-gradient(640px 420px at 88% 6%, rgba(10, 132, 255, 0.10), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 64px 64px,
        var(--a-desk);
}

[data-theme="dark"] .auth-sheet {
    box-shadow: 0 40px 90px -46px rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .auth-sheet::before {
    background: #1A1D24;
}

[data-theme="dark"] .auth-sheet::after {
    background: #131519;
}

/* ---------- 窄桌面 ---------- */
@media (max-width: 1180px) {
    .auth-desk { padding: 28px; }
    .auth-intro { padding: 42px 34px 36px 32px; }
    .auth-panel { padding: 40px 32px 36px 34px; }
    .auth-title { font-size: 48px; }
    .auth-head,
    .auth-foot { padding-left: 32px; padding-right: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit.loading::after { animation: none; }
    .auth-shake { animation: none; }
}
