/* ==============================================================================
   对地参数测量页面 - 专属样式
   ============================================================================== */

/* 页面标题 */
.gnd-title-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.gnd-title-left { display: flex; align-items: center; gap: 14px; }
.gnd-title-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: #1e40af;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  box-shadow: 0 4px 12px rgba(30,64,175,0.3);
}

/* 流程步骤条 */
.gnd-step-pipeline {
  display: flex; align-items: center;
  margin-bottom: 14px;
  background: transparent; border-radius: 12px;
  padding: 6px 0;
}
.gnd-step-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #94a3b8;
}
.gnd-step-item.active {
  background: #0ea5e9; color: #fff;
  font-weight: 600; box-shadow: 0 2px 8px rgba(14,165,233,0.25);
}
.gnd-step-item.done { color: #16a34a; }
.gnd-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  border: 2px solid currentColor;
}
.gnd-step-item.active .gnd-step-num { border-color: #fff; background: rgba(255,255,255,0.2); }
.gnd-step-item.done .gnd-step-num { border-color: #16a34a; background: #dcfce7; }
.gnd-step-connector {
  flex: 0 0 32px; height: 2px;
  background: #e2e8f0;
}
.gnd-step-connector.done { background: #86efac; }

/* 输入模式 Tab */
.gnd-mode-tabs {
  display: inline-flex; gap: 4px;
  background: #f1f5f9; border-radius: 10px; padding: 4px;
  margin-bottom: 16px;
}
.gnd-mode-tab {
  padding: 10px 24px; border: none; background: transparent;
  border-radius: 7px;
  font-size: 14px; font-weight: 500; color: #64748b;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center;
}
.gnd-mode-tab.active {
  background: #fff; color: #0ea5e9; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.gnd-mode-tab:hover:not(.active) { background: rgba(255,255,255,0.5); }
.gnd-mode-tab i { margin-right: 6px; }

/* 工作卡片 */
.gnd-work-card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.gnd-work-card-body { padding: 20px; }

/* 工况标签 */
.gnd-condition-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
}
.gnd-condition-tag.c1 { background: #eff6ff; color: #1d4ed8; }
.gnd-condition-tag.c2 { background: #fff7ed; color: #c2410c; }

/* 输入框 */
.gnd-input {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  text-align: left; transition: all 0.2s;
  border-radius: 6px; font-size: 13px;
}
.gnd-preset { color: #9ca3af !important; }
.gnd-preset:focus { color: #1e293b !important; }
.gnd-input:focus {
  background-color: #fff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}
.gnd-tap-hint {
  margin-top: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: #0369a1;
  background: #f0f9ff;
  border-left: 3px solid #0ea5e9;
  border-radius: 0 6px 6px 0;
}
.gnd-label { font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 3px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gnd-unit {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: 12px; font-weight: 600; pointer-events: none;
}

/* iPMU 转换条 */
.gnd-ipmu-strip {
  background: linear-gradient(90deg, #eff6ff, #f0fdf4);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px;
}
.gnd-transform-arrow {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #0ea5e9;
}
.gnd-transform-arrow i { font-size: 20px; }
.gnd-transform-arrow span { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; }
.gnd-transform-result {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px; font-weight: 700; color: #0f766e;
}
.gnd-transform-label { font-size: 11px; color: #6b7280; font-weight: 600; }

/* IL 补充区 */
.gnd-il-supplement {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 14px 18px;
  margin-top: 10px;
}
.gnd-il-supplement-label {
  font-size: 11px; font-weight: 700; color: #92400e;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}

/* 计算按钮 */
.gnd-btn-analyze {
  background: #1e293b !important; border: none !important;
  color: #fff !important; font-weight: 700 !important; font-size: 15px !important;
  padding: 14px 32px !important; border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(30,41,59,0.2) !important;
  transition: all 0.2s !important; width: 100% !important;
}
.gnd-btn-analyze:hover {
  background: #334155 !important; color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30,41,59,0.3) !important;
}

/* 结果区 */
.gnd-result-section {
  background: #fff; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden; margin-top: 24px;
}
.gnd-result-header {
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}
.gnd-result-table {
  width: 100%; font-size: 14px;
  font-family: 'IBM Plex Mono', 'Source Han Sans SC', monospace;
}
.gnd-result-table th {
  background: #f8fafc; font-size: 12px; font-weight: 600;
  color: #94a3b8; text-align: center; padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.gnd-result-table td {
  text-align: center; padding: 14px 16px;
  border-bottom: 1px solid #f8fafc;
}
.gnd-result-table tr:hover td { background: #f8fafc; }
.gnd-param-name { font-weight: 600; color: #1e293b; text-align: left !important; }
.gnd-param-value { font-weight: 700; font-size: 16px; }
.gnd-param-desc { font-size: 12px; color: #94a3b8; text-align: left !important; }
.gnd-param-symbol { font-weight: 500; color: #475569; }
.gnd-param-symbol sub { font-size: 0.75em; }
.gnd-param-status { font-size: 12px; text-align: left !important; color: #64748b; }
.gnd-status-ok { color: #16a34a; }
.gnd-status-warn { color: #d97706; }
.gnd-status-danger { color: #dc2626; }
.gnd-status-info { color: #64748b; }
.gnd-row-highlight td { background: #eff6ff !important; }
.gnd-row-highlight .gnd-param-value { color: #1d4ed8; }

/* 右侧面板 */
.gnd-side-card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  padding: 20px; margin-bottom: 12px;
}
.gnd-side-card h6 { font-size: 13px; font-weight: 700; margin-bottom: 14px; }

/* 可视化占位 */
.gnd-viz-placeholder {
  width: 100%; aspect-ratio: 1;
  border: 2px dashed #e2e8f0;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #94a3b8; gap: 8px;
  background: #fafbfc;
}

/* 回放按钮 */
.gnd-replay-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255,255,255,0.85);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 14px;
  padding: 0;
  z-index: 10;
}
.gnd-replay-btn:hover {
  background: #f1f5f9;
  color: #2563eb;
  border-color: #2563eb;
}

/* v1/v2 切换面板（弹窗内左上角）*/
.chart-modal-vpanel {
  position: absolute;
  top: 8px; left: 12px;
  display: flex; gap: 4px;
  z-index: 10;
}
.vpanel-btn {
  font-size: 12px !important;
  padding: 2px 8px !important;
  opacity: 0.5;
}
.vpanel-btn.active { opacity: 1; }

/* 诊断面板 */
.gnd-diag-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid #f8fafc;
}
.gnd-diag-item:last-child { border: none; }
.gnd-diag-label { font-size: 12px; color: #94a3b8; }
.gnd-diag-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.gnd-diag-badge.ok { background: #dcfce7; color: #166534; }
.gnd-diag-badge.warn { background: #fef3c7; color: #92400e; }
.gnd-diag-badge.err { background: #fee2e2; color: #991b1b; }
.gnd-diag-badge.pending { background: #f1f5f9; color: #94a3b8; }

/* 脱谐度量表 */
.gnd-gauge-bar {
  height: 8px; background: #f1f5f9; border-radius: 4px;
  position: relative; overflow: hidden; margin: 8px 0 4px;
}
.gnd-gauge-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  width: 100%;
}
.gnd-gauge-marker {
  position: absolute; top: -3px; width: 3px; height: 14px;
  background: #1e293b; border-radius: 2px;
  transform: translateX(-50%);
}
.gnd-gauge-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #94a3b8;
}

/* AI 诊断区块 */
#gnd-ai-section .gnd-work-card {
  overflow: visible;
}
#gnd-ai-section .gnd-result-header {
  border-radius: 10px 10px 0 0;
}

/* ═══════ i18n: table header nowrap for English locale ═══════ */
.gnd-result-table th,
.gnd-result-table td.gnd-param-name {
    white-space: nowrap;
}
