/* ========================================
   工业级电力监控系统 v2.0 - 完整样式表
   Generator Fault Diagnosis System
   ======================================== */

/* ========== 启动加载界面 ========== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0a0e17 0%, #0d1421 50%, #0a0e17 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* 扫描线动画 */
.scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(59, 130, 246, 0.03) 50%,
        transparent 100%
    );
    background-size: 100% 4px;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

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

/* 扫描光线效果 */
.scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), rgba(6, 182, 212, 0.8), transparent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(59, 130, 246, 0.3);
    animation: scan-beam 3s ease-in-out infinite;
}

@keyframes scan-beam {
    0%, 100% { top: -2px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* 角落装饰 */
.corner-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: rgba(59, 130, 246, 0.4);
    border-style: solid;
}

.corner-decoration.top-left {
    top: 30px;
    left: 30px;
    border-width: 2px 0 0 2px;
}

.corner-decoration.top-right {
    top: 30px;
    right: 30px;
    border-width: 2px 2px 0 0;
}

.corner-decoration.bottom-left {
    bottom: 30px;
    left: 30px;
    border-width: 0 0 2px 2px;
}

.corner-decoration.bottom-right {
    bottom: 30px;
    right: 30px;
    border-width: 0 2px 2px 0;
}

/* 加载内容 */
.loading-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logo-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.loading-logo svg {
    width: 40px;
    height: 40px;
    color: var(--primary-cyan);
    animation: logo-rotate 10s linear infinite;
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(59, 130, 246, 0.1); }
    50% { box-shadow: 0 0 50px rgba(59, 130, 246, 0.4), inset 0 0 30px rgba(59, 130, 246, 0.2); }
}

@keyframes logo-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    letter-spacing: 2px;
}

.loading-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.loading-version {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-cyan);
    margin-bottom: 40px;
}

/* 进度条 */
.progress-container {
    width: 400px;
    max-width: 90vw;
    height: 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 16px;
    position: relative;
}

.progress-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 3px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-cyan), var(--success));
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
}

/* 进度信息 */
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 400px;
    max-width: 90vw;
    margin: 0 auto;
}

.progress-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-cyan);
    font-weight: 600;
}

/* 加载提示 */
.loading-tips {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.loading-tips.show {
    opacity: 1;
}

.tip-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: tip-blink 1s infinite;
}

@keyframes tip-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.tip-text {
    font-size: 0.85rem;
    color: var(--success);
}

/* ========== 原有样式继续 ========== */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0d1421;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --primary-blue: #3b82f6;
    --primary-blue-light: #60a5fa;
    --primary-blue-dark: #2563eb;
    --primary-cyan: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-default: rgba(59, 130, 246, 0.15);
    --border-active: rgba(59, 130, 246, 0.5);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(59, 130, 246, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --spacing-xs: 4px; --spacing-sm: 8px; --spacing-md: 16px;
    --spacing-lg: 24px; --spacing-xl: 32px;
    --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
    --transition-fast: 0.15s ease; --transition-normal: 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Noto Sans SC', 'JetBrains Mono', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ========================================
   登录页面
   ======================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-bg-effects { position: absolute; inset: 0; pointer-events: none; }

.effect-grid {
    position: absolute; inset: 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: 50px 50px;
}

.effect-glow {
    position: absolute; border-radius: 50%;
    filter: blur(100px); opacity: 0.3;
}

.glow-1 { width: 400px; height: 400px; background: var(--primary-blue); top: -100px; left: -100px; }
.glow-2 { width: 300px; height: 300px; background: var(--primary-cyan); bottom: -50px; right: -50px; }

.login-box {
    width: 420px;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.login-box::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), var(--primary-cyan), transparent);
}

.login-header { text-align: center; margin-bottom: var(--spacing-xl); }

.login-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--glow-blue);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(59, 130, 246, 0.1); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5), 0 0 60px rgba(59, 130, 246, 0.2); }
}

.login-logo svg { width: 40px; height: 40px; color: white; }

.login-header h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: var(--spacing-xs); }
.login-header p { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 1px; }

.login-form { display: flex; flex-direction: column; gap: var(--spacing-lg); }

.form-group { display: flex; flex-direction: column; gap: var(--spacing-sm); }

.form-group label {
    display: flex; align-items: center; gap: var(--spacing-sm);
    font-size: 0.85rem; color: var(--text-secondary);
}

.form-group label svg { width: 16px; height: 16px; }

.form-group input {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.form-group input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

.login-btn {
    display: flex; align-items: center; justify-content: center; gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none; border-radius: var(--radius-md);
    color: white; font-size: 1rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative; overflow: hidden;
}

.login-btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before { left: 100%; }
.login-btn:hover { box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5); transform: translateY(-2px); }
.login-btn svg { width: 18px; height: 18px; }

.login-footer { margin-top: var(--spacing-lg); padding-top: var(--spacing-md); border-top: 1px solid var(--border-default); text-align: center; }
.login-footer p { font-size: 0.75rem; color: var(--text-muted); }

/* ========================================
   主应用布局
   ======================================== */
.app-container { display: flex; min-height: 100vh; }

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(10, 14, 23, 0.98) 100%);
    border-right: 1px solid var(--border-default);
    display: flex; flex-direction: column;
    position: relative;
}

.sidebar::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 200px;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-header { padding: var(--spacing-lg); border-bottom: 1px solid var(--border-default); }

.logo { display: flex; align-items: center; gap: var(--spacing-md); }

.logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--glow-blue);
}

.logo-icon svg { width: 26px; height: 26px; color: white; }
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-family: 'JetBrains Mono', monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: 2px; }
.logo-subtitle { font-size: 0.75rem; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: var(--spacing-lg) 0; overflow-y: auto; }

