@font-face {
  font-family: "Geist";
  src: url("/fonts/geist/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0a6cff;
  --blue-2: #0047c2;
  --blue-3: #e8f1ff;
  --blue-soft: rgba(10, 108, 255, 0.1);
  --ink: #080b12;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e6eaf2;
  --line-strong: #cdd6e4;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --surface-3: #eef4ff;
  --wash: #f3f6fb;
  --wash-strong: #eaf0fb;
  --gold: #f2c94c;
  --gold-soft: #fff7d6;
  --green: #0f8f5f;
  --green-soft: #e8f7ef;
  --amber: #ad6b00;
  --amber-soft: #fff4d8;
  --red: #d92d20;
  --red-soft: #fff1f2;
  --sidebar-bg: #060914;
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-active: rgba(255, 255, 255, 0.11);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 44px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 28px 90px rgba(16, 24, 40, 0.14);
  --glass-surface: rgba(255, 255, 255, 0.78);
  --input-bg: #ffffff;
  --focus-ring: 0 0 0 3px rgba(10, 108, 255, 0.22);
  color-scheme: light;
  font-family:
    "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02" 1, "cv03" 1, "cv04" 1, "tnum" 1;
}

html[data-theme="dark"] {
  --blue: #5b9dff;
  --blue-2: #8bbaff;
  --blue-3: rgba(91, 157, 255, 0.16);
  --blue-soft: rgba(91, 157, 255, 0.16);
  --ink: #f6f8ff;
  --muted: #aeb8cc;
  --muted-2: #7f8aa1;
  --line: rgba(224, 232, 255, 0.13);
  --line-strong: rgba(224, 232, 255, 0.24);
  --surface: #111827;
  --surface-2: #0d1422;
  --surface-3: #17243a;
  --wash: #070b14;
  --wash-strong: #0b1220;
  --gold: #ffd95a;
  --gold-soft: rgba(255, 217, 90, 0.13);
  --green: #40d38a;
  --green-soft: rgba(64, 211, 138, 0.14);
  --amber: #ffc65b;
  --amber-soft: rgba(255, 198, 91, 0.14);
  --red: #ff7a88;
  --red-soft: rgba(255, 122, 136, 0.15);
  --sidebar-bg: #030711;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-text: rgba(245, 248, 255, 0.72);
  --sidebar-active: rgba(91, 157, 255, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24), 0 22px 54px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 32px 100px rgba(0, 0, 0, 0.38);
  --glass-surface: rgba(17, 24, 39, 0.74);
  --input-bg: #0c1322;
  --focus-ring: 0 0 0 3px rgba(91, 157, 255, 0.3);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(10, 108, 255, 0.08), transparent 34rem),
    linear-gradient(180deg, var(--wash), var(--wash-strong));
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.client-action-card:focus-visible,
.customer-row:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.client-only {
  display: none !important;
}

body[data-role="client"] .client-only {
  display: block !important;
}

body[data-role="client"] .client-only.hidden {
  display: none !important;
}

body:not([data-role="owner"]) .owner-only {
  display: none !important;
}

body[data-role="client"] .command-header {
  background:
    linear-gradient(135deg, var(--glass-surface), rgba(247, 250, 255, 0.62)),
    var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

body[data-role="client"] .command-header .eyebrow {
  color: var(--blue);
  opacity: 1;
}

body[data-role="client"] .ghost-button,
body[data-role="client"] .header-actions select {
  color: var(--ink);
  border-color: var(--line);
  background: var(--input-bg);
}

body[data-role="client"] #client-select,
body[data-role="client"] #refresh-button {
  display: none;
}

body[data-role="client"] .status-row {
  display: none;
}

body[data-role="client"] .lifecycle-card {
  border-color: rgba(31, 73, 232, 0.22);
  background:
    linear-gradient(135deg, rgba(220, 230, 255, 0.8), rgba(255, 255, 255, 0.96)),
    white;
}

.client-portal-card {
  display: grid;
  gap: 16px;
  min-width: 0;
}

body[data-role="client"] .client-portal-card.client-only {
  display: grid !important;
}

.client-home-hero {
  border: 1px solid rgba(40, 81, 245, 0.18);
  border-radius: 8px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.96) 48%, rgba(255, 247, 207, 0.34)),
    white;
  box-shadow: var(--shadow-sm);
}

.client-portal-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.client-portal-main h2 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 620;
  line-height: 1.05;
}

.client-portal-main p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.client-home-next-action {
  margin: 18px 0 0;
  border-top: 1px solid rgba(40, 81, 245, 0.12);
  padding-top: 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.client-action-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.client-action-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.client-action-card.primary {
  border-color: rgba(40, 81, 245, 0.24);
  background:
    linear-gradient(135deg, rgba(231, 237, 255, 0.84), rgba(255, 255, 255, 0.98)),
    white;
}

.client-action-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.client-action-icon {
  width: 48px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #080b12;
  color: var(--gold);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.client-action-card.primary .client-action-icon {
  background: var(--blue);
  color: white;
}

.client-action-card.disabled {
  cursor: default;
  background: rgba(248, 250, 252, 0.9);
  color: var(--muted);
}

.client-action-card.disabled:hover {
  border-color: var(--line);
  transform: none;
}

.client-action-card.disabled .client-action-icon {
  background: #eef2f7;
  color: var(--muted);
}

.client-action-card.disabled .client-action-arrow {
  color: var(--muted);
}

.client-action-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.client-action-status {
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.client-action-card.disabled .client-action-status {
  color: var(--muted);
}

.client-action-copy strong {
  font-size: 16px;
  font-weight: 680;
  line-height: 1.2;
}

.client-action-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.client-action-arrow {
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 750;
}

.client-home-panels {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.client-home-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: none;
}

.client-home-panel .section-heading {
  margin-bottom: 10px;
}

.client-home-panel h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.15;
}

.client-activity-panel {
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98)),
    white;
}

