:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #eef3f8;
  color: #17324d;
}

* { box-sizing: border-box; }
body { margin: 0; background: #eef3f8; }
.page-shell { max-width: 1540px; margin: 0 auto; padding: 28px; }
.topbar {
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 26px 30px; border-radius: 20px; color: #fff;
  background: linear-gradient(125deg, #123a63, #1e5f87);
  box-shadow: 0 12px 28px rgba(24, 62, 95, .18);
}
h1, h2, p { margin: 0; }
h1 { margin-top: 4px; font-size: 34px; letter-spacing: -.7px; }
h1 span { color: #9bd5e7; }
h2 { margin-top: 4px; font-size: 21px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.8px; color: #6e8ca8; }
.topbar .eyebrow, .subtitle { color: #d8ebf5; }
.subtitle { margin-top: 7px; }
.topbar-actions { display: grid; justify-items: end; gap: 10px; }
button {
  border: 0; padding: 11px 16px; border-radius: 999px; cursor: pointer;
  background: #fff; color: #174b73; font-weight: 800;
}
button:hover { background: #eaf6fb; }
.status { font-size: 13px; color: #d8ebf5; }
.status.is-ok::before { content: "●"; color: #80d5ae; padding-right: 7px; }
.status.is-loading::before { content: "●"; color: #f0bf62; padding-right: 7px; }
.status.is-error::before { content: "●"; color: #ff9c9c; padding-right: 7px; }
.error-box { margin-top: 18px; padding: 14px 18px; border-radius: 12px; background: #fff0f0; color: #9b2f2f; }
.is-hidden { display: none; }
.meta-strip {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1px; overflow: hidden;
  margin: 18px 0; border: 1px solid #d8e3ec; border-radius: 14px; background: #d8e3ec;
}
.meta-strip div { padding: 12px 16px; background: #fff; }
.meta-strip span, .meta-strip strong { display: block; }
.meta-strip span { margin-bottom: 4px; color: #7890a5; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.meta-strip strong { overflow: hidden; color: #294b67; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.kpi-card, .panel {
  border: 1px solid #dbe5ee; border-radius: 16px; background: #fff;
  box-shadow: 0 5px 16px rgba(35, 66, 94, .05);
}
.kpi-card { min-height: 138px; padding: 18px; }
.kpi-card.accent { border-color: #c5e7ee; background: #eefbfc; }
.kpi-card span, .kpi-card small { display: block; }
.kpi-card span { min-height: 34px; color: #69869f; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.kpi-card strong { display: block; margin: 6px 0; color: #173f65; font-size: 24px; letter-spacing: -.7px; }
.kpi-card small { color: #8498a9; line-height: 1.35; }
.positive { color: #138256 !important; }
.negative { color: #cc4545 !important; }
.content-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); gap: 16px; margin-top: 18px; }
.panel { padding: 18px; }
.panel-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 15px; }
.panel-heading > p { color: #7b91a4; font-size: 12px; }
.legend { display: flex; gap: 14px; color: #6f8495; font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; }
.legend .plan { background: #2e719f; }
.legend .actual { background: #d05a54; }
canvas { display: block; width: 100%; height: 360px; }
.insight-panel { background: linear-gradient(145deg, #163d63, #1d5778); color: #fff; }
.insight-panel .eyebrow { color: #a7dce6; }
.insight-panel h2 { margin-top: 10px; font-size: 27px; }
.insight-panel p:not(.eyebrow) { margin-top: 14px; color: #d6e7f1; line-height: 1.55; }
.progress-track { height: 10px; margin: 28px 0 9px; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .2); }
.progress-bar { height: 100%; border-radius: inherit; background: #7dd3b0; transition: width .35s ease; }
.insight-panel small { color: #d6e7f1; }
.table-panel { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 9px; background: #193f66; color: #fff; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
td { padding: 9px; border-bottom: 1px solid #e5edf3; text-align: right; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f7fafc; }
tbody tr:hover { background: #eef8fb; }
tfoot th { padding: 11px 9px; background: #e2edf5; color: #173f65; text-align: right; }
tfoot th:first-child { text-align: left; }
.erp-panel { border-top: 4px solid #2e719f; }
.erp-summary { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.erp-summary div { padding: 14px 16px; border-radius: 12px; background: #edf5fa; }
.erp-summary span, .erp-summary strong { display: block; }
.erp-summary span { color: #69869f; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.erp-summary strong { margin-top: 5px; color: #173f65; font-size: 22px; }
.erp-footnote { margin-top: 14px; color: #7890a5; font-size: 12px; line-height: 1.5; }
.cell-note { display: block; margin-top: 3px; color: #7890a5; font-size: 11px; font-weight: 400; }
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .page-shell { padding: 14px; }
  .topbar { display: block; padding: 20px; }
  .topbar-actions { justify-items: start; margin-top: 16px; }
  .meta-strip, .kpi-grid { grid-template-columns: 1fr; }
}