.nav-section { margin-bottom: var(--spacing-lg); }

.nav-section-title {
    display: block; padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.65rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px;
}

.nav-item {
    display: flex; align-items: center; gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-secondary);
    text-decoration: none; position: relative;
    transition: all var(--transition-normal); cursor: pointer;
}

.nav-item::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%); width: 3px; height: 0;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 0 2px 2px 0;
    transition: height var(--transition-normal);
    box-shadow: var(--glow-blue);
}

.nav-item:hover { color: var(--text-primary); background: rgba(59, 130, 246, 0.05); }
.nav-item.active { color: var(--primary-blue-light); background: rgba(59, 130, 246, 0.1); }
.nav-item.active::before { height: 24px; }

.nav-icon { width: 20px; height: 20px; opacity: 0.7; transition: opacity var(--transition-fast); }
.nav-item:hover .nav-icon, .nav-item.active .nav-icon { opacity: 1; }

.nav-indicator {
    width: 6px; height: 6px; background: var(--primary-blue);
    border-radius: 50%; margin-left: auto;
    box-shadow: 0 0 8px var(--primary-blue);
    animation: pulse 2s infinite;
}

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

.system-info-item { display: flex; align-items: center; gap: var(--spacing-md); padding: var(--spacing-md) var(--spacing-lg); color: var(--text-muted); font-size: 0.85rem; }

/* 侧边栏底部 */
.sidebar-footer { padding: var(--spacing-lg); border-top: 1px solid var(--border-default); background: rgba(0, 0, 0, 0.2); }

.system-status-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.status-row { display: flex; align-items: center; gap: var(--spacing-sm); margin-bottom: var(--spacing-sm); }
.status-row:last-child { margin-bottom: 0; }

.status-label { font-size: 0.7rem; color: var(--text-muted); width: 60px; }

.status-indicator { display: flex; align-items: center; gap: var(--spacing-xs); font-size: 0.75rem; }
.status-indicator.online { color: var(--success); }
.status-indicator.warning { color: var(--warning); }

.pulse-dot {
    width: 6px; height: 6px; background: currentColor;
    border-radius: 50%; animation: pulse 2s infinite;
}

.mini-bar { flex: 1; height: 4px; background: var(--bg-secondary); border-radius: 2px; overflow: hidden; }
.mini-bar-fill { height: 100%; background: var(--success); border-radius: 2px; transition: width 1s ease; }
.mini-bar-fill.warning { background: var(--warning); }

.status-value { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-secondary); width: 35px; text-align: right; }

.user-info { display: flex; align-items: center; gap: var(--spacing-md); margin-bottom: var(--spacing-md); }

.user-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-cyan) 100%);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.user-avatar svg { width: 20px; height: 20px; color: white; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 0.9rem; font-weight: 500; }
.user-role { font-size: 0.7rem; color: var(--text-muted); }

.logout-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent; border: 1px solid var(--border-default);
    border-radius: var(--radius-md); color: var(--text-secondary);
    font-size: 0.8rem; cursor: pointer; transition: all var(--transition-normal);
}

.logout-btn:hover { border-color: var(--danger); color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.logout-btn svg { width: 16px; height: 16px; }

/* ========================================
   主内容区
   ======================================== */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: rgba(13, 20, 33, 0.8); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-default);
    flex-shrink: 0;
}

.page-title h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: var(--spacing-xs); }
.update-time { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.update-time span { color: var(--primary-cyan); }

.top-bar-actions { display: flex; align-items: center; gap: var(--spacing-md); }

/* ========================================
   内容区域 - PC端固定布局
   ======================================== */
.content-area { 
    flex: 1; 
    padding: var(--spacing-xl); 
    overflow-y: auto; 
}

.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ========================================
   仪表盘布局 - PC端优化
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover { 
    border-color: var(--border-active); 
    transform: scale(1.02); 
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--glow-blue);
}

.dashboard-card .card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.dashboard-card .card-header h3 {
    display: flex; align-items: center; gap: var(--spacing-sm);
    font-size: 1rem; font-weight: 600;
}

