/* 员工登录页面 - 学而归图红色主题 */

/* ========== 页面背景 ========== */
body.page-login {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ========== 背景动画容器 ========== */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 流动渐变背景 - 红色主题 */
.bg-gradient-animate {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 100% 80% at 20% 20%, rgba(251, 191, 36, 0.15), transparent 50%),
        radial-gradient(ellipse 80% 100% at 80% 80%, rgba(245, 158, 11, 0.1), transparent 50%),
        radial-gradient(ellipse 60% 60% at 50% 50%, rgba(220, 38, 38, 0.2), transparent 70%);
    animation: gradientShift 8s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { opacity: 0.8; transform: scale(1) translate(0, 0); }
    100% { opacity: 1; transform: scale(1.1) translate(2%, 2%); }
}

/* 动态网格 - 红色主题 */
.bg-grid-animate {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    transform: perspective(500px) rotateX(60deg);
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

/* 浮动光球 */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
}

.bg-orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(251, 191, 36, 0.25);
    top: 10%;
    left: 10%;
    animation: orbFloat1 12s ease-in-out infinite;
}

.bg-orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(245, 158, 11, 0.2);
    top: 60%;
    right: 15%;
    animation: orbFloat2 15s ease-in-out infinite;
}

.bg-orb-3 {
    width: 180px;
    height: 180px;
    background: rgba(220, 38, 38, 0.3);
    bottom: 20%;
    left: 30%;
    animation: orbFloat3 10s ease-in-out infinite;
}

.bg-orb-4 {
    width: 200px;
    height: 200px;
    background: rgba(251, 191, 36, 0.2);
    top: 40%;
    left: 60%;
    animation: orbFloat4 14s ease-in-out infinite;
}

.bg-orb-5 {
    width: 150px;
    height: 150px;
    background: rgba(245, 158, 11, 0.25);
    top: 80%;
    right: 40%;
    animation: orbFloat5 11s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -30px) scale(1.15); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(25px, 25px); }
    75% { transform: translate(-15px, -20px); }
}

@keyframes orbFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-35px, 15px) scale(1.05); }
    66% { transform: translate(20px, -25px) scale(0.98); }
}

@keyframes orbFloat5 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -35px); }
}

/* 漂浮粒子 */
.bg-particles {
    position: absolute;
    inset: 0;
}

.bg-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.bg-particles .particle:nth-child(1) { left: 10%; top: 20%; animation: particleRise 8s 0s infinite; }
.bg-particles .particle:nth-child(2) { left: 25%; top: 60%; animation: particleRise 10s 1s infinite; }
.bg-particles .particle:nth-child(3) { left: 45%; top: 10%; animation: particleRise 9s 2s infinite; }
.bg-particles .particle:nth-child(4) { left: 65%; top: 75%; animation: particleRise 11s 0.5s infinite; }
.bg-particles .particle:nth-child(5) { left: 80%; top: 30%; animation: particleRise 7s 1.5s infinite; }
.bg-particles .particle:nth-child(6) { left: 15%; top: 85%; animation: particleRise 12s 2.5s infinite; }
.bg-particles .particle:nth-child(7) { left: 55%; top: 45%; animation: particleRise 8s 0.8s infinite; }
.bg-particles .particle:nth-child(8) { left: 90%; top: 60%; animation: particleRise 9s 1.2s infinite; }
.bg-particles .particle:nth-child(9) { left: 35%; top: 90%; animation: particleRise 10s 2s infinite; }
.bg-particles .particle:nth-child(10) { left: 70%; top: 15%; animation: particleRise 7s 0.3s infinite; }

@keyframes particleRise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* 数据流线条 */
.bg-lines .line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent);
    animation: lineFlow 4s linear infinite;
}

.bg-lines .line-1 { width: 40%; left: -40%; top: 25%; animation-delay: 0s; }
.bg-lines .line-2 { width: 50%; left: -50%; top: 55%; animation-delay: 1.3s; }
.bg-lines .line-3 { width: 35%; left: -35%; top: 80%; animation-delay: 2.6s; }

@keyframes lineFlow {
    0% { transform: translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(150vw); opacity: 0; }
}

