/* V7 — Warm cream (light) + warm near-black (dark), forest-green accent. */
.pv2-root {
  /* Foundation neutrals — Mulch Mound brand core (light). Authoritative for
     the app: this .pv2-root layer overrides shared.css :root, so brand values
     must live HERE too. */
  --bg: #f5f5f0;
  --bg-2: #ecebe3;
  --panel: #ffffff;
  --panel-2: #f7f4ea;
  --panel-3: #e9e1cb;
  --ink: #1a1a17;
  --ink-2: #565349;
  --ink-3: #8a877c;
  --mute: #bcb9ac;
  --line: #e2e0d5;
  --line-strong: #d3cdb8;
  /* Signal families — fg / tint / deep */
  --green: #5ca85c;  --green-2: #1e3b2a;  --green-bg: #e6f1e6;
  --green-tint: #e6f1e6;  --green-deep: #1e3b2a;
  --rust: #8a3b4a;   --rust-bg: #f3e2e6;
  --berry: #8a3b4a;  --berry-tint: #f3e2e6;  --berry-deep: #5f2634;
  --amber: #c1912f;  --amber-bg: #f7ecd2;
  --amber-tint: #f7ecd2;  --amber-deep: #7d5c14;
  --sage: #7d9a6a;   --sage-bg: #e8efdf;
  --sage-tint: #e8efdf;   --sage-deep: #4f6a3d;
  --slate: #5f7480;  --slate-tint: #e8edef;  --slate-deep: #3c4a52;
  --clay: #a0522d;   --clay-tint: #f6ece4;   --clay-deep: #7a3e22;
  --plum: #8d4170;   --plum-bg: #f1e1ec;
  --blue: #3a5d83;   --blue-bg: #dee7ef;
  --person-1: #7b8a94;  --person-2: #a08a72;  --person-3: #8a9c7a;
  --person-4: #9c8a9a;  --person-5: #86949c;  --person-6: #a89178;
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
  width: 100%;
  font-size: 13px;
  letter-spacing: -0.005em;
}
.pv2-root.pv2-dark {
  /* Warm-charcoal dark theme (per dark-theme spec). Never pure black.
     fg = bright foreground · tint = dim same-hue fill · deep = fill border.
     *-2 stays bright (emphasis/hover text), distinct from *-deep. */
  --bg: #16150f;
  --bg-2: #1d1b13;
  --panel: #211f16;
  --panel-2: #29261b;
  --panel-3: #322e20;
  --ink: #f4f1e6;
  --ink-2: #c0baa6;
  --ink-3: #8d8773;
  --mute: #5f5a4a;
  --line: #302d21;
  --line-strong: #423e2e;
  --green: #74c274;  --green-2: #9bcf90;  --green-bg: #172c1b;
  --green-tint: #172c1b;  --green-deep: #2f5233;
  --rust: #d67088;   --rust-bg: #301820;
  --berry: #d67088;  --berry-tint: #301820;  --berry-deep: #57303c;
  --amber: #e2b552;  --amber-bg: #2c2410;
  --amber-tint: #2c2410;  --amber-deep: #574611;
  --sage: #a6c48c;   --sage-bg: #1f2818;
  --sage-tint: #1f2818;   --sage-deep: #3c4a2c;
  --slate: #90a7b4;  --slate-tint: #1b2429;  --slate-deep: #35454e;
  --clay: #c9895f;   --clay-tint: #2a1c12;   --clay-deep: #5a3a24;
  --plum: #c789ad;   --plum-bg: #271a23;
  --blue: #7a9bc4;   --blue-bg: #18222e;
  --person-1: #93a2ac;  --person-2: #b6a088;  --person-3: #9fb488;
  --person-4: #b2a0b0;  --person-5: #9caab2;  --person-6: #bda78e;
}

