/**
 * Vibot Agency — B2B control plane (aligned with Volumen: navy + gold)
 */
:root {
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Syne", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --navy: #1c1e54;
  --navy-deep: #12133a;
  --navy-muted: #2d3070;
  --gold: #f0c429;
  --gold-soft: rgba(240, 196, 41, 0.14);
  --gold-text: #9b6829;
  --surface: #ffffff;
  --surface-2: #f8f7fc;
  --surface-3: #f0eff8;
  --border: #e4e2ef;
  --border-strong: #cdc9e0;
  --text: #12133a;
  --text-muted: #5c5a78;
  --text-soft: #8886a3;
  --success: #0d7a4e;
  --success-bg: rgba(13, 122, 78, 0.08);
  --danger: #b42318;
  --danger-bg: rgba(180, 35, 24, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(28, 30, 84, 0.04);
  --shadow-sm: 0 4px 12px rgba(28, 30, 84, 0.06);
  --shadow-md: 0 12px 40px rgba(28, 30, 84, 0.1);
  --sidebar-w: 15.5rem;
  --workspace-rail-w: 3.35rem;
  --topbar-h: 3.75rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --auth-cream: #f3f1ea;
  --auth-cream-line: #e5e2d8;
  --auth-shell-radius: 1.75rem;
  --auth-panel: #ebe8e1;
  --auth-panel-deep: #e0ddd5;
  --auth-panel-text: #3d3b36;
  --app-bg: #f4f4f5;
  --app-sidebar: #fafafa;
  --brand: #0129e1;
  --app-accent: #5b7fd4;
  --app-accent-hover: #4a6bc4;
  --app-accent-soft: rgba(91, 127, 212, 0.12);
  --app-text: #1a1a1a;
  --app-muted: #6b6b6b;
  --app-radius: 1.25rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ── Sign in (split layout, warm form + visual panel) ── */
body.mode-login {
  min-height: 100dvh;
  background: #e8e6df;
}

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 68rem;
  min-height: min(40rem, calc(100dvh - 2rem));
  background: var(--auth-cream);
  border-radius: var(--auth-shell-radius);
  box-shadow: 0 20px 50px rgba(28, 30, 84, 0.12), 0 4px 14px rgba(28, 30, 84, 0.06);
  overflow: hidden;
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(20rem, 0.92fr) minmax(22rem, 1.08fr);
    align-items: stretch;
  }
}

.auth-form-col {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.75rem 1.25rem;
  min-width: 0;
}

@media (min-width: 900px) {
  .auth-form-col {
    padding: 2.25rem 2.5rem 1.75rem;
  }
}

.auth-top {
  margin-bottom: 2rem;
}

.auth-pill-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem;
  border: 1px solid var(--auth-cream-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.auth-pill-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-pill-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.auth-pill-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding-left: 0.35rem;
  border-left: 1px solid var(--auth-cream-line);
  margin-left: 0.1rem;
}

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 22rem;
  width: 100%;
}

.auth-panel {
  width: 100%;
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.auth-lead {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.55;
  max-width: 20rem;
}

.auth-form {
  padding-top: 0;
}

body.mode-login .field-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

body.mode-login .auth-input {
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--auth-cream-line);
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 2px rgba(28, 30, 84, 0.04);
}

body.mode-login .auth-pw-wrap {
  margin-bottom: 1.1rem;
}

body.mode-login .auth-pw-wrap .auth-input {
  margin-bottom: 0;
  padding-right: 2.85rem;
}

body.mode-login .auth-input:focus {
  border-color: var(--navy-muted);
  box-shadow: 0 0 0 3px var(--gold-soft);
  outline: none;
}

body.mode-login .auth-submit {
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 700;
  min-height: 3rem;
  box-shadow: 0 4px 14px rgba(240, 196, 41, 0.45);
}

body.mode-login .auth-submit:hover:not(:disabled) {
  background: #e5b820;
  color: var(--navy-deep);
}

.spinner--dark {
  border-color: rgba(18, 19, 58, 0.2);
  border-top-color: var(--navy-deep);
}

.auth-help {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.auth-help--inline {
  margin-top: 1.25rem;
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--auth-cream-line);
  font-size: 0.8125rem;
}

.auth-foot-note {
  margin: 0;
  color: var(--text-muted);
  max-width: 14rem;
  line-height: 1.45;
}

.auth-foot-link {
  color: var(--navy-muted);
  font-weight: 600;
  text-decoration: none;
}

.auth-foot-link:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* Visual panel — minimal copy, warm neutral + deco circles */
.auth-visual {
  position: relative;
  min-height: 8rem;
  overflow: hidden;
  background: var(--auth-panel);
}

@media (min-width: 900px) {
  .auth-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
  }
}

@media (max-width: 899px) {
  .auth-shell {
    min-height: auto;
    grid-template-rows: auto 1fr;
  }

  .auth-visual {
    order: -1;
  }

  .auth-form-col {
    padding: 1.5rem 1.35rem 1.25rem;
  }

  .auth-top {
    margin-bottom: 1.5rem;
  }

  .auth-visual-content {
    padding: 1.35rem 1.35rem 1.5rem;
  }

  .auth-visual-list,
  .auth-orbs {
    display: none;
  }

  .auth-blob--sm {
    opacity: 0.5;
  }
}

.auth-visual-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
}

.auth-blob--gold {
  width: 16rem;
  height: 16rem;
  top: -5rem;
  right: -4rem;
  background: #fff;
  opacity: 0.7;
}

.auth-blob--blue {
  width: 11rem;
  height: 11rem;
  bottom: -3rem;
  left: -2.5rem;
  background: var(--auth-panel-deep);
  opacity: 0.9;
}

.auth-blob--sm {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.auth-blob--tl {
  top: 2.5rem;
  left: 1.5rem;
}

.auth-blob--br {
  bottom: 3rem;
  right: 2rem;
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255, 255, 255, 0.45);
  border: none;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 20rem;
  padding: 1.75rem 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .auth-visual-content {
    padding: 2rem 2.25rem 2.75rem;
  }
}

.auth-visual-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--auth-panel-text);
}

.auth-visual-lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(61, 59, 54, 0.68);
}

.auth-visual-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-visual-list li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(61, 59, 54, 0.65);
  padding-left: 0.9rem;
  position: relative;
}

.auth-visual-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--auth-panel-text);
  opacity: 0.3;
}

.auth-orbs {
  display: flex;
  align-items: center;
  margin-top: 1.25rem;
}

.auth-orb {
  width: 2rem;
  height: 2rem;
  margin-left: -0.4rem;
  border-radius: 50%;
  border: 2px solid var(--auth-panel);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(61, 59, 54, 0.5);
}

.auth-orb:first-child {
  margin-left: 0;
}

.auth-orb--plus {
  background: #fff;
  color: var(--auth-panel-text);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(44, 42, 38, 0.12);
}

.field-note {
  font-size: 0.8125rem;
  color: var(--text-soft);
  margin: -0.65rem 0 1rem;
}

.btn-text {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--navy-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-text:hover {
  color: var(--navy);
}

body.mode-login .btn-text {
  color: var(--gold-text);
}

body.mode-login .btn-text:hover {
  color: var(--navy);
}

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.text-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}

.text-input::placeholder {
  color: var(--text-soft);
}

.text-input:hover {
  border-color: var(--border-strong);
}

.text-input:focus {
  outline: none;
  border-color: var(--navy);
}

.pw-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.pw-wrap .text-input {
  margin-bottom: 0;
  padding-right: 2.75rem;
}

.pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pw-toggle:hover {
  color: var(--text-muted);
  background: var(--surface-3);
}

.pw-toggle:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.setup-pw-wrap {
  margin-bottom: 0.75rem;
}

.btn-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--navy);
  color: #fff;
  transition: background 0.15s, transform 0.1s;
}

.btn-submit:hover:not(:disabled) {
  background: var(--navy-muted);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-err,
.form-err {
  font-size: 0.8125rem;
  color: var(--danger);
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  background: var(--danger-bg);
  border: 1px solid rgba(180, 35, 24, 0.15);
  border-radius: var(--radius-sm);
  display: none;
}

.auth-err.is-visible,
.form-err.is-visible {
  display: block;
}

.hint {
  font-size: 0.8125rem;
  color: var(--text-soft);
  margin: -0.5rem 0 1rem;
}

.client-form-hint-type {
  color: var(--text);
  font-weight: 600;
}

.setup-step-error,
.setup-field-error {
  margin: 0.5rem 0 0.75rem;
}

.setup-field-error {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

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

/* ── App layout (light SaaS) ── */
body.mode-app {
  background: var(--app-bg);
  color: var(--app-text);
}

body.mode-login #app-shell {
  display: none !important;
}

/* Dashboard: loader until /me + data; then session-ready reveals shell */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background: var(--app-bg);
  color: var(--app-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

html.session-ready #app-loading {
  display: none !important;
}

html:not(.session-ready) #app-shell {
  display: none !important;
}

html.session-ready #app-shell {
  display: flex !important;
}

html.session-known #view-dashboard,
html.session-known #view-agents,
html.session-known #view-onboarding,
html.session-known #view-compartir,
html.session-known #view-team,
html.session-known #view-connectors,
html.session-known #view-settings,
html.session-known #view-platform {
  display: none !important;
}

html.session-known[data-boot-view='clients'] #view-dashboard {
  display: block !important;
}

html.session-known[data-boot-view='agents'] #view-agents {
  display: block !important;
}

html.session-known[data-boot-view='onboarding'] #view-onboarding {
  display: block !important;
}

html.session-known[data-boot-view='compartir'] #view-compartir {
  display: block !important;
}

html.session-known[data-boot-view='team'] #view-team {
  display: block !important;
}

html.session-known[data-boot-view='connectors'] #view-connectors {
  display: block !important;
}

html.session-known[data-boot-view='settings'] #view-settings {
  display: block !important;
}

html.session-known[data-boot-view='platform'] #view-platform {
  display: block !important;
}

html.session-known:not([data-boot-view='clients']) .sidebar-nav-item.is-active {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
}

html.session-known:not([data-boot-view='clients']) .sidebar-nav-item.is-active svg {
  opacity: 0.7;
  stroke: currentColor;
}

html.session-known[data-boot-view='compartir'] .sidebar-nav-item[data-view='compartir'],
html.session-known[data-boot-view='agents'] .sidebar-nav-item[data-view='agents'],
html.session-known[data-boot-view='onboarding'] .sidebar-nav-item[data-view='onboarding'],
html.session-known[data-boot-view='team'] .sidebar-nav-item[data-view='team'],
html.session-known[data-boot-view='connectors'] .sidebar-nav-item[data-view='connectors'],
html.session-known[data-boot-view='platform'] .sidebar-nav-item[data-view='platform'],
html.session-known[data-boot-view='settings'] .sidebar-nav-item[data-view='settings'] {
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-weight: 600;
}

html.session-known[data-boot-view='compartir'] .sidebar-nav-item[data-view='compartir'] svg,
html.session-known[data-boot-view='agents'] .sidebar-nav-item[data-view='agents'] svg,
html.session-known[data-boot-view='onboarding'] .sidebar-nav-item[data-view='onboarding'] svg,
html.session-known[data-boot-view='team'] .sidebar-nav-item[data-view='team'] svg,
html.session-known[data-boot-view='connectors'] .sidebar-nav-item[data-view='connectors'] svg,
html.session-known[data-boot-view='platform'] .sidebar-nav-item[data-view='platform'] svg,
html.session-known[data-boot-view='settings'] .sidebar-nav-item[data-view='settings'] svg {
  opacity: 1;
  stroke: var(--app-accent);
}

/* Agent workspace — section nav uses data-client-nav, not data-view */
html.session-known[data-workspace-scope='client'] .sidebar-nav-item[data-client-nav].is-active {
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-weight: 600;
}

html.session-known[data-workspace-scope='client'] .sidebar-nav-item[data-client-nav].is-active svg {
  opacity: 1;
  stroke: var(--app-accent);
}

.app-layout {
  display: flex;
  min-height: 100dvh;
}