.dashboard-card .card-header h3::before {
    content: ''; width: 3px; height: 16px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.dashboard-card .card-header h3 svg { width: 18px; height: 18px; color: var(--primary-blue); }

.dashboard-card .card-body { 
    padding: var(--spacing-lg); 
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 仪表盘布局 - 3列网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover { 
    border-color: var(--border-active); 
    transform: scale(1.02); 
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--glow-blue);
}

.dashboard-card .card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.dashboard-card .card-header h3 {
    display: flex; align-items: center; gap: var(--spacing-sm);
    font-size: 1rem; font-weight: 600;
}

.dashboard-card .card-header h3::before {
    content: ''; width: 3px; height: 16px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.dashboard-card .card-header h3 svg { width: 18px; height: 18px; color: var(--primary-blue); }

.dashboard-card .card-body { 
    padding: var(--spacing-lg); 
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 仪表盘卡片列数分配 - 3列布局 */
.generator-status { grid-column: span 1; }
.key-params { grid-column: span 1; }
.system-health-card { grid-column: span 1; }
.waveform-card { grid-column: span 2; }
.alarm-card { grid-column: span 1; }

/* 系统健康度卡片 */
.system-health-card .card-body {
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.health-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.health-main {
    display: flex;
    justify-content: center;
}

.health-ring-large {
    position: relative;
    width: 120px;
    height: 120px;
}

.health-ring-large svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.health-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.health-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

.health-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.health-stats {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.health-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.health-stat-item .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.health-stat-item .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 发电机可视化 */
.generator-visual { display: flex; gap: var(--spacing-xl); align-items: center; justify-content: center; }

.generator-rotor { width: 160px; height: 160px; flex-shrink: 0; }
.generator-rotor svg { width: 100%; height: 100%; }

.rotor-core { animation: pulse 2s ease-in-out infinite; }

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

.generator-info { flex: 1; max-width: 280px; }

.info-row { display: flex; justify-content: space-between; padding: var(--spacing-sm) 0; border-bottom: 1px solid rgba(59, 130, 246, 0.1); }
.info-row:last-child { border-bottom: none; }
.info-row .label { font-size: 0.85rem; color: var(--text-muted); }
.info-row .value { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: var(--text-primary); }
.info-row.highlight .value { color: var(--primary-cyan); text-shadow: 0 0 10px rgba(6, 182, 212, 0.3); }

/* 参数环形图 - 2行3列网格 */
.params-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    overflow: hidden;
}

.param-box { 
    display: flex; flex-direction: column; align-items: center; gap: 8px; 
    padding: 8px;
    justify-content: center;
}

.param-ring { position: relative; width: 70px; height: 70px; flex-shrink: 0; }

.param-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }

.param-ring-fill { transition: stroke-dashoffset 1s ease-out; }

.param-ring-value {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 700; color: var(--primary-cyan);
    flex-direction: column;
}

.param-ring-value span { font-size: 0.5rem; color: var(--text-muted); }

.param-name { font-size: 0.75rem; color: var(--text-secondary); text-align: center; white-space: nowrap; }

/* 状态徽章 */
.status-badge {
    padding: var(--spacing-xs) var(--spacing-md); border-radius: var(--radius-sm);
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}

.status-badge.success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-badge.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* 波形 */
.waveform-container { 
    height: 200px; 
    background: rgba(0, 0, 0, 0.4); 
    border-radius: var(--radius-md); 
    overflow: hidden; 
    border: 1px solid rgba(59, 130, 246, 0.1); 
}
#dashboard-waveform, #monitor-waveform { width: 100%; height: 100%; }

.waveform-legend { display: flex; gap: var(--spacing-md); font-size: 0.75rem; color: var(--text-secondary); justify-content: center; margin-top: var(--spacing-md); }
.legend-item { display: flex; align-items: center; gap: var(--spacing-xs); }
.dot { width: 12px; height: 3px; border-radius: 2px; }
.dot.blue { background: var(--primary-blue); }
.dot.cyan { background: var(--primary-cyan); }
.dot.green { background: var(--success); }

/* 报警列表 */
.alarm-list { display: flex; flex-direction: column; gap: var(--spacing-sm); overflow-y: auto; max-height: 300px; }

.alarm-item {
    display: flex; align-items: center; gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.2); border-radius: var(--radius-sm);
    border-left: 3px solid var(--text-muted); transition: all var(--transition-fast);
}

.alarm-item:hover { background: rgba(0, 0, 0, 0.3); }
.alarm-item.critical { border-left-color: var(--danger); background: rgba(239, 68, 68, 0.05); }
.alarm-item.warning { border-left-color: var(--warning); background: rgba(245, 158, 11, 0.05); }
.alarm-item.info { border-left-color: var(--primary-blue); }

.alarm-time { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); min-width: 55px; }
.alarm-type { font-size: 0.65rem; font-weight: 600; padding: 2px 6px; border-radius: 3px; min-width: 36px; text-align: center; }
.alarm-type.critical { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.alarm-type.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.alarm-type.info { background: rgba(59, 130, 246, 0.2); color: var(--primary-blue); }
.alarm-msg { font-size: 0.8rem; color: var(--text-primary); flex: 1; }
.alarm-count { font-size: 0.75rem; color: var(--warning); }

/* ========================================
   数据上传 - PC端优化
   ======================================== */
.upload-container { 
    display: grid; 
    grid-template-columns: 1fr 1.2fr; 
    gap: 20px; 
    max-width: 1400px;
    margin: 0 auto;
}

.upload-card, .data-preview-card, .diagnosis-control-card, .result-card, .diagnosis-history {
    background: var(--bg-card); 
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.upload-card:hover, .data-preview-card:hover, .diagnosis-control-card:hover, .result-card:hover, .diagnosis-history:hover { 
    border-color: var(--border-active); 
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.upload-header, .preview-header, .control-header, .result-header, .history-header {
    padding: var(--spacing-lg); border-bottom: 1px solid var(--border-default); background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.upload-header h2, .preview-header h3, .control-header h2, .result-header h3, .history-header h3 {
    display: flex; align-items: center; gap: var(--spacing-sm); font-size: 1rem; font-weight: 600;
}

.upload-header h2::before, .preview-header h3::before, .control-header h2::before, .result-header h3::before, .history-header h3::before {
    content: ''; width: 3px; height: 16px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan)); border-radius: 2px;
}

.upload-header h2 svg, .preview-header h3 svg, .control-header h2 svg, .result-header h3 svg, .history-header h3 svg { width: 20px; height: 20px; color: var(--primary-blue); }
.upload-header p, .control-header p { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--spacing-xs); }

.upload-area {
    padding: var(--spacing-xl); 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    min-height: 350px; 
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md); 
    margin: var(--spacing-lg); 
    cursor: pointer;
    transition: all var(--transition-normal);
    flex: 1;
}

.upload-area:hover, .upload-area.dragover { border-color: var(--primary-blue); background: rgba(59, 130, 246, 0.05); }
.upload-area.success { border-color: var(--success); background: rgba(16, 185, 129, 0.05); }

.upload-icon { width: 80px; height: 80px; background: rgba(59, 130, 246, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: var(--spacing-lg); }
.upload-icon svg { width: 40px; height: 40px; color: var(--primary-blue); }
.upload-text { font-size: 1rem; color: var(--text-primary); margin-bottom: var(--spacing-xs); }
.upload-hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--spacing-lg); }

