:root {
  color-scheme: light;
  --bg: #f5f6f1;
  --surface: #ffffff;
  --surface-soft: #f0f3ee;
  --ink: #151713;
  --muted: #63685f;
  --line: #dfe4da;
  --line-strong: #cbd3c5;
  --green: #23654b;
  --green-soft: #dff0e3;
  --blue: #285f8f;
  --blue-soft: #e0edf7;
  --amber: #8b6519;
  --amber-soft: #f6eccd;
  --red: #9f3d35;
  --red-soft: #f4dfdc;
  --violet: #654a8d;
  --violet-soft: #e9e0f4;
  --slate: #3f535d;
  --slate-soft: #dfebee;
  --shadow: 0 14px 38px rgba(27, 32, 25, .06);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.locked .shell-header,
body.locked .dashboard-shell {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  color: inherit;
}

.auth-screen {
  display: none;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}

body.locked .auth-screen {
  display: grid;
}

.new-login-screen {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(224, 237, 247, .72), transparent 34%),
    linear-gradient(300deg, rgba(223, 240, 227, .86), transparent 42%),
    var(--bg);
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.new-login-card {
  width: min(560px, 100%);
  gap: 18px;
  padding: clamp(22px, 4vw, 36px);
  border-top: 7px solid var(--green);
}

.login-brand {
  display: grid;
  gap: 8px;
}

.auth-card h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.new-login-card h1 {
  font-size: clamp(42px, 8vw, 74px);
  line-height: .92;
}

.login-brand span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.auth-card label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.auth-card input {
  width: 100%;
  min-height: 58px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcf8;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}

.auth-card input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(35, 101, 75, .18);
}

.auth-button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
}

.auth-button:disabled {
  cursor: wait;
  opacity: .68;
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 3vw, 34px);
  background: rgba(245, 246, 241, .93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.shell-header h1,
.panel h2,
.rules-panel h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1;
}

.shell-header h1 {
  font-size: 28px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-picker {
  display: grid;
  gap: 7px;
  min-width: 0;
  justify-items: end;
}

.range-control,
.chart-tabs {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .75) inset;
}

.range-button,
.chart-tab,
.refresh-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.range-button,
.chart-tab {
  min-width: 48px;
  padding: 0 11px;
  color: var(--muted);
}

.range-button.active,
.chart-tab.active {
  color: white;
  background: var(--ink);
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-decoration: none;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: .65;
}

.custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.custom-range.is-hidden {
  display: none;
}

.custom-range label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.custom-range input {
  min-height: 34px;
  width: 140px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.custom-range input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(35, 101, 75, .14);
}

.custom-range-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: white;
  background: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.custom-range-button:disabled {
  cursor: wait;
  opacity: .65;
}

.custom-range-error {
  min-width: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
}

.rep-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.rep-filter > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.rep-filter label {
  position: relative;
  display: inline-flex;
}

.rep-filter input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.rep-filter label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 68px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.rep-filter input:checked + span {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.rep-filter input:focus-visible + span {
  outline: 3px solid rgba(35, 101, 75, .18);
}

.rep-filter em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.session-pill.is-hidden {
  display: none;
}

.refresh-icon {
  width: 12px;
  height: 12px;
  border: 2px solid var(--muted);
  border-right-color: transparent;
  border-radius: 50%;
}

.dashboard-shell {
  display: grid;
  gap: 14px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 16px clamp(16px, 3vw, 34px) 38px;
}

.status-strip,
.panel,
.rules-panel,
.metric-card,
.insight-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-shell > *,
.two-column,
.three-column,
.metrics-grid,
.rep-summary-grid,
.insights-grid,
.table-wrap {
  min-width: 0;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}

.status-strip > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.loading {
  background: var(--amber);
}

.status-dot.ready {
  background: var(--green);
}

.status-dot.error {
  background: var(--red);
}

.fresh-progress {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue-soft), var(--surface) 44%, var(--green-soft));
  box-shadow: var(--shadow);
}

.fresh-progress.is-hidden {
  display: none;
}

.fresh-progress-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.fresh-progress-copy > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.fresh-progress-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fresh-progress-copy span:not(.fresh-spinner) {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.fresh-spinner {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(40, 95, 143, .22);
  border-top-color: var(--blue);
  border-right-color: var(--green);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.fresh-progress-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1px var(--line);
}

.fresh-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width .22s ease;
}

