/* FirmOps — sector-radar continuity (light grey + gold + Dodai red) */

@import url("../dodai-product-theme.css");

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #d8d8d8;
  color: var(--sr-ink);
  font-family: var(--sr-font);
}

.stage {
  max-width: 1480px;
  margin: 1rem auto;
  padding: 0 0.75rem 1.25rem;
}

.window {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: #f0f0f0;
  border: 1px solid var(--sr-border);
  border-bottom: 0;
  border-radius: 0.55rem 0.55rem 0 0;
}

.traffic {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #c0c0c0;
}

.traffic:nth-child(1) { background: #e57373; }
.traffic:nth-child(2) { background: #facc15; }
.traffic:nth-child(3) { background: #81c784; }

.window-title {
  margin-left: 0.5rem;
  color: var(--sr-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.app {
  display: grid;
  grid-template-columns: 15.5rem 1fr;
  min-height: 860px;
  background: var(--sr-bg);
  border: 1px solid var(--sr-border);
  border-radius: 0 0 0.55rem 0.55rem;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.sidebar {
  background: #f0f0f0;
  border-right: 1px solid var(--sr-border);
  padding: 1.15rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.side-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.side-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: #111;
  color: var(--sr-accent);
  font-weight: 700;
  font-size: 0.82rem;
  border-left: 3px solid var(--sr-accent);
}

.side-brand strong { display: block; font-size: 0.95rem; }
.side-brand small { color: var(--sr-muted); font-size: 0.72rem; }

.side-nav { display: grid; gap: 0.2rem; }

.side-nav a {
  color: var(--sr-muted);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 500;
}

.side-nav a.active,
.side-nav a:hover {
  background: var(--sr-accent-soft);
  border-left: 3px solid var(--sr-accent);
  color: var(--sr-ink);
  font-weight: 600;
}

.side-foot { margin-top: auto; display: grid; gap: 0.4rem; }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--sr-border);
  color: var(--sr-ink);
}

.muted { color: var(--sr-muted); font-size: 0.72rem; }

.main { padding: 1.1rem 1.25rem 1.4rem; background: var(--sr-bg); }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.crumb {
  margin: 0 0 0.2rem;
  color: var(--sr-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.select-like {
  font-size: 0.85rem;
  color: var(--sr-muted);
  border: 1px solid var(--sr-border-strong);
  background: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: 5px;
}

.btn {
  border: 1px solid var(--sr-border-strong);
  border-radius: 5px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.48rem 0.85rem;
  cursor: default;
  color: var(--sr-ink);
  background: linear-gradient(180deg, #f8f8f8 0%, #e2e2e2 100%);
}

.btn.primary {
  background: var(--sr-brand);
  border-color: var(--sr-brand);
  color: #fff;
  font-weight: 600;
}

.btn.ghost {
  background: linear-gradient(180deg, #f8f8f8 0%, #e2e2e2 100%);
}

.btn.sm { padding: 0.35rem 0.65rem; font-size: 0.78rem; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.kpi {
  background: var(--sr-panel);
  border: 1px solid var(--sr-border);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
}

.kpi.warn {
  border-left: 3px solid var(--sr-accent);
  background: var(--sr-accent-soft);
}

.kpi-label { margin: 0; color: var(--sr-muted); font-size: 0.78rem; }

.kpi-value {
  margin: 0.3rem 0 0.15rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi-value span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sr-muted);
}

.kpi-hint { margin: 0; font-size: 0.78rem; color: var(--sr-muted); }
.kpi-hint.up { color: var(--sr-ok); font-weight: 600; }

.grid-main {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.grid-lower {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 0.8rem;
}

.panel {
  background: var(--sr-panel);
  border: 1px solid var(--sr-border);
  border-radius: 4px;
  padding: 0.9rem 1rem 1rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}

.panel-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.panel-head p {
  margin: 0;
  color: var(--sr-muted);
  font-size: 0.82rem;
  max-width: 40rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.85rem;
  font-size: 0.75rem;
  color: var(--sr-muted);
}

.swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: -1px;
}

.swatch.mc { background: var(--sr-chart-a); }
.swatch.mr { background: var(--sr-chart-b); }
.swatch.opt { background: var(--sr-accent); }

.chart-wrap {
  background: var(--sr-bg);
  border-radius: 4px;
  border: 1px solid var(--sr-border);
  padding: 0.35rem;
}

.curve-chart { width: 100%; height: auto; display: block; }

.grid line { stroke: #d8d8d8; stroke-width: 1; }

.axis-label, .tick {
  fill: #777;
  font-size: 11px;
  font-family: var(--sr-font);
}

.line-mc { stroke: var(--sr-chart-a); stroke-width: 2.5; }
.line-mr { stroke: var(--sr-chart-b); stroke-width: 2.5; }

.guide {
  stroke: var(--sr-accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.opt-dot { fill: var(--sr-accent); stroke: #111; stroke-width: 1; }
.opt-ring {
  fill: none;
  stroke: var(--sr-accent);
  stroke-width: 1.5;
  opacity: 0.7;
}

.callout-bg { fill: #fff; stroke: var(--sr-border-strong); }
.callout {
  fill: #111;
  font-size: 12px;
  font-family: var(--sr-mono);
  font-weight: 500;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--sr-border);
  background: #ecfdf3;
  color: var(--sr-ok);
}

.staff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.staff-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
}

.staff-meta span {
  color: var(--sr-muted);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 0.45rem;
  background: #e2e2e2;
  border-radius: 2px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--sr-brand);
  border-radius: 2px;
}

.bar.soft span { background: #9ca3af; }

.panel-note {
  margin: 1rem 0 0;
  color: var(--sr-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th {
  text-align: left;
  color: var(--sr-muted);
  font-weight: 600;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--sr-border);
  background: var(--sr-bg-2);
}

.data-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #e4e4e4;
  font-variant-numeric: tabular-nums;
}

.data-table tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}

.tag.ok { background: #ecfdf3; color: var(--sr-ok); }
.tag.warn { background: var(--sr-accent-soft); color: var(--sr-warn); }
.tag.alert { background: #fee2e2; color: var(--sr-alert); }

.insight-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  counter-reset: insight;
}

.insight-list li {
  position: relative;
  padding: 0.8rem 0.85rem 0.8rem 2.55rem;
  background: var(--sr-bg);
  border: 1px solid var(--sr-border);
  border-radius: 4px;
}

.insight-list li::before {
  counter-increment: insight;
  content: counter(insight);
  position: absolute;
  left: 0.7rem;
  top: 0.85rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 4px;
  background: #111;
  color: var(--sr-accent);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.insight-list strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.insight-list span {
  color: var(--sr-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .kpi-row,
  .grid-main,
  .grid-lower { grid-template-columns: 1fr; }
}