/* 扫描线效果 */
.bg-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 0%,
        rgba(251, 191, 36, 0.02) 49%,
        rgba(251, 191, 36, 0.05) 50%,
        transparent 51%
    );
    background-size: 100% 8px;
    animation: scanMove 3s linear infinite;
    pointer-events: none;
}

@keyframes scanMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 8px; }
}

/* ========== 登录容器 ========== */
.page-login .login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* ========== 登录卡片 ========== */
.page-login .login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.3) inset,
        0 24px 80px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(220, 38, 38, 0.15);
    animation: loginFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 公司头部 ========== */
.page-login .company-header {
    text-align: center;
    margin-bottom: 36px;
}

/* 品牌Logo - 学而归图 + Xue Er Gui Tu */
.page-login .brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.page-login .logo-cn {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #dc2626;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-login .logo-cn::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.page-login .logo-cn::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 18px;
    background: linear-gradient(to bottom, #ffffff 0%, #ffffff 30%, transparent 30%, transparent 35%, #ffffff 35%, #ffffff 65%, transparent 65%, transparent 70%, #ffffff 70%, #ffffff 100%);
    border-radius: 2px;
}

.page-login .logo-en {
    font-family: "Segoe UI", "Helvetica Neue", "SF Pro Display", sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.35em;
    color: rgba(100, 100, 100, 0.85);
    text-transform: uppercase;
    position: relative;
}

.page-login .logo-en::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.8), transparent);
    border-radius: 1px;
    animation: linePulse 2.5s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Logo 入场动画 */
.page-login .brand-logo {
    animation: logoFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-login .logo-cn {
    animation: logoFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.page-login .logo-en {
    animation: logoFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 公司全称 - 底部页脚，低调不抢眼 */
.page-login .company-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: rgba(100, 100, 100, 0.6);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-align: center;
}

/* ========== 表单 ========== */
.page-login .login-form {
    margin-bottom: 24px;
}

.page-login .login-form .form-group {
    margin-bottom: 20px;
}

.page-login .login-form .form-group:last-of-type {
    margin-bottom: 28px;
}

.page-login .login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(80, 80, 80, 0.9);
}

.page-login .login-form input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: #333;
    background: rgba(245, 245, 245, 0.8);
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.page-login .login-form input::placeholder {
    color: rgba(150, 150, 150, 0.7);
}

.page-login .login-form input:hover {
    background: rgba(240, 240, 240, 0.9);
    border-color: rgba(180, 180, 180, 0.6);
}

.page-login .login-form input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

/* ========== 登录按钮 ========== */
.page-login .btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.page-login .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.4);
}

.page-login .btn-login:active {
    transform: translateY(0);
}

/* ========== 员工管理入口 ========== */
.page-login .btn-employee-manage {
    width: 100%;
    padding: 12px;
    text-align: center;
    margin-top: 8px;
    background: transparent;
    color: rgba(100, 100, 100, 0.6);
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.page-login .btn-employee-manage:hover {
    color: rgba(220, 38, 38, 0.9);
}

/* ========== 错误提示 ========== */
.page-login .login-box .error-message {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 14px;
}

/* ========== 密码弹窗（员工管理） ========== */
.page-login .modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.page-login .modal-content {
    background: linear-gradient(160deg, #ffffff 0%, #f5f5f5 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.page-login .modal-content h2 {
    color: #dc2626;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.page-login .modal-tip {
    color: rgba(100, 100, 100, 0.7);
    font-size: 14px;
    margin-bottom: 20px;
}

.page-login .modal-input {
    background: rgba(245, 245, 245, 0.8);
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-radius: 12px;
    color: #333;
    padding: 14px 18px;
}

.page-login .modal-input::placeholder {
    color: rgba(150, 150, 150, 0.7);
}

.page-login .modal-input:focus {
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.page-login .modal-buttons .btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.page-login .modal-buttons .btn-secondary {
    background: rgba(245, 245, 245, 0.8);
    color: rgba(80, 80, 80, 0.9);
    border: 1px solid rgba(200, 200, 200, 0.5);
}

.page-login .modal-buttons .btn-secondary:hover {
    background: rgba(235, 235, 235, 0.9);
}

.page-login #passwordError {
    margin-top: 16px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #dc2626;
}
