/* ════════ Boardroom theme — an operations dashboard ════════ */

.br-page {
  --br-surface: #ffffff;
  --br-bg: #f4f6f8;
  --br-side: #16202b;
  --br-side-2: #0f1721;
  --br-ink: #16202b;
  --br-ink-2: #55616e;
  --br-ink-3: #8794a1;
  --br-line: #e2e7ec;
  --br-accent: #2a78d6;
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;

  position: relative;
  min-height: 100%;
  display: flex;
  background: var(--br-bg);
  color: var(--br-ink);
  font-family: var(--ui);
  font-size: 13.5px;
  line-height: 1.5;
}
.br-page a { color: inherit; text-decoration: none; cursor: pointer; }
.br-page .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── sidebar ── */
.br-side {
  flex: 0 0 auto;
  width: 196px;
  background: var(--br-side);
  color: #d6dee6;
  display: flex;
  flex-direction: column;
  padding: 14px 0 12px;
}
.br-logo { display: flex; align-items: center; gap: 9px; padding: 0 16px 16px; font-size: 15px; }
.br-logo span { color: var(--br-accent); font-size: 17px; }
.br-logo b { letter-spacing: 0.02em; color: #fff; }
.br-side nav { display: flex; flex-direction: column; gap: 1px; }
.br-side nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px;
  color: #97a5b3;
  border-left: 3px solid transparent;
  transition: background 0.14s ease, color 0.14s ease;
}
.br-side nav a i { font-style: normal; width: 15px; text-align: center; opacity: 0.85; }
.br-side nav a:hover { background: rgba(255, 255, 255, 0.05); color: #e6edf3; }
.br-side nav a.is-on { background: rgba(42, 120, 214, 0.16); color: #fff; border-left-color: var(--br-accent); }
.br-side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 0;
  font-size: 12px;
  color: #8593a1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.br-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.br-dot.good { background: #1e7a4d; box-shadow: 0 0 0 3px rgba(30, 122, 77, 0.22); }
.br-dot.serious { background: #b4501b; box-shadow: 0 0 0 3px rgba(180, 80, 27, 0.22); animation: br-pulse 1.6s ease-in-out infinite; }
@keyframes br-pulse { 50% { box-shadow: 0 0 0 6px rgba(180, 80, 27, 0.08); } }

/* ── top bar ── */
.br-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.br-top {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--br-surface);
  border-bottom: 1px solid var(--br-line);
}
.br-search { flex: 1 1 auto; max-width: 380px; position: relative; }
.br-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--br-ink-3); }
.br-search input {
  width: 100%;
  font: inherit;
  padding: 7px 12px 7px 28px;
  border: 1px solid var(--br-line);
  border-radius: 5px;
  background: #fafbfc;
  color: inherit;
}
.br-search input:focus { outline: 2px solid rgba(42, 120, 214, 0.4); outline-offset: -1px; background: #fff; }
.br-env { margin-left: auto; }
.br-pill {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eaf2fc;
  color: #1c5fab;
  border: 1px solid #cfe0f5;
}
.br-acct { display: flex; align-items: center; gap: 9px; }
.br-avatar {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--br-side);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}
.br-acct-n { font-size: 12.5px; line-height: 1.25; }
.br-acct-n em { display: block; font-style: normal; font-size: 11px; color: var(--br-ink-3); }

