/* ========== 墨水紫金 · 登录页专属样式 ========== */

:root {
    --login-card-width: 440px;
    --login-glow-indigo: rgba(79, 110, 246, 0.15);
    --login-glow-amber: rgba(217, 119, 6, 0.08);
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
}

.login-scene {
    width: 100%;
    max-width: var(--login-card-width);
    position: relative;
    z-index: 1;
    animation: loginSceneIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginSceneIn {
    from { opacity: 0; transform: translateY(32px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ====== 装饰性背景元素：打破对称 ====== */
.deco-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 12s ease-in-out infinite;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(20px, -25px) scale(1.06); }
    66%      { transform: translate(-15px, 18px) scale(0.95); }
}

.deco-orb--purple {
    width: 380px; height: 380px;
    background: radial-gradient(circle, var(--login-glow-indigo), transparent 70%);
    top: -120px; right: -100px;
    animation-delay: 0s;
}
.deco-orb--amber {
    width: 280px; height: 280px;
    background: radial-gradient(circle, var(--login-glow-amber), transparent 70%);
    bottom: -60px; left: -80px;
    animation-delay: -5s;
}

/* 手绘风格波浪装饰（SVG inline） */
.deco-wave {
    position: absolute;
    top: -28px; left: -16px;
    width: 110px; height: auto;
    opacity: 0.35;
    animation: waveDraw 3s ease-out both;
    animation-delay: 0.4s;
}
@keyframes waveDraw {
    from { stroke-dashoffset: 200; opacity: 0; }
    to   { stroke-dashoffset: 0; opacity: 0.35; }
}

/* ====== 主卡片 ====== */
.login-card {
    background: rgba(14, 17, 32, 0.55);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(79, 110, 246, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    position: relative;
    transition: box-shadow 0.4s ease;
}
.login-card:hover {
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(79, 110, 246, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* 卡片顶部极细渐变线 */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 30%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--primary-light) 30%,
        var(--accent-light) 70%,
        transparent
    );
    opacity: 0.6;
}

/* ====== 头部区域 ====== */
.card-head {
    padding: 48px 44px 36px;
    position: relative;
}

/* Logo + 标题行 */
.brand-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

/* Logo 图标 */
.brand-icon-wrap {
    width: 46px; height: 46px;
    border-radius: 13px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(79, 110, 246, 0.3);
    flex-shrink: 0;
}

/* 品牌Logo SVG */
.brand-logo {
    width: 26px; height: 26px;
    display: block;
}
.brand-logo polygon {
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linejoin: round;
}
.brand-logo line {
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.brand-logo circle {
    fill: #fbbf24;
}

/* 主标题 — 干净利落，不做任何花哨裁剪 */
.brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #e8eafd;
    line-height: 1.2;
    margin: 0;
}
.brand-title em {
    font-style: normal;
    color: #f59e0b;
}

/* 副标题 */
.brand-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    font-weight: 400;
    margin: 4px 0 0 60px;
}

/* 手绘风格标语 */
.tagline-sketch {
    margin-top: 18px;
    padding-left: 60px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    position: relative;
}
.tagline-sketch::before {
    content: '//';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
    opacity: 0.65;
}

/* ====== Tab 切换（不对称胶囊） ====== */
.tab-switcher {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    position: relative;
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    letter-spacing: 0.02em;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
    background: rgba(255, 255, 255, 0.07);
    color: #e8eafd;
    box-shadow: none;
}
.tab-btn.active .tab-indicator {
    width: 12px; height: 2px;
    background: #ffffff;
    border-radius: 1px;
    margin: 4px auto 0;
    opacity: 0.85;
}

/* ====== 表单区域 ====== */
.card-body {
    padding: 0 44px 42px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.form-label i {
    font-size: 10px; opacity: 0.45;
}

/* ====== 内联SVG图标通用样式 ====== */
.icon-svg {
    width: 16px; height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}
.icon-svg.icon-sm {
    width: 11px; height: 11px;
    stroke-width: 2;
}
.input-box .icon-svg {
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.form-label .icon-svg {
    stroke-width: 2.5;
}

.input-box {
    position: relative;
}
.input-box .icon-input {
    position: absolute;
    left: 15px; top: 50%; transform: translateY(-50%);
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 50px 15px 50px;
    border: 1.5px solid rgba(79, 110, 246, 0.15);
    border-radius: 12px;
    font-size: 14.5px;
    font-family: inherit;
    font-weight: 400;
    color: #e8eafd;
    background: rgba(20, 15, 40, 0.4);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
}
.form-input:hover {
    border-color: rgba(79, 110, 246, 0.3);
    background: rgba(20, 15, 40, 0.5);
}
.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    transition: opacity 0.3s ease;
}
.form-input:focus::placeholder {
    opacity: 0.4;
}
.form-input:focus {
    border-color: rgba(79, 110, 246, 0.6);
    background: rgba(20, 15, 40, 0.6);
    box-shadow:
        0 0 0 3px rgba(79, 110, 246, 0.12),
        0 0 20px rgba(79, 110, 246, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.12);
}
.input-box:focus-within .icon-input {
    color: var(--primary-light);
    transform: translateY(-50%) scale(1.1);
}

/* 密码显示/隐藏按钮 */
.pwd-toggle {
    position: absolute;
    right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    z-index: 3;
    transition: color 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.pwd-toggle:hover { color: var(--text-secondary); }

/* ====== 提交按钮（琥珀金悬停效果） ====== */
.submit-row {
    margin-top: 26px;
}
.btn-submit {
    width: 100%;
    padding: 15px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.06em;
    cursor: pointer;
    color: white;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 6px 24px rgba(79, 110, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 55%;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
/* 悬停 → 靛蓝辉光 */
.btn-submit:hover:not(:disabled) {
    transform: translateY(-2.5px) scale(1.01);
    box-shadow:
        0 12px 36px rgba(79, 110, 246, 0.35),
        0 4px 16px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, #4F6EF6 0%, #6366F1 50%, #4F46E5 100%);
}
.btn-submit:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 4px 14px rgba(79, 110, 246, 0.25);
}
.btn-submit:disabled {
    opacity: 0.55; cursor: not-allowed;
    transform: none !important;
}

/* 加载动画 */
.spinner-sm {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}


/* ====== 消息提示 ====== */
.msg-bar {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    display: none;
    animation: msgSlide 0.3s ease;
}
@keyframes msgSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.msg-bar.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.msg-bar.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* ====== 底部签名式 footer ====== */
.card-footer {
    padding: 0 44px 36px;
}
.footer-signature {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.5;
    letter-spacing: 0.08em;
}
.footer-signature span { color: var(--accent); opacity: 0.6; }

/* ====== 表单切换动画 ====== */
.form-panel {
    display: block;
    animation: formFadeIn 0.35s ease both;
}
.form-panel.hidden { display: none; }
@keyframes formFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
 * 白天模式覆盖
 * ============================================ */
[data-theme="day"] body.login-page {
    background-color: var(--day-bg-paper) !important;
    background-image:
        url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E"),
        linear-gradient(175deg, #f8f4ec 0%, #f2ead8 40%, #ebe0cc 100%) !important;
    background-attachment: fixed !important;
}

[data-theme="day"] .deco-orb--purple {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08), transparent 70%);
}
[data-theme="day"] .deco-orb--amber {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.06), transparent 70%);
}

[data-theme="day"] .login-card {
    background: rgba(255, 253, 247, 0.82);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-color: var(--day-border-light);
    box-shadow:
        0 24px 64px rgba(139, 115, 85, 0.12),
        0 0 0 1px rgba(180, 165, 140, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(160, 145, 120, 0.1);
}

[data-theme="day"] .login-card::before {
    background: linear-gradient(90deg, transparent, var(--primary-light) 30%, var(--accent-light) 70%, transparent);
    opacity: 0.4;
}

[data-theme="day"] .brand-icon-wrap {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3) !important;
}

/* 日间模式 — 按钮主色调统一为蓝色（与首页"上传资料"一致） */
[data-theme="day"] .btn-submit {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    box-shadow:
        0 6px 24px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
[data-theme="day"] .btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%) !important;
    box-shadow:
        0 12px 36px rgba(59, 130, 246, 0.35),
        0 4px 16px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
[data-theme="day"] .btn-submit:active:not(:disabled) {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25) !important;
}
[data-theme="day"] .brand-title { color: #1a1530; }
[data-theme="day"] .brand-subtitle { color: var(--day-text-faint); }
[data-theme="day"] .tagline-sketch { color: var(--day-text-faint); }
[data-theme="day"] .tab-btn { color: var(--day-text-faint); }
[data-theme="day"] .tab-btn:hover { color: var(--day-text-medium); }
[data-theme="day"] .tab-btn.active { background: rgba(37, 99, 235, 0.10); color: #2563EB; font-weight: 700; }
[data-theme="day"] .tab-btn.active .tab-indicator { background: linear-gradient(90deg, #1D4ED8, #2563EB) !important; }
[data-theme="day"] .form-label { color: var(--day-text-medium); }
[data-theme="day"] .form-input {
    color: #2c2417;
    background: rgba(253, 250, 242, 0.75);
    border-color: rgba(190, 175, 155, 0.2);
}
[data-theme="day"] .form-input:hover {
    background: rgba(253, 250, 242, 0.85);
    border-color: rgba(190, 175, 155, 0.3);
}
[data-theme="day"] .form-input::placeholder { color: var(--day-text-faint); }
[data-theme="day"] .form-input:focus {
    border-color: var(--primary);
    background: rgba(253, 250, 242, 0.95);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
[data-theme="day"] .input-box:focus-within .icon-input { color: var(--primary); }
[data-theme="day"] .pwd-toggle { color: var(--day-text-faint); }
[data-theme="day"] .pwd-toggle:hover { color: var(--day-text-medium); }

[data-theme="day"] .msg-bar.error {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}
[data-theme="day"] .msg-bar.success {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

[data-theme="day"] .footer-signature { color: var(--day-text-faint); }

/* 响应式 */
@media (max-width: 480px) {
    :root { --login-card-width: 100%; }
    .card-head { padding: 36px 28px 28px; }
    .card-body { padding: 0 28px 34px; }
    .card-footer { padding: 0 28px 30px; }
    .brand-row { gap: 12px; }
    .brand-icon-wrap { width: 42px; height: 42px; border-radius: 11px; }
    .brand-logo { width: 24px; height: 24px; }
    .brand-title { font-size: 20px; }
    .brand-subtitle { margin-left: 56px; }
    .tagline-sketch { padding-left: 56px; }
    .deco-orb--purple { width: 240px; height: 240px; top: -80px; right: -60px; }
    .deco-orb--amber  { width: 180px; height: 180px; bottom: -40px; left: -50px; }
}