/* Top nav */
.pv2-nav {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.pv2-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 19px; font-weight: 600; color: var(--green);
  letter-spacing: -0.01em;
}
.pv2-brand-glyph { font-size: 22px; line-height: 1; }
.pv2-tabs { display: flex; gap: 2px; flex: 1; margin-left: 12px; }
.pv2-tab {
  appearance: none; border: 0; background: transparent;
  padding: 6px 14px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
}
.pv2-tab:hover { background: var(--bg-2); color: var(--ink); }
.pv2-tab.is-active { background: var(--green); color: var(--bg); }
.pv2-tab-pile { display: inline-flex; align-items: center; gap: 6px; }
.pv2-tab-count {
  background: var(--ink); color: var(--bg);
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.pv2-nav-right { display: flex; align-items: center; gap: 10px; }
.pv2-icon-btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel);
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); cursor: pointer; font: inherit; font-size: 13px;
  padding: 0;
}
.pv2-icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.pv2-you {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel);
}
.pv2-you-label { font-size: 10px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
.pv2-you-name { font-weight: 600; }

/* Page head */
.pv2-pagehead {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 18px 28px 12px;
}
.pv2-h1 {
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -0.02em;
  color: var(--ink);
}
.pv2-sub { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }
.pv2-pagehead-right { display: flex; align-items: center; gap: 16px; }
.pv2-stat-stack { display: flex; gap: 18px; }
.pv2-stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pv2-stat-num {
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.pv2-stat-down { color: var(--rust); }
.pv2-stat-lbl { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }

.pv2-btn {
  appearance: none; border: 1px solid var(--line-strong); background: var(--panel);
  padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.pv2-btn:hover { background: var(--bg-2); }
.pv2-btn-primary { background: var(--green); color: var(--bg); border-color: var(--green-2); }
.pv2-btn-primary:hover { background: var(--green-2); }
.pv2-btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.pv2-link-btn {
  appearance: none; border: 0; background: transparent;
  font: inherit; font-size: 11px; color: var(--amber); cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted;
}

/* Alert */
.pv2-alert {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin: 0 28px 12px;
  background: var(--rust-bg);
  border: 1px solid color-mix(in oklab, var(--rust) 30%, transparent);
  border-radius: 10px; color: var(--ink);
  font-size: 12.5px;
}
.pv2-alert-icon { color: var(--rust); font-size: 14px; }
.pv2-alert strong { color: var(--rust); }
.pv2-alert-detail { color: var(--ink-2); }
.pv2-alert > div:nth-child(2) { flex: 1; }
.pv2-alert-x { border: 0; background: transparent; color: var(--ink-3); }
.pv2-link { color: var(--rust); font-weight: 700; cursor: pointer; }
.pv2-link:hover { text-decoration: underline; }

/* Body grid */
.pv2-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

/* LEFT RAIL */
.pv2-rail {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 16px 16px 28px;
  min-height: 720px;
}
.pv2-rail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.pv2-eyebrow {
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em;
}
.pv2-rail-hint { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.pv2-rail-section + .pv2-rail-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pv2-rail-grouplbl {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; padding: 4px 4px 8px;
}
.pv2-rail-groupsub { font-size: 10.5px; color: var(--ink-3); font-style: italic; letter-spacing: 0; text-transform: none; font-weight: 400; }

.pv2-rail-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center; gap: 10px;
  width: 100%; appearance: none; background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  cursor: pointer; text-align: left; font: inherit;
  color: var(--ink);
  border-left: 2px solid transparent;
  transition: background .08s, border-color .08s;
}
.pv2-rail-row:hover { background: var(--panel); }
.pv2-rail-row.is-active {
  background: var(--panel);
  border-left-color: var(--row-tone, var(--ink));
}
.pv2-rail-icon {
  font-size: 15px; color: var(--row-tone, var(--ink-3));
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
}
.pv2-rail-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pv2-rail-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.pv2-rail-hintline { font-size: 11px; color: var(--ink-3); }
.pv2-rail-risk {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px; color: var(--row-tone, var(--ink-3));
  margin-top: 2px; font-weight: 600;
}
.pv2-rail-num {
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 24px; font-weight: 600;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1;
}

.pv2-root .tone-rust  { --row-tone: var(--rust); }
.pv2-root .tone-amber { --row-tone: var(--amber); }
.pv2-root .tone-sage  { --row-tone: var(--sage); }
.pv2-root .tone-plum  { --row-tone: var(--plum); }
.pv2-root .tone-blue  { --row-tone: var(--blue); }

/* MAIN */
.pv2-main { padding: 16px 28px 28px; min-width: 0; }

/* Compact chart at bottom of left rail */
.pv2-rail {
  display: flex; flex-direction: column;
}
.pv2-rail-spark {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pv2-rail-spark-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 4px;
}
.pv2-rail-spark-lbl { display: flex; flex-direction: column; gap: 1px; }
.pv2-rail-spark-eyebrow {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.pv2-rail-spark-sub { font-size: 10.5px; color: var(--ink-3); font-style: italic; }
.pv2-rail-spark-stats { display: inline-flex; align-items: baseline; gap: 8px; }
.pv2-rail-spark-num {
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 22px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.pv2-rail-spark-delta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 600;
}
.pv2-rail-spark-axis {
  display: flex; justify-content: space-between; padding-top: 2px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; color: var(--ink-3); letter-spacing: 0.04em;
}

/* Chart card */
.pv2-chart-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px 14px;
  margin-bottom: 12px;
}
.pv2-chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.pv2-chart-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.pv2-chart-stats { display: flex; gap: 22px; }
.pv2-cstat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pv2-cstat-num {
  font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
  font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.pv2-cstat-lbl { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.pv2-chart-axis {
  display: flex; justify-content: space-between; padding-top: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; color: var(--ink-3); letter-spacing: 0.04em;
}

/* Filters */
.pv2-filters {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px;
}
.pv2-filter-group { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.pv2-filter-lbl { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 0 6px; }
.pv2-seg {
  appearance: none; border: 1px solid var(--line); background: transparent;
  padding: 4px 10px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
}
.pv2-seg.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pv2-filter-divider { width: 1px; height: 22px; background: var(--line); }
.pv2-field { display: flex; align-items: center; gap: 6px; }
.pv2-field > span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.pv2-field > select {
  appearance: none; border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 6px; padding: 4px 24px 4px 10px; font: inherit; font-size: 12px; color: var(--ink);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.pv2-checkbox { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.pv2-checkbox-potential {
  padding: 3px 10px 3px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
}
.pv2-checkbox-potential:has(input:checked) {
  background: var(--amber-bg);
  border-color: var(--amber);
  color: var(--amber);
  border-style: solid;
}
.pv2-filters-spacer { flex: 1; }
.pv2-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 8px; min-width: 260px;
}
.pv2-search input { border: 0; background: transparent; outline: none; font: inherit; flex: 1; color: var(--ink); font-size: 12.5px; }
.pv2-search input::placeholder { color: var(--ink-3); }
.pv2-search-icon { color: var(--ink-3); }
.pv2-search kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-3);
}

/* Table */
.pv2-table-wrap {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.pv2-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pv2-table thead th {
  text-align: left; font-weight: 600; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding: 9px 12px; background: var(--panel-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.pv2-table thead th:first-child { padding-left: 16px; }
.pv2-table tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.pv2-table tbody td:first-child { padding-left: 16px; }
.pv2-table thead th:last-child  { padding-right: 16px; }
.pv2-table tbody td:last-child  { padding-right: 16px; }
.pv2-table tbody tr:hover { background: var(--bg-2); }
.pv2-table tbody tr:last-child td { border-bottom: 0; }
.pv2-row-urgent { box-shadow: inset 3px 0 0 var(--rust); }
.pv2-orderid { display: inline-flex; align-items: center; gap: 6px; }
.pv2-tz {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; padding: 1px 5px; border-radius: 3px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-3);
  letter-spacing: 0.04em;
}
.pv2-supplier { display: flex; align-items: center; gap: 8px; }
.pv2-supplier-name { font-weight: 600; color: var(--ink); }
.pv2-supplier-conf {
  font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  color: var(--green-2); background: var(--green-bg); padding: 1px 6px; border-radius: 3px;
}
.pv2-supplier-city { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.pv2-num { font-variant-numeric: tabular-nums; color: var(--ink); }
.pv2-mute { color: var(--mute); }
.pv2-remaining { color: var(--rust); font-weight: 600; }
.pv2-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.pv2-pill-dot { width: 6px; height: 6px; border-radius: 50%; }
.pv2-pill.s-confirmed { background: var(--green-bg); color: var(--green-2); }
.pv2-pill.s-confirmed .pv2-pill-dot { background: var(--green); }
.pv2-pill.s-call      { background: var(--rust-bg); color: var(--rust); }
.pv2-pill.s-call .pv2-pill-dot { background: var(--rust); }
.pv2-pill.s-nudge     { background: var(--amber-bg); color: var(--amber); }
.pv2-pill.s-nudge .pv2-pill-dot { background: var(--amber); }
.pv2-pill.s-watch     { background: var(--sage-bg); color: var(--sage); }
.pv2-pill.s-watch .pv2-pill-dot { background: var(--sage); }
.pv2-pill.s-callin    { background: var(--plum-bg); color: var(--plum); }
.pv2-pill.s-callin .pv2-pill-dot { background: var(--plum); }
.pv2-pill.s-web       { background: var(--blue-bg); color: var(--blue); }
.pv2-pill.s-web .pv2-pill-dot { background: var(--blue); }
.pv2-pill.s-source    { background: var(--rust-bg); color: var(--rust); }
.pv2-pill.s-source .pv2-pill-dot { background: var(--rust); }

.pv2-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 999px; border: 1px solid;
  font-size: 11px; font-weight: 600;
}
.pv2-check { color: var(--green); font-weight: 700; }
.pv2-note { color: var(--ink-2); font-size: 12px; }
.pv2-note-empty { color: var(--mute); font-size: 12px; font-style: italic; }

.pv2-table-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; font-size: 11.5px; color: var(--ink-3);
}
.pv2-table-foot-right { display: flex; gap: 8px; }
