:root {
  --bg: #0b0e12;
  --bg-panel: #12161c;
  --bg-elevated: #181e26;
  --bg-kpi: #141a22;
  --border: #2a313c;
  --border-soft: #1e2430;
  --text: #eef2f6;
  --text-muted: #9aa5b4;
  --text-dim: #6b7686;
  --accent: #4a8fb8;
  --accent-soft: rgba(74, 143, 184, 0.12);
  --ok: #4a9a78;
  --ok-bg: rgba(74, 154, 120, 0.12);
  --warn: #c4a035;
  --warn-bg: rgba(196, 160, 53, 0.1);
  --danger: #c45a4a;
  --danger-bg: rgba(196, 90, 74, 0.12);
  --inbound: #5b93b5;
  --internal: #4a9a78;
  --outbound: #c07a3a;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
}

.exec-canvas {
  width: 100%;
  max-width: 1920px;
  height: 100vh;
  max-height: 1080px;
  margin: 0 auto;
  padding: 10px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* ── Header ── */
.exec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.brand h1 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.meta-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.meta-cell .k {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.meta-cell .v {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

.coverage-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  cursor: help;
  min-width: 118px;
}
.coverage-pill .cov-main {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--text);
}
.coverage-pill .cov-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}
.coverage-pill.warn .cov-main { color: var(--warn); }

.btn-display {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 11px;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.btn-display:hover,
.btn-display.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nav-menu { position: relative; }
.nav-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 11px;
  user-select: none;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover { color: var(--text); border-color: var(--accent); }
.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 180px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.nav-menu-panel button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
}
.nav-menu-panel button:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

/* ── Filters ── */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}
.filter span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}
.filter select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  min-width: 0;
}
.filter-wide { flex: 1; min-width: 160px; max-width: 280px; }

.filter-advanced { position: relative; }
.filter-advanced summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  margin-top: 14px;
}
.filter-advanced summary::-webkit-details-marker { display: none; }
.filter-advanced-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.btn-reset {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
  margin-top: 14px;
}
.btn-reset:hover { color: var(--text); border-color: var(--accent); }

.filter-note {
  font-size: 11px;
  color: var(--warn);
  margin-left: auto;
  max-width: 280px;
  line-height: 1.3;
}

/* ── Main / Overview layout ── */
#main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page { display: none; flex: 1; min-height: 0; overflow: hidden; }
.page.active { display: flex; flex-direction: column; }

.overview-fit {
  gap: 8px;
}

.overview-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 8px;
}

.overview-footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 8px;
  flex: 0 0 196px;
  min-height: 0;
  max-height: 196px;
}

.overview-footer-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.link-action {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
}
.link-action:hover {
  color: var(--text);
  border-color: var(--accent);
}

.top-compact {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 6px 8px;
}
.top-compact .tc-head {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.top-compact .tc-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 11px;
}
.top-compact .tc-row:last-child { border-bottom: none; }
.top-compact .tc-row:hover .tc-code { color: var(--accent); }
.top-compact .tc-code {
  font-family: var(--mono);
  font-weight: 650;
  color: var(--text);
}
.top-compact .tc-n {
  font-family: var(--mono);
  color: var(--text-muted);
}

/* ── Panels ── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px 4px;
  flex-shrink: 0;
}
.panel-head h2 {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.panel-sub {
  font-size: 10px;
  color: var(--text-dim);
}

/* ── KPI strip ── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  flex-shrink: 0;
}

.kpi {
  background: var(--bg-kpi);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px 9px;
  cursor: pointer;
  min-height: 76px;
  transition: border-color 0.12s, background 0.12s;
}
.kpi:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}
.kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.kpi-value {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
.kpi-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.kpi.tone-danger .kpi-value { color: var(--danger); }
.kpi.tone-warn .kpi-value { color: var(--warn); }
.kpi.tone-ok .kpi-value { color: var(--ok); }

/* ── Flow ── */
.flow-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.flow-exec {
  flex: 1;
  display: grid;
  grid-template-columns: 132px 28px minmax(0, 1fr) 28px 132px;
  gap: 10px;
  align-items: center;
  padding: 6px 14px 12px;
  min-height: 0;
}

.flow-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  cursor: pointer;
  transition: border-color 0.12s;
  align-self: center;
  min-height: 118px;
}
.flow-metric:hover { border-color: var(--accent); }
.flow-metric .fm-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.flow-metric .fm-value {
  margin-top: 8px;
  font-size: 30px;
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
}
.flow-metric .fm-hint {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
}
.flow-metric.inbound .fm-value { color: var(--inbound); }
.flow-metric.outbound .fm-value { color: var(--outbound); }

.flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 16px;
}

.network-stage {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
  align-self: center;
  width: 100%;
}
.network-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.network-stage-head .title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 600;
}

.peer-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  align-content: center;
  min-height: 0;
}

.peer-node {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 4px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  position: relative;
  min-width: 0;
}
.peer-node:hover,
.peer-node.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.peer-node.has-attn {
  border-color: rgba(196, 90, 74, 0.55);
}
.peer-node .code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.peer-node .name {
  margin-top: 3px;
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
.peer-node .attn-mark {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--danger);
}
.peer-node .partial-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warn);
  opacity: 0.9;
}