.upload-btn {
    padding: var(--spacing-sm) var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none; border-radius: var(--radius-md); color: white; font-size: 0.9rem; cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-btn:hover { box-shadow: var(--glow-blue); }

.preview-header { display: flex; justify-content: space-between; align-items: center; }
.data-count { font-size: 0.85rem; color: var(--primary-cyan); font-family: 'JetBrains Mono', monospace; }

.preview-table-container { overflow-x: auto; max-height: 500px; flex: 1; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.preview-table th, .preview-table td { padding: var(--spacing-sm) var(--spacing-md); text-align: left; border-bottom: 1px solid var(--border-default); white-space: nowrap; }
.preview-table th { background: rgba(0, 0, 0, 0.3); color: var(--primary-cyan); font-weight: 500; position: sticky; top: 0; }
.preview-table td { color: var(--text-secondary); }
.preview-table tr:hover td { background: rgba(59, 130, 246, 0.05); }
.preview-footer { padding: var(--spacing-md); border-top: 1px solid var(--border-default); text-align: center; font-size: 0.75rem; color: var(--text-muted); }

/* ========================================
   故障诊断 - PC端优化
   ======================================== */
.diagnosis-container { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: auto 1fr; 
    gap: 20px; 
    max-width: 1400px;
    margin: 0 auto;
}

.diagnosis-control-card { 
    grid-row: 1 / 3;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.result-card { 
    grid-column: 2; 
    grid-row: 1 / 3; 
    min-height: 500px;
}

.control-content { 
    padding: var(--spacing-xl); 
    display: flex; 
    flex-direction: column; 
    gap: var(--spacing-lg);
    flex: 1;
}

.control-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px;
}

.control-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-default);
}

.control-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
}

.data-status { display: flex; gap: var(--spacing-lg); flex-wrap: wrap; }
.status-item { display: flex; flex-direction: column; gap: 4px; min-width: 80px; }
.status-label { font-size: 0.75rem; color: var(--text-muted); }
.status-value { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 500; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 2s infinite; }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

.diagnose-btn {
    display: flex; align-items: center; justify-content: center; gap: var(--spacing-md);
    padding: var(--spacing-lg); font-size: 1.1rem; font-weight: 500;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none; border-radius: var(--radius-md); color: white; cursor: pointer;
    transition: all var(--transition-normal); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.diagnose-btn:hover:not(:disabled) { box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5); transform: translateY(-2px); }
.diagnose-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.diagnose-btn svg { width: 24px; height: 24px; }
.diagnose-btn.loading { pointer-events: none; }
.loading-spinner { width: 20px; height: 20px; border: 2px solid transparent; border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-card { 
    grid-column: 2; 
    grid-row: 1 / 3; 
    min-height: 400px;
}

.result-content { 
    padding: var(--spacing-xl); 
    min-height: 500px; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    flex: 1;
    overflow-y: auto;
}

.result-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); }
.result-placeholder svg { width: 60px; height: 60px; margin-bottom: var(--spacing-md); opacity: 0.5; }

/* 环形仪表盘结果 */
.result-display { text-align: center; width: 100%; }

.result-gauge { position: relative; width: 200px; height: 200px; margin: 0 auto var(--spacing-lg); }
.gauge-svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.gauge-fill { transition: stroke-dashoffset 1.5s ease-out; }

.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-value { font-family: 'JetBrains Mono', monospace; font-size: 2.5rem; font-weight: 700; color: var(--primary-cyan); text-shadow: 0 0 20px rgba(6, 182, 212, 0.4); }
.gauge-unit { font-size: 1rem; color: var(--text-muted); }

.gauge-label { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--spacing-lg); }

.result-info-panel { background: rgba(0, 0, 0, 0.3); border-radius: var(--radius-md); padding: var(--spacing-lg); }

.info-badge {
    display: inline-flex; align-items: center; gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg); border-radius: var(--radius-md);
    font-size: 1.1rem; font-weight: 600; margin-bottom: var(--spacing-md);
}

.info-badge svg { width: 20px; height: 20px; }
.info-badge.normal { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.info-badge.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.info-badge.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.info-code { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--spacing-sm); }
.info-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--spacing-md); line-height: 1.6; }

.info-time { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.info-time svg { width: 14px; height: 14px; }

.diagnosis-history { grid-column: 1; }

.history-time { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); min-width: 140px; }
.history-fault { font-size: 0.9rem; font-weight: 500; flex: 1; }
.history-code { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); }
.history-confidence { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: var(--primary-cyan); font-weight: 500; }

/* ========================================
   实时监测 - PC端优化
   ======================================== */
.monitor-container { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    max-width: 1400px;
    margin: 0 auto;
}

