/* 纸感令牌（与用户中心一致，去紫渐变） */
:root {
    --brand: #9C5B33;
    --brand-2: #b3764a;
    --brand-grad: #9C5B33;
    --ink: #2A2622;
    --text: #4A443C;
    --muted: #8C8477;
    --line: #E7E2D6;
    --bg: #F4F1EA;
    --card: #ffffff;
    --danger: #B4453A;
    --danger-soft: #F6E4E1;
    --r: 12px;
    --r-sm: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}
svg { display: block; }

/* 纸感底纹：极淡的暖色斑点，非渐变光晕 */
body::before, body::after {
    content: ''; position: fixed; border-radius: 50%;
    background: rgba(156, 91, 51, .05); pointer-events: none; z-index: 0;
}
body::before { width: 460px; height: 460px; top: -160px; right: -120px; }
body::after { width: 380px; height: 380px; bottom: -150px; left: -120px; }

/* ===================== Layout ===================== */
.login-container {
    position: relative; z-index: 1;
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 24px;
}
.login-card {
    width: 100%; max-width: 420px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
    box-shadow: 0 12px 40px rgba(70, 56, 30, .10);
}

/* ----- 品牌头部：纸感浅底 + 墨字 + 书页棕点，去渐变 ----- */
.login-head { background: #EFE9DC; color: var(--ink); padding: 30px 34px 24px; border-bottom: 1px solid var(--line); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .2px; margin-bottom: 18px; color: var(--muted); }
.login-brand::before { content: ''; width: 11px; height: 11px; border-radius: 4px; background: var(--brand); flex-shrink: 0; }
.login-head h1 { font-size: 23px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.2px; color: var(--ink); }
.login-head .subtitle { color: var(--muted); font-size: 13.5px; }

.login-body { padding: 28px 34px 32px; }

/* ===================== Form ===================== */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--ink); }
.form-control {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line);
    border-radius: var(--r-sm); font-size: 14px; background: #fbfbfe; color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control::placeholder { color: #b3ab9d; }
.form-control:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(156, 91, 51, .12); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 12px; border: 1px solid transparent; border-radius: var(--r-sm);
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: opacity .15s, background .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--brand-grad); color: #fff; }
.btn-primary:hover:not(:disabled) { opacity: .93; }
.btn-secondary { width: auto; white-space: nowrap; padding: 11px 15px; font-size: 13.5px; background: #fff; color: var(--brand); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); }

.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .form-control { flex: 1; }

.switch-line { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.link-muted { color: var(--brand); font-weight: 700; text-decoration: none; }
.link-muted:hover { text-decoration: underline; }

.login-error {
    color: var(--danger); background: var(--danger-soft); border: 1px solid #f5cdd2;
    font-size: 13px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm);
    display: none; text-align: center;
}

.login-hint {
    color: #1a7f37; background: #e8f6ec; border: 1px solid #b7e0c2;
    font-size: 13px; line-height: 1.6; margin-top: 14px; padding: 10px 12px;
    border-radius: var(--r-sm); display: none; text-align: left;
}

/* 重置密码成功后，复用 .login-error 元素展示绿色成功提示 */
.login-error.login-success {
    color: #1a7f37; background: #e8f6ec; border-color: #b7e0c2;
}

/* ===================== Responsive ===================== */
@media (max-width: 480px) {
    .login-head { padding: 28px 22px 22px; }
    .login-body { padding: 24px 22px 28px; }
    .login-head h1 { font-size: 21px; }
}