.internal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}
.internal-bar:hover { border-color: var(--internal); }
.internal-bar .ib-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 600;
}
.internal-bar .ib-value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--internal);
}
.internal-bar .ib-hint {
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Attention panel ── */
.attn-panel {
  min-height: 0;
  overflow: hidden;
}
.attn-intro {
  padding: 0 12px 6px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1.35;
}
.attn-msgs {
  flex: 1;
  overflow: hidden;
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
}

.attn-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  width: 100%;
  transition: border-color 0.12s;
  flex-shrink: 0;
}
.attn-card:hover { border-color: var(--accent); }
.attn-card.high {
  border-left: 3px solid var(--danger);
  background: linear-gradient(90deg, var(--danger-bg), var(--bg-elevated) 40%);
}
.attn-card.med {
  border-left: 3px solid var(--warn);
  background: linear-gradient(90deg, var(--warn-bg), var(--bg-elevated) 40%);
}
.attn-card .attn-title {
  font-size: 12px;
  font-weight: 600;
}
.attn-card .attn-sev {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.attn-card .attn-count {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

/* ── Trend chart ── */
.trend-panel {
  min-height: 0;
  overflow: hidden;
}
.trend-summaries {
  display: flex;
  gap: 16px;
  padding: 0 12px 4px;
  flex-shrink: 0;
}
.trend-summaries .ts {
  display: flex;
  flex-direction: column;
}
.trend-summaries .ts-l {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.trend-summaries .ts-v {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  margin-top: 1px;
}
.trend-summaries .ts.in .ts-v { color: var(--inbound); }
.trend-summaries .ts.int .ts-v { color: var(--internal); }
.trend-summaries .ts.out .ts-v { color: var(--outbound); }

.trend-chart {
  flex: 1;
  padding: 2px 12px 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trend-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.trend-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  margin-right: 4px;
  vertical-align: middle;
}
.trend-legend .l-in { background: var(--inbound); }
.trend-legend .l-int { background: var(--internal); }
.trend-legend .l-out { background: var(--outbound); }

.trend-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 0;
  padding-bottom: 2px;
}
.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}
.trend-col .stack {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 1px;
  min-height: 0;
}
.trend-col .seg {
  width: 65%;
  margin: 0 auto;
  border-radius: 1px 1px 0 0;
  min-height: 1px;
}
.trend-col .seg.in { background: var(--inbound); }
.trend-col .seg.int { background: var(--internal); }
.trend-col .seg.out { background: var(--outbound); }
.trend-col .mo {
  margin-top: 3px;
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  flex-shrink: 0;
}

.trend-footnote {
  padding: 2px 12px 6px;
  font-size: 10px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── Detail pages ── */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 8px;
  flex-shrink: 0;
}
.page-head h2 { font-size: 16px; letter-spacing: 0.04em; }
.btn-back {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
}
.btn-back:hover { color: var(--text); }

.page-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.page-note.warn-text { color: var(--warn); }

.table-wrap {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-panel);
}
.table-wrap.wide { min-height: 0; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.data th {
  text-align: left;
  padding: 7px 10px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
}
table.data td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}
table.data tr:hover td { background: rgba(255,255,255,0.02); color: var(--text); }
table.data .code { font-family: var(--mono); color: var(--text); }
table.data .num { font-family: var(--mono); text-align: right; }

.badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid var(--border);
}
.badge.ok { color: var(--ok); border-color: rgba(74,154,120,0.4); background: var(--ok-bg); }
.badge.warn { color: var(--warn); border-color: rgba(196,160,53,0.4); background: var(--warn-bg); }

.status-flag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.status-flag.ok { color: var(--ok); border-color: rgba(74,154,120,0.4); background: var(--ok-bg); }
.status-flag.warn,
.status-flag.pending { color: var(--warn); border-color: rgba(196,160,53,0.4); background: var(--warn-bg); }
.status-flag.dim { color: var(--text-dim); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.detail-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.detail-card .lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.detail-card .val {
  margin-top: 4px;
  font-size: 18px;
  font-family: var(--mono);
  font-weight: 650;
}

.m360-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.m360-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
}
.m360-kv .k { color: var(--text-dim); }
.m360-kv .v { font-family: var(--mono); text-align: right; font-size: 11px; }

/* ── Material 360 operational canvas ── */
#page-material360.active {
  overflow: auto;
}
.m360-page-head {
  align-items: flex-start;
  gap: 12px;
}
.m360-page-titles h2 { margin: 0; }
.m360-page-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.m360-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}
.m360-select-wrap select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  min-width: 280px;
  text-transform: none;
  letter-spacing: 0;
}

.m360-canvas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

.m360-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: stretch;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.m360-code {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.m360-desc {
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 640px;
}
.m360-meta-line {
  margin-top: 8px;
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-dim);
}
.m360-meta-line strong {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 650;
}
.m360-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  align-content: center;
}
.m360-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  min-width: 0;
}
.m360-stat .ms-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}
.m360-stat .ms-v {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}
.m360-stat.tone-danger .ms-v { color: var(--danger); }
.m360-stat.tone-warn .ms-v { color: var(--warn); }
.m360-stat.tone-ok .ms-v { color: var(--ok); }

.m360-row {
  display: grid;
  gap: 8px;
  min-height: 0;
}
.m360-row-1 { grid-template-columns: 1.1fr 1.2fr 0.85fr; }
.m360-row-2 { grid-template-columns: 1fr; }
.m360-row-3 { grid-template-columns: 0.9fr 1.3fr; }

.m360-panel { min-height: 0; }
.m360-panel .panel-head { flex-shrink: 0; }

.m360-stock-hero {
  padding: 8px 14px 4px;
}
.m360-stock-hero .msh-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.m360-stock-hero .msh-value {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.m360-stock-hero .msh-value.warn {
  font-size: 22px;
  color: var(--warn);
}
.m360-stock-hero .msh-uom {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.m360-threshold-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 12px;
}
.m360-threshold {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}
.m360-threshold.dim { opacity: 0.55; }
.m360-threshold.below { border-color: rgba(196, 90, 74, 0.55); }
.m360-threshold.ok { border-color: rgba(74, 154, 120, 0.45); }
.m360-threshold.above { border-color: rgba(196, 160, 53, 0.55); }
.m360-threshold .th-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.m360-threshold .th-v {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}
.m360-threshold .th-h {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-muted);
}

.m360-note {
  padding: 0 12px 10px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.35;
}