.monitor-status-bar {
    display: flex; align-items: center; gap: var(--spacing-xl);
    padding: var(--spacing-lg); background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.monitor-item { display: flex; align-items: center; gap: var(--spacing-md); }
.monitor-icon { width: 44px; height: 44px; background: rgba(59, 130, 246, 0.1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--primary-blue); }
.monitor-icon.online { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.monitor-icon svg { width: 22px; height: 22px; }
.monitor-info { display: flex; flex-direction: column; gap: 2px; }
.monitor-label { font-size: 0.75rem; color: var(--text-muted); }
.monitor-value { font-size: 0.95rem; font-weight: 500; }

.monitor-controls { margin-left: auto; display: flex; gap: var(--spacing-md); }
.monitor-btn { display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm) var(--spacing-lg); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition-normal); }
.monitor-btn.start { background: linear-gradient(135deg, var(--success), #059669); border: none; color: white; }
.monitor-btn.start:hover:not(:disabled) { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }
.monitor-btn.start.active { opacity: 0.6; cursor: not-allowed; }
.monitor-btn.stop { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.monitor-btn.stop:hover:not(:disabled) { background: rgba(239, 68, 68, 0.1); }
.monitor-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.monitor-btn svg { width: 16px; height: 16px; }

.monitor-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    grid-template-rows: auto auto; 
    gap: 20px; 
}

.monitor-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-default); 
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.monitor-card:hover { 
    border-color: var(--border-active); 
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.monitor-card.main-result { grid-column: 1; grid-row: 1 / 3; }
.monitor-card.health-ring { grid-column: 2; grid-row: 1; }
.monitor-card.waveform { grid-column: 3; grid-row: 1; }
.monitor-card.param-list { grid-column: 2 / 4; grid-row: 2; }

.monitor-card .card-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: var(--spacing-md) var(--spacing-lg); 
    border-bottom: 1px solid var(--border-default); 
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.monitor-card .card-header h3 { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 0.9rem; font-weight: 600; }
.monitor-card .card-header h3::before { content: ''; width: 3px; height: 14px; background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan)); border-radius: 2px; }
.monitor-card .card-body { padding: var(--spacing-lg); flex: 1; display: flex; flex-direction: column; justify-content: center; }

.update-badge { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 0.75rem; color: var(--success); }
.blink-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.current-result { min-height: 350px; display: flex; align-items: center; justify-content: center; }
.current-result .result-placeholder { flex-direction: column; text-align: center; }

.ring-chart-container { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.ring-chart { width: 100%; height: 100%; }
.ring-fill { transition: stroke-dashoffset 1s ease-out; }
.ring-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.ring-value { display: block; font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 700; color: var(--primary-cyan); }
.ring-label { display: block; font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }

.waveform-card .card-body, .waveform .card-body { padding: 0 !important; }
.waveform-container { height: 200px; background: rgba(0, 0, 0, 0.4); border-radius: var(--radius-md); overflow: hidden; }

.param-list { display: flex; flex-direction: column; }
.param-row { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-md); border-bottom: 1px solid var(--border-default); }
.param-row:last-child { border-bottom: none; }
.param-name { font-size: 0.85rem; color: var(--text-secondary); }
.param-value { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; color: var(--primary-cyan); font-weight: 500; }
.monitor-card.param-list .param-list { display: grid; grid-template-columns: 1fr 1fr; }
.monitor-card.param-list .param-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: var(--spacing-lg); }
.monitor-card.param-list .param-name { font-size: 0.8rem; }
.monitor-card.param-list .param-value { font-size: 1.1rem; }

.monitor-log { 
    background: var(--bg-card); 
    border: 1px solid var(--border-default); 
    border-radius: var(--radius-lg); 
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.log-header { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-md) var(--spacing-lg); border-bottom: 1px solid var(--border-default); background: rgba(0, 0, 0, 0.2); }
.log-header h3 { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 0.9rem; font-weight: 600; }
.log-header h3::before { content: ''; width: 3px; height: 14px; background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan)); border-radius: 2px; }
.clear-log-btn { padding: var(--spacing-xs) var(--spacing-md); background: transparent; border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.75rem; cursor: pointer; transition: all var(--transition-fast); }
.clear-log-btn:hover { border-color: var(--danger); color: var(--danger); }
.log-content { max-height: 200px; overflow-y: auto; padding: var(--spacing-md); }
.log-empty { text-align: center; color: var(--text-muted); padding: var(--spacing-lg); }
.log-entry { display: flex; align-items: center; gap: var(--spacing-md); padding: var(--spacing-sm) var(--spacing-md); font-size: 0.8rem; border-radius: var(--radius-sm); margin-bottom: var(--spacing-xs); background: rgba(0, 0, 0, 0.2); }
.log-time { font-family: 'JetBrains Mono', monospace; color: var(--text-muted); }
.log-level { padding: 2px 6px; border-radius: 3px; font-size: 0.7rem; font-weight: 600; }
.log-level.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.log-level.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.log-level.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.log-message { color: var(--text-secondary); flex: 1; }

/* ========================================
   其他页面 - PC端居中
   ======================================== */
.history-page, .reports-container, .export-container, .settings-container, .about-container { 
    max-width: 1200px;
    margin: 0 auto;
}

