/* 深色主题 - 黑白灰配色方案 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #121212;
    min-height: 100vh;
}

a {
    color: #64b5f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #90caf9;
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #455a64 0%, #37474f 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #546e7a 0%, #455a64 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: #e0e0e0;
    border: 1px solid #424242;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #64b5f6;
    text-decoration: none;
}

.btn-logout {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #0d47a1 0%, #1a237e 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    opacity: 0.3;
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.login-content {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.company-logo {
    text-align: center;
    margin-bottom: 50px;
}

.logo-placeholder {
    font-size: 72px;
    margin-bottom: 20px;
    color: #64b5f6;
    filter: drop-shadow(0 4px 8px rgba(100, 181, 246, 0.3));
}

.company-logo h2 {
    font-size: 2.2rem;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
}

/* 环境检测状态 */
.environment-status {
    text-align: center;
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #64b5f6;
}

.environment-status h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 400;
}

.environment-status p {
    color: #b0bec5;
    font-size: 1.1rem;
}

/* 二维码容器 */
.qrcode-container {
    text-align: center;
    margin: 40px 0;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 2px dashed rgba(100, 181, 246, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.qrcode-container.active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease;
}

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

.qrcode-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 400;
}

.qrcode-display {
    display: inline-block;
    padding: 25px;
    background: white;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.qrcode-instruction {
    color: #b0bec5;
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

/* 加载动画 */
.loading-container {
    text-align: center;
    padding: 60px 40px;
    display: none;
}

.loading-container.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 80px;
    height: 80px;
    border: 6px solid rgba(100, 181, 246, 0.3);
    border-radius: 50%;
    border-top-color: #64b5f6;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 300;
}

.loading-subtext {
    color: #b0bec5;
    margin-top: 10px;
    font-size: 1rem;
}

/* 状态消息 */
.status-message {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.status-message.info {
    background: rgba(33, 150, 243, 0.15);
    color: #64b5f6;
    border-left: 4px solid #64b5f6;
}

.status-message.success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border-left: 4px solid #81c784;
}

.status-message.error {
    background: rgba(244, 67, 54, 0.15);
    color: #e57373;
    border-left: 4px solid #e57373;
}

.status-message.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
    border-left: 4px solid #ffd54f;
}

/* 登录页脚 */
.login-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #757575;
    font-size: 0.9rem;
}

.login-footer p {
    margin-bottom: 8px;
}

/* 仪表盘样式 */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #121212;
}

.dashboard-header {
    background: rgba(30, 30, 30, 0.95);
    padding: 20px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-left h1 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 5px;
    font-weight: 300;
}

.header-left p {
    color: #b0bec5;
    font-size: 0.95rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(100, 181, 246, 0.3);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #64b5f6;
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.user-avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    border: 2px solid #64b5f6;
}

.user-details strong {
    display: block;
    color: #ffffff;
    margin-bottom: 3px;
    font-size: 1.1rem;
}

.user-details p {
    color: #b0bec5;
    font-size: 0.85rem;
    line-height: 1.4;
}

.user-details .alias {
    color: #ff9800;
    font-size: 0.9rem;
    margin-top: 2px;
}

.dashboard-main {
    flex: 1;
    padding: 40px;
    background: #121212;
}

.welcome-section {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-card {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.welcome-card h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 300;
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card > p {
    color: #b0bec5;
    margin-bottom: 40px;
    font-size: 1.2rem;
    line-height: 1.8;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid #64b5f6;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 40px;
    color: #64b5f6;
}

.stat-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 400;
}

.stat-info p {
    color: #b0bec5;
    font-size: 1rem;
    line-height: 1.6;
}

.stat-info code {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    color: #81c784;
    border: 1px solid rgba(129, 199, 132, 0.3);
}

.next-steps {
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: 4px solid #ff9800;
}

.next-steps h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 400;
}

.next-steps p {
    color: #b0bec5;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.next-steps ul {
    margin-left: 25px;
    margin-bottom: 25px;
}

.next-steps li {
    margin-bottom: 12px;
    color: #e0e0e0;
    position: relative;
    padding-left: 10px;
}

.next-steps li:before {
    content: '•';
    color: #64b5f6;
    position: absolute;
    left: -15px;
    font-size: 1.2rem;
}

.action-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.system-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    border-left: 4px solid #81c784;
}

.system-info h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 400;
}

.system-info p {
    margin-bottom: 12px;
    color: #b0bec5;
    font-size: 1rem;
}

.system-info strong {
    color: #ffffff;
    font-weight: 500;
}

.dashboard-footer {
    text-align: center;
    padding: 25px;
    background: rgba(30, 30, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #757575;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.dashboard-footer p {
    margin-bottom: 8px;
}

/* 错误页面样式 */
.error-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #0d47a1 0%, #1a237e 100%);
}

.error-content {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 16px;
    padding: 60px 50px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.error-code {
    font-size: 8rem;
    font-weight: bold;
    color: #ff5252;
    margin-bottom: 30px;
    text-shadow: 0 5px 15px rgba(255, 82, 82, 0.3);
    line-height: 1;
}

.error-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 300;
}

.error-content p {
    color: #b0bec5;
    margin-bottom: 40px;
    font-size: 1.2rem;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.error-help {
    color: #757575;
    font-size: 0.95rem;
    line-height: 1.6;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .login-card {
        padding: 30px;
    }

    .welcome-card {
        padding: 30px;
    }

    .user-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .login-header h1 {
        font-size: 2.2rem;
    }

    .login-card {
        padding: 25px;
    }

    .company-logo h2 {
        font-size: 1.8rem;
    }

    .welcome-card h2 {
        font-size: 1.8rem;
    }

    .dashboard-main {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions .btn {
        width: 100%;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease; }
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 玻璃态效果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 企业微信主题色 */
.wx-theme {
    background: linear-gradient(135deg, #07c160 0%, #06b056 100%);
}

.wx-theme:hover {
    background: linear-gradient(135deg, #08d469 0%, #07c160 100%);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 181, 246, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 181, 246, 0.7);
}