.m360-loc-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 12px 6px;
}
.m360-loc-bar {
  display: grid;
  grid-template-columns: 40px 1fr 72px;
  gap: 8px;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
  width: 100%;
}
.m360-loc-bar.is-zero { opacity: 0.4; }
.m360-loc-bar:hover { opacity: 1; }
.m360-loc-bar .lb-code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
}
.m360-loc-bar .lb-track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.m360-loc-bar .lb-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.m360-loc-bar .lb-qty {
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  color: var(--text-muted);
}
.m360-loc-table { max-height: 150px; overflow: auto; padding: 0 8px 8px; }
.m360-loc-table .row-dim { opacity: 0.45; }
.partial-tag {
  font-size: 8px;
  color: var(--warn);
  letter-spacing: 0.04em;
}

.m360-action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 10px;
}
.m360-action-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  width: 100%;
}
.m360-action-card.high { border-left: 3px solid var(--danger); }
.m360-action-card.med { border-left: 3px solid var(--warn); }
.m360-action-card:hover { border-color: var(--accent); }
.m360-action-card .ac-title { font-size: 12px; font-weight: 650; }
.m360-action-card .ac-note { font-size: 10px; color: var(--text-muted); }

.m360-empty {
  margin: 12px;
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.m360-move-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 0 12px 8px;
}
.mk.oth .mk-v { color: var(--text-muted); }
.trend-legend .legend-hint {
  font-size: 9px;
  color: var(--warn);
  margin-left: 4px;
}
.mk {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.mk.wide { grid-column: span 2; }
.mk-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.mk-v {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}
.mk-v.sm { font-size: 12px; font-weight: 650; line-height: 1.3; }
.mk.in .mk-v { color: var(--inbound); }
.mk.int .mk-v { color: var(--internal); }
.mk.out .mk-v { color: var(--outbound); }

.m360-move-chart {
  padding: 0 12px;
  height: 140px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.m360-bars { flex: 1; min-height: 0; }
.m360-bars .stack-wrap {
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  min-height: 4px;
}
.m360-bars .stack {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
}
.m360-bars .seg.all { background: #3a4554; }
.trend-legend .l-all { background: #3a4554; }

.m360-proc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 12px 12px;
}

.m360-recent .table-wrap {
  max-height: 220px;
  overflow: auto;
  padding: 0 8px 8px;
}

.data.compact th,
.data.compact td {
  padding: 5px 8px;
  font-size: 11px;
}

.m360-secondary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
.m360-details {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.m360-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-muted);
  list-style: none;
}
.m360-details summary::-webkit-details-marker { display: none; }
.m360-details[open] summary { color: var(--text); margin-bottom: 8px; }
.m360-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.m360-ready-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 260px;
}
.m360-ready {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.m360-ready .mr-l {
  font-size: 11px;
  color: var(--text-muted);
}
.link-action.tight {
  padding: 4px 8px;
  font-size: 10px;
}

/* ── Location 360 ── */
.l360-canvas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
}
.l360-status { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
.l360-row-1 { grid-template-columns: 1fr 1fr 0.9fr; }
.l360-row-3 { grid-template-columns: 0.85fr 1.15fr; }

.l360-inv-hero { padding: 8px 14px 4px; }
.l360-inv-hero .msh-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.l360-inv-hero .msh-value {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
}
.l360-uom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
  padding: 8px 12px;
}
.l360-uom {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}
.l360-uom .th-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.l360-uom .th-v {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}
.l360-uom .th-h {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-muted);
}

.l360-health {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 10px 10px;
}
.l360-health-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  color: var(--text);
  width: 100%;
}
.l360-health-card.high { border-left: 3px solid var(--danger); }
.l360-health-card.med { border-left: 3px solid var(--warn); }
.l360-health-card:hover { border-color: var(--accent); }
.l360-health-card .attn-count {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}

.l360-flow {
  display: grid;
  grid-template-columns: 140px 24px minmax(0, 1fr) 24px 140px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}
.l360-flow-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
}
.l360-flow-node .fm-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 600;
}
.l360-flow-node .fm-value {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
}
.l360-flow-node .fm-hint { margin-top: 6px; font-size: 10px; color: var(--text-muted); }
.l360-flow-node.in .fm-value { color: var(--inbound); }
.l360-flow-node.out .fm-value { color: var(--outbound); }
.l360-flow-arrow {
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
}
.l360-flow-center {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.l360-sel { text-align: center; }
.l360-sel-code {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}
.l360-internal {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: var(--bg-panel);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}
.l360-int-side { text-align: center; }
.l360-int-side .mk-v { display: block; margin-top: 2px; font-size: 18px; }
.l360-int-mid {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-align: center;
}
.l360-cat-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.l360-routes { padding: 0 12px 8px; }
.l360-route-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.route-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 11px;
}
.route-chip em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 10px;
}

.l360-partial-banner {
  margin: 0 12px 8px;
  padding: 8px 10px;
  border: 1px solid rgba(196, 160, 53, 0.45);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
}
.l360-trend { height: 150px; }
.trend-legend .l-int2 { background: #2f7a5c; }
.m360-bars .seg.int2 { background: #2f7a5c; }

.l360-recent { max-height: 240px; overflow: auto; padding: 0 8px 8px; }
.l360-mat-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.l360-mat-tools input,
.l360-mat-tools select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: var(--radius);
  font-size: 12px;
}
.l360-mat-tools input { min-width: 160px; }
.l360-materials .table-wrap { max-height: 360px; overflow: auto; padding: 0 8px 8px; }

@media (max-width: 1400px) {
  .l360-row-1 { grid-template-columns: 1fr 1fr; }
  .l360-flow { grid-template-columns: 1fr; }
  .l360-flow-arrow { transform: rotate(0deg); }
}
@media (max-width: 1100px) {
  .l360-row-1,
  .l360-row-3 { grid-template-columns: 1fr; }
  .l360-cat-kpis { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1400px) {
  .m360-row-1 { grid-template-columns: 1fr 1fr; }
  .m360-action { grid-column: span 2; }
  .m360-status-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .m360-row-1,
  .m360-row-3,
  .m360-secondary { grid-template-columns: 1fr; }
  .m360-action { grid-column: auto; }
  .m360-move-kpis { grid-template-columns: repeat(3, 1fr); }
  .m360-hero-head { flex-direction: column; }
}

.selector-row {
  margin-bottom: 8px;
}
.selector-row select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: var(--radius);
  min-width: 280px;
}

/* ── Procurement Intelligence ── */
.proc-canvas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
}
.proc-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.proc-kpi-strip .mk.tone-warn .mk-v { color: var(--warn); }
.proc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.proc-filters label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.proc-filters select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  min-width: 120px;
  text-transform: none;
  letter-spacing: 0;
}
.proc-row-1 { grid-template-columns: 1fr 1.15fr; }
.proc-row-2 { grid-template-columns: 1.2fr 0.8fr; }

