/* ===== Dark Theme Login Styles ===== */
/* 注意：这些样式仅作用于登录页面容器内，不影响后台管理界面 */

/* 隐藏非输入元素的光标 */
.login-container *,
.login-wrapper * { caret-color: transparent; }
.login-container input,
.login-container textarea,
.login-container select,
.login-wrapper input,
.login-wrapper textarea,
.login-wrapper select { caret-color: auto; }

/* Shared dark login background */
.login-container,
.login-wrapper {
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    width: 100%; min-height: 100vh;
    background: #0b0f19;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    cursor: default;
}

/* Particle canvas for login pages */
.login-particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; outline: none;
}

/* Glow effect behind card */
.login-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, rgba(139,92,246,0.06) 40%, transparent 70%);
    pointer-events: none; z-index: 0;
    animation: loginGlowPulse 6s ease-in-out infinite;
}
.login-glow.agent-glow {
    background: radial-gradient(ellipse, rgba(139,92,246,0.12) 0%, rgba(236,72,153,0.06) 40%, transparent 70%);
}
@keyframes loginGlowPulse {
    0%,100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%,-50%) scale(1.08); }
}

/* Back home link */
.back-home {
    position: absolute; top: 28px; left: 28px; z-index: 10;
    color: rgba(148,163,184,0.8); text-decoration: none; font-size: 13px;
    padding: 7px 16px; border-radius: 8px;
    border: 1px solid rgba(30,41,59,0.6);
    background: rgba(17,24,39,0.5); backdrop-filter: blur(8px);
    transition: all 0.3s;
}
.back-home:hover { color: #e2e8f0; border-color: #334155; background: rgba(17,24,39,0.8); }

/* Login card */
.login-box {
    position: relative; z-index: 1;
    background: rgba(17,24,39,0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(30,41,59,0.8);
    border-radius: 16px;
    padding: 40px 36px;
    width: 400px; max-width: 92vw;
    box-shadow: 0 16px 64px rgba(0,0,0,0.4);
    transition: border-color 0.3s;
}
.login-box:hover { border-color: rgba(59,130,246,0.3); }

/* Agent login card accent */
.login-box.agent-card:hover { border-color: rgba(139,92,246,0.3); }

/* Title */
.login-box h2 {
    text-align: center; margin-bottom: 6px;
    font-size: 22px; font-weight: 700; color: #fff;
}
.subtitle {
    color: #64748b; font-size: 13px; margin-bottom: 24px; text-align: center;
}

/* Form inputs - dark theme override */
.login-box .form-group { margin-bottom: 16px; }
.login-box .form-group label {
    display: block; margin-bottom: 6px;
    color: #94a3b8; font-size: 13px; font-weight: 500;
}
.login-box .form-group input {
    width: 100%; padding: 11px 14px;
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(30,41,59,0.8);
    border-radius: 10px; font-size: 14px;
    color: #e2e8f0; transition: all 0.2s;
}
.login-box .form-group input::placeholder { color: #475569; }
.login-box .form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    background: rgba(15,23,42,0.8);
}
.login-box.agent-card .form-group input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

/* Login button */
.login-box .btn-login {
    width: 100%; padding: 12px; margin-top: 4px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff; border: none; border-radius: 10px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(59,130,246,0.25);
}
.login-box .btn-login:hover {
    box-shadow: 0 8px 32px rgba(59,130,246,0.35);
    transform: translateY(-1px);
}
.login-box .btn-login:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Agent button accent */
.login-box.agent-card .btn-login {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    box-shadow: 0 4px 16px rgba(139,92,246,0.25);
}
.login-box.agent-card .btn-login:hover {
    box-shadow: 0 8px 32px rgba(139,92,246,0.35);
}
.login-box.agent-card .btn-register {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 16px rgba(16,185,129,0.25);
}
.login-box.agent-card .btn-register:hover {
    box-shadow: 0 8px 32px rgba(16,185,129,0.35);
}

/* Error message */
.login-box .error-msg {
    color: #f87171; text-align: center; margin-top: 14px; font-size: 13px; min-height: 18px;
}

/* Form footer */
.form-footer { margin-top: 16px; text-align: center; font-size: 13px; }
.form-footer span { color: #64748b; }
.form-footer a { color: #3b82f6; text-decoration: none; margin-left: 5px; transition: color 0.2s; }
.form-footer a:hover { color: #60a5fa; }
.form-footer.agent-footer a { color: #8b5cf6; }
.form-footer.agent-footer a:hover { color: #a78bfa; }

/* Required mark */
.required { color: #f87171; }

/* Logo icon above title */
.login-logo {
    width: 52px; height: 52px; margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}
.login-logo.agent-logo {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.login-logo svg { width: 28px; height: 28px; }

/* Responsive */
@media(max-width:480px) {
    .login-box { padding: 32px 24px; width: 92vw; }
    .back-home { top: 16px; left: 16px; }
}
