/* ───────────────────────────────────────────────────────────────────
 * Analytics v2 — visual styles. Loaded after the main stylesheet so
 * its rules win on the analytics view.
 * ─────────────────────────────────────────────────────────────────── */

.av2-root {
  padding: 0 0 60px;
  color: var(--navy);
}

/* ── page header ───────────────────────────────────────────────── */
.av2-head {
  padding: 22px 24px 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.av2-h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--navy);
}
.av2-h1-sub { font-size: 12.5px; color: var(--g400); margin-top: 4px; }

.av2-scope {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-50);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
}
.av2-scope-clear {
  background: var(--navy); color: #fff; border: 0;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; cursor: pointer; font-family: inherit;
}

/* ── tab bar ───────────────────────────────────────────────────── */
.av2-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid var(--g100);
  margin: 14px 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.av2-tabs::-webkit-scrollbar { display: none; }
.av2-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--g400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: inherit;
  transition: color .12s ease, border-color .12s ease;
}
.av2-tab:hover { color: var(--navy); }
.av2-tab.is-on { color: var(--navy); border-bottom-color: var(--gold); font-weight: 700; }
.av2-tab .ico { font-size: 14px; }

.av2-body {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── hero KPIs (compact 6-tile grid) ───────────────────────────── */
.av2-hero {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.av2-kpi {
  background: #fff;
  border: 1px solid var(--g100);
  border-radius: 10px;
  padding: 11px 13px 12px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.av2-kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--g200);
}
.av2-kpi.closed::before  { background: var(--green); }
.av2-kpi.pipe::before    { background: var(--amber); }
.av2-kpi.total::before   { background: var(--navy); }
.av2-kpi.primary {
  background: linear-gradient(180deg, var(--navy) 0%, #142634 100%);
  color: #fff;
}
.av2-kpi.primary::before { background: var(--gold); }
.av2-kpi.primary .av2-kpi-label,
.av2-kpi.primary .av2-kpi-sub,
.av2-kpi.primary .av2-kpi-foot,
.av2-kpi.primary .dim { color: rgba(255,255,255,.6); }
.av2-kpi.primary .av2-kpi-val { color: #fff; }
.av2-kpi.primary .num         { color: var(--gold); }

.av2-kpi-label {
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g400);
  margin-bottom: 4px;
}
.av2-kpi-val {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.av2-kpi-val .num { color: var(--navy); }
.av2-kpi-sub {
  margin-top: 5px;
  font-size: 11px;
  color: var(--g600);
  font-variant-numeric: tabular-nums;
}
.av2-kpi-sub .dim { color: var(--g400); }
.av2-kpi-foot {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--g100);
  font-size: 10.5px;
  color: var(--g600);
  font-variant-numeric: tabular-nums;
}
.av2-kpi.primary .av2-kpi-foot { border-top-color: rgba(255,255,255,.12); }
.av2-kpi-foot .delta {
  font-weight: 700;
  margin-right: 4px;
}
.av2-kpi-foot .delta.up   { color: var(--green); }
.av2-kpi-foot .delta.down { color: var(--red); }
.av2-kpi.primary .av2-kpi-foot .delta.up { color: #7fdca3; }

/* ── 3-column row: equal-height tiles ──────────────────────────── */
.av2-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.av2-3col > .av2-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.av2-3col > .av2-card > .av2-card-hd { flex: 0 0 auto; }
.av2-3col > .av2-card > .av2-funnel,
.av2-3col > .av2-card > .av2-donut-card {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
/* Funnel: fill the tile vertically so rows can breathe */
.av2-3col > .av2-card > .av2-funnel {
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  width: 100%;
}
.av2-3col > .av2-card > .av2-funnel .av2-funnel-row {
  width: 100%;
  grid-template-columns: 92px 1fr;
}
.av2-3col > .av2-card > .av2-funnel .av2-funnel-row .trk {
  height: 32px;
}
/* Donut tiles: center the donut + list block as a group */
.av2-3col > .av2-card > .av2-donut-card {
  justify-content: center;
  gap: 18px;
}

/* ── donut card (product mix / status mix) ─────────────────────── */
.av2-donut-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
}
.av2-donut-card .av2-donut .center {
  flex-direction: column;
  line-height: 1.1;
}
.av2-donut-card .av2-donut .center .v {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--navy);
}
.av2-donut-card .av2-donut .center .l {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g400);
  margin-top: 2px;
}
.av2-donut-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
}
.av2-donut-list .row {
  display: grid;
  grid-template-columns: 10px 90px 1fr 32px;
  gap: 6px;
  align-items: center;
}
.av2-donut-list .row .sw { width: 10px; height: 10px; border-radius: 2px; }
.av2-donut-list .row .nm { font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av2-donut-list .row .ln { font-size: 10.5px; color: var(--g600); font-variant-numeric: tabular-nums; text-align: right; }
.av2-donut-list .row .pct { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ── top files ─────────────────────────────────────────────────── */
.av2-top { display: flex; flex-direction: column; gap: 8px; }
.av2-top-row {
  display: grid;
  grid-template-columns: 22px 160px 1fr 72px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  padding: 6px 6px 6px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s;
}
.av2-top-row:hover { background: var(--gold-50); }
.av2-top-row .rk {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--gold-700, #B68D2C);
  text-align: center;
  line-height: 1;
}
.av2-top-row .who .nm {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.av2-top-row .who .meta {
  font-size: 10.5px;
  color: var(--g400);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.av2-top-row .trk {
  position: relative;
  height: 20px;
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: 4px;
  overflow: hidden;
}
.av2-top-row .trk .fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--navy);
  border-radius: 4px;
  opacity: .85;
  transition: width .35s ease;
}
.av2-top-row .trk .amt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.av2-top-row .comp {
  text-align: right;
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--green);
  line-height: 1.05;
}
.av2-top-row .comp .lab {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g400);
  margin-top: 1px;
  font-family: var(--font-ui, 'DM Sans');
}

