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

[hidden] {
  display: none !important;
}

:root {
  --blue: #6eb8eb;
  --blue-deep: #5aa8dc;
  --navy: #3a5678;
  --navy-deep: #2c4563;
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --border: rgba(44, 69, 99, 0.14);
  --text: var(--navy-deep);
  --text-muted: rgba(44, 69, 99, 0.78);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 10px;
  --max: 54rem;
  --header-h: 3.5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--blue);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--navy-deep);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.45);
  color: var(--navy-deep);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

h1, h2 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4.5vw, 1.875rem);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
}

p {
  margin: 0 0 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--navy-deep);
  color: var(--white);
}

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

.btn--ghost:hover {
  background: var(--white);
}

.btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
}

.btn--danger {
  color: #9b2c2c;
  border-color: rgba(180, 40, 40, 0.22);
}

.btn--danger:hover {
  background: rgba(180, 40, 40, 0.08);
  color: #7a2020;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-deep);
  text-decoration: none;
}

.brand:hover {
  color: var(--navy);
  text-decoration: none;
}

.brand__icon {
  display: block;
  border-radius: 8px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0);
  background: var(--surface-strong);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 0.35rem 1.25rem rgba(44, 69, 99, 0.08);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy-deep);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.site-header__toggle:hover {
  background: var(--white);
  border-color: rgba(44, 69, 99, 0.22);
}

.site-header__toggle-icon {
  display: block;
}

.site-header__toggle-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .site-header__toggle-line--top {
  transform: translateY(4px) rotate(45deg);
}

.site-header.is-open .site-header__toggle-line--mid {
  opacity: 0;
}

.site-header.is-open .site-header__toggle-line--bot {
  transform: translateY(-4px) rotate(-45deg);
}