.client-activity-panel .client-home-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.client-activity-panel .client-home-stats article {
  display: grid;
  align-content: start;
  border-top: 0;
  border-right: 1px solid var(--line);
  padding: 14px 16px;
}

.client-activity-panel .client-home-stats article:last-child {
  border-right: 0;
}

.client-activity-panel .client-home-stats strong {
  max-width: none;
  font-size: 24px;
  text-align: left;
}

.client-home-stats {
  grid-template-columns: 1fr;
  gap: 0;
}

.client-home-stats article {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
}

.client-home-stats.system-health-grid article {
  min-height: 0;
  border-radius: 0;
  background: transparent;
}

.client-home-stats article:first-child,
.client-home-steps .source-guide-step:first-child {
  border-top: 0;
}

.client-home-stats span {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.client-home-stats strong {
  max-width: 62%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
  text-align: right;
  overflow-wrap: anywhere;
}

.client-home-steps {
  grid-template-columns: 1fr;
  gap: 0;
}

.client-home-steps .source-guide-step {
  min-height: 0;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 5px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
}

.client-home-steps .source-guide-step span {
  grid-row: 1 / span 2;
  align-self: start;
  justify-content: center;
  width: 98px;
  text-align: center;
}

.client-home-steps .source-guide-step strong,
.client-home-steps .source-guide-step small {
  min-width: 0;
}

.client-home-steps .source-guide-step small {
  grid-column: 2;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 0%, rgba(10, 108, 255, 0.32), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    var(--sidebar-bg);
}

.login-card {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-lockup span span {
  color: var(--blue);
}

.brand-shield {
  width: 28px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px 8px 12px 12px;
  background: var(--blue);
  color: var(--gold);
  font-size: 18px;
}

.login-card h1 {
  margin: 28px 0 8px;
  font-size: 42px;
  font-weight: 620;
  line-height: 0.98;
  letter-spacing: 0;
}

.login-card p {
  color: var(--muted);
  line-height: 1.5;
}

.connect-success-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, #090b12 0%, #12215f 52%, #2651f3 100%),
    var(--blue);
}

.connect-success-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.success-kicker {
  display: inline-flex;
  margin-top: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--green-soft);
  color: #087333;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.connect-success-card h1 {
  margin: 18px 0 10px;
  font-size: 50px;
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: 0;
}

.connect-success-card p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.connect-success-actions {
  margin: 24px 0 16px;
}

.connect-success-actions .gold-button {
  display: inline-flex;
  width: auto;
  text-decoration: none;
}

.connect-success-muted {
  margin-bottom: 0;
  font-size: 14px !important;
  font-weight: 800;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.login-form input,
.header-actions select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--input-bg);
  color: var(--ink);
}

.login-form button,
.gold-button {
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.login-form button:hover,
.gold-button:hover {
  background: #f0c71b;
}

.login-form .link-button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  text-align: left;
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: var(--red);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
  min-width: 0;
}

.sidebar {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  border-right: 1px solid var(--sidebar-border);
  background:
    radial-gradient(circle at 32px 0, rgba(10, 108, 255, 0.28), transparent 17rem),
    var(--sidebar-bg);
  color: white;
  overflow: visible;
}

.sidebar-brand {
  font-size: 28px;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 620;
  text-align: left;
  cursor: pointer;
}

.nav-icon {
  width: 30px;
  height: 22px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 780;
  line-height: 1;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active,
.nav-item:hover {
  background: var(--sidebar-active);
  border-color: rgba(255, 255, 255, 0.14);
  color: white;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  background: var(--gold);
  color: var(--ink);
}

.nav-item[data-tooltip] {
  position: relative;
}

.nav-item[data-tooltip]:hover::after,
.nav-item[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 500;
  left: calc(100% + 10px);
  top: 50%;
  width: max-content;
  max-width: 240px;
  transform: translateY(-50%);
  border: 1px solid rgba(224, 232, 255, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  background: #050914;
  color: #ffffff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 1;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.sidebar-note {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-note span:last-child {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.live-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.18);
}

.workspace {
  display: grid;
  gap: 18px;
  padding: 18px;
  min-width: 0;
}

.command-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 18px;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--glass-surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.command-header h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.command-header h1 {
  font-size: 30px;
  font-weight: 620;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 6px;
  color: inherit;
  opacity: 0.68;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

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

.header-actions select {
  min-width: 140px;
  border-color: var(--line);
  background: var(--input-bg);
}

.ghost-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}

.ghost-button:hover,
.ghost-light-button:hover,
.mini-action-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.theme-toggle-button {
  min-width: 102px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  background: var(--input-bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.theme-toggle-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.theme-toggle-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  line-height: 1;
}

.ghost-icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
}

.ghost-icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.58;
}

.gold-button.danger {
  background: var(--red);
  color: white;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  font-weight: 680;
  pointer-events: auto;
}

.toast.green {
  border-color: #b9eacb;
  background: var(--green-soft);
  color: #087333;
}

.toast.amber {
  border-color: #f8d86d;
  background: var(--amber-soft);
  color: var(--amber);
}

.toast.red {
  border-color: #fecdd3;
  background: var(--red-soft);
  color: var(--red);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 18, 0.56);
}