@media (min-width: 768px) {
  .app-layout {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .workspace-rail {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .sidebar {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .main-column {
    min-height: 0;
    overflow: hidden;
  }

  .app-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Workspace profile rail (far left) ── */
.workspace-rail {
  display: none;
  width: var(--workspace-rail-w);
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  padding: 0.85rem 0 0.75rem;
  gap: 0.45rem;
  background: var(--app-sidebar);
  border-right: 1px solid #ececec;
}

.workspace-rail-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0.35rem;
}

.workspace-rail-btn {
  appearance: none;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.workspace-rail-btn:hover {
  background: #f0f0f0;
  color: var(--app-text);
}

.workspace-rail-btn.is-active {
  border-color: #d4d4d4;
  background: #ececec;
  color: var(--app-text);
  box-shadow: none;
}

.workspace-rail-avatar {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.workspace-rail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
}

.workspace-rail-btn.is-active .workspace-rail-icon,
.workspace-rail-btn:hover .workspace-rail-icon {
  opacity: 1;
}

.workspace-rail-add {
  appearance: none;
  width: 2.35rem;
  height: 2.35rem;
  margin-top: auto;
  border: 1px dashed #d4d4d4;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.workspace-rail-add:hover {
  background: #f0f0f0;
  border-color: #c4c4c4;
  color: var(--app-text);
}

@media (min-width: 768px) {
  .workspace-rail {
    display: flex;
  }

  html.workspace-rail-collapsed .workspace-rail {
    display: none !important;
  }
}

.workspace-rail-collapse {
  appearance: none;
  width: 2.35rem;
  height: 1.65rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.workspace-rail-collapse:hover {
  background: #f0f0f0;
  color: var(--app-text);
}

.workspace-rail-expand {
  appearance: none;
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 120;
  width: 1.35rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #ececec;
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--app-sidebar);
  color: var(--app-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, color 0.15s ease, width 0.15s ease;
}

.workspace-rail-expand:hover {
  width: 1.5rem;
  background: #f0f0f0;
  color: var(--app-text);
}

@media (min-width: 768px) {
  html.workspace-rail-collapsed .workspace-rail-expand:not([hidden]) {
    display: inline-flex;
  }
}

.topbar-workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: min(14rem, 52vw);
  padding: 0.35rem 0.55rem 0.35rem 0.4rem;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--app-text);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.topbar-workspace-avatar {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  background: #f0f0f0;
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-workspace-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .topbar-workspace-chip {
    display: none;
  }
}

.workspace-mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.workspace-mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 19, 58, 0.42);
}

.workspace-mobile-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(70dvh, 28rem);
  overflow: auto;
  padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
  border-radius: 1.1rem 1.1rem 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 32px rgba(18, 19, 58, 0.14);
}

.workspace-mobile-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.workspace-mobile-list {
  display: grid;
  gap: 0.35rem;
}

.workspace-mobile-item {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--app-text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.workspace-mobile-item.is-active {
  border-color: #d4d4d4;
  background: #f5f5f5;
  color: var(--app-text);
}

.workspace-mobile-item .workspace-rail-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-mobile-item-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-backdrop {
  display: none;
}

.sidebar {
  display: none;
  width: 15rem;
  flex-shrink: 0;
  flex-direction: column;
  background: var(--app-sidebar);
  border-right: 1px solid #ececec;
  padding: 1.35rem 1rem 1rem;
}

@media (max-width: 767px) {
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(18, 19, 58, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s var(--ease);
  }

  body.mobile-nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(18.5rem, 88vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: none;
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(28, 30, 84, 0.14);
  }

  .sidebar-nav-item {
    min-height: 2.75rem;
    padding: 0.75rem 0.9rem;
  }

  .sidebar-brand {
    padding-bottom: 1.5rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #ececec;
  }
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.35rem 1.35rem;
  margin-bottom: 0.5rem;
}

.sidebar-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  background: var(--app-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Custom agency logo — no accent tile behind the image */
.sidebar-mark.sidebar-mark--custom-logo {
  background: transparent;
  color: inherit;
  width: auto;
  height: auto;
  min-width: 2.1rem;
  min-height: 2.1rem;
  border-radius: 0;
  overflow: visible;
}

.sidebar-mark.sidebar-mark--custom-logo[data-logo-shape='square'] {
  border-radius: 0;
}

.sidebar-mark.sidebar-mark--custom-logo[data-logo-shape='rounded'] {
  border-radius: 0.65rem;
}

.sidebar-mark.sidebar-mark--custom-logo[data-logo-shape='circle'] {
  border-radius: 50%;
}

.sidebar-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--app-text);
  min-width: 0;
}

#sidebar-brand-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-text small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--app-muted);
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--app-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav-item:hover {
  background: #f0f0f0;
  color: var(--app-text);
}

.sidebar-nav-item.is-active {
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-weight: 600;
}

.sidebar-nav-item.is-active svg {
  opacity: 1;
  stroke: var(--app-accent);
}

.sidebar-nav-item--platform {
  font-size: 0.8125rem;
  opacity: 0.72;
}

html.platform-admin .sidebar-nav-item--platform:not(.hidden) {
  opacity: 1;
}

.sidebar-nav-item--platform.is-active {
  background: #f4f0ff;
  color: #5b21b6;
}

.sidebar-nav-item--platform.is-active svg {
  stroke: #5b21b6;
}

.sidebar-bottom-group {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #ececec;
}

.sidebar-bottom-group .sidebar-nav-item {
  margin-top: 0.35rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.5rem 0.65rem;
  min-width: 0;
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.sidebar-user-email {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: var(--app-muted);
}

/* Settings — full-width layout + overview strip */
.settings-overview {
  margin-bottom: 1.35rem;
}

@media (min-width: 900px) {
  .settings-overview {
    grid-template-columns: repeat(3, 1fr);
  }
}

.settings-overview-card .stat-value {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  line-height: 1.25;
  word-break: break-word;
}

.settings-overview-avatar {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.75rem;
}

.settings-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
  }
}

.settings-card {
  min-width: 0;
}

.settings-card-body {
  padding: 0 1.25rem 0.5rem;
}

.settings-stack {
  display: flex;
  flex-direction: column;
}

.settings-row {
  display: grid;
  gap: 1rem 1.75rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid #ececec;
}

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

@media (min-width: 768px) {
  .settings-row {
    grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr);
    align-items: start;
  }
}

.settings-row-aside h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--app-text);
}

.settings-row-aside .muted {
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 0;
}

.settings-fields {
  display: grid;
  gap: 0;
}

@media (min-width: 520px) {
  .settings-fields--2 {
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
  }
}

@media (min-width: 900px) {
  .settings-fields--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

.settings-fields .field-label {
  color: var(--app-text);
}

.settings-readonly {
  margin-bottom: 0;
  background: var(--surface-2);
  border-color: var(--border);
  font-size: 0.9375rem;
  cursor: default;
  user-select: text;
}

.settings-readonly--mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.settings-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

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

.settings-links li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.settings-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-muted);
  text-decoration: none;
}

.settings-links a:hover {
  color: var(--app-accent);
}

.settings-links-meta {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.settings-row-body--actions {
  display: flex;
  align-items: flex-start;
}

.branding-style-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-logout-settings {
  border-color: #e8c4c4;
  color: var(--danger);
}

.btn-logout-settings:hover {
  background: var(--danger-bg);
  border-color: #d4a0a0;
  color: var(--danger);
}

.settings-rail {
  position: sticky;
  top: 1rem;
}

.settings-rail-body {
  padding: 1rem 1.25rem 1.25rem;
}

.settings-rail-lead {
  margin: 0 0 1.15rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--app-muted);
}

.settings-rail-dl {
  margin: 0 0 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.settings-rail-dl > div {
  display: grid;
  gap: 0.2rem;
}

.settings-rail-dl dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin: 0;
}

.settings-rail-dl dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--app-text);
  word-break: break-word;
}

.settings-rail-foot {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.settings-rail-foot a {
  color: var(--app-accent);
  font-weight: 600;
  text-decoration: none;
}

.settings-rail-foot a:hover {
  text-decoration: underline;
}

/* Settings — unified shell + tabbed workspace (full app-main width) */
.settings-shell {
  width: 100%;
  max-width: none;
}

.settings-shell-head {
  margin-bottom: 0.85rem;
}

.settings-shell-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  color: var(--app-text);
}

.settings-shell-head .muted {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.panel--settings .settings-overview.stats-grid {
  margin-bottom: 0.85rem;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767px) {
  .panel--settings .settings-overview.stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  .panel--settings .settings-overview.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.panel--settings .settings-overview .stat-card {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
}

.settings-workspace {
  overflow: hidden;
}

.settings-workspace > .settings-tabs {
  margin: 0;
  padding: 0 1rem;
  border-bottom: 1px solid #ececec;
  background: var(--surface-2);
}

.settings-workspace > .settings-tabs .onboarding-detail-tab {
  margin-bottom: -1px;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.settings-panels {
  padding: 0;
}

.settings-panel {
  padding: 0.25rem 1.25rem 1rem;
}

.settings-panel .settings-stack {
  padding-top: 0.35rem;
}

.settings-panel .settings-row:first-child {
  padding-top: 0.85rem;
}

.settings-billing-panel {
  padding: 0.85rem 0 0.5rem;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.billing-pending-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(240, 196, 41, 0.45);
  background: linear-gradient(135deg, rgba(240, 196, 41, 0.14) 0%, rgba(255, 251, 235, 0.9) 100%);
}

.billing-pending-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 196, 41, 0.25);
  color: #9b6829;
}

.billing-pending-title {
  margin: 0 0 0.2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--app-text);
}

.billing-pending-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.billing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .billing-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .billing-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.billing-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.billing-kpi-card--accent {
  border-color: rgba(91, 127, 212, 0.35);
  background: linear-gradient(145deg, #fff 0%, rgba(91, 127, 212, 0.08) 100%);
}

.billing-kpi-icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.billing-kpi-icon--blue {
  background: rgba(91, 127, 212, 0.15);
  color: var(--app-accent);
}

.billing-kpi-icon--green {
  background: rgba(13, 122, 78, 0.12);
  color: var(--success);
}

.billing-kpi-icon--accent {
  background: var(--app-accent);
  color: #fff;
}

.billing-kpi-icon--violet {
  background: rgba(120, 90, 200, 0.12);
  color: #6b4fc7;
}

.billing-kpi-label {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.billing-kpi-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.billing-kpi-value--lg {
  font-size: 1.55rem;
  color: var(--app-accent);
}

.billing-kpi-value--date {
  font-size: 1.05rem;
  line-height: 1.25;
}

.billing-kpi-hint {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--app-muted);
}

.billing-breakdown .card-head {
  padding: 0.75rem 1.1rem;
  font-size: 0.875rem;
}

.billing-breakdown-body {
  padding: 0.25rem 0;
}

.billing-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #ececec;
}

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

.billing-type-row--empty {
  opacity: 0.55;
}

.billing-type-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.billing-type-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--app-text);
}

.billing-type-count {
  font-size: 0.8125rem;
  color: var(--app-muted);
}

.billing-type-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
  flex-shrink: 0;
}

.billing-type-unit {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.billing-type-subtotal {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-muted);
  font-variant-numeric: tabular-nums;
}

.billing-footnote {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.billing-footnote p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.billing-footnote p + p {
  margin-top: 0.45rem;
}

.billing-footnote a {
  color: var(--app-accent);
  font-weight: 600;
  text-decoration: none;
}

.billing-footnote a:hover {
  text-decoration: underline;
}

.settings-row--logout {
  margin-top: 0.15rem;
}

.settings-row--actions {
  border-bottom: none;
  grid-template-columns: 1fr;
  justify-items: end;
  padding-bottom: 0.35rem;
}

.settings-row--actions .settings-row-body {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  html.session-known[data-boot-view='settings'] .app-main {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  html.session-known[data-boot-view='settings'] .settings-overview .stat-icon,
  html.session-known[data-boot-view='settings'] .settings-overview-avatar {
    width: 2rem;
    height: 2rem;
  }

  html.session-known[data-boot-view='settings'] .settings-overview-card .stat-value {
    font-size: 0.875rem;
  }

  html.session-known[data-boot-view='settings'] .settings-row {
    padding: 0.75rem 0;
    gap: 0.5rem 2rem;
    grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr);
    align-items: center;
  }

  html.session-known[data-boot-view='settings'] .settings-panel {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  html.session-known[data-boot-view='settings'] .settings-row-aside h2 {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
  }

  html.session-known[data-boot-view='settings'] .settings-row-aside .muted {
    font-size: 0.75rem;
    line-height: 1.35;
  }

}

.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 0.5rem;
  padding-top: max(0, env(safe-area-inset-top));
  background: var(--app-bg);
  border-bottom: 1px solid #ececec;
  position: sticky;
  top: 0;
  z-index: 30;
}

@media (min-width: 768px) {
  .topbar {
    display: none;
  }
}

.btn-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--app-text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.btn-hamburger:hover {
  background: #f0f0f0;
}

@media (min-width: 768px) {
  .btn-hamburger {
    display: none;
  }
}

.hamburger-icon {
  display: block;
}

.hamburger-line {
  transition: transform 0.2s var(--ease), opacity 0.2s;
  transform-origin: center;
}

body.mobile-nav-open .hamburger-line--top {
  transform: translateY(5px) rotate(45deg);
}

body.mobile-nav-open .hamburger-line--mid {
  opacity: 0;
}

body.mobile-nav-open .hamburger-line--bot {
  transform: translateY(-5px) rotate(-45deg);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-ghost {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--navy);
  background: var(--surface-2);
}

.app-main {
  flex: 1;
  padding: 1rem 1rem 2rem;
  background: var(--app-bg);
}

@media (min-width: 768px) {
  .app-main {
    padding: 1.5rem 1.75rem 2rem;
  }
}

.panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
  color: var(--app-text);
}

.dash-greeting {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-hello {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: var(--app-text);
}

.dash-greeting-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.dash-date {
  font-size: 0.8125rem;
  color: var(--app-muted);
  white-space: nowrap;
}

.dashboard-grid {
  display: block;
}

.dashboard-rail {
  margin-top: 1.25rem;
}

.dashboard-rail:has(.activity-panel.hidden) {
  display: none;
}

.page-header .muted {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 36rem;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dash-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon--blue {
  background: rgba(91, 127, 212, 0.15);
  color: var(--app-accent);
}

.stat-icon--green {
  background: rgba(13, 122, 78, 0.12);
  color: var(--success);
}

.stat-icon--violet {
  background: rgba(120, 90, 200, 0.12);
  color: #6b4fc7;
}

.stat-icon--amber {
  background: rgba(200, 140, 40, 0.12);
  color: #9b6829;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-muted);
  margin: 0 0 0.2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #ececec;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--app-text);
}

.card-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-head-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-muted);
}

.card-foot {
  padding: 1.25rem 1rem;
  margin: 0;
  text-align: center;
  font-size: 0.875rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.12s;
}

tbody tr:hover {
  background: var(--surface-2);
}

th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  background: #fafafa;
}

