:root {
  --bg: #080a09;
  --panel: #101311;
  --panel2: #151917;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f3f5f3;
  --ink-2: #c9cfcb;
  --muted: #929995;
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, 0.14);
  --green: #79d69d;
  --yellow: #e7bd68;
  --red: #ee8375;
  --mono: SFMono-Regular, Consolas, monospace;
  --sans:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 9, 0.92);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
}
.brand-logo-mark {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}
.brand-logo-wordmark {
  display: block;
  width: auto;
  height: 20px;
  flex: 0 0 auto;
}
.brand > .pill {
  margin-left: 8px;
}
.toplinks {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}
.toplinks a:hover {
  color: var(--ink);
}
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}
.sidebar {
  padding: 26px 18px;
  border-right: 1px solid var(--line);
}
.sidebar small {
  display: block;
  margin: 0 10px 12px;
  color: #7d847f;
  font: 10px var(--mono);
  letter-spacing: 0.12em;
  text-transform: none;
}
.sidebar a {
  display: block;
  padding: 10px 12px;
  margin: 3px 0;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
.sidebar a:hover,
.sidebar a.active {
  background: var(--panel2);
  color: var(--ink);
}
.main {
  width: 100%;
  max-width: 1240px;
  padding: 42px 46px 80px;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 30px;
}
.refresh-control {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.refresh-control.stale {
  color: var(--warning, #9a6700);
}
.heading h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.04em;
}
.heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #f4f6f4;
  color: #080a09;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
}
.button-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.button-row .button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.metric small,
.label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.metric strong {
  display: block;
  margin: 13px 0 5px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.mesh-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric strong.metric-code {
  overflow-wrap: anywhere;
  font: 600 15px/1.5 var(--mono);
  letter-spacing: -0.02em;
}
.section {
  margin-top: 24px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
}
.section-head span {
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 500;
  background: #0d100e;
}
tr:last-child td {
  border-bottom: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font: 10px var(--mono);
}
.pill:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.pill.online:before,
.pill.ready:before,
.pill.active:before,
.pill.success:before {
  background: var(--green);
}
.pill.busy:before,
.pill.review:before,
.pill.draining:before {
  background: var(--yellow);
}
.pill.drained:before,
.pill.paused:before {
  background: var(--muted);
}
.pill.offline:before,
.pill.failed:before,
.pill.critical:before,
.pill.open:before {
  background: var(--red);
}
.pill.warning:before {
  background: var(--yellow);
}
.pill.resolved:before {
  background: var(--green);
}
.wrap-cell {
  min-width: 240px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.45;
}
.activity-chart {
  height: 220px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 24px 22px 18px;
}
.activity-day {
  min-width: 28px;
  flex: 1 0 28px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  font: 10px var(--mono);
}
.activity-bars {
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.activity-bars i {
  display: block;
  width: min(16px, 70%);
  min-height: 5px;
  background: linear-gradient(180deg, #ff896f, var(--accent));
  border-radius: 3px 3px 0 0;
}
.activity-day b {
  color: var(--ink);
  font-weight: 600;
}
.empty {
  padding: 44px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
}
.notice {
  padding: 15px 17px;
  margin-bottom: 20px;
  border: 1px solid rgba(231, 189, 104, 0.25);
  background: rgba(231, 189, 104, 0.06);
  border-radius: 9px;
  color: #d8c59c;
  font-size: 13px;
  line-height: 1.55;
}
.error {
  border-color: rgba(238, 131, 117, 0.25);
  background: rgba(238, 131, 117, 0.06);
  color: #e6aaa1;
}
.code {
  padding: 18px;
  background: #080a09;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  font: 12px/1.7 var(--mono);
  color: #dfe3e0;
}
.login-shell {
  width: min(460px, calc(100% - 32px));
  margin: 10vh auto;
}
.login-shell .card {
  padding: 30px;
}
.login-shell h1 {
  font-size: 30px;
  margin: 10px 0;
}
.login-shell p {
  color: var(--muted);
  line-height: 1.6;
}
.login-shell .button {
  width: 100%;
  margin-top: 12px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  margin: 23px 0;
}
.divider:before,
.divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #090b0a;
  color: var(--ink);
}
.doc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: 56px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 32px 100px;
}
.docs { min-width: 0; }
.doc-nav {
  position: sticky;
  top: 88px;
  height: max-content;
}
.doc-nav a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 12px;
}
.doc-nav a:hover {
  color: var(--ink);
}
.docs h1 {
  font-size: 42px;
  letter-spacing: -0.05em;
}
.docs h2 {
  margin-top: 52px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 24px;
}
.docs h3 {
  margin-top: 28px;
  font-size: 16px;
}
.docs p,
.docs li {
  color: #b3b8b5;
  line-height: 1.75;
  font-size: 14px;
}
.docs code {
  font-family: var(--mono);
  color: #f2b4a5;
}
.docs pre {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: auto;
  line-height: 1.65;
}
.docs table {
  display: block;
  max-width: 100%;
  margin: 18px 0;
  border: 1px solid var(--line);
  overflow-x: auto;
}
.docs th,
.docs td {
  white-space: normal;
  min-width: 130px;
  vertical-align: top;
}
.progress {
  height: 6px;
  background: #232724;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 12px;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.muted {
  color: var(--muted);
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.check:last-child {
  border-bottom: 0;
}
.check strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
.check p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.check-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font: 10px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.check-state:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.check.pass .check-state:before {
  background: var(--green);
}
.check.warn .check-state:before,
.check.todo .check-state:before,
.check.pending .check-state:before {
  background: var(--yellow);
}
.check.fail .check-state:before {
  background: var(--red);
}
.check.pass strong {
  color: #c9d0cb;
}
.metric strong a {
  color: var(--accent);
}
.status-history {
  height: 96px;
  display: grid;
  grid-template-columns: repeat(30, minmax(3px, 1fr));
  align-items: end;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.status-day { height: 68px; display: flex; align-items: end; background: rgba(255,255,255,.035); border-radius: 3px; overflow: hidden; }
.status-day span { width: 100%; background: var(--green); min-height: 8px; }
.status-day.had-failures span { background: var(--yellow); }
.status-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-list li:first-child { border-top: 0; }
.status-list span { color: var(--muted); font-size: 12px; }
@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: flex;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }
  .sidebar small {
    display: none;
  }
  .sidebar a {
    white-space: nowrap;
  }
  .main {
    padding: 28px 18px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .toplinks a:not(:last-child) {
    display: none;
  }
  .doc-layout {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  .doc-nav {
    display: none;
  }
}
@media (max-width: 500px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .check {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .heading {
    align-items: start;
    flex-direction: column;
  }
  .topbar {
    padding: 0 16px;
  }
}

/* Billing */
.billing-heading {
  align-items: center;
  margin-bottom: 24px;
}
.billing-heading h1 {
  font-size: 38px;
}
.billing-heading p {
  font-size: 15px;
}
.billing-current {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 26px 28px;
  border-color: rgba(255, 107, 74, 0.25);
  background: linear-gradient(
    120deg,
    rgba(255, 107, 74, 0.11),
    rgba(255, 107, 74, 0.025) 48%,
    var(--panel) 75%
  );
}
.billing-current:after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -72px;
  top: -105px;
  border-radius: 50%;
  background: rgba(255, 107, 74, 0.07);
}
.billing-current-copy {
  position: relative;
  z-index: 1;
}
.billing-current-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.billing-current h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.035em;
  text-transform: capitalize;
}
.billing-current p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.billing-current-action {
  position: relative;
  z-index: 1;
  min-width: 164px;
}
.billing-section {
  margin-top: 38px;
}
.billing-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.billing-section-head h2 {
  margin: 0 0 5px;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.billing-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.billing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 24px;
  border-radius: 12px;
  transition:
    border-color 0.16s ease,
    transform 0.16s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}
.plan-card.featured {
  border-color: rgba(255, 107, 74, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 107, 74, 0.08),
    0 18px 45px rgba(0, 0, 0, 0.18);
}
.plan-card.current {
  border-color: rgba(121, 214, 157, 0.4);
}
.plan-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.plan-name {
  font-size: 15px;
  font-weight: 700;
  text-transform: capitalize;
}
.plan-tag {
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
  color: #b8beba;
  font: 10px var(--mono);
  letter-spacing: 0.03em;
}
.plan-card.featured .plan-tag {
  background: rgba(255, 107, 74, 0.13);
  color: #ffad99;
}
.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-bottom: 10px;
}
.plan-price strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.055em;
}
.plan-price span {
  padding-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}
.plan-summary {
  min-height: 42px;
  margin: 0 0 21px;
  color: #b5bbb7;
  font-size: 13px;
  line-height: 1.55;
}
.plan-features {
  list-style: none;
  margin: 0 0 25px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}
