/*
  Dashboards lane — page-specific demo styles.
  Loaded after /main_style.css and /portfolio/portfolio.css.
  Contains: .dd-* (storefront analytics board), .ops-* (live monitoring board),
  .fin-* (finance tracker).

  House rules honoured here:
    - no native <select> restyling (shared layer owns color-scheme)
    - every wide table sits in an overflow-x:auto wrapper
    - nothing may push the demo stage horizontally at 375px
*/

/* ======================= Shared demo furniture ======================= */

.dd-mini-btn,
.ops-mini-btn {
  height: 30px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: color 180ms ease, border-color 200ms ease, background 200ms ease;
}

.dd-mini-btn:hover,
.ops-mini-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,0.14));
}

.dd-mini-btn:disabled,
.ops-mini-btn:disabled { opacity: 0.45; cursor: default; }

.dd-mini-btn.on,
.ops-mini-btn.on {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 20%, rgba(255,255,255,0.05));
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,0.14));
}

/* Icon/label optical alignment now lives in the shared portfolio.css so every
   lane boxes glyphs to the same width. The local copy that used to sit here
   was lifted there verbatim. */

.demo-dash kbd,
.fin kbd {
  display: inline-block;
  min-width: 1.1em;
  padding: 0 0.28rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.16);
  border-bottom-width: 2px;
  background: rgba(255,255,255,0.06);
  font-family: inherit;
  font-size: 0.72em;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

/* Visible focus for every custom control inside the demos. */
.demo-dash button:focus-visible,
.demo-dash [tabindex]:focus-visible,
.ops button:focus-visible,
.fin button:focus-visible,
.fin [tabindex]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 80%, #fff);
  outline-offset: 2px;
}

/* ===================== DEMO 1: dash-store ===================== */

.demo-dash { padding: 1.1rem 1.2rem 1.3rem; }

.dd-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.dd-ident { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }

.dd-title {
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.01em;
}

.dd-title i { color: color-mix(in srgb, var(--accent) 82%, #fff); }

.dd-daterange {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.dd-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #46e6a8;
  font-variant-numeric: tabular-nums;
}
.dd-updated[hidden] { display: none; }
.dd-updated b { font-weight: 800; }

.dd-updated-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #46e6a8;
  box-shadow: 0 0 7px rgba(70,230,168,0.8);
  animation: ddLivePulse 1.1s ease-in-out infinite;
}

.dd-tools { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.dd-ranges { display: inline-flex; gap: 0.35rem; }

.dd-range {
  height: 32px;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.dd-range:hover { color: var(--text); }

.dd-range.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,0.05));
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,0.14));
}

/* --- CSV export preview --- */

.dd-export-panel {
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255,255,255,0.12));
  background: rgba(0,0,0,0.42);
  margin-bottom: 1rem;
  overflow: hidden;
  animation: ddPanelIn 220ms ease;
}
.dd-export-panel[hidden] { display: none; }

@keyframes ddPanelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.dd-export-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dd-export-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
}
.dd-export-name i { color: color-mix(in srgb, var(--accent) 80%, #fff); }
.dd-export-name b { color: var(--text); font-weight: 750; }
.dd-export-name em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffd17d;
}

.dd-export-x {
  margin-left: auto;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}
.dd-export-x:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

.dd-export-body {
  margin: 0;
  padding: 0.6rem 0.7rem;
  max-height: 132px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.65;
  color: #cfe6ff;
  white-space: pre;
}

.dd-export-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.dd-export-meta { font-size: 0.74rem; color: var(--muted); font-weight: 650; }

/* --- KPI tiles (now buttons that pick the plotted series) --- */

.dd-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.dd-tile {
  position: relative;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.dd-tile::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms cubic-bezier(.2,.9,.2,1);
}

.dd-tile:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }

.dd-tile.sel {
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,0.10));
  background: color-mix(in srgb, var(--accent) 10%, rgba(255,255,255,0.045));
}
.dd-tile.sel::after { transform: scaleX(1); }