/* ── days-to-close histogram ───────────────────────────────────── */
.av2-hist {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  height: 160px;
  align-items: end;
}
.av2-hist-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.av2-hist-col .bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 6px;
}
.av2-hist-col .bar {
  width: 100%;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-700, #B68D2C) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: transform .15s ease;
}
.av2-hist-col:hover .bar { transform: scaleY(1.04); transform-origin: bottom; }
.av2-hist-col .ct {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.av2-hist-col .lab {
  font-size: 10px;
  color: var(--g400);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 1px;
}

/* ── compact responsive ────────────────────────────────────────── */

/* ── hide the legacy sticky sort bar; controls live inline now ── */
.analytics-sort-bar { display: none !important; }

/* ── inline control bar (scrolls normally with the page) ─────── */
.av2-ctrl {
  padding: 0 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.av2-ctrl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.av2-ctrl-row .lbl {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g400);
}
.av2-chips {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.av2-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--g200);
  color: var(--g600);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s ease;
  white-space: nowrap;
}
.av2-chip .n {
  color: var(--g400);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.av2-chip:hover { border-color: var(--gold); color: var(--navy); }
.av2-chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.av2-chip.is-on .n { color: var(--gold); }
.av2-chip[data-k="new"].is-on      { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.av2-chip[data-k="new"].is-on .n   { color: var(--navy); opacity: .55; }
.av2-chip[data-k="complete"].is-on { background: var(--green); border-color: var(--green); }
.av2-chip[data-k="complete"].is-on .n { color: rgba(255,255,255,.7); }
.av2-chip[data-k="dead"].is-on { background: var(--g300); border-color: var(--g300); }

.av2-sel {
  appearance: none;
  -webkit-appearance: none;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' width='10' height='6'%3E%3Cpath fill='%237c8896' d='M0 0h10L5 6z'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  border: 1px solid var(--g200);
  border-radius: 7px;
  padding: 6px 28px 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--navy);
  font-family: inherit;
  cursor: pointer;
}
.av2-sel:hover { border-color: var(--gold); }
.av2-sel:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(218,170,58,.18); }

