:root {
  --brand: #465fff;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --panel: #fff;
  --soft: #eef2ff;
  --success: #027a48;
  --danger: #b42318;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #eef2ff 0, #f8fafc 34%, #f7f8fb 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.portal-shell {
  display: flex;
  min-height: 100vh;
}

.portal-sidebar {
  position: sticky;
  top: 0;
  width: 264px;
  height: 100vh;
  padding: 18px 14px;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .8);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 14px;
  padding: 8px 10px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(145deg, #465fff, #2563eb);
  color: #fff;
  box-shadow: 0 8px 18px rgba(70, 95, 255, .22);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.2;
}

.brand small {
  display: block;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  max-width: 176px;
  overflow: hidden;
  color: #101828;
  font-size: 15px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-sidebar nav {
  display: grid;
  gap: 4px;
  padding-top: 4px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #4b5565;
  font-weight: 650;
}

.nav-link:hover {
  background: #eef2f6;
  color: #1f2937;
}

.nav-link.active {
  background: #eef2ff;
  color: #3538cd;
  box-shadow: inset 3px 0 0 #465fff;
}

.nav-link svg,
.btn svg {
  width: 16px;
  height: 16px;
}

.nav-link svg {
  flex: 0 0 auto;
  color: currentColor;
  stroke-width: 2.1;
}

.portal-main {
  flex: 1;
  min-width: 0;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 4px 28px;
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(229, 231, 235, .8);
  backdrop-filter: blur(16px);
}

.eyebrow {
  display: block;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.portal-topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 760;
}

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

.topbar-spacer {
  flex: 1;
}

.chatbot-selector label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-selector span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.chatbot-selector select {
  max-width: 260px;
  padding: 8px 34px 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  font: inherit;
  font-weight: 650;
}

.portal-content {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 28px 26px;
}

.portal-content > :first-child {
  margin-top: 0;
}

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

.card,
.panel {
  padding: 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(229, 231, 235, .88);
  border-radius: 14px;
  box-shadow: 0 20px 55px rgba(16, 24, 40, .06);
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card:after {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 95px;
  height: 95px;
  background: rgba(70, 95, 255, .08);
  border-radius: 999px;
  content: "";
}

.stat-card span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  font-weight: 780;
}

.panel {
  margin-top: 16px;
}

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

.panel h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
}

.panel h2 svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

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

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

th {
  background: #f9fafb;
  color: #667085;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 12px 25px rgba(70, 95, 255, .22);
}

.btn.ghost {
  background: #fff;
  color: #344054;
}

.btn.small {
  padding: 5px 8px;
  font-size: 12px;
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-menu:after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 10px;
  content: "";
}

.account-trigger {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
}