.app-modal {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 620;
  line-height: 1.08;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.modal-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
  color: #344054;
}

.modal-details dl {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) 1fr;
  gap: 9px 12px;
  margin: 0;
}

.modal-details dt {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.modal-copy-box {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.modal-confirmation-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 650;
}

.modal-confirmation-field span {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-confirmation-field input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.account-menu {
  position: relative;
}

.account-menu-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fbfcff;
  color: var(--ink);
  cursor: pointer;
}

.account-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold);
  font-weight: 760;
}

.account-summary-copy,
.account-menu-heading {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.account-menu-button strong,
.account-menu-heading strong {
  max-width: 170px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-button small,
.account-menu-heading small {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 620;
  line-height: 1.2;
  text-transform: uppercase;
}

.account-menu-caret {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.account-menu-panel {
  position: absolute;
  z-index: 40;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
  box-shadow: var(--shadow-md);
}

.account-menu-heading {
  padding: 8px 9px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.account-menu-item {
  border: 0;
  border-radius: 8px;
  padding: 10px 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: var(--surface-2);
}

.account-menu-item.danger {
  color: #b42318;
}

.status-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.oauth-banner {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: white;
  color: var(--ink);
  font-weight: 680;
  box-shadow: var(--shadow-sm);
}

.oauth-banner.green {
  border-color: #b9eacb;
  background: var(--green-soft);
  color: #087333;
}

.status-chip,
.pill,
.summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
}

.status-chip.green,
.pill.green {
  background: var(--green-soft);
  color: #087333;
}

.status-chip.amber,
.pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-chip.red {
  background: var(--red-soft);
  color: var(--red);
}

.pill.blue {
  background: #eaf0ff;
  color: var(--blue);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.metric-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(6, minmax(130px, 1fr));
  gap: 12px;
}

.view-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.metric-card,
.lifecycle-card,
.table-card,
.detail-panel,
.attention-strip,
.launch-gate-card,
.sources-hero,
.source-card,
.placeholder-panel,
.settings-hero,
.settings-card,
.operations-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.table-card,
.operations-card,
.settings-card,
.detail-panel {
  box-shadow: none;
}

.launch-gate-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  min-width: 0;
  border-color: #d7def0;
  background:
    linear-gradient(135deg, rgba(40, 81, 245, 0.06), rgba(255, 247, 207, 0.46)),
    white;
}

.launch-gate-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.launch-gate-main h2 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 620;
  line-height: 1.05;
}

.launch-gate-main p {
  max-width: 760px;
  margin: 0;
  color: #344054;
  line-height: 1.45;
}

.launch-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.launch-status-pill.green {
  background: var(--green-soft);
  color: #087333;
}

.launch-status-pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.launch-status-pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.launch-gate-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.launch-check {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.launch-check span,
.launch-gate-actions article span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.launch-check strong,
.launch-gate-actions article strong {
  font-size: 14px;
  font-weight: 650;
}

.launch-check small,
.launch-gate-actions article small {
  color: var(--muted);
  line-height: 1.35;
}

.launch-check.green {
  border-color: #b9eacb;
}

.launch-check.green span {
  background: var(--green-soft);
  color: #087333;
}

.launch-check.amber {
  border-color: #f8d86d;
}

.launch-check.amber span {
  background: var(--amber-soft);
  color: var(--amber);
}

.launch-check.red {
  border-color: #fecdd3;
}

.launch-check.red span {
  background: var(--red-soft);
  color: var(--red);
}

.launch-next-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 4px;
}

.launch-next-row > strong {
  margin-top: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.launch-gate-actions article {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #d8e0ed;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.launch-gate-actions article span {
  background: #eaf0ff;
  color: var(--blue);
}

.launch-action-empty {
  color: var(--muted);
  font-weight: 800;
}

.metric-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
  background: #ffffff;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.metric-card strong {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  font-weight: 650;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.35;
}

.hero-metric {
  background:
    linear-gradient(135deg, rgba(232, 191, 23, 0.16), transparent 60%),
    #080b12;
  color: white;
}

.hero-metric strong,
.metric-card.accent strong {
  color: var(--gold);
}

.metric-card.warning strong {
  color: var(--red);
}

.lifecycle-card,
.table-card,
.detail-panel,
.attention-strip {
  padding: 18px;
}

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

.section-subcopy {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.section-heading .eyebrow {
  color: var(--blue);
}

.summary-pill {
  background: #f1f4f9;
  color: #344054;
  white-space: nowrap;
}

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

.pipeline-step {
  position: relative;
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pipeline-step::after {
  content: "";
  position: absolute;
  top: 48%;
  right: -11px;
  width: 11px;
  height: 2px;
  background: #cbd5e1;
}

.pipeline-step:last-child::after {
  display: none;
}

.pipeline-step strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  font-weight: 650;
}

.pipeline-step span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

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

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

th {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 620;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

tr.customer-row {
  cursor: pointer;
}

tr.customer-row:hover {
  background: #f8faff;
}

.customer-name {
  display: grid;
  gap: 3px;
  font-weight: 650;
}

.customer-name span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 5px #edf2ff;
}

.timeline-item strong {
  display: block;
  margin-bottom: 3px;
}

.timeline-item span {
  color: var(--muted);
  font-size: 12px;
}

.message-preview {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  background: var(--surface-2);
}

.message-preview > div {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.preview-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
}

.message-preview p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.attention-strip {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  border-color: #f3dd95;
  background: #fffaf0;
}

.attention-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  min-width: 0;
}

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

.readiness-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 118px;
  border: 1px solid #d8e0ed;
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.readiness-item span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.readiness-item strong {
  font-size: 14px;
  font-weight: 650;
}

.readiness-item small {
  color: var(--muted);
  line-height: 1.35;
}

.readiness-item.green {
  border-color: #b9eacb;
}

.readiness-item.green span {
  background: var(--green-soft);
  color: #087333;
}

.readiness-item.amber {
  border-color: #f8d86d;
}

.readiness-item.amber span {
  background: var(--amber-soft);
  color: var(--amber);
}

.readiness-item.red {
  border-color: #fecdd3;
}

.readiness-item.red span {
  background: var(--red-soft);
  color: var(--red);
}

.sources-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border-color: #d7def0;
  background: white;
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-color: #d8e0f7;
}

