/* Commissioning wizard — styled to match the dashboard's mobile device
   detail view: light page body, dark navy info cards, cyan accent.
   Token naming is kept so the rest of the file's class rules are
   unchanged; semantics flipped so `--setup-bg` is now the LIGHT body
   colour and `--setup-surface` is the DARK card colour. */
:root {
  /* Body — dashboard's tailwind.config.ts `background` + `background-secondary`. */
  --setup-bg:           #f8f8f8;
  --setup-bg-soft:      #ffffff;

  /* Info-card surface — dashboard's soc.bg-card (dark navy). Cards pop
     against the light body so hierarchy is obvious at a glance. */
  --setup-surface:      #1a1f2e;
  --setup-surface-soft: #242b3d;   /* elevated / nested card panel */
  --setup-dark:         #0f1117;   /* used by overlays / header */
  --setup-dark-2:       #1a1f2e;

  /* Text ON CARDS (dark surface). */
  --setup-text:           #f3f4f6;
  --setup-secondary-text: #e5e7eb;
  --setup-muted:          #9ca3af;

  /* Text ON LIGHT BODY — dashboard tailwind `text.primary` / tertiary. */
  --setup-text-on-bg:   #222222;
  --setup-muted-on-bg:  #666666;

  /* Accent — neutral slate instead of cyan/teal. The coloured accents
     kept reading "stuffy" against the light body; a dark slate reads
     as a calm primary, pairs cleanly with the dark-navy secondary,
     and doesn't fight with the dark info cards. */
  --setup-accent:      #334155;   /* slate-700 — primary button fill + accent text */
  --setup-accent-2:    #1e293b;   /* slate-800 — primary hover / gradient end */
  --setup-accent-dim:  #64748b;   /* slate-500 — subtle secondary accent */

  /* Status — soc.success / warning / error. */
  --setup-success:     #10b981;
  --setup-success-bg:  rgba(16, 185, 129, 0.18);
  --setup-danger:      #ef4444;
  --setup-danger-bg:   rgba(239, 68, 68, 0.15);

  /* Secondary button surface — dark elevated card tone so CTAs + cancel
     buttons sit on cards without competing with the accent. */
  --setup-secondary-bg:   #242b3d;

  /* Border / shadow — light-theme hairline for light surfaces, soft
     shadow for the dark cards floating on the light body. */
  --setup-border:           #e5e7eb;
  --setup-border-on-card:   rgba(255, 255, 255, 0.06);
  --setup-shadow:           0 4px 12px rgba(15, 17, 23, 0.10), 0 1px 3px rgba(15, 17, 23, 0.08);

  --setup-touch: 56px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body.setup-root {
  margin: 0;
  min-height: 100dvh;
  background: var(--setup-bg);
  color: var(--setup-text-on-bg);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.setup-app {
  min-height: 100dvh;
}

.setup-shell {
  min-height: 100dvh;
}

.setup-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 0.75rem;
  align-items: center;
  height: 72px;
  padding: 0 1rem;
  /* Header uses the same white/light surface as the body so the wizard
     feels continuous — matches the dashboard's top nav where the tab
     row sits on a light background above dark content cards. */
  background: rgba(248, 248, 248, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--setup-border);
}

.setup-header-center {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.setup-icon-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: var(--setup-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.setup-icon-btn.is-hidden {
  visibility: hidden;
}

.setup-step-chip {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--setup-accent);
  text-align: center;
}

.setup-progress-bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  /* Track on light body — the dashboard's border grey. */
  background: #e5e7eb;
}

.setup-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--setup-accent) 0%, var(--setup-accent-2) 100%);
}

.setup-main {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 6rem 1rem 11rem;
}

/* Hero is now text-only. The character sprite was removed 2026-04-18;
   .setup-hero-visual / .setup-hero-glow / .setup-assistant-* rules went
   with it. Layout is a simple vertical stack matching the dashboard's
   page-heading convention. */
.setup-hero {
  position: relative;
  display: block;
  margin-bottom: 1.5rem;
}

.setup-hero-copy {
  max-width: none;
  padding-top: 0.5rem;
}

.setup-eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--setup-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.setup-title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  /* Dark heading on light body — dashboard `text.secondary`. */
  color: #333333;
}

.setup-subtitle {
  margin: 0.65rem 0 0;
  /* Dashboard `text.tertiary` for subhead copy on light surfaces. */
  color: var(--setup-muted-on-bg);
  font-size: 0.95rem;
  line-height: 1.55;
}