.refresh-button:disabled .refresh-icon {
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rep-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 12px;
  min-width: 0;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 15px;
  border-left-width: 5px;
}

.metric-card span,
.insight-card span,
.metric-card small,
.insight-card small,
.split-row span,
.brand-row small,
.funnel-cell span,
.funnel-cell small,
.rep-row small,
.rule-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.metric-card strong {
  align-self: end;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.rep-summary-card {
  min-height: 238px;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.rep-summary-card > span {
  font-size: 12px;
  text-transform: uppercase;
}

.rep-summary-card > strong {
  align-self: auto;
  font-size: clamp(34px, 4vw, 58px);
}

.rep-summary-card > em {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(30px, 4.4vw, 64px);
  font-style: normal;
  font-weight: 850;
  line-height: .95;
}

.rep-main-number,
.rep-head-number,
.rep-number-box,
.rep-money-box {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, .72);
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.rep-main-number {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 0 0;
  border-color: transparent;
  background: transparent;
}

.rep-main-number span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.rep-main-number em {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(30px, 4.4vw, 64px);
  font-style: normal;
  font-weight: 850;
  line-height: .95;
}

.rep-main-number:hover,
.rep-main-number.is-open {
  color: var(--green);
}

.rep-main-number:hover em,
.rep-main-number.is-open em {
  color: var(--green);
}

.rep-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rep-summary-stats div,
.rep-summary-stats button {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
}

.rep-summary-stats span,
.rep-number-box span,
.rep-money-box span,
.rep-money-box small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rep-summary-stats strong,
.rep-number-box strong,
.rep-money-box strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.15;
}

.rep-number-box:hover,
.rep-money-box:hover,
.rep-number-box.is-open,
.rep-money-box.is-open,
.rep-head-number:hover,
.rep-head-number.is-open {
  border-color: var(--green);
  background: var(--green-soft);
}

.insight-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  background: #fbfcf8;
}

.insight-card strong {
  align-self: end;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.loading-card {
  opacity: .7;
}

.tone-green {
  border-left-color: var(--green);
  background: linear-gradient(90deg, var(--green-soft), var(--surface) 34%);
}

.tone-blue {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, var(--blue-soft), var(--surface) 34%);
}

.tone-amber {
  border-left-color: var(--amber);
  background: linear-gradient(90deg, var(--amber-soft), var(--surface) 34%);
}

.tone-red {
  border-left-color: var(--red);
  background: linear-gradient(90deg, var(--red-soft), var(--surface) 34%);
}

.tone-violet {
  border-left-color: var(--violet);
  background: linear-gradient(90deg, var(--violet-soft), var(--surface) 34%);
}

.tone-slate {
  border-left-color: var(--slate);
  background: linear-gradient(90deg, var(--slate-soft), var(--surface) 34%);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 14px;
}

.two-column.even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr) minmax(320px, .78fr);
  gap: 14px;
}

.panel,
.rules-panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h2,
.rules-panel h2 {
  font-size: 21px;
  font-weight: 850;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input {
  width: min(220px, 34vw);
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fbfcf8;
  font-size: 13px;
  font-weight: 700;
}

.search-input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(35, 101, 75, .14);
}

.export-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fbfcf8;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.export-button:disabled,
.search-input:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.bar-chart {
  display: grid;
  gap: 8px;
  min-height: 280px;
}

