:root {
    --primary: #1890ff;
    --primary-dark: #1677ff;
    --border: #e9edf3;
    --bg-soft: #f5f8fc;
    --card-radius: 10px;
    --btn-radius: 12px;
}
body {
    background: #f2f5f9;
    font-family: "PingFang SC", "Microsoft YaHei", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
}
.auth-shell { min-height: 100vh; display:flex; align-items:center; }
.auth-card { max-width: 420px; border-radius: var(--card-radius); box-shadow: 0 4px 14px rgba(15,23,42,0.06); border: 1px solid var(--border); }
.auth-visual {
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    background: #fff;
    height:100%;
    box-shadow: 0 4px 14px rgba(15,23,42,0.05);
}
.auth-visual .badge-soft { background:#eaf4ff; color:#1677ff; border-radius:999px; padding:6px 10px; font-weight:800; }
.login-card { border-radius: var(--card-radius); }
.btn-primary { background: var(--primary); border: none; border-radius: var(--btn-radius); min-height: 42px; padding: 0.5rem 1.1rem; font-weight: 600; box-shadow: 0 10px 24px rgba(37,99,235,0.18); transition: all .25s ease; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 14px 28px rgba(37,99,235,0.22); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.auth-illustration {
    border-radius: var(--card-radius);
    border: 1px solid #eaf0f8;
    background: linear-gradient(135deg, #f8fbff 0%, #f2f7ff 100%);
    padding: 14px;
}
.auth-footer-tip { font-size: 0.85rem; color:#6b7280; line-height: 1.6; }
.auth-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 20;
}
.auth-topbar .brand { font-weight: 600; color: #1f2937; text-decoration: none; font-size: 0.95rem; }
.auth-topbar .brand i { color: var(--primary); }
.auth-topbar .btn { border-radius: var(--btn-radius); min-height: 34px; font-size: 0.82rem; font-weight: 600; }
.auth-topbar .btn:hover { background: #f9fafb; border-color: #9ca3af; color: #1f2937; }
.auth-topbar .btn-home {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: var(--btn-radius);
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(24,144,255,0.2);
}
.auth-topbar .btn-home:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24,144,255,0.3);
}
.card-title { font-size: 1.22rem; letter-spacing: -0.01em; }
.form-label { font-size: 0.9rem; font-weight: 500; color: #475569; margin-bottom: 0.45rem; }
.form-control { min-height: 42px; border-radius: 10px; border-color: #dbe3ee; }
.form-control:focus { border-color: #93c5fd; box-shadow: 0 0 0 0.2rem rgba(24, 144, 255, 0.15); }
.small { line-height: 1.6; }

/* ===== 按钮 Loading 状态 ===== */
.btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}
.btn-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ===== 表单实时验证 ===== */
.field-feedback {
    font-size: 0.8rem;
    margin-top: 4px;
    min-height: 1.2em;
    transition: opacity .2s ease;
}
.field-feedback.invalid {
    color: #ef4444;
}
.field-feedback.valid {
    color: #22c55e;
}
.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 0.15rem rgba(239, 68, 68, 0.12);
}
.form-control.is-valid {
    border-color: #22c55e;
    box-shadow: 0 0 0 0.15rem rgba(34, 197, 94, 0.12);
}

/* ===== 密码显示/隐藏 ===== */
.password-toggle-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.password-toggle-wrap .form-control {
    padding-right: 42px;
    flex: 1;
    min-height: 42px;
}
.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 6px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.password-toggle-btn:hover {
    color: #475569;
    background: #f1f5f9;
}

/* ===== 页面过渡动画 ===== */
.page-enter {
    animation: page-fade-in .35s ease both;
}
.page-exit {
    animation: page-fade-out .2s ease both;
}
/* 默认隐藏，防止动画前闪一下 */
body.auth-shell-page {
    opacity: 0;
    transition: opacity .35s ease;
}
body.auth-shell-page.page-enter {
    opacity: 1;
}
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes page-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
    .page-enter, .page-exit { animation: none !important; }
}