/* ── sortable column headers ───────────────────────────────────── */
.av2-tbl th.av2-sort {
  cursor: pointer;
  user-select: none;
  transition: background .12s, color .12s;
}
.av2-tbl th.av2-sort:hover { background: var(--gold-50); color: var(--navy); }
.av2-tbl th.av2-sort .lbl { display: inline-block; }
.av2-tbl th.av2-sort .ar {
  display: inline-block;
  margin-left: 4px;
  color: var(--gold-700, #B68D2C);
  font-size: 10px;
  font-weight: 700;
  width: 8px;
}
.av2-tbl th.av2-sort.is-sorted {
  color: var(--navy);
  background: var(--gold-50);
}
.av2-tbl th.av2-sort.is-sorted .lbl { font-weight: 800; }

/* ── topbar polish ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #1B3240 0%, #142634 100%) !important;
  padding: 0 24px !important;
  height: 64px !important;
  box-shadow: 0 2px 0 rgba(218,170,58,.18), 0 1px 0 rgba(0,0,0,.2);
}
.topbar-centered-brand span {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  font-size: 22px !important;
  letter-spacing: .005em !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.18) !important;
}
.topbar-centered-brand span::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 999px;
  margin-right: 12px;
  vertical-align: middle;
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(218,170,58,.18);
}

/* Hide the separate grey backup strip; its buttons live in the topbar now */
.data-bar { display: none !important; }

/* Inject the secondary actions into the topbar via a wrapper that
   slips before the .topbar-actions tray. We style them like quiet
   text buttons with hairline separators. */
.topbar-actions {
  align-items: center !important;
  gap: 6px !important;
}
.topbar-actions-secondary {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.btn-tb-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,.7);
  width: 30px; height: 30px;
  padding: 0;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.btn-tb-quiet:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}