/* ── sections ── */
.br-body { flex: 1 1 auto; }
.br-sec { padding: 20px clamp(14px, 2vw, 24px) 24px; scroll-margin-top: 58px; }
.br-alt { background: #eef1f4; border-block: 1px solid var(--br-line); }
.br-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.br-sec-head h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.br-sec-head p { font-size: 12.5px; color: var(--br-ink-2); margin-top: 2px; }

.br-ranges { display: flex; border: 1px solid var(--br-line); border-radius: 6px; overflow: hidden; background: var(--br-surface); }
.br-ranges button {
  font: inherit;
  font-size: 12.5px;
  padding: 6px 13px;
  border: 0;
  border-right: 1px solid var(--br-line);
  background: none;
  color: var(--br-ink-2);
  cursor: pointer;
}
.br-ranges button:last-child { border-right: 0; }
.br-ranges button:hover { background: #f3f6f9; color: var(--br-ink); }
.br-ranges button.is-on { background: var(--br-side); color: #fff; }

/* ── KPI tiles ── */
.br-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.br-kpi {
  position: relative;
  background: var(--br-surface);
  border: 1px solid var(--br-line);
  border-radius: 7px;
  padding: 13px 14px 8px;
  overflow: hidden;
}
.br-kpi-l { font-size: 12px; color: var(--br-ink-2); }
.br-kpi-v { font-size: 25px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 3px 0 2px; }
.br-kpi-v.tickd { animation: br-tick 0.32s ease-out; }
@keyframes br-tick { from { background: rgba(42, 120, 214, 0.16); } }
.br-kpi-d { font-size: 12px; font-variant-numeric: tabular-nums; }
.br-kpi-d.up { color: #1e7a4d; }
.br-kpi-d.down { color: #b4501b; }
.br-kpi-d em { font-style: normal; color: var(--br-ink-3); margin-left: 5px; }
.br-spark { display: block; width: 100%; height: 30px; margin-top: 6px; opacity: 0.85; }

/* ── cards & charts ── */
.br-charts { display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; }
.br-card {
  background: var(--br-surface);
  border: 1px solid var(--br-line);
  border-radius: 7px;
  padding: 13px 15px 15px;
  min-width: 0;
}
.br-card figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.br-card h2 { font-size: 14px; font-weight: 600; }
.br-card figcaption p { font-size: 12px; color: var(--br-ink-2); }

.br-legend { display: flex; gap: 4px; flex-wrap: wrap; }
.br-legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  padding: 3px 9px;
  border: 1px solid var(--br-line);
  border-radius: 999px;
  background: none;
  color: var(--br-ink-2);
  cursor: pointer;
}
.br-legend button i { width: 9px; height: 9px; border-radius: 2px; display: block; }
.br-legend button:hover { border-color: var(--br-ink-3); color: var(--br-ink); }
.br-legend button.is-off { opacity: 0.42; }
.br-legend button.is-off i { filter: grayscale(1); }

.br-plot { position: relative; }
.br-svg { display: block; width: 100%; height: 220px; overflow: visible; }
.br-plot-sm .br-svg { height: 168px; }
.br-svg-fit { height: auto; }
.br-hit { position: absolute; inset: 0; cursor: crosshair; }

/* recessive chrome, per the mark spec */
.br-grid { stroke: #eef1f4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.br-axisline { stroke: #d8dee4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.br-axis { fill: var(--br-ink-3); font-size: 10px; font-family: var(--ui); }
.br-dlabel { fill: var(--br-ink-2); font-size: 10.5px; font-family: var(--ui); font-weight: 600; }
.br-cross line { stroke: var(--br-ink-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

/* ── ops ── */
.br-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.br-bars { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.br-bars li { display: grid; grid-template-columns: 118px 1fr 42px; align-items: center; gap: 10px; }
.br-bar-l { font-size: 12.5px; line-height: 1.25; }
.br-bar-l em { display: block; font-style: normal; font-size: 11px; color: var(--br-ink-3); }
.br-bar-t { height: 10px; background: #eef1f4; border-radius: 5px; overflow: hidden; }
.br-bar-f { display: block; height: 100%; border-radius: 5px; transition: width 0.6s cubic-bezier(0.3, 0.9, 0.3, 1); }
.br-bar-v { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--br-ink-2); }

.br-feed { list-style: none; display: flex; flex-direction: column; }
.br-feed li {
  display: grid;
  grid-template-columns: 42px 96px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--br-line);
  animation: br-in 0.3s ease-out;
}
.br-feed li:last-child { border-bottom: 0; }
@keyframes br-in { from { opacity: 0; transform: translateY(-4px); } }
.br-t { font-size: 11.5px; color: var(--br-ink-3); font-variant-numeric: tabular-nums; }
.br-msg { font-size: 12.5px; }
.br-status { font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* ── table ── */
.br-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.br-table th, .br-table td { padding: 9px 10px; border-bottom: 1px solid var(--br-line); text-align: left; }
.br-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--br-ink-3); font-weight: 600; }
.br-table tbody th { font-weight: 500; }
.br-table tbody tr:hover { background: #f7f9fb; }
.br-table tbody tr:last-child th, .br-table tbody tr:last-child td { border-bottom: 0; }

/* ── tooltip ── */
.br-tip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  background: var(--br-side);
  color: #eef3f8;
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(12, 20, 28, 0.32);
  min-width: 120px;
}
.br-tip b { display: block; font-size: 11.5px; color: #9fb0c0; font-weight: 500; margin-bottom: 4px; }
.br-tip span { display: flex; align-items: center; gap: 7px; padding: 1px 0; }
.br-tip i { width: 8px; height: 8px; border-radius: 2px; display: block; flex: 0 0 auto; }
.br-tip em { margin-left: auto; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .br-charts, .br-ops { grid-template-columns: 1fr; }
  .br-side { width: 54px; }
  .br-side nav a span, .br-logo b, .br-side-foot { display: none; }
  .br-side nav a { justify-content: center; padding: 11px 0; }
  .br-acct-n, .br-env { display: none; }
}

/* ── the arrival: bars grow up, then settle ── */
.grow-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0;
  background: #f4f6f8;
}
.grow-overlay span {
  flex: 1 1 0;
  border-radius: 4px 4px 0 0;
  transform-origin: 50% 100%;
  transform: scaleY(0);
}