.bar-row {
  display: grid;
  grid-template-columns: 70px minmax(120px, 1fr) 96px;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.bar-label,
.bar-value {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.bar-value {
  color: var(--ink);
  text-align: right;
}

.bar-track,
.brand-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar-fill,
.brand-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.split-list {
  display: grid;
  gap: 10px;
}

.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.split-row > div,
.split-money {
  display: grid;
  gap: 4px;
}

.split-money {
  min-width: 120px;
  text-align: right;
}

.split-row strong,
.brand-topline strong {
  font-size: 14px;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.funnel-cell {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.funnel-cell strong {
  align-self: end;
  font-size: 32px;
  line-height: 1;
}

.brand-bars {
  display: grid;
  gap: 18px;
}

.brand-row,
.rep-row {
  display: grid;
  gap: 8px;
}

.brand-topline,
.rep-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-track {
  height: 18px;
}

.rep-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.brand-track span {
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.rep-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.rep-list {
  display: grid;
  gap: 14px;
}

.rep-compare {
  display: grid;
  gap: 8px;
}

.rep-compare-row {
  display: grid;
  grid-template-columns: minmax(150px, .75fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.rep-compare-row span,
.rep-compare-row strong,
.rep-compare-row button {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.rep-compare-row span,
.rep-compare-row button {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.rep-compare-row button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.rep-compare-toggle::after {
  content: "+";
  margin-left: 8px;
  color: var(--green);
  font-size: 16px;
  line-height: 1;
}

.rep-compare-row.is-clickable strong {
  cursor: pointer;
}

.rep-compare-row.is-clickable:hover button,
.rep-compare-row.is-clickable:hover strong,
.rep-compare-row.is-expanded button,
.rep-compare-row.is-expanded strong {
  border-color: var(--green);
}

.rep-compare-row.is-expanded button {
  color: var(--green);
  background: var(--green-soft);
}

.rep-compare-row.is-expanded .rep-compare-toggle::after {
  content: "-";
}

.rep-compare-row strong {
  font-size: 14px;
  font-weight: 850;
}

.rep-compare-head span,
.rep-compare-head strong {
  color: var(--surface);
  background: var(--ink);
}

.rep-compare-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green-soft), var(--surface) 44%);
}

.rep-compare-detail-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.rep-compare-detail-wide {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.rep-compare-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rep-compare-detail-head span,
.rep-compare-detail-list span,
.rep-compare-detail-list small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.rep-compare-detail-head strong {
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.rep-compare-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rep-compare-detail-list div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.rep-compare-detail-list strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.rep-compare-detail-list small {
  margin-top: 3px;
  text-transform: none;
}

.rep-timeline-card {
  align-content: start;
}

.rep-timeline-list {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow: auto;
  padding-right: 2px;
}

.rep-timeline-row {
  display: grid;
  grid-template-columns: minmax(74px, .6fr) repeat(3, minmax(120px, 1fr));
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.rep-timeline-row > strong {
  grid-row: span 2;
  align-self: center;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
}

.rep-timeline-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.rep-audit-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.rep-audit-card,
.rep-audit-combos {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rep-audit-card {
  border-top: 4px solid var(--line-strong);
}

.rep-audit-card.tone-green {
  border-top-color: var(--green);
  background: linear-gradient(180deg, var(--green-soft), var(--surface) 58%);
}

.rep-audit-card.tone-amber {
  border-top-color: var(--amber);
  background: linear-gradient(180deg, var(--amber-soft), var(--surface) 58%);
}

.rep-audit-card.tone-blue {
  border-top-color: var(--blue);
  background: linear-gradient(180deg, var(--blue-soft), var(--surface) 58%);
}

.rep-audit-card.tone-slate {
  border-top-color: var(--slate);
  background: linear-gradient(180deg, var(--slate-soft), var(--surface) 58%);
}

.rep-audit-card.tone-red {
  border-top-color: var(--red);
  background: linear-gradient(180deg, var(--red-soft), var(--surface) 58%);
}

.rep-audit-card.tone-violet {
  border-top-color: var(--violet);
  background: linear-gradient(180deg, var(--violet-soft), var(--surface) 58%);
}

.rep-audit-card span,
.rep-audit-card small,
.rep-audit-combos span,
.rep-audit-combos small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rep-audit-card strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

.rep-audit-card small {
  margin-top: 5px;
}

.rep-audit-combos {
  display: flex;
  min-height: 100%;
  align-items: center;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}

.rep-audit-combos > span {
  flex: 1 0 130px;
}

.rep-audit-combos strong {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.rep-audit-combos small {
  color: var(--ink);
  font-size: 11px;
}

.rep-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rep-detail-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #fbfcf8;
}

.rep-detail-card.is-unassigned {
  border-left-color: var(--amber);
  background: linear-gradient(90deg, var(--amber-soft), #fbfcf8 38%);
}

.rep-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rep-detail-head h3 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
}

.rep-detail-head > strong,
.rep-head-number {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  text-align: right;
}

.rep-head-number {
  padding: 7px 9px;
}

.rep-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.is-unassigned .rep-pill {
  color: var(--amber);
  background: var(--surface);
}

.rep-detail-stats,
.rep-detail-money {
  display: grid;
  gap: 8px;
}

.rep-detail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rep-detail-money {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rep-detail-stats div,
.rep-detail-money div,
.rep-detail-stats button,
.rep-detail-money button {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.rep-detail-stats span,
.rep-detail-money span,
.rep-detail-money small,
.rep-detail-stats button span,
.rep-detail-money button span,
.rep-detail-money button small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rep-detail-stats strong,
.rep-detail-money strong,
.rep-detail-stats button strong,
.rep-detail-money button strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.rep-detail-stats strong {
  font-size: 16px;
}

.rep-detail-money small {
  margin-top: 3px;
  font-size: 10px;
}

.rep-number-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green-soft), var(--surface) 44%);
}

.product-list {
  display: grid;
  gap: 9px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, auto);
  gap: 12px;
  min-height: 68px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.product-main,
.product-side {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.product-main strong,
.product-main span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-main strong {
  white-space: nowrap;
}

.product-main span,
.product-side span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-side {
  justify-items: end;
  text-align: right;
}

.product-side em {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.wide-table {
  min-width: 1180px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

td {
  font-size: 13px;
  line-height: 1.35;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

tbody tr:hover td {
  background: #fbfcf8;
}

.tag-line {
  display: block;
  max-width: 420px;
  color: var(--muted);
}

.rules-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rule-item {
  display: grid;
  gap: 8px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.empty-state {
  display: grid;
  min-height: 96px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.updates-shell {
  max-width: 1320px;
}

.updates-health-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.updates-instructions pre {
  max-height: 420px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.project-knowledge-intro,
.outside-codex-intro,
.access-handoff-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.source-bundle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.empty-workspace-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: start;
  border-left: 6px solid var(--green);
  background: #fbfcf8;
}

.sina-log-rule-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 420px);
  gap: 14px;
  align-items: start;
  border-left: 6px solid var(--amber);
  background: #fffdf4;
}

.empty-workspace-panel h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.08;
}

.empty-workspace-panel p,
.sina-log-rule-panel p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.sina-log-rule-panel h2 {
  margin-bottom: 8px;
  font-size: 26px;
  line-height: 1.1;
}

.workspace-kit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.empty-workspace-panel pre,
.sina-log-rule-panel pre {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.sina-log-rule-panel pre {
  grid-column: auto;
}

.daily-report-intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.daily-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.daily-report-summary article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.daily-report-summary span,
.daily-report-text span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.daily-report-summary strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.daily-report-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.daily-report-entries {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.daily-report-text {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.daily-report-text pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.operator-kit-actions {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line));
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--green-soft);
}

.operator-kit-actions div {
  min-width: 0;
}

.operator-kit-actions span,
.operator-bootstrap-box span {
  display: block;
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.operator-kit-actions strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.operator-kit-actions p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.source-download-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.source-download-button.operator {
  min-height: 42px;
  justify-content: center;
  background: var(--ink);
  border-color: var(--ink);
}

.source-download-button.secondary {
  background: var(--green-soft);
  color: var(--green);
}

.source-bundle-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.operator-bootstrap-box {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.operator-bootstrap-box pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.project-knowledge-grid,
.outside-codex-grid,
.access-handoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-card,
.outside-codex-card,
.access-handoff-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #fbfcf8;
}

.outside-codex-card {
  border-left-color: var(--green);
}

.access-handoff-card {
  border-left-color: var(--amber);
}

.knowledge-card h3,
.outside-codex-card h3,
.access-handoff-card h3 {
  margin: 0 0 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.2;
}

.outside-codex-card p,
.access-handoff-card p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.knowledge-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.knowledge-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.knowledge-card dt {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.knowledge-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.outside-codex-prompt {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
}

.outside-codex-prompt span {
  color: var(--surface);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.outside-codex-prompt pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.access-handoff-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.access-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--amber-soft), #fbfcf8 58%);
}

.access-check-item span {
  flex: 0 0 auto;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--amber);
  background: var(--surface);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.access-check-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.sop-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.sop-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sop-status-card,
.sop-card,
.sop-check-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.sop-status-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-left: 5px solid var(--gold);
}

.sop-status-card.good,
.sop-check-item.good {
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(35, 101, 75, .08), #fbfcf8 54%);
}

.sop-status-card.watch,
.sop-check-item.watch {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(167, 122, 25, .11), #fbfcf8 54%);
}

.sop-status-card span,
.sop-check-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.sop-status-card.watch span,
.sop-check-item.watch span {
  color: var(--gold);
  background: var(--gold-soft);
}

.sop-status-card strong,
.sop-check-item strong,
.sop-card h3 {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.sop-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.sop-card {
  padding: 14px;
}

.sop-card h3 {
  margin: 0 0 10px;
}

.sop-card p,
.sop-card ul {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.sop-card ul {
  display: grid;
  gap: 9px;
  padding: 0;
  list-style: none;
}

.sop-card li {
  display: grid;
  gap: 3px;
}

.sop-card li strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.sop-card li span {
  overflow-wrap: anywhere;
}

.sop-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sop-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-left: 5px solid var(--gold);
}

.updates-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.update-card,
.compact-entry {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.update-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.update-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.update-card-head h3 {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

.update-card-head > strong {
  display: grid;
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
}

.update-type {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.update-meta span,
.missing-fields {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.update-card p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.update-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.update-details div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.update-details dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.update-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.missing-fields {
  width: fit-content;
  border-color: rgba(159, 61, 53, .22);
  color: var(--red);
  background: var(--red-soft);
}

.compact-entry {
  display: grid;
  gap: 5px;
  padding: 11px;
}

.compact-entry strong {
  font-size: 13px;
}

.compact-entry span,
.compact-entry small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 1120px) {
  .metrics-grid,
  .rep-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-grid,
  .sop-status-grid,
  .updates-health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rep-audit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column,
  .two-column.even,
  .three-column,
  .rules-panel {
    grid-template-columns: 1fr;
  }

  .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rep-detail-grid,
  .rep-detail-money {
    grid-template-columns: 1fr;
  }

  .rep-compare-row {
    grid-template-columns: minmax(120px, .7fr) repeat(3, minmax(0, 1fr));
  }

  .update-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .range-picker,
  .rep-filter {
    justify-items: stretch;
    justify-content: stretch;
  }

  .range-control {
    width: 100%;
    overflow-x: auto;
  }

  .custom-range {
    align-items: stretch;
  }

  .custom-range label {
    flex: 1 1 140px;
    align-items: stretch;
    flex-direction: column;
  }

  .custom-range input,
  .custom-range-button {
    width: 100%;
  }

  .custom-range-error {
    width: 100%;
    text-align: center;
  }

  .rep-filter label {
    flex: 1 1 90px;
  }

  .rep-filter label span {
    width: 100%;
  }

  .rep-filter em {
    width: 100%;
    text-align: center;
  }

  .range-button {
    flex: 1 0 auto;
  }

  .refresh-button {
    justify-content: center;
  }

  .workspace-kit-actions {
    justify-content: stretch;
  }

  .workspace-kit-actions .source-download-button {
    width: 100%;
    justify-content: center;
  }

  .session-pill {
    justify-content: center;
  }

  .status-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid,
  .rep-summary-grid,
  .insights-grid,
  .updates-health-grid,
  .funnel-grid,
  .rep-audit-grid,
  .rules-grid,
  .project-knowledge-grid,
  .outside-codex-grid,
  .access-handoff-grid,
  .empty-workspace-panel,
  .sina-log-rule-panel,
  .operator-kit-actions,
  .access-handoff-checklist,
  .daily-report-summary,
  .sop-status-grid,
  .sop-section-grid,
  .sop-checklist {
    grid-template-columns: 1fr;
  }

  .rep-detail-stats,
  .rep-summary-stats,
  .update-details {
    grid-template-columns: 1fr;
  }

  .rep-compare {
    overflow-x: auto;
  }

  .rep-compare-row {
    min-width: 680px;
  }

  .rep-compare-detail {
    min-width: 680px;
  }

  .rep-detail-head {
    display: grid;
  }

  .rep-detail-head > strong {
    text-align: left;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .table-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .chart-tabs {
    width: 100%;
  }

  .chart-tab {
    flex: 1;
  }

  .bar-row {
    grid-template-columns: 56px minmax(90px, 1fr) 82px;
    gap: 8px;
  }

  .metric-card strong {
    font-size: 30px;
  }
}

@media (max-width: 420px) {
  .dashboard-shell,
  .shell-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .panel,
  .rules-panel,
  .metric-card,
  .insight-card {
    padding: 12px;
  }

  .product-row {
    grid-template-columns: 1fr;
  }

  .product-side {
    justify-items: start;
    text-align: left;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  .bar-value {
    text-align: left;
  }
}