.btn-tb-quiet .ico {
  color: var(--gold);
  font-size: 13px;
  line-height: 1;
}
.btn-tb-quiet:hover .ico { color: var(--gold-light, #f0c876); }

/* Mid-size labeled button — for Seller Assist (slightly larger than
   the icon-only utility row, slightly less prominent than primaries) */
.btn-tb-mid {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(218,170,58,.10);
  border: 1px solid rgba(218,170,58,.42);
  color: #f6e1a8;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-tb-mid:hover {
  background: rgba(218,170,58,.18);
  border-color: var(--gold);
  color: #fff;
}
.btn-tb-mid .ico { font-size: 14px; line-height: 1; }

/* ── floating utility tray (bottom-right of viewport) ──────────── */
.wlp-tray {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  background: rgba(27,50,64,.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.32),
              0 2px 4px -1px rgba(0,0,0,.18);
  transition: padding .18s ease;
}

/* Collapse animation — Export/Import shrink to zero-width when the
   tray is in its collapsed state, and slide back in on hover/focus. */
.wlp-tray .wlp-tray-collapse {
  max-width: 100px;
  opacity: 1;
  padding-left: 5px;
  padding-right: 7px;
  margin-left: 0;
  overflow: hidden;
  transition:
    max-width .22s cubic-bezier(.2,.9,.3,1.1),
    opacity .15s ease,
    padding .2s ease,
    margin .2s ease;
}
.wlp-tray.is-collapsed .wlp-tray-collapse {
  max-width: 0;
  opacity: 0;
  padding-left: 0;
  padding-right: 0;
  margin-left: -1px;
  pointer-events: none;
}

.wlp-tray-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,.78);
  padding: 3px 7px 3px 5px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.wlp-tray-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.wlp-tray-btn .ico {
  color: var(--gold);
  font-size: 10.5px;
  line-height: 1;
}
.wlp-tray-btn:hover .ico { color: var(--gold-light, #f0c876); }

/* Mobile: keep collapse behaviour but use icon-only sizing */
@media (max-width: 640px) {
  .wlp-tray { right: 6px; bottom: 6px; padding: 2px; }
  .wlp-tray-btn .lbl { display: none; }
  .wlp-tray-btn { width: 22px; height: 22px; justify-content: center; padding: 0; }
  .wlp-tray .wlp-tray-collapse {
    max-width: 30px;
    padding: 0;
  }
  .wlp-tray.is-collapsed .wlp-tray-collapse {
    max-width: 0; width: 0;
  }
}

/* Cloud sync pill: tweak so it sits naturally inside the tray. */
#wlp-utility-tray #sb-sync-pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.85);
  margin-right: 1px;
  padding: 3px 8px;
  font-size: 9.5px;
  gap: 5px;
}
#wlp-utility-tray #sb-sync-pill .dot { width: 5px; height: 5px; }
@media (max-width: 640px) {
  #wlp-utility-tray #sb-sync-pill .lbl { display: none; }
  #wlp-utility-tray #sb-sync-pill { width: 22px; height: 22px; justify-content: center; padding: 0; }
}

/* 3-column grid topbar: logo left, title centered in the middle
   column, actions right — title can't overlap actions anymore. */
.topbar {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center;
  gap: 16px !important;
}
.topbar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  justify-self: start;
  min-width: 0;
}
.topbar-brand img { max-height: 44px !important; }
.topbar-centered-brand {
  position: static !important;
  transform: none !important;
  padding: 0 !important;
  pointer-events: auto !important;
  justify-self: center;
  text-align: center;
  min-width: 0;
}
.topbar-centered-brand span {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  font-size: 22px !important;
  letter-spacing: .005em !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.18) !important;
  white-space: nowrap;
}
.topbar-centered-brand span::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 999px;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-3px);
  box-shadow: 0 0 0 4px rgba(218,170,58,.18);
}
.topbar-actions { justify-self: end; }

/* On narrow screens, drop the centered title (logo still identifies the brand) */
@media (max-width: 960px) {
  .topbar { grid-template-columns: auto 1fr !important; }
  .topbar-centered-brand { display: none !important; }
}

/* Polish the primary topbar buttons */
.btn-tb {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  color: rgba(255,255,255,.92) !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background .12s, border-color .12s !important;
}
.btn-tb:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.28) !important;
}
.btn-tb.gold {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
}
.btn-tb.gold:hover {
  background: #e9bb52 !important;
  border-color: #e9bb52 !important;
  color: var(--navy) !important;
}

@media (max-width: 880px) {
  .topbar-actions-secondary { display: none; }
}
@media (max-width: 640px) {
  .topbar { height: 56px !important; padding: 0 12px !important; }
  .kpi-bar { top: 56px !important; }
}

/* The kpi-bar's sticky offset was set for the legacy two-row header
   (topbar 58px + data-bar 28px = 86). With the data-bar hidden, the
   exact value depends on the topbar's actual rendered height; JS
   sets --topbar-h at runtime. We start at 64 (default topbar height)
   to avoid the gap on first paint. */
:root { --topbar-h: 64px; }
.kpi-bar           { top: var(--topbar-h) !important; }
.analytics-sort-bar{ top: var(--topbar-h) !important; }

/* Weld the topbar + kpi-bar visually so they read as one navy block:
   drop the gold underline (which created a 2px cream separator),
   strip the topbar's drop shadow, and have the kpi-bar continue the
   same navy gradient instead of starting a new tone.
   The kpi-bar is NOT sticky — it scrolls away with the page so it
   never covers content as the user scrolls down. */