.account-trigger svg {
  width: 18px;
  height: 18px;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 250px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.account-summary {
  display: grid;
  gap: 3px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.account-summary strong,
.account-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary strong {
  font-size: 14px;
}

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

.account-menu-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.account-menu-item:hover {
  background: #f2f4f7;
}

.account-menu-item svg {
  width: 16px;
  height: 16px;
}

.badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.badge.good {
  background: #ecfdf3;
  color: #027a48;
}

.badge.warm {
  background: #fffaeb;
  color: #b54708;
}

.badge.muted {
  background: #f2f4f7;
  color: #667085;
}

.tooltip-dot{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:var(--border,#e2e8f0);color:#475569;font-size:11px;cursor:help;margin-left:4px}
.badge.complete{background:#dcfce7;color:#166534}
.badge.pending{background:#f1f5f9;color:#475569}
.badge.bad{background:#fee2e2;color:#991b1b}
.access-state-panel {
  margin-bottom: 12px;
}

.definition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 8px;
}

.definition-grid span {
  display: block;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.definition-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: #344054;
  font-weight: 700;
}

.layout-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  font: inherit;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.chip-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  background: #eef2ff;
  border-radius: 999px;
  color: #3538cd;
  font-weight: 650;
}

.email-chip button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.drop-zone {
  display: block;
  padding: 34px 18px;
  background: #f8faff;
  border: 2px dashed #c7d2fe;
  border-radius: 18px;
  color: #667085;
  cursor: pointer;
  text-align: center;
}

.drop-zone.active {
  background: #eef2ff;
  border-color: #465fff;
}

.progress {
  height: 8px;
  overflow: hidden;
  background: #eef2ff;
  border-radius: 999px;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #465fff, #16a34a);
}

.conversation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bubble {
  max-width: 76%;
  padding: 10px 12px;
  background: #f2f4f7;
  border-radius: 14px;
}

.bubble.visitor {
  align-self: flex-end;
  background: #465fff;
  color: #fff;
}

.bubble small {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 750;
  opacity: .72;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: radial-gradient(circle at top left, #dfe6ff, #f8fafc 45%, #fff);
}

.auth-wrap {
  width: min(420px, calc(100vw - 32px));
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .14);
}

.auth-card h1 {
  margin: 0;
  font-size: 26px;
}

.auth-card p {
  margin: 0;
  color: #667085;
}

.alert {
  position: relative;
  padding: 10px 12px;
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 12px;
  color: #93370d;
}

.alert-primary,
.text-bg-primary {
  background: #465fff;
  border-color: #465fff;
  color: #fff;
}

.alert-dismissible {
  padding-right: 44px;
}

.btn-close {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: currentColor;
  cursor: pointer;
  opacity: .86;
  transform: translateY(-50%);
}

.btn-close:hover {
  background: rgba(255, 255, 255, .14);
  opacity: 1;
}

.btn-close-white {
  color: #fff;
}

.btn-close svg {
  width: 17px;
  height: 17px;
}

.alert.bad {
  background: #fff7f7;
  border-color: #fecaca;
  color: #b42318;
}

.alert.warm {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}

.alert.good {
  background: #ecfdf3;
  border-color: #a6f4c5;
  color: #067647;
}

.alert.complete {
  background: #ecfdf3;
  border-color: #a6f4c5;
  color: #067647;
}

.alert.pending {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

@media (max-width: 980px) {
  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: relative;
    width: auto;
    height: auto;
    padding: 14px;
  }

  .brand {
    min-height: auto;
    margin-bottom: 10px;
    padding: 4px 4px 12px;
  }

  .portal-sidebar nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .grid-cards,
  .layout-2,
  .conversation-layout {
    grid-template-columns: 1fr;
  }

  .portal-content {
    padding: 12px 18px 18px;
  }

  .portal-topbar {
    position: relative;
    align-items: center;
    flex-direction: row;
    padding: 4px 18px;
  }

  .topbar-actions {
    justify-content: flex-end;
  }

  .chatbot-selector select {
    max-width: min(240px, 58vw);
  }
}

@media (min-width: 768px) {
  .definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Onboarding checklist ─────────────────────────────────────────── */

.checklist-panel {
  margin-bottom: 24px;
}

.access-state-panel + .checklist-panel {
  margin-top: 0;
}

.checklist-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
  margin-left: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.checklist-step:last-child {
  border-bottom: none;
}

.checklist-icon {
  flex: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.checklist-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checklist-step.complete .checklist-icon { color: #16a34a; }
.checklist-step.pending  .checklist-icon { color: var(--muted); }
.checklist-step.handled  .checklist-icon { color: #2563eb; }

.checklist-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist-body strong {
  font-size: 13px;
}

.checklist-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.checklist-step .btn {
  flex-shrink: 0;
}

.checklist-go {
  min-width: 58px;
  padding: 9px 16px;
  background: #f97316;
  border-color: #ea580c;
  color: #fff;
  font-size: 13px;
  font-weight: 820;
  box-shadow: 0 10px 22px rgba(249, 115, 22, .24);
}

.checklist-go:hover {
  background: #ea580c;
}

/* ── Get Started accordion (redesign) ─────────────────────────────── */

.gs-checklist .panel-head {
  margin-bottom: 4px;
}

.gs-checklist .panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gs-items {
  margin: 0 12px;
}

.gs-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.gs-row.gs-static {
  cursor: default;
}

.gs-panel + .gs-row {
  border-top: none;
}

.gs-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.gs-icon.pending {
  border: 2px solid #d1d5db;
}

.gs-icon.complete {
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.gs-body {
  flex: 1;
  min-width: 0;
}

.gs-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.gs-title .optional {
  margin-left: 4px;
  color: #9ca3af;
  font-weight: 600;
}

.gs-desc {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.gs-chevron {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  transition: transform .15s;
}

.gs-chevron.open {
  transform: rotate(180deg);
}

.gs-panel {
  /* 40px = 26px icon width + 14px row gap, so the panel lines up with the
     row's title/description text instead of starting under the icon. */
  margin: 8px 0 5px 40px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 10px;
}

/* Billing/leads panel content is plain <p> tags in places — the browser's
   default 1em top/bottom paragraph margin was stacking on top of the panel
   padding above, which is why trimming the padding alone barely moved the
   visible gap. Reset those and let the panel's own padding be the only
   space at the top/bottom edges. */
.gs-panel p {
  margin: 0 0 8px;
}

.gs-panel > :first-child {
  margin-top: 0;
}

.gs-panel > :last-child {
  margin-bottom: 0;
}

.gs-panel-label {
  margin-bottom: 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.gs-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.gs-code-row code {
  flex: 1;
  overflow-x: auto;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
}

.gs-hint {
  margin-top: 6px;
  color: #9ca3af;
  font-size: 12px;
}

.gs-domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #e5e7eb;
}

.gs-domain-row:first-of-type {
  border-top: none;
}

.gs-domain-name {
  flex: 1;
  color: #374151;
  font-size: 13px;
}

.gs-pill {
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

.gs-pill.unverified {
  background: #f3f4f6;
  color: #6b7280;
}

.gs-pill.checking {
  background: #fef3c7;
  color: #b45309;
}

.gs-pill.verified {
  background: #dbeafe;
  color: #2563eb;
}

.gs-btn {
  flex: none;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.gs-btn:disabled {
  cursor: default;
  opacity: .6;
}

.gs-btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: #f97316;
  border: none;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.gs-btn-accent:hover {
  background: #ea580c;
}

.gs-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gs-payment-title {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.gs-payment-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.gs-status-pill {
  padding: 4px 10px;
  background: #dcfce7;
  border-radius: 100px;
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
}

.gs-copy-text {
  margin-bottom: 10px;
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
}

.gs-lead-form {
  display: flex;
  gap: 10px;
}

.gs-lead-input {
  flex: 1;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  color: #111827;
  font: inherit;
  font-size: 13px;
}

.gs-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.gs-chip-wrap:empty {
  margin-top: 0;
}

.gs-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 6px 6px 11px;
  background: #f3f4f6;
  border-radius: 6px;
  color: #374151;
  font-size: 12.5px;
  font-weight: 500;
}

.gs-chip button {
  padding: 2px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

/* ── Admin notification banner (redesign — softer skin, same states) ── */

.gs-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: #f3f5f9;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
}

.gs-banner-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #e5e7eb;
  border-radius: 50%;
  color: #6b7280;
  font: 700 12px system-ui, -apple-system, sans-serif;
}

.gs-banner-text {
  flex: 1;
  color: #374151;
  font-size: 13.5px;
  font-weight: 500;
}

.gs-banner-text b {
  color: #111827;
}

.gs-banner.severity-bad .gs-banner-icon {
  background: #fee2e2;
  color: #b42318;
}

.gs-banner.severity-warm .gs-banner-icon {
  background: #fef3c7;
  color: #b45309;
}

.gs-banner.severity-complete .gs-banner-icon {
  background: #dcfce7;
  color: #16a34a;
}

.gs-banner.severity-primary .gs-banner-icon {
  background: var(--brand);
  color: #fff;
}

/* ── Setup success banner ─────────────────────────────────────────── */

.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #14532d;
}

/* ── Install page ─────────────────────────────────────────────────── */

.code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  background: #1e293b;
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 12px;
  overflow-x: auto;
}

.domain-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.domain-row:last-of-type {
  border-bottom: none;
}

/* ── Business Profile wizard ──────────────────────────────────────── */

.wizard-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.wizard-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
  border-radius: 9px 9px 0 0;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.wizard-tab.active {
  background: #fff;
  border-color: var(--line);
  border-bottom: 1px solid #fff;
  color: var(--brand);
}

.wizard-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  line-height: 1;
}

.wizard-tab-icon.complete { color: #16a34a; }
.wizard-tab-icon.partial { color: #2563eb; }
.wizard-tab-icon.not_started { color: var(--muted); }

@media (max-width: 980px) {
  .wizard-tabs {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
  }
}

.required-mark {
  color: var(--danger);
  margin-left: 3px;
  font-weight: 800;
}

.char-countdown {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.char-countdown.char-danger {
  color: var(--danger);
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  background: #f2f4f7;
  color: #667085;
}

.chip-toggle.selected {
  background: var(--soft);
  color: var(--brand);
  border-color: var(--brand);
}

.chip-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-builder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
}

.list-builder-row-main {
  min-width: 0;
}

.list-builder-row-main strong {
  display: block;
  font-size: 13px;
}

.list-builder-row-main span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-builder-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.field-group-label {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #98a2b3;
}

.field-group-label:first-child {
  margin-top: 0;
}

.hours-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.hours-row:last-child {
  border-bottom: none;
}

.wizard-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.wizard-launch-bar {
  margin-bottom: 18px;
}

.wizard-launch-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Business Profile compact redesign */

.business-profile-workspace {
  width: 100%;
  padding: 22px;
}

.profile-section-head,
.profile-save-actions,
.required-fields-head,
.list-builder-footer,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
}

.profile-section-head,
.required-fields-head,
.list-builder-footer,
.modal-head {
  justify-content: space-between;
  gap: 14px;
}

.profile-section-head h3,
.modal-head h3 {
  margin: 0;
}

.profile-launch-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-launch-strip .badge {
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.profile-launch-strip .progress {
  height: 7px;
}

.profile-section-head {
  align-items: flex-start;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr);
  gap: 18px;
  margin-bottom: 14px;
}

.profile-section-head > div:first-child {
  min-width: 0;
}

.profile-section-head h3,
.modal-head h3 {
  font-size: 18px;
  font-weight: 650;
}

.profile-save-actions,
.modal-actions {
  gap: 8px;
}

.profile-save-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
}

.settings-save-status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.settings-save-status.dirty {
  color: #b54708;
  font-weight: 750;
}

.profile-save-button {
  width: min(100%, 170px);
  min-height: 42px;
  align-self: center;
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #667085;
  font-size: 15px;
  font-weight: 800;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-save-button.dirty {
  border-color: #f79009;
  background: linear-gradient(180deg, #fdb022 0%, #f79009 100%);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(247, 144, 9, .14), 0 0 24px rgba(247, 144, 9, .34), 0 10px 22px rgba(181, 71, 8, .22);
}

.profile-save-button.dirty:hover {
  border-color: #dc6803;
  background: linear-gradient(180deg, #f79009 0%, #dc6803 100%);
  box-shadow: 0 0 0 5px rgba(247, 144, 9, .18), 0 0 30px rgba(247, 144, 9, .42), 0 12px 24px rgba(181, 71, 8, .26);
  transform: translateY(-1px);
}

.tab-status-notice {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  color: #667085;
  font-size: 14px;
  line-height: 1.4;
}

.tab-status-notice.dirty {
  background: #fff3e8;
  border-color: #ffead5;
  color: #b54708;
}

.tab-status-notice.partial {
  background: #fff6e6;
  border-color: #ffead5;
  color: #b54708;
}

.tab-status-notice.complete {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #05603a;
}

.tab-status-notice.not_started {
  background: #fff6e6;
  border-color: #ffead5;
  color: #b54708;
}

.business-profile-workspace .wizard-launch-bar {
  margin-bottom: 0;
}

.business-profile-workspace .wizard-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  margin: 0 -2px 18px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.business-profile-workspace .wizard-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  margin-bottom: 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.business-profile-workspace .wizard-tab:hover {
  color: #344054;
}

.business-profile-workspace .wizard-tab.active {
  background: transparent;
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.business-profile-workspace .wizard-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  line-height: 1;
}

.business-profile-workspace .wizard-tab-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.business-profile-workspace .wizard-tab-icon.required_incomplete {
  color: #b54708;
}

.business-profile-workspace .wizard-tab-icon.required_complete {
  color: #2563eb;
}

.business-profile-workspace .wizard-tab-icon.everything_complete {
  color: #027a48;
}

.wizard-tab-dirty {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f79009;
}

.required-fields-panel,
.optional-fields-panel {
  margin-bottom: 18px;
}

.required-fields-panel {
  padding: 14px;
  background: #f8faff;
  border: 1px solid #dbe4ff;
  border-radius: 8px;
}

.required-fields-head {
  margin-bottom: 12px;
}

.required-fields-head strong,
.required-fields-head span,
.optional-fields-label {
  font-size: 12px;
}

.required-fields-head strong,
.optional-fields-label {
  color: #344054;
  font-weight: 700;
}

.required-fields-head span {
  color: var(--muted);
  font-weight: 600;
}

.required-group-hint {
  margin: 0 0 12px;
  color: #475467;
  font-size: 12px;
  line-height: 1.4;
}

.optional-fields-label {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
}

.required-label {
  color: #344054;
}

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

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field {
  display: block;
  min-width: 0;
}

.profile-field label {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 650;
}

.profile-field small.muted {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.35;
}

.profile-field input,
.profile-field select,
.profile-field textarea,
.profile-field .chip-box {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  font-size: 15px;
}

.profile-field textarea {
  min-height: 118px;
  padding-bottom: 30px;
}

.field-control {
  position: relative;
}

.required-mark {
  color: var(--danger);
  margin-left: 0;
  font-weight: 800;
}

.char-countdown {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  padding: 2px 6px;
  background: rgba(255, 255, 255, .86);
  border-radius: 6px;
  color: #98a2b3;
  font-size: 12px;
  pointer-events: none;
}

.char-countdown.char-danger {
  color: var(--danger);
}

.btn:disabled,
.chip-toggle:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.chip-toggle.selected {
  background: var(--soft);
  color: var(--brand);
  border-color: #c7d2fe;
}

.chip-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-input {
  flex: 1;
  min-width: 160px;
  padding: 4px 2px !important;
  border: 0 !important;
  outline: none;
}

.tag-field {
  display: grid;
  gap: 8px;
}

.tag-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
}

.tag-entry .chip-input {
  min-width: 0;
}

.tag-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-list {
  display: grid;
  gap: 8px;
}

.line-list-row {
  display: flex;
  gap: 8px;
}

.line-list-row input {
  flex: 1;
}

.list-builder {
  display: grid;
  gap: 8px;
}

.list-builder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.list-builder-row-main {
  min-width: 0;
}

.list-builder-row-main strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.list-builder-row-main span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-builder-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.field-group-label {
  margin: 18px 0 8px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hours-grid {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.business-profile-workspace .hours-row {
  display: grid;
  grid-template-columns: 96px 124px 124px auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.business-profile-workspace .hours-row input[type="time"] {
  width: 124px;
}

.hours-row:last-child {
  border-bottom: none;
}

.hours-row strong,
.checkbox-label {
  font-size: 12px;
  font-weight: 650;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 58px 18px 24px;
  background: rgba(15, 23, 42, .48);
}

.modal-backdrop-compact {
  align-items: center;
  padding-top: 24px;
}

.modal-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 82px);
  overflow: auto;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(16, 24, 40, .24);
}

.confirm-card {
  width: min(560px, 100%);
}

.confirm-copy {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.45;
}

.modal-head {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  cursor: pointer;
  font-size: 16px;
}

.modal-required {
  margin-bottom: 16px;
}

.modal-field-group {
  margin-top: 12px;
}

.modal-actions {
  justify-content: flex-end;
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .profile-section-head {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .profile-save-actions {
    width: 100%;
    align-items: flex-start;
  }

  .profile-save-button {
    align-self: flex-start;
  }
}

@media (max-width: 760px) {
  .profile-launch-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-launch-strip .badge {
    justify-self: start;
  }

  .profile-field-grid,
  .business-profile-workspace .hours-row {
    grid-template-columns: 1fr;
  }

  .business-profile-workspace .hours-row input[type="time"] {
    width: 100%;
  }

  .line-list-row,
  .list-builder-row {
    align-items: stretch;
    flex-direction: column;
  }

  .list-builder-actions {
    justify-content: flex-end;
  }
}
