/* AIDC 算电协同调度平台 - 核心样式表 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #050811;
  --bg-gradient: radial-gradient(circle at 50% 0%, #0d1527 0%, #050811 100%);
  --card-bg: rgba(13, 20, 38, 0.6);
  --card-bg-hover: rgba(22, 33, 62, 0.75);
  --border-color: rgba(59, 130, 246, 0.15);
  --border-color-hover: rgba(59, 130, 246, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --primary-bg: rgba(59, 130, 246, 0.1);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --success-bg: rgba(16, 185, 129, 0.1);
  
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --warning-bg: rgba(245, 158, 11, 0.1);
  
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --danger-bg: rgba(239, 68, 68, 0.1);
  
  --sidebar-width: 240px;
  --header-height: 64px;
  
  --glow-shadow: 0 0 15px var(--border-color);
  --glass-blur: blur(12px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(13, 20, 38, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.45);
}

/* 布局骨架 */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas: 
    "sidebar header"
    "sidebar main";
  height: 100vh;
  width: 100vw;
}

/* 侧边栏 */
.sidebar {
  grid-area: sidebar;
  background: rgba(8, 12, 24, 0.85);
  border-right: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 20px 0;
}

.logo-area {
  padding: 0 24px 24px 24px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, var(--primary) 30%, transparent 70%);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 0 12px var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.nav-menu {
  list-style: none;
  margin-top: 24px;
  flex: 1;
  overflow-y: auto;
  padding: 0 12px;
}

.nav-item {
  margin-bottom: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.1);
}

.nav-item.active .nav-link {
  color: #fff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-left: 3px solid var(--primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: inset 3px 0 0 var(--primary);
  font-weight: 600;
}

.nav-item.active .nav-link svg {
  color: var(--primary);
  filter: drop-shadow(0 0 5px var(--primary));
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 顶部栏 */
.header {
  grid-area: header;
  background: rgba(8, 12, 24, 0.7);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 99;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.scene-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scene-label {
  font-size: 13px;
  color: var(--text-muted);
}

.scene-select {
  background: rgba(13, 20, 38, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.3s;
}

.scene-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.quick-action-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
  transition: all 0.3s;
}

.quick-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.55);
}

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

.quick-action-btn.loading {
  background: #334155;
  box-shadow: none;
  cursor: not-allowed;
}