.topbar { box-shadow: none !important; }
.topbar::after { display: none !important; }
.kpi-bar {
  position: static !important;
  top: auto !important;
  background: linear-gradient(180deg, #142634 0%, #0E1C28 100%) !important;
  border-bottom: 0 !important;
  margin: 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 2px 0 rgba(218,170,58,.55),
    0 4px 14px -4px rgba(0,0,0,.35) !important;
}
.analytics-sort-bar {
  position: static !important;
  top: auto !important;
}
.kpi-block { border-right-color: rgba(255,255,255,.06) !important; }
body { padding-top: 0 !important; margin-top: 0 !important; }
.kpi-bar, .analytics-sort-bar { margin-top: 0 !important; }

/* responsive */
@media (max-width: 1180px) {
  .av2-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .av2-3col { grid-template-columns: 1fr; }
  .av2-donut-card { grid-template-columns: 112px 1fr; }
}
@media (max-width: 900px) {
  .av2-top-row { grid-template-columns: 22px 1fr 60px; }
  .av2-top-row .trk { display: none; }
  .av2-ctrl { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 560px) {
  .av2-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av2-kpi-val { font-size: 19px; }
  .av2-hist { height: 120px; }
}

/* ── 2-column rows ─────────────────────────────────────────────── */
.av2-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

/* ── generic card ──────────────────────────────────────────────── */
.av2-card {
  background: #fff;
  border: 1px solid var(--g100);
  border-radius: 12px;
  padding: 18px 20px;
}
.av2-card-hd {
  margin-bottom: 12px;
}
.av2-card-hd h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.005em;
  margin: 0;
  color: var(--navy);
}
.av2-card-sub {
  font-size: 11.5px;
  color: var(--g400);
  margin-top: 2px;
}

.av2-empty {
  text-align: center;
  padding: 26px 12px;
  color: var(--g400);
  font-size: 13px;
}

/* ── monthly trend chart ───────────────────────────────────────── */
.av2-card-trend { padding-bottom: 22px; }
.av2-trend {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 4px;
  align-items: end;
  height: 200px;
  padding: 8px 0 0;
  position: relative;
}
.av2-trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
  cursor: default;
}
.av2-trend-col .bars {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  padding-top: 16px;
}
.av2-trend-col .bar-closed,
.av2-trend-col .bar-proj {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-height: 0;
  transition: transform .15s ease;
}
.av2-trend-col .bar-closed { background: var(--green); }
.av2-trend-col .bar-proj { background: var(--amber); opacity: .72; }
.av2-trend-col:hover .bar-closed,
.av2-trend-col:hover .bar-proj { transform: scaleY(1.04); transform-origin: bottom; }
.av2-trend-col .lbl {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--g400);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.av2-trend-col .amt {
  font-size: 9.5px;
  color: var(--g600);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  height: 12px;
}
.av2-trend-col.future .lbl { color: var(--amber); }
.av2-trend-col.now::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 18px;
  width: 1px;
  background: var(--red);
  opacity: .55;
}

.av2-trend-foot {
  margin-top: 12px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--g600);
  align-items: center;
}
.av2-trend-foot .lg { display: inline-flex; align-items: center; gap: 6px; }
.av2-trend-foot .lg .dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 2px;
}
.av2-trend-foot strong { color: var(--navy); font-weight: 700; }

/* ── funnel ─────────────────────────────────────────────────────── */
.av2-funnel { display: flex; flex-direction: column; gap: 6px; }
.av2-funnel-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  padding: 4px 6px 4px 0;
  border-radius: 6px;
  transition: background .12s;
}
.av2-funnel-row:hover { background: var(--g50); }
.av2-funnel-row.is-on { background: rgba(218,170,58,.08); }
.av2-funnel-row .lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--col);
}
.av2-funnel-row .trk {
  height: 26px;
  background: var(--g50);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--g100);
}
.av2-funnel-row .fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--col);
  border-radius: 4px;
  transition: width .35s ease;
  opacity: .9;
}
.av2-funnel-row .val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 11.5px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  pointer-events: none;
}
.av2-funnel-row.is-on .lbl {
  text-decoration: underline;
}