.sources-hero h2,
.placeholder-panel h2,
.settings-hero h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.05;
}

.sources-hero p,
.placeholder-panel p,
.source-copy,
.source-actions span,
.settings-save-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.source-onboarding-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid #d7def0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  min-width: 0;
}

.source-onboarding-main {
  display: flex;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.source-onboarding-main h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 620;
  line-height: 1.08;
}

.source-onboarding-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.source-onboarding-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  font-size: 22px;
  font-weight: 750;
}

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

.source-guide-step {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.source-guide-step span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.source-guide-step strong {
  font-size: 14px;
  font-weight: 650;
}

.source-guide-step small {
  color: var(--muted);
  line-height: 1.35;
}

.source-guide-step.green {
  border-color: #b9eacb;
}

.source-guide-step.green span {
  background: var(--green-soft);
  color: #087333;
}

.source-guide-step.blue {
  border-color: #cfd9ff;
}

.source-guide-step.blue span {
  background: #eaf0ff;
  color: var(--blue);
}

.source-guide-step.amber {
  border-color: #f8d86d;
}

.source-guide-step.amber span {
  background: var(--amber-soft);
  color: var(--amber);
}

.source-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  min-width: 0;
}

.source-card.live {
  border-color: #cfd9ff;
  box-shadow: 0 0 0 1px rgba(40, 81, 245, 0.05);
}

.source-card.muted {
  background: #f9fafb;
}

.source-card-header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.source-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-weight: 700;
}

.source-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.source-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.source-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0;
}

.source-details div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.source-details dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 620;
  text-transform: uppercase;
}

.source-details dd {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 620;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.square-setup-card {
  border-color: #d8e0f7;
}

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

.setup-values-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.setup-values-grid dt,
.setup-url-grid label {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 620;
  text-transform: uppercase;
}

.setup-values-grid dd {
  margin: 6px 0 0;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 620;
}

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

.setup-url-grid label {
  display: grid;
  gap: 8px;
}

.setup-url-grid input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fbfcff;
  color: #344054;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 520;
}

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

.webhook-event-list strong {
  color: var(--blue);
  font-size: 12px;
  font-weight: 680;
  text-transform: uppercase;
}

.webhook-event-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.webhook-event-list span {
  border: 1px solid #cfd9ff;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8faff;
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
}

.ghost-light-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: white;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}

.ghost-light-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.placeholder-panel {
  padding: 22px;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.settings-save-status {
  min-width: 78px;
  text-align: right;
  font-size: 13px;
  font-weight: 620;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.program-guide {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
  border: 1px solid rgba(40, 81, 245, 0.18);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.96) 58%, rgba(255, 247, 207, 0.28)),
    white;
  box-shadow: var(--shadow-sm);
}

body[data-role="client"] .program-guide.client-only {
  display: grid !important;
}

.review-program-summary {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(11, 14, 25, 0.1);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95) 62%, rgba(235, 250, 241, 0.5)),
    white;
  box-shadow: var(--shadow-sm);
}

body[data-role="client"] .review-program-summary.client-only {
  display: grid !important;
}

.review-program-summary-main,
.review-program-approval-row {
  min-width: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.review-program-summary-main h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.1;
}

