/* 热成像销售管理系统 - 统一样式文件 */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根元素 */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f9fafb;
    --bg-active: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-primary: #e2e8f0;
    --border-color: #e5e7eb;
    --color-primary: #3b82f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --surface-color: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --transition: all 0.3s ease;
}

html.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --bg-active: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-primary: #334155;
    --border-color: #475569;
    --color-primary: #60a5fa;
    --color-success: #34d399;
    --color-warning: #fbbf24;
    --color-danger: #f87171;
    --surface-color: #1e293b;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe, #43e97b, #667eea);
    background-size: 400% 400%;
    animation: waveGradient 8s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

@keyframes waveGradient {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 登录容器 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    margin: 0 auto 20px;
    width: 48px;
    height: 48px;
}

.logo-icon svg {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 表单样式 */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 登录按钮 */
.login-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-secondary);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.button-loader svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 登录页脚 */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.1);
    padding: 8px 16px;
    border-radius: var(--radius);
    display: inline-block;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-header p {
        font-size: 12px;
    }
}