td strong {
  font-weight: 600;
  color: var(--navy);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.badge.on {
  background: var(--success-bg);
  color: var(--success);
}

.badge.off {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge.role {
  background: var(--surface-3);
  color: var(--text-muted);
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.75rem;
  min-height: 14rem;
}

.card .empty-state {
  border-top: 1px solid #ececec;
}

.empty-state-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 0 1rem;
  border-radius: 50%;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--app-text);
}

.empty-state-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--app-muted);
  max-width: 22rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: var(--app-accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
  background: #4a6bc4;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--navy-muted);
  color: var(--navy);
}

.btn-link {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--navy-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.btn-link:hover {
  background: var(--app-accent-soft);
  color: var(--app-accent);
}

.col-actions {
  text-align: right;
  white-space: nowrap;
}

.col-num {
  text-align: right;
  white-space: nowrap;
  min-width: 4.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-muted);
}

.data-table th.col-num,
.data-table td.col-num {
  text-align: right;
}

.data-table th.col-num {
  white-space: nowrap;
  line-height: 1.2;
}

.col-num.is-hot {
  color: var(--navy);
  font-weight: 600;
}

/* Clients table — header/cell alignment */
#clients-table {
  width: 100%;
  min-width: 56rem;
}

#clients-table th,
#clients-table td {
  vertical-align: middle;
  padding: 0.75rem 0.85rem;
}

#clients-table th.col-business,
#clients-table td.col-business {
  text-align: left;
  padding-left: 1rem;
}

#clients-table td.col-business strong {
  display: block;
  line-height: 1.35;
}

#clients-table th.col-phone,
#clients-table td.col-phone {
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
}

#clients-table th.col-tag,
#clients-table td.col-tag {
  text-align: center;
}

#clients-table th.col-price,
#clients-table td.col-price {
  text-align: right;
  white-space: nowrap;
}

#clients-table th.col-actions,
#clients-table td.col-actions {
  text-align: right;
  padding-right: 1rem;
}

.create-panel {
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.25rem;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.create-panel h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--navy);
}

.create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 640px) {
  .create-grid {
    grid-template-columns: 1fr;
  }
}

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

.onboarding-gestion-root .gestion-business-description {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
}

.gestion-review-fields {
  display: grid;
  gap: 0.15rem;
  max-width: 42rem;
}

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

.onboarding-gestion-root .gestion-review-message {
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
}

.onboarding-gestion-root .gestion-review-url {
  width: 100%;
}

.create-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

textarea.text-input {
  resize: vertical;
  min-height: 4rem;
}

.label-hint {
  font-weight: 400;
  color: var(--text-soft);
}

select.text-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c5a78' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ── Conectores ── */
.connectors-view .page-header {
  margin-bottom: 1.25rem;
}

.connectors-tabs {
  margin-bottom: 1.5rem;
  max-width: 28rem;
}

.connectors-panes {
  min-width: 0;
}

.connector-pane {
  display: none;
}

.connector-pane.is-active {
  display: block;
}

.connector-pane-head {
  margin-bottom: 1.5rem;
}

.connector-pane-head h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: var(--navy);
}

.connector-pane-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 38rem;
}

.connector-pane-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.connector-block {
  margin-bottom: 1.75rem;
}

.connector-block-head {
  margin-bottom: 0.85rem;
}

.connector-block-head h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  color: var(--app-text);
}

.connector-block-head .muted {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.connector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.connector-card--form {
  margin-bottom: 1.25rem;
}

.connector-card-body {
  padding: 1rem 1.15rem 1.15rem;
}

.connector-card-titlebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}

.connector-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--app-text);
}

.connector-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.connector-brand--pipedrive {
  background: #017737;
}

.connector-brand--hubspot {
  background: #ff7a59;
}

.connector-brand--zoho {
  background: #e42527;
}

.connector-brand--vibot {
  background: var(--app-accent);
}

.connector-card .table-wrap {
  border: none;
  border-radius: 0;
}

.connectors-table th {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.connectors-table td {
  vertical-align: middle;
}

.connector-key-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.connector-key-mask {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--app-text);
  letter-spacing: 0.02em;
}

.connector-key-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.connector-key-toggle:hover {
  background: var(--surface-2);
  color: var(--app-accent);
}

.connector-empty {
  padding: 2rem 1.15rem;
  text-align: center;
}

.connector-empty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  margin: 0 0 0.25rem;
  color: var(--app-text);
}

.connector-code-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1a1d24;
}

.connector-code-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  background: #23272f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.connector-code-icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #f59e0b;
}

.connector-code-label {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e8eaed;
}

.connector-code-head .btn-ghost {
  color: #c4c8d0;
  font-size: 0.75rem;
}

.connector-code-head .btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.connector-code-body {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: #d4d8e0;
  white-space: pre-wrap;
  word-break: break-word;
}

.connector-code-body code {
  font-family: inherit;
}

.connectors-banner {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  border: 1px solid var(--border-strong);
}

.connectors-banner--success {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--navy);
}

.connectors-banner--error {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--navy);
}

.connectors-banner--info {
  background: var(--app-accent-soft);
  color: var(--navy);
}

.connectors-sub {
  font-size: 0.8125rem;
  margin-top: 0.15rem;
}

.connectors-scope-sub {
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.connectors-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
}

.connectors-row--highlight {
  animation: connectors-highlight 2.5s ease-out;
}

@keyframes connectors-highlight {
  0% {
    background: color-mix(in srgb, var(--app-accent) 18%, transparent);
  }
  100% {
    background: transparent;
  }
}

/* CRM connectors — provider tiles + agents table */
.crm-providers-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

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

@media (min-width: 960px) {
  .crm-providers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.crm-provider-tile {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.crm-provider-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.crm-provider-tile-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.crm-provider-tile-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}

.connector-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--app-text);
}

.connector-logo::before {
  content: '';
  width: 3px;
  height: 1.1rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.connector-logo--pipedrive::before {
  background: #017737;
}

.connector-logo--hubspot::before {
  background: #ff7a59;
}

.connector-logo--zoho::before {
  background: #e42527;
}

.crm-agents-block {
  margin-bottom: 0;
}

.crm-agents-table td.crm-table-agent {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.crm-table-muted {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.crm-provider-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.crm-provider-badge--pipedrive {
  color: #017737;
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.crm-provider-badge--hubspot {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.crm-provider-badge--zoho {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.crm-provider-dc-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}

.agent-connector-zoho-modal {
  border-top: 3px solid #e42527;
}

.agent-connector-zoho-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.agent-connector-zoho-modal .modal-title::before {
  content: '';
  width: 3px;
  height: 1.1rem;
  border-radius: 2px;
  background: #e42527;
  flex-shrink: 0;
}

.agent-connector-dc-select {
  width: 100%;
}

.agent-connector-dc-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.crm-agents-table.hidden {
  display: none;
}

.onboarding-connectors-root {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
}

.connectors-banner--info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--app-text);
}

.agent-connectors-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .agent-connectors-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

.agent-connector-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.agent-connector-card[data-crm-provider='zoho'] .agent-connector-card-head {
  background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
}

.agent-connector-card--active {
  border-color: color-mix(in srgb, var(--app-accent) 35%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--app-accent) 12%, transparent);
}

.agent-connector-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 50%, var(--surface));
}

.agent-connector-pill {
  flex-shrink: 0;
}

.agent-connector-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.agent-connector-lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.agent-connector-note {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.agent-connector-meta-dl {
  margin: 0;
  font-size: 0.8125rem;
}

.agent-connector-meta-dl div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
}

.agent-connector-meta-dl dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.agent-connector-meta-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--app-text);
  word-break: break-all;
}

.agent-connector-meta {
  margin: 0;
  font-size: 0.8125rem;
}

.agent-connector-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: auto;
}

.agent-connector-cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.agent-connector-notice {
  font-size: 0.875rem;
  line-height: 1.5;
}

.agent-connector-notice p {
  margin: 0 0 0.35rem;
}

.agent-connector-gdpr {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e8ecf4;
  background: #f8fafc;
}

.agent-connector-gdpr-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--app-text, #12133a);
  cursor: pointer;
}

.agent-connector-gdpr-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--brand, #0129e1);
  flex-shrink: 0;
}

.agent-connector-gdpr-warn {
  margin: 0.5rem 0 0 1.55rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--app-muted, #64748b);
}

.hub-addons-foot-actions {
  margin: 0;
}

.hub-addons-foot-actions .btn-primary {
  min-width: 9.5rem;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.hub-addon-checkout-pane {
  padding: 0.5rem 0 1rem;
}

.hub-checkout-stub {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.hub-checkout-actions {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: none;
}

.secret-banner {
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
}

.secret-banner-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.secret-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.secret-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
  flex: 1;
  min-width: 12rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin: 0.4rem 0;
  cursor: pointer;
  color: var(--text-muted);
}

.section-sub {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--navy);
}

.activity-panel {
  margin-top: 0;
  padding: 1.15rem 1.2rem;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

#view-dashboard .table-wrap {
  overflow-x: auto;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.activity-head h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0;
  color: var(--app-text);
}

.activity-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.activity-msg {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font-size: 0.875rem;
  border: 1px solid var(--border);
}

.activity-msg--user {
  border-left: 3px solid var(--gold);
}

.activity-msg--assistant {
  border-left: 3px solid var(--navy-muted);
}

.activity-meta {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-msg p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  line-height: 1.45;
}

.dash-head code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  background: var(--surface-3);
  border-radius: 4px;
}

/* ── Mobile ── */
.topbar {
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
}