.proc-pipe {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 10px 12px;
  flex-wrap: wrap;
}
.proc-pipe-step {
  flex: 1;
  min-width: 110px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
}
.proc-pipe-step .pps-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.proc-pipe-step .pps-v {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
}
.proc-pipe-step .pps-h {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-muted);
}
.proc-pipe-arrow {
  display: flex;
  align-items: center;
  color: var(--text-dim);
  font-size: 14px;
}
.proc-link-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 12px 8px;
}
.proc-link-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.proc-link-card.ok { border-left: 3px solid var(--ok); }
.proc-link-card.warn { border-left: 3px solid var(--warn); }
.proc-link-card.dim { opacity: 0.85; }

.proc-action-table,
.proc-po-table,
.proc-sup-table,
.proc-detail-table {
  max-height: 280px;
  overflow: auto;
  padding: 0 8px 8px;
}
.proc-action-table { max-height: 320px; }
.proc-cur-totals {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  flex-wrap: wrap;
}
.proc-cur-totals .mk { min-width: 160px; }
.ctx { font-size: 10px; color: var(--text-muted); max-width: 180px; }
.link-action.tight.active {
  border-color: var(--accent);
  color: var(--text);
}
.proc-dq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.proc-dq { margin-top: 0; }

/* ── Movement Intelligence ── */
.mv-canvas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
}
.mv-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cov-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  background: var(--bg-panel);
}
.cov-pill.ok {
  color: var(--ok);
  border-color: rgba(74, 154, 120, 0.45);
  background: var(--ok-bg);
}
.cov-pill.warn {
  color: var(--warn);
  border-color: rgba(196, 160, 53, 0.45);
  background: var(--warn-bg);
}
.mv-balance {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.mv-balance.ok { color: var(--ok); }
.mv-balance.bad { color: var(--danger); }
.mv-filters select { min-width: 100px; }
.mv-kpis { grid-template-columns: repeat(6, 1fr); }
.mv-row-1 { grid-template-columns: 1.25fr 1fr; }
.mv-row-2 { grid-template-columns: 1.15fr 1fr; }
.mv-row-3 { grid-template-columns: 1fr 1fr; }
.mv-trend .trend-bars { min-height: 160px; }
.mv-flow-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 12px 4px;
}
.mv-route-block { padding: 6px 12px 8px; }
.mv-io-ranks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 12px 12px;
}
.mv-rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 12px;
}
.mv-rank-row:hover { color: var(--accent); }
.mv-invest { padding: 8px 12px 12px; }
.mv-detail { max-height: 360px; overflow: auto; padding: 0 8px 8px; }
.mv-loading { padding-bottom: 8px; }
table.data tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.linkish { cursor: pointer; color: var(--accent); }
.linkish:hover { text-decoration: underline; }

@media (max-width: 1400px) {
  .proc-kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .proc-row-1,
  .proc-row-2 { grid-template-columns: 1fr; }
  .proc-link-cards { grid-template-columns: 1fr 1fr; }
  .mv-kpis { grid-template-columns: repeat(3, 1fr); }
  .mv-row-1,
  .mv-row-2,
  .mv-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .proc-kpi-strip { grid-template-columns: 1fr 1fr; }
  .proc-dq-grid { grid-template-columns: 1fr; }
  .mv-kpis { grid-template-columns: 1fr 1fr; }
  .mv-flow-summary,
  .mv-io-ranks { grid-template-columns: 1fr; }
}

#page-inventory.active,
#page-transfers.active,
#page-outbound.active,
#page-consumption.active,
#page-risk.active,
#page-procurement.active,
#page-movement.active,
#page-governance.active,
#page-material360.active,
#page-location360.active {
  overflow: auto;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
}

/* ── Dedicated 70" TV Executive Wall Mode (face.png reference) ── */
#wallTv.wall-tv { display: none; }

body.wall-mode {
  overflow: hidden;
  background: #040b16;
}
body.wall-mode #app { display: none !important; }

body.wall-mode #wallTv.wall-tv {
  display: grid;
  grid-template-rows: auto auto minmax(170px, 0.95fr) minmax(140px, 0.85fr) minmax(130px, 0.9fr) auto;
  gap: 5px;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  padding: 6px 16px 4px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1000;
  color: #eef3f8;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  cursor: default;
}

.wall-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(28, 90, 150, 0.22), transparent 45%),
    radial-gradient(ellipse at 90% 85%, rgba(180, 78, 24, 0.12), transparent 40%),
    linear-gradient(180deg, #071427 0%, #040b16 70%);
}

.wall-head,
.wall-kpi-row,
.wall-hero,
.wall-mid,
.wall-lower,
.wall-foot {
  position: relative;
  z-index: 1;
  min-height: 0;
}