.quick-action-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

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

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: rgba(59, 130, 246, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

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

.status-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.status-dot.danger {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.role-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* 主内容区域 */
.main-content {
  grid-area: main;
  padding: 24px;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
  position: relative;
}

.page-container {
  display: none;
  animation: fadeIn 0.4s ease-out;
  height: 100%;
}

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

/* 标题与面包屑 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title-area h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-title-area p {
  font-size: 13px;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  gap: 12px;
}

/* 玻璃卡片样式 */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.glass-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 10px rgba(59, 130, 246, 0.05);
}

.glass-card:hover::before {
  opacity: 1;
}

/* 数据大屏网格 */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  padding: 16px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.metric-value.primary { color: #60a5fa; text-shadow: 0 0 10px rgba(96, 165, 250, 0.3); }
.metric-value.success { color: #34d399; text-shadow: 0 0 10px rgba(52, 211, 153, 0.3); }
.metric-value.warning { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
.metric-value.danger { color: #f87171; text-shadow: 0 0 10px rgba(248, 113, 113, 0.3); }

.metric-trend {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

.metric-trend.up { color: var(--danger); }
.metric-trend.down { color: var(--success); }

/* 主体图表板 */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-container {
  height: 380px;
  width: 100%;
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.card-actions {
  display: flex;
  gap: 8px;
}

.card-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.card-action-btn.active, .card-action-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: var(--text-main);
}

/* 列表与表格 */
.table-wrapper {
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.custom-table th {
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.custom-table tbody tr {
  transition: background 0.2s;
  cursor: pointer;
}

.custom-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

/* 状态标签 */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.primary { background: var(--primary-bg); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-badge.success { background: var(--success-bg); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-badge.warning { background: var(--warning-bg); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.status-badge.danger { background: var(--danger-bg); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.status-badge.info { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); }

/* 风险列表 */
.risk-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.02);
  border-left: 3px solid var(--danger);
  transition: all 0.3s;
}

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

.risk-icon {
  margin-top: 2px;
}

.risk-info h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.risk-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* 按钮及表单组件 */
.btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.btn-primary {
  background: var(--primary);
  border: none;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.btn.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* 详情滑出抽屉 */
.drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: rgba(13, 20, 38, 0.95);
  border-left: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  right: 0;
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
}

.drawer-close:hover {
  color: var(--text-main);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section-title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-info-item label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.drawer-info-item span {
  font-size: 13px;
  font-weight: 500;
}

.drawer-explanation {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--primary);
  padding: 14px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  gap: 12px;
}

/* 场景仿真工作台步骤条 */
.scenario-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  height: calc(100% - 70px);
}

.step-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.step-nav-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.step-nav-item.completed {
  border-color: rgba(16, 185, 129, 0.3);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.step-nav-item.active .step-num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 8px var(--primary);
}

.step-nav-item.completed .step-num {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
}

.step-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.step-content-area {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.step-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.step-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
}

/* 运行日志终端 */
.log-terminal {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  padding: 16px;
  height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.log-line {
  font-size: 12px;
  color: #a7f3d0;
  display: flex;
  gap: 8px;
}

.log-line.error { color: #fecaca; }
.log-line.warning { color: #fef08a; }

.log-time {
  color: var(--text-muted);
}

/* 简易开关 Switch */
.switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* 比对面板 */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.diff-badge {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.diff-badge.better { background: var(--success-bg); color: var(--success); }
.diff-badge.worse { background: var(--danger-bg); color: var(--danger); }

/* 电价与储能 - 充放电甘特甘特图 */
.gantt-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.gantt-row {
  display: flex;
  align-items: center;
}

.gantt-label {
  width: 80px;
  font-size: 12px;
  color: var(--text-muted);
}

.gantt-track {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
}

.gantt-block {
  height: 100%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  border-radius: 2px;
}

.gantt-block.charge {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.6) 0%, rgba(59, 130, 246, 0.8) 100%);
  border-left: 2px solid #60a5fa;
}

.gantt-block.discharge {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.6) 0%, rgba(16, 185, 129, 0.8) 100%);
  border-left: 2px solid #34d399;
}

.gantt-block.hold {
  background: rgba(255, 255, 255, 0.08);
}

/* 配置表单 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-muted);
}

.form-input {
  background: rgba(13, 20, 38, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: all 0.3s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* 弹出模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 17, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: rgba(13, 20, 38, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
}

/* 过滤栏 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background: rgba(13, 20, 38, 0.3);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-item label {
  font-size: 12px;
  color: var(--text-muted);
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

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

/* 响应式调整 */
@media (max-width: 1200px) {
  .metrics-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "header"
      "main";
  }
  .sidebar {
    display: none; /* 在真实环境可能改为抽屉菜单，这里原型简单隐藏以大屏优先 */
  }
}

/* Markdown 报告查看器专属美化样式 */
.markdown-report-viewer {
  background: #090d1a;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  padding: 20px 24px;
  height: calc(100vh - 380px); /* 视口自适应：根据屏幕高度自动计算，并在此容器内显示滚动条 */
  min-height: 260px;
  overflow-y: auto;
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/* 滚动条美化 */
.markdown-report-viewer::-webkit-scrollbar {
  width: 6px;
}
.markdown-report-viewer::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
.markdown-report-viewer::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.2);
  border-radius: 3px;
}
.markdown-report-viewer::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.4);
}

.markdown-report-viewer h1 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 8px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: -0.3px;
}

.markdown-report-viewer h2 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.markdown-report-viewer h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

.markdown-report-viewer p {
  font-size: 13px;
  margin-bottom: 12px;
  color: rgba(241, 245, 249, 0.9);
}

.markdown-report-viewer ul {
  padding-left: 20px;
  margin-bottom: 16px;
  list-style-type: disc;
}

.markdown-report-viewer li {
  font-size: 13px;
  margin-bottom: 8px;
  color: rgba(241, 245, 249, 0.95);
  line-height: 1.5;
}

.markdown-report-viewer li strong {
  color: #ffffff;
  font-weight: 600;
}

.markdown-report-viewer hr {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  margin: 18px 0;
}

.markdown-report-viewer strong {
  color: #ffffff;
  font-weight: 600;
}

.markdown-report-viewer em {
  font-style: italic;
  color: var(--text-muted);
}