.app-main {
  padding-left: max(0.85rem, env(safe-area-inset-left));
  padding-right: max(0.85rem, env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

@media (max-width: 767px) {
  .dash-greeting {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
  }

  .dash-greeting-meta {
    align-items: stretch;
    width: 100%;
  }

  .dash-greeting-meta .btn-primary {
    width: 100%;
    justify-content: center;
    min-height: 2.75rem;
  }

  .dash-hello {
    font-size: 1.45rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-rail {
    position: static;
  }

  .settings-overview .stat-value {
    font-size: 0.95rem;
  }

  .card-head--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .dashboard-rail {
    margin-top: 0.5rem;
  }
}

@media (max-width: 639px) {
  .dash-head {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-actions {
    width: 100%;
  }

  .dash-actions .btn-primary {
    width: 100%;
    min-height: 2.75rem;
  }

  .stat-card {
    padding: 0.85rem 0.95rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .btn-ghost,
  .btn-primary,
  .btn-secondary {
    min-height: 2.75rem;
  }

  .btn-link {
    min-height: 2.5rem;
    padding: 0.5rem 0.65rem;
  }

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

  .activity-head .btn-secondary {
    width: 100%;
  }

  .secret-row {
    flex-direction: column;
    align-items: stretch;
  }

  .secret-code {
    min-width: 0;
  }

  .create-actions .btn-primary,
  .create-actions .btn-ghost {
    flex: 1;
    min-width: calc(50% - 0.25rem);
  }
}

@media (max-width: 767px) {
  .table-wrap {
    overflow-x: visible;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    display: block;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
  }

  .data-table tbody tr:last-child {
    border-bottom: none;
  }

  .data-table tbody tr:hover {
    background: var(--surface);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: none;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    text-align: left;
    flex-shrink: 0;
    max-width: 42%;
  }

  .data-table td[data-label=""]::before,
  .data-table td:not([data-label])::before {
    display: none;
  }

  .data-table td strong {
    text-align: right;
  }

  .data-table td.col-num {
    font-variant-numeric: tabular-nums;
  }

  .data-table td.col-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-top: 0.75rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--border);
  }

  .data-table td.col-actions::before {
    display: none;
  }
}

.platform-slug {
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.text-input--compact {
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
  min-width: 7rem;
}

.badge.master {
  margin-left: 0.35rem;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.6875rem;
  vertical-align: middle;
}

.platform-creds-dl {
  margin: 0.75rem 0 1rem;
  display: grid;
  gap: 0.65rem;
}

.platform-creds-dl dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-muted);
  margin-bottom: 0.2rem;
}

.platform-creds-dl dd {
  margin: 0;
}

/* ── Platform admin (master-detail, viewport-fit) ── */
html.platform-view-active,
html.platform-view-active body {
  height: 100%;
  overflow: hidden;
}

html.platform-view-active .app-layout {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

html.platform-view-active .main-column {
  min-height: 0;
  overflow: hidden;
}

html.platform-view-active .app-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
}

.panel--platform {
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.platform-subtabs {
  flex-shrink: 0;
  margin-bottom: 0.65rem;
  max-width: 28rem;
}

.platform-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.platform-pane.is-active {
  display: flex;
}

.platform-search-wrap--wide {
  width: 16rem;
}

.platform-accounts-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.platform-accounts-card .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.panel--platform .platform-accounts-kpis.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.badge.platform-product {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge.platform-product-agency {
  background: rgba(1, 41, 225, 0.1);
  color: #0129e1;
}

.badge.platform-product-portal {
  background: rgba(16, 122, 87, 0.12);
  color: #0a6b4a;
}

.platform-header-main {
  min-width: 0;
}

.platform-crumb {
  font-size: 0.75rem;
  margin: 0 0 0.15rem;
}

.platform-crumb-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.platform-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text);
  line-height: 1.2;
}

.platform-toolbar {
  --platform-toolbar-h: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.platform-toolbar .text-input {
  margin-bottom: 0;
}

.platform-toolbar .platform-search-wrap,
.platform-toolbar .platform-filter-select,
.platform-toolbar .btn-primary--compact {
  height: var(--platform-toolbar-h);
  box-sizing: border-box;
}

.platform-toolbar .platform-search-wrap {
  padding-block: 0;
}

.platform-toolbar .platform-filter-select {
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.platform-toolbar .btn-primary--compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
}

.btn-primary--compact {
  padding: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.platform-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 11.5rem;
}

.platform-search-wrap svg {
  color: var(--text-soft);
  flex-shrink: 0;
}

.platform-search {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  width: 100%;
  min-width: 0;
  color: var(--text);
}

.platform-kpis {
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.panel--platform .platform-kpis.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.panel--platform .platform-kpis .stat-card {
  padding: 0.55rem 0.75rem;
  gap: 0;
}

.panel--platform .platform-kpis .stat-label {
  font-size: 0.6875rem;
  margin-bottom: 0.1rem;
}

.panel--platform .platform-kpis .stat-value {
  font-size: 1.2rem;
  line-height: 1.1;
}

.platform-split {
  display: grid;
  grid-template-columns: minmax(13rem, 18rem) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 960px) {
  html.platform-view-active,
  html.platform-view-active body {
    height: auto;
    overflow: auto;
  }

  html.platform-view-active .app-layout {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  html.platform-view-active .app-main {
    overflow: visible;
  }

  .panel--platform {
    overflow: visible;
  }

  .platform-split {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .platform-header {
    flex-wrap: wrap;
  }

  .platform-toolbar {
    width: 100%;
  }

  .platform-search-wrap {
    flex: 1;
    width: auto;
  }
}

.platform-filter-select {
  max-width: 9.5rem;
  flex-shrink: 0;
}

.platform-list.card,
.platform-detail.card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.platform-list .card-head {
  flex-shrink: 0;
  padding: 0.65rem 0.85rem;
}

.platform-agency-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.35rem 0.35rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.platform-agency-item {
  margin-bottom: 0.25rem;
}

.platform-agency-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.platform-agency-item.is-selected .platform-agency-btn,
.platform-agency-btn:hover {
  background: var(--app-accent-soft);
  border-color: rgba(91, 127, 212, 0.2);
}

.platform-agency-item-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.platform-agency-item-slug {
  display: block;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 0.1rem;
}

.platform-agency-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.platform-agency-item-stat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.pill-paid { background: var(--success-bg); color: var(--success); }
.pill-trial { background: var(--gold-soft); color: var(--gold-text); }
.pill-unpaid { background: #f3f4f6; color: var(--text-muted); }
.pill-overdue { background: var(--danger-bg); color: var(--danger); }

.platform-detail {
  min-height: 0;
}

.platform-detail-empty {
  padding: 2rem 1rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.platform-detail-empty-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.platform-detail-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.platform-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.platform-detail-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  flex-shrink: 0;
}

.platform-detail-hero--compact .platform-detail-avatar {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.8rem;
}

.platform-detail-hero--compact .platform-detail-title-row h2 {
  font-size: 1.05rem;
}

.platform-detail-hero--compact .platform-detail-slug {
  margin: 0.1rem 0 0.35rem;
  font-size: 0.75rem;
}

.platform-detail-hero--compact .platform-score strong {
  font-size: 1rem;
}

@media (max-width: 720px) {
  .platform-detail-hero {
    grid-template-columns: 1fr;
  }
}

.platform-detail-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.platform-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.platform-detail-title-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.platform-detail-slug {
  margin: 0.2rem 0 0.65rem;
  font-size: 0.8125rem;
}

.platform-detail-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.platform-detail-controls .field-label {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.platform-detail-controls .text-input {
  margin: 0;
  flex: 1;
  min-width: 0;
  max-width: 11rem;
  height: 1.875rem;
  line-height: 1.2;
}

.platform-detail-scores {
  display: flex;
  gap: 1rem;
}

.platform-score {
  text-align: center;
  min-width: 3.5rem;
}

.platform-score-label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: 0.15rem;
}

.platform-score strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.platform-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem 0.35rem;
}

.platform-section-head--team {
  padding-top: 0.35rem;
}

.platform-section-head h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.platform-table-wrap {
  margin: 0 1rem 0.5rem;
  width: calc(100% - 2rem);
}

.platform-agents-table,
.platform-team-table {
  margin: 0;
  width: 100%;
}

.data-table--dense th,
.data-table--dense td {
  padding: 0.45rem 0.55rem;
  font-size: 0.8125rem;
}

.platform-danger-zone {
  margin: 0;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.platform-danger-hint {
  margin: 0;
  font-size: 0.75rem;
  text-align: right;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(180, 35, 24, 0.25);
  background: var(--danger-bg);
  color: var(--danger);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(180, 35, 24, 0.12);
}

.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.modal-open {
  overflow: hidden;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 19, 58, 0.45);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.35rem 1.35rem 1.15rem;
  border: 1px solid var(--border);
}

.modal-card--wide {
  width: min(32rem, 100%);
}

.modal-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.modal-extra {
  margin-bottom: 1rem;
}

.modal-extra .text-input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.12);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Platform agent analytics ── */
.platform-agent-row {
  cursor: pointer;
  transition: background 0.12s;
}

.platform-agent-row:hover td {
  background: rgba(91, 127, 212, 0.06);
}

.platform-agent-row.is-selected td {
  background: var(--app-accent-soft);
}

.agent-row {
  cursor: pointer;
}

.agent-row:hover td {
  background: var(--app-surface-hover, rgba(0, 0, 0, 0.03));
}

.agent-row.is-selected td {
  background: var(--app-accent-soft);
}

.agent-detail-panel {
  margin-top: 0;
}

/* ── Agent resumen (per-agent dashboard) ── */
.agent-resumen {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  max-width: none;
  flex: 1;
  min-height: 0;
}

.agents-hub--detail-open {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.agents-hub--detail-open > .card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

@media (min-width: 768px) {
  html[data-workspace-scope='client'] #view-agents:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
}

.agent-resumen-head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.agent-resumen-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.45rem 0.75rem 0.45rem 0.55rem;
  border: 1px solid #ececec;
  border-radius: 999px;
  background: #fff;
  color: var(--app-muted);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.agent-resumen-back:hover {
  color: var(--app-text);
  border-color: #d4d4d4;
  background: #fafafa;
}

html[data-workspace-scope='client'] .agent-resumen-back {
  display: none;
}

.agent-resumen-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid #ececec;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.agent-resumen-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: #f0f0f0;
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.agent-resumen-copy {
  flex: 1;
  min-width: 0;
}

.agent-resumen-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.agent-resumen-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--app-text);
}

.agent-resumen-agent {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--app-muted);
}

.agent-resumen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.agent-resumen-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #ececec;
  background: #fafafa;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--app-muted);
  line-height: 1.3;
}

.agent-resumen-chip.is-active {
  border-color: rgba(13, 122, 78, 0.25);
  background: var(--success-bg);
  color: var(--success);
}

.agent-resumen-chip.is-warn {
  border-color: rgba(155, 104, 41, 0.25);
  background: rgba(240, 196, 41, 0.12);
  color: var(--gold-text);
}

.agent-resumen-config {
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
}

.agent-resumen-kpis {
  margin-bottom: 0 !important;
  gap: 0.65rem !important;
}

.agent-resumen-kpis .agent-kpi-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
}

.agent-resumen-kpis .stat-label {
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.agent-resumen-kpis .stat-value {
  font-size: 1.35rem;
}

.agent-resumen-dashboard {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(13rem, 16rem);
  grid-template-rows: minmax(16rem, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .agent-resumen-dashboard {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(14rem, 1fr) auto;
  }

  .agent-resumen-insights {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .agent-resumen-dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

.agent-resumen-chart {
  margin: 0;
  padding: 1rem 1.05rem 0.9rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.agent-resumen-chart .platform-chart-head {
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.agent-resumen-chart .platform-chart-head h4 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.agent-viz-host {
  flex: 1;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.agent-viz-area-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 11rem;
  gap: 0.35rem;
}

.agent-viz-area-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.agent-viz-peak strong {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--app-text);
  margin-right: 0.25rem;
}

.agent-viz-total {
  font-size: 0.6875rem;
}

.agent-viz-area {
  flex: 1;
  width: 100%;
  min-height: 8.5rem;
  display: block;
}

.agent-viz-area-line {
  vector-effect: non-scaling-stroke;
}

.agent-viz-grid {
  stroke: #ececec;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.agent-viz-xlabels {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  font-size: 0.625rem;
  color: var(--text-soft);
  padding: 0 0.15rem;
}

.agent-viz-xlabels span {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-viz-empty {
  margin: auto;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
}

.agent-insight-donuts {
  display: grid;
  gap: 0.85rem;
}

.agent-insight-donut-block {
  display: grid;
  gap: 0.35rem;
}

.agent-donut-host {
  min-height: 0;
}

.agent-donut-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.agent-donut-chart {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
}

.agent-donut-svg,
.agent-donut-ring {
  width: 100%;
  height: 100%;
  display: block;
}

.agent-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.agent-donut-center strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--app-text);
}

.agent-donut-center span {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-top: 0.1rem;
}

.agent-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.agent-donut-legend li {
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--app-muted);
}

.agent-donut-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-donut-legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-donut-legend strong {
  font-variant-numeric: tabular-nums;
  color: var(--app-text);
}

.agent-donut-empty {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
}

.agent-donut-empty .agent-donut-ring {
  width: 4.5rem;
  height: 4.5rem;
}

.agent-insight-empty {
  margin: 0;
  font-size: 0.75rem;
  text-align: center;
}

.agent-resumen-insights {
  margin: 0;
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
}

.agent-resumen-insights h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--app-text);
}

.agent-insight-stats {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.agent-insight-stat {
  display: grid;
  gap: 0.15rem;
}

.agent-insight-stat dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.agent-insight-stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.agent-insight-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--app-muted);
}

@media (max-width: 640px) {
  .agent-resumen-identity {
    flex-wrap: wrap;
  }

  .agent-resumen-config {
    width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

.agents-hub--detail-open .dash-greeting,
.agents-hub--detail-open .card-head,
.agents-hub--detail-open #agents-table-wrap,
.agents-hub--detail-open #agents-empty {
  display: none !important;
}

.agents-hub--detail-open .agent-detail-panel {
  margin-top: 0;
}

html[data-workspace-scope='client'] .btn-agent-back {
  display: none;
}

.agent-detail-panel--pending .agent-resumen-kpis,
.agent-detail-panel--pending .agent-resumen-dashboard,
.agent-detail-panel--pending .agent-resumen-config {
  display: none;
}

.agent-pending-detail-card {
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid #e8ecf4;
  border-radius: 14px;
  background: linear-gradient(165deg, #fafbff 0%, #fff 48%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.agent-pending-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.75rem;
}

.agent-pending-paid-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.agent-pending-detail-lead {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 52rem;
}

.agent-pending-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.agent-pending-fact {
  padding: 0.7rem 0.8rem;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fff;
}

.agent-pending-fact-label {
  display: block;
  margin-bottom: 0.2rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.agent-pending-fact-value {
  color: #12133a;
  font-size: 0.95rem;
  font-weight: 700;
}

.agent-pending-steps-wrap {
  margin-bottom: 1rem;
}

.agent-pending-steps-title {
  margin: 0 0 0.55rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
}

.agent-pending-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.agent-pending-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.45;
}

.agent-pending-steps li::before {
  content: '';
  flex: 0 0 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.42rem;
  border-radius: 50%;
  background: var(--brand, #0129e1);
  box-shadow: 0 0 0 3px rgba(1, 41, 225, 0.12);
}

.agent-pending-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.agent-pending-cta {
  width: auto;
  min-width: 12rem;
}

.agent-pending-change-type {
  padding-inline: 0.65rem;
}

.wizard-type-pending-notice {
  margin: 0 0 1rem;
  max-width: 52rem;
}

.pricing-card.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.pricing-card.is-locked .pricing-card-cta {
  opacity: 0.7;
}

.btn-link-inline {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand, #0129e1);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.btn-link-inline:hover {
  color: #001a9e;
}

@media (max-width: 560px) {
  .agent-pending-detail-facts {
    grid-template-columns: 1fr;
  }

  .agent-pending-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-pending-cta {
    width: 100%;
    min-width: 0;
  }
}

.platform-agent-panel {
  margin: 0;
  padding: 0;
  border: none;
}

.platform-agent-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.btn-agent-back {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

.platform-agent-panel-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.platform-agent-panel-title p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
}

.platform-agent-kpis {
  margin-bottom: 0.65rem;
}

.platform-agent-kpis .stat-card {
  padding: 0.5rem 0.65rem;
}

.platform-agent-kpis .stat-value {
  font-size: 1.1rem;
}

.platform-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

@media (max-width: 800px) {
  .platform-charts {
    grid-template-columns: 1fr;
  }
}

.platform-chart-card {
  padding: 0.75rem 0.85rem;
  margin: 0;
  box-shadow: var(--shadow-xs);
}

.platform-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.platform-chart-head h4 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.platform-chart-sub {
  font-size: 0.6875rem;
}

.platform-bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  height: 5.5rem;
  padding: 0.25rem 0 0;
}

.platform-bar-chart--green .bar-chart-bar,
.bar-chart-bar--green {
  background: var(--success);
  opacity: 0.85;
}

.platform-chart-empty {
  margin: 0;
  font-size: 0.8125rem;
  padding: 1.5rem 0;
  text-align: center;
}

.bar-chart-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 0.2rem;
}

.bar-chart-value {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
  min-height: 0.75rem;
}

.bar-chart-bar {
  width: 100%;
  max-width: 1.25rem;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--app-accent);
  transition: height 0.2s var(--ease);
}

.bar-chart-label {
  font-size: 0.5625rem;
  color: var(--text-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.platform-role-split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.platform-role-chip {
  font-size: 0.6875rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.platform-agent-recent {
  padding: 0;
  margin: 0;
}

.platform-activity-list {
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
}

/* ── Agent onboarding wizard ── */
html.agent-wizard-active,
html.agent-wizard-active body {
  height: 100%;
  overflow: hidden;
}

html.agent-wizard-active .app-layout {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

html.agent-wizard-active .main-column {
  min-height: 0;
  overflow: hidden;
}

html.agent-wizard-active .app-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0.75rem;
}

html.agent-wizard-active #view-agents {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.agent-wizard-active .agents-hub {
  display: none;
}

#view-agents:has(#view-client-form:not(.hidden)) .agents-hub {
  display: none;
}

html.agent-wizard-active .agent-wizard {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.agent-wizard-active .wizard-page-header {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

html.agent-wizard-active .wizard-page-header .dash-hello {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: 0.2rem;
}

html.agent-wizard-active .wizard-stepper {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

html.agent-wizard-active .wizard-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.agent-wizard-active .wizard-pane:not(.hidden) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.agent-wizard-active #wizard-step-type:not(.hidden) {
  overflow-x: hidden;
  overflow-y: auto;
  justify-content: stretch;
  align-items: stretch;
  padding: 0.5rem 0 1rem;
}

html.agent-wizard-active #wizard-step-sim-choice:not(.hidden) {
  overflow-x: hidden;
  overflow-y: auto;
  justify-content: stretch;
  align-items: stretch;
  padding: 0.25rem 0 1rem;
  width: 100%;
  max-width: none;
}

html.agent-wizard-active #wizard-step-type .pricing-cards {
  flex: 1;
  min-height: 0;
}

html.agent-wizard-active #wizard-step-contract:not(.hidden),
html.agent-wizard-active #wizard-step-checkout:not(.hidden),
html.agent-wizard-active #wizard-step-success:not(.hidden) {
  overflow-y: auto;
  justify-content: flex-start;
}

html.agent-wizard-active #wizard-step-addons:not(.hidden) {
  overflow: hidden;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
}