/* ── comp split donut ──────────────────────────────────────────── */
.av2-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.av2-split-side {
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.av2-split-side .lab {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g600);
}
.av2-donut {
  position: relative;
  width: 112px; height: 112px;
}
.av2-donut .center {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -.01em;
  line-height: 1.05;
}
.av2-donut.empty .center { color: var(--g300); font-family: inherit; }
.av2-donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
}
.av2-donut-legend .row {
  display: grid;
  grid-template-columns: 12px 28px 1fr auto;
  align-items: center;
  gap: 6px;
}
.av2-donut-legend .sw {
  width: 10px; height: 10px; border-radius: 2px;
}
.av2-donut-legend .nm { font-weight: 700; color: var(--navy); }
.av2-donut-legend .amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--g600);
  font-weight: 600;
}
.av2-donut-legend .pct {
  color: var(--g400);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ── leaderboard ───────────────────────────────────────────────── */
.av2-leader { display: flex; flex-direction: column; gap: 6px; }
.av2-leader-row {
  display: grid;
  grid-template-columns: 28px 140px 1fr 92px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.av2-leader-row .medal {
  text-align: center;
  font-size: 16px;
}
.av2-leader-row .medal .rk {
  display: inline-block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--g100);
  font-size: 10px;
  font-weight: 700;
  color: var(--g400);
  line-height: 20px;
}
.av2-leader-row .nm {
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av2-leader-row .bar {
  position: relative;
  height: 22px;
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: 4px;
  overflow: hidden;
}
.av2-leader-row .seg-closed,
.av2-leader-row .seg-pipe {
  position: absolute;
  top: 0; bottom: 0;
  transition: width .35s ease;
}
.av2-leader-row .seg-closed { left: 0; background: var(--green); }
.av2-leader-row .seg-pipe   { background: var(--amber); opacity: .85; }
.av2-leader-row .val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 11.5px;
  color: var(--navy);
  font-weight: 700;
}
.av2-leader-row .cnt {
  font-size: 10.5px;
  color: var(--g400);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* dynamic offset for pipe segment via inline style left:closedPct% — we set it via inline styles in JSX */
.av2-leader-row .seg-pipe { left: 0; transform: translateX(0); }
.av2-leader-row .bar .seg-pipe { left: var(--off, 0); }

/* mini breakdowns */
.av2-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.av2-mini {
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: 10px;
  padding: 12px;
}
.av2-mini-hd {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g600);
  margin-bottom: 8px;
}
.av2-mini-rows { display: flex; flex-direction: column; gap: 5px; }
.av2-mini-row {
  display: grid;
  grid-template-columns: 92px 1fr 58px;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
}
.av2-mini-row .nm {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.av2-mini-row .trk {
  height: 8px;
  background: #fff;
  border: 1px solid var(--g100);
  border-radius: 4px;
  overflow: hidden;
}
.av2-mini-row .trk .fill {
  height: 100%;
  background: var(--navy);
  border-radius: 4px;
  transition: width .35s ease;
}
.av2-mini-row .amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--g600);
  font-weight: 600;
}

/* ── tables (breakdowns + files) ───────────────────────────────── */
.av2-tbl-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--g100);
}
.av2-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.av2-tbl th,
.av2-tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--g50);
  vertical-align: middle;
  white-space: nowrap;
}
.av2-tbl thead th {
  background: var(--g50);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--g600);
  border-bottom: 1px solid var(--g100);
  position: sticky; top: 0;
}
.av2-tbl tbody tr:hover { background: var(--gold-50); }
.av2-tbl td.num,
.av2-tbl th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.av2-tbl tfoot td {
  background: var(--g50);
  border-top: 2px solid var(--g100);
  border-bottom: 0;
  font-size: 13px;
}

.av2-tbl-files tbody tr:hover { background: var(--gold-50); }