.history-filter { 
    display: flex; align-items: center; gap: var(--spacing-lg); 
    padding: var(--spacing-lg); 
    background: var(--bg-card); 
    border: 1px solid var(--border-default); 
    border-radius: var(--radius-lg); 
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.filter-group { display: flex; align-items: center; gap: var(--spacing-sm); }
.filter-group label { font-size: 0.85rem; color: var(--text-secondary); }
.filter-group select, .filter-group input { padding: var(--spacing-sm) var(--spacing-md); background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.85rem; }
.filter-btn { padding: var(--spacing-sm) var(--spacing-lg); background: var(--primary-blue); border: none; border-radius: var(--radius-sm); color: white; font-size: 0.85rem; cursor: pointer; margin-left: auto; }
.filter-btn:hover { background: var(--primary-blue-dark); }

.history-table-container { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td { padding: var(--spacing-md); text-align: left; border-bottom: 1px solid var(--border-default); }
.history-table th { background: rgba(0, 0, 0, 0.2); color: var(--primary-cyan); font-weight: 500; font-size: 0.85rem; }
.history-table td { font-size: 0.85rem; color: var(--text-secondary); }
.history-table tr:hover td { background: rgba(59, 130, 246, 0.05); }
.empty-row { text-align: center; color: var(--text-muted); padding: var(--spacing-xl) !important; }

.fault-tag { padding: 2px 8px; border-radius: 3px; font-size: 0.75rem; }
.fault-tag.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.fault-tag.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.fault-tag.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.confidence-bar-small { display: inline-flex; align-items: center; gap: var(--spacing-sm); }
.confidence-bar-small .fill { height: 4px; background: var(--primary-blue); border-radius: 2px; }
.table-btn { padding: var(--spacing-xs) var(--spacing-md); background: transparent; border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.75rem; cursor: pointer; transition: all var(--transition-fast); }
.table-btn:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

/* 报告页面 - PC端优化 */
.reports-container { 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; 
    gap: 20px; 
    max-width: 1400px;
    margin: 0 auto;
}

.report-config, .report-preview, .export-card, .settings-group, .about-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-default); 
    border-radius: var(--radius-lg); 
    padding: var(--spacing-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}

.report-config:hover, .export-card:hover, .settings-group:hover, .about-card:hover {
    border-color: var(--border-active);
    transform: scale(1.01);
}

.report-config h3, .export-card h3, .settings-group h3 { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 1rem; margin-bottom: var(--spacing-lg); }
.report-config h3::before, .export-card h3::before, .settings-group h3::before { content: ''; width: 3px; height: 14px; background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan)); border-radius: 2px; }
.report-config h3 svg, .export-card h3 svg, .settings-group h3 svg { width: 18px; height: 18px; color: var(--primary-blue); }
.export-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--spacing-lg); }
.export-options { display: flex; gap: var(--spacing-lg); }
.export-option { display: flex; flex-direction: column; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-lg); background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border-default); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-normal); flex: 1; min-width: 120px; }
.export-option:hover { border-color: var(--primary-blue); background: rgba(59, 130, 246, 0.05); transform: scale(1.02); }
.export-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.export-icon svg { width: 24px; height: 24px; }
.export-icon.excel { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.export-icon.pdf { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.export-icon.csv { background: rgba(59, 130, 246, 0.2); color: var(--primary-blue); }
.export-option span { font-size: 0.85rem; color: var(--text-secondary); }

.preview-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; color: var(--text-muted); }
.preview-placeholder svg { width: 60px; height: 60px; opacity: 0.5; margin-bottom: var(--spacing-md); }

.config-form { display: flex; flex-direction: column; gap: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.form-row { display: flex; align-items: center; gap: var(--spacing-md); }
.form-row label { font-size: 0.85rem; color: var(--text-secondary); min-width: 80px; }
.form-row input[type="text"], .form-row select { flex: 1; padding: var(--spacing-sm) var(--spacing-md); background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.85rem; }
.form-row input[type="range"] { flex: 1; }
.range-value { font-family: 'JetBrains Mono', monospace; color: var(--primary-cyan); min-width: 40px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: var(--spacing-lg); }
.checkbox-label { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--primary-blue); }

/* 报告格式选择 */
.format-group { display: flex; gap: var(--spacing-md); }
.format-label { display: flex; align-items: center; gap: var(--spacing-sm); padding: 8px 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-default); border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.format-label input { display: none; }
.format-label:hover { border-color: var(--primary-blue); }
.format-label.checked { background: rgba(59, 130, 246, 0.15); border-color: var(--primary-blue); color: var(--primary-blue); }

/* 报告提示信息 */
.report-tips { display: flex; flex-direction: column; gap: var(--spacing-md); padding-top: var(--spacing-lg); border-top: 1px solid var(--border-default); }
.tip-item { display: flex; align-items: center; gap: var(--spacing-sm); font-size: 0.8rem; color: var(--text-muted); }
.tip-item svg { width: 14px; height: 14px; color: var(--primary-blue); flex-shrink: 0; }

.toggle-switch { position: relative; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg-secondary); border-radius: 24px; transition: var(--transition-normal); }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: var(--transition-normal); }
.toggle-switch input:checked + .toggle-slider { background: var(--primary-blue); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.generate-btn { 
    width: 100%; display: flex; align-items: center; justify-content: center; gap: var(--spacing-sm); 
    padding: var(--spacing-md); background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark)); 
    border: none; border-radius: var(--radius-md); color: white; font-size: 0.95rem; cursor: pointer; 
    transition: all var(--transition-normal); 
}

.generate-btn:hover { box-shadow: var(--glow-blue); transform: translateY(-2px); }
.generate-btn svg { width: 18px; height: 18px; }

/* 关于页面 */
.about-container { display: flex; justify-content: center; }
.about-card { max-width: 700px; }
.about-header { display: flex; align-items: center; gap: var(--spacing-xl); padding-bottom: var(--spacing-xl); border-bottom: 1px solid var(--border-default); margin-bottom: var(--spacing-xl); }
.about-logo { width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan)); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; box-shadow: var(--glow-blue); }
.about-logo svg { width: 48px; height: 48px; color: white; }
.about-title h2 { font-size: 1.3rem; margin-bottom: var(--spacing-xs); }
.about-title p { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-bottom: var(--spacing-sm); }
.version-badge { display: inline-block; padding: var(--spacing-xs) var(--spacing-md); background: rgba(59, 130, 246, 0.2); color: var(--primary-blue); border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; }
.about-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--spacing-xl); }
.tech-stack h4, .system-features h4 { font-size: 0.9rem; margin-bottom: var(--spacing-md); color: var(--text-primary); }
.tech-tags { display: flex; flex-wrap: wrap; gap: var(--spacing-sm); margin-bottom: var(--spacing-xl); }
.tech-tag { padding: var(--spacing-xs) var(--spacing-md); background: rgba(59, 130, 246, 0.1); border: 1px solid var(--border-default); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--primary-cyan); }
.system-features ul { list-style: none; }
.system-features li { padding: var(--spacing-sm) 0; color: var(--text-secondary); display: flex; align-items: center; gap: var(--spacing-sm); }
.system-features li::before { content: '✓'; color: var(--success); }
.about-footer { margin-top: var(--spacing-xl); padding-top: var(--spacing-lg); border-top: 1px solid var(--border-default); text-align: center; }
.about-footer p { font-size: 0.75rem; color: var(--text-muted); }