.wall-head {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr auto;
  align-items: center;
  gap: 12px;
}
.wall-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.wall-logo-wrap {
  background: #fff;
  border-radius: 3px;
  padding: 2px 3px;
  line-height: 0;
  flex-shrink: 0;
}
.wall-logo {
  display: block;
  height: 46px;
  width: auto;
}
.wall-titles h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: 0.05em;
  line-height: 1.05;
  color: #f5f8fc;
}
.wall-sub {
  margin: 2px 0 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #8fb0d0;
  font-weight: 600;
}
.wall-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7f97b0;
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 650;
  justify-content: center;
}
.wall-ksa {
  width: 42px;
  height: 34px;
  color: #6a849e;
  flex-shrink: 0;
}
.wall-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.wall-meta-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(8, 18, 34, 0.82);
  border: 1px solid rgba(120, 160, 200, 0.16);
}
.wm-k {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #7f97b0;
  font-weight: 650;
}
.wm-v {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e8eef6;
}
.wm-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6fc49a;
}
.wm-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ad08a;
  box-shadow: 0 0 8px rgba(74, 208, 138, 0.7);
}
.wall-cov {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(8, 18, 34, 0.82);
  border: 1px solid rgba(196, 160, 53, 0.32);
}
.wc-full {
  font-size: 11px;
  font-weight: 700;
  color: #6fc49a;
}
.wc-part {
  font-size: 10px;
  color: #d6b45a;
  font-weight: 600;
}
.wall-exit {
  border: 1px solid rgba(240, 122, 42, 0.55);
  background: rgba(240, 122, 42, 0.16);
  color: #ffe0c8;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.wall-exit:hover {
  background: rgba(240, 122, 42, 0.3);
}