html.agent-wizard-active .wizard-setup {
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
  overflow: hidden;
}

html.agent-wizard-active .wizard-plan-strip {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
}

html.agent-wizard-active .wizard-modules-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.agent-wizard-active .wizard-modules-hint {
  flex-shrink: 0;
  padding-top: 0.45rem;
}

html.agent-wizard-active .wizard-modules-card .asc-features-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

html.agent-wizard-active .wizard-modules-foot {
  flex-shrink: 0;
}

html.agent-wizard-active .wizard-quote-card:not(.hidden) {
  flex-shrink: 0;
}

.agent-wizard {
  width: 100%;
}

.wizard-page-header {
  margin-bottom: 1.25rem;
}

.wizard-page-header .dash-greeting-meta {
  align-items: flex-end;
}

.wizard-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wizard-back-btn {
  font-weight: 600;
}

.wizard-stepper {
  margin-bottom: 1.25rem;
}

.wizard-progress {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.wizard-progress-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: calc(var(--app-radius) - 4px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--app-muted);
  transition: background 0.12s, color 0.12s;
}

.wizard-step-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #d4d4d4;
  flex-shrink: 0;
}

.wizard-progress-item.is-active {
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(91, 127, 212, 0.15);
}

.wizard-progress-item.is-active .wizard-step-dot {
  background: var(--app-accent);
  box-shadow: 0 0 0 2px var(--app-accent-soft);
}

.wizard-progress-item.is-done {
  color: var(--success);
}

.wizard-progress-item.is-done .wizard-step-dot {
  background: var(--success);
}

.wizard-body {
  padding: 0;
}

.wizard-setup {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-plan-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
}

.wizard-plan-hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  flex: 1;
  min-width: 12rem;
}

.wizard-modules-card {
  display: flex;
  flex-direction: column;
}

.wizard-modules-card .card-head {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  font-weight: 600;
}

.wizard-modules-hint {
  margin: 0;
  padding: 0.65rem 1.25rem 0;
  font-size: 0.8125rem;
  color: var(--app-muted);
  line-height: 1.45;
}

.wizard-modules-card .asc-features-scroll {
  max-height: min(65vh, 36rem);
  padding: 0.35rem 0;
}

.wizard-modules-card .asc-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-modules-card .asc-features-group {
  grid-column: 1 / -1;
  padding: 0.5rem 1rem 0.25rem;
}

.wizard-modules-card .asc-feature-row {
  border-bottom: none;
  border-top: 1px solid #f0f0f0;
}

.wizard-modules-foot {
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid #ececec;
  background: #fafafa;
  display: flex;
  justify-content: flex-end;
}

.wizard-quote-card {
  animation: wizard-in 0.22s var(--ease);
}

.wizard-quote-body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.wizard-quote-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.wizard-quote-stat {
  padding: 1rem 1.1rem;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
}

.wizard-quote-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-muted);
  margin-bottom: 0.35rem;
}

.wizard-quote-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.wizard-quote-detail {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.wizard-quote-actions {
  display: flex;
  justify-content: flex-end;
}

.wizard-pane {
  animation: wizard-in 0.2s var(--ease);
}

#wizard-step-contract,
#wizard-step-checkout,
#wizard-step-success {
  max-width: 42rem;
  margin: 0 auto;
}

#wizard-step-addons {
  max-width: none;
  margin: 0;
  width: 100%;
}

@media (min-width: 1100px) {
  .wizard-modules-card .asc-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .wizard-quote-stats {
    grid-template-columns: 1fr;
  }

  .wizard-modules-foot,
  .wizard-quote-actions {
    justify-content: stretch;
  }

  .wizard-modules-foot .btn-primary,
  .wizard-quote-actions .btn-primary {
    width: 100%;
  }
}

@keyframes wizard-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.wizard-flow-card {
  padding: 1.25rem 1.35rem;
}

.wizard-flow-card--success {
  text-align: center;
  max-width: 28rem;
  padding: 2rem 1.5rem;
}

.wizard-card-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.wizard-card-lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.wizard-summary {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.wizard-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.wizard-summary dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.wizard-summary dd {
  margin: 0;
  text-align: right;
}

.wizard-terms-box {
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.wizard-terms-box p {
  margin: 0 0 0.65rem;
}

.wizard-terms-box p:last-child {
  margin-bottom: 0;
}

.wizard-accept {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.wizard-accept input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.wizard-success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-stub {
  max-width: 26rem;
  margin: 0 auto;
  padding: 1.35rem;
}

.checkout-stub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.checkout-stub-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
}

.checkout-stub-powered {
  font-size: 0.6875rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.checkout-stub-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.checkout-stub-desc {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
}

.checkout-stub-fields .text-input {
  margin-bottom: 0.75rem;
}

.checkout-stub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.checkout-stub-note {
  font-size: 0.75rem;
  margin: 0.85rem 0 1rem;
  padding: 0.55rem 0.65rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

/* ── Setup calculator (native agency) ── */
.agency-setup-calc {
  margin: 0;
}

.asc-calc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.asc-intro-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
}

.asc-plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.asc-intro-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  flex: 1;
  min-width: 12rem;
}

.asc-mant-fixed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: var(--radius-md);
}

.asc-mant-fixed-label {
  font-size: 0.8125rem;
  color: var(--app-muted);
  font-weight: 500;
}

.asc-mant-fixed-value {
  font-size: 0.9375rem;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.asc-result-line--empty {
  font-style: italic;
  color: var(--app-muted);
}

.asc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 1.25rem;
  align-items: start;
}

.asc-features-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  overflow: hidden;
  background: #fff;
}

.asc-features-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #ececec;
  background: #fafafa;
}

.asc-section-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  font-weight: 600;
  margin: 0;
}

.asc-features-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--app-muted);
  line-height: 1.45;
}

.asc-features-scroll {
  flex: 1;
  min-height: 0;
  max-height: min(58vh, 32rem);
  overflow-y: auto;
  padding: 0.35rem 0;
}

.asc-features {
  display: flex;
  flex-direction: column;
}

.asc-features-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem 0.35rem;
  margin-top: 0.25rem;
}

.asc-features-group:first-child {
  margin-top: 0;
}

.asc-features-group-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  font-weight: 600;
}

.asc-features-group-meta {
  font-size: 0.6875rem;
  color: var(--text-soft);
}

.asc-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s;
}

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

.asc-feature-row:hover:not(.feature-row--disabled) {
  background: #fafafa;
}

.asc-feature-row.included.bundle-off {
  opacity: 0.55;
}

.asc-feature-row.row-on {
  background: rgba(91, 127, 212, 0.04);
}

.asc-feature-row.feature-row--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.asc-feature-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.asc-feat-check {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 4px;
  border: 1.5px solid #d0d0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  transition: border-color 0.12s, background 0.12s;
}

.asc-feature-row.row-on .asc-feat-check {
  background: var(--app-accent);
  border-color: var(--app-accent);
}

.asc-feat-check-inner {
  width: 0.35rem;
  height: 0.6rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  display: none;
}

.asc-feature-row.row-on .asc-feat-check-inner {
  display: block;
}

.asc-feat-text {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.asc-feat-name {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--app-text);
}

.asc-feat-badge {
  font-size: 0.625rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.asc-feat-badge.included-badge {
  background: var(--success-bg);
  color: var(--success);
}

.asc-feat-price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.asc-feature-row.row-on .asc-feat-price {
  color: var(--navy);
}

.asc-feature-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.asc-feat-qty {
  font-size: 0.6rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.asc-totals-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 1rem;
}

.asc-result-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--app-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.asc-result-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  max-height: 10rem;
  overflow-y: auto;
}

.asc-result-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--app-muted);
}

.asc-result-line span:last-child {
  font-weight: 600;
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.asc-mant-plan {
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: var(--radius-md);
}

.asc-mant-plan-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.asc-mant-plan-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8125rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  color: var(--app-text);
}

.asc-mant-plan-row:last-child {
  margin-bottom: 0;
}

.asc-result-divider {
  border: none;
  border-top: 1px solid #ececec;
  margin: 0.5rem 0;
}

.asc-result-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--app-muted);
}

.asc-result-row span:last-child {
  font-weight: 600;
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.asc-result-row--subtotal {
  font-weight: 600;
  color: var(--app-text);
}

.asc-result-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.asc-result-total-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--app-text);
}

.asc-tier-tag {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  margin-top: 0.35rem;
  font-weight: 600;
}

.asc-gross-line {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.asc-btn-pay {
  width: 100%;
}

.asc-footnote {
  margin: 0;
  font-size: 0.75rem;
  color: var(--app-muted);
  line-height: 1.45;
}

@media (max-width: 1099px) {
  .asc-grid {
    grid-template-columns: 1fr;
  }

  .asc-totals-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .wizard-modules-card .asc-features {
    grid-template-columns: 1fr;
  }

  .wizard-progress {
    width: 100%;
  }

  .wizard-progress-item {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
  }
}

.wizard-sim-choice-header {
  flex-shrink: 0;
  text-align: center;
  margin: 0 0 1.35rem;
  padding: 0 0.5rem;
}

.wizard-sim-choice-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text, #12133a);
}

.wizard-sim-choice-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
}

.sim-choice-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
  min-height: 0;
}

.sim-choice-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 1.65rem 1.5rem 1.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sim-choice-card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.sim-choice-card.is-selected {
  border-color: var(--brand, #0129e1);
  box-shadow: 0 0 0 2px rgba(1, 41, 225, 0.18), 0 14px 32px rgba(1, 41, 225, 0.12);
}

.sim-choice-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--brand, #0129e1);
}

.sim-choice-cards--chat {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-branch-header {
  margin: 2rem 0 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.06);
  border-radius: 0 8px 8px 0;
}

.setup-branch-header.hidden {
  display: none;
}

.setup-branch-header-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.setup-branch-label {
  margin: 0;
  font-size: 0.9rem;
}

.sim-choice-cards--voice-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.voice-chat-layout-wrap .sim-choice-card {
  padding: 1.15rem 1rem 1rem;
}

.voice-chat-layout-wrap .sim-choice-card-title {
  font-size: 0.95rem;
}

.sim-choice-card-pros-cons {
  flex: 1;
  margin-bottom: 0.85rem;
}

.sim-choice-card-pros-label,
.sim-choice-card-cons-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-choice-card-pros-label {
  color: #15803d;
}

.sim-choice-card-cons-label {
  margin-top: 0.65rem;
  color: #b45309;
}

.sim-choice-card-pros,
.sim-choice-card-cons {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sim-choice-card-pros li,
.sim-choice-card-cons li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.35rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #475569;
}

.sim-choice-card-pros li::before,
.sim-choice-card-cons li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.85rem;
  height: 0.85rem;
  background: center / contain no-repeat;
}

.sim-choice-card-pros li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.sim-choice-card-cons li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.voice-chat-layout-wrap .sim-choice-card-desc {
  margin-bottom: 0.75rem;
}

.sim-choice-card--twilio .sim-choice-card-icon,
.sim-choice-card--zadarma .sim-choice-card-icon,
.sim-choice-card--split .sim-choice-card-icon {
  background: #f0fdf4;
  color: #15803d;
}

.sim-choice-card--vodafone .sim-choice-card-icon {
  background: #fef2f2;
  color: #e60000;
}

.sim-choice-card-title {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.sim-choice-card-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748b;
}

.sim-choice-card-desc code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #f1f5f9;
}

.sim-choice-card-features {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  flex: 1;
}

.sim-choice-card-features li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #334155;
  border-top: 1px solid #eef2f7;
}