.setup-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setup-body {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.setup-grid,
.setup-metric-grid,
.setup-summary-grid {
  display: grid;
  gap: 0.9rem;
}

.setup-grid,
.setup-summary-grid {
  grid-template-columns: 1fr;
}

.setup-info-card,
.setup-reading-card,
.setup-summary-card,
.setup-metric-card,
.setup-checklist-card,
.setup-select-item,
.setup-data-row {
  background: var(--setup-surface);
  border-radius: 1.5rem;
  box-shadow: var(--setup-shadow);
  border: 1px solid var(--setup-border);
}

.setup-info-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
}

/* Status-variant info cards keep the dark navy base so copy inside
   them stays readable (white text on navy). Tint is now a left-border
   + matching icon-box colour — the card reads as "success / danger /
   accent" at a glance without washing the body of the card to a tint
   that makes text illegible. Prior to 2026-04-18 these rules replaced
   the dark surface with a pale tint, which produced the mint card
   with unreadable white text seen in early feedback. */
.setup-info-card.success {
  border-left: 3px solid var(--setup-success);
}
.setup-info-card.success .setup-info-icon {
  background: var(--setup-success-bg);
  color: var(--setup-success);
}

.setup-info-card.danger {
  border-left: 3px solid var(--setup-danger);
}
.setup-info-card.danger .setup-info-icon {
  background: var(--setup-danger-bg);
  color: var(--setup-danger);
}

.setup-info-card.accent {
  border-left: 3px solid var(--setup-accent);
}
.setup-info-card.accent .setup-info-icon {
  background: rgba(51, 65, 85, 0.18);
  color: var(--setup-accent);
}

.setup-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(51, 65, 85, 0.1);
  color: var(--setup-accent);
}

.setup-info-title,
.setup-summary-title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #f5f9ff;
}

.setup-info-text,
.setup-summary-line {
  margin: 0.35rem 0 0;
  color: var(--setup-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.setup-guide-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 1.5rem;
  background: var(--setup-surface-soft);
  border: 1px solid var(--setup-border);
}

.setup-guide-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 0.85rem;
  background: rgba(51, 65, 85, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--setup-accent);
  font-weight: 800;
  flex-shrink: 0;
}

.setup-guide-step-text {
  margin: 0.12rem 0 0;
  color: var(--setup-muted);
  line-height: 1.55;
}

.setup-two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.setup-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setup-field-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--setup-muted);
}

