/* ==================== 全局与重置 ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --bg-surface: #0f172a;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #4fc3f7;
  --accent-green: #66bb6a;
  --accent-orange: #ffa726;
  --accent-red: #ef5350;
  --accent-purple: #ab47bc;
  --accent-teal: #26c6da;
  --border-color: rgba(255,255,255,0.06);
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==================== 顶部导航 ==================== */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
  background: rgba(17,24,39,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; color: var(--accent-blue);
}
.nav-brand i { font-size: 1.3rem; }
.brand-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  padding: 8px 16px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: 0.9rem; cursor: pointer;
  transition: var(--transition); display: flex; align-items: center; gap: 6px;
}
.nav-tab:hover { background: rgba(79,195,247,0.08); color: var(--text-primary); }
.nav-tab.active { background: rgba(79,195,247,0.15); color: var(--accent-blue); font-weight: 500; }

.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-muted);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.online { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }

/* ==================== 主内容 ==================== */
.main-content { padding: 24px; max-width: 1600px; margin: 0 auto; }

.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }

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

/* ==================== Hero Banner ==================== */
.hero-banner {
  position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 48px 40px;
  background: linear-gradient(135deg, #0c2340 0%, #0a3d62 40%, #1a5276 70%, #0c2340 100%);
  margin-bottom: 32px;
}
.hero-particles {
  position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(79,195,247,0.4), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(102,187,106,0.3), transparent),
    radial-gradient(3px 3px at 60% 20%, rgba(171,71,188,0.3), transparent),
    radial-gradient(2px 2px at 80% 60%, rgba(255,167,38,0.3), transparent),
    radial-gradient(2px 2px at 10% 80%, rgba(79,195,247,0.2), transparent),
    radial-gradient(3px 3px at 90% 40%, rgba(102,187,106,0.2), transparent);
  animation: driftParticles 20s linear infinite;
}
@keyframes driftParticles {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 5px); }
  100% { transform: translate(0, 0); }
}

.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
  font-size: 2.5rem; font-weight: 900;
  background: linear-gradient(90deg, #4fc3f7, #66bb6a, #ab47bc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 8px;
}
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 28px; }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stat {
  text-align: center; padding: 16px 24px;
  background: rgba(255,255,255,0.05); border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent-blue); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ==================== 阶段卡片 ==================== */
.phase-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.phase-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border-color);
  transition: var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
}
.phase-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--phase-color);
}
.phase-card:hover {
  transform: translateY(-4px);
  border-color: var(--phase-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.phase-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px;
  background: color-mix(in srgb, var(--phase-color) 15%, transparent);
  color: var(--phase-color);
}
.phase-num { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.phase-card h3 { font-size: 1.1rem; margin: 6px 0 8px; font-weight: 600; }
.phase-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.phase-status { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 0.8rem; color: var(--text-muted); }

.status-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.status-badge.active { background: rgba(102,187,106,0.15); color: var(--accent-green); }
.status-badge.standby { background: rgba(255,167,38,0.15); color: var(--accent-orange); }
.status-badge.offline { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ==================== 设备编队 ==================== */
.section-title {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px; color: var(--text-primary);
}
.section-title i { color: var(--accent-blue); }

.fleet-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.fleet-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px; border: 1px solid var(--border-color);
  transition: var(--transition);
}
.fleet-card:hover { border-color: rgba(79,195,247,0.3); }
.fleet-card.charging { opacity: 0.75; }

.fleet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.fleet-name { font-weight: 600; font-size: 0.95rem; }
.fleet-type { font-size: 0.75rem; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 4px; }

.fleet-body { display: flex; gap: 20px; align-items: center; }
.fleet-gauge { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.fleet-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 6; }
.gauge-fill {
  fill: none; stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: calc(251.2 * (1 - var(--gauge-pct)));
  transition: stroke-dashoffset 1s ease;
}
.gauge-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--text-secondary); font-weight: 500;
}

.fleet-info { flex: 1; font-size: 0.8rem; color: var(--text-secondary); }
.fleet-info div { margin-bottom: 4px; }
.fleet-info span { color: var(--text-muted); }

.fleet-module {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color);
  font-size: 0.78rem; color: var(--text-muted);
}