.av2-bar {
  position: relative;
  height: 22px;
  min-width: 120px;
}
.av2-bar .bar-bg {
  position: absolute;
  inset: 0;
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: 4px;
  overflow: hidden;
}
.av2-bar .bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 4px;
  transition: width .35s ease;
}
.av2-bar .bar-fill.closed { left: 0; background: var(--green); }
.av2-bar .bar-fill.pipe   { background: var(--amber); opacity: .85; }
.av2-bar .bar-amt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 11px;
  color: var(--navy);
  font-weight: 700;
}

/* ── pipeline view ─────────────────────────────────────────────── */
.av2-pl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.av2-month-buckets {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.av2-month-bucket {
  border: 1px solid var(--g100);
  border-radius: 10px;
  overflow: hidden;
}
.av2-month-hd {
  background: var(--g50);
  padding: 10px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--g100);
}
.av2-month-hd .m {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--navy);
}
.av2-month-hd .s {
  font-size: 11.5px;
  color: var(--g400);
  font-variant-numeric: tabular-nums;
}
.av2-month-items { display: flex; flex-direction: column; }
.av2-month-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  border-top: 1px solid var(--g50);
  transition: background .12s;
}
.av2-month-item:first-child { border-top: 0; }
.av2-month-item:hover { background: var(--gold-50); }
.av2-month-item .d {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold-700, #B68D2C);
  font-variant-numeric: tabular-nums;
}
.av2-month-item .body .who {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.av2-month-item .body .meta {
  font-size: 11px;
  color: var(--g400);
  margin-top: 1px;
}
.av2-month-item .amt {
  text-align: right;
}
.av2-month-item .amt .v {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.av2-month-item .amt .s {
  margin-top: 2px;
  font-size: 10px;
}

/* aging */
.av2-aging { display: flex; flex-direction: column; gap: 8px; }
.av2-age-row {
  display: grid;
  grid-template-columns: 84px 1fr 60px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.av2-age-row .rng {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--g600);
}
.av2-age-row .trk {
  position: relative;
  height: 22px;
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: 4px;
  overflow: hidden;
}
.av2-age-row .fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--green);
  border-radius: 4px;
  transition: width .35s ease;
  opacity: .85;
}
.av2-age-row.warn .fill { background: var(--amber); }
.av2-age-row.crit .fill { background: var(--red); opacity: 1; }
.av2-age-row .ct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 11px;
  color: var(--navy);
  font-weight: 700;
}
.av2-age-row .vol {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--g600);
  font-size: 11px;
  font-weight: 600;
}

.av2-stale {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--g100);
}
.av2-stale .lab {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 6px;
}
.av2-stale-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(196,69,58,.04);
  border-left: 3px solid var(--red);
  border-radius: 4px;
  margin-top: 4px;
  font-size: 12px;
  cursor: pointer;
}
.av2-stale-row:hover { background: rgba(196,69,58,.08); }
.av2-stale-row .who { font-weight: 600; color: var(--navy); }
.av2-stale-row .meta { font-size: 11px; color: var(--g600); }
.av2-stale-row .amt { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

/* geo */
.av2-geo-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  align-items: start;
}

/* buttons */
.av2-btn {
  background: var(--navy);
  color: #fff;
  border: 0;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.av2-btn:hover { background: #142634; }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .av2-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .av2-2col { grid-template-columns: 1fr; }
  .av2-pl-grid { grid-template-columns: 1fr; }
  .av2-geo-grid { grid-template-columns: 1fr; }
  .av2-mini-grid { grid-template-columns: 1fr; }
  .av2-split-grid { grid-template-columns: 1fr; }
  .av2-head, .av2-body, .av2-tabs { padding-left: 14px; padding-right: 14px; }
  .av2-h1 { font-size: 26px; }
  .av2-hero-val { font-size: 28px; }
  .av2-trend { height: 160px; }
  .av2-leader-row { grid-template-columns: 22px 100px 1fr 70px; }
}
@media (max-width: 560px) {
  .av2-hero { grid-template-columns: 1fr; }
  .av2-funnel-row { grid-template-columns: 76px 1fr; }
}
