/* ============================================================
   ESTIMATE v2 — version control, routes (SUP/INS/C&C/ADD), config
   ============================================================ */

.tp-estimate2 { padding: 24px 32px 80px; }
.ep2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.ep2-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ep2-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }

/* ── version strip ── */
.ep2-vers {
  border: 1px solid var(--border, rgba(26,26,26,0.10));
  border-radius: 3px;
  background: #FFFDF9;
  padding: 16px 18px;
}
.ep2-vers__hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.ep2-vers__sub { font-size: 12px; color: var(--muted, #6b6760); margin-top: 4px; max-width: 540px; line-height: 1.45; }
.ep2-vers__actions { display: flex; gap: 8px; }
.ep2-vers__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ep2-vers__item {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 84px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  position: relative;
}
.ep2-vers__item:hover { background: rgba(26,26,26,0.025); }
.ep2-vers__item.is-active { background: #F7F5F1; border-color: rgba(26,26,26,0.12); }
.ep2-vers__n { font-size: 13px; font-weight: 600; color: #1A1A1A; }
.ep2-vers__pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.ep2-vers__pill--draft      { background: rgba(217,138,42,0.12); color: #8c5b1a; }
.ep2-vers__pill--sent       { background: rgba(46,125,80,0.12);   color: #1f5e3a; }
.ep2-vers__pill--approved   { background: rgba(46,125,80,0.18);   color: #134127; }
.ep2-vers__pill--superseded { background: rgba(26,26,26,0.08);   color: #6b6760; text-decoration: line-through; }
.ep2-vers__meta { display: none; }
.ep2-vers__note { font-size: 13px; color: #3D3831; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep2-vers__tot { font-size: 13px; font-weight: 600; text-align: right; }
.ep2-vers__live { color: #ED0800; font-size: 10px; position: absolute; right: 4px; top: 4px; }

.ep2-readonly {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(237,8,0,0.25);
  background: rgba(237,8,0,0.04);
  border-radius: 3px;
  font-size: 13px;
}
.ep2-readonly span:nth-child(2) { color: #3D3831; flex: 1; }

/* ── product configurator ── */
.ep2-config {
  border: 1px solid var(--border, rgba(26,26,26,0.10));
  border-radius: 3px;
  background: #FFFDF9;
  padding: 18px 20px;
}
.ep2-config__hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(26,26,26,0.06); }
.ep2-config__sub { font-size: 12px; color: #6b6760; margin-top: 4px; }
.ep2-config__price { text-align: right; }
.ep2-config__amount { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.ep2-config__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.ep2-config__summary > div {
  border: 1px solid rgba(26,26,26,0.08);
  border-radius: 3px;
  padding: 10px 12px;
  background: #F7F5F1;
  min-width: 0;
}
.ep2-config__summary strong { display: block; font-size: 13px; margin: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep2-config__summary small { display: block; color: #6b6760; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep2-config__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.ep2-config__field .t-label { margin-bottom: 8px; }
.ep2-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ep2-pill {
  padding: 6px 10px;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 3px;
  background: #FFFDF9;
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ep2-pill:hover { background: #F7F5F1; }
.ep2-pill.is-on { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.ep2-pill:disabled { cursor: not-allowed; opacity: 0.62; }
.ep2-pill.is-on:disabled { opacity: 1; }
.ep2-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.ep2-swatch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 6px;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 3px;
  background: #FFFDF9;
  font-size: 12px;
  cursor: pointer;
}
.ep2-swatch__dot { width: 16px; height: 16px; border-radius: 2px; border: 1px solid rgba(0,0,0,0.15); display: inline-block; }
.ep2-swatch.is-on { border-color: #1A1A1A; background: #F7F5F1; }
.ep2-swatch:disabled { cursor: not-allowed; opacity: 0.62; }
.ep2-swatch.is-on:disabled { opacity: 1; }
.ep2-swatch.is-disabled { border-style: dashed; }
.ep2-config__empty { color: #6b6760; font-size: 12px; padding: 7px 0; }

/* ── totals bar ── */
.ep2-totalsbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.25fr auto;
  gap: 0;
  border: 1px solid var(--border, rgba(26,26,26,0.10));
  border-radius: 3px;
  overflow: hidden;
  background: #FFFDF9;
}
.ep2-totalsbar__cell { padding: 14px 18px; border-right: 1px solid rgba(26,26,26,0.06); }
.ep2-totalsbar__cell:last-of-type { border-right: 0; }
.ep2-totalsbar__cell .t-label { margin-bottom: 4px; }
.ep2-totalsbar__v { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.ep2-totalsbar__cell.is-grand { background: #1A1A1A; color: #fff; }
.ep2-totalsbar__cell.is-grand .t-label { color: rgba(255,255,255,0.7); }
.ep2-totalsbar__gst { margin-top: 3px; font-size: 11px; color: rgba(255,255,255,0.72); }
.ep2-totalsbar__split { display: flex; flex-direction: column; justify-content: center; padding: 8px 14px; background: #F7F5F1; min-width: 330px; gap: 5px; }
.ep2-totalsbar__seg { display: grid; grid-template-columns: 12px 54px minmax(96px, 1fr) 88px 88px; gap: 8px; align-items: center; font-size: 11px; }
.ep2-totalsbar__seg-label { color: #6b6760; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep2-totalsbar__seg .mono { text-align: right; }

/* ── routes ── */
.ep2-route {
  border: 1px solid var(--border, rgba(26,26,26,0.10));
  border-radius: 3px;
  background: #FFFDF9;
  overflow: hidden;
}
.ep2-route__hd {
  display: grid;
  grid-template-columns: 12px 40px auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  font-size: 14px;
}
.ep2-route__dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ep2-route__dot--supply  { background: #2563eb; }
.ep2-route__dot--install { background: #10b981; }
.ep2-route__dot--cert    { background: #0ea5e9; }
.ep2-route__dot--addon   { background: #d97706; }
.ep2-route__dot--trade   { background: #7c3aed; }
.ep2-route__dot--unrouted { background: #ED0800; }
.ep2-route--supply  .ep2-route__hd { background: rgba(37,99,235,0.07); }
.ep2-route--install .ep2-route__hd { background: rgba(16,185,129,0.08); }
.ep2-route--cert    .ep2-route__hd { background: rgba(14,165,233,0.08); }
.ep2-route--addon   .ep2-route__hd { background: rgba(217,119,6,0.08); }
.ep2-route--trade   .ep2-route__hd { background: rgba(124,58,237,0.08); }
.ep2-route__code { font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 12px; letter-spacing: 0.06em; }
.ep2-route__label { font-weight: 600; font-size: 14px; }
.ep2-route__helper { color: #6b6760; font-size: 12px; }
.ep2-route__total { font-family: "JetBrains Mono", monospace; font-weight: 600; }
.ep2-route__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.ep2-route__collapse {
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 3px;
  background: #FFFDF9;
  color: #3D3831;
  font-size: 11px;
  padding: 5px 8px;
  cursor: pointer;
}
.ep2-route__collapse:hover { border-color: rgba(26,26,26,0.28); color: #1A1A1A; }
.ep2-route__toggle { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 11px; white-space: nowrap; }
.ep2-route__toggle input { margin: 0; }
.ep2-route__calc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(26,26,26,0.06);
  color: #6b6760;
  font-size: 11px;
  background: rgba(26,26,26,0.015);
}
.ep2-route__calc .mono { color: #1A1A1A; }
.ep2-route__body { padding: 4px 12px 12px; }
.ep2-supply-preview {
  display: grid;
  grid-template-columns: 72px minmax(140px, 1fr) minmax(220px, 1.3fr) 96px 96px minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 8px 6px;
  border-top: 1px solid rgba(26,26,26,0.06);
  color: #3D3831;
  font-size: 12px;
}
.ep2-supply-preview__name { font-weight: 600; color: #1A1A1A; }
.ep2-supply-preview__meta,
.ep2-supply-preview__note { color: #6b6760; font-size: 11px; line-height: 1.35; }
.ep2-route__addcat {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  border: 1px dashed rgba(26,26,26,0.18);
  border-radius: 3px;
  background: transparent;
  font-size: 12px;
  color: #6b6760;
  cursor: pointer;
}
.ep2-route__addcat:hover { border-color: rgba(26,26,26,0.4); color: #1A1A1A; }

/* ── category ── */
.ep2-cat { border-bottom: 1px solid rgba(26,26,26,0.06); }
.ep2-cat:last-child { border-bottom: 0; }
.ep2-cat__hd {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 36px 118px 88px 66px 188px;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
}
.ep2-cat__hd:hover { background: rgba(26,26,26,0.025); }
.ep2-cat__hd--static {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__title { grid-column: 1; }
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__menu,
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__menu-spacer,
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__locked-pill {
  grid-column: 2;
  justify-self: center;
}
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__moved,
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__sw {
  grid-column: 3;
  justify-self: end;
}
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__sw-toggle {
  grid-column: 4;
  justify-self: start;
}
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__count {
  grid-column: 5;
  justify-self: end;
}
.ep2-cat__hd:not(.ep2-cat__hd--static) > .ep2-cat__total {
  grid-column: 6;
  justify-self: end;
  text-align: right;
}
.ep2-cat__title {
  min-width: 0;
  display: grid;
  grid-template-columns: 16px 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ep2-cat__title--static { cursor: default; }
.ep2-cat__title--ghost { cursor: default; }
.ep2-cat__title:hover .ep2-cat__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ep2-cat__title--static:hover .ep2-cat__name,
.ep2-cat__title--ghost:hover .ep2-cat__name { text-decoration: none; }
.ep2-cat__chev { transition: transform 0.15s; color: #6b6760; display: inline-block; }
.ep2-cat__chev.is-open { transform: rotate(90deg); }
.ep2-cat__chev--static { transform: none; color: #2563eb; }
.ep2-cat__code { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #6b6760; }
.ep2-cat__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.ep2-cat__count { color: #6b6760; }
.ep2-cat__total { font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 13px; white-space: nowrap; }
.ep2-cat__total--muted { color: #6b6760; font-weight: 500; }
.ep2-cat__menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
  width: 32px;
}
.ep2-cat__menu-spacer { width: 32px; height: 1px; }
.ep2-cat__menu-trigger {
  width: 28px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #6b6760;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.ep2-cat__menu-trigger:hover,
.ep2-cat__menu:focus-within .ep2-cat__menu-trigger {
  border-color: rgba(26,26,26,0.14);
  background: #FFFDF9;
  color: #1A1A1A;
}
.ep2-cat__menu-panel {
  position: absolute;
  z-index: 30;
  right: 0;
  top: 28px;
  display: none;
  min-width: 236px;
  padding: 8px;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 4px;
  background: #FFFDF9;
  box-shadow: 0 14px 30px rgba(26,26,26,0.12);
}
.ep2-cat__menu:hover .ep2-cat__menu-panel,
.ep2-cat__menu:focus-within .ep2-cat__menu-panel {
  display: block;
}
.ep2-cat__chips--menu {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.ep2-cat__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 3px;
  background: #FFFDF9;
  color: #3D3831;
  font-size: 10px;
  padding: 3px 7px;
  cursor: pointer;
}
.ep2-cat__chip.is-on {
  border-color: transparent;
  color: #fff;
}
.ep2-cat__chip--install.is-on { background: #10b981; }
.ep2-cat__chip--cert.is-on { background: #0ea5e9; }
.ep2-cat__chip--addon.is-on { background: #d97706; }
.ep2-cat__chip--trade.is-on { background: #7c3aed; }
.ep2-cat__chip--unrouted.is-on { background: #ED0800; }
.ep2-cat__chip.is-on .ep2-route__dot { background: rgba(255,255,255,0.85); }
.ep2-cat__chip:hover { border-color: rgba(26,26,26,0.28); }
.ep2-cat__sw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.ep2-cat__sw-toggle input { margin: 0; }
.ep2-cat__moved {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124,58,237,0.20);
  border-radius: 3px;
  background: rgba(124,58,237,0.07);
  color: #5b35b1;
  padding: 2px 6px;
  white-space: nowrap;
}
.ep2-cat__body { padding: 4px 6px 12px; overflow-x: auto; }
.ep2-cat__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 0 6px; }
.ep2-cat__add { background: transparent; border: 0; color: #6b6760; font-size: 12px; cursor: pointer; padding: 4px 0; }
.ep2-cat__add:hover { color: #1A1A1A; }
.ep2-cat__cont { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ep2-cont-edit { display: inline-flex; align-items: center; gap: 2px; border: 1px solid rgba(26,26,26,0.12); border-radius: 3px; padding: 2px 4px 2px 6px; }
.ep2-cont-edit input { width: 36px; border: 0; background: transparent; font-family: "JetBrains Mono", monospace; font-size: 12px; text-align: right; outline: none; }
.ep2-cont-dol { color: #6b6760; min-width: 70px; text-align: right; }
.ep2-cat--ghost {
  margin: 0;
  border-top: 1px dashed rgba(124,58,237,0.24);
  border-bottom: 1px dashed rgba(124,58,237,0.24);
  border-radius: 0;
  background: rgba(124,58,237,0.035);
}
.ep2-cat--ghost .ep2-cat__hd {
  cursor: default;
  border: 0;
}
.ep2-cat--ghost .ep2-cat__hd:hover { background: transparent; }
.ep2-cat--ghost .ep2-cat__chev { transform: none; color: #7c3aed; }
.ep2-cat--ghost .ep2-cat__name { color: #3D3831; }
.ep2-cat__ghost-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0 6px 10px;
}
.ep2-cat__ghost-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  filter: blur(0.7px);
  opacity: 0.56;
  pointer-events: none;
}
.ep2-cat__ghost-lines span {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  font-size: 12px;
  color: #6b6760;
}
.ep2-cat__ghost-lines span span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep2-cat__restore {
  border: 1px solid rgba(124,58,237,0.24);
  border-radius: 3px;
  background: #FFFDF9;
  color: #5b35b1;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ep2-cat__restore:hover {
  border-color: #7c3aed;
  color: #44208f;
  background: rgba(124,58,237,0.06);
}

/* ── line rows ── */
.ep2-table__hd, .ep2-row {
  display: grid;
  grid-template-columns: 96px minmax(300px, 1fr) 72px 56px 48px 96px 96px 24px;
  gap: 8px;
  align-items: center;
  padding: 6px 6px;
  font-size: 12px;
  min-width: 816px;
}
.ep2-table__hd {
  color: #6b6760;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(26,26,26,0.06);
  margin-bottom: 4px;
}
.ep2-table__hd .r, .ep2-row .r { text-align: right; }
.ep2-row { border-radius: 3px; }
.ep2-row:hover { background: rgba(26,26,26,0.02); }
.ep2-cat--config .ep2-table__hd,
.ep2-cat--config .ep2-row {
  grid-template-columns: 96px minmax(160px, 0.7fr) minmax(280px, 1.3fr) 56px 48px 96px 96px 24px;
}
.ep2-row__code { font-family: "JetBrains Mono", monospace; color: #6b6760; }
.ep2-row__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep2-row__static-name { font-weight: 600; color: #1A1A1A; }
.ep2-row__static-detail {
  min-width: 0;
  color: #3D3831;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep2-row__inp {
  width: 100%; border: 0; background: transparent; font: inherit; padding: 2px 0; outline: none; border-bottom: 1px solid transparent;
}
.ep2-row__inp:hover { border-bottom-color: rgba(26,26,26,0.08); }
.ep2-row__inp:focus { border-bottom-color: #1A1A1A; }
.ep2-row__note { font-size: 11px; color: #ED0800; font-style: italic; }
.ep2-row__details { position: relative; display: inline-flex; justify-content: center; min-width: 0; }
.ep2-row__detailsbtn {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(26,26,26,0.14);
  border-radius: 50%;
  background: #FFFDF9;
  color: #6b6760;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.ep2-row__detailsbtn.has-details { border-color: rgba(237,8,0,0.35); color: #ED0800; background: rgba(237,8,0,0.04); }
.ep2-row__detailsbtn:hover,
.ep2-row__details:focus-within .ep2-row__detailsbtn { border-color: #1A1A1A; color: #1A1A1A; }
.ep2-row__popover {
  position: absolute;
  z-index: 20;
  left: 0;
  top: 30px;
  width: min(320px, 70vw);
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 4px;
  background: #FFFDF9;
  box-shadow: 0 16px 36px rgba(26,26,26,0.14);
}
.ep2-row__details:hover .ep2-row__popover,
.ep2-row__details:focus-within .ep2-row__popover { display: flex; }
.ep2-row__textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 3px;
  background: #fff;
  padding: 8px;
  font: inherit;
  outline: none;
}
.ep2-row__textarea:focus { border-color: #1A1A1A; }
.ep2-row__qty { width: 100%; border: 1px solid rgba(26,26,26,0.10); border-radius: 3px; padding: 3px 6px; background: transparent; text-align: right; font-family: "JetBrains Mono", monospace; }
.ep2-row__unit { color: #6b6760; }
.ep2-row__rate { color: #6b6760; }
.ep2-row__total { font-weight: 600; }
.ep2-row__rm { background: transparent; border: 0; color: #6b6760; cursor: pointer; font-size: 16px; padding: 0; opacity: 0; transition: opacity 0.15s; }
.ep2-row:hover .ep2-row__rm { opacity: 1; }
.ep2-row__rm:hover { color: #ED0800; }

/* ── side rail ── */
.ep2-sidecard {
  border: 1px solid var(--border, rgba(26,26,26,0.10));
  border-radius: 3px;
  background: #FFFDF9;
  padding: 14px 16px;
}
.ep2-sidecard__hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ep2-sidecard__pct { font-weight: 600; font-size: 13px; }
.ep2-savehint { margin: 8px 0 0; font-size: 11px; line-height: 1.45; color: #6b6760; }
.ep2-dl { display: grid; grid-template-columns: 86px 1fr; gap: 6px 10px; margin: 8px 0 0; font-size: 12px; }
.ep2-dl dt { color: #6b6760; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.ep2-dl dd { margin: 0; }
.ep2-factors { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; }
.ep2-factors li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid rgba(26,26,26,0.05); }
.ep2-factors li:first-child { border-top: 0; }
.ep2-factors__note { margin: 8px 0 0; font-size: 11px; color: #6b6760; }
.ep2-suggested { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ep2-suggested li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.ep2-suggested__desc { font-weight: 500; }
.ep2-suggested__code { font-size: 10px; color: #6b6760; }
.ep2-suggested__add { font-size: 11px; padding: 4px 8px; border: 1px solid rgba(26,26,26,0.15); border-radius: 3px; background: transparent; cursor: pointer; font-family: "JetBrains Mono", monospace; letter-spacing: 0.04em; }
.ep2-suggested__add:hover { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.ep2-suggested__add:disabled { cursor: not-allowed; opacity: 0.5; }
.ep2-suggested__empty { color: #6b6760; font-size: 12px; }
.ep2-sidecard--cta { border-color: rgba(237,8,0,0.25); background: rgba(237,8,0,0.04); }
.ep2-sidecard--cta p { font-size: 12px; line-height: 1.5; margin: 6px 0 10px; color: #3D3831; }

.ep2-disc { font-size: 11px; color: #6b6760; line-height: 1.5; padding: 4px 0 0; }

/* ============================================================
   PROPOSAL — source estimate picker
   ============================================================ */
.pp-source {
  position: relative;
  border: 1px solid var(--border, rgba(26,26,26,0.10));
  border-radius: 3px;
  background: #FFFDF9;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.pp-source__l { flex: 1; min-width: 0; }
.pp-source__pick { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.pp-source__n { font-size: 16px; font-weight: 600; }
.pp-source__total { font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 14px; }
.pp-source__note { font-size: 13px; color: #3D3831; }
.pp-source__meta { font-size: 11px; color: #6b6760; font-family: "JetBrains Mono", monospace; letter-spacing: 0.04em; }
.pp-source__warn { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 8px 12px; background: rgba(237,8,0,0.06); border-left: 2px solid #ED0800; font-size: 12px; }
.pp-source__r { display: flex; gap: 8px; flex-shrink: 0; }
.pp-source__menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: #FFFDF9; border: 1px solid rgba(26,26,26,0.15); border-radius: 3px; box-shadow: 0 12px 32px rgba(26,26,26,0.10); padding: 12px; }
.pp-source__menu-eyebrow { margin-bottom: 8px; }
.pp-source__menu ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-source__opt {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 84px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.pp-source__opt:hover { background: #F7F5F1; }
.pp-source__opt.is-on { background: #F7F5F1; border-color: rgba(26,26,26,0.15); }
.pp-source__opt-n { font-size: 13px; font-weight: 600; }
.pp-source__opt-note { font-size: 12px; }
.pp-source__opt-meta { font-size: 10px; color: #6b6760; font-family: "JetBrains Mono", monospace; }
.pp-source__opt-tot { font-size: 12px; font-weight: 600; }
.pp-source__opt-flag { font-size: 10px; color: #ED0800; font-family: "JetBrains Mono", monospace; letter-spacing: 0.06em; }
.pp-source__menu-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(26,26,26,0.06); color: #6b6760; }

/* Dark mode (Banzai) overrides */
[data-mode="banzai"] .ep2-vers,
[data-mode="banzai"] .ep2-config,
[data-mode="banzai"] .ep2-route,
[data-mode="banzai"] .ep2-totalsbar,
[data-mode="banzai"] .ep2-sidecard,
[data-mode="banzai"] .pp-source,
[data-mode="banzai"] .pp-source__menu {
  background: #1E1E1B;
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}
[data-mode="banzai"] .ep2-vers__sub,
[data-mode="banzai"] .ep2-config__sub,
[data-mode="banzai"] .ep2-route__helper,
[data-mode="banzai"] .ep2-row__code,
[data-mode="banzai"] .ep2-row__unit,
[data-mode="banzai"] .ep2-row__rate,
[data-mode="banzai"] .ep2-cat__code,
[data-mode="banzai"] .ep2-cat__count,
[data-mode="banzai"] .ep2-cont-dol,
[data-mode="banzai"] .ep2-dl dt,
[data-mode="banzai"] .ep2-disc,
[data-mode="banzai"] .ep2-suggested__code,
[data-mode="banzai"] .ep2-factors__note,
[data-mode="banzai"] .pp-source__meta,
[data-mode="banzai"] .pp-source__opt-meta { color: rgba(255,255,255,0.55); }
[data-mode="banzai"] .ep2-vers__item.is-active,
[data-mode="banzai"] .pp-source__opt.is-on,
[data-mode="banzai"] .pp-source__opt:hover { background: rgba(255,255,255,0.06); }
[data-mode="banzai"] .ep2-pill,
[data-mode="banzai"] .ep2-swatch { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.92); }
[data-mode="banzai"] .ep2-pill.is-on { background: #fff; color: #141412; border-color: #fff; }
[data-mode="banzai"] .ep2-totalsbar__cell.is-grand { background: #ED0800; }
[data-mode="banzai"] .ep2-totalsbar__split { background: rgba(255,255,255,0.04); }

@media (max-width: 1500px) {
  .ep2-grid { grid-template-columns: 1fr; }
  .ep2-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .ep2-sidecard { flex: 1 1 240px; }
  .ep2-vers__item { grid-template-columns: 44px 84px 1fr auto; }
  .ep2-vers__note { display: none; }
}
