/* ========================================
   专业ERP登录页面 - 深色科技风格
   参考：SAP / Oracle / Microsoft Dynamics
   ======================================== */

body.erp-login-page {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', Tahoma, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    color: #e2e8f0;
    background: #0a1628;
}

.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(30, 64, 175, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(37, 99, 235, 0.2) 0%, transparent 45%),
        linear-gradient(135deg, #0a1628 0%, #0f2044 30%, #0a1628 60%, #0d1b3e 100%);
}

.bg-canvas {
    display: none;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 网格背景层 */
.bg-grid-layer {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* 渐变遮罩 */
.bg-gradient-layer {
    background: 
        radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
    z-index: 1;
}

/* 装饰性光晕 */
.bg-shape-1 {
    position: absolute;
    top: -300px;
    left: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 2;
    animation: pulse 6s ease-in-out infinite;
}

.bg-shape-2 {
    position: absolute;
    bottom: -200px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 2;
    animation: pulse 8s ease-in-out infinite 2s;
}

.bg-shape-3 {
    position: absolute;
    top: 40%;
    right: 15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 2;
    animation: pulse 7s ease-in-out infinite 4s;
}

.bg-shape-4 {
    position: absolute;
    bottom: 30%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 2;
    animation: pulse 9s ease-in-out infinite 1s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* 连接线 */
.bg-connector-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.bg-connector-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 120px 120px;
}

.bg-connector-lines::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.2) 20%, 
        rgba(99, 102, 241, 0.3) 50%, 
        rgba(59, 130, 246, 0.2) 80%, 
        transparent 100%);
    animation: lineFlow 8s linear infinite;
}

@keyframes lineFlow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 浮动图标 */
.bg-floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 4;
}

.floating-icon {
    position: absolute;
    opacity: 0.25;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.floating-icon svg {
    display: block;
}

.icon-server { top: 15%; right: 28%; animation: iconDrift 25s ease-in-out infinite; }
.icon-database { top: 42%; right: 35%; animation: iconDrift 30s ease-in-out infinite 3s; }
.icon-cloud { top: 10%; right: 18%; animation: iconDrift 22s ease-in-out infinite 5s; }
.icon-warehouse { bottom: 28%; left: 20%; animation: iconDrift 28s ease-in-out infinite 2s; }
.icon-chart { bottom: 35%; left: 30%; animation: iconDrift 26s ease-in-out infinite 4s; }
.icon-gear { bottom: 15%; right: 25%; animation: iconDrift 32s ease-in-out infinite 6s; }
.icon-box { top: 52%; left: 45%; animation: iconDrift 24s ease-in-out infinite 1s; }
.icon-truck { bottom: 8%; right: 35%; animation: iconDrift 29s ease-in-out infinite 5.5s; }
.icon-code { top: 30%; right: 22%; animation: iconDrift 23s ease-in-out infinite 2.5s; }
.icon-globe { top: 45%; right: 14%; animation: iconDrift 31s ease-in-out infinite 3.5s; }

@keyframes iconDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -25px) rotate(5deg); }
    50% { transform: translate(-15px, -35px) rotate(-3deg); }
    75% { transform: translate(-25px, -20px) rotate(3deg); }
}

/* 容器布局 */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 100vh;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 60px;
    gap: 60px;
}

/* 品牌介绍区 */
.login-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
}

.brand-content {
    max-width: 480px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.brand-title-wrap {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 2px;
    line-height: 1.1;
}

.brand-sub {
    font-size: 11px;
    font-weight: 600;
    color: #60a5fa;
    letter-spacing: 4px;
    margin-top: 4px;
    text-transform: uppercase;
}

.brand-slogan {
    font-size: 22px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 14px 0;
}

.brand-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.8;
    margin: 0 0 44px 0;
}

/* 功能特色卡片 */
.brand-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.feature-icon-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.feature-icon-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.feature-icon-emerald {
    background: linear-gradient(135deg, #10b981, #059669);
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.feature-text span {
    font-size: 12px;
    color: #94a3b8;
}

/* 登录表单区 */
.login-form-container {
    flex: 0 0 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: 44px 36px;
    animation: cardFadeIn 0.6s ease;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-card-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.login-card-header p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.3s ease;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 46px;
    font-size: 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-wrapper input::placeholder {
    color: #64748b;
}

.input-wrapper input:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.8);
}

.input-wrapper input:focus {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-wrapper input:focus ~ .input-icon {
    color: #3b82f6;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    font-size: 13px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    color: #94a3b8;
}

.forgot-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.form-actions {
    margin-bottom: 20px;
}

.btn-login {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

.form-footer-links {
    text-align: center;
}

.create-company-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.create-company-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* 页脚 */
.login-footer {
    position: fixed;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 20;
}

.login-footer p {
    color: #64748b;
    font-size: 12px;
    margin: 0;
}

/* 响应式 */
@media (max-width: 1100px) {
    .login-container {
        padding: 0 40px;
        gap: 40px;
    }
}

@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
    }

    .login-brand {
        padding: 40px 20px 0;
    }

    .brand-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-form-container {
        flex: none;
        width: 100%;
        padding: 20px;
    }

    .login-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .login-container {
        padding: 20px 16px;
    }

    .brand-features {
        grid-template-columns: 1fr;
    }

    .login-card {
        border-radius: 16px;
        padding: 32px 24px;
    }
}

#loginform, #forgotform {
    margin: 0;
    padding: 0;
}

.hide {
    display: none;
}

.login-form.hide {
    display: none;
}

.center {
    text-align: center;
}

.form-vertical {
    display: block;
}

.no-padding {
    padding: 0;
}

.no-margin {
    margin: 0;
}