.setup-input {
  width: 100%;
  min-height: var(--setup-touch);
  padding: 0.9rem 1rem;
  border-radius: 0.625rem;
  /* Form inputs stay light regardless of whether they sit inside a dark
     card or on the page body — dashboard convention. Dark text on white
     surface with a subtle grey hairline. */
  background: #ffffff;
  color: #222222;
  border: 1px solid var(--setup-border);
  font-size: 16px;
  font-family: inherit;
  box-shadow: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

.setup-input:focus {
  outline: 2px solid rgba(51, 65, 85, 0.28);
  border-color: var(--setup-accent);
}

.setup-input.is-invalid {
  border-color: var(--setup-danger);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.setup-field-error {
  color: var(--setup-danger);
  font-size: 0.86rem;
  line-height: 1.45;
}

.setup-select {
  appearance: none;
}

.setup-select-list,
.setup-reading-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.setup-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary, #555);
  margin: 1.2rem 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.setup-terminal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.setup-terminal-cell {
  border: 1px solid var(--setup-border);
  border-radius: 1.25rem;
  background: var(--setup-surface-soft);
  color: var(--setup-text);
  padding: 0.95rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.setup-terminal-cell.is-fixed {
  background: rgba(51, 65, 85, 0.16);
}

.setup-terminal-cell.is-recommended {
  background: rgba(51, 65, 85, 0.12);
}

.setup-terminal-cell.is-guidance {
  background: rgba(148, 163, 184, 0.08);
}

.setup-terminal-cell.is-verified {
  box-shadow: inset 0 0 0 2px rgba(139, 233, 143, 0.55);
}

.setup-terminal-port {
  color: var(--setup-accent-dim);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.setup-terminal-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  color: #f5f9ff;
}

.setup-terminal-detail,
.setup-terminal-status {
  color: var(--setup-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.setup-terminal-status {
  color: var(--setup-success);
  margin-top: auto;
}

.setup-select-item {
  border: none;
  width: 100%;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
}

.setup-select-item.is-selected {
  background: rgba(51, 65, 85, 0.12);
  box-shadow: inset 0 0 0 1px rgba(51, 65, 85, 0.3), var(--setup-shadow);
}

.setup-select-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.setup-select-title {
  color: #f5f9ff;
  font-size: 1rem;
}

.setup-select-subtitle,
.setup-empty,
.setup-reading-note,
.setup-metric-note,
.setup-data-note {
  color: var(--setup-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.setup-checklist-card {
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.setup-check-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
}

.setup-check-item.is-invalid {
  background: rgba(127, 29, 29, 0.16);
  border-radius: 1rem;
}

.setup-check-item input {
  width: 1.3rem;
  height: 1.3rem;
  flex-shrink: 0;
}

.setup-check-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.setup-check-text {
  color: #f5f9ff;
  line-height: 1.45;
}

.setup-check-detail {
  color: var(--setup-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.setup-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-metric-card,
.setup-summary-card {
  padding: 1rem;
}

.setup-summary-card {
  display: flex;
  flex-direction: column;
}

.setup-summary-card .setup-btn {
  margin-top: 0.85rem;
}

.setup-metric-label,
.setup-data-label {
  display: block;
  color: var(--setup-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.setup-metric-value,
.setup-reading-value,
.setup-data-value {
  display: block;
  margin-top: 0.45rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  color: #f5f9ff;
  font-size: 1.05rem;
}

.setup-metric-value.good {
  color: var(--setup-success);
}

.setup-metric-value.bad {
  color: var(--setup-danger);
}

.setup-reading-card {
  padding: 1rem;
}

.setup-reading-label {
  color: #f5f9ff;
  font-weight: 700;
}

.setup-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
}

.setup-data-copy {
  min-width: 0;
}

.setup-summary-grid {
  grid-template-columns: 1fr 1fr;
}

.setup-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 15;
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
  /* Light body equivalent — soft fade from transparent at the top so
     content scrolls into view cleanly, into opaque body colour at the
     safe-area inset. */
  background: linear-gradient(180deg, rgba(248, 248, 248, 0) 0%, rgba(248, 248, 248, 0.92) 24%, rgba(248, 248, 248, 0.98) 100%);
  border-top: 1px solid var(--setup-border);
}

.setup-footer-inner {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.setup-footer-row {
  display: flex;
  gap: 0.75rem;
}

.setup-btn {
  min-height: clamp(44px, 11vw, 56px);
  width: 100%;
  border: none;
  border-radius: 1rem;
  padding: clamp(0.7rem, 2.5vw, 0.95rem) 1.1rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.875rem, 3.5vw, 1rem);
  font-weight: 800;
  cursor: pointer;
}

.setup-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.setup-btn-primary {
  /* Dashboard convention — white text on the teal primary. Flat fill (no
     gradient) matches btn-primary on the dashboard, where the colour
     does the work without a highlight sheen. */
  color: #ffffff;
  background: var(--setup-accent);
  box-shadow: 0 8px 20px rgba(51, 65, 85, 0.28);
}
.setup-btn-primary:hover {
  background: var(--setup-accent-2);
}

.setup-btn-secondary {
  /* Solid dark navy pill with light text — reads clearly on the light
     body and pairs with the cyan primary without competing. */
  color: var(--setup-secondary-text);
  background: var(--setup-secondary-bg);
}

.setup-btn-ghost {
  /* Neutral slate-grey outlined pill — tertiary priority. Previous
     cyan-outlined treatment made the whole footer feel electric when
     paired with a cyan primary above it. Now the eye tracks cleanly:
     filled-cyan primary > filled-navy secondary > outlined-grey ghost. */
  color: #475569;                     /* slate-600 — dashboard text-tertiary tone */
  background: #ffffff;
  border: 1px solid #cbd5e1;          /* slate-300 — matches dashboard border-dark */
  font-weight: 600;
}
.setup-btn-ghost:hover {
  background: #f1f5f9;                /* slate-100 — subtle fill on hover */
}

.setup-btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.setup-btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Hero-visual / assistant media-query overrides were removed 2026-04-18
   along with the character sprite. */
@media (max-width: 420px) {
  .setup-main {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .setup-two-up,
  .setup-metric-grid,
  .setup-summary-grid,
  .setup-terminal-strip,
  .setup-footer-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .setup-title {
    font-size: 1.65rem;
  }

  .setup-footer-inner {
    gap: 0.5rem;
  }
}

/* ── Device discovery ──────────────────────────────────────────────────────── */
.setup-link-btn {
  background: none;
  border: none;
  color: var(--setup-accent, #334155);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0;
  text-decoration: underline;
  display: block;
  margin-top: 0.5rem;
}
.setup-link-btn:hover { opacity: 0.8; }

.setup-pairing-code {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
  color: #fff;
  background: rgba(51, 65, 85, 0.12);
  border: 2px solid rgba(51, 65, 85, 0.4);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
}

/* ── Baseline queue ────────────────────────────────────────────────────────── */
.setup-baseline-queue { margin-bottom: 1rem; }
.setup-baseline-queue-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.setup-baseline-draft-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.setup-baseline-draft-label { font-size: 0.9rem; font-weight: 600; color: #fff; }
.setup-baseline-draft-sub { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

.setup-baseline-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  border-radius: 20px;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
}
.setup-baseline-status .material-symbols-outlined { font-size: 1rem; }
.setup-baseline-status--pending  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55); }
.setup-baseline-status--running  { background: rgba(0,194,153,0.15);   color: #00C299; }
.setup-baseline-status--success  { background: rgba(0,194,153,0.15);   color: #00C299; }
.setup-baseline-status--error    { background: rgba(255,80,80,0.15);   color: #ff6b6b; }

.setup-baseline-retry-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.setup-baseline-capture-all-btn {
  width: 100%;
  margin: 0.5rem 0 1rem;
}
.setup-baseline-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 1rem 0;
}

/* ── Baseline countdown card ───────────────────────────────────────────────── */
.setup-baseline-countdown {
  background: rgba(51, 65, 85, 0.1);
  border: 1px solid rgba(51, 65, 85, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.setup-baseline-countdown-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #00C299;
}
.setup-baseline-countdown-header .material-symbols-outlined { font-size: 1.25rem; }
.setup-baseline-countdown-title { font-size: 0.85rem; font-weight: 600; }
.setup-baseline-countdown-timer {
  font-size: 3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-align: center;
  margin: 0.5rem 0 0.75rem;
  letter-spacing: 0.05em;
}
.setup-baseline-countdown-bar-wrap {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.setup-baseline-countdown-bar {
  height: 100%;
  background: #00C299;
  border-radius: 4px;
  transition: width 0.5s linear;
}
.setup-baseline-countdown-instruction {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.5;
}

/* ── PIN gateway (pre-wizard) ────────────────────────────────────────────── */
/* Dedicated pre-wizard page shown when setupPin.verified is false.
   Modeled on the dashboard login at dashboard.thermalworks.co —
   brand heading, dark navy info card, white form card, slate button,
   no header / progress / footer chrome. Once the PIN verifies,
   render() flips and the normal wizard shell takes over at step 1. */
.setup-gate {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--setup-bg);
}
.setup-gate-inner {
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.setup-gate-brand {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--setup-text-on-bg);
  margin: 0;
}
.setup-gate-info {
  background: #1a1f2e;
  border-radius: 0.75rem;
  padding: 1.5rem;
  color: #fff;
}
.setup-gate-info h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}
.setup-gate-info p {
  margin: 0;
  font-size: 0.875rem;
  color: #cbd5e1;
}
.setup-gate-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.setup-gate-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.setup-gate-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.5rem;                /* larger for PIN entry */
  font-weight: 600;
  letter-spacing: 0.3em;
  text-align: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  color: #0f172a;
  box-sizing: border-box;
  -webkit-text-fill-color: #0f172a;
}
.setup-gate-input:focus {
  outline: none;
  border-color: var(--setup-accent);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.15);
}
.setup-gate-error {
  margin: 0.75rem 0 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.875rem;
}
.setup-gate-linked {
  margin: 0.75rem 0 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.875rem;
  font-weight: 500;
}
.setup-gate-submit {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--setup-accent);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.setup-gate-submit:hover:not(:disabled) { background: var(--setup-accent-2); }
.setup-gate-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.setup-gate-testmode {
  margin: 0;
  padding: 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
}
.setup-gate-testmode:hover { color: var(--setup-accent); text-decoration: underline; }