/* ========================================
   滚动条
   ======================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-blue); }

/* ========================================
   模态框
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-default);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: right;
}

.detail-value.highlight {
    color: var(--primary-cyan);
    font-weight: 600;
}

/* 历史表格按钮 */
.detail-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.detail-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
}

/* ========================================
   快速搜索样式
   ======================================== */
.quick-search {
    position: relative;
    display: flex;
    align-items: center;
}

.quick-search > svg {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.quick-search input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 20px;
    padding: 6px 12px 6px 32px;
    font-size: 13px;
    color: var(--text-primary);
    width: 180px;
    transition: all 0.3s ease;
}

.quick-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    width: 220px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.quick-search input::placeholder {
    color: var(--text-muted);
}

.quick-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-top: 8px;
    display: none;
    z-index: 100;
    overflow: hidden;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--bg-card-hover);
}

.search-fault {
    flex: 1;
    font-size: 13px;
}

.search-fault.success { color: var(--success); }
.search-fault.danger { color: var(--danger); }
.search-fault.warning { color: var(--warning); }

.search-time {
    font-size: 11px;
    color: var(--text-muted);
}

.search-confidence {
    font-size: 12px;
    color: var(--primary-blue);
    font-weight: 500;
}

.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   刷新按钮动画
   ======================================== */
.action-icon-btn.refreshing svg {
    animation: spin 0.5s linear;
}

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

/* ========================================
   浅色主题样式
   ======================================== */
body.light-theme {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #eef2f7;
    --border-default: rgba(0, 0, 0, 0.1);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

body.light-theme {
    background: var(--bg-primary);
    color: var(--text-primary);
}

body.light-theme .sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
}

body.light-theme .top-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
}

body.light-theme .dashboard-card,
body.light-theme .monitor-card,
body.light-theme .diagnosis-card,
body.light-theme .history-card,
body.light-theme .report-card,
body.light-theme .export-card,
body.light-theme .settings-group,
body.light-theme .about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
}

body.light-theme .nav-item {
    color: var(--text-secondary);
}

body.light-theme .nav-item:hover,
body.light-theme .nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
}

body.light-theme .card-header {
    border-bottom: 1px solid var(--border-default);
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

body.light-theme .login-box {
    background: var(--bg-card);
}

body.light-theme .modal-content {
    background: var(--bg-card);
}

/* ========================================
   登录表单增强样式
   ======================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.remember-me input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-default);
    border-radius: 3px;
    position: relative;
    transition: all 0.2s;
}

.remember-me input:checked + .checkbox-custom {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.remember-me input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    font-size: 13px;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
}

/* 登录框抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.login-box.shake {
    animation: shake 0.5s ease-in-out;
}

/* 登录功能特性 */
.login-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-default);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.feature-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-blue);
}

/* ========================================
   专家分析模块
   ======================================== */
.expert-analysis {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-top: 16px;
    overflow: hidden;
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid var(--border-default);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-cyan);
}

.analysis-header svg {
    width: 18px;
    height: 18px;
}

.analysis-section {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-default);
}

.analysis-section:last-child {
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.section-title svg {
    width: 14px;
    height: 14px;
    color: var(--primary-blue);
}

.analysis-content {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--text-muted);
}