.site-header__panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.site-header__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-header__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.site-header__link:hover {
  color: var(--navy-deep);
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.site-header__link--current,
.site-header__link[aria-current="page"] {
  color: var(--navy-deep);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(44, 69, 99, 0.08);
}

.site-header__link--external::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  background: currentColor;
  opacity: 0.55;
  mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27%3E%3Cpath fill=%27black%27 d=%27M3.5 1h7v7M10 2 4.5 7.5M2 4v6h6%27/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-header__divider {
  width: 1px;
  height: 1.35rem;
  background: var(--border);
  flex-shrink: 0;
}

.site-header__auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.site-header__account {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 13rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  line-height: 1.25;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.site-header__account:hover {
  background: var(--white);
  border-color: rgba(44, 69, 99, 0.22);
}

.site-header__account:focus-visible {
  outline: 2px solid var(--blue-deep);
  outline-offset: 2px;
}

.site-header__account.is-copied {
  border-color: rgba(46, 125, 50, 0.35);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.site-header__account-status {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3dba6a;
  box-shadow: 0 0 0 2px rgba(61, 186, 106, 0.22);
}

.site-header__account-details {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.site-header__account-name {
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__connect {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__panel {
    position: absolute;
    top: calc(100% + env(safe-area-inset-top, 0));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem 1rem;
    background: var(--surface-strong);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 0.75rem 1.75rem rgba(44, 69, 99, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.35rem);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .site-header.is-open .site-header__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-header__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .site-header__link {
    justify-content: center;
    padding: 0.55rem 0.85rem;
  }

  .site-header__divider {
    width: 100%;
    height: 1px;
  }

  .site-header__auth {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header__account {
    max-width: none;
    width: 100%;
  }

  .site-header__connect,
  .site-header__auth .btn {
    width: 100%;
  }
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.5rem) 1.25rem 2rem;
}

.hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.hero--compact {
  margin-bottom: 1.25rem;
}

.hero--compact .hero__title {
  margin-bottom: 0.5rem;
}

.hero__logo {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  box-shadow: 0 0.35rem 1rem rgba(44, 69, 99, 0.12);
}

.hero__lead {
  max-width: 40rem;
  margin: 0 auto 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero__stats strong {
  display: block;
  font-size: 1.125rem;
  color: var(--navy-deep);
  font-weight: 700;
}

.panel {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel--nested {
  margin-bottom: 0.85rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

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

.steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.steps li {
  margin-bottom: 0.45rem;
}

.steps li:last-child {
  margin-bottom: 0;
}

.code-block {
  margin: 0;
  padding: 0.85rem;
  overflow-x: auto;
  font-size: 0.72rem;
  line-height: 1.5;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.code-block code {
  background: none;
  padding: 0;
  color: var(--navy-deep);
  white-space: pre;
}

.tok-comment {
  color: rgba(44, 69, 99, 0.55);
}

.panel__note,
.panel__intro {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.api-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.api-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.api-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.panel__links {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}

.site-footer {
  padding: 0 1rem 1.5rem;
  text-align: center;
}

.site-footer__copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.site-footer__legal {
  font-size: 0.6875rem;
  color: rgba(44, 69, 99, 0.55);
}

@media (min-width: 480px) {
  .page {
    padding-inline: 1.25rem;
  }
}

.dashboard-connect {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  text-align: left;
}

.auth-form__field {
  display: grid;
  gap: 0.35rem;
}

.auth-form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}

.auth-form__input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: var(--white);
}

.auth-form__input:focus {
  outline: 2px solid rgba(110, 184, 235, 0.65);
  outline-offset: 1px;
}

.auth-form__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.auth-form__actions .btn {
  width: 100%;
}

.dashboard-connect__lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.dashboard-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

.dashboard-status--loading {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.dashboard-status--loading::before {
  content: "";
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: dashboard-loading-spin 0.7s linear infinite;
}

.dashboard-status--success {
  background: rgba(40, 120, 70, 0.08);
  border: 1px solid rgba(40, 120, 70, 0.22);
  color: #1f6b42;
}

.dashboard-status--error {
  background: rgba(180, 40, 40, 0.08);
  border: 1px solid rgba(180, 40, 40, 0.25);
  color: #8b1e1e;
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.btn.is-loading:hover {
  transform: none;
}

.btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: dashboard-loading-spin 0.7s linear infinite;
}

.btn.is-success {
  background: #1f6b42;
  border-color: #1f6b42;
  color: var(--white);
}

.btn.is-success:hover {
  background: #185a38;
  color: var(--white);
}

.dashboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(60vh, 28rem);
  padding: 2rem 1rem;
}

.dashboard-loading__spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: dashboard-loading-spin 0.7s linear infinite;
}

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

.dashboard-loading__text {
  margin: 0;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.dashboard-loading--error .dashboard-loading__text {
  color: #8b1e1e;
}

.dashboard-loading--error .dashboard-loading__spinner {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--navy);
}

.badge--ok {
  background: rgba(46, 125, 50, 0.12);
  border-color: rgba(46, 125, 50, 0.25);
  color: #2e7d32;
}

.badge--warn {
  background: rgba(180, 120, 0, 0.12);
  border-color: rgba(180, 120, 0, 0.25);
  color: #8a6100;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 720px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat-card {
  display: flex;
  flex-direction: column;
  min-height: 5.5rem;
  padding: 0.9rem 1rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

.stat-card__label {
  margin: 0;
  min-height: 2.6rem;
  display: flex;
  align-items: flex-end;
  font-size: 0.6875rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-card__value {
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
  margin: 0.65rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(44, 69, 99, 0.08);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--navy-deep);
}

.stat-card__value-main {
  min-width: 0;
}

.stat-card__value-suffix {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Mode toggle */

.mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.1rem;
}

.mode-toggle__btn {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: none;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.mode-toggle__btn[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
}

.mode-toggle__btn[aria-pressed="true"]#mode-test-btn {
  background: #8a6100;
  color: var(--white);
}

.mode-toggle__btn:not([aria-pressed="true"]):hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--navy-deep);
}

/* Mode toggle inside the dark rail foot */
.app-rail__foot .mode-toggle {
  width: 100%;
  justify-content: stretch;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.app-rail__foot .mode-toggle__btn {
  flex: 1 1 0;
  color: rgba(255, 255, 255, 0.7);
}

.app-rail__foot .mode-toggle__btn:not([aria-pressed="true"]):hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* ── App shell: persistent left rail + content ─────────────────────────────── */

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* Hide the marketing footer once signed in (the left rail is visible). */
body:has(#app-rail:not([hidden])) .site-footer {
  display: none;
}

.app-rail {
  flex: 0 0 16rem;
  width: 16rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0.7rem;
  background: linear-gradient(180deg, var(--navy-deep) 0%, #21344a 100%);
  color: rgba(255, 255, 255, 0.86);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 5;
}

.app-rail__head {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-bottom: 0.35rem;
}

.app-rail__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0.3rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
}

.app-rail__brand-icon {
  border-radius: 8px;
  display: block;
}

/* Workspace switcher pill inside the rail */
.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.25rem 0.3rem 0.25rem 0.55rem;
}

.workspace-switcher__select {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
}

.workspace-switcher__select option {
  color: var(--navy-deep);
}

.workspace-switcher__select:focus {
  outline: none;
}

.workspace-switcher__new {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.workspace-switcher__new:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-rail__account {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.4rem 0.45rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.app-rail__account:hover {
  background: rgba(255, 255, 255, 0.08);
}

.app-rail__account.is-copied {
  background: rgba(110, 184, 235, 0.25);
}

.app-rail__account-avatar {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
}

.app-rail__account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-rail__signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  align-self: flex-start;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.app-rail__signout:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.app-rail__connect {
  width: 100%;
  justify-content: center;
}

/* Main column fills the rest; no top-header offset anymore */
.app-shell .page {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 1.75rem 2rem 2.5rem;
}

.page:has(#dashboard-view:not([hidden])) {
  max-width: none;
}

/* Dash layout — content + installation (nav now lives in the rail) */

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1025px) {
  .dash-layout:has(.dash-install[data-mode="preview"]) {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }
}

.dash-sidebar {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.2rem 0;
}

.dash-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-sidebar__group-label {
  margin: 0 0 0.15rem;
  padding: 0 0.55rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.dash-sidebar__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.dash-sidebar__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.dash-sidebar__item.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-weight: 600;
}

.dash-sidebar__icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.dash-sidebar__item:hover .dash-sidebar__icon,
.dash-sidebar__item.is-active .dash-sidebar__icon {
  opacity: 1;
}

.dash-content {
  min-width: 0;
}

.dash-install {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dash-install__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-install__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-install__eyebrow::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.4rem;
  border-radius: 999px;
  background: var(--navy);
  vertical-align: 0.1em;
  opacity: 0.7;
}

.right-panel-preview {
  display: flex;
  flex-direction: column;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 8px 24px rgba(44, 69, 99, 0.06);
}

.right-panel-preview__header {
  margin-bottom: 1rem;
}

.right-panel-preview__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.7;
}

.right-panel-preview__title {
  margin: 0.125rem 0 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy-deep);
}

.right-panel-preview.is-loading .right-panel-preview__title {
  visibility: hidden;
}

.right-panel-preview__body {
  min-width: 0;
}

.right-panel-preview__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 10rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.right-panel-preview__spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 2.5px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: dashboard-loading-spin 0.7s linear infinite;
}

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

.right-panel-preview__empty {
  padding: 1.25rem 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.right-panel-preview__slot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.right-panel-preview__slot:empty {
  display: none;
}

.right-panel-preview .email-preview__label {
  display: none;
}

.right-panel-preview .unlock-button-preview {
  max-width: none;
  margin: 0;
}

.right-panel-preview .unlock-preview {
  margin-top: 0;
}

/* ── Boot loading overlay ─────────────────────────────────────────────── */

.boot-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(60vh, 28rem);
  padding: 2rem 1rem;
}

.boot-loading__card,
.dashboard-loading__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: 0 12px 32px rgba(44, 69, 99, 0.08);
  text-align: center;
}

.boot-loading__spinner {
  width: 2rem;
  height: 2rem;
  border: 2.5px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: dashboard-loading-spin 0.7s linear infinite;
}

.boot-loading__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dash-install .setup-wizard {
  margin-bottom: 0;
}

.dash-install .setup-wizard__header {
  flex-wrap: wrap;
}

.dash-install .setup-wizard--collapsed {
  width: 100%;
}

.dash-section {
  /* sections are plain containers; visibility is toggled via [hidden] */
}

@media (max-width: 1024px) {
  .dash-layout {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .dash-install {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 760px) {
  .app-rail {
    flex-basis: 13rem;
    width: 13rem;
  }

  .app-shell .page {
    padding: 1.25rem 1.1rem 2rem;
  }
}

/* List panels */

.list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.list-header h2 {
  margin: 0;
}

.list-header__copy {
  display: grid;
  gap: 0.2rem;
  min-width: min(100%, 16rem);
}

.list-header__copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.list-header__copy h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
}

.section-intro {
  margin-bottom: 1rem;
}

.section-intro:last-child {
  margin-bottom: 0.75rem;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-input {
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.8125rem;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 14rem;
}

.filter-input:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px rgba(110, 184, 235, 0.25);
}

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

.hook-lookup {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hook-lookup__toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hook-lookup .filter-input {
  flex: 1;
  min-width: 0;
  width: auto;
}

.hook-lookup .dashboard-status {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.hook-lookup .data-table-wrap {
  margin-top: 0.75rem;
}

/* Data table */

.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.data-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.45);
}

.data-table__empty {
  padding: 1.75rem 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.data-token {
  display: inline-block;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--navy-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Pagination */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  min-height: 2rem;
}

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

.pagination-bar__buttons {
  display: flex;
  gap: 0.35rem;
}

@media (max-width: 540px) {
  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-input {
    width: 100%;
  }

  .list-toolbar {
    width: 100%;
  }

  .hook-lookup__toolbar {
    width: 100%;
  }

  .hook-lookup .filter-input {
    width: 100%;
  }
}

/* Hook detail card */

.hook-detail-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.8125rem;
}

.hook-detail-card__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.hook-detail-card__row:last-child {
  border-bottom: none;
}

.hook-detail-card__row:hover {
  background: rgba(255, 255, 255, 0.45);
}

.hook-detail-card__label {
  flex-shrink: 0;
  width: 6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hook-detail-card__value {
  color: var(--text);
}

/* Analytics chart */

.activity-chart-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.25rem;
}

.activity-chart-wrap--empty {
  padding: 2rem 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.activity-chart {
  display: block;
  width: 100%;
  min-width: 28rem;
  height: auto;
}

.activity-chart__grid {
  stroke: var(--border);
  stroke-width: 1;
}

.activity-chart__tick,
.activity-chart__label {
  fill: var(--text-muted);
  font-family: var(--font);
  font-size: 10px;
}

.activity-chart__bar--hooks {
  fill: var(--navy);
}

.activity-chart__bar--payments {
  fill: var(--blue-deep, #6eb8eb);
}

.activity-chart__bar--unlock {
  fill: #f59e0b;
}

.activity-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.activity-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.activity-chart-legend__swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
}

.activity-chart-legend__swatch--hooks {
  background: var(--navy);
}

.activity-chart-legend__swatch--payments {
  background: var(--blue-deep, #6eb8eb);
}

.activity-chart-legend__swatch--unlock {
  background: #f59e0b;
}

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

.email-branding-form {
  margin-top: 0.75rem;
}

.settings-mode-callout {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.settings-mode-callout--test {
  border-color: #c9a227;
  background: #fffbeb;
}

.settings-mode-callout__title {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy-deep);
}

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

.settings-callout {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.settings-callout__title {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy-deep);
}

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

.settings-section__title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.email-branding-form__fields {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
}

.email-branding-form__field {
  display: grid;
  gap: 0.45rem;
}

.email-branding-form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}

.email-branding-form__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.email-branding-form__color-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.email-branding-form__color-row input[type="color"] {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  cursor: pointer;
}

.email-branding-form__color-row .filter-input {
  flex: 1;
}

.email-branding-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 1rem;
}

.email-branding-form__actions .form-action-status {
  flex: 1 1 12rem;
  margin: 0;
  min-width: 0;
}

.hook-lookup__toolbar .form-action-status {
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
}

.email-preview {
  margin-top: 1.5rem;
}

.email-preview__label {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.email-preview__frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-strong);
}

.email-preview__shell {
  padding: 1.25rem 1rem 1rem;
  transition: background-color 0.15s ease;
}

.email-preview__header {
  min-height: 2rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.email-preview__header img {
  display: block;
  max-height: 2rem;
  width: auto;
  margin: 0 auto;
}

.email-preview__header-name {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.email-preview__card {
  max-width: 18rem;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(44, 69, 99, 0.12);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(44, 69, 99, 0.12);
}

.email-preview__card-accent {
  height: 3px;
  background: var(--navy);
}

.email-preview__card-body {
  padding: 1rem 1.1rem 1.1rem;
}

.email-preview__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

.email-preview__headline {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.email-preview__copy {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(44, 69, 99, 0.82);
}

.email-preview__cta {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
}

.settings-section__title:not(:first-of-type) {
  margin-top: 2rem;
}

.unlock-button-preview {
  margin: 1rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  max-width: 32rem;
}

.unlock-button-preview #payhook-button > div,
.unlock-button-preview #payhook-button-home > div {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.unlock-button-preview #payhook-button input,
.unlock-button-preview #payhook-button-home input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.2;
  color: #2c4563;
  background: #ffffff;
  border: 1px solid rgba(44, 69, 99, 0.2);
  border-radius: 999px;
  appearance: none;
}

.unlock-button-preview #payhook-button button,
.unlock-button-preview #payhook-button-home button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: default;
  background: var(--unlock-home-btn-bg, #3a5678);
  color: var(--unlock-home-btn-color, #ffffff);
}

.unlock-button-preview #payhook-button-home button:hover {
  background: var(--unlock-home-btn-bg-hover, #2c4563);
}

.right-panel-preview .ext-button-preview {
  width: 100%;
}

.setup-brief-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 42rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border, #e3e8ef);
  border-radius: 0.5rem;
  background: var(--surface, #fff);
}

.setup-brief-card__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.setup-brief-card__copy strong {
  color: var(--navy);
}

.setup-brief-card__copy span,
.setup-brief-list {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.setup-brief-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  max-width: 42rem;
}

.setup-brief-list li + li {
  margin-top: 0.35rem;
}

@media (max-width: 600px) {
  .setup-brief-card {
    flex-direction: column;
    align-items: stretch;
  }
}

.ext-button-variant {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.ext-button-variant__option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--border, #e3e8ef);
  border-radius: 0.5rem;
  cursor: pointer;
  background: var(--surface, #fff);
}

.ext-button-variant__option:has(input:checked) {
  border-color: var(--navy, #3a5678);
  box-shadow: 0 0 0 2px rgba(58, 86, 120, 0.12);
}

.ext-button-variant__option input {
  margin: 0 0.5rem 0 0;
}

.ext-button-variant__option span {
  font-weight: 600;
}

.ext-button-variant__option small {
  color: var(--text-muted, #6c7a89);
  font-size: 0.75rem;
}

.ext-button-preview {
  padding: 1rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e8ef);
  border-radius: 0.5rem;
  max-width: 28rem;
}

.ext-button-preview__inline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ext-button-preview__viewport {
  position: relative;
  height: 14rem;
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(58, 86, 120, 0.04), rgba(58, 86, 120, 0.10)),
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(0, 0, 0, 0.025) 10px 11px);
  border: 1px dashed var(--border, #e3e8ef);
  overflow: hidden;
}

.ext-button-preview__viewport-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.25rem;
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.ext-button-preview__floating-btn {
  position: absolute;
  z-index: 1;
}

.ext-button-preview__floating[data-corner="bottom-right"] .ext-button-preview__floating-btn {
  bottom: 0.9rem;
  right: 0.9rem;
}
.ext-button-preview__floating[data-corner="bottom-left"] .ext-button-preview__floating-btn {
  bottom: 0.9rem;
  left: 0.9rem;
}
.ext-button-preview__floating[data-corner="top-right"] .ext-button-preview__floating-btn {
  top: 1.75rem;
  right: 0.9rem;
}
.ext-button-preview__floating[data-corner="top-left"] .ext-button-preview__floating-btn {
  top: 1.75rem;
  left: 0.9rem;
}

.ext-button-preview__floating .payhook-btn__button {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.ext-button-preview__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ext-button-preview__state-label {
  font-size: 0.8125rem;
  color: var(--text-muted, #6c7a89);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.ext-button-preview .payhook-btn {
  --payhook-btn-bg: #3a5678;
  --payhook-btn-bg-hover: #2c4563;
  --payhook-btn-color: #ffffff;
  --payhook-btn-radius: 999px;
  --payhook-btn-font-size: 0.875rem;
}

.ext-button-preview .payhook-btn__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--payhook-btn-radius);
  font-size: var(--payhook-btn-font-size);
  font-weight: 600;
  cursor: pointer;
  background: var(--payhook-btn-bg);
  color: var(--payhook-btn-color);
}

.ext-button-preview .payhook-btn__button:hover:not(:disabled) {
  background: var(--payhook-btn-bg-hover);
}

.ext-button-preview .payhook-btn__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.unlock-features-editor,
.unlock-channels-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.unlock-features-row,
.unlock-channels-row {
  display: grid;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface, #fff);
}

.unlock-features-row {
  grid-template-columns: 1fr auto auto;
}

.unlock-channels-row {
  grid-template-columns: minmax(5rem, 0.85fr) 5.5rem minmax(0, 1.5fr) auto;
}

.unlock-features-row .filter-input,
.unlock-channels-row .filter-input {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.unlock-features-row__included {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.unlock-row__remove {
  justify-self: end;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.75rem;
}

.unlock-row__remove:hover {
  color: #b3261e;
  border-color: #b3261e;
}

.unlock-preview {
  margin-top: 1rem;
}

.unlock-preview__frame {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: var(--bg, #f4f7fb);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.unlock-preview__page {
  --unlock-preview-accent: #6eb8eb;
  --unlock-preview-accent-soft: rgba(110, 184, 235, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
  max-width: 22rem;
  padding: 1rem 1rem 1.25rem;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(20, 30, 50, 0.06);
  font-size: 0.8125rem;
  color: #11151a;
}

.unlock-preview__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.25rem;
}

.unlock-preview__logo {
  display: block;
  height: 1.25rem;
  max-width: 6rem;
  object-fit: contain;
}

.unlock-preview__name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.unlock-preview__name:empty { display: none; }

.unlock-preview__tagline {
  margin: 0;
  font-size: 0.75rem;
  color: #5b6573;
  line-height: 1.4;
}

.unlock-preview__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.625rem;
  padding: 0.625rem;
  background: #f3f4f8;
  border: 1px solid #e3e7ee;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
}

.unlock-preview__feature {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.unlock-preview__feature-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
}

.unlock-preview__feature--included .unlock-preview__feature-dot {
  background: #11151a;
}

.unlock-preview__feature--locked {
  color: #5b6573;
}

.unlock-preview__feature--locked .unlock-preview__feature-dot {
  background: transparent;
  border: 1px solid #8b95a3;
}

.unlock-preview__plans {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.unlock-preview__plan {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0.5rem;
  border: 1px solid #e3e7ee;
  border-radius: 0.4375rem;
  font-size: 0.6875rem;
}

.unlock-preview__plan--selected {
  border-color: var(--unlock-preview-accent);
  box-shadow: 0 0 0 2px var(--unlock-preview-accent-soft);
}

.unlock-preview__plan-name { font-weight: 600; }

.unlock-preview__cta {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 0.125rem;
}

.unlock-preview__input {
  padding: 0.4375rem 0.5rem;
  border: 1px solid #e3e7ee;
  border-radius: 0.375rem;
  color: #8b95a3;
  font-size: 0.6875rem;
  background: #fff;
}

.unlock-preview__button {
  padding: 0.4375rem 0.5rem;
  border: none;
  border-radius: 0.375rem;
  background: var(--unlock-preview-accent);
  color: #fff;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: default;
}

.unlock-preview__footnote {
  margin: 0;
  text-align: center;
  font-size: 0.625rem;
  color: #8b95a3;
}

.unlock-preview__cobrand {
  margin: 0;
  text-align: center;
  font-size: 0.625rem;
  color: #8b95a3;
}

.settings-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.settings-tabs__btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.625rem 0.875rem;
  margin-bottom: -1px;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}

.settings-tabs__btn:hover {
  color: var(--text);
}

.settings-tabs__btn.is-active {
  color: var(--text);
  border-bottom-color: var(--navy, #2c4563);
}

.unlock-preview__page--success {
  text-align: center;
  align-items: center;
}

.unlock-preview__page--success .unlock-preview__head {
  justify-content: center;
}

.unlock-preview__success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0.25rem auto 0.5rem;
  border-radius: 50%;
  background: var(--unlock-preview-accent-soft);
  color: var(--unlock-preview-accent);
}

.unlock-preview__success-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.unlock-preview__success-lead {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #5b6573;
}

.unlock-preview__page--success .unlock-preview__features {
  margin: 0.25rem 0;
}

.unlock-preview__success-hint {
  margin: 0;
  font-size: 0.6875rem;
  color: #5b6573;
}

/* ─── Setup wizard ─────────────────────────────────────────────────────────── */

.setup-wizard {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(44, 69, 99, 0.06);
}

.setup-wizard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.setup-wizard__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.7;
}

.setup-wizard__title {
  margin: 0.125rem 0 0;
  font-size: 1.0625rem;
  color: var(--navy-deep);
}

.setup-wizard__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.875rem;
  position: relative;
}

.setup-wizard__step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.875rem;
  align-items: start;
  position: relative;
}

.setup-wizard__step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -0.875rem;
  width: 2px;
  background: var(--border);
}

.setup-wizard__step--done:not(:last-child)::before {
  background: var(--navy);
}

.setup-wizard__marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-strong);
  border: 1.5px solid var(--border);
  color: var(--navy);
  z-index: 1;
}

.setup-wizard__step--active .setup-wizard__marker {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(58, 86, 120, 0.12);
}

.setup-wizard__step--done .setup-wizard__marker {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.setup-wizard__step-title {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--navy-deep);
}

.setup-wizard__step--pending .setup-wizard__step-title {
  opacity: 0.55;
}

.setup-wizard__copy {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setup-wizard__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.625rem;
  flex-wrap: wrap;
}

.setup-wizard__spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: dashboard-loading-spin 0.7s linear infinite;
}

.setup-wizard--collapsed {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 1rem;
  width: fit-content;
  font-size: 0.8125rem;
  color: var(--navy-deep);
}

.setup-wizard__collapsed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.75rem;
}




/*# sourceMappingURL=dashboard.css.map*/