/* ==================== 生命周期页面 ==================== */
.lifecycle-container { display: flex; gap: 32px; min-height: 600px; }

.lifecycle-timeline {
  position: relative; display: flex; flex-direction: column; gap: 0;
  padding: 24px 16px; flex-shrink: 0; width: 160px;
}
.timeline-line {
  position: absolute; left: 30px; top: 24px; bottom: 24px;
  width: 2px; background: var(--border-color);
}
.timeline-node {
  position: relative; padding: 16px 0 16px 40px; cursor: pointer;
  transition: var(--transition);
}
.timeline-node .node-dot {
  position: absolute; left: 22px; top: 18px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--node-color); background: var(--bg-primary);
  transition: var(--transition); z-index: 1;
}
.timeline-node.active .node-dot { background: var(--node-color); box-shadow: 0 0 12px var(--node-color); }
.timeline-node.selected .node-dot { background: var(--node-color); box-shadow: 0 0 12px var(--node-color); transform: scale(1.2); }
.timeline-node .node-label {
  font-size: 0.8rem; color: var(--text-muted); transition: var(--transition);
  white-space: nowrap;
}
.timeline-node.active .node-label { color: var(--text-primary); }
.timeline-node.selected .node-label { color: var(--node-color); font-weight: 600; }
.timeline-node:hover .node-label { color: var(--text-primary); }

.phase-detail {
  flex: 1; background: var(--bg-card); border-radius: var(--radius);
  padding: 32px; border: 1px solid var(--border-color);
}

.detail-header {
  display: flex; align-items: center; gap: 20px;
  padding-bottom: 20px; border-bottom: 2px solid var(--detail-color, var(--border-color));
  margin-bottom: 24px;
}
.detail-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: color-mix(in srgb, var(--detail-color, var(--accent-blue)) 15%, transparent);
  color: var(--detail-color, var(--accent-blue));
}
.detail-header h2 { font-size: 1.4rem; font-weight: 700; }
.detail-header p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; }

.detail-body { display: flex; flex-direction: column; gap: 24px; }
.detail-section { padding: 20px; background: var(--bg-surface); border-radius: var(--radius-sm); border-left: 3px solid var(--detail-color, var(--accent-blue)); }
.detail-section h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.detail-section h3 i { color: var(--accent-blue); font-size: 0.9rem; }
.detail-section p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  padding: 4px 12px; border-radius: 20px; font-size: 0.75rem;
  background: rgba(79,195,247,0.1); color: var(--accent-blue);
  border: 1px solid rgba(79,195,247,0.2);
}