.review-program-summary-main p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.review-program-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.review-program-summary-item {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.review-program-summary-item span {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.review-program-summary-item strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.25;
}

.review-program-summary-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.review-program-approval-row {
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.review-program-approval-row div {
  display: grid;
  gap: 4px;
}

.review-program-approval-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
}

.review-program-approval-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.review-program-submit-button {
  white-space: nowrap;
}

.client-settings-change-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.45fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid rgba(11, 14, 25, 0.1);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

body[data-role="client"] .client-settings-change-panel.client-only {
  display: grid !important;
}

body[data-role="client"] .client-settings-change-panel.is-empty {
  display: none !important;
}

.client-settings-change-panel.pending-approval {
  border-color: rgba(40, 81, 245, 0.2);
  background: linear-gradient(135deg, rgba(247, 250, 255, 0.98), #ffffff 62%);
}

.client-settings-change-panel.changes-requested {
  border-color: rgba(185, 124, 26, 0.22);
  background: linear-gradient(135deg, rgba(255, 250, 239, 0.98), #ffffff 62%);
}

.client-settings-change-copy,
.client-settings-change-status,
.client-settings-change-details,
.client-settings-change-meta article,
.settings-change-comparison-row {
  min-width: 0;
}

.client-settings-change-copy h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.1;
}

.client-settings-change-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.client-settings-change-status {
  display: grid;
  align-content: start;
  gap: 10px;
}

.summary-pill.blue {
  background: #eaf0ff;
  color: var(--blue);
}

.summary-pill.green {
  background: var(--green-soft);
  color: #087333;
}

.summary-pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.client-settings-change-note {
  margin: 0;
  border-left: 2px solid rgba(185, 124, 26, 0.36);
  padding-left: 10px;
  color: #6a4510;
  font-size: 13px;
  line-height: 1.4;
}

.client-settings-change-note.is-empty {
  display: none;
}

.client-settings-change-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

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

.client-settings-change-meta article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.client-settings-change-meta span {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.client-settings-change-meta strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.client-settings-change-comparison {
  overflow: hidden;
  border: 1px solid rgba(11, 14, 25, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.settings-change-comparison-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.54fr) minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.settings-change-comparison-row:first-child {
  border-top: 0;
}

.settings-change-comparison-head {
  background: rgba(247, 250, 255, 0.92);
}

.settings-change-comparison-head span,
.settings-change-comparison-row strong,
.settings-change-comparison-row .comparison-value {
  min-width: 0;
  padding: 11px 12px;
}

.settings-change-comparison-head span {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-change-comparison-row strong {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.3;
  border-right: 1px solid var(--line);
  background: rgba(250, 251, 253, 0.78);
}

.settings-change-comparison-row.has-change strong::after {
  content: "Updated";
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 6px;
  background: #eaf0ff;
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.settings-change-comparison-row .comparison-value {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.settings-change-comparison-row .comparison-value + .comparison-value {
  border-left: 1px solid var(--line);
}

.settings-change-comparison-row.has-change .comparison-value.submitted {
  color: var(--ink);
  background: rgba(40, 81, 245, 0.055);
}

.program-guide-main {
  display: grid;
  gap: 8px;
}

.program-guide-main h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.1;
}

.program-guide-main p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.program-guide-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.program-guide-step {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.program-guide-step span {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.program-guide-step.green span {
  background: rgba(27, 143, 68, 0.12);
  color: var(--green);
}

.program-guide-step.blue span {
  background: rgba(40, 81, 245, 0.1);
  color: var(--blue);
}

.program-guide-step.amber span {
  background: rgba(185, 124, 26, 0.12);
  color: var(--amber);
}

.program-guide-step strong {
  font-size: 14px;
  font-weight: 680;
  line-height: 1.2;
}

.program-guide-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.campaign-guide {
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.38fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(11, 14, 25, 0.1);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.94) 58%, rgba(235, 250, 241, 0.55)),
    white;
  box-shadow: var(--shadow-sm);
}

body[data-role="client"] .campaign-guide.client-only {
  display: grid !important;
}

.campaign-guide-main {
  display: grid;
  align-content: start;
  gap: 8px;
}

.campaign-guide-main h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.1;
}

.campaign-guide-main p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.campaign-type-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.campaign-type-card:hover,
.campaign-type-card.active {
  border-color: rgba(10, 108, 255, 0.32);
  background:
    radial-gradient(circle at top right, rgba(10, 108, 255, 0.12), transparent 12rem),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(10, 108, 255, 0.08);
}

.campaign-guide-list span {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(40, 81, 245, 0.1);
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.campaign-guide-list strong {
  font-size: 14px;
  font-weight: 680;
  line-height: 1.2;
}

.campaign-guide-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.campaign-safety-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-role="client"] .campaign-safety-strip.client-only {
  display: grid !important;
}

.campaign-safety-strip article,
.campaign-type-helper {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.campaign-safety-strip article {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.campaign-safety-strip span,
.campaign-type-helper > span,
.campaign-type-helper-grid small {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.campaign-safety-strip strong {
  font-size: 14px;
  font-weight: 690;
}

.campaign-safety-strip small {
  color: var(--muted);
  line-height: 1.35;
}

.campaign-type-helper {
  display: grid;
  gap: 10px;
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(10, 108, 255, 0.1), transparent 18rem),
    var(--surface);
}

.campaign-type-helper strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.18;
}

.campaign-type-helper p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.campaign-type-helper-grid div {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--blue-3));
}

.campaign-type-helper-grid span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.customers-hero,
.customer-guide {
  display: grid;
  gap: 18px;
  min-width: 0;
  border: 1px solid rgba(10, 108, 255, 0.16);
  border-radius: 8px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(10, 108, 255, 0.1), transparent 28rem),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.customers-hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
}

.customers-hero h2,
.customer-guide h3 {
  margin: 0;
  font-size: 30px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: 0;
}

.customers-hero p,
.customer-guide p {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

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

.customers-hero-stats article,
.customer-guide-list article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 86%, var(--blue-3));
}

.customers-hero-stats span,
.customer-guide-list span {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.customers-hero-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 680;
  line-height: 1;
}

.customer-guide {
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
}

.customer-guide h3 {
  font-size: 22px;
}

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

.customer-guide-list article {
  display: grid;
  gap: 7px;
}

.customer-guide-list span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
}

.customer-guide-list strong {
  font-size: 14px;
  font-weight: 690;
}

.customer-guide-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.customer-ops-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.customer-tools {
  display: grid;
  gap: 18px;
}

.customer-ops-table {
  min-width: 0;
}

.settings-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px;
}

