/* ==============================================================================
   COGNIFORGE AI · 智算容器云运管中台主样式入口 (style.css)
   ============================================================================== */

@import './tokens.css';
@import './components.css';

/* 核心布局网格 */
.main-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.left-panel, .right-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 通用仪表盘卡片 */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-title-row h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-row h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--accent-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* 遥测指标网格 */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metric-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.metric-val.gold { color: var(--accent-gold); }
.metric-val.green { color: var(--accent-green); }

/* 模式切换矩阵 */
.mode-switch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mode-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-card:hover {
  border-color: var(--border-hover);
  background: rgba(56, 189, 248, 0.05);
}

.mode-card.active {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.mode-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.mode-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 终端与日志流 */
.terminal-box {
  background: #04060a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  height: 220px;
  overflow-y: auto;
  color: #cbd5e1;
}

.log-line {
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.log-time { color: var(--text-muted); }
.log-node { color: var(--accent-cyan); font-weight: 600; }
.log-msg { color: #f8fafc; }
.log-err { color: var(--accent-red); }

/* 智能诊断建议框 */
.diagnosis-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.diag-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 4px;
}

.diag-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
