/* Vscore — live dashboard UI components (the real "tool mockups"). */

.dash {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.dash__bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: var(--on-brand);
  padding: 0.7rem 1.1rem;
}
.dash__title { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.01em; }
.dash__live { display: inline-flex; align-items: center; gap: 0.45em; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--on-brand-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.dash__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 oklch(0.715 0.14 112 / 0.6); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.715 0.14 112 / 0.55); } 70% { box-shadow: 0 0 0 7px oklch(0.715 0.14 112 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.715 0.14 112 / 0); } }

.dash__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(0.5rem, 1vw, 0.9rem); padding: clamp(0.8rem, 1.6vw, 1.2rem); background: var(--bg-3); }
.dash__pad { padding: clamp(0.9rem, 1.8vw, 1.3rem); background: var(--bg-3); }
.dash__pad--col { display: flex; flex-direction: column; gap: 0.7rem; }

/* cards */
.dc { background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 0.85rem 0.95rem; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.dc__label { font-size: var(--fs-xs); color: var(--muted); font-weight: 560; letter-spacing: 0.01em; }
.dc__metric { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.9rem); color: var(--brand); line-height: 1; letter-spacing: -0.03em; }
.dc__delta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.dc__delta span { color: var(--muted); opacity: 0.8; }
.dc__delta--up { color: var(--accent-ink); }
.dc--kpi { justify-content: center; gap: 0.5rem; }
.dash__grid .dc--kpi { grid-column: span 2; }
.dash__grid .dc:nth-child(2) { grid-column: span 4; }   /* line */
.dash__grid .dc:nth-child(3) { grid-column: span 3; }   /* ebit */
.dash__grid .dc:nth-child(4) { grid-column: span 3; }   /* ar */
.dash__grid .dc--wide { grid-column: span 6; }          /* cash */

/* charts */
.chart { width: 100%; height: 92px; display: block; }
.dc--wide .chart { height: clamp(96px, 12vw, 132px); }
.chart__line { stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart__ly { stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 3 4; opacity: 0.55; stroke-linecap: round; }
.chart__area { stroke: none; }
.chart__zero { stroke: var(--line); stroke-width: 1; }
.chart__marker { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 2 3; opacity: 0.85; }
.chart__dot { fill: var(--brand); }
.chart__dot--warn { fill: oklch(0.62 0.15 40); }
/* cash chart builds up left-to-right on reveal (synced with the line draw-on) */
html.js .dash.reveal .dc--wide .chart { clip-path: inset(0 100% 0 0); transition: clip-path 2.1s cubic-bezier(0.42, 0, 0.58, 1); }
html.js .dash.reveal.is-in .dc--wide .chart { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { html.js .dash.reveal .dc--wide .chart { clip-path: none; } }
.bar { transition: opacity 0.5s var(--ease-out); }
.reveal .bar { opacity: 0; }
.reveal.is-in .bar { opacity: 1; }
.bar--pos { fill: var(--brand); }
.bar--neg { fill: oklch(0.78 0.03 200); }
.bar--hot { fill: var(--accent); }
.bar--mut { fill: oklch(0.66 0.045 200); }

.dc__legend { display: flex; gap: 1rem; font-size: var(--fs-xs); color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 0.4em; }
.lg::before { content: ""; width: 10px; height: 2.5px; border-radius: 2px; background: var(--brand); }
.lg--ly::before { background: var(--muted); }
.dc__axis { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }

.dash--mini { box-shadow: var(--shadow-md); }
.dash--mini .dc { box-shadow: none; }

/* financial statements table */
.fs__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 1rem; }
.fs__kpi { background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 0.7rem 0.9rem; text-align: center; }
.fs__kpi span { display: block; font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-md); color: var(--brand); }
.fs__kpi span.neg { color: oklch(0.55 0.15 30); }
.fs__kpi small { color: var(--muted); font-size: var(--fs-xs); }
.fs__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-sm); }
.fs { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); background: var(--bg); }
.fs th, .fs td { padding: 0.45rem 0.6rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.fs thead th { background: var(--brand); color: var(--on-brand); font-weight: 560; position: sticky; top: 0; }
.fs th.fs__h, .fs td.fs__name { text-align: left; position: sticky; left: 0; background: var(--bg); font-family: var(--font-body); }
.fs thead th.fs__h { background: var(--brand); color: var(--on-brand); }
.fs td.fs__name { color: var(--ink-2); font-weight: 500; }
.fs td.num { font-family: var(--font-mono); color: var(--ink-2); }
.fs td.neg { color: oklch(0.55 0.15 30); }
.fs .fs__tot { font-weight: 600; color: var(--ink); border-left: 1px solid var(--line); }
.fs tbody tr:hover td { background: var(--bg-2); }
.fs tbody tr:hover td.fs__name { background: var(--bg-2); }

/* integrations diagram */
.intg { display: grid; grid-template-columns: 1fr auto; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.intg__sources { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.intg__node { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.1rem; background: oklch(1 0 0 / 0.05); border: 1px solid var(--on-brand-line); border-radius: var(--r); }
.intg__node strong { display: block; font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); color: var(--on-brand); }
.intg__meta { font-size: var(--fs-xs); color: var(--on-brand-muted); font-family: var(--font-mono); }
.intg__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.intg__hub { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--on-brand-line); border-radius: var(--r-lg); background: oklch(1 0 0 / 0.04); }
.intg__hub span { font-family: var(--font-display); font-size: var(--fs-md); color: var(--on-brand); }
@media (max-width: 760px) { .intg { grid-template-columns: 1fr; } .intg__sources { grid-template-columns: 1fr; } .intg__hub { flex-direction: row; justify-content: center; } }

/* ---- home tool band overrides (light minis flanking dark video) ---- */
.band { grid-template-columns: 0.95fr 1.2fr 0.95fr; align-items: stretch; }
.band__cell { background: transparent; box-shadow: none; overflow: visible; border-radius: 0; min-width: 0; }
.band__cell--wide { background: var(--brand-900); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-glow); position: relative; min-height: 0; transform: none; }
.band__cell--wide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dash--mini { height: 100%; }
.dash--mini .chart { height: 80px; }
@media (max-width: 820px) {
  .band { grid-template-columns: 1fr; }
  .band__cell--wide { order: -1; aspect-ratio: 16 / 9; }
  .dash--mini { height: auto; }
}

/* responsive dashboard */
@media (max-width: 620px) {
  .dash__grid { grid-template-columns: repeat(2, 1fr); }
  .dc--kpi, .dc:nth-child(2), .dc:nth-child(3), .dc:nth-child(4), .dc--wide { grid-column: span 2; }
  .fs__kpis { grid-template-columns: 1fr; }
}