.operations-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.preflight-card {
  border-color: #d8e0f7;
}

.preflight-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preflight-counts span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1f4f9;
  color: #344054;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 620;
}

.system-health-card {
  border-color: #d8e0f7;
}

.outbound-control-card {
  border-color: #fecdd3;
}

.rollback-actions {
  justify-content: flex-start;
}

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

.system-health-grid article {
  display: grid;
  gap: 6px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, white, #fbfcff);
}

.system-health-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.system-health-grid strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.compact-table table {
  min-width: 620px;
}

.preflight-readiness {
  display: grid;
  gap: 5px;
  align-items: start;
}

.preflight-readiness small,
.preflight-next-action {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.preflight-next-action {
  margin: 0;
  font-weight: 620;
}

.mini-action-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.request-action-cell {
  min-width: 150px;
}

.request-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-action-button.danger {
  border-color: #fecdd3;
  color: var(--red);
}

.mini-action-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.muted-cell {
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
}

.settings-change-preview {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.settings-change-preview strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.settings-change-preview span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.message-cell {
  max-width: 360px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.settings-card.wide {
  grid-column: 1 / -1;
}

.settings-grid > .wide {
  grid-column: 1 / -1;
}

.workflow-preview-card {
  border-color: #d8e0f7;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, 0.96), rgba(255, 255, 255, 0.98)),
    white;
}

body[data-role="client"] .settings-card.client-program-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(17, 24, 39, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.72)),
    white;
}

body[data-role="client"] .settings-card.client-program-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--blue));
}

.client-program-card .section-heading h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  line-height: 1.08;
}

.program-step-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(40, 81, 245, 0.18);
  border-radius: 8px;
  background: #eef3ff;
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.client-program-card .section-subcopy {
  max-width: 620px;
  font-size: 13px;
}

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

.workflow-preview-grid article {
  display: grid;
  gap: 6px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: white;
}

.workflow-preview-grid span,
.workflow-preview-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.workflow-preview-grid span {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 650;
  text-transform: uppercase;
}

.workflow-preview-grid strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.settings-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
}

.form-grid input:disabled,
.form-grid select:disabled,
.form-grid textarea:disabled,
.header-actions select:disabled {
  color: var(--muted);
  background: var(--surface-2);
  cursor: default;
}

.form-grid textarea {
  min-height: 108px;
  resize: vertical;
}