.sim-choice-card-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sim-choice-card-cta {
  display: block;
  margin-top: auto;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  color: var(--text, #12133a);
}

.sim-choice-card:hover .sim-choice-card-cta,
.sim-choice-card.is-selected .sim-choice-card-cta {
  background: var(--brand, #0129e1);
  border-color: var(--brand, #0129e1);
  color: #fff;
}

@media (max-width: 768px) {
  .sim-choice-cards,
  .sim-choice-cards--chat {
    grid-template-columns: 1fr;
  }
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
  font: inherit;
  color: inherit;
  min-height: min(520px, calc(100vh - 16rem));
  height: 100%;
}

.pricing-card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.pricing-card.is-selected {
  border-color: var(--brand, #0129e1);
  box-shadow: 0 0 0 2px rgba(1, 41, 225, 0.2), 0 14px 32px rgba(1, 41, 225, 0.12);
}

.pricing-card--featured {
  background: linear-gradient(165deg, #0a2fd4 0%, #0129e1 55%, #001a99 100%);
  border-color: #0129e1;
  color: #fff;
  box-shadow: 0 16px 40px rgba(1, 41, 225, 0.28);
}

.pricing-card--featured:hover {
  box-shadow: 0 20px 44px rgba(1, 41, 225, 0.34);
}

.pricing-card--featured.is-selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 20px 44px rgba(1, 41, 225, 0.38);
}

.pricing-card-badge--spacer {
  visibility: hidden;
  pointer-events: none;
}

.pricing-card-badge {
  display: inline-block;
  margin: 0 auto 0.75rem;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-card-head {
  padding: 2rem 1.5rem 1.25rem;
}

.pricing-card--featured .pricing-card-head {
  padding-top: 1.75rem;
}

.pricing-card-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pricing-card-amount {
  margin: 0;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.pricing-card--featured .pricing-card-amount {
  color: #fff;
}

.pricing-card-amount--text {
  font-size: 1.85rem;
  font-weight: 700;
}

.pricing-card-currency {
  font-size: 1.35rem;
  font-weight: 700;
  vertical-align: top;
  margin-right: 0.1rem;
}

.pricing-card-period {
  margin: 0.45rem 0 0.75rem;
  font-size: 0.82rem;
  color: #64748b;
}

.pricing-card--featured .pricing-card-period {
  color: rgba(255, 255, 255, 0.78);
}

.pricing-card-tagline {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #64748b;
}

.pricing-card--featured .pricing-card-tagline {
  color: rgba(255, 255, 255, 0.88);
}

.pricing-card-features {
  list-style: none;
  margin: 0;
  padding: 0 1.5rem;
  flex: 1;
  text-align: left;
}

.pricing-card-features li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.75rem;
  border-top: 1px solid #eef2f7;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #334155;
}

.pricing-card--featured .pricing-card-features li {
  border-top-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
}

.pricing-card-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #22c55e
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6l2.5 2.5 4.5-5'/%3E%3C/svg%3E")
    center / 0.65rem no-repeat;
}

.pricing-card-cta {
  display: block;
  margin: 1.25rem 1.5rem 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand, #0129e1);
  background: transparent;
  border: 1px solid transparent;
}

.pricing-card-cta--solid {
  background: #fff;
  color: var(--brand, #0129e1);
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.pricing-card:not(.pricing-card--featured) .pricing-card-cta {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.billing-summary-line {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.settings-billing-summary {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.badge.billing-active { background: #dcfce7; color: #166534; }
.badge.billing-review { background: #fef9c3; color: #854d0e; }
.badge.billing-suspended { background: #fee2e2; color: #991b1b; }
.badge.billing-cancelled { background: #f1f5f9; color: #475569; }
.badge.billing-pending { background: #e0e7ff; color: #3730a3; }

@media (max-width: 1200px) {
  .pricing-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pricing-cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pricing-card {
    min-height: auto;
    height: auto;
  }
}

.setup-section--info {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
}

.cf-hours-field .cf-hours-hint {
  margin: 0.25rem 0 0.75rem;
}

.cf-hours-widget.gestion-week-schedule {
  margin-top: 0.15rem;
}

.cf-hours-widget .gestion-week-table {
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .cf-hours-widget .gestion-week-head,
  .cf-hours-widget .gestion-week-row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
  }

  .cf-hours-widget .gestion-week-head span:last-child,
  .cf-hours-widget .gestion-week-breaks {
    grid-column: 1 / -1;
  }
}

.setup-section-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setup-step--voice-only.hidden {
  display: none !important;
}

.setup-step {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.setup-step--locked .setup-step-body {
  pointer-events: none;
  user-select: none;
}

.setup-step--locked .setup-step-body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.84) 100%
  );
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  pointer-events: auto;
  cursor: not-allowed;
}

.setup-step--locked .setup-step-body::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background-color: #fff;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.35),
    0 8px 24px rgba(15, 23, 42, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.35rem 1.35rem;
  pointer-events: none;
}

.setup-step--done {
  border-color: #bbf7d0;
}

.setup-step-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}

.setup-step-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--brand, #0129e1);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.setup-step--locked .setup-step-num {
  background: #94a3b8;
}

.setup-step--done .setup-step-num {
  background: #16a34a;
}

.setup-step-heading {
  flex: 1;
  min-width: 0;
}

.setup-step-title {
  margin: 0;
  font-size: 1rem;
}

.setup-step-sub {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
}

.setup-step-status {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.setup-step-status--active {
  background: #dbeafe;
  color: #1d4ed8;
}

.setup-step-status--pending {
  background: #f1f5f9;
  color: #64748b;
}

.setup-step-status--done {
  background: #dcfce7;
  color: #166534;
}

.setup-step-body {
  position: relative;
  padding: 1.15rem 1.25rem 1.25rem;
}

.setup-step--locked .setup-step-body > * {
  filter: blur(3px);
}

.setup-step-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 1.25rem;
  align-items: start;
}

.setup-instructions {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
}

.setup-instructions li + li {
  margin-top: 0.45rem;
}

.setup-instructions a {
  color: var(--brand, #0129e1);
}

.setup-step-save {
  margin-top: 0.85rem;
}

.setup-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
}

.setup-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.setup-webhook-list {
  margin: 1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid #eef2f7;
}

.setup-webhook-label {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.setup-webhook-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}

.setup-webhook-row + .setup-webhook-row {
  margin-top: 0.75rem;
}

.setup-webhook-row .field-label {
  margin-bottom: 0;
}

.setup-webhook-copy {
  display: flex;
  align-items: stretch;
  min-height: 2.625rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  background: #f8fafc;
  overflow: hidden;
}

.setup-webhook-copy .text-input {
  flex: 1;
  min-width: 0;
  width: auto;
  height: auto;
  min-height: 0;
  margin-bottom: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.76rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  line-height: 1.25;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.setup-webhook-copy .text-input:focus {
  outline: none;
  box-shadow: none;
}

.setup-webhook-copy .btn-copy-webhook {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 5rem;
  margin: 0;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: none;
  border-left: 1px solid var(--border, #e2e8f0);
  border-radius: 0;
  background: #fff;
  color: var(--brand, #0129e1);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.setup-webhook-copy .btn-copy-webhook:hover {
  background: #f1f5f9;
}

.setup-step-notice {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #78350f;
}

.setup-step-notice strong {
  color: #92400e;
}

.setup-call-question {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #12133a);
}

.setup-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.setup-choice-btn {
  flex: 1 1 10rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: var(--text, #12133a);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.setup-choice-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.setup-choice-btn.is-selected {
  border-color: var(--brand, #0129e1);
  background: rgba(1, 41, 225, 0.06);
  color: var(--brand, #0129e1);
}

.setup-call-path {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fafbfd;
}

.setup-call-path-lead {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #475569;
}

.setup-inline-num {
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--brand, #0129e1);
}

.setup-subnet-block {
  margin-top: 0.85rem;
}

.setup-subnet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setup-subnet-list li {
  margin: 0;
}

.setup-subnet-copy {
  min-height: 2.25rem;
}

.setup-subnet-copy .text-input {
  flex: 0 1 auto;
  width: auto;
  min-width: 7.5rem;
}

.setup-subnet-cidr {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.15rem 0 0.1rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  user-select: none;
}

.setup-subnet-copy .btn-copy-webhook {
  margin-left: auto;
}

.setup-subnet-note {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .setup-step-split {
    grid-template-columns: 1fr;
  }

  .setup-step-media-col {
    order: -1;
  }
}

/* —— Onboarding gestión (platform parity, agency styling) —— */
.onboarding-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.35rem;
}

.share-agent-existing-wrap {
  margin-bottom: 1rem;
}

.share-agent-existing-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.share-agent-existing-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.onboarding-row-actions .btn-link {
  padding: 0.35rem 0.55rem;
}

.onboarding-row.is-selected td {
  background: #eef2ff;
}

.onboarding-hub.onboarding-hub--detail > .onboarding-hub-intro {
  display: none;
}

.share-hub.share-hub--detail > .share-hub-intro {
  display: none;
}

.share-detail-head {
  margin: 0 0 1.25rem;
}

.onboarding-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 -0.15rem;
}

.onboarding-detail-head {
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.onboarding-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.onboarding-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem 0.45rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: var(--app-muted, #64748b);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.onboarding-detail-back:hover {
  color: var(--app-text, #334155);
  border-color: #cbd5e1;
  background: #f8fafc;
}

.onboarding-detail-save {
  flex-shrink: 0;
  min-width: 8.5rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.onboarding-detail-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8faff 0%, #fff 55%, #fafbff 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.onboarding-detail-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #0129e1 0%, #2f5bff 100%);
  color: #fff;
  font-family: var(--font-display, var(--font-sans));
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(1, 41, 225, 0.22);
}

.onboarding-detail-copy {
  min-width: 0;
}

.onboarding-detail-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand, #0129e1);
}

.onboarding-detail-name {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--app-text, #12133a);
  letter-spacing: -0.02em;
}

.onboarding-detail-meta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--app-muted, #64748b);
}

.onboarding-detail-layout {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  min-width: 0;
}

.onboarding-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: 1rem;
  padding: 0.35rem;
  border: 1px solid #e8ecf4;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.onboarding-detail-nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--app-muted, #64748b);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.onboarding-detail-nav-item svg {
  flex-shrink: 0;
  opacity: 0.72;
}

.onboarding-detail-nav-item:hover {
  color: var(--app-text, #334155);
  background: #f8fafc;
}

.onboarding-detail-nav-item.is-active {
  background: var(--app-accent-soft, rgba(91, 127, 212, 0.12));
  color: #0129e1;
}

.onboarding-detail-nav-item.is-active svg {
  opacity: 1;
}

.onboarding-detail-main {
  min-width: 0;
}

.onboarding-share-card {
  max-width: 36rem;
  padding: 1.25rem 1.35rem;
}

.onboarding-share-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.onboarding-share-lead {
  margin: 0 0 1rem;
  line-height: 1.5;
}

.onboarding-share-actions {
  margin-top: 1rem;
}

.onboarding-detail-tabs {
  display: flex;
  gap: 0;
  width: 100%;
  margin: 0 0 1rem;
  border-bottom: 2px solid #e8ecf4;
}

.onboarding-detail-tab {
  flex: 1 1 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.72rem 1rem;
  margin-bottom: -2px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--app-muted, #64748b);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.onboarding-detail-tab:hover {
  color: var(--app-text, #334155);
}

.onboarding-detail-tab.is-active {
  color: var(--brand, #0129e1);
  border-bottom-color: var(--brand, #0129e1);
}

.onboarding-detail-body {
  padding-top: 0.15rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
}

.onboarding-addons-root {
  display: grid;
  gap: 1rem;
}

.addons-summary {
  padding: 1rem 1.1rem;
}

.addons-summary-lead {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--app-text, #334155);
}

.addons-summary-meta {
  margin: 0;
  font-size: 0.84rem;
}

.addons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

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

.addon-card {
  padding: 0.9rem 1rem;
  box-shadow: none !important;
}

.addon-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.addon-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--app-text, #12133a);
  line-height: 1.35;
}

.addon-card-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.addon-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.addon-status--active {
  background: #dcfce7;
  color: #166534;
}

.addon-status--included {
  background: #dbeafe;
  color: #1d4ed8;
}

.addon-status--off {
  background: #f1f5f9;
  color: #64748b;
}

.addons-foot {
  padding: 0.9rem 1rem;
  box-shadow: none !important;
}

.addons-foot p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.addons-foot a {
  color: var(--brand, #0129e1);
  font-weight: 600;
}

/* Wizard add-ons step — full width grid */
.wizard-addons-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.wizard-addons-head {
  flex-shrink: 0;
}

.wizard-addons-head .wizard-card-lead {
  margin-bottom: 0;
}

.wizard-addons-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  align-items: start;
  padding: 0.15rem 0.1rem 0.25rem;
  -webkit-overflow-scrolling: touch;
}

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

@media (min-width: 1200px) {
  .wizard-addons-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wizard-addons-foot {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 0.75rem 1.1rem;
  margin-top: 0.15rem;
  border-top: 1px solid #ececec;
  box-shadow: none;
}

.wizard-addons-foot .wizard-addons-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
  margin: 0;
  min-width: 0;
}

.wizard-addons-foot .wizard-addons-totals > div {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  justify-content: flex-start;
  border-bottom: none;
  padding: 0;
  font-size: 0.84rem;
  white-space: nowrap;
}

.wizard-addons-foot .wizard-addons-totals > div:last-child {
  padding-left: 1rem;
  margin-left: 0.15rem;
  border-left: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.wizard-addons-foot .wizard-addons-totals > div:last-child dt {
  font-weight: 600;
  color: var(--app-text, #12133a);
}

.wizard-addons-foot .wizard-addons-totals > div:last-child dd {
  font-weight: 700;
  color: var(--brand, #0129e1);
}

.wizard-addons-foot .wizard-addons-totals dt {
  margin: 0;
}

.wizard-addons-foot .wizard-addons-totals dd {
  margin: 0;
  font-weight: 600;
  color: var(--app-text, #334155);
}

.wizard-addons-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .wizard-addons-foot {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .wizard-addons-foot .wizard-addons-totals {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .wizard-addons-foot .wizard-addons-totals > div:last-child {
    width: 100%;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
    padding-top: 0.45rem;
    margin-top: 0.15rem;
    border-top: 1px solid #ececec;
  }

  .wizard-addons-actions {
    width: 100%;
  }

  .wizard-addons-actions .btn-primary {
    flex: 1;
  }
}

.wizard-addon-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem 0.65rem;
  align-items: start;
  width: 100%;
  min-height: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wizard-addon-row--calendar {
  grid-template-columns: minmax(0, 1fr) 8.5rem 6.25rem;
  align-items: center;
  cursor: default;
  min-height: 5.75rem;
}

.wizard-addon-row--calendar .wizard-addon-copy {
  min-width: 0;
}

.wizard-addon-row--calendar .wizard-addon-hint {
  display: block;
  min-height: 1.25rem;
  line-height: 1.35;
}

.wizard-addon-row--calendar .wizard-addon-price {
  justify-self: end;
  min-width: 6.25rem;
  width: 6.25rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wizard-addon-row--calendar .wizard-addon-price-amount.is-zero {
  color: var(--app-muted, #94a3b8);
}

.wizard-addon-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-shrink: 0;
  width: 8.5rem;
  min-width: 8.5rem;
}

.qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  color: var(--app-text, #334155);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.qty-btn:hover:not(:disabled) {
  border-color: var(--brand, #0129e1);
  background: #f5f8ff;
}

.qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wizard-addon-qty-input {
  width: 2.75rem;
  padding: 0.4rem 0.25rem;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.wizard-addon-qty-input::-webkit-outer-spin-button,
.wizard-addon-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hub-addons-list {
  margin-bottom: 0.35rem;
}

.hub-addons-foot {
  margin-top: 0;
}

.wizard-addon-row:hover:not(.is-disabled) {
  border-color: #cbd5e1;
  background: #fff;
}

.wizard-addon-row.is-selected {
  border-color: rgba(1, 41, 225, 0.35);
  background: #f5f8ff;
}

.wizard-addon-row.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wizard-addon-check {
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--brand, #0129e1);
}

.wizard-addon-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.wizard-addon-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-text, #12133a);
  line-height: 1.35;
}

.wizard-addon-desc,
.wizard-addon-hint {
  font-size: 0.8rem;
  line-height: 1.45;
}

.wizard-addon-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand, #0129e1);
  white-space: nowrap;
  padding-top: 0.1rem;
}

.wizard-addon-price-unit {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--app-muted, #64748b);
}

.wizard-pane--addons .wizard-card-title {
  font-size: 1.2rem;
}

.checkout-stub-breakdown {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.84rem;
}

.checkout-stub-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0;
}

.checkout-stub-breakdown .checkout-breakdown-total {
  margin-top: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid #e2e8f0;
  font-weight: 600;
}

.onboarding-gestion-root {
  min-height: 4rem;
  padding-bottom: 1.5rem;
}

.gestion-loading {
  padding: 1.5rem;
  color: var(--app-muted, #64748b);
  font-size: 0.9rem;
  text-align: center;
}

.btn-sm {
  padding: 0.38rem 0.7rem;
  font-size: 0.8rem;
  line-height: 1.2;
  border-radius: 8px;
}

/* Gestion onboarding — vertical expandable sections */
.gestion-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
}

.gestion-accordion-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gestion-accordion-item.is-expanded {
  border-color: rgba(1, 41, 225, 0.28);
  box-shadow: 0 4px 18px rgba(1, 41, 225, 0.08);
}

.gestion-accordion-trigger {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: none;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  flex-shrink: 0;
}

.gestion-accordion-item.is-expanded .gestion-accordion-trigger {
  border-bottom: 1px solid #eef2f7;
}

.gestion-accordion-trigger:hover {
  background: #f1f5f9;
}

.gestion-accordion-trigger::after {
  content: '';
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  margin-left: auto;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.gestion-accordion-item.is-expanded .gestion-accordion-trigger::after {
  transform: rotate(-135deg);
  margin-top: 0.55rem;
}

.gestion-accordion-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--brand, #0129e1);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.gestion-accordion-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.gestion-accordion-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
  line-height: 1.25;
}

.gestion-accordion-item:not(.is-expanded) .gestion-accordion-title {
  font-size: 0.82rem;
}

.gestion-accordion-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--app-muted, #64748b);
}

.gestion-accordion-item:not(.is-expanded) .gestion-accordion-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gestion-accordion-panel {
  display: none;
  padding: 0.9rem 0.95rem 1rem;
}

.gestion-accordion-item.is-expanded .gestion-accordion-panel {
  display: block;
}

.onboarding-gestion-root .gestion-accordion-panel .text-input,
.onboarding-gestion-root .gestion-accordion-panel select.text-input,
.onboarding-gestion-root .gestion-accordion-panel textarea.text-input,
.onboarding-gestion-root .gestion-section .text-input,
.onboarding-gestion-root .gestion-section select.text-input,
.onboarding-gestion-root .gestion-section textarea.text-input {
  margin-bottom: 0;
}

.onboarding-gestion-root .gestion-field {
  margin-bottom: 0.9rem;
}

.onboarding-gestion-root .gestion-field:last-child {
  margin-bottom: 0;
}

.onboarding-gestion-root .gestion-field-hint,
.onboarding-gestion-root .gestion-hours-intro,
.onboarding-gestion-root .gestion-accordion-panel > .hint,
.onboarding-gestion-root .gestion-section > .hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.gestion-lead {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.gestion-section-divider {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ececec;
}

.gestion-section-divider .gestion-field {
  margin-top: 0.65rem;
}

/* Horario — one row per day (hours + breaks aligned) */
.gestion-week-schedule {
  display: grid;
  gap: 0.75rem;
}

.gestion-week-schedule > .gestion-hours-intro {
  margin: 0;
}

.gestion-week-table {
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.gestion-week-head,
.gestion-week-row {
  display: grid;
  grid-template-columns: 5.75rem minmax(12rem, 1fr) minmax(13rem, 1.15fr);
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
}

.gestion-week-head {
  background: #f6f7f9;
  border-bottom: 1px solid #e8ecf4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted, #64748b);
}

.gestion-week-row {
  border-bottom: 1px solid #f1f5f9;
  align-items: start;
  min-height: 3.35rem;
}

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

.gestion-week-day-name {
  padding-top: 0.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--app-text, #334155);
}

.gestion-week-hours {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  align-items: center;
}

.gestion-closed-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--app-muted, #64748b);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.gestion-closed-check input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--brand, #0129e1);
}

.gestion-hours-times {
  display: grid;
  grid-template-columns: minmax(6.5rem, 1fr) auto minmax(6.5rem, 1fr);
  align-items: center;
  gap: 0.4rem;
  max-width: 17rem;
}

.gestion-hours-times.is-hidden {
  display: none;
}

.gestion-hours-closed-note {
  margin: 0;
  grid-column: 2;
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
}

.gestion-hours-times .text-input,
.gestion-break-row .text-input {
  width: 100%;
  min-width: 0;
  padding: 0.48rem 0.55rem;
  font-size: 0.84rem;
}

.gestion-break-sep {
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}

.gestion-week-breaks {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.gestion-week-breaks-toolbar {
  display: flex;
  justify-content: flex-end;
}

.gestion-breaks-rows {
  display: grid;
  gap: 0.4rem;
}

.gestion-breaks-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.gestion-break-row {
  display: grid;
  grid-template-columns: minmax(5.75rem, 1fr) auto minmax(5.75rem, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  max-width: 20rem;
}

.gestion-break-row .gestion-remove-break {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
}

/* Dynamic lists */
.gestion-topic-row,
.gestion-faq-row,
.gestion-asset-row {
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fafbfc;
}

.gestion-topic-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gestion-topic-row .text-input {
  flex: 1 1 auto;
  min-width: 0;
}

.gestion-faq-list {
  width: 100%;
}

.gestion-faq-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.gestion-faq-row-head {
  display: flex;
  justify-content: flex-end;
}

.gestion-faq-row .gestion-faq-q,
.gestion-faq-row .gestion-faq-a {
  width: 100%;
}

.gestion-faq-row .gestion-faq-a {
  min-height: 4.5rem;
  resize: vertical;
}

.gestion-asset-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 720px) {
  .gestion-asset-row {
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
  }
}

.gestion-asset-row .gestion-remove-asset {
  justify-self: start;
}

.onboarding-gestion-root .gestion-accordion-panel .btn-secondary,
.onboarding-gestion-root .gestion-accordion-panel .btn-ghost,
.onboarding-gestion-root .gestion-section .btn-secondary,
.onboarding-gestion-root .gestion-section .btn-ghost {
  margin-top: 0.35rem;
}

/* Servicios table */
.gestion-services-table .text-input {
  margin: 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.875rem;
}

.gestion-services-table td {
  vertical-align: middle;
}

.gestion-services-table td:last-child {
  width: 5.5rem;
  white-space: nowrap;
}

.gestion-services-table .gestion-svc-name-col,
.gestion-services-table .gestion-svc-name-cell {
  width: 42%;
  min-width: 14rem;
}

.gestion-services-table .gestion-svc-name-cell {
  vertical-align: top;
}

.gestion-services-table .gestion-svc-name-cell .gestion-svc-nombre {
  width: 100%;
}

.gestion-services-table .gestion-svc-desc-wrap {
  margin-top: 0.45rem;
}

.gestion-services-table .gestion-svc-desc {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}

/* Calendarios */
.gestion-callout {
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  background: #f5f8ff !important;
  border-color: #dbeafe !important;
  box-shadow: none !important;
}

.gestion-sa-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.gestion-sa-email {
  flex: 1 1 12rem;
  font-size: 0.78rem;
  word-break: break-all;
}

.gestion-cal-row {
  padding: 0.85rem 0.9rem !important;
  margin-bottom: 0.65rem;
  background: #f8fafc !important;
  border: 1px solid #ececec !important;
  box-shadow: none !important;
}

.gestion-cal-active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--app-text, #334155);
}

.gestion-scheduling-radios {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.gestion-scheduling-legend {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-text, #334155);
  margin-bottom: 0.55rem;
}

.gestion-scheduling-radio-grid {
  display: grid;
  gap: 0.45rem;
}

.gestion-scheduling-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--app-text, #334155);
  cursor: pointer;
}

.gestion-scheduling-radio input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.gestion-cal-single-wrap {
  padding: 0.85rem 0.9rem !important;
  margin-bottom: 0.65rem;
  background: #f8fafc !important;
  border: 1px solid #ececec !important;
  box-shadow: none !important;
}

.gestion-capacity-wrap {
  margin-bottom: 0.85rem;
}

.gestion-cal-multi-wrap {
  margin-top: 0.25rem;
}

.gestion-scheduling-hint {
  margin-bottom: 0.65rem;
}

.gestion-subsection-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-text, #334155);
}

.gestion-escalation-row {
  padding: 0.9rem 1rem !important;
  margin-bottom: 0.75rem;
  background: #f8fafc !important;
  border: 1px solid #ececec !important;
  box-shadow: none !important;
}

.gestion-escalation-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8ecf4;
}

.gestion-escalation-body {
  display: grid;
  gap: 0.85rem;
}

.gestion-escalation-block--prefs {
  padding: 0.75rem 0.8rem;
  border: 1px solid #e8ecf4;
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 0.75rem;
}

.gestion-escalation-block-title {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--app-text, #334155);
}

.gestion-escalation-block-hint {
  margin: 0.4rem 0 0;
}

.gestion-escalation-contact-grid {
  margin-top: -0.15rem;
}

.gestion-escalation-row .gestion-field {
  margin-bottom: 0.75rem;
}

.gestion-escalation-row .gestion-field:last-child {
  margin-bottom: 0;
}

.gestion-escalation-notify-radios {
  margin: 0;
  padding: 0;
  border: 0;
}

.gestion-escalation-notify-radios .gestion-escalation-block-title {
  margin-bottom: 0.55rem;
}

.gestion-escalation-notify-radio-grid {
  display: grid;
  gap: 0.4rem;
}

.gestion-escalation-notify-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--app-text, #334155);
  cursor: pointer;
}

.gestion-escalation-notify-radio input {
  margin-top: 0.18rem;
  flex-shrink: 0;
}

.gestion-escalation-notify-radio-copy {
  display: grid;
  gap: 0.1rem;
}

.gestion-escalation-notify-radio-label {
  font-weight: 600;
}

.gestion-escalation-notify-radio-hint {
  font-size: 0.78rem;
  color: var(--app-muted, #64748b);
  font-weight: 400;
}

.gestion-escalation-share-block {
  padding-top: 0.15rem;
  border-top: 1px solid #f1f5f9;
}

.gestion-escalation-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.gestion-escalation-block--availability {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ececec;
}

.gestion-escalation-availability-modes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.gestion-escalation-avail-opt {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--app-text, #334155);
  cursor: pointer;
}

.gestion-escalation-avail-opt input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.gestion-escalation-calendar-pick {
  margin-top: 0.65rem;
}

.gestion-escalation-custom-hours-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--app-border, #e2e8f0);
}

.gestion-escalation-hours-wrap {
  margin-top: 0.75rem;
}

.gestion-escalation-hours-hint {
  margin: 0 0 0.65rem;
}

.gestion-escalation-week-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gestion-gcal-sa-callout {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 0.95rem;
  font-size: 0.86rem;
}

.gestion-gcal-sa-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--app-text, #334155);
}

.gestion-gcal-sa-intro {
  margin: 0 0 0.6rem;
  line-height: 1.45;
  color: var(--app-text-muted, #64748b);
}

.gestion-escalation-gcal-callout {
  margin-bottom: 0.75rem;
}

.gestion-week-schedule--compact .gestion-week-table {
  font-size: 0.84rem;
}

.gestion-week-schedule--compact .gestion-week-head,
.gestion-week-schedule--compact .gestion-week-row {
  grid-template-columns: 4.5rem minmax(10rem, 1fr) minmax(11rem, 1fr);
  padding: 0.5rem 0.65rem;
  gap: 0.5rem 0.65rem;
}

.gestion-escalation-share-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--app-text, #334155);
  cursor: pointer;
}

.gestion-escalation-share-opt input {
  margin: 0;
  flex-shrink: 0;
}

#gestion-add-escalation {
  margin-bottom: 0.85rem;
}

.gestion-reminder-row {
  padding: 0.85rem 0.9rem !important;
  margin-bottom: 0.65rem;
  background: #f8fafc !important;
  border: 1px solid #ececec !important;
  box-shadow: none !important;
}

.gestion-reminder-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

#gestion-add-reminder {
  margin-top: 0.35rem;
}

.gestion-cal-services {
  display: grid;
  gap: 0.5rem;
}

.gestion-cal-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gestion-cal-service-tags:empty {
  display: none;
}

.gestion-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  max-width: 100%;
  padding: 0.3rem 0.4rem 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--app-text, #334155);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.3;
}

.gestion-service-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.gestion-service-chip-remove:hover {
  color: #475569;
  background: #f1f5f9;
}

.onboarding-gestion-root .gestion-cal-services .gestion-cal-service-add {
  width: 100%;
  margin-bottom: 0;
}

.gestion-cal-services-empty {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.gestion-scheduling-radio-item {
  display: grid;
  gap: 0.35rem;
}

.gestion-scheduling-radio-copy {
  display: inline;
  line-height: 1.35;
}

.gestion-scheduling-radio-label {
  display: inline;
}

.gestion-scheduling-radio .gestion-info-btn {
  display: inline-flex;
  vertical-align: middle;
  margin: -0.05rem 0 0 0.2rem;
}

.gestion-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gestion-info-btn:hover,
.gestion-info-btn[aria-expanded='true'] {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--brand, #0129e1);
}

.gestion-info-btn:focus-visible {
  outline: 2px solid var(--brand, #0129e1);
  outline-offset: 2px;
}

.gestion-scheduling-radio-item .gestion-info-panel {
  margin: 0 0 0 1.65rem;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
}

.gestion-info-panel p {
  margin: 0;
}

.gestion-info-panel p + p {
  margin-top: 0.45rem;
}

.gestion-support-box {
  padding: 1rem 1.05rem;
  background: #f8fafc !important;
  border-color: #ececec !important;
  box-shadow: none !important;
}

.gestion-tutorial-links {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.gestion-tutorial-links a {
  color: var(--brand, #0129e1);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.gestion-tutorial-links a:hover {
  text-decoration: underline;
}

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

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

.gestion-agent-lang-block {
  margin-bottom: 1rem;
}

.gestion-agent-lang-hint {
  margin: 0.35rem 0 0.75rem;
}

.gestion-agent-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem 0.85rem;
}

.gestion-agent-lang-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.gestion-agent-language-default {
  max-width: 22rem;
}

.gestion-agent-voices-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
}

.gestion-agent-voices-block .gestion-toggle-row {
  margin-bottom: 0.5rem;
}

.gestion-agent-voice-fields-wrap {
  margin-top: 0.75rem;
}

.gestion-agent-voice-fields-wrap.hidden {
  display: none;
}

.gestion-agent-voice-rows {
  display: grid;
  gap: 0.85rem;
  max-width: 36rem;
}

.gestion-agent-voice-label {
  margin-bottom: 0.35rem;
}

.gestion-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
}

.gestion-section-save-status {
  margin: 0;
  font-size: 0.85rem;
}

.gestion-section-save-status.form-err.is-visible {
  color: var(--app-danger, #b91c1c);
}

/* Toggles */
.gestion-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.gestion-toggle-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.gestion-toggle-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-text, #334155);
}

.gestion-toggle-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

label.toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 0.1rem;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  display: block;
  width: 2.5rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
  position: relative;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease;
}

.toggle-input:checked + .toggle-track {
  background: var(--brand, #0129e1);
}

.toggle-input:checked + .toggle-track::after {
  transform: translateX(1.15rem);
}

.toggle-input:focus-visible + .toggle-track {
  outline: 2px solid rgba(1, 41, 225, 0.35);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .gestion-week-head,
  .gestion-week-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem 0.8rem;
  }

  .gestion-week-head {
    display: none;
  }

  .gestion-week-hours {
    grid-template-columns: 1fr;
  }

  .gestion-hours-times,
  .gestion-break-row {
    max-width: none;
  }

  .gestion-hours-closed-note {
    grid-column: 1;
  }

  .gestion-week-breaks-toolbar {
    justify-content: flex-start;
  }

  .onboarding-detail-topbar {
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
  }

  .onboarding-detail-back span {
    display: none;
  }

  .onboarding-detail-back {
    padding: 0.5rem;
    border-radius: 10px;
  }

  .onboarding-detail-save {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
  }

  .onboarding-detail-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .onboarding-detail-name {
    font-size: 1.15rem;
  }

  .onboarding-detail-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .onboarding-detail-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .onboarding-detail-nav-item {
    width: auto;
    flex: 1 1 calc(50% - 0.2rem);
    justify-content: center;
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
  }

  .onboarding-detail-nav-item span {
    white-space: nowrap;
  }
}

/* ── Settings: agency white-label (Estilo tab) ───────────────── */
.settings-shell[data-active-settings-tab='styling'] .settings-overview {
  display: none;
}

.settings-shell[data-active-settings-tab='styling'] .settings-shell-head {
  margin-bottom: 0.5rem;
}

.settings-shell[data-active-settings-tab='styling'] .settings-shell-head h1 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.settings-shell[data-active-settings-tab='styling'] .settings-shell-head > .muted {
  display: none;
}

.settings-shell[data-active-settings-tab='styling'] .settings-workspace {
  min-height: calc(100dvh - 7.5rem);
  display: flex;
  flex-direction: column;
}

.settings-shell[data-active-settings-tab='styling'] .settings-panels {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.settings-shell[data-active-settings-tab='styling'] .branding-studio {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.branding-studio {
  padding: 0.65rem 1.15rem 1rem;
}

.branding-studio-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  margin-bottom: 0.85rem;
}

.branding-studio-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.settings-styling-readonly {
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.settings-styling-message,
.branding-studio-status {
  min-height: 0;
  margin: 0;
  font-size: 0.75rem;
  flex: 1 1 auto;
  text-align: right;
}

.settings-styling-message.is-error {
  color: var(--danger);
}

.settings-styling-message.is-success {
  color: var(--success);
}

.branding-studio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
  flex: 1;
  min-height: 11.5rem;
}

.branding-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  padding: 0.9rem 1rem 1rem;
  min-height: 11.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.branding-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--app-text);
}

.branding-card-head .muted {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}

.branding-card-body {
  margin-top: 0.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.branding-logo-only {
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.branding-shape-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.15rem;
}

.branding-shape-block .field-label {
  font-size: 0.75rem;
  margin: 0;
}

.branding-brand-fields {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.1rem;
}

.branding-brand-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.branding-brand-field .field-label {
  font-size: 0.75rem;
  margin: 0;
}

.branding-brand-field .text-input--compact {
  min-height: 2.35rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
}

.branding-border-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.branding-border-field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.branding-border-field-stack .field-label {
  font-size: 0.75rem;
  margin: 0;
}

.branding-border-field-stack--color {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.branding-logo-preview-wrap {
  width: 6.75rem;
  height: 6.75rem;
  max-width: 100%;
  margin: 0;
  border: 1.5px dashed var(--border-strong);
  border-radius: 0.85rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.branding-logo-preview-wrap.has-logo-preview {
  border: none;
  padding: 0;
  box-shadow: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match clip to logo shape — default square; avoids chopping square border corners */
  border-radius: 0;
  overflow: hidden;
}

.branding-logo-preview-wrap.has-logo-preview[data-logo-shape='square'] {
  border-radius: 0;
}

.branding-logo-preview-wrap.has-logo-preview[data-logo-shape='rounded'] {
  border-radius: 1rem;
}

.branding-logo-preview-wrap.has-logo-preview[data-logo-shape='circle'] {
  border-radius: 50%;
}

.branding-logo-preview-wrap.has-logo-preview.has-logo-border {
  overflow: visible;
}

.branding-logo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
  box-sizing: border-box;
  flex-shrink: 0;
}

.logo-frame-border-wrap {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: block;
}

.branding-logo-frame.logo-frame-bordered.logo-frame-border-solid .logo-frame-border-wrap,
.sidebar-logo-frame.logo-frame-bordered.logo-frame-border-solid .logo-frame-border-wrap {
  padding: var(--logo-border-width);
  background: var(--logo-border-color);
}

.logo-frame-clip {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

.branding-logo-frame.logo-radius-square .logo-frame-border-wrap,
.branding-logo-frame.logo-radius-square .logo-frame-clip {
  border-radius: 0;
}

.branding-logo-frame.logo-radius-rounded .logo-frame-border-wrap {
  border-radius: 1rem;
}

.branding-logo-frame.logo-radius-rounded .logo-frame-clip {
  border-radius: calc(1rem - var(--logo-border-width, 0px));
}

.branding-logo-frame.logo-radius-circle .logo-frame-border-wrap,
.branding-logo-frame.logo-radius-circle .logo-frame-clip {
  border-radius: 50%;
}

.sidebar-logo-frame.logo-radius-square .logo-frame-border-wrap,
.sidebar-logo-frame.logo-radius-square .logo-frame-clip {
  border-radius: 0;
}

.sidebar-logo-frame.logo-radius-rounded .logo-frame-border-wrap {
  border-radius: 0.65rem;
}

.sidebar-logo-frame.logo-radius-rounded .logo-frame-clip {
  border-radius: calc(0.65rem - var(--logo-border-width, 0px));
}

.sidebar-logo-frame.logo-radius-circle .logo-frame-border-wrap,
.sidebar-logo-frame.logo-radius-circle .logo-frame-clip {
  border-radius: 50%;
}

.logo-frame-border-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.logo-frame-border-ring .logo-frame-border-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.branding-logo-frame .branding-logo-preview,
.sidebar-logo-frame .sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.branding-logo-preview-wrap:hover:not(.is-disabled):not(.has-logo-preview) {
  border-color: var(--app-accent);
  background: var(--app-accent-soft);
}

.branding-logo-preview-wrap.has-logo-preview:hover:not(.is-disabled) {
  background: #fff;
}

.branding-logo-preview-wrap:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.branding-logo-preview-wrap.is-dragover {
  border-color: var(--app-accent);
  background: var(--app-accent-soft);
  box-shadow: 0 0 0 3px rgba(91, 127, 212, 0.16);
}

.branding-logo-preview-wrap.is-disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.branding-logo-preview {
  pointer-events: none;
}

.branding-logo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  pointer-events: none;
  user-select: none;
}

.branding-logo-empty-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.branding-logo-empty-icon {
  display: flex;
  color: var(--app-accent);
  opacity: 0.85;
}

.branding-logo-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 0.2rem;
}

.branding-logo-actions--row {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: auto;
  gap: 0.35rem;
}

.branding-logo-actions--row .btn-compact {
  width: auto;
}

.branding-logo-actions .btn-compact {
  width: 100%;
  justify-content: center;
}

.branding-border-width-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.branding-border-range {
  flex: 1;
  min-width: 0;
  accent-color: var(--app-accent);
}

.branding-border-width-out {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.branding-border-color {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.branding-border-style {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
}

.branding-segmented {
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 10.5rem;
  padding: 0.18rem;
  gap: 0.12rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.branding-segment {
  flex: 1;
  min-width: 0;
  height: 2rem;
  padding: 0 0.35rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.branding-shape-icon {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.branding-segment:hover:not(:disabled) {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.7);
}

.branding-segment.is-active {
  background: #fff;
  color: var(--app-accent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.branding-segment:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sidebar-logo-frame {
  position: relative;
  width: 2.1rem;
  height: 2.1rem;
  display: block;
  flex-shrink: 0;
  box-sizing: border-box;
}

.branding-card--border .branding-card-body,
.branding-card--colors .branding-card-body,
.branding-card--fonts .branding-card-body {
  padding-top: 0.15rem;
}

.branding-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.branding-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  min-width: 3.25rem;
}

.branding-swatch-input {
  -webkit-appearance: none;
  appearance: none;
  width: 2.625rem;
  height: 2.625rem;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.branding-swatch-input:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.1);
}

.branding-swatch-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.branding-swatch-input::-webkit-color-swatch {
  border: none;
  border-radius: 999px;
}

.branding-swatch-name {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.2;
}

.branding-font-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.branding-font-field .field-label {
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.branding-font-field .text-input--compact {
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  min-height: 2.35rem;
}

.branding-studio-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.btn-compact {
  min-height: 2.25rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
}

@media (max-width: 1200px) {
  .branding-studio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .branding-studio-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .branding-card {
    min-height: 0;
  }

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

  .settings-shell[data-active-settings-tab='styling'] .settings-workspace {
    min-height: 0;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
