/* Dashboard module. Every class starts with dash-. Colors come from base.css tokens. */
.dash .ph .actions { gap: 8px; }
.dash-kpis { gap: 14px; }
.dash-kpi { position: relative; gap: 6px; padding: 14px 16px 13px; transition: border-color .12s, box-shadow .12s, transform .12s; align-content: start; }
.dash-kpi:hover { box-shadow: var(--shadow-2); }
.dash-kpi:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dash-kpi .k { align-items: center; font-size: 12.5px; letter-spacing: .01em; }
.dash-kic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); flex: none; }
.dash-kic svg { width: 15px; height: 15px; }
.dash-vs { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dash-kpi .v { font-size: 32px; }
.dash-kpi .v small { font: 600 16px var(--f-head); color: var(--ink-3); letter-spacing: 0; }
.dash-spark { line-height: 0; opacity: .95; }
.dash-spark svg { display: block; }
.dash-sub { font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 2px; }
.delta { white-space: nowrap; }
.delta.flat { color: var(--ink-2); background: var(--surface-3); }

/* journey */
.dash-journey { padding: 18px 20px 20px; }
.dash-journey::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, rgba(127,197,204,.16), transparent); pointer-events: none; }
.dash-j-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; position: relative; z-index: 1; }
.dash-journey .eyebrow { font: 700 11.5px var(--f-num); letter-spacing: .12em; text-transform: uppercase; }
.dash-journey h2 { font: 700 26px/1.1 var(--f-head); margin: 2px 0 2px; }
.dash-journey h2 a { color: #fff; }
.dash-j-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.dash-j-btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); }
.dash-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; z-index: 1; }
.dash-steps li { position: relative; min-width: 0; }
.dash-steps li::before { content: ""; position: absolute; top: 19px; left: 50%; right: -50%; height: 2px; background: rgba(127,197,204,.45); }
.dash-steps li:last-child::before { display: none; }
.dash-steps li.pending::before { background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 5px, transparent 5px 10px); }
.dash-steps a { display: grid; justify-items: center; gap: 3px; text-align: center; padding: 0 6px 8px; color: var(--band-ink); text-decoration: none; border-radius: var(--r-sm); position: relative; }
.dash-steps a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.dash-steps a:focus-visible { outline-color: var(--band-eyebrow); }
.dash-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--band-2); border: 2px solid var(--band-eyebrow); color: var(--band-eyebrow); position: relative; z-index: 1; transition: transform .12s, background .12s; }
.dash-dot svg { width: 18px; height: 18px; }
.dash-steps a:hover .dash-dot { background: var(--band-eyebrow); color: var(--band); transform: scale(1.06); }
.dash-steps li.pending .dash-dot { border-style: dashed; border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.55); }
.dash-st { font: 700 14px/1.2 var(--f-semi); color: #fff; margin-top: 6px; }
.dash-sd { font: 600 12px var(--f-num); color: var(--band-eyebrow); }
.dash-sm { font-size: 12px; color: var(--band-muted); line-height: 1.3; overflow-wrap: anywhere; }

/* column layout: today (right, top), activity (right, bottom), charts (left, full height) */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
.dash-charts { grid-column: 1; grid-row: 1 / span 2; display: grid; gap: 16px; min-width: 0; }
.dash-today-col { grid-column: 2; grid-row: 1; min-width: 0; }
.dash-feed-col { grid-column: 2; grid-row: 2; min-width: 0; }
.dash-g2 { align-items: stretch; }
.dash-sub-h { font: 600 13px var(--f-ui); color: var(--ink-2); margin: 4px 0 2px; }
.dash-sub-h + .dash-chart { margin-bottom: 8px; }
.dash-chart svg g[data-go], .dash-chart svg circle[data-go] { outline: none; }
.dash-chart svg g[data-go]:hover rect:last-of-type { opacity: .8; }

/* stage bars */
.dash-stages { display: grid; gap: 4px; padding-top: 10px; }
.dash-stage { display: grid; grid-template-columns: 104px minmax(0, 1fr) 74px; align-items: center; gap: 10px; width: 100%; min-height: 40px; border: 0; background: transparent; border-radius: var(--r-sm); padding: 4px 6px; cursor: pointer; text-align: left; }
.dash-stage:hover { background: var(--brand-tint); }
.dash-stage .sn { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stage .sbar { height: 16px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.dash-stage .sbar i { display: block; height: 100%; border-radius: 5px; }
.dash-stage .sv { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; font-family: var(--f-num); font-size: 12.5px; white-space: nowrap; }
.dash-stage .sv em { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.dash-donut { display: grid; align-content: center; padding-top: 14px; }
.dash-donut > div { justify-content: center; }
.dash-donut svg circle[data-go]:hover { opacity: .85; }

/* today panel */
.dash-sec { font: 700 11.5px var(--f-num); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 2px 0 2px; display: flex; gap: 8px; align-items: center; }
.dash-sec2 { margin-top: 16px; }
.dash-demo { align-items: center; padding: 10px 0; }
.dash-time { display: grid; width: 70px; flex: none; line-height: 1.2; }
.dash-time b { font: 600 13.5px var(--f-num); }
.dash-time span { font-size: 12px; color: var(--ink-3); }
.dash-demo .body a b { font-weight: 600; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.dash-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; min-height: 28px; text-decoration: none; }
.dash-chip b { font-family: var(--f-num); color: var(--brand); }
.dash-chip:hover { border-color: var(--brand); text-decoration: none; background: var(--brand-tint); }
.dash-att { align-items: center; padding: 9px 0; }
.dash-att-t { font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.dash-att-t:hover { color: var(--brand); }
.dash-ic { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.dash-ic svg { width: 15px; height: 15px; }
.dash-ic.bad { background: var(--bad-soft); color: var(--bad); }
.dash-ic.quar { background: var(--quar-soft); color: var(--quar); }
.dash-go { color: var(--ink-3); display: inline-grid; }
.dash-go svg { width: 16px; height: 16px; }
.dash-more { margin-top: 6px; }
.dash-check { position: relative; width: 40px; height: 40px; margin: -6px -4px -6px -8px; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.dash-check input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dash-check i { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ctl-line); background: var(--surface); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.dash-check:hover i { border-color: var(--brand); }
.dash-check input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.dash-check input:checked + i { background: var(--ok); border-color: var(--ok); }
.dash-check input:checked + i::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }

/* feed */
.dash-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.dash-filters .chip { min-height: 30px; padding: 2px 10px; font-size: 12.5px; }
.dash-act { align-items: flex-start; padding: 9px 0; }
.dash-act .dash-ic { width: 28px; height: 28px; margin-top: 1px; }
.dash-act-t { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.dash-act .meta a { color: var(--ink-2); font-weight: 600; }
.dash-ic.t-stage { background: var(--info-soft); }
.dash-ic.t-issue { background: var(--bad-soft); color: var(--bad); }
.dash-ic.t-demo, .dash-ic.t-ai { background: var(--quar-soft); color: var(--quar); }
.dash-ic.t-email, .dash-ic.t-sms { background: var(--warn-soft); color: var(--warn); }
.dash-ic.t-lead, .dash-ic.t-task { background: var(--ok-soft); color: var(--ok); }

@media (max-width: 1280px) {
  .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .dash-kpi .v { font-size: 28px; }
  .dash-spark svg { width: 64px; height: 24px; }
}
@media (max-width: 1100px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
  .dash-charts, .dash-today-col, .dash-feed-col { grid-column: 1; grid-row: auto; }
  .dash-today-col { order: 1; } .dash-charts { order: 2; } .dash-feed-col { order: 3; }
}
@media (max-width: 760px) {
  .dash-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dash-steps li::before { top: 40px; bottom: -4px; left: 20px; right: auto; width: 2px; height: auto; }
  .dash-steps li.pending::before { background: repeating-linear-gradient(180deg, rgba(255,255,255,.28) 0 5px, transparent 5px 10px); }
  .dash-steps a { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "d t" "d s" "d m"; justify-items: start; text-align: left; column-gap: 12px; row-gap: 0; padding: 4px 6px 12px 0; }
  .dash-dot { grid-area: d; }
  .dash-st { grid-area: t; margin-top: 0; } .dash-sd { grid-area: s; } .dash-sm { grid-area: m; }
}
@media (max-width: 640px) {
  .dash .ph .t { width: 100%; }
  .dash-actions { width: 100%; }
  .dash-actions .seg { width: 100%; }
  .dash-actions .seg button { flex: 1; padding: 7px 4px; }
  .dash-actions .btn { flex: 1 1 calc(33% - 8px); padding: 7px 8px; }
  .dash-kpis { gap: 10px; }
  .dash-kpi { padding: 12px 12px 11px; }
  .dash-kpi .k { font-size: 12px; align-items: flex-start; }
  .dash-kic { display: none; }
  .dash-kpi .v { font-size: 26px; }
  .dash-kpi .d { font-size: 11.5px; }
  .dash-vs { align-items: flex-start; flex-direction: column; gap: 2px; }
  .dash-journey { padding: 16px 14px 10px; }
  .dash-j-btn { width: 100%; }
  .dash-chart { overflow-x: auto; }
  .dash-chart > svg { min-width: 460px; }
  .dash-chart > div { min-width: 0; }
  .dash-stage { grid-template-columns: 88px minmax(0, 1fr) 66px; gap: 8px; }
  .dash-time { width: 62px; }
}