.indicator-item.danger {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.indicator-item.warning {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.indicator-item.normal {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.indicator-name {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.indicator-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.indicator-status {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.risk-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.risk-level {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 60px;
}

.risk-badge.high .risk-level { color: var(--danger); }
.risk-badge.medium .risk-level { color: var(--warning); }
.risk-badge.low .risk-level { color: var(--success); }

.risk-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.risk-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.risk-fill.high { width: 90%; background: linear-gradient(90deg, var(--warning), var(--danger)); }
.risk-fill.medium { width: 60%; background: linear-gradient(90deg, var(--primary-blue), var(--warning)); }
.risk-fill.low { width: 30%; background: linear-gradient(90deg, var(--success), var(--primary-cyan)); }

.recommendations {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recommendations li {
    position: relative;
    padding: 8px 0 8px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.recommendations li:last-child {
    border-bottom: none;
}

.recommendations li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* ========================================
   系统总览页面
   ======================================== */
.overview-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.system-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.status-indicator-large {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.status-indicator-large svg {
    width: 28px;
    height: 28px;
}

.status-indicator-large.online {
    color: var(--success);
}

.status-indicator-large.warning {
    color: var(--warning);
}

.status-indicator-large.danger {
    color: var(--danger);
}

.status-indicator-large .status-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.pulse-ring {
    position: absolute;
    left: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.status-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.core-metrics-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
}

.core-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}

.core-metric-card:hover {
    border-color: var(--border-active);
    transform: scale(1.02);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.metric-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.main-health {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.health-ring-container {
    position: relative;
    width: 180px;
    height: 180px;
}

.health-ring {
    width: 100%;
    height: 100%;
}

.health-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.health-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

.health-unit {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.fault-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fault-badge {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
}

.fault-badge.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.fault-badge.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.fault-badge.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.fault-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.diagnosis-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.time-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-cyan);
}

.time-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.params-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.param-overview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}

.param-overview-card:hover {
    border-color: var(--border-active);
    transform: scale(1.02);
}

.param-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.param-icon svg {
    width: 24px;
    height: 24px;
}

.param-icon.voltage { background: rgba(59, 130, 246, 0.2); color: var(--primary-blue); }
.param-icon.current { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.param-icon.temperature { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.param-icon.power { background: rgba(245, 158, 11, 0.2); color: var(--warning); }

.param-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.param-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.param-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.param-trend {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.param-trend svg {
    width: 16px;
    height: 16px;
}

.param-trend.up { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.param-trend.down { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.param-trend.stable { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); }
.param-trend.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }

.trend-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.trend-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.trend-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.trend-header h3::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.trend-time-selector {
    display: flex;
    gap: 8px;
}

.time-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.time-btn:hover, .time-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.trend-chart {
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
}

.trend-chart canvas {
    width: 100%;
    height: 100%;
}

.alarm-summary-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.alarm-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
}

.summary-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.summary-header h3 svg {
    width: 18px;
    height: 18px;
    color: var(--warning);
}

.view-more {
    font-size: 0.8rem;
    color: var(--primary-blue);
    text-decoration: none;
}

.view-more:hover {
    text-decoration: underline;
}

.alarm-summary-list {
    padding: 12px;
}

.alarm-summary-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.alarm-summary-item:last-child {
    margin-bottom: 0;
}

.alarm-summary-item .alarm-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 70px;
}

.alarm-summary-item .alarm-level {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.alarm-summary-item .alarm-level.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.alarm-summary-item .alarm-level.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.alarm-summary-item .alarm-level.info { background: rgba(59, 130, 246, 0.2); color: var(--primary-blue); }

.alarm-summary-item .alarm-message {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   发电机结构示意图页面
   ======================================== */
.structure-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.generator-structure-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.generator-structure-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
}

.generator-structure-card .card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.generator-structure-card .card-header h3::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.structure-legend {
    display: flex;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-item .dot.stator { background: #475569; }
.legend-item .dot.rotor { background: #06b6d4; }
.legend-item .dot.air-gap { background: #1e40af; }

.structure-visual {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

#generator-svg {
    width: 400px;
    height: 400px;
}

.stator-highlight {
    opacity: 0;
    transition: opacity 0.3s;
}

.air-gap-ring {
    transition: all 0.3s;
}

.rotor-group {
    transform-origin: 200px 200px;
    animation: rotorRotate 3s linear infinite;
}

@keyframes rotorRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fault-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.indicator-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.indicator-part {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
}

.structure-description {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border-default);
}

.desc-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--text-muted);
}

.desc-item.stator-desc { border-left-color: #475569; }
.desc-item.rotor-desc { border-left-color: #06b6d4; }
.desc-item.airgap-desc { border-left-color: #1e40af; }

.desc-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
}

.desc-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.desc-text h4 {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.desc-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.fault-location-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fault-location-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
}

.fault-location-card .card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.fault-location-card .card-header h3::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.fault-mapping-list {
    padding: 16px;
}

.mapping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border-left: 3px solid var(--text-muted);
}

.mapping-item:last-child {
    margin-bottom: 0;
}

.mapping-item.highlight-risc { border-left-color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.mapping-item.highlight-sisc { border-left-color: var(--warning); background: rgba(245, 158, 11, 0.1); }
.mapping-item.highlight-rsage { border-left-color: var(--primary-blue); background: rgba(59, 130, 246, 0.1); }
.mapping-item.highlight-normal { border-left-color: var(--success); background: rgba(16, 185, 129, 0.1); }

.mapping-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary-cyan);
    min-width: 60px;
}

.mapping-arrow {
    color: var(--text-muted);
}

.mapping-part {
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mapping-part.rotor { background: rgba(6, 182, 212, 0.2); color: #06b6d4; }
.mapping-part.stator { background: rgba(71, 85, 105, 0.3); color: #94a3b8; }
.mapping-part.airgap { background: rgba(30, 64, 175, 0.3); color: #60a5fa; }
.mapping-part.none { background: rgba(16, 185, 129, 0.2); color: var(--success); }

.mapping-desc {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========================================
   对比分析页面
   ======================================== */
.analysis-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.analysis-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.time-range-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selector-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.time-range-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.time-range-btn:hover, .time-range-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.analysis-summary {
    display: flex;
    gap: 32px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.chart-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
}

.chart-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.chart-header h3::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.chart-header h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.chart-body {
    padding: 16px;
    height: 280px;
}

.chart-body canvas {
    width: 100%;
    height: 100%;
}

.distribution-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 100%;
    padding-top: 20px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bar-fill {
    width: 60px;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
    min-height: 4px;
}

.bar-fill.normal { background: linear-gradient(180deg, var(--success), #059669); }
.bar-fill.danger { background: linear-gradient(180deg, var(--danger), #dc2626); }
.bar-fill.warning { background: linear-gradient(180deg, var(--warning), #d97706); }

.bar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.bar-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, 0.2);
}

.table-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.table-header h3::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 2px;
}

.table-header h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.comparison-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
}

.comparison-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--primary-cyan);
    font-weight: 500;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
}

.comparison-table td {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comparison-table .empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.confidence-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.confidence-change.up { color: var(--success); }
.confidence-change.down { color: var(--danger); }
.confidence-change.stable { color: var(--text-muted); }

.confidence-change svg {
    width: 14px;
    height: 14px;
}

/* 操作提示样式 */
.operation-tips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.operation-tips p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.operation-tips strong {
    color: var(--primary-cyan);
    margin-right: 4px;
}

/* 历史诊断记录 */
.history-section {
    max-height: 320px;
    display: flex;
    flex-direction: column;
}

.history-section .control-section-title {
    flex-shrink: 0;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.history-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
.history-list::-webkit-scrollbar-thumb:hover { background: var(--border-default); }

.history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: rgba(0,0,0,0.35);
    border-color: var(--primary-blue);
}

.history-item .history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.history-item .history-fault {
    font-size: 0.85rem;
    color: var(--text-primary);
    flex: 1;
}

.history-item .history-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.history-badge.normal { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.history-badge.warning { background: rgba(234, 179, 8, 0.15); color: var(--warning); }
.history-badge.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