.plan-features li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #cbd0cc;
  font-size: 12px;
}
.plan-features li:before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}
.plan-card .button {
  width: 100%;
  margin-top: auto;
}
.button:disabled {
  cursor: default;
  opacity: 0.55;
}
.button.plan-current {
  background: rgba(121, 214, 157, 0.08);
  border-color: rgba(121, 214, 157, 0.25);
  color: var(--green);
}
.billing-footnote {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.billing-footnote:before {
  content: "i";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #b9bfbb;
  font: 10px var(--mono);
}
@media (max-width: 900px) {
  .billing-plans {
    grid-template-columns: 1fr;
  }
  .plan-card {
    min-height: auto;
  }
  .plan-summary {
    min-height: 0;
  }
  .billing-current {
    grid-template-columns: 1fr;
  }
  .billing-current-action {
    width: max-content;
  }
}
@media (max-width: 500px) {
  .billing-heading h1 {
    font-size: 32px;
  }
  .billing-current {
    padding: 22px;
  }
  .billing-current-action {
    width: 100%;
  }
}

/* Accessibility and focused-auth refinements. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 107, 74, 0.55);
  outline-offset: 3px;
}
.login-help {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px !important;
}
@media (max-width: 800px) {
  .doc-layout {
    gap: 28px;
    padding-top: 0;
  }
  .doc-nav {
    position: sticky;
    top: 64px;
    z-index: 4;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    overflow-x: visible;
    margin-inline: -20px;
    padding: 13px 20px;
    background: rgba(8, 10, 9, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .doc-nav .label {
    display: none;
  }
  .doc-nav a {
    white-space: normal;
  }
  .status-columns { grid-template-columns: 1fr; }
  .docs h1 {
    font-size: 34px;
  }
}
.danger-zone {
  padding: 22px;
  border: 1px solid rgba(238, 131, 117, 0.28);
  border-radius: 10px;
  background: rgba(238, 131, 117, 0.035);
}
.danger-zone > p {
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.danger-zone form {
  max-width: 520px;
  margin-top: 18px;
}
.danger-button {
  background: var(--red);
  border-color: var(--red);
  color: #130604;
}
.error-text {
  color: var(--red);
  font-size: 12px;
}
.legal-layout {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 90px;
}
.code-spaced {
  margin-top: 14px;
}
.section-head-spaced {
  margin-top: 28px;
}
.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  width: min(420px, calc(100% - 40px));
  padding: 14px 16px;
  color: var(--ink);
  background: #181c1a;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  line-height: 1.5;
}
.toast.error {
  border-color: rgba(238, 131, 117, 0.38);
}

/* Product console — calm, information-dense, developer-first. */
body[data-app="dashboard"],
body[data-app="admin"] {
  --bg: #080a09;
  --panel: #0e1110;
  --panel2: #151917;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f4f5f4;
  --muted: #929896;
  --accent: #ff6b4a;
  --green: #79d69d;
  --yellow: #e7bd68;
  --red: #ee8375;
  background: var(--bg);
}
body[data-app="dashboard"]::before,
body[data-app="admin"]::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 54% 0, rgba(255, 255, 255, 0.045), transparent 32%);
}
body[data-app="dashboard"] .topbar,
body[data-app="admin"] .topbar {
  height: 56px;
  padding: 0 24px;
  background: rgba(8, 10, 9, 0.92);
  backdrop-filter: blur(14px);
}
body[data-app="dashboard"] .layout,
body[data-app="admin"] .layout {
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
}
body[data-app="dashboard"] .sidebar,
body[data-app="admin"] .sidebar {
  position: sticky;
  top: 56px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  padding: 14px 12px 12px;
  background: #0b0e0c;
  overflow: hidden;
}
.workspace-switcher,
body[data-app="dashboard"] .sidebar a.workspace-switcher,
body[data-app="admin"] .sidebar a.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  margin: 0 0 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}
body[data-app="dashboard"] .sidebar a.workspace-switcher:hover,
body[data-app="admin"] .sidebar a.workspace-switcher:hover {
  background: var(--panel2);
}
.workspace-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  background: #202522;
  font-size: 12px;
  font-weight: 700;
}
.workspace-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  opacity: 0;
}
.workspace-mark img.loaded {
  opacity: 1;
}
.workspace-switcher > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.workspace-switcher b,
.workspace-switcher small,
body[data-app="dashboard"] .sidebar .workspace-switcher small,
body[data-app="admin"] .sidebar .workspace-switcher small {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
}
.workspace-switcher b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.workspace-switcher small,
body[data-app="dashboard"] .sidebar .workspace-switcher small,
body[data-app="admin"] .sidebar .workspace-switcher small {
  color: var(--muted);
  font: 11px/1.3 var(--sans);
  font-weight: 400;
}
.sidebar-scroll {
  min-height: 0;
  overflow-y: auto;
}
body[data-app="dashboard"] .sidebar small,
body[data-app="admin"] .sidebar small {
  margin: 18px 12px 6px;
  color: var(--muted);
  font: 11px var(--sans);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: none;
}
body[data-app="dashboard"] .sidebar a,
body[data-app="admin"] .sidebar a {
  position: relative;
  padding: 9px 11px 9px 37px;
  margin: 1px 0;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
body[data-app="dashboard"] .sidebar a[data-icon]:before,
body[data-app="admin"] .sidebar a[data-icon]:before {
  content: attr(data-icon);
  position: absolute;
  left: 12px;
  width: 15px;
  color: #747b77;
  text-align: center;
}
body[data-app="dashboard"] .sidebar a:hover,
body[data-app="dashboard"] .sidebar a.active,
body[data-app="admin"] .sidebar a:hover,
body[data-app="admin"] .sidebar a.active {
  background: var(--panel2);
  color: var(--ink);
}
body[data-app="dashboard"] .sidebar a.active,
body[data-app="admin"] .sidebar a.active {
  box-shadow: inset 2px 0 0 var(--accent);
}
.sidebar-bottom {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 14px;
}
.resource-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}
.resource-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.resource-status.unavailable i {
  background: var(--yellow);
}
body[data-app="dashboard"] .sidebar .trial-card,
body[data-app="admin"] .sidebar .trial-card {
  display: block;
  padding: 12px 13px;
  border: 1px solid rgba(231, 189, 104, 0.24);
  border-radius: 8px;
  background: rgba(231, 189, 104, 0.07);
  color: #e4cea0;
}
.trial-card b,
.trial-card span {
  display: block;
}
.trial-card b {
  margin-bottom: 3px;
  font-size: 12px;
}
.trial-card span {
  color: #a8956d;
  font-size: 10px;
}
body[data-app="admin"] .sidebar .operator-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: #111513;
}
body[data-app="dashboard"] .main,
body[data-app="admin"] .main {
  max-width: 1180px;
  padding: 52px 54px 90px;
}
body[data-app="dashboard"] .heading,
body[data-app="admin"] .heading {
  align-items: center;
  margin-bottom: 24px;
}
body[data-app="dashboard"] .heading h1,
body[data-app="admin"] .heading h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.welcome-heading .eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}
.range-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090b0a;
}
.range-tabs span {
  padding: 6px 11px;
  border-radius: 5px;
  background: var(--panel2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  font-size: 11px;
}
body[data-app="dashboard"] .card,
body[data-app="admin"] .card,
body[data-app="dashboard"] .table-wrap,
body[data-app="admin"] .table-wrap {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
body[data-app="dashboard"] th,
body[data-app="admin"] th {
  background: #0b0e0c;
}
body[data-app="dashboard"] .code,
body[data-app="admin"] .code {
  background: #080a09;
  color: #edf1ef;
}
body[data-app="dashboard"] .pill,
body[data-app="admin"] .pill {
  background: rgba(255, 255, 255, 0.025);
}
body[data-app="dashboard"] .notice,
body[data-app="admin"] .notice {
  color: #d8c59c;
}
body[data-app="dashboard"] .notice.error,
body[data-app="admin"] .notice.error {
  color: #e6aaa1;
}
.section-head > div p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.section-head a {
  color: var(--ink-2);
  font-size: 12px;
}
.section-head a:hover {
  text-decoration: underline;
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.explore-card {
  display: grid;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.explore-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}
.explore-card b {
  font-size: 13px;
}
.explore-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
body[data-app="dashboard"] .billing-current,
body[data-app="admin"] .billing-current {
  background: linear-gradient(120deg, rgba(255, 107, 74, 0.11), rgba(255, 107, 74, 0.025) 48%, var(--panel) 75%);
}

@media (max-width: 800px) {
  body[data-app="dashboard"] .layout,
  body[data-app="admin"] .layout {
    grid-template-columns: 1fr;
  }
  body[data-app="dashboard"] .sidebar,
  body[data-app="admin"] .sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 10px 12px;
  }
  .workspace-switcher,
  .sidebar-bottom {
    display: none;
  }
  .sidebar-scroll {
    display: flex;
    overflow-x: auto;
  }
  body[data-app="dashboard"] .sidebar a,
  body[data-app="admin"] .sidebar a {
    flex: 0 0 auto;
  }
  body[data-app="dashboard"] .main,
  body[data-app="admin"] .main {
    padding: 30px 20px 70px;
  }
  .explore-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Dashboard Overview redesign (#19) — `ov-` namespaced, so the
   shared admin console is untouched by anything here. Global §4
   changes above affect both dashboard and admin by design; these
   rules are Overview-view only.
   ============================================================ */

/* 3.1 Heading */
.ov-heading {
  align-items: center;
}
.ov-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.ov-subline {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}
.ov-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ov-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.ov-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.ov-status.unavailable i {
  background: var(--yellow);
}
.ov-status.unavailable {
  border-color: rgba(231, 189, 104, 0.28);
}

/* 3.2 Metric row */
.ov-grid {
  margin-bottom: 24px;
}
.ov-metric {
  display: flex;
  flex-direction: column;
}
.ov-metric .ov-spark {
  margin-top: auto;
  padding-top: 12px;
}

/* 3.6 14-day sparkline (JS-generated `style="height:%"` — CSP-safe) */
.ov-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
}
.ov-spark i {
  display: block;
  flex: 1 1 0;
  min-width: 1px;
  max-width: 8px;
  background: rgba(121, 214, 157, 0.55);
  border-radius: 1px 1px 0 0;
}
.ov-spark i.ov-zero {
  background: rgba(255, 255, 255, 0.08);
}

/* CSP-safe chart dimensions. Runtime code selects one bounded class instead
   of emitting inline style attributes. */
.scale-h-0 { height: 0%; }
.scale-h-1 { height: 10%; }
.scale-h-2 { height: 20%; }
.scale-h-3 { height: 30%; }
.scale-h-4 { height: 40%; }
.scale-h-5 { height: 50%; }
.scale-h-6 { height: 60%; }
.scale-h-7 { height: 70%; }
.scale-h-8 { height: 80%; }
.scale-h-9 { height: 90%; }
.scale-h-10 { height: 100%; }
.scale-w-0 { width: 0%; }
.scale-w-1 { width: 10%; }
.scale-w-2 { width: 20%; }
.scale-w-3 { width: 30%; }
.scale-w-4 { width: 40%; }
.scale-w-5 { width: 50%; }
.scale-w-6 { width: 60%; }
.scale-w-7 { width: 70%; }
.scale-w-8 { width: 80%; }
.scale-w-9 { width: 90%; }
.scale-w-10 { width: 100%; }

/* 3.3 Recent jobs */
.ov-section {
  margin-top: 20px;
}
.ov-section-head > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.ov-section-head h2 {
  margin: 0;
}
.ov-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.ov-recent {
  padding: 4px 20px;
}
.ov-jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ov-job {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 150px 110px;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ov-job:last-child {
  border-bottom: 0;
}
.ov-job-pill {
  min-width: 0;
}
.ov-job-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.ov-job-meta b {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-job-meta > span {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-job-meta a {
  color: var(--ink-2);
}
.ov-job-meta a:hover {
  text-decoration: underline;
}
.ov-job-meta em {
  color: var(--muted);
  font-style: italic;
}
.ov-job-times {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ov-job-date {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 3.4 Getting started */
.ov-ready {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ov-ready-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}
.ov-ready-check:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 8px;
  height: 5px;
  border: solid #08110b;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}
.ov-ready-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.ov-ready-copy b {
  font-size: 13px;
}
.ov-ready-copy span {
  color: var(--muted);
  font-size: 12px;
}
.ov-ready-copy a {
  color: var(--ink-2);
}
.ov-ready-copy a:hover {
  text-decoration: underline;
}
.ov-checklist-wrap[hidden] {
  display: none;
}
.ov-checklist-wrap {
  margin-top: 12px;
}
.ov-next-action {
  margin-bottom: 12px;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}
.ov-next-action h2 {
  margin: 6px 0 4px;
  font-size: 17px;
}
.ov-next-action p {
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 62ch;
}
.ov-progress-card {
  margin-bottom: 12px;
}
.ov-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ov-progress-head b {
  font-size: 13px;
}
.ov-progress-head span {
  color: var(--muted);
  font-size: 12px;
}

/* 3.5 Aside: Add to a workflow + Explore */
.ov-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.ov-aside-stack {
  display: grid;
  gap: 20px;
}
.ov-workflow {
  padding: 20px;
}
.ov-workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ov-workflow-head > div {
  display: grid;
  gap: 3px;
}
.ov-workflow-head b {
  font-size: 13px;
}
.ov-workflow-head span {
  color: var(--muted);
  font-size: 12px;
}
.ov-workflow .code {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}
.ov-workflow-foot {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.ov-workflow-foot code {
  font: 12px var(--mono);
  color: var(--ink-2);
}
.ov-workflow-foot a {
  color: var(--ink-2);
}
.ov-workflow-foot a:hover {
  text-decoration: underline;
}
.ov-explore {
  display: flex;
  flex-direction: column;
}
.ov-explore-link {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 1px solid transparent;
}
.ov-explore-link:hover {
  background: var(--panel2);
}
.ov-explore-link b {
  font-size: 13px;
  color: var(--ink);
}
.ov-explore-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Empty state copy under Recent jobs */
.ov-empty code {
  font: 12px var(--mono);
  color: var(--ink-2);
}

/* Dashboard sidebar: inline SVG icons replace the unicode glyphs.
   Admin still uses `data-icon` glyphs (different item set), so the
   `[data-icon]:before` rule above keeps working for admin only. */
body[data-app="dashboard"] .sidebar a svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #747b77;
}

/* 4.4 Responsive — extend the existing breakpoints, don't fork them. */
@media (max-width: 1180px) {
  .ov-cols {
    grid-template-columns: 1fr;
  }
  .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ov-heading {
    flex-wrap: wrap;
    row-gap: 12px;
  }
  .ov-head-right {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 640px) {
  .ov-grid {
    grid-template-columns: 1fr;
  }
  .ov-job {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px 12px;
  }
  .ov-job-times,
  .ov-job-date {
    grid-column: 2;
    text-align: left;
  }
  .ov-job-times {
    padding-top: 2px;
  }
  .ov-ready {
    flex-wrap: wrap;
  }
}

/* Dashboard v2 system — restrained product UI and page-specific layouts. */
body[data-app="dashboard"] :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid #9ca6a1;
  outline-offset: 2px;
}
body[data-app="dashboard"] .button:not(.secondary) {
  border-color: var(--accent);
  background: var(--accent);
  color: #130b08;
}
body[data-app="dashboard"] .progress i { background: var(--green); }
body[data-app="dashboard"] .plan-card,
body[data-app="dashboard"] .explore-card { transform: none !important; }
body[data-app="dashboard"] .plan-card.featured {
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
body[data-app="dashboard"] .plan-card.featured .plan-tag {
  background: rgba(255, 255, 255, .055);
  color: var(--ink-2);
}
body[data-app="dashboard"] .sidebar-scroll > small:not(:first-child) {
  margin-top: 22px;
}
.range-label {
  color: var(--muted);
  font-size: 12px;
}
body[data-app="dashboard"] .pill {
  padding: 3px 8px;
  font: 500 11px/1.25 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.pill.running:before { background: #8aa8d8; }
.pill.queued:before,
.pill.pending:before { background: var(--yellow); }
.pill.cancelled:before,
.pill.neutral:before { background: var(--muted); }
body[data-app="dashboard"] .billing-current {
  border-color: var(--line);
  background: var(--panel);
}
body[data-app="dashboard"] .billing-current:after { display: none; }
body[data-app="dashboard"] .plan-features li:before {
  color: var(--muted);
  background: none;
}
.health-chart,
.usage-chart {
  gap: 3px;
  height: 220px;
  overflow: hidden;
}
.health-chart .activity-day,
.usage-chart .activity-day {
  min-width: 0;
  flex: 1 1 0;
  font-family: var(--sans);
}
.health-chart .activity-bars,
.usage-chart .activity-bars {
  position: relative;
  min-height: 150px;
}
.activity-bars .activity-total {
  width: 70%;
  min-height: 2px;
  background: rgba(201, 207, 203, 0.48);
}
.activity-bars .activity-success {
  position: absolute;
  bottom: 0;
  width: 70%;
  min-height: 0;
  background: rgba(121, 214, 157, 0.75);
}
.activity-day span {
  min-height: 13px;
  white-space: nowrap;
}
.activity-chart { position: relative; }
.activity-chart:after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 42px;
  height: 1px;
  background: rgba(201, 207, 203, .16);
  pointer-events: none;
}
.activity-empty .activity-total { min-height: 2px; height: 2px !important; opacity: .32; }
.slim-empty .empty { padding: 20px; }
.good-empty .empty {
  padding: 24px;
  background: rgba(121, 214, 157, 0.035);
}
.good-empty .empty strong { color: var(--green); margin: 0; }
.error-details { min-width: 78px; }
.error-details summary { cursor: pointer; color: var(--ink-2); }
.error-details pre {
  max-width: 440px;
  max-height: 5em;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
  font: 11px/1.45 var(--mono);
}
.job-filters,
.repo-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}
.job-filters label { display: grid; gap: 6px; }
.job-filters label > span { color: var(--muted); font-size: 11px; }
.job-search { flex: 1; }
.job-filters input,
.job-filters select,
.repo-filters input,
.repo-filters select {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
}
.job-filters select,
.repo-filters select,
.field select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.repo-filters input { flex: 1; }
.jobs-ledger { overflow-x: hidden; }
.jobs-ledger table { table-layout: fixed; }
.jobs-ledger th:nth-child(1) { width: 105px; }
.jobs-ledger th:nth-child(2) { width: 30%; }
.jobs-ledger th:nth-child(3) { width: 16%; }
.jobs-ledger th:nth-child(4),
.jobs-ledger th:nth-child(5) { width: 82px; }
.jobs-ledger th:nth-child(6) { width: 104px; }
.jobs-ledger th:nth-child(7) { width: 108px; }
.jobs-ledger td { overflow: hidden; text-overflow: ellipsis; }
.jobs-ledger td:first-child { overflow: visible; text-overflow: clip; }
.metric > strong:not(.metric-code) { white-space: nowrap; }
.settings-list > p { font-size: 12px; }
.scroll-cue { box-shadow: inset -18px 0 16px -20px rgba(255, 255, 255, .75); }
body[data-app="dashboard"] thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.job-detail summary {
  display: grid;
  gap: 3px;
  cursor: pointer;
  list-style: none;
}
.job-detail summary span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.job-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  width: min(620px, 70vw);
  padding: 14px 0 4px;
  white-space: normal;
}
.job-detail-grid span { display: grid; gap: 2px; color: var(--muted); }
.job-detail-grid b { color: var(--ink-2); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.load-more { margin-top: 12px; }
.runner-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.runner-card-head { display: flex; align-items: center; justify-content: space-between; }
.runner-card-head > span { color: var(--muted); font-size: 12px; }
.runner-card h3 { margin: 20px 0 6px; font-size: 16px; }
.runner-card p { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; }
.runner-card small { color: var(--muted); }
.runner-summary { margin-top: 12px; }
.labels-table td:last-child { text-align: right; }
.usage-progress {
  height: 5px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.usage-progress i { display: block; height: 100%; background: var(--green); }
.cost-context { color: var(--muted); font-size: 12px; }
.notice.warning { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.notice.warning p { margin: 4px 0 0; }
.notice-actions,
.repo-actions,
.billing-actions { display: flex; gap: 8px; align-items: center; }
.notice-actions,
.repo-actions { flex-wrap: wrap; }
.notice-actions .button,
.repo-actions .button { white-space: nowrap; }
.security-caption { color: var(--muted); font-size: 12px; }
.switch { display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span {
  width: 30px;
  height: 18px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #252a27;
}
.switch span:after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 120ms ease, background 120ms ease;
}
.switch input:checked + span:after { transform: translateX(12px); background: var(--green); }
.installation-details { color: var(--muted); font-size: 12px; }
.billing-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.billing-facts span { display: grid; gap: 5px; color: var(--ink-2); }
.billing-facts b { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.plan-current-label { display: inline-flex; color: var(--green); font-size: 12px; font-weight: 600; }
.profile-card { display: flex; align-items: center; gap: 15px; }
.profile-card h3, .profile-card p { margin: 0 0 4px; }
.profile-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel2);
  color: var(--ink);
  font-weight: 700;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.settings-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.settings-list > div:last-of-type { border-bottom: 0; }
.settings-list span { color: var(--muted); font-size: 12px; }
details.danger-zone {
  margin-top: 36px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}
details.danger-zone > summary { padding: 16px 0; cursor: pointer; font-size: 12px; }
details.danger-zone[open] > div { padding: 18px; border: 1px solid rgba(238, 131, 117, .28); border-radius: 8px; }
.failures-table table { table-layout: fixed; }
.failures-table th:nth-child(1) { width: 90px; }
.failures-table th:nth-child(2) { width: 180px; }
.failures-table th:nth-child(3) { width: 240px; }
.failures-table th:nth-child(4) { width: 190px; }
.failures-table th:nth-child(5) { width: 170px; }
.failures-table th:nth-child(6) { width: 80px; }
.failures-table td { overflow: hidden; text-overflow: ellipsis; }
.runner-wait { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.copy-inline {
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 10px/1.4 var(--sans);
  cursor: pointer;
}
kbd { padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font: 11px var(--mono); }
.job-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
[hidden] { display: none !important; }
.trust-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.trust-footer nav { display: flex; gap: 14px; }
.trust-footer a:hover { color: var(--ink); text-decoration: underline; }
.skeleton { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skeleton i { height: 118px; border-radius: 10px; background: linear-gradient(90deg, var(--panel), var(--panel2), var(--panel)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 900px) {
  .runner-cards, .billing-facts { grid-template-columns: 1fr; }
  .trust-footer { flex-direction: column; }
  .jobs-ledger { overflow-x: auto; }
  .jobs-ledger table { min-width: 960px; }
}
/* Guides and comparison pages */
.guide { width: min(820px, calc(100% - 40px)); }
.guide h1 code { font-size: 0.8em; }
.guide table { font-size: 13px; }
.guide th, .guide td { vertical-align: top; white-space: normal; }
.guide-cta { margin-top: 36px; }
.guide-cta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.guide-related { padding-left: 18px; }
.guide-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.guide-list li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.guide-list li p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.guide-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.guide-foot a { color: inherit; }
.doc-nav-gap { margin-top: 18px; }

/* Admin funnel */
.funnel-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .funnel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.funnel-lists { grid-template-columns: 2fr 1.2fr 1fr 1fr; align-items: start; }
@media (max-width: 1100px) { .funnel-lists { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .funnel-lists { grid-template-columns: 1fr; } }
.funnel-lists table { table-layout: fixed; }
.funnel-lists td:first-child { overflow-wrap: anywhere; }
.funnel-lists td:last-child, .funnel-lists th:last-child { width: 72px; }
.funnel-lists .card { padding: 0; overflow: hidden; }
.funnel-lists .section-head { padding: 12px 16px 0; margin: 0; }
.funnel-lists table { width: 100%; }
.funnel-lists td:last-child, .funnel-lists th:last-child { text-align: right; }
.sales-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sales-agent-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sales-campaign-form { margin-top: 16px; }
.sales-campaign-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sales-agent-step { display: grid; gap: 8px; min-height: 145px; text-align: left; color: inherit; opacity: .48; }
.sales-agent-step.active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sales-agent-step small, .sales-agent-step span, .sales-agent-step em { font-size: 11px; }
.sales-agent-step span { color: var(--muted); line-height: 1.45; }
.sales-agent-step em { align-self: end; color: var(--accent); font-style: normal; text-transform: capitalize; }
.sales-provider-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.sales-provider { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--muted); }
.sales-provider i { width: 7px; height: 7px; border-radius: 50%; background: #d89529; }
.sales-provider.ready i { background: #42a36b; }
.sales-autopilot-console { overflow: hidden; border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel) 58%); }
.sales-autopilot-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sales-autopilot-head > div { display: flex; align-items: center; gap: 10px; }
.sales-autopilot-head b, .sales-autopilot-head small { display: block; }
.sales-autopilot-head small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.sales-live-dot.paused { background: #d89529; box-shadow: 0 0 0 4px color-mix(in srgb, #d89529 15%, transparent); }
.sales-autopilot-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.sales-autopilot-metrics article { display: grid; gap: 4px; padding: 17px 20px; border-right: 1px solid var(--line); }
.sales-autopilot-metrics article:last-child { border-right: 0; }
.sales-autopilot-metrics span, .sales-autopilot-metrics small { color: var(--muted); font-size: 10px; }
.sales-autopilot-metrics b { font-size: 22px; letter-spacing: -.025em; }
.sales-autopilot-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 20px; }
.sales-autopilot-body h3 { margin: 0 0 12px; font-size: 13px; }
.sales-autopilot-body ol { display: grid; gap: 9px; margin: 0; padding-left: 19px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.sales-autopilot-body ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.sales-autopilot-body li { display: flex; gap: 9px; align-items: start; }
.sales-autopilot-body ul i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #42a36b; }
.sales-autopilot-body ul i.error { background: var(--danger); }
.sales-autopilot-body ul b, .sales-autopilot-body ul small { display: block; font-size: 11px; }
.sales-autopilot-body ul small { margin-top: 2px; color: var(--muted); }
.sales-autopilot-error { margin: 0; padding: 12px 20px; border-top: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); font-size: 11px; }
@media (max-width: 900px) {
  .sales-autopilot-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-autopilot-metrics article { border-bottom: 1px solid var(--line); }
  .sales-autopilot-body { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sales-autopilot-head { align-items: flex-start; flex-direction: column; }
  .sales-autopilot-metrics { grid-template-columns: 1fr; }
  .sales-autopilot-metrics article { border-right: 0; }
}
.sales-subnav { display: flex; align-items: center; gap: 4px; margin: 0 0 14px; padding: 5px; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.sales-subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; text-decoration: none; }
.sales-subnav a:hover, .sales-subnav a.active { color: var(--text); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.sales-subnav a span { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); font-size: 10px; text-align: center; }
.sales-gtm-shell { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.sales-campaign-content { min-width: 0; }
.sales-campaign-rail { display: grid; gap: 3px; position: sticky; top: 18px; padding: 10px 0; }
.sales-campaign-rail > .label { padding: 0 10px 8px; }
.sales-campaign-rail a { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 12px; text-decoration: none; }
.sales-campaign-rail a:hover, .sales-campaign-rail a.active { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sales-campaign-rail a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-campaign-rail i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; }
.sales-campaign-rail i.online { background: #42a36b; opacity: 1; }
.sales-campaign-rail .sales-new-campaign { margin-top: 5px; border-top: 1px solid var(--line); border-radius: 0; }
.sales-batch-guard { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 20px; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.sales-batch-guard > div { display: flex; align-items: center; gap: 13px; }
.sales-batch-guard b { display: block; margin-bottom: 3px; }
.sales-batch-guard p { margin: 0; color: var(--muted); font-size: 12px; }
.sales-spark { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 18px; }
.sales-campaign-table table { min-width: 1180px; }
.sales-campaign-link { display: grid; gap: 4px; min-width: 190px; color: inherit; text-decoration: none; }
.sales-campaign-link:hover b { color: var(--accent); }
.sales-campaign-link span { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sales-performance { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-agent-workspace { margin-top: 18px; padding: 24px; }
.sales-agent-empty { max-width: 720px; }
.sales-agent-empty h2, .sales-agent-workspace h2 { margin: 8px 0; }
.sales-agent-running { display: flex; gap: 18px; align-items: center; min-height: 120px; }
.sales-results { display: grid; gap: 10px; margin: 18px 0; }
.sales-result-item { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.sales-result-item > input { margin-top: 8px; }
.sales-result-item > div { display: grid; gap: 8px; min-width: 0; }
.sales-result-item input, .sales-result-item textarea { width: 100%; }
.sales-result-head { display: grid; grid-template-columns: 1fr 82px; gap: 8px; }
.sales-result-item pre { white-space: pre-wrap; max-height: 240px; overflow: auto; font: inherit; font-size: 12px; }
.sales-sources { margin: 18px 0; }
.sales-sources summary { cursor: pointer; color: var(--muted); }
.sales-sources a { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; overflow-wrap: anywhere; }
.sales-sources a span { color: var(--muted); }
.sales-step { display: grid; gap: 5px; padding: 16px; width: 100%; color: inherit; appearance: none; font: inherit; text-align: left; cursor: pointer; }
.sales-step:hover { border-color: var(--accent); }
.sales-step.active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.sales-step strong { margin: 6px 0 0; font-size: 25px; }
.sales-step b { font-size: 12px; }
.sales-filter-label { margin: 14px 0 8px; color: var(--muted); font-size: 12px; }
.sales-account-open { display: grid; gap: 3px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sales-account-open:hover b { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sales-account-open span { color: var(--muted); font-size: 11px; }
[data-sales-account-row].selected td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
[data-sales-account-row][hidden] { display: none; }
.sales-account-detail { margin-top: 16px; padding: 22px; scroll-margin-top: 20px; }
.sales-account-detail[hidden] { display: none; }
.sales-account-detail .section-head p { margin: 6px 0 0; max-width: 760px; color: var(--muted); }
.sales-account-detail h3 { margin: 0; }
.sales-account-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.sales-account-facts > span { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; }
.sales-account-facts b { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.sales-account-empty { margin-top: 16px; }
.sales-strategy { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.sales-strategy h2 { margin: 8px 0 10px; font-size: 17px; }
.sales-strategy p { font-size: 12px; line-height: 1.6; }
.sales-strategy-card { padding: 16px; }
.sales-strategy-card summary { display: grid; gap: 5px; cursor: pointer; }
.sales-strategy-card summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.sales-strategy-card p { color: var(--muted); }
.sales-strategy-card ul { display: grid; gap: 9px; padding: 0; list-style: none; }
.sales-strategy-card li { display: grid; gap: 3px; font-size: 11px; line-height: 1.45; }
.sales-strategy-card li span { color: var(--muted); }
.sales-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sales-form.compact { align-content: start; }
.sales-status-form { display: inline-flex; align-items: center; gap: 8px; }
.sales-status-form select { min-height: 32px; }
.sales-layout { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(0, 2.3fr); gap: 18px; align-items: start; }
.sales-pipeline { min-width: 0; }
.sales-form { display: grid; gap: 12px; }
.sales-form h2, .sales-form h3 { margin: 0; }
.sales-form .button { justify-self: start; }
.sales-detail { padding-top: 6px; }
.sales-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.sales-ledgers { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; align-items: start; }
.sales-ledgers .card { padding: 0; overflow: hidden; }
.sales-ledgers .section-head { padding: 16px 16px 0; }
.sales-ledgers table { width: 100%; }
.sales-email-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sales-email-card { display: grid; gap: 12px; padding: 18px; min-width: 0; }
.sales-email-card .section-head { margin: 0; }
.sales-email-card h3 { margin: 5px 0 0; font-size: 15px; }
.sales-email-card input, .sales-email-card textarea { width: 100%; }
.sales-ai-rewrite { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 88%, var(--accent)); }
.sales-ai-rewrite p { margin: 0; font-size: 12px; line-height: 1.45; }
.sales-ai-rewrite .button { justify-self: start; }
.sales-reply { padding: 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.sales-reply p { margin: 6px 0 0; white-space: pre-wrap; max-height: 180px; overflow: auto; }
.sales-inbox .section-head > span { color: var(--muted); font-size: 11px; }
.sales-inbox .section-head > span b { color: var(--ink); }
.sales-inbox-shell { display: grid; grid-template-columns: minmax(330px, 42%) minmax(0, 58%); min-height: 620px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sales-inbox-list { overflow-y: auto; max-height: 72vh; border-right: 1px solid var(--line); background: #0b0e0c; }
.sales-inbox-row { display: grid; grid-template-columns: 10px minmax(120px, .72fr) minmax(180px, 1.45fr) auto; gap: 10px; align-items: center; min-height: 72px; padding: 11px 13px; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; transition: background .12s ease; }
.sales-inbox-row:hover { background: rgba(255,255,255,.025); }
.sales-inbox-row.selected { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); box-shadow: inset 3px 0 var(--accent); }
.sales-inbox-row.unread { background: color-mix(in srgb, var(--accent) 4%, #0b0e0c); color: var(--ink-2); }
.sales-inbox-row.unread b { color: var(--ink); font-weight: 760; }
.sales-inbox-unread { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.sales-inbox-row.unread .sales-inbox-unread { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); }
.sales-inbox-sender, .sales-inbox-summary { display: grid; gap: 4px; min-width: 0; }
.sales-inbox-sender b, .sales-inbox-summary b, .sales-inbox-sender small, .sales-inbox-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-inbox-sender b, .sales-inbox-summary b { color: var(--ink-2); font-size: 11px; font-weight: 560; }
.sales-inbox-sender small, .sales-inbox-summary small, .sales-inbox-row time { color: var(--muted); font-size: 10px; }
.sales-inbox-row time { align-self: start; padding-top: 2px; white-space: nowrap; }
.sales-inbox-reading-pane { min-width: 0; background: #0d100e; }
.sales-inbox-empty { display: grid; place-items: center; align-content: center; min-height: 100%; padding: 50px 24px; color: var(--muted); text-align: center; }
.sales-inbox-empty > span { margin-bottom: 12px; color: var(--ink-2); font-size: 28px; }
.sales-inbox-empty b { color: var(--ink-2); font-size: 13px; }
.sales-inbox-empty p { max-width: 320px; margin: 7px 0 0; font-size: 11px; line-height: 1.5; }
.sales-inbox-reader { padding: 26px 28px 48px; }
.sales-inbox-reader > header { display: flex; justify-content: space-between; gap: 24px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sales-inbox-reader h2 { margin: 6px 0 0; color: var(--ink); font-size: 20px; line-height: 1.35; letter-spacing: -.015em; }
.sales-inbox-meta { display: flex; gap: 11px; align-items: center; padding: 18px 0; }
.sales-inbox-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel2); color: var(--ink); font-size: 12px; font-weight: 750; }
.sales-inbox-meta > div { display: grid; gap: 3px; min-width: 0; }
.sales-inbox-meta b { overflow: hidden; color: var(--ink-2); font-size: 12px; text-overflow: ellipsis; }
.sales-inbox-meta small { color: var(--muted); font-size: 10px; }
.sales-inbox-body { min-height: 220px; padding: 10px 0 28px; color: var(--ink-2); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.sales-inbox-reader > footer { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 18px; border-top: 1px solid var(--line); }
.sales-inbox-thread { margin-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.sales-inbox-thread summary { padding: 16px 0; cursor: pointer; font-size: 11px; }
.sales-inbox-thread pre { max-height: 300px; overflow: auto; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #090b0a; color: var(--muted); font: 11px/1.6 var(--sans); white-space: pre-wrap; }
.sales-template-editor { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 94%, var(--accent) 6%); }
.sales-template-editor .section-head { align-items: end; margin-bottom: 16px; }
.sales-template-editor .section-head p { margin: 4px 0 0; color: var(--muted); }
.sales-template-editor > .field + .field { margin-top: 14px; }
.sales-template-editor textarea { font-family: var(--mono); line-height: 1.55; }
.sales-template-mode { min-width: 180px; }
.sales-template-tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 14px 0 10px; }
.sales-template-tokens > span { margin-right: 3px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sales-template-tokens code { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-size: 11px; }
.sales-history summary { cursor: pointer; font-weight: 650; margin-bottom: 14px; }
@media (max-width: 1100px) {
  .sales-steps, .sales-agent-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-strategy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-layout, .sales-detail-grid, .sales-email-grid { grid-template-columns: 1fr; }
  .sales-account-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-performance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-inbox-shell { display: block; min-height: 0; }
  .sales-inbox-list { max-height: 460px; border-right: 0; }
  .sales-inbox-reading-pane { min-height: 460px; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .sales-steps, .sales-agent-steps, .sales-strategy, .sales-ledgers { grid-template-columns: 1fr; }
  .sales-campaign-form .form-grid { grid-template-columns: 1fr; }
  .sales-account-facts { grid-template-columns: 1fr; }
  .sales-gtm-shell { grid-template-columns: 1fr; }
  .sales-campaign-rail { display: flex; position: static; overflow-x: auto; padding: 0 0 4px; }
  .sales-campaign-rail > .label { display: none; }
  .sales-campaign-rail a { flex: 0 0 auto; }
  .sales-campaign-rail .sales-new-campaign { margin: 0; border: 0; border-radius: 8px; }
  .sales-performance { grid-template-columns: 1fr; }
  .sales-batch-guard { align-items: flex-start; }
  .sales-inbox-shell { display: block; min-height: 0; }
  .sales-inbox-list { max-height: 300px; }
  .sales-inbox-reading-pane { border-top: 1px solid var(--line); }
  .sales-inbox-reader { padding: 21px 18px 38px; }
}
.range-label a { color: inherit; text-decoration: none; opacity: 0.6; }
.range-label a.active, .range-label a:hover { opacity: 1; text-decoration: underline; }

/* Sales workspace — dense list + focused account drawer. */
.main:has(.sales-gtm-shell) { max-width: 1580px; padding: 30px 34px 80px; }
.sales-heading { align-items: center; margin-bottom: 20px; }
.sales-heading .label { margin-bottom: 6px; color: var(--accent); font-weight: 700; }
.sales-heading h1 { font-size: 29px; }
.sales-phase-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 11px; }
.sales-phase-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent); }
.sales-subnav { width: 100%; margin-bottom: 18px; padding: 0; gap: 22px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.sales-subnav a { position: relative; padding: 10px 2px 12px; border-radius: 0; font-size: 12px; }
.sales-subnav a:hover, .sales-subnav a.active { background: transparent; color: var(--ink); }
.sales-subnav a.active:after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.sales-subnav a span { min-width: 18px; padding: 1px 5px; }
.sales-gtm-shell { grid-template-columns: 210px minmax(0, 1fr); gap: 26px; }
.sales-campaign-rail { top: 84px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 92%, transparent); }
.sales-campaign-rail > .label { padding: 2px 8px 10px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sales-campaign-rail a { padding: 10px 9px; border-radius: 7px; }
.sales-campaign-rail a.active { background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); }
.sales-campaign-rail .sales-new-campaign { margin-top: 8px; padding-top: 13px; color: var(--ink-2); }
.sales-campaign-overview { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr); gap: 28px; align-items: center; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: radial-gradient(circle at 95% 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%), var(--panel); }
.sales-campaign-overview h2 { margin: 5px 0 6px; font-size: 21px; letter-spacing: -.02em; }
.sales-campaign-overview p { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.sales-campaign-audience { display: grid; gap: 4px; padding-left: 20px; border-left: 1px solid var(--line); }
.sales-campaign-audience span, .sales-campaign-audience small { color: var(--muted); font-size: 10px; }
.sales-campaign-audience b { font-size: 12px; line-height: 1.45; }
.sales-agent-workspace { display: flex; align-items: center; min-height: 0; margin-top: 12px; padding: 16px 18px; }
.sales-agent-workspace .sales-agent-empty { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; width: 100%; max-width: none; }
.sales-agent-workspace .sales-agent-empty .label { grid-column: 1; }
.sales-agent-workspace .sales-agent-empty h2 { grid-column: 1; margin: 4px 0 2px; font-size: 15px; }
.sales-agent-workspace .sales-agent-empty p { grid-column: 1; margin: 0; color: var(--muted); font-size: 11px; }
.sales-agent-workspace .sales-agent-empty .button { grid-column: 2; grid-row: 1 / span 3; }
.sales-worklist { margin-top: 20px; }
.sales-worklist-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 13px; }
.sales-worklist-head h2 { margin: 4px 0; font-size: 19px; }
.sales-worklist-head p { margin: 0; color: var(--muted); font-size: 12px; }
.sales-worklist-stats { display: flex; gap: 18px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.sales-worklist-stats b { color: var(--ink); font-size: 13px; }
.sales-worklist-toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 9px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: #0d100e; }
.sales-steps { display: flex; gap: 3px; overflow-x: auto; }
.sales-step { display: inline-flex; align-items: center; gap: 6px; width: auto; min-width: max-content; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.sales-step:hover { border: 0; color: var(--ink); background: var(--panel2); }
.sales-step.active { border: 0; box-shadow: none; background: var(--panel2); color: var(--ink); }
.sales-step strong { order: 2; min-width: 20px; margin: 0; padding: 2px 5px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--ink-2); font-size: 10px; text-align: center; }
.sales-step span { order: 1; font-size: 11px; }
.sales-search { display: flex; align-items: center; gap: 7px; flex: 0 0 280px; min-height: 33px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); }
.sales-search input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.sales-filter-label { margin: 0; padding: 8px 12px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--panel); font-size: 10px; }
.sales-lead-table { border-radius: 0 0 10px 10px; }
.sales-lead-table table { min-width: 940px; table-layout: fixed; }
.sales-lead-table th { padding-top: 10px; padding-bottom: 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.sales-lead-table th:nth-child(1) { width: 21%; }
.sales-lead-table th:nth-child(2) { width: 10%; }
.sales-lead-table th:nth-child(3) { width: 8%; }
.sales-lead-table th:nth-child(4) { width: 25%; }
.sales-lead-table th:nth-child(5) { width: 8%; }
.sales-lead-table th:nth-child(6) { width: 11%; }
.sales-lead-table th:nth-child(7) { width: 17%; }
.sales-lead-table td { height: 60px; padding-top: 9px; padding-bottom: 9px; }
.sales-lead-table tbody tr { transition: background .15s ease; }
.sales-lead-table tbody tr:hover td { background: rgba(255,255,255,.018); }
.sales-account-open { display: flex; align-items: center; gap: 10px; width: 100%; }
.sales-account-open > span:last-child { display: grid; gap: 3px; min-width: 0; }
.sales-account-open b, .sales-account-open small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-account-open small { color: var(--muted); font-size: 10px; }
.sales-account-avatar { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--ink-2); font-size: 11px; font-weight: 750; }
.sales-fit-score { display: grid; grid-template-columns: 38px auto; gap: 7px; align-items: center; }
.sales-fit-score > i { display: block; height: 4px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.08); }
.sales-fit-score > i > span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.sales-fit-score b { font-size: 11px; }
.sales-evidence-cell { color: var(--muted); font-size: 11px; line-height: 1.45; }
.sales-evidence-cell a { color: var(--ink-2); }
.sales-next-action { width: 100%; justify-content: space-between; min-height: 30px; padding: 0 9px; border-color: transparent; white-space: nowrap; }
.sales-next-action:hover { border-color: var(--line); background: var(--panel2); }
.sales-drawer-backdrop { position: fixed; inset: 64px 0 0; z-index: 18; width: 100%; border: 0; background: rgba(0,0,0,.54); backdrop-filter: blur(2px); cursor: default; }
.sales-account-detail { position: fixed; top: 64px; right: 0; bottom: 0; z-index: 19; display: flex; flex-direction: column; width: min(760px, calc(100vw - 250px)); margin: 0; padding: 0; border-left: 1px solid var(--line); background: #0c0f0d; box-shadow: -22px 0 60px rgba(0,0,0,.45); }
.sales-drawer-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; flex: 0 0 auto; padding: 20px 22px 17px; border-bottom: 1px solid var(--line); background: rgba(12,15,13,.96); }
.sales-drawer-header h2 { margin: 5px 0 3px; font-size: 21px; letter-spacing: -.02em; }
.sales-drawer-header p { margin: 0; color: var(--muted); font-size: 11px; }
.sales-drawer-close { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 20px; cursor: pointer; }
.sales-drawer-close:hover { background: var(--panel2); color: var(--ink); }
.sales-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 22px 54px; }
.sales-account-summary { padding: 14px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.sales-account-summary p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.sales-account-stage { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 10px; }
.sales-account-stage b { color: var(--ink); }
.sales-drawer-section { margin-top: 22px; }
.sales-drawer-section .section-head { align-items: end; }
.sales-drawer-section .section-head h3 { margin: 3px 0 0; font-size: 15px; }
.sales-drawer-section .section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.sales-drawer-table { border-radius: 8px; }
.sales-drawer-table table { min-width: 640px; }
.sales-drawer-table th, .sales-drawer-table td { padding: 10px 11px; }
.sales-compose-section { padding-top: 2px; }
.sales-account-detail .sales-email-grid { grid-template-columns: 1fr; }
.sales-account-detail .sales-email-card { padding: 16px; border-radius: 9px; background: var(--panel); }
.sales-account-detail .sales-email-card textarea[data-email-body] { min-height: 250px; resize: vertical; font: 12px/1.55 var(--sans); }
.sales-account-detail .sales-ai-rewrite { background: #121713; }
body.sales-drawer-open { overflow: hidden; }
.sales-settings, .sales-diagnostics { margin-top: 18px; padding: 0; border-top: 1px solid var(--line); }
.sales-settings > summary, .sales-diagnostics > summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 0; padding: 15px 2px; color: var(--ink-2); font-size: 12px; list-style: none; }
.sales-settings > summary::-webkit-details-marker, .sales-diagnostics > summary::-webkit-details-marker { display: none; }
.sales-settings > summary:after, .sales-diagnostics > summary:after { content: "+"; color: var(--muted); font-size: 17px; }
.sales-settings[open] > summary:after, .sales-diagnostics[open] > summary:after { content: "−"; }
.sales-settings > summary span, .sales-diagnostics > summary span { font-weight: 650; }
.sales-settings > summary small, .sales-diagnostics > summary small { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 400; }
.sales-settings .sales-campaign-form { margin: 0 0 22px; }
.sales-diagnostics { margin-bottom: 24px; }
.sales-diagnostics > .sales-provider-bar { margin: 2px 0 16px; }
.sales-agent-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.sales-agent-step { display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 9px; min-height: 82px; padding: 13px; background: var(--panel); color: inherit; opacity: .58; }
.sales-agent-step.active, .sales-agent-step.complete { border: 0; box-shadow: none; opacity: 1; }
.sales-agent-step.active { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.sales-step-index { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 10px; }
.sales-agent-step.active .sales-step-index { border-color: var(--accent); background: var(--accent); color: #090a09; }
.sales-agent-step.complete .sales-step-index { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); color: var(--green); }
.sales-agent-step b { display: block; margin-bottom: 5px; font-size: 11px; }
.sales-agent-step small { display: block; color: var(--muted); font-size: 9px; line-height: 1.4; }
.sales-agent-step em { grid-column: 2; color: var(--accent); font-size: 9px; font-style: normal; text-transform: capitalize; }

@media (max-width: 1100px) {
  .main:has(.sales-gtm-shell) { padding-right: 24px; padding-left: 24px; }
  .sales-gtm-shell { grid-template-columns: 170px minmax(0, 1fr); gap: 18px; }
  .sales-worklist-toolbar, .sales-worklist-head { align-items: stretch; flex-direction: column; }
  .sales-search { flex-basis: auto; }
  .sales-worklist-stats { justify-content: flex-start; }
  .sales-agent-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .main:has(.sales-gtm-shell) { padding: 24px 16px 60px; }
  .sales-gtm-shell { grid-template-columns: 1fr; }
  .sales-campaign-rail { display: flex; position: static; overflow-x: auto; padding: 0 0 4px; }
  .sales-campaign-rail > .label { display: none; }
  .sales-campaign-rail a { flex: 0 0 auto; }
  .sales-campaign-rail .sales-new-campaign { margin: 0; border: 0; border-radius: 8px; }
  .sales-campaign-overview { grid-template-columns: 1fr; }
  .sales-campaign-audience { padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .sales-account-detail { top: 0; width: 100vw; }
  .sales-drawer-backdrop { inset: 0; }
  .sales-worklist-stats { overflow-x: auto; }
  .sales-agent-workspace .sales-agent-empty { display: block; }
  .sales-agent-workspace .sales-agent-empty .button { margin-top: 12px; }
  .sales-agent-steps { grid-template-columns: 1fr; }
}

/* Sales workspace: a focused, light SDR application inside the admin. */
body[data-app="admin"]:has(.sales-app-shell) {
  background: #f6f7f5;
}
body[data-app="admin"]:has(.sales-app-shell)::before {
  display: none;
}
body[data-app="admin"]:has(.sales-app-shell) .layout {
  grid-template-columns: 1fr;
}
body[data-app="admin"]:has(.sales-app-shell) .layout > .sidebar {
  display: none;
}
body[data-app="admin"]:has(.sales-app-shell) .main {
  max-width: none;
  padding: 0;
}
.sales-app-shell {
  --bg: #f6f7f5;
  --panel: #fff;
  --panel2: #f2f3f1;
  --line: #e2e4e0;
  --ink: #171a18;
  --ink-2: #484e4a;
  --muted: #7d837f;
  --accent: #168f66;
  --accent-soft: #e7f5ef;
  --green: #168f66;
  --yellow: #b5770d;
  --red: #c44b43;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  background: var(--bg);
  color: var(--ink);
}
.sales-app-shell .muted,
.sales-app-shell .section-head p { color: var(--muted); }
.sales-app-shell .card,
.sales-app-shell .table-wrap {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}
.sales-app-shell .button {
  min-height: 34px;
  border-color: var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 1px rgba(13, 75, 52, .12);
}
.sales-app-shell .button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink-2);
  box-shadow: 0 1px 1px rgba(17, 24, 20, .04);
}
.sales-app-shell .button:hover { filter: brightness(.97); }
.sales-app-shell .pill {
  border-color: #d9ddd9;
  background: #f5f6f4;
  color: #626964;
}
.sales-app-shell .pill.success,
.sales-app-shell .pill.online {
  border-color: #bfe3d3;
  background: #eaf7f1;
  color: #117750;
}
.sales-app-shell input,
.sales-app-shell select,
.sales-app-shell textarea {
  border-color: #daddd9;
  background: #fff;
  color: var(--ink);
}
.sales-app-shell input:focus,
.sales-app-shell select:focus,
.sales-app-shell textarea:focus {
  border-color: #55aa88;
  box-shadow: 0 0 0 3px rgba(22, 143, 102, .1);
  outline: 0;
}
.sales-campaign-rail {
  position: sticky;
  top: 64px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  overflow: hidden;
  padding: 17px 13px 13px;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}
.sales-rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 17px;
}
.sales-rail-brand .workspace-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d9ddd9;
  border-radius: 8px;
  background: #fff;
  color: #151816;
  font-size: 12px;
  font-weight: 800;
}
.sales-rail-brand b,
.sales-rail-brand small,
.sales-rail-exit b,
.sales-rail-exit small { display: block; }
.sales-rail-brand b { font-size: 12px; }
.sales-rail-brand small,
.sales-rail-exit small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.sales-campaign-rail nav {
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sales-campaign-rail nav a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 33px;
  margin: 1px 0;
  padding: 0 9px;
  border-radius: 7px;
  color: #545b56;
  font-size: 11px;
}
.sales-campaign-rail nav a:hover,
.sales-campaign-rail nav a.active {
  background: #eceeeb;
  color: #151816;
}
.sales-campaign-rail nav a.active { font-weight: 650; }
.sales-nav-icon {
  display: grid;
  place-items: center;
  width: 19px;
  color: #858b87;
  font-size: 13px;
}
.sales-campaign-rail nav a em {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 10px;
  background: #e1e4e0;
  color: #5e655f;
  font-size: 9px;
  font-style: normal;
  text-align: center;
}
.sales-nav-label {
  display: block;
  margin: 19px 9px 7px;
  color: #9ba09c;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.sales-campaign-dot {
  display: block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: #adb2ae;
}
.sales-campaign-dot.online { background: #20a875; box-shadow: 0 0 0 3px #e6f6ef; }
.sales-campaign-dot.review { background: #e3a42c; box-shadow: 0 0 0 3px #fbf2df; }
.sales-campaign-rail nav .sales-new-campaign {
  margin-top: 7px;
  border: 1px dashed #d9ddd9;
  color: #737a75;
}
.sales-rail-exit {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 9px 3px;
  border-top: 1px solid var(--line);
  color: #535a55;
  font-size: 10px;
}
.sales-app-content {
  min-width: 0;
  padding: 25px 29px 70px;
}
.sales-app-content > .section:first-child { margin-top: 0; }
.sales-status-banner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid #dfd7ef;
  border-radius: 10px;
  background: linear-gradient(90deg, #faf8ff, #fff);
}
.sales-status-banner > div,
.sales-status-banner > div:first-child,
.sales-action-card,
.sales-budget-card,
.sales-autopilot > div,
.sales-schedule-card > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
.sales-status-banner i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b5ed1;
  box-shadow: 0 0 0 4px #eee7f8;
}
.sales-status-banner b,
.sales-status-banner small,
.sales-action-card b,
.sales-action-card small,
.sales-budget-card b,
.sales-budget-card small,
.sales-autopilot b,
.sales-autopilot small,
.sales-schedule-card b,
.sales-schedule-card small { display: block; }
.sales-status-banner b { font-size: 11px; }
.sales-status-banner small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.sales-dashboard-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 12px;
  margin-top: 13px;
}
.sales-action-card,
.sales-budget-card {
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.sales-action-card > span:nth-child(2),
.sales-budget-card > span:nth-child(2) { min-width: 0; flex: 1; }
.sales-action-card b,
.sales-budget-card b { font-size: 11px; }
.sales-action-card small,
.sales-budget-card small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.sales-action-card > strong { color: var(--accent); font-size: 10px; }
.sales-budget-card > strong { font-size: 25px; }
.sales-action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #edf6f2;
  color: #15855f;
  font-size: 15px;
}
.sales-dashboard-section { margin-top: 30px; }
.sales-section-kicker {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 11px;
  color: #69706b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sales-section-kicker b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 9px;
  background: #e8eae7;
  color: #565d58;
  font-size: 8px;
}
.sales-section-kicker a { color: var(--accent); letter-spacing: 0; text-transform: none; }
.sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
  gap: 1px;
}
.sales-kpi {
  position: relative;
  min-height: 124px;
  padding: 17px 16px 10px;
  overflow: hidden;
  background: #fff;
}
.sales-kpi > small { display: flex; justify-content: space-between; color: #606762; font-size: 9px; }
.sales-kpi > small span { color: #9aa09c; }
.sales-kpi > strong { display: block; margin-top: 11px; font-size: 27px; letter-spacing: -.04em; }
.sales-sparkline { position: absolute; right: 6px; bottom: 2px; left: 6px; width: calc(100% - 12px); height: 49px; overflow: visible; }
.sales-sparkline polyline { fill: none; stroke: #26a778; stroke-width: 1.5; }
.sales-sparkline circle { fill: #26a778; }
.sales-sparkline.purple polyline { stroke: #8660c5; }
.sales-sparkline.purple circle { fill: #8660c5; }
.sales-autopilot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 11px;
  padding: 12px 14px;
  border: 1px solid #dacfee;
  border-radius: 9px;
  background: #fcfaff;
}
.sales-autopilot .sales-spark { color: #8a62c8; }
.sales-autopilot b { font-size: 10px; }
.sales-autopilot small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.sales-toggle { position: relative; display: block; width: 29px; height: 17px; border-radius: 10px; background: #c4c9c5; }
.sales-toggle:after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.16); }
.sales-toggle.on { background: #7c4cc0; }
.sales-toggle.on:after { left: 14px; }
.sales-campaign-table { border-radius: 9px; }
.sales-campaign-table table { min-width: 850px; }
.sales-campaign-table th,
.sales-campaign-table td,
.sales-sent-table th,
.sales-sent-table td { padding: 11px 12px; }
.sales-app-shell th {
  border-color: var(--line);
  background: #f7f8f6;
  color: #8b918d;
  font-size: 8px;
  letter-spacing: .07em;
}
.sales-app-shell td { border-color: #eceeeb; color: #565d58; font-size: 10px; }
.sales-campaign-link b,
.sales-campaign-link span,
.sales-state b,
.sales-state small { display: block; }
.sales-campaign-link b { color: #242825; font-size: 10px; }
.sales-campaign-link span,
.sales-state small { margin-top: 3px; color: #969c98; font-size: 8px; }
.sales-state { display: flex; align-items: center; gap: 8px; }
.sales-state > i { width: 7px; height: 7px; border-radius: 50%; background: #dca032; }
.sales-state > i.online { background: #20a875; }
.sales-state b { color: #4b524d; font-size: 9px; }
.sales-row-menu {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8d938f;
  cursor: pointer;
}
.sales-row-menu:hover { background: #f0f2ef; color: #343936; }
.sales-recent-replies {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.sales-recent-reply {
  display: grid;
  grid-template-columns: 31px minmax(135px, .75fr) minmax(220px, 1.8fr) minmax(90px, .6fr) 110px 52px;
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 9px 13px;
  border-bottom: 1px solid #eceeeb;
  color: #555c57;
  font-size: 9px;
}
.sales-recent-reply:last-child { border-bottom: 0; }
.sales-recent-reply:hover { background: #fafbfa; }
.sales-reply-avatar,
.sales-inbox-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #e9f3ef;
  color: #197958;
  font-weight: 750;
}
.sales-recent-reply b,
.sales-recent-reply small { display: block; }
.sales-recent-reply b { color: #303531; }
.sales-recent-reply small { margin-top: 3px; color: #969c98; }
.sales-recent-reply p { margin: 0; overflow: hidden; color: #727975; white-space: nowrap; text-overflow: ellipsis; }
.sales-reply-campaign { overflow: hidden; color: #6f7671; white-space: nowrap; text-overflow: ellipsis; }
.sales-recent-reply time { color: #929894; }
.sales-recent-reply > strong { color: var(--accent); font-size: 9px; }

/* Campaign workspace mirrors the agent activity + data panel split. */
.sales-app-content:has(.sales-campaign-split) { padding: 0; }
.sales-campaign-split {
  display: grid;
  grid-template-columns: minmax(390px, .82fr) minmax(570px, 1.45fr);
  min-height: calc(100vh - 64px);
}
.sales-campaign-activity {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  height: calc(100vh - 64px);
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}
.sales-campaign-activity > header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: start;
  padding: 19px 20px 15px;
  border-bottom: 1px solid var(--line);
}
.sales-campaign-activity h1 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.sales-campaign-activity header p { margin: 6px 0 0; color: var(--muted); font-size: 9px; text-transform: capitalize; }
.sales-live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #20a875; }
.sales-activity-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 17px 20px 76px; }
.sales-campaign-activity .sales-agent-steps {
  grid-template-columns: 1fr;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
}
.sales-campaign-activity .sales-agent-step {
  position: relative;
  min-height: 57px;
  padding: 7px 7px 10px 2px;
  background: transparent;
}
.sales-campaign-activity .sales-agent-step:not(:last-child):before {
  content: "";
  position: absolute;
  top: 33px;
  bottom: -1px;
  left: 13px;
  width: 1px;
  background: #dfe3df;
}
.sales-campaign-activity .sales-agent-step.active { background: #f2f6f3; border-radius: 8px; }
.sales-campaign-activity .sales-agent-step.active .sales-step-index { color: #fff; }
.sales-campaign-activity .sales-step-index { position: relative; z-index: 1; background: #fbfcfa; }
.sales-campaign-activity .sales-agent-step b { color: #343936; font-size: 10px; }
.sales-campaign-activity .sales-agent-step small { color: #8a918c; }
.sales-activity-feed { margin-top: 21px; padding-top: 16px; border-top: 1px solid var(--line); }
.sales-activity-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 9px; padding: 10px 2px; }
.sales-activity-dot { display: block; width: 8px; height: 8px; margin-top: 3px; border: 1px solid #aab0ac; border-radius: 50%; background: #fff; }
.sales-activity-dot.done { border-color: #20a875; background: #20a875; box-shadow: inset 0 0 0 2px #fff; }
.sales-activity-item b { color: #3c423e; font-size: 10px; }
.sales-activity-item p { margin: 3px 0; color: #7e8580; font-size: 9px; }
.sales-activity-item time { color: #a0a5a1; font-size: 8px; }
.sales-campaign-activity .sales-agent-workspace { margin-top: 19px; }
.sales-campaign-activity .sales-agent-review,
.sales-campaign-activity .sales-agent-empty,
.sales-campaign-activity .sales-agent-running {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}
.sales-campaign-activity .sales-result-item { background: #fafbfa; }
.sales-campaign-activity .sales-diagnostics { margin-top: 18px; }
.sales-steer-bar {
  position: absolute;
  right: 14px;
  bottom: 13px;
  left: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid #dfe2df;
  border-radius: 9px;
  background: rgba(255,255,255,.94);
  color: #8a908c;
  box-shadow: 0 8px 24px rgba(32, 38, 34, .08);
  font-size: 9px;
  backdrop-filter: blur(8px);
}
.sales-campaign-panel { min-width: 0; background: #f7f8f6; }
.sales-campaign-tabs {
  display: flex;
  align-items: end;
  height: 57px;
  padding: 0 23px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.sales-campaign-tabs a {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 57px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: #858b87;
  font-size: 10px;
}
.sales-campaign-tabs a.active { border-bottom-color: #1b201d; color: #202421; font-weight: 650; }
.sales-campaign-tabs a span { min-width: 17px; padding: 2px 5px; border-radius: 8px; background: #eceeeb; color: #747b76; font-size: 8px; text-align: center; }
.sales-campaign-panel-body { height: calc(100vh - 121px); overflow-y: auto; padding: 24px 25px 65px; }
.sales-campaign-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(210px, .75fr);
  margin-bottom: 15px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.sales-campaign-overview h2 { margin: 5px 0 7px; color: #242825; font-size: 17px; }
.sales-campaign-overview p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sales-campaign-audience { padding-left: 20px; border-left: 1px solid var(--line); }
.sales-campaign-audience span,
.sales-campaign-audience b,
.sales-campaign-audience small { display: block; }
.sales-campaign-audience span { color: #9a9f9b; font-size: 8px; text-transform: uppercase; }
.sales-campaign-audience b { margin-top: 7px; color: #3e4440; font-size: 10px; line-height: 1.45; }
.sales-campaign-audience small { margin-top: 5px; color: #8c928e; font-size: 9px; }
.sales-quality { margin: 0; }
.sales-quality > .section-head { margin-bottom: 18px; }
.sales-quality > .section-head h2 { margin: 4px 0 5px; font-size: 18px; }
.sales-quality > .section-head p { margin: 0; color: var(--muted); font-size: 10px; }
.sales-quality-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.sales-quality-hero > div { padding: 19px 21px; }
.sales-quality-hero > div + div { border-left: 1px solid var(--line); }
.sales-quality-hero span { display: block; color: #8a918c; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.sales-quality-hero strong { display: block; margin: 7px 0 4px; color: #202521; font-size: 31px; line-height: 1; }
.sales-quality-hero strong small { color: #939a95; font-size: 12px; font-weight: 500; }
.sales-quality-hero p,
.sales-quality-hero small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.sales-quality-identity b { display: block; margin: 11px 0 5px; color: #147553; font-size: 16px; }
.sales-quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sales-quality-metric { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sales-quality-metric header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.sales-quality-metric header span { color: #555d58; font-size: 10px; font-weight: 650; }
.sales-quality-metric header em { padding: 3px 7px; border-radius: 8px; background: #f1f2f1; color: #777e79; font-size: 8px; font-style: normal; }
.sales-quality-metric.pass header em { background: #e7f6ef; color: #147553; }
.sales-quality-metric.fail header em { background: #fff2df; color: #9a6114; }
.sales-quality-metric strong { display: block; margin: 13px 0 4px; color: #272c28; font-size: 23px; }
.sales-quality-metric p { margin: 0; color: var(--muted); font-size: 9px; }
.sales-quality-metric > i { display: block; height: 4px; margin-top: 13px; overflow: hidden; border-radius: 3px; background: #e9ece9; }
.sales-quality-metric > i span { display: block; height: 100%; border-radius: inherit; background: #aab0ac; }
.sales-quality-metric.pass > i span { background: #29a676; }
.sales-quality-metric.fail > i span { background: #d99536; }
.sales-quality-comparison { margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sales-quality-comparison .section-head { margin-bottom: 12px; }
.sales-quality-comparison h3 { margin: 4px 0 0; font-size: 14px; }
.sales-quality-note { margin: 11px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.sales-quality-method { margin-top: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfa; }
.sales-quality-method summary { cursor: pointer; color: #4f5651; font-size: 10px; font-weight: 650; }
.sales-quality-method ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.sales-hypotheses { margin: 0 0 15px; }
.sales-hypotheses .section-head { margin-bottom: 12px; }
.sales-hypotheses h2 { margin: 4px 0 3px; font-size: 18px; }
.sales-hypotheses .section-head p { margin: 0; color: var(--muted); font-size: 10px; }
.sales-hypothesis-actions { display: flex; align-items: center; }
.sales-hypothesis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sales-hypothesis-card { position: relative; padding: 15px 16px 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sales-hypothesis-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #a9b0ab; }
.sales-hypothesis-card.active::before { background: #29a676; }
.sales-hypothesis-card.decided::before { background: #d99536; }
.sales-hypothesis-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sales-hypothesis-card em { padding: 3px 7px; border-radius: 8px; background: #f1f2f1; color: #777e79; font-size: 8px; font-style: normal; text-transform: uppercase; }
.sales-hypothesis-card.active em { background: #e7f6ef; color: #147553; }
.sales-hypothesis-card.decided em { background: #fff2df; color: #9a6114; }
.sales-hypothesis-card h3 { margin: 9px 0 5px; color: #242825; font-size: 13px; }
.sales-hypothesis-card p { min-height: 38px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.sales-hypothesis-status { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.sales-hypothesis-status span { display: block; margin-bottom: 3px; color: #9a9f9b; font-size: 8px; text-transform: uppercase; }
.sales-hypothesis-status b { color: #3e4440; font-size: 10px; text-transform: capitalize; }
.sales-hypothesis-decision { display: grid; gap: 7px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.sales-hypothesis-decision label span { display: block; margin-bottom: 3px; color: #9a9f9b; font-size: 8px; text-transform: uppercase; }
.sales-hypothesis-decision select,
.sales-hypothesis-decision input { width: 100%; padding: 7px 8px; border: 1px solid #d7dbd7; border-radius: 7px; background: #fff; color: #262b27; font: inherit; font-size: 10px; }
.sales-hypothesis-metrics { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfa; }
.sales-hypothesis-metrics span { display: block; color: #9a9f9b; font-size: 8px; text-transform: uppercase; }
.sales-hypothesis-metrics b { color: #272c28; font-size: 16px; }
@media (max-width: 1000px) {
  .sales-hypothesis-grid { grid-template-columns: 1fr; }
  .sales-hypothesis-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sales-hypothesis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sales-app-shell .sales-settings {
  margin: 0;
  padding: 0;
  border: 0;
}
.sales-app-shell .sales-settings > summary { display: none; }
.sales-app-shell .sales-settings .sales-campaign-form {
  margin: 0;
  padding: 19px;
  border-radius: 10px;
}
.sales-app-shell .sales-settings .section-head h2 { margin-top: 4px; font-size: 16px; }
.sales-app-shell .sales-settings-templates .form-grid { display: none; }
.sales-app-shell .sales-settings-targeting .sales-template-editor { display: none; }
.sales-app-shell .sales-template-editor { border-color: var(--line); background: #fafbfa; }
.sales-app-shell .sales-template-tokens code { border-color: #dfe3df; background: #f1f3f1; color: #59615c; }
.sales-app-shell .sales-history { border-color: var(--line); }
.sales-app-shell .sales-history > summary { color: #535a55; }
.sales-app-shell .sales-history > summary small { color: var(--muted); }
.sales-app-shell .sales-provider { border-color: var(--line); background: #fff; }
.sales-app-shell .sales-provider strong { color: var(--ink); }
.sales-app-shell .sales-worklist { margin: 0; }
.sales-app-shell .sales-worklist-head,
.sales-app-shell .sales-worklist-toolbar { border-color: var(--line); background: #fff; }
.sales-app-shell .sales-step { border-color: var(--line); background: #fff; color: #707772; }
.sales-app-shell .sales-step.active { border-color: #afd8c7; background: #ebf7f2; color: #147553; }
.sales-app-shell .sales-lead-table tr:hover td,
.sales-app-shell .sales-lead-table tr.selected td { background: #f3f7f4; }
.sales-app-shell .sales-fit-score > i { background: #e6e9e6; }
.sales-app-shell .sales-next-action:hover { background: #f1f3f1; }
.sales-app-shell .sales-account-detail { background: #f7f8f6; box-shadow: -20px 0 55px rgba(29, 36, 31, .18); }
.sales-app-shell .sales-drawer-header { background: rgba(255,255,255,.96); }
.sales-app-shell .sales-account-summary,
.sales-app-shell .sales-email-card { background: #fff; }
.sales-app-shell .sales-account-detail .sales-ai-rewrite { background: #f5f7f5; }
.sales-intent-evidence-card {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.sales-intent-evidence-card:first-child { margin-top: 0; }
.sales-intent-evidence-card header,
.sales-intent-evidence-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sales-intent-evidence-card b { font-size: 11px; }
.sales-intent-evidence-card header span,
.sales-intent-evidence-meta span { color: var(--muted); font-size: 9px; }
.sales-intent-evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0;
}
.sales-intent-evidence-card blockquote {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid var(--accent);
  background: #f8f9f7;
  color: #444b46;
  font-size: 11px;
  line-height: 1.5;
}
.sales-intent-evidence-ref {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sales-evidence-state {
  padding: 12px 0 2px;
  color: var(--muted);
  font-size: 11px;
}
.sales-intent-evidence[data-evidence-state="error"] .evidence-error { margin: 0 0 8px; color: #b5770d; font-size: 10px; }

/* Mailbox and supporting pages retain the same visual language. */
.sales-page-section,
.sales-inbox { max-width: 1320px; margin: 0 auto; }
.sales-page-section > .section-head,
.sales-inbox > .section-head { margin-bottom: 20px; }
.sales-page-section > .section-head h1,
.sales-inbox > .section-head h2 { margin: 0 0 6px; color: #202421; font-size: 23px; letter-spacing: -.035em; }
.sales-app-shell .sales-inbox-shell { border-color: var(--line); background: #fff; }
.sales-app-shell .sales-inbox-list { border-color: var(--line); background: #fbfcfa; }
.sales-app-shell .sales-inbox-row { border-color: #eceeeb; background: #fff; color: #5e655f; }
.sales-app-shell .sales-inbox-row:hover,
.sales-app-shell .sales-inbox-row.selected { background: #f0f5f2; }
.sales-app-shell .sales-inbox-row.unread { background: #fff; }
.sales-app-shell .sales-inbox-row.unread .sales-inbox-unread { background: var(--accent); }
.sales-app-shell .sales-inbox-reader { background: #fff; }
.sales-app-shell .sales-inbox-reader header { border-color: var(--line); background: #fff; }
.sales-app-shell .sales-inbox-body { color: #444b46; }
.sales-doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sales-doc-grid .card { padding: 20px; }
.sales-doc-grid h2 { margin: 7px 0; font-size: 17px; }
.sales-doc-grid p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.sales-doc-wide { grid-column: 1 / -1; }
.sales-approved-claims { display: grid; gap: 7px; margin-top: 12px; }
.sales-approved-claims span { padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: #f8f9f7; color: #555c57; font-size: 10px; }
.sales-schedule-card { display: flex; justify-content: space-between; align-items: center; padding: 19px; }
.sales-schedule-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.sales-schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sales-schedule-grid .metric strong { font-size: 22px; }
.sales-integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sales-integration-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px; }
.sales-integration-logo { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #f6f7f5; color: #69706b; font-size: 9px; font-weight: 800; }
.sales-integration-card b,
.sales-integration-card small { display: block; }
.sales-integration-card b { font-size: 10px; }
.sales-integration-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.sales-integration-card em { color: #168f66; font-size: 8px; font-style: normal; }
.sales-integration-card em.missing { color: #b5770d; }

@media (max-width: 1180px) {
  .sales-app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sales-campaign-split { grid-template-columns: minmax(330px, .72fr) minmax(500px, 1.35fr); }
  .sales-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sales-app-shell { grid-template-columns: 66px minmax(0, 1fr); }
  .sales-campaign-rail { padding-right: 8px; padding-left: 8px; }
  .sales-rail-brand > span:last-child,
  .sales-campaign-rail nav a > span:nth-child(2),
  .sales-campaign-rail nav a em,
  .sales-nav-label,
  .sales-rail-exit span:last-child { display: none; }
  .sales-campaign-rail nav a { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .sales-campaign-dot { margin: 0; }
  .sales-campaign-split { grid-template-columns: 1fr; }
  .sales-campaign-activity { position: static; height: auto; min-height: 520px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sales-campaign-panel-body { height: auto; overflow: visible; }
  .sales-integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body[data-app="admin"]:has(.sales-app-shell) .topbar { padding: 0 14px; }
  .sales-app-shell { display: block; }
  .sales-campaign-rail {
    position: sticky;
    top: 64px;
    z-index: 10;
    display: block;
    width: 100%;
    height: 49px;
    padding: 7px 10px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .sales-rail-brand,
  .sales-rail-exit,
  .sales-nav-label { display: none; }
  .sales-campaign-rail nav { display: flex; overflow: visible; }
  .sales-campaign-rail nav a { display: inline-flex; width: 35px; min-width: 35px; margin-right: 3px; }
  .sales-campaign-rail nav a:has(.sales-campaign-dot) { display: none; }
  .sales-app-content { padding: 18px 14px 50px; }
  .sales-app-content:has(.sales-campaign-split) { padding: 0; }
  .sales-dashboard-actions,
  .sales-kpi-grid,
  .sales-doc-grid,
  .sales-schedule-grid,
  .sales-integration-grid,
  .sales-quality-hero,
  .sales-quality-grid { grid-template-columns: 1fr; }
  .sales-quality-hero > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .sales-status-banner,
  .sales-autopilot,
  .sales-schedule-card { align-items: stretch; flex-direction: column; }
  .sales-recent-reply { grid-template-columns: 31px minmax(0, 1fr) auto; }
  .sales-recent-reply p,
  .sales-recent-reply .sales-reply-campaign,
  .sales-recent-reply > strong { display: none; }
  .sales-campaign-overview { grid-template-columns: 1fr; }
  .sales-campaign-audience { margin-top: 14px; padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .sales-campaign-tabs { padding: 0 8px; }
  .sales-campaign-panel-body { padding: 17px 12px 50px; }
  .sales-app-shell .sales-settings .sales-campaign-form { padding: 14px; }
}

/* Sales dashboard responsive polish: keep the workspace inside laptop viewports. */
body[data-app="admin"]:has(.sales-app-shell) {
  max-width: 100vw;
  overflow-x: clip;
}
.sales-app-shell {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  grid-template-columns: 216px minmax(0, 1fr);
  overflow-x: clip;
}
.sales-app-shell > *,
.sales-app-content > *,
.sales-status-banner > *,
.sales-dashboard-actions > *,
.sales-autopilot-head > *,
.sales-autopilot-body > *,
.sales-autopilot-metrics > * {
  min-width: 0;
}
.sales-app-content {
  width: 100%;
  padding: 18px 22px 44px;
}
.sales-status-banner {
  min-height: 52px;
  padding: 9px 12px;
}
.sales-status-banner > div:first-child > span,
.sales-action-card > span:nth-child(2),
.sales-budget-card > span:nth-child(2),
.sales-autopilot-head > div > span:last-child,
.sales-autopilot-body li > span {
  min-width: 0;
}
.sales-status-banner small,
.sales-action-card small,
.sales-budget-card small,
.sales-autopilot-head small,
.sales-autopilot-body li b,
.sales-autopilot-body li small {
  overflow-wrap: anywhere;
}
.sales-status-banner + .sales-autopilot-console { margin-top: 12px; }
.sales-autopilot-head {
  gap: 12px;
  padding: 13px 16px;
}
.sales-autopilot-head > div { min-width: 0; }
.sales-autopilot-metrics article {
  min-width: 0;
  gap: 3px;
  padding: 11px 14px;
  overflow: hidden;
}
.sales-autopilot-metrics span,
.sales-autopilot-metrics small {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sales-autopilot-metrics b { font-size: 19px; }
.sales-autopilot-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  padding: 14px 16px;
}
.sales-autopilot-body h3 { margin-bottom: 8px; font-size: 12px; }
.sales-autopilot-body ol { gap: 6px; padding-left: 18px; line-height: 1.4; }
.sales-autopilot-body ul { gap: 7px; }
.sales-autopilot-body li { min-width: 0; gap: 8px; }
.sales-autopilot-error { padding: 10px 16px; }
.sales-dashboard-actions {
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 10px;
  margin-top: 10px;
}
.sales-action-card,
.sales-budget-card {
  min-height: 60px;
  padding: 10px 12px;
}
.sales-dashboard-section { margin-top: 20px; }
.sales-section-kicker { margin-bottom: 9px; }
.sales-kpi {
  min-width: 0;
  min-height: 98px;
  padding: 12px 13px 6px;
}
.sales-kpi > small { gap: 8px; }
.sales-kpi > small span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sales-kpi > strong { margin-top: 6px; font-size: 24px; }
.sales-sparkline { height: 39px; }
.sales-campaign-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.sales-campaign-table table { width: max-content; }

@media (max-width: 1180px) {
  .sales-app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sales-app-content { padding: 16px 18px 40px; }
  .sales-campaign-rail { padding-right: 8px; padding-left: 8px; }
  .sales-rail-brand > span:last-child,
  .sales-campaign-rail nav a > span:nth-child(2),
  .sales-campaign-rail nav a em,
  .sales-nav-label,
  .sales-rail-exit span:last-child { display: none; }
  .sales-campaign-rail nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }
  .sales-campaign-dot { margin: 0; }
}
@media (max-width: 900px) {
  .sales-autopilot-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-autopilot-metrics article { border-bottom: 1px solid var(--line); }
  .sales-autopilot-body { grid-template-columns: 1fr; }
  .sales-dashboard-actions { grid-template-columns: 1fr; }
  .sales-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .sales-app-shell {
    display: block;
    max-width: 100%;
  }
  .sales-app-content { padding: 14px 12px 36px; }
  .sales-autopilot-head { align-items: stretch; }
  .sales-autopilot-head > div:last-child { flex-wrap: wrap; }
  .sales-autopilot-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-status-banner + .sales-autopilot-console { margin-top: 10px; }
  .sales-kpi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .sales-autopilot-metrics { grid-template-columns: 1fr; }
}
