/* Shared layout for satellite module pages */

.mod-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mod-kpis.three { grid-template-columns: repeat(3, 1fr); }

.mod-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
}

.mod-stat .label { font-size: 11.5px; color: var(--ink-3); }
.mod-stat .value { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--green-900); margin-top: 4px; }
.mod-stat .value .unit { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.mod-stat.clickable { cursor: pointer; }
.mod-stat.clickable:hover, .mod-stat.active { border-color: var(--brass-400); background: var(--parchment); }

.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mod-grid.wide-left { grid-template-columns: 1.4fr 1fr; }
.mod-grid.wide-right { grid-template-columns: 1fr 1.2fr; }

.field-list { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: flex; font-size: 12px; line-height: 1.5; }
.field-row .field-label { width: 76px; flex-shrink: 0; color: var(--ink-3); }
.field-row .field-value { color: var(--ink); }

.segment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  border-radius: 3px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.segment-item:hover { background: var(--green-50); }
.segment-item.selected { background: var(--green-100); color: var(--green-900); font-weight: 600; }

.detail-section-title { font-size: 12.5px; font-weight: 700; color: var(--green-900); }
.advice-item { font-size: 12px; color: var(--ink-2); line-height: 1.6; }

.mod-note {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.65;
  background: var(--parchment);
  border: 1px solid var(--brass-200);
  border-radius: 4px;
  padding: 10px 12px;
}

.bar {
  height: 8px;
  background: var(--grey-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.bar > span { display: block; height: 100%; background: var(--green-700); }
.bar.over > span { background: var(--red-500); }

.qa-box { display: flex; flex-direction: column; gap: 8px; }
.qa-answer {
  min-height: 80px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--parchment);
  border: 1px solid var(--brass-200);
  border-radius: 4px;
  padding: 10px 12px;
}

.ai-mode-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ai-mode {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 12px;
}
.ai-mode.active { border-color: var(--green-700); background: var(--green-50); color: var(--green-900); font-weight: 600; }

.ai-doc-list { display: flex; flex-direction: column; gap: 8px; }
.ai-doc {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  background: var(--paper);
}
.ai-doc-title { font-size: 12.5px; font-weight: 700; color: var(--green-900); }
.ai-doc-body { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin-top: 4px; }

.qa-answer .brief-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-900);
  padding: 8px 0 5px;
  border-bottom: 1px dashed var(--line);
}
.qa-answer .brief-item,
.qa-answer .brief-trend { font-size: 12px; color: var(--ink-2); line-height: 1.55; margin-top: 6px; }
.qa-answer .brief-advice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: 6px;
}
.qa-answer .brief-advice .conf { display: block; font-size: 10.5px; color: var(--brass-600); margin-top: 2px; }

@media (max-width: 900px) {
  .mod-kpis, .mod-kpis.three, .mod-grid, .mod-grid.wide-left, .mod-grid.wide-right {
    grid-template-columns: 1fr;
  }
}

.flag-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 12px; }
.flag-row .num { font-weight: 700; }

.recon-grid { border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.recon-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; }
.recon-row > div { padding: 6px 9px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.recon-row.head > div { background: var(--parchment); color: var(--ink-3); font-weight: 600; }
.recon-row .diff { text-align: right; font-family: var(--mono); font-weight: 700; color: var(--red-500); }
.recon-row.main > div { background: #FDFCF7; }
.recon-reason { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 5px 0; border-bottom: 1px dotted var(--line); }
.recon-reason .num { color: var(--red-500); font-weight: 600; }

.occ-log { font-size: 12px; color: var(--ink-2); }
.occ-log .row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dotted var(--line); }

@media (max-width: 1100px) {
  .mod-kpis, .mod-kpis.three, .mod-grid, .mod-grid.wide-left, .mod-grid.wide-right { grid-template-columns: 1fr; }
}