.dd-label { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.dd-value { font-size: 1.35rem; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; display: block; }
.dd-value.flash { animation: ddFlash 620ms ease; }

@keyframes ddFlash {
  0% { color: color-mix(in srgb, var(--accent) 90%, #fff); }
  100% { color: inherit; }
}

.dd-tile-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.dd-delta { font-size: 0.8rem; font-weight: 750; color: var(--muted); display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap; }
.dd-delta i { font-size: 0.72rem; }
.dd-delta.up { color: #46e6a8; }
.dd-delta.down { color: #ff7a8a; }

.dd-spark { width: 62px; height: 24px; flex: 0 0 auto; display: block; opacity: 0.85; }

/* --- chart cards --- */

.dd-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

@media (min-width: 720px) {
  .dd-charts { grid-template-columns: 2fr 1fr; }
}

.dd-chart-card {
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.8rem 0.9rem;
  min-width: 0;
}

.dd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  min-height: 30px;
}

.dd-chart-title { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.dd-card-note { font-size: 0.7rem; font-weight: 700; color: var(--muted); opacity: 0.75; letter-spacing: 0.04em; text-transform: uppercase; }

.dd-card-tools { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.dd-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
}

.dd-seg-btn {
  height: 24px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.74rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: color 180ms ease, background 200ms ease;
}
.dd-seg-btn i { font-size: 0.7rem; }
.dd-seg-btn:hover { color: var(--text); }
.dd-seg-btn.active {
  color: #08110d;
  background: color-mix(in srgb, var(--accent) 88%, #fff);
}

.dd-toggle {
  height: 28px;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.74rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: color 180ms ease, border-color 200ms ease, background 200ms ease;
}
.dd-toggle:hover { color: var(--text); }
.dd-toggle[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.28);
}

.dd-ghost-swatch {
  width: 14px;
  height: 0;
  border-top: 2px dashed rgba(255,255,255,0.55);
  flex: 0 0 auto;
}

.dd-chart-card canvas { width: 100%; height: auto; display: block; }

/* Crosshair overlay */
.dd-line-wrap { position: relative; touch-action: pan-y; }

.dd-cross {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}
.dd-cross.on { opacity: 1; }

.dd-cross-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed color-mix(in srgb, var(--accent) 70%, transparent);
}

.dd-cross-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translate(-50%, -50%);
}

.dd-cross-dot.ghost {
  background: rgba(255,255,255,0.55);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.14);
  width: 7px;
  height: 7px;
  display: none;
}
.dd-cross.compare .dd-cross-dot.ghost { display: block; }

.dd-tip {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 140ms ease;
  background: #0b0e18;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,0.14));
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.74rem;
  line-height: 1.45;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}
.dd-tip.on { opacity: 1; transform: translateY(0); }
.dd-tip b { color: color-mix(in srgb, var(--accent) 85%, #fff); font-weight: 800; }
.dd-tip span { color: var(--muted); }
.dd-tip .up { color: #46e6a8; }
.dd-tip .down { color: #ff7a8a; }
.dd-tip .dd-tip-ghost { color: rgba(255,255,255,0.6); }

/* Loading shimmer on range change */
.dd-shimmer {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.10) 40%, rgba(255,255,255,0) 60%),
    rgba(8,10,20,0.72);
  background-size: 220% 100%, auto;
  animation: ddShimmer 900ms linear infinite;
  pointer-events: none;
}
.dd-shimmer[hidden] { display: none; }

@keyframes ddShimmer {
  from { background-position: 140% 0, 0 0; }
  to { background-position: -40% 0, 0 0; }
}

.dd-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 650;
}
.dd-axis-note { font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-kbd-hint { display: inline-flex; align-items: center; gap: 0.2rem; flex: 0 0 auto; opacity: 0.75; }

.dd-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dd-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
}

.dd-live.active {
  color: var(--text);
  background: rgba(70,230,168,0.16);
  border-color: rgba(70,230,168,0.5);
}

.dd-live.active .dd-live-dot {
  background: #46e6a8;
  box-shadow: 0 0 8px rgba(70,230,168,0.8);
  animation: ddLivePulse 1.1s ease-in-out infinite;
}

@keyframes ddLivePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.dd-charts-2 { margin-top: 0.7rem; }

@media (min-width: 720px) {
  .dd-charts-2 { grid-template-columns: 1fr 1.4fr; }
}

.dd-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dd-donut-wrap canvas {
  width: 130px !important;
  height: 130px;
  flex: 0 0 auto;
}

.dd-legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1 1 130px;
  min-width: 0;
}

.dd-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dd-legend b {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.dd-legend strong { color: var(--text); margin-left: auto; font-variant-numeric: tabular-nums; }

/* --- orders table --- */

.dd-chips { display: inline-flex; gap: 0.25rem; flex-wrap: wrap; }

.dd-chip {
  height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.dd-chip:hover { color: var(--text); }
.dd-chip.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,0.12));
}

.dd-orders-wrap { overflow-x: auto; min-height: 116px; }

.dd-orders {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 300px;
}

.dd-orders td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.dd-orders tr:last-child td { border-bottom: 0; }

.dd-orders .dd-cust { color: var(--text); font-weight: 650; }
.dd-orders .dd-amt { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.dd-orders .dd-ago { color: var(--muted); font-size: 0.74rem; text-align: right; }

.dd-orders tr.dd-new { animation: ddRowIn 420ms cubic-bezier(.2,.9,.2,1); }

@keyframes ddRowIn {
  from { opacity: 0; transform: translateX(-14px); background: color-mix(in srgb, var(--accent) 18%, transparent); }
  to { opacity: 1; transform: none; background: transparent; }
}

.dd-status {
  display: inline-block;
  border-radius: 999px;
  /* Was 0.1rem/0.55rem — an 18px capsule around 11.5px text, the tightest
     bubble on the page next to .dd-chip (24px) and .pill (23.5px).
     line-height pins the height so the text sits centred with real room. */
  padding: 0.2rem 0.6rem;
  line-height: 1.35;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.dd-status.paid { background: rgba(70,230,168,0.14); color: #46e6a8; }
.dd-status.shipped { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 85%, #fff); }
.dd-status.pending { background: rgba(255,209,125,0.14); color: #ffd17d; }

.dd-empty {
  margin: 0;
  padding: 1.6rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.dd-empty[hidden] { display: none; }
.dd-empty i { opacity: 0.6; }

/* ===================== DEMO 2: dash-ops ===================== */

.ops { padding: 1.1rem 1.2rem 1.2rem; }

.ops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.ops-title { font-weight: 800; display: inline-flex; align-items: center; gap: 0.55rem; }
.ops-title i { color: color-mix(in srgb, var(--accent) 82%, #fff); }
.ops-sim { font-size: 0.62rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.ops-btn {
  height: 34px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #ffd17d 45%, rgba(255,255,255,0.14));
  background: color-mix(in srgb, #ffd17d 14%, rgba(255,255,255,0.04));
  color: #ffe3a8;
  font-family: inherit;
  font-weight: 750;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 160ms ease, background 200ms ease, opacity 200ms ease;
}
.ops-btn:hover { transform: translateY(-1px); background: color-mix(in srgb, #ffd17d 22%, rgba(255,255,255,0.04)); }
.ops-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.ops-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.035);
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
}
.ops-sum { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.ops-sum b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.ops-sum.ok { color: #46e6a8; }
.ops-sum.ok b { color: #46e6a8; }
.ops-sum.warn { color: #ffd17d; }
.ops-sum.warn b { color: #ffd17d; }
.ops-sum.err { color: #ff8b95; }
.ops-sum.err b { color: #ff8b95; }

.ops-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  align-items: start;
}

.ops-tile {
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  transition: border-color 260ms ease, box-shadow 260ms ease;
}

.ops-tile-btn {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  padding: 0.75rem 0.85rem 0.6rem;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 200ms ease;
}
.ops-tile-btn:hover { background: rgba(255,255,255,0.04); }

.ops-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ops-tile-name { font-weight: 750; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
/* fixed box so every service name starts on the same x across the tile grid
   (fa-database is 11.8px wide, fa-server/fa-globe 13.5px) */
.ops-tile-name i { color: var(--muted); font-size: 0.85rem; flex: 0 0 auto; width: 1.15em; text-align: center; }
.ops-tile-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ops-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #46e6a8;
  box-shadow: 0 0 8px rgba(70,230,168,0.7);
  flex: 0 0 auto;
}
.ops-dot.pulse { animation: opsPulse 1.4s ease-in-out infinite; }

@keyframes opsPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.ops-spark { width: 100%; height: 34px; display: block; }

.ops-tile-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem; }
.ops-latency { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.ops-latency em { font-style: normal; font-size: 0.7rem; font-weight: 600; color: var(--muted); margin-left: 0.15rem; }
.ops-state { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #46e6a8; }
/* .ops-tile-foot is baseline-aligned so the big latency number and its unit sit
   on one line — but a chevron has no meaningful baseline and rode 3.4px low.
   Opt just the glyph out into optical centring. */
.ops-chev { font-size: 0.68rem; color: var(--muted); transition: transform 240ms ease; flex: 0 0 auto; align-self: center; }
.ops-tile.open .ops-chev { transform: rotate(180deg); }

/* warn state */
.ops-tile.warn { border-color: rgba(255,209,125,0.5); box-shadow: 0 0 24px rgba(255,209,125,0.14); }
.ops-tile.warn .ops-dot { background: #ffd17d; box-shadow: 0 0 8px rgba(255,209,125,0.8); }
.ops-tile.warn .ops-state { color: #ffd17d; }
/* error state */
.ops-tile.err { border-color: rgba(255,95,107,0.55); box-shadow: 0 0 26px rgba(255,95,107,0.18); }
.ops-tile.err .ops-dot { background: #ff5f6b; box-shadow: 0 0 8px rgba(255,95,107,0.85); }
.ops-tile.err .ops-state { color: #ff8b95; }

/* per-service detail */
.ops-detail {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.65rem 0.85rem 0.75rem;
  background: rgba(0,0,0,0.24);
  animation: opsDetailIn 240ms ease;
}
.ops-detail[hidden] { display: none; }

@keyframes opsDetailIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.ops-pct {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.ops-pct-cell {
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.ops-pct-k { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ops-pct-v { font-size: 0.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ops-pct-v em { font-style: normal; font-size: 0.62rem; font-weight: 600; color: var(--muted); margin-left: 0.1rem; }

.ops-meta { display: flex; flex-direction: column; gap: 0.3rem; }
.ops-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.ops-meta-row b { color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; }
.ops-meta-row .ops-up-bar {
  flex: 1 1 auto;
  height: 5px;
  min-width: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  overflow: hidden;
}
.ops-meta-row .ops-up-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
}

.ops-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  font-weight: 650;
  border: 1px solid rgba(255,95,107,0.45);
  background: rgba(255,95,107,0.12);
  color: #ffd0d5;
  animation: opsBannerIn 260ms ease;
}
.ops-banner[hidden] { display: none; }
.ops-banner.acked { border-color: rgba(255,209,125,0.5); background: rgba(255,209,125,0.12); color: #ffe3a8; }
.ops-banner.resolved { border-color: rgba(70,230,168,0.45); background: rgba(70,230,168,0.12); color: #bfffe3; }
.ops-banner i { flex: 0 0 auto; }
.ops-banner .ops-b-text { min-width: 0; }
.ops-banner .ops-elapsed { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; }
.ops-banner .ops-b-actions { display: inline-flex; gap: 0.35rem; flex: 0 0 auto; }

.ops-b-btn {
  height: 26px;
  padding: 0 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,0.06);
  color: inherit;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: background 180ms ease, opacity 180ms ease;
}
.ops-b-btn:hover { background: rgba(255,255,255,0.14); }
.ops-b-btn:disabled { opacity: 0.45; cursor: default; }

@keyframes opsBannerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* incident timeline */
.ops-tl-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.03);
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.ops-tl-wrap[hidden] { display: none; }

.ops-tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  /* was 0.45rem/0.85rem — snapped to the .ops-log-head values so the two
     identical-looking panel bars in this demo are the same height, and to
     0.9rem so their labels share a left edge with the body content below. */
  padding: 0.5rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Label only. This used to be `.ops-tl-head i { margin-right }`, which also hit
   the icon inside the "Clear" button and stacked on top of that button's own
   flex gap — an 11.1px icon-to-text gap inside a pill with 11.2px side padding.
   Same story for .ops-log-head and its Pause button (11.9px). */
.ops-tl-label,
.ops-log-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.ops-tl {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0.9rem 0.8rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.ops-tl li {
  position: relative;
  flex: 1 0 auto;
  min-width: 118px;
  max-width: 190px;
  padding: 0 0.7rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  animation: opsTlIn 280ms ease;
}

@keyframes opsTlIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.ops-tl li::before {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
  margin-bottom: 0.28rem;
  position: relative;
  z-index: 1;
}
.ops-tl li::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 4px;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.14);
}
.ops-tl li:last-child::after { display: none; }

.ops-tl li.warn::before { background: #ffd17d; box-shadow: 0 0 7px rgba(255,209,125,0.7); }
.ops-tl li.err::before { background: #ff5f6b; box-shadow: 0 0 7px rgba(255,95,107,0.7); }
.ops-tl li.ok::before { background: #46e6a8; box-shadow: 0 0 7px rgba(70,230,168,0.7); }
.ops-tl li.ack::before { background: #9fdcff; box-shadow: 0 0 7px rgba(159,220,255,0.7); }

.ops-tl-t { font-size: 0.66rem; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.ops-tl-l { font-size: 0.76rem; font-weight: 700; line-height: 1.35; }

.ops-log-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(0,0,0,0.4);
  overflow: hidden;
}

.ops-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  /* 0.9rem matches .ops-log below, so the head label and the first log line
     share a left edge (they were 0.8px apart). */
  padding: 0.5rem 0.9rem;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ops-log-tools { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.ops-log-state { color: #46e6a8; }
.ops-log-state.paused { color: #ffd17d; }

.ops-sev {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.3);
}

.ops-sev-btn {
  height: 22px;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}
.ops-sev-btn:hover { color: var(--text); }
.ops-sev-btn.active { color: #08110d; background: color-mix(in srgb, var(--accent) 88%, #fff); }
.ops-sev-btn[data-sev="warn"].active { background: #ffd17d; }
.ops-sev-btn[data-sev="err"].active { background: #ff8b95; }
.ops-sev-btn[data-sev="info"].active { background: #9fdcff; }

.ops-log {
  height: 150px;
  overflow-y: auto;
  padding: 0.6rem 0.9rem;
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.ops-line { display: block; color: #9fdcff; opacity: 0; animation: opsLineIn 220ms ease forwards; }
.ops-line[hidden] { display: none; }
.ops-line .ops-t { color: rgba(255,255,255,0.4); }
.ops-line.info { color: #9fdcff; }
.ops-line.ok { color: #46e6a8; }
.ops-line.warn { color: #ffd17d; }
.ops-line.err { color: #ff8b95; }

@keyframes opsLineIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* centred to match .dd-empty, the better of the two empty states on this page */
.ops-log-empty {
  margin: 0;
  padding: 0.1rem 0.9rem 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.45rem;
}
.ops-log-empty[hidden] { display: none; }

/* ===================== DEMO 3: dash-fin ===================== */

.fin { padding: 1.1rem 1.2rem 1.2rem; }

.fin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.fin-title { font-weight: 800; display: inline-flex; align-items: center; gap: 0.55rem; }
.fin-title i { color: color-mix(in srgb, var(--accent) 82%, #fff); }
.fin-sim { font-size: 0.62rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.fin-head-tools { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }

.fin-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
}

.fin-seg-btn {
  height: 26px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 750;
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 180ms ease, background 200ms ease;
}
.fin-seg-btn:hover { color: var(--text); }
.fin-seg-btn.active { color: #08110d; background: color-mix(in srgb, var(--accent) 88%, #fff); }

.fin-toggle {
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: color 180ms ease, border-color 200ms ease, background 200ms ease;
}
.fin-toggle:hover { color: var(--text); }
.fin-toggle[aria-pressed="true"] {
  color: var(--text);
  background: rgba(177,140,255,0.16);
  border-color: rgba(177,140,255,0.5);
}

.fin-bench-swatch {
  width: 14px;
  height: 0;
  border-top: 2px dashed #b18cff;
  flex: 0 0 auto;
}

.fin-reset {
  height: 32px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: color 180ms ease, border-color 200ms ease, opacity 200ms ease;
}
.fin-reset:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,0.14)); }
.fin-reset:disabled { opacity: 0.4; cursor: default; }

.fin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.fin-kpi {
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.fin-kpi-label { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.fin-kpi-val { font-size: 1.25rem; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.fin-kpi-val.up { color: #46e6a8; }
.fin-kpi-val.down { color: #ff7a8a; }

.fin-grid { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin-bottom: 0.9rem; }

@media (min-width: 880px) {
  .fin-grid { grid-template-columns: minmax(0, 1fr) 250px; }
}

.fin-chart-card,
.fin-alloc-card {
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.8rem 0.9rem;
  min-width: 0;
}

/* min-height mirrors .dd-card-head. Without it the NAV card head (which holds
   the .fin-window capsule) measured 19.6px and the Allocation card head (plain
   text) 15.8px, pushing the two side-by-side canvases 3.8px out of line. */
.fin-chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 30px;
  margin-bottom: 0.5rem;
}
.fin-chart-title { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.fin-alloc-note { font-size: 0.7rem; font-weight: 700; color: var(--muted); opacity: 0.75; letter-spacing: 0.04em; text-transform: uppercase; }
.fin-window {
  font-size: 0.74rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 82%, #fff);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  /* matched to .dd-status so the two accent capsules on this lane agree */
  padding: 0.2rem 0.6rem;
  line-height: 1.35;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.fin-area-wrap { position: relative; touch-action: pan-y; cursor: crosshair; }
.fin-area-wrap canvas { width: 100%; height: auto; display: block; }

.fin-cross {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}
.fin-cross.on { opacity: 1; }
.fin-cross-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed color-mix(in srgb, var(--accent) 70%, transparent); }
.fin-cross-dot {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translate(-50%, -50%);
}

.fin-sel {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
  opacity: 0;
}
.fin-sel.on { opacity: 1; }

.fin-tip {
  position: absolute;
  z-index: 4;
  top: 0; left: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease;
  background: #0b0e18;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,0.14));
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}
.fin-tip.on { opacity: 1; transform: translateY(0); }
.fin-tip b { color: color-mix(in srgb, var(--accent) 85%, #fff); font-weight: 800; }
.fin-tip .up { color: #46e6a8; }
.fin-tip .down { color: #ff7a8a; }
.fin-tip .bench { color: #c7b0ff; }

.fin-hint {
  position: absolute;
  right: 0.5rem;
  bottom: 0.4rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  background: rgba(0,0,0,0.35);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.fin-hint.hide { opacity: 0; }

.fin-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 650;
}
.fin-legend-row { display: inline-flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.fin-lg { display: inline-flex; align-items: center; gap: 0.35rem; }
.fin-lg[hidden] { display: none; }
.fin-lg-swatch { display: inline-block; width: 14px; height: 0; flex: 0 0 auto; }
.fin-lg-swatch.nav { border-top: 3px solid var(--accent); }
.fin-lg-swatch.bench { border-top: 2px dashed #b18cff; }
.fin-kbd-hint { display: inline-flex; align-items: center; gap: 0.2rem; opacity: 0.75; }

/* allocation donut */
.fin-alloc-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.fin-alloc-wrap canvas { width: 130px; height: 130px; flex: 0 0 auto; display: block; }

.fin-alloc-legend { display: flex; flex-direction: column; gap: 0.25rem; width: 100%; min-width: 0; }

.fin-alloc-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.28rem 0.4rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.fin-alloc-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.fin-alloc-item.on { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: var(--text); }
.fin-alloc-sw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.fin-alloc-tk { font-weight: 800; color: var(--text); }
.fin-alloc-pc { margin-left: auto; font-variant-numeric: tabular-nums; }

.fin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.10);
}

.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 420px;
}

.fin-table th {
  text-align: left;
  padding: 0.5rem 0.8rem;
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.fin-table th.fin-num { text-align: right; }

.fin-sortable { cursor: pointer; user-select: none; transition: color 180ms ease; white-space: nowrap; }
.fin-sortable i { font-size: 0.7rem; margin-left: 0.2rem; opacity: 0.5; }
.fin-sortable:hover { color: var(--text); }
.fin-sortable.sorted { color: color-mix(in srgb, var(--accent) 85%, #fff); }
.fin-sortable.sorted i { opacity: 1; }

.fin-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.fin-table tr:last-child td { border-bottom: 0; }
.fin-table td.fin-num { text-align: right; font-variant-numeric: tabular-nums; }
.fin-table tr.fin-row { cursor: pointer; transition: background 180ms ease; }
.fin-table tr.fin-row:hover { background: rgba(255,255,255,0.04); }
.fin-table tr.fin-row.open { background: rgba(255,255,255,0.05); }
.fin-table tr.fin-row.flash { animation: finFlash 900ms ease; }

@keyframes finFlash {
  0%, 60% { background: color-mix(in srgb, var(--accent) 20%, transparent); }
  100% { background: transparent; }
}

.fin-tk { font-weight: 750; color: var(--text); }
.fin-tk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
}
.fin-tk-btn span.fin-tk-name { color: var(--muted); font-weight: 600; font-size: 0.76rem; }
.fin-tk-btn i { font-size: 0.64rem; color: var(--muted); transition: transform 220ms ease; }
.fin-row.open .fin-tk-btn i { transform: rotate(180deg); }
.fin-tk span { color: var(--muted); font-weight: 600; font-size: 0.76rem; margin-left: 0.35rem; }
.fin-day.up { color: #46e6a8; }
.fin-day.down { color: #ff7a8a; }
.fin-day-cell.up { background: rgba(70,230,168,0.08); }
.fin-day-cell.down { background: rgba(255,122,138,0.08); }

/* per-holding detail row */
.fin-drow td { padding: 0 !important; border-bottom: 1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.22); white-space: normal; }
.fin-dbox {
  display: flex;
  gap: 0.9rem;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 0.7rem 0.8rem 0.8rem;
  animation: finDetailIn 240ms ease;
}

@keyframes finDetailIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.fin-dchart { flex: 1 1 200px; min-width: 160px; }
.fin-dchart canvas { width: 100%; height: 56px; display: block; }
.fin-dchart-cap { display: block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }

.fin-dstats { flex: 1 1 220px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 0.8rem; align-content: center; }
.fin-dstat { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.fin-dstat-k { font-size: 0.64rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.fin-dstat-v { font-size: 0.86rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fin-dstat-v.up { color: #46e6a8; }
.fin-dstat-v.down { color: #ff7a8a; }

.fin-dweight { flex: 1 1 100%; display: flex; align-items: center; gap: 0.6rem; }
.fin-dweight-bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.09); overflow: hidden; }
.fin-dweight-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent)); }
.fin-dweight-lbl { font-size: 0.7rem; font-weight: 750; color: var(--muted); white-space: nowrap; }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 720px) {
  .dd-tools, .fin-head-tools { width: 100%; }
  .dd-ranges { flex: 1 1 auto; }
  .dd-range { flex: 1 1 auto; padding: 0 0.55rem; }
}

@media (max-width: 560px) {
  .demo-dash, .ops, .fin { padding-left: 0.75rem; padding-right: 0.75rem; }
  .dd-donut-wrap { justify-content: center; }
  .dd-tiles { grid-template-columns: 1fr 1fr; }
  .dd-value { font-size: 1.15rem; }
  .dd-spark { width: 46px; }
  .dd-card-head { gap: 0.35rem; }
  .ops-tiles { grid-template-columns: 1fr 1fr; }
  .ops-tile.open { grid-column: 1 / -1; }
  .ops-summary { font-size: 0.74rem; gap: 0.3rem 0.7rem; }
  .ops-log-head { font-size: 0.68rem; }
  .fin-alloc-wrap { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: center; }
  .fin-alloc-legend { flex: 1 1 150px; }
  .fin-dstats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .dd-seg-btn { padding: 0 0.45rem; }
  .dd-chip { padding: 0 0.42rem; font-size: 0.68rem; }
  .ops-sev-btn { padding: 0 0.38rem; font-size: 0.64rem; }
  .ops-pct { grid-template-columns: 1fr; }
}

/* ===================== REDUCED MOTION ===================== */

@media (prefers-reduced-motion: reduce) {
  .dd-live.active .dd-live-dot,
  .dd-updated-dot { animation: none; }
  .dd-cross, .dd-tip, .fin-cross, .fin-tip { transition: none; }
  .dd-tile, .dd-tile::after { transition: none; }
  .dd-value.flash { animation: none; }
  .dd-orders tr.dd-new { animation: none; }
  .dd-export-panel { animation: none; }
  .dd-shimmer { animation: none; }
  .ops-dot.pulse { animation: none; }
  .ops-line { animation: none; opacity: 1; }
  .ops-banner, .ops-detail, .ops-tl li { animation: none; }
  .ops-log { scroll-behavior: auto; }
  .ops-chev, .fin-tk-btn i { transition: none; }
  .fin-dbox { animation: none; }
  .fin-table tr.fin-row.flash { animation: none; }
}
