/* Partner portal demo dashboard (/platforms/). Builds on site.css tokens. */

.dash-intro { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 72px); }
.dash-intro .h1 { margin-top: 18px; max-width: 18ch; }
.dash-intro__meta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.dash-intro__note { color: var(--mist); font-size: 15px; max-width: 52ch; }

.dash-wrap { padding: clamp(32px, 5vw, 64px) 0 var(--section-y); background: var(--paper); }

.dash {
  background: var(--ink); color: var(--paper); border-radius: var(--r-xl);
  display: grid; grid-template-columns: 228px minmax(0, 1fr); overflow: hidden;
  box-shadow: var(--shadow-float);
}

/* Sidebar / tabs */
.dash__side { background: #0A1118; border-right: 1px solid var(--line-dark); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash__org { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; border-bottom: 1px solid var(--line-dark); }
.dash__org-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--ink-4); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--lime); flex: none; }
.dash__org-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.dash__org-sub { font-size: 12px; color: var(--mist-2); }
.dash__tabs { display: flex; flex-direction: column; gap: 2px; }
.dash__tab {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: none; color: var(--mist); text-align: left; cursor: pointer;
  font-size: 14.5px; white-space: nowrap; transition: background-color .15s, color .15s;
}
.dash__tab svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.dash__tab:hover { background: rgba(255, 255, 255, .05); color: var(--paper); }
.dash__tab[aria-selected="true"] { background: var(--lime); color: var(--ink); font-weight: 600; }
.dash__tab[aria-selected="true"] svg { opacity: 1; }
.dash__side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line-dark); font-size: 12px; color: var(--mist-2); line-height: 1.5; }

/* Main area */
.dash__main { min-width: 0; padding: clamp(18px, 2.6vw, 32px); }
.dash__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 24px; }
.dash__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.01em; }
.dash__sub { color: var(--mist-2); font-size: 13.5px; margin-top: 4px; }
.dash__bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dash__range {
  min-height: 40px; padding: 8px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line-dark);
  font-size: 13.5px; color: var(--mist); display: inline-flex; align-items: center; gap: 8px;
}

.dash-panel[hidden] { display: none; }
.dash-panel:focus-visible { outline-offset: 6px; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.kpi { background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--r-md); padding: 18px; min-width: 0; }
.kpi__label { font-size: 12.5px; color: var(--mist-2); }
.kpi__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.015em; margin-top: 6px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi__delta { margin-top: 8px; font-size: 12px; color: var(--mist); display: inline-flex; align-items: center; gap: 6px; }
.kpi__delta b { color: var(--lime); font-weight: 600; }
.kpi--hl { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.kpi--hl .kpi__label, .kpi--hl .kpi__delta { color: var(--ink); }
.kpi--hl .kpi__delta b { color: var(--ink); }

.dash-grid { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.dash-grid--wide > :first-child { grid-column: 1 / -1; }

.panel-card { background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--r-md); padding: 20px; min-width: 0; }
.panel-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.panel-card__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.panel-card__meta { font-size: 12.5px; color: var(--mist-2); }
.panel-card__headline { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }

/* Charts */
.chart { position: relative; width: 100%; min-height: 220px; }
.chart--short { min-height: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis-label { fill: var(--mist-2); font-family: var(--font-body); font-size: 11.5px; }
.chart .value-label { fill: var(--paper); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.chart .cat-label { fill: var(--mist); font-family: var(--font-body); font-size: 12.5px; }
.chart .grid-line { stroke: var(--ink-4); stroke-width: 1; }
.chart .baseline { stroke: #3A4654; stroke-width: 1; }
.chart .mark { fill: var(--lime); transition: fill .15s, opacity .15s; }
.chart .mark--muted { fill: #4A5765; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:focus-visible + .mark, .chart .is-hot .mark { fill: #F4FF9E; }
.chart .hit-group:focus-visible { outline: none; }
.chart .hit-group:focus-visible .focus-ring { stroke: var(--paper); stroke-width: 2; }
.chart .line { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgba(228, 255, 58, .1); }
.chart .crosshair { stroke: var(--mist-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--lime); stroke: var(--ink-2); stroke-width: 2; }

.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 120px;
  background: var(--paper); color: var(--ink); border-radius: 10px; padding: 9px 12px;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6); font-size: 12.5px; line-height: 1.35;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip__v { font-family: var(--font-display); font-weight: 800; font-size: 17px; display: block; font-variant-numeric: tabular-nums; }
.chart-tip__k { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chart-tip__k::before { content: ""; width: 12px; height: 2px; background: var(--ink); border-radius: 1px; }

/* Tables */
.dtable { width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.dtable th { text-align: left; font-weight: 500; color: var(--mist-2); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line-dark); white-space: nowrap; }
.dtable td { padding: 12px; border-bottom: 1px solid var(--line-dark); white-space: nowrap; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable .num { text-align: right; }
.dtable-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

.pill-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); background: var(--ink-4); color: var(--paper); }
.pill-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-status--ok { color: var(--ok); }
.pill-status--review { color: var(--lime); }
.pill-status--wait { color: var(--warn); }
.pill-status--no { color: #FF8A7A; }
.pill-status--soon { color: var(--mist-2); }

/* Funnel / split bars */
.split-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 10px 0 14px; }
.split-bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--mist); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 11px 0; border-bottom: 1px solid var(--line-dark); font-family: var(--font-mono); font-size: 13.5px; }
.endpoint:last-child { border-bottom: 0; }
.endpoint__m { min-width: 52px; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; text-align: center; background: var(--ink-4); color: var(--lime); }
.endpoint__d { font-family: var(--font-body); font-size: 13px; color: var(--mist-2); margin-left: auto; }
.keybox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #0A1118; border: 1px dashed #3A4654; border-radius: 10px; padding: 12px 14px; font-family: var(--font-mono); font-size: 14px; }

.dash-cta { margin-top: clamp(40px, 6vw, 72px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.dash-cta .h2 { max-width: 20ch; }

@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash__side { border-right: 0; border-bottom: 1px solid var(--line-dark); padding: 14px 12px 10px; gap: 10px; }
  .dash__org { padding: 2px 4px 10px; }
  .dash__tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .dash__tabs::-webkit-scrollbar { display: none; }
  .dash__tab { width: auto; flex: none; }
  .dash__side-foot { display: none; }
}