/* ==================== 蚌档案页面 ==================== */
.archive-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.archive-header h2 { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.archive-header h2 i { color: var(--accent-blue); }

.archive-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  padding: 8px 18px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.85rem; cursor: pointer;
  transition: var(--transition); display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.btn-primary { background: var(--accent-blue); color: #0a0e1a; }
.btn-primary:hover { background: #39b0e8; }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-warning { background: var(--accent-orange); color: #0a0e1a; }
.btn-info { background: var(--accent-blue); color: #0a0e1a; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #d32f2f; }

.search-box {
  position: relative; display: flex; align-items: center;
}
.search-box i { position: absolute; left: 12px; color: var(--text-muted); font-size: 0.85rem; }
.search-box input {
  padding: 8px 12px 8px 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-color); background: var(--bg-surface);
  color: var(--text-primary); font-family: var(--font); font-size: 0.85rem;
  width: 260px; transition: var(--transition);
}
.search-box input:focus { outline: none; border-color: var(--accent-blue); }

.archive-stats {
  display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.archive-stat-card {
  flex: 1; min-width: 100px; text-align: center; padding: 16px;
  background: var(--bg-card); border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.as-num { font-size: 2rem; font-weight: 700; }
.as-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.archive-table-wrap {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border-color); overflow-x: auto;
}
.archive-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.archive-table th {
  padding: 14px 16px; text-align: left; font-weight: 600;
  color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.archive-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.archive-table tr:hover td { background: rgba(79,195,247,0.04); }
.archive-table .phase-tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 500;
}
.phase-tag.p1 { background: rgba(79,195,247,0.15); color: var(--accent-blue); }
.phase-tag.p2 { background: rgba(102,187,106,0.15); color: var(--accent-green); }
.phase-tag.p3 { background: rgba(255,167,38,0.15); color: var(--accent-orange); }
.phase-tag.p4 { background: rgba(239,83,80,0.15); color: var(--accent-red); }
.phase-tag.p5 { background: rgba(171,71,188,0.15); color: var(--accent-purple); }
.phase-tag.p6 { background: rgba(120,144,156,0.15); color: #90a4ae; }

.btn-table {
  padding: 4px 10px; border: none; border-radius: 4px;
  font-size: 0.75rem; cursor: pointer; margin-right: 4px;
  transition: var(--transition); font-family: var(--font);
}
.btn-table.edit { background: rgba(79,195,247,0.15); color: var(--accent-blue); }
.btn-table.edit:hover { background: rgba(79,195,247,0.25); }
.btn-table.delete { background: rgba(239,83,80,0.15); color: var(--accent-red); }
.btn-table.delete:hover { background: rgba(239,83,80,0.25); }

/* ==================== 模态框 ==================== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--bg-card); border-radius: var(--radius);
  width: 90%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--border-color); box-shadow: var(--shadow);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-color); background: var(--bg-surface);
  color: var(--text-primary); font-family: var(--font); font-size: 0.9rem;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent-blue);
}

.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ==================== 数字孪生仪表盘 ==================== */
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.dash-header h2 { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.dash-header h2 i { color: var(--accent-blue); }

.dash-time-range { display: flex; gap: 4px; }
.range-btn {
  padding: 6px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: 0.8rem; cursor: pointer;
  transition: var(--transition);
}
.range-btn.active { background: var(--accent-blue); color: #0a0e1a; border-color: var(--accent-blue); }
.range-btn:hover:not(.active) { border-color: var(--text-muted); }

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

.dash-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px; border: 1px solid var(--border-color);
}
.dash-card.wide { grid-column: 1 / -1; }

.dash-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.dash-card-header h3 { font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dash-card-header h3 i { color: var(--accent-blue); }
.update-time { font-size: 0.75rem; color: var(--text-muted); }

.chart-container { position: relative; height: 240px; }

/* 水质参数卡片 */
.water-params { display: flex; gap: 16px; flex-wrap: wrap; }
.wparam {
  flex: 1; min-width: 150px; display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg-surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.wparam-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.wparam-info { flex: 1; }
.wparam-val { font-size: 1.3rem; font-weight: 700; }
.wparam-val small { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }
.wparam-label { font-size: 0.75rem; color: var(--text-muted); }
.wparam-trend { font-size: 0.8rem; font-weight: 600; }
.wparam-trend.up { color: var(--accent-green); }
.wparam-trend.down { color: var(--accent-red); }
.wparam-trend.stable { color: var(--text-muted); }

/* AI建议 */
.ai-suggestions { display: flex; flex-direction: column; gap: 12px; }
.ai-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px; border-radius: var(--radius-sm);
  border-left: 3px solid;
}
.ai-item.warning { background: rgba(255,167,38,0.06); border-color: var(--accent-orange); }
.ai-item.info { background: rgba(79,195,247,0.06); border-color: var(--accent-blue); }
.ai-item.success { background: rgba(102,187,106,0.06); border-color: var(--accent-green); }
.ai-icon { font-size: 1.1rem; margin-top: 2px; }
.ai-item.warning .ai-icon { color: var(--accent-orange); }
.ai-item.info .ai-icon { color: var(--accent-blue); }
.ai-item.success .ai-icon { color: var(--accent-green); }
.ai-text { flex: 1; }
.ai-text strong { font-size: 0.9rem; display: block; margin-bottom: 4px; }
.ai-text p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* ==================== 实时监控页面 ==================== */
.monitor-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.monitor-header h2 { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.monitor-header h2 i { color: var(--accent-blue); }

.monitor-controls { display: flex; align-items: center; gap: 16px; }
.auto-refresh {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-secondary); cursor: pointer;
}
.auto-refresh input { accent-color: var(--accent-blue); }

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

.monitor-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px; border: 1px solid var(--border-color);
}
.monitor-card.large { grid-row: span 2; }

.monitor-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.monitor-card-header h3 { font-size: 0.95rem; font-weight: 600; }

.map-legend { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-muted); }
.legend-item { display: flex; align-items: center; gap: 4px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.map-container {
  position: relative; height: 400px; border-radius: var(--radius-sm);
  overflow: hidden; background: #0c1e35;
}
.map-container canvas { width: 100%; height: 100%; }

/* ===== 蚌档案地图 Tooltip ===== */
.clam-tooltip {
  display: none;
  position: absolute;
  width: 240px;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid rgba(0, 255, 65, 0.4);
  border-radius: 10px;
  padding: 0;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.15), 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  font-family: var(--font);
  animation: tooltipFadeIn 0.2s ease;
}
@keyframes tooltipFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.ct-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  background: rgba(0, 255, 65, 0.05);
  border-radius: 10px 10px 0 0;
}
.ct-batch {
  font-weight: 700;
  font-size: 0.88rem;
  color: #00ff41;
}
.ct-phase-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 500;
}
.ct-body {
  padding: 10px 14px 12px;
}
.ct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ct-row:last-child { border-bottom: none; }
.ct-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.ct-notes {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0, 255, 65, 0.06);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #00ff41;
  line-height: 1.5;
  border-left: 2px solid rgba(0, 255, 65, 0.3);
}

/* 遥测数据 */
.telemetry-list { display: flex; flex-direction: column; gap: 12px; }
.telemetry-item {
  padding: 12px; background: var(--bg-surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.telemetry-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; }
.telemetry-data { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 0.78rem; color: var(--text-secondary); }
.telemetry-data span { color: var(--text-muted); }

/* 告警日志 */
.alert-count {
  background: var(--accent-orange); color: #0a0e1a;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}
.alert-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.alert-item {
  display: flex; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: 0.82rem;
  border-left: 3px solid;
}
.alert-item.warning { background: rgba(255,167,38,0.06); border-color: var(--accent-orange); }
.alert-item.info { background: rgba(79,195,247,0.06); border-color: var(--accent-blue); }
.alert-item.success { background: rgba(102,187,106,0.06); border-color: var(--accent-green); }
.alert-item.danger { background: rgba(239,83,80,0.08); border-color: var(--accent-red); animation: alertPulse 1s ease infinite; }
.alert-time { color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; min-width: 40px; }
.alert-msg { color: var(--text-secondary); }

/* 任务队列 */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--bg-surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.task-item.running .task-status { color: var(--accent-green); }
.task-item.pending .task-status { color: var(--text-muted); }
.task-status { font-size: 1rem; }
.task-info { flex: 1; }
.task-name { font-size: 0.82rem; font-weight: 500; margin-bottom: 6px; }
.task-progress {
  height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--accent-blue); border-radius: 2px;
  width: var(--progress); transition: width 0.5s ease;
}
.task-pct { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* ==================== Toast ==================== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border-color);
  color: var(--text-primary); font-size: 0.85rem;
  box-shadow: var(--shadow); animation: toastIn 0.3s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.warning { border-left: 3px solid var(--accent-orange); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }

@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

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

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: 1fr; }
  .monitor-grid { grid-template-columns: 1fr; }
  .monitor-card.large { grid-row: auto; }
}
@media (max-width: 900px) {
  .top-nav { flex-wrap: wrap; height: auto; padding: 12px; gap: 8px; }
  .nav-tabs { order: 3; width: 100%; overflow-x: auto; }
  .main-content { padding: 16px; }
  .phase-cards { grid-template-columns: 1fr; }
  .hero-stats { gap: 12px; }
  .hero-stat { padding: 12px 16px; }
  .lifecycle-container { flex-direction: column; }
  .lifecycle-timeline { flex-direction: row; width: 100%; padding: 0; overflow-x: auto; }
  .timeline-line { display: none; }
  .timeline-node { padding: 8px 12px; }
  .timeline-node .node-dot { position: static; margin-bottom: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .water-params { flex-direction: column; }
  .fleet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-content h1 { font-size: 1.6rem; }
  .archive-actions { flex-direction: column; align-items: stretch; }
  .search-box input { width: 100%; }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