.wall-kpi-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  align-items: stretch;
  max-height: 72px;
}
.wall-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
}
.wall-kpi {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  background: rgba(8, 20, 38, 0.78);
  border: 1px solid rgba(120, 160, 200, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 0;
}
.wall-kpi:hover {
  border-color: rgba(240, 122, 42, 0.55);
  background: rgba(14, 30, 52, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.wall-kpi .wk-ico {
  width: 26px;
  height: 26px;
  color: #7eb0d8;
  grid-row: 1 / span 2;
}
.wall-kpi .wk-v {
  font-size: 28px;
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #f4f7fb;
}
.wall-kpi .wk-l {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8fb0d0;
}
.wall-kpi .wk-go {
  grid-row: 1 / span 2;
  color: #7f97b0;
  font-size: 16px;
  font-weight: 300;
}
.wall-kpi.emphasis {
  border-color: rgba(220, 80, 70, 0.7);
  background: linear-gradient(160deg, rgba(180, 50, 45, 0.28), rgba(8, 18, 34, 0.9));
  box-shadow: 0 0 0 1px rgba(220, 80, 70, 0.2);
}
.wall-kpi.emphasis .wk-v,
.wall-kpi.emphasis .wk-ico,
.wall-kpi.emphasis .wk-go { color: #ff9a8a; }
.wall-kpi.emphasis .wk-l { color: #ffc4b8; }
.wall-kpi.danger .wk-v,
.wall-kpi.danger .wk-ico { color: #ef8576; }
.wall-kpi.warn .wk-v,
.wall-kpi.warn .wk-ico { color: #f0c14a; }

.wall-safe-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  padding: 4px 2px;
  border-radius: 6px;
  border: 1px solid rgba(240, 122, 42, 0.45);
  background: linear-gradient(180deg, rgba(180, 78, 24, 0.32), rgba(40, 24, 10, 0.55));
  overflow: hidden;
}
.wall-safe-rail span {
  font-size: 7px;
  letter-spacing: 0.05em;
  font-weight: 750;
  color: #ffc48a;
  text-align: center;
  line-height: 1.1;
}

/* Continuous panoramic hero — blended zones, not four cards */
.wall-hero {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(140, 180, 220, 0.2);
  min-height: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.wall-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 12, 24, 0.35) 0%, transparent 8%, transparent 92%, rgba(4, 12, 24, 0.35) 100%),
    linear-gradient(180deg, rgba(4, 12, 24, 0.25) 0%, transparent 28%, transparent 55%, rgba(4, 12, 24, 0.72) 100%);
}
.wall-hero-panorama {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
  min-height: 0;
  gap: 0;
}
.wall-zone {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #0a1628;
  text-align: left;
  color: #fff;
  min-height: 0;
  transition: filter 0.15s ease, transform 0.15s ease;
  isolation: isolate;
}
.wall-zone .wz-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.wall-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 18, 34, 0.12) 0%, rgba(6, 18, 34, 0.05) 40%, rgba(4, 12, 24, 0.62) 100%),
    linear-gradient(90deg, rgba(4, 12, 24, 0.45) 0%, transparent 14%, transparent 86%, rgba(4, 12, 24, 0.4) 100%);
}
.wall-zone + .wall-zone {
  margin-left: -12px;
  padding-left: 12px;
  box-shadow: inset 28px 0 36px -18px rgba(4, 12, 24, 0.85);
}
.wall-zone::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 32%;
  right: 0;
  width: 2px;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(110, 180, 224, 0.45), transparent);
  clip-path: polygon(0 0, 100% 10%, 100% 90%, 0 100%);
  pointer-events: none;
}
.wall-zone:last-child::after { display: none; }
.wall-zone:hover {
  filter: brightness(1.1);
  z-index: 1;
}
.wall-zone:hover .wz-title { color: #ffd2ad; }
.wz-title,
.wz-sub {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 2;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
.wz-title {
  bottom: 30px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.14em;
}
.wz-sub {
  bottom: 12px;
  font-size: 11px;
  color: #c5d6e8;
  font-weight: 550;
}
.wall-hero-script {
  position: absolute;
  right: 18px;
  top: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 16px;
  color: rgba(230, 240, 250, 0.58);
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 3;
}

.wall-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 7px;
  min-height: 0;
}
.wall-glass {
  background: rgba(7, 16, 30, 0.8);
  border: 1px solid rgba(120, 160, 200, 0.18);
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
}
.wall-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px 0;
}
.wall-sec-head.tight { padding-bottom: 0; }
.wall-sec-head h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 750;
  color: #d7e6f5;
}
.wall-sec-sub {
  font-size: 10px;
  color: #7f97b0;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.wall-flow-card { display: flex; flex-direction: column; min-height: 0; }
.wall-flow-row {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 10px;
  align-items: stretch;
  padding: 2px 10px 6px;
  min-height: 0;
}
.wall-flow {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.wall-flow-step {
  text-align: center;
  padding: 6px 8px 7px;
  border-radius: 7px;
  background: rgba(12, 28, 48, 0.72);
  border: 1px solid rgba(120, 160, 200, 0.2);
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: visible;
}
.wall-flow-step:hover {
  border-color: rgba(240, 122, 42, 0.5);
  background: rgba(16, 34, 56, 0.92);
}
.wall-flow-step .wf-ico {
  width: 22px;
  height: 22px;
  margin: 0 auto 2px;
  display: block;
}
.wall-flow-step .wf-v {
  display: block;
  font-size: 38px;
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wall-flow-step .wf-l {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #9db6ce;
  line-height: 1.2;
}
.wall-flow-step .wf-h {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #6f8399;
  font-weight: 550;
  line-height: 1.25;
  white-space: normal;
}
.wall-flow-step.in .wf-v,
.wall-flow-step.in .wf-ico { color: #6eb4e0; }
.wall-flow-step.int .wf-v,
.wall-flow-step.int .wf-ico { color: #6fc49a; }
.wall-flow-step.out .wf-v,
.wall-flow-step.out .wf-ico { color: #f07a2a; }
.wall-flow-arrow {
  font-size: 26px;
  color: rgba(110, 180, 224, 0.55);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}

.wall-total-events {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(10, 24, 42, 0.9);
  border: 1px solid rgba(120, 160, 200, 0.3);
  border-left: 3px solid #6eb4e0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: visible;
}
.wall-total-events:hover {
  border-color: rgba(110, 180, 224, 0.65);
  box-shadow: 0 0 0 1px rgba(110, 180, 224, 0.18);
}
.wall-total-events .wt-k {
  font-size: 8px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #7f97b0;
}
.wall-total-events .wt-v {
  font-size: 30px;
  font-weight: 780;
  color: #e8eef6;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.wall-total-events .wt-l {
  font-size: 10px;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: #8fb0d0;
  max-width: 12em;
  line-height: 1.25;
}
.wall-total-events .wt-h {
  font-size: 9px;
  color: #6f8399;
  line-height: 1.25;
  max-width: 14em;
  white-space: normal;
}

.wall-attn-card { display: flex; flex-direction: column; min-height: 0; }
.wall-attn-list {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
  padding: 4px 8px 8px;
  min-height: 0;
}
.wall-attn-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(12, 28, 48, 0.62);
  border: 1px solid rgba(120, 160, 200, 0.16);
  border-left: 3px solid #c4a035;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.wall-attn-item:hover {
  border-color: rgba(240, 122, 42, 0.5);
  background: rgba(16, 34, 56, 0.9);
}
.wall-attn-item.high { border-left-color: #ef8576; }
.wall-attn-item .wa-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wall-attn-item .wa-ico {
  width: 16px;
  height: 16px;
  color: #c4a035;
  flex-shrink: 0;
}
.wall-attn-item.high .wa-ico { color: #ef8576; }
.wall-attn-item .wa-t {
  font-size: 11px;
  font-weight: 650;
  color: #d7e6f5;
}
.wall-attn-item .wa-n {
  font-size: 22px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  color: #ffb074;
  line-height: 1;
}

.wall-lower {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 1.15fr;
  gap: 7px;
  min-height: 0;
}
.wall-trend {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: calc(100% - 8px);
  min-height: 96px;
  max-height: 130px;
  padding: 2px 10px 8px;
}
.wall-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 3px;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px;
  transition: background 0.15s ease;
}
.wall-bar-col:hover { background: rgba(240, 122, 42, 0.1); }
.wall-bar {
  width: 100%;
  max-width: 42px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #4a9fd4 0%, #1a4f7a 100%);
  min-height: 4px;
}
.wall-bar-n {
  font-size: 11px;
  font-weight: 700;
  color: #b8c9db;
  font-variant-numeric: tabular-nums;
}
.wall-bar-m {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #7f97b0;
}

.wall-cat {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 10px 10px;
  height: calc(100% - 6px);
}
.wall-donut-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}
.wall-donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wall-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.wall-donut-center strong {
  font-size: 14px;
  font-weight: 780;
  line-height: 1;
}
.wall-donut-center span {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #7f97b0;
  font-weight: 650;
}
.wall-cat-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wall-cat-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 4px;
}
.wall-cat-row:hover { background: rgba(240, 122, 42, 0.1); }
.wall-cat-row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.wall-cat-row .n {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #e8eef6;
}
.wall-cat-row .l { color: #9db6ce; font-weight: 600; }

.wall-top {
  padding: 2px 8px 8px;
  overflow: hidden;
  height: calc(100% - 4px);
}
.wall-top table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.wall-top th {
  text-align: left;
  color: #7f97b0;
  font-weight: 650;
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 2px 4px 4px;
  border-bottom: 1px solid rgba(120, 160, 200, 0.15);
}
.wall-top td {
  padding: 4px;
  border-bottom: 1px solid rgba(120, 160, 200, 0.08);
  color: #d7e6f5;
}
.wall-top tr {
  cursor: pointer;
}
.wall-top tr:hover td { background: rgba(240, 122, 42, 0.08); }
.wall-top .code { font-family: Consolas, monospace; color: #9ec4e4; }
.wall-top .num { text-align: right; font-variant-numeric: tabular-nums; }
.wall-top .iss-ss { color: #ef8576; font-weight: 650; }
.wall-top .iss-rop { color: #f0c14a; font-weight: 650; }
.wall-top .iss-neg { color: #ef8576; font-weight: 650; }
.wall-top .st { color: #8fb0d0; font-size: 10px; }
.wall-top-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  height: 100%;
}

.wall-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
  flex-shrink: 0;
}
.wall-pillars {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.wall-pillars span {
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #6f8399;
}
.wall-foot-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.wall-foot-right em {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(200, 220, 240, 0.45);
}
.wall-foot-right span {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #5f7388;
  font-weight: 650;
}

.btn-return-wall {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  border: 1px solid rgba(240, 122, 42, 0.6);
  background: rgba(12, 28, 48, 0.95);
  color: #ffd2ad;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn-return-wall:hover { background: rgba(240, 122, 42, 0.22); }
body.wall-mode .btn-return-wall { display: none !important; }

@media (max-width: 1400px) {
  .overview-body { grid-template-columns: 1fr 260px; }
  .peer-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1100px) {
  html, body { overflow: auto; }
  .exec-canvas { height: auto; max-height: none; overflow: visible; }
  .overview-body { grid-template-columns: 1fr; }
  .overview-footer-row { grid-template-columns: 1fr; max-height: none; }
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .flow-exec { grid-template-columns: 1fr; }
  .flow-connector { display: none; }
  .peer-grid { grid-template-columns: repeat(3, 1fr); }
  .m360-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Material Planning & PR Control (page-only redesign) ── */
.plan-canvas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding-bottom: 4px;
}
#page-planning.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
#page-planning .m360-page-head { flex-shrink: 0; }
#page-planning .plan-canvas { flex: 1; min-height: 0; }

.plan-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  flex-shrink: 0;
}
.plan-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin: 0 0 2px;
}
.plan-section-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.plan-band {
  flex-shrink: 0;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}
.plan-band-proc {
  border-bottom: none;
  margin-bottom: 4px;
}
.plan-kpi-strip-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.plan-kpi-strip-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.plan-kpi-strip-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
}
.plan-kpi.tone-exposure {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.06);
}
.plan-kpi.tone-ok .plan-kpi-v {
  color: #86efac;
}
.plan-data-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  font-size: 11px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius);
  padding: 6px 10px;
  margin: 4px 0 8px;
  flex-shrink: 0;
}
.plan-data-gap strong {
  letter-spacing: 0.04em;
  font-size: 10px;
}
.plan-data-gap-sec {
  color: var(--text-muted);
  margin-left: auto;
}
.plan-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.plan-filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.plan-filter-bar select {
  min-width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: inherit;
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 11px;
}
.plan-table .col-mat {
  width: 88px;
  white-space: nowrap;
}
.plan-table .col-desc {
  min-width: 180px;
  max-width: 280px;
}
.plan-table th.num,
.plan-table td.num {
  text-align: right;
  white-space: nowrap;
}
.plan-kpi {
  background: var(--bg-kpi);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px 6px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color 0.12s, background 0.12s;
  min-height: 54px;
}
.plan-kpi:hover,
.plan-kpi.is-active {
  border-color: var(--accent);
  background: var(--bg-elevated);
}
.plan-kpi-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 650;
}
.plan-kpi-v {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.plan-kpi.tone-danger .plan-kpi-v { color: var(--danger); }
.plan-kpi.tone-warn .plan-kpi-v { color: var(--warn); }

.plan-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 22px;
}
.plan-filter-label {
  font-size: 11px;
  color: var(--text-muted);
}
.plan-filter-label strong { color: var(--text); font-weight: 650; }
.plan-noaction-chip {
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
  font-family: var(--font);
}
.plan-noaction-chip em {
  font-style: normal;
  font-family: var(--mono);
  color: var(--text);
  margin-left: 4px;
  font-weight: 700;
}
.plan-noaction-chip.is-active {
  border-color: var(--accent);
  color: var(--text);
}

.plan-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 8px;
  flex-shrink: 0;
  min-height: 0;
}
.plan-timeline-panel,
.plan-selected-panel {
  min-height: 0;
}
.plan-timeline {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 8px 12px 12px;
}
.plan-tl-arrow {
  display: flex;
  align-items: center;
  color: var(--text-dim);
  font-size: 14px;
  padding: 0 2px;
  flex-shrink: 0;
}
.plan-tl-stage {
  flex: 1;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  color: inherit;
  font: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.plan-tl-stage:hover,
.plan-tl-stage.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.plan-tl-name {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.plan-tl-count {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.plan-sel-head {
  padding: 0 12px 6px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.plan-sel-code {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.plan-sel-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}
.plan-sel-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 8px;
}
.plan-hi {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.plan-hi-l {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 650;
}
.plan-hi-v {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}
.plan-hi-v.is-req { color: var(--warn); font-size: 13px; }
.plan-hi-v.action { color: var(--inbound); font-size: 13px; letter-spacing: 0.02em; }

.plan-sel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  padding: 0 12px 8px;
}
.plan-sel-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border-soft);
}
.plan-sel-grid .k {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.plan-sel-grid .v {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}
.plan-missing {
  margin: 0 12px 10px;
  padding: 6px 8px;
  border: 1px solid rgba(196, 160, 53, 0.35);
  background: var(--warn-bg);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--warn);
}
.plan-missing-l {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 6px;
}

.plan-trend-panel {
  flex: 0 0 auto;
  min-height: 0;
}
.plan-trend-body { padding: 0 12px 8px; }
.plan-trend-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.plan-trend-legend .sw {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 1px;
}
.plan-trend-legend .sw.proj { background: var(--inbound); }
.plan-trend-legend .sw.ss { background: var(--warn); }
.plan-trend-legend .sw.buf { background: var(--accent); }
.plan-trend-limit {
  margin-left: auto;
  color: var(--warn);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.plan-trend-svg {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.plan-trend-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.plan-table-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.plan-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 0 8px 8px;
}
.plan-table th,
.plan-table td {
  white-space: nowrap;
  font-size: 11px;
}
.plan-table tr.is-selected td {
  background: var(--accent-soft);
}
.plan-table tr[data-mat] { cursor: pointer; }
.plan-action-pill {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--text);
}

@media (max-width: 1400px) {
  .plan-mid { grid-template-columns: 1fr; }
  .plan-kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .plan-kpi-strip-4 { grid-template-columns: repeat(2, 1fr); }
  .plan-kpi-strip-7 { grid-template-columns: repeat(4, 1fr); }
  .plan-kpi-strip-3 { grid-template-columns: repeat(3, 1fr); max-width: none; }
}

/* Mobile executive WALL — desktop WALL rules remain unchanged. */
.wall-mobile-command,
.wall-mobile-priority {
  display: none;
}

@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.wall-mode {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.wall-mode #wallTv.wall-tv {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 100dvh;
    padding: 10px 10px 24px;
    gap: 10px;
    overflow: visible;
  }

  body.wall-mode .wall-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(120, 160, 200, 0.18);
  }

  body.wall-mode .wall-brand {
    flex: 1;
    min-width: 0;
    gap: 0;
  }

  body.wall-mode .wall-logo-wrap,
  body.wall-mode .wall-tagline,
  body.wall-mode .wall-sub,
  body.wall-mode .wall-head-meta .wall-meta-block,
  body.wall-mode .wall-cov {
    display: none !important;
  }

  body.wall-mode .wall-titles {
    min-width: 0;
  }

  body.wall-mode .wall-titles h1 {
    max-width: 270px;
    font-size: 17px;
    line-height: 1.12;
    letter-spacing: 0.045em;
    white-space: normal;
  }

  body.wall-mode .wall-head-meta {
    flex: 0 0 auto;
    gap: 0;
  }

  body.wall-mode .wall-exit {
    min-width: 72px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 12px;
    touch-action: manipulation;
  }

  body.wall-mode .wall-mobile-command {
    display: grid;
    position: relative;
    z-index: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .wall-mobile-period {
    display: flex;
    min-height: 44px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 7px 10px;
    border: 1px solid rgba(110, 180, 224, 0.3);
    border-radius: 8px;
    background: rgba(8, 20, 38, 0.9);
    min-width: 0;
  }

  .wall-mobile-period span {
    color: #7f97b0;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.1em;
  }

  .wall-mobile-period strong {
    color: #eef5fc;
    font-size: 14px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .wall-mobile-menu {
    position: relative;
    z-index: 20;
  }

  .wall-mobile-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(240, 122, 42, 0.55);
    border-radius: 8px;
    background: rgba(240, 122, 42, 0.14);
    color: #ffe0c8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    list-style: none;
    touch-action: manipulation;
  }

  .wall-mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .wall-mobile-menu[open] {
    grid-column: 1 / -1;
    width: 100%;
  }

  .wall-mobile-menu[open] summary {
    margin-left: auto;
    margin-bottom: 8px;
  }

  .wall-mobile-menu nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(120, 160, 200, 0.24);
    border-radius: 10px;
    background: rgba(7, 16, 30, 0.98);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  }

  .wall-mobile-menu nav button {
    min-width: 0;
    min-height: 46px;
    padding: 8px;
    border: 1px solid rgba(120, 160, 200, 0.25);
    border-radius: 7px;
    background: rgba(12, 28, 48, 0.9);
    color: #e7eff8;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
  }

  body.wall-mode .wall-mobile-priority {
    display: flex;
    position: relative;
    z-index: 1;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 12px;
  }

  .wall-mobile-section {
    min-width: 0;
  }

  .wall-mobile-section > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
  }

  .wall-mobile-section > header h2 {
    margin: 0;
    color: #dce9f6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
  }

  .wall-mobile-section > header span {
    color: #7f97b0;
    font-size: 10px;
    text-align: right;
  }

  .wall-mobile-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .wall-mobile-kpi {
    display: flex;
    min-width: 0;
    min-height: 82px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid rgba(120, 160, 200, 0.24);
    border-left: 4px solid #6eb4e0;
    border-radius: 9px;
    background: rgba(9, 22, 40, 0.9);
    color: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
  }

  .wall-mobile-kpi span {
    color: #f3f7fb;
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .wall-mobile-kpi strong {
    color: #a9bfd4;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0.055em;
    overflow-wrap: anywhere;
  }

  .wall-mobile-kpi-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .wall-mobile-kpi.critical {
    border-left-color: #ef6658;
    background: linear-gradient(145deg, rgba(150, 36, 35, 0.28), rgba(9, 22, 40, 0.94));
  }

  .wall-mobile-kpi.critical span { color: #ff9a8a; }
  .wall-mobile-kpi.high { border-left-color: #f08a45; }
  .wall-mobile-kpi.high span { color: #ffb074; }
  .wall-mobile-kpi.watch { border-left-color: #f0c14a; }
  .wall-mobile-kpi.watch span { color: #f5cf68; }
  .wall-mobile-kpi.action { border-left-color: #a88ee8; }
  .wall-mobile-kpi.action span { color: #c7b8f4; }
  .wall-mobile-kpi.flow { border-left-color: #6eb4e0; }
  .wall-mobile-kpi.flow span { color: #8bc8ed; }
  .wall-mobile-kpi.warn { border-left-color: #f0c14a; }
  .wall-mobile-kpi.warn span { color: #f5cf68; }

  .wall-mobile-critical-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .wall-mobile-critical-row {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(239, 102, 88, 0.34);
    border-left: 4px solid #ef6658;
    border-radius: 9px;
    background: rgba(20, 24, 38, 0.94);
    color: #eaf1f8;
    font: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
  }

  .wmc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .wmc-head strong {
    color: #ffffff;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 17px;
    letter-spacing: 0.025em;
  }

  .wmc-head em {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(239, 102, 88, 0.16);
    color: #ff9a8a;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .wmc-desc {
    color: #c8d7e6;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .wmc-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
    color: #7f97b0;
    font-size: 10px;
  }

  .wmc-facts > span:last-child {
    grid-column: 1 / -1;
  }

  .wmc-facts strong {
    display: block;
    margin-top: 1px;
    color: #e7eff8;
    font-size: 11px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .wmc-reason {
    color: #a9bfd4;
    font-size: 10px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.wall-mode .wall-kpi-row,
  body.wall-mode .wall-hero,
  body.wall-mode .wall-mid,
  body.wall-mode .wall-lower,
  body.wall-mode .wall-foot {
    display: none !important;
  }
}