.settings-helper {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.full-field {
  grid-column: 1 / -1;
}

.toggle-list {
  display: grid;
  gap: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.toggle-row span {
  display: grid;
  gap: 3px;
}

.toggle-row strong {
  font-size: 14px;
}

.toggle-row small {
  color: var(--muted);
  font-weight: 560;
}

.compact-toggle {
  margin-top: 2px;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

html[data-theme="dark"] .login-card,
html[data-theme="dark"] .connect-success-card,
html[data-theme="dark"] .command-header,
html[data-theme="dark"] .client-home-hero,
html[data-theme="dark"] .client-home-panel,
html[data-theme="dark"] .client-action-card,
html[data-theme="dark"] .launch-gate-card,
html[data-theme="dark"] .operations-card,
html[data-theme="dark"] .attention-strip,
html[data-theme="dark"] .lifecycle-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .sources-hero,
html[data-theme="dark"] .source-onboarding-card,
html[data-theme="dark"] .source-card,
html[data-theme="dark"] .placeholder-panel,
html[data-theme="dark"] .settings-hero,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .account-menu-panel,
html[data-theme="dark"] .oauth-banner,
html[data-theme="dark"] .campaign-guide,
html[data-theme="dark"] .campaign-type-card,
html[data-theme="dark"] .campaign-safety-strip article,
html[data-theme="dark"] .campaign-type-helper,
html[data-theme="dark"] .campaign-type-helper-grid div,
html[data-theme="dark"] .program-guide,
html[data-theme="dark"] .review-program-summary,
html[data-theme="dark"] .review-program-summary-item,
html[data-theme="dark"] .client-settings-change-panel,
html[data-theme="dark"] .launch-check,
html[data-theme="dark"] .launch-gate-actions article,
html[data-theme="dark"] .readiness-item,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .pipeline-step,
html[data-theme="dark"] .source-guide-step,
html[data-theme="dark"] .source-details div,
html[data-theme="dark"] .setup-values-grid div,
html[data-theme="dark"] .webhook-event-list span,
html[data-theme="dark"] .customers-hero,
html[data-theme="dark"] .customer-guide,
html[data-theme="dark"] .customers-hero-stats article,
html[data-theme="dark"] .customer-guide-list article,
html[data-theme="dark"] .review-program-summary-grid article,
html[data-theme="dark"] .system-health-grid article,
html[data-theme="dark"] .workflow-preview-card,
html[data-theme="dark"] .campaign-preview-message,
html[data-theme="dark"] .customer-row {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .client-home-hero,
html[data-theme="dark"] .sources-hero,
html[data-theme="dark"] .settings-hero,
html[data-theme="dark"] .customers-hero,
html[data-theme="dark"] .launch-gate-card {
  background:
    radial-gradient(circle at top right, rgba(91, 157, 255, 0.2), transparent 24rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(12, 19, 34, 0.98));
}

html[data-theme="dark"] .launch-gate-actions article {
  background: rgba(13, 20, 34, 0.94);
}

html[data-theme="dark"] .launch-gate-actions article span {
  background: var(--blue-soft);
  color: var(--blue-2);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .ghost-light-button,
html[data-theme="dark"] .ghost-icon-button,
html[data-theme="dark"] .theme-toggle-button,
html[data-theme="dark"] .account-menu-button,
html[data-theme="dark"] .modal-copy-box,
html[data-theme="dark"] .mini-action-button {
  background: var(--input-bg);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] table,
html[data-theme="dark"] thead,
html[data-theme="dark"] tbody,
html[data-theme="dark"] tr,
html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-color: var(--line);
}

html[data-theme="dark"] th,
html[data-theme="dark"] .muted-cell,
html[data-theme="dark"] .message-cell,
html[data-theme="dark"] .settings-helper,
html[data-theme="dark"] .campaign-safety-strip small,
html[data-theme="dark"] .campaign-type-helper p,
html[data-theme="dark"] .client-action-copy small,
html[data-theme="dark"] .client-portal-main p,
html[data-theme="dark"] .login-card p,
html[data-theme="dark"] .connect-success-card p {
  color: var(--muted);
}

html[data-theme="dark"] .gold-button,
html[data-theme="dark"] .login-form button {
  color: #090b12;
}

html[data-theme="dark"] .login-form .link-button {
  color: var(--blue);
}

html[data-theme="dark"] .toast.green {
  background: var(--green-soft);
  border-color: rgba(64, 211, 138, 0.28);
  color: var(--green);
}

html[data-theme="dark"] .toast.amber {
  background: var(--amber-soft);
  border-color: rgba(255, 198, 91, 0.28);
  color: var(--amber);
}

html[data-theme="dark"] .toast.red {
  background: var(--red-soft);
  border-color: rgba(255, 122, 136, 0.32);
  color: var(--red);
}

html[data-theme="dark"] .nav-item.active .nav-icon,
html[data-theme="dark"] .nav-item:hover .nav-icon {
  color: #090b12;
}

html[data-theme="dark"] .client-action-card.primary,
html[data-theme="dark"] .lifecycle-card,
html[data-theme="dark"] .client-activity-panel {
  background:
    radial-gradient(circle at top left, rgba(91, 157, 255, 0.16), transparent 22rem),
    var(--surface);
}

html[data-theme="dark"] body[data-role="client"] .settings-card.client-program-card,
html[data-theme="dark"] .program-guide-step,
html[data-theme="dark"] .client-settings-change-meta article,
html[data-theme="dark"] .client-settings-change-comparison,
html[data-theme="dark"] .settings-change-comparison-head,
html[data-theme="dark"] .settings-change-comparison-row strong,
html[data-theme="dark"] .workflow-preview-grid article,
html[data-theme="dark"] .toggle-row,
html[data-theme="dark"] .preflight-counts span {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] body[data-role="client"] .settings-card.client-program-card {
  background:
    radial-gradient(circle at top left, rgba(91, 157, 255, 0.09), transparent 20rem),
    var(--surface-2);
}

html[data-theme="dark"] .program-guide-step {
  background:
    linear-gradient(180deg, rgba(20, 31, 53, 0.96), rgba(13, 22, 38, 0.98));
}

html[data-theme="dark"] .program-step-badge {
  background: var(--blue-soft);
  border-color: rgba(139, 186, 255, 0.28);
  color: var(--blue-2);
}

html[data-theme="dark"] .client-program-card .section-subcopy,
html[data-theme="dark"] .program-guide-step small,
html[data-theme="dark"] .workflow-preview-grid span,
html[data-theme="dark"] .workflow-preview-grid small,
html[data-theme="dark"] .toggle-row small {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 88px 1fr;
  }

  .sidebar {
    padding: 18px 12px;
  }

  .sidebar-brand > span:last-child,
  .nav-label,
  .sidebar-note div {
    display: none;
  }

  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-metric {
    grid-column: span 3;
  }

  .pipeline {
    grid-template-columns: repeat(3, 1fr);
  }

  .launch-gate-checks,
  .launch-gate-actions,
  .client-activity-panel .client-home-stats,
  .system-health-grid,
  .review-program-summary-grid,
  .workflow-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-step::after {
    display: none;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .customer-ops-grid,
  .activity-grid,
  .client-home-panels,
  .source-grid,
  .source-onboarding-card,
  .source-details,
  .setup-values-grid,
  .setup-url-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .attention-list {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .settings-card.wide {
    grid-column: auto;
  }

  .command-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .client-activity-panel .client-home-stats article {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .client-activity-panel .client-home-stats article:first-child {
    border-top: 0;
  }
}

@media (max-width: 760px) {
  .toast-region {
    right: 14px;
    bottom: 14px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions button {
    width: 100%;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    overflow: hidden;
  }

  .nav-list {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item {
    min-width: max-content;
    justify-content: flex-start;
    padding: 0 12px;
    white-space: nowrap;
  }

  .nav-label {
    display: inline;
  }

  .nav-icon {
    width: 34px;
    height: 24px;
  }

  .nav-item[data-tooltip]:hover::after,
  .nav-item[data-tooltip]:focus-visible::after {
    display: none;
  }

  .sidebar-note {
    display: none;
  }

  .workspace {
    gap: 14px;
    padding: 14px;
  }

  .command-header {
    gap: 14px;
    padding: 18px;
  }

  .command-header h1 {
    font-size: 32px;
    line-height: 1.05;
  }

  .header-actions {
    align-items: stretch;
    gap: 8px;
  }

  .header-actions select,
  .header-actions button,
  .sources-hero button,
  .settings-actions button,
  .source-actions button {
    width: 100%;
  }

  .account-menu,
  .account-menu-button {
    width: 100%;
  }

  .account-menu-button {
    justify-content: flex-start;
  }

  .account-menu-panel {
    left: 0;
    right: auto;
    width: min(100%, 320px);
  }

  .status-row {
    gap: 6px;
  }

  .status-chip,
  .pill,
  .summary-pill {
    min-height: 26px;
    padding: 5px 8px;
    font-size: 10px;
  }

  .command-header,
  .attention-strip,
  .client-action-hub,
  .client-home-panels,
  .client-portal-main,
  .customers-hero,
  .customer-guide,
  .customer-guide-list,
  .campaign-safety-strip,
  .campaign-type-helper-grid,
  .campaign-guide,
  .campaign-guide-list,
  .program-guide,
  .review-program-summary-main,
  .review-program-approval-row,
  .client-settings-change-panel,
  .client-settings-change-details,
  .program-guide-steps,
  .launch-gate-main,
  .launch-next-row,
  .sources-hero,
  .source-onboarding-card,
  .source-actions,
  .settings-hero,
  .settings-actions,
  .section-actions,
  .form-grid.two-column {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-save-status {
    min-width: 0;
    text-align: left;
  }

  .client-settings-change-meta {
    grid-template-columns: 1fr;
  }

  .settings-change-comparison-head {
    display: none;
  }

  .settings-change-comparison-row {
    grid-template-columns: 1fr;
  }

  .settings-change-comparison-row strong {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-change-comparison-row .comparison-value + .comparison-value {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .settings-change-comparison-row .comparison-value::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .launch-gate-checks,
  .launch-gate-actions,
  .campaign-guide-list,
  .customers-hero-stats,
  .campaign-safety-strip,
  .client-activity-panel .client-home-stats,
  .system-health-grid,
  .review-program-summary-grid,
  .program-guide-steps,
  .workflow-preview-grid {
    grid-template-columns: 1fr;
  }

  .client-activity-panel .client-home-stats article {
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0;
  }

  .client-activity-panel .client-home-stats article:first-child {
    border-top: 0;
  }

  .metric-grid,
  .pipeline,
  .source-guide-steps,
  .client-home-steps,
  .attention-list {
    grid-template-columns: 1fr;
  }

  .hero-metric {
    grid-column: auto;
  }

  .launch-gate-card,
  .customers-hero,
  .customer-guide,
  .client-home-hero,
  .client-home-panel,
  .campaign-guide,
  .program-guide,
  .review-program-summary,
  .client-settings-change-panel,
  .lifecycle-card,
  .table-card,
  .detail-panel,
  .attention-strip,
  .sources-hero,
  .source-onboarding-card,
  .source-card,
  .placeholder-panel,
  .settings-hero,
  .settings-card,
  .operations-card {
    padding: 14px;
  }

  .launch-gate-main h2,
  .customers-hero h2,
  .client-portal-main h2,
  .sources-hero h2,
  .placeholder-panel h2,
  .settings-hero h2,
  .section-heading h2 {
    font-size: 24px;
    line-height: 1.1;
  }

  .metric-card {
    min-height: 96px;
    padding: 14px;
  }

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

  .pipeline-step {
    min-height: auto;
  }

  .main-grid,
  .customer-ops-grid,
  .activity-grid {
    gap: 14px;
  }

  .source-card-header {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .source-card-header .pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .source-icon {
    width: 38px;
    height: 38px;
  }

  .source-details div,
  .setup-values-grid div {
    min-width: 0;
  }

  .setup-url-grid input,
  .message-cell,
  .muted-cell {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .summary-pill {
    justify-self: start;
  }

  .login-screen,
  .connect-success-screen {
    align-items: start;
    padding: 18px;
    padding-top: 64px;
  }

  .login-card,
  .connect-success-card {
    padding: 26px;
  }

  .login-card h1,
  .connect-success-card h1 {
    font-size: 36px;
    line-height: 1;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .sidebar {
    padding: 10px;
  }

  .sidebar-brand {
    font-size: 24px;
  }

  .nav-item {
    height: 44px;
    min-width: max-content;
    padding: 0 10px;
  }

  .workspace {
    padding: 10px;
  }

  .command-header {
    padding: 15px;
  }

  .command-header h1 {
    font-size: 29px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .launch-gate-card,
  .customers-hero,
  .customer-guide,
  .client-home-hero,
  .client-home-panel,
  .lifecycle-card,
  .table-card,
  .detail-panel,
  .attention-strip,
  .sources-hero,
  .source-onboarding-card,
  .source-card,
  .placeholder-panel,
  .settings-hero,
  .settings-card,
  .operations-card {
    padding: 12px;
  }

  .launch-check,
  .launch-gate-actions article,
  .readiness-item {
    min-height: auto;
  }

  table {
    min-width: 640px;
  }

  th,
  td {
    padding: 10px;
  }

  .source-actions {
    gap: 8px;
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .login-form input,
  .header-actions select {
    padding: 11px 12px;
  }

  .login-screen,
  .connect-success-screen {
    padding: 12px;
    padding-top: 48px;
  }

  .login-card,
  .connect-success-card {
    padding: 22px;
  }
}
