/* BITSmart Client Onboarding — Light Theme v2.1 */

/* ── Variables ────────────────────────────────── */
:root {
  --ob-bg:            #f4f6f9;
  --ob-card:          #ffffff;
  --ob-card-border:   #e4e8ef;
  --ob-sidebar-hl:    #eef0f5;
  --ob-input-bg:      #ffffff;
  --ob-input-border:  #d1d8e4;
  --ob-text:          #111827;
  --ob-muted:         #6b7280;
  --ob-dim:           #9ca3af;
  --ob-accent:        #4f46e5;
  --ob-accent-hover:  #4338ca;
  --ob-accent-light:  #eef2ff;
  --ob-done:          #16a34a;
  --ob-done-bg:       #16a34a;
  --ob-error:         #dc2626;
  --ob-info-bg:       #eff6ff;
  --ob-info-border:   #bfdbfe;
  --ob-info-text:     #3b82f6;
  --ob-secure-bg:     #f0fdf4;
  --ob-secure-border: #bbf7d0;
  --ob-topbar-bg:     #ffffff;
  --ob-topbar-border: #e4e8ef;
}

/* ── Base ─────────────────────────────────────── */
.bitsmart-ob-app {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: var(--ob-bg);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--ob-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 14px;
}
.bitsmart-ob-app *, .bitsmart-ob-app *::before, .bitsmart-ob-app *::after {
  box-sizing: border-box;
}

/* ── Top Bar ──────────────────────────────────── */
.ob-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ob-topbar-bg);
  border-bottom: 1px solid var(--ob-topbar-border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.ob-topbar-progress {
  height: 3px;
  background: var(--ob-accent);
  width: 0%;
  transition: width 0.45s ease;
}
.ob-topbar-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ob-brand-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ob-dim);
  margin-bottom: 1px;
}
.ob-brand-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ob-text);
}
.ob-topbar-meta {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ob-muted);
}
.ob-topbar-meta.visible { display: flex !important; }

/* ── Welcome Screen ───────────────────────────── */
.ob-welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
  padding: 48px 24px;
}
.ob-welcome-inner {
  width: 100%;
  max-width: 520px;
  text-align: center;
}
.ob-welcome-icon {
  width: 60px;
  height: 60px;
  background: var(--ob-accent-light);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--ob-accent);
}
.ob-welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ob-text);
  margin: 0 0 10px;
  line-height: 1.2;
}
.ob-welcome-sub {
  font-size: 14px;
  color: var(--ob-muted);
  margin: 0 0 28px;
  line-height: 1.7;
}
.ob-welcome-card {
  background: var(--ob-card);
  border: 1px solid var(--ob-card-border);
  border-radius: 12px;
  padding: 26px 28px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ob-expect-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ob-dim);
  margin: 0 0 10px;
}
.ob-expect-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ob-expect-list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--ob-muted);
  line-height: 1.5;
}
.ob-expect-list li::before {
  content: '·';
  color: var(--ob-accent);
  font-size: 20px;
  line-height: 1.1;
  flex-shrink: 0;
}
.ob-secure-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--ob-secure-bg);
  border: 1px solid var(--ob-secure-border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: #15803d;
  margin-bottom: 22px;
  line-height: 1.5;
}
.ob-secure-notice svg { flex-shrink: 0; margin-top: 1px; }
.ob-welcome-who-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ob-text);
  margin: 0 0 2px;
}
.ob-welcome-who-hint {
  font-size: 12px;
  color: var(--ob-dim);
  margin: 0 0 12px;
}
.ob-welcome-who { margin-bottom: 22px; }
.ob-btn-start {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--ob-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s;
  margin-bottom: 10px;
}
.ob-btn-start:hover { background: var(--ob-accent-hover); }
.ob-welcome-hint {
  text-align: center;
  font-size: 12px;
  color: var(--ob-dim);
  margin: 0;
}

/* ── Main Layout ──────────────────────────────── */
.ob-layout {
  display: none;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px 60px;
  gap: 28px;
  align-items: flex-start;
}
.ob-layout.visible { display: flex !important; }

/* ── Sidebar ──────────────────────────────────── */
.ob-sidebar {
  width: 182px;
  flex-shrink: 0;
  position: sticky;
  top: 54px;
  padding-top: 4px;
}
.ob-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  outline: none;
}
.ob-sidebar-item:hover,
.ob-sidebar-item:focus-visible { background: var(--ob-sidebar-hl); }
.ob-sidebar-item.active { background: var(--ob-sidebar-hl); }

.ob-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  transition: background 0.2s, color 0.2s;
}
.ob-dot-num   { display: block; }
.ob-dot-check { display: none; font-size: 13px; }

.ob-sidebar-item.active .ob-dot {
  background: var(--ob-accent);
  color: #fff;
}
.ob-sidebar-item.done .ob-dot {
  background: var(--ob-done-bg);
  color: #fff;
}
.ob-sidebar-item.done .ob-dot-num   { display: none; }
.ob-sidebar-item.done .ob-dot-check { display: block; }

.ob-sidebar-label {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
  line-height: 1.3;
  transition: color 0.15s;
}
.ob-sidebar-item.active .ob-sidebar-label { color: var(--ob-text); font-weight: 600; }
.ob-sidebar-item.done   .ob-sidebar-label { color: var(--ob-muted); }

/* ── Main Content ─────────────────────────────── */
.ob-main { flex: 1; min-width: 0; }

/* ── Error Banner ─────────────────────────────── */
.ob-error-banner {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ob-error);
  margin-bottom: 12px;
}
.ob-error-banner.visible { display: block; }

/* ── Section Card ─────────────────────────────── */
.ob-section { display: none; }
.ob-section.active { display: block; }

.ob-section-card {
  background: var(--ob-card);
  border: 1px solid var(--ob-card-border);
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.ob-section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--ob-text);
  margin: 0 0 7px;
  line-height: 1.2;
}
.ob-section-sub {
  font-size: 13px;
  color: var(--ob-muted);
  margin: 0 0 20px;
  line-height: 1.65;
}

/* ── Info Banner ──────────────────────────────── */
.ob-info-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--ob-info-bg);
  border: 1px solid var(--ob-info-border);
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 13px;
  color: #1d4ed8;
  margin-bottom: 22px;
  line-height: 1.55;
}
.ob-info-banner svg { flex-shrink: 0; margin-top: 1px; color: var(--ob-info-text); }

/* ── Field Layout ─────────────────────────────── */
.ob-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.ob-field-row--three  { grid-template-columns: 1fr 1fr 1fr; }
.ob-field-row--single { grid-template-columns: 1fr; }

.ob-field { display: flex; flex-direction: column; }
.ob-field.ob-field-full {
  grid-column: 1 / -1;
  margin-bottom: 14px;
}

.ob-field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ob-muted);
  margin-bottom: 5px;
  letter-spacing: 0.1px;
}
.ob-req        { color: var(--ob-error); margin-left: 2px; }
.ob-hint-label { font-weight: 400; color: var(--ob-dim); }
.ob-field-hint { font-size: 11px; color: var(--ob-dim); margin: -2px 0 5px; }

/* ── Inputs ───────────────────────────────────── */
.ob-field input[type="text"],
.ob-field input[type="email"],
.ob-field input[type="tel"],
.ob-field input[type="url"],
.ob-field input[type="number"],
.ob-field input[type="date"],
.ob-field select,
.ob-field textarea {
  background: var(--ob-input-bg);
  border: 1.5px solid var(--ob-input-border);
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ob-text);
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.ob-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ca3af'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}
.ob-field textarea { resize: vertical; min-height: 80px; }
.ob-field input::placeholder,
.ob-field textarea::placeholder { color: #cbd5e1; }

.ob-field input:focus,
.ob-field select:focus,
.ob-field textarea:focus {
  outline: none;
  border-color: var(--ob-accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.ob-field input.ob-err,
.ob-field select.ob-err { border-color: var(--ob-error); }
.ob-field-err {
  font-size: 11px;
  color: var(--ob-error);
  margin-top: 3px;
  display: none;
}
.ob-field-err.visible { display: block; }

/* ── Pill Checkboxes / Radios ─────────────────── */
.ob-checkbox-group,
.ob-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.ob-checkbox-group label,
.ob-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid var(--ob-input-border);
  background: #f9fafb;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ob-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.ob-checkbox-group label:hover,
.ob-radio-group label:hover {
  border-color: var(--ob-accent);
  color: var(--ob-accent);
}
.ob-checkbox-group input,
.ob-radio-group input {
  accent-color: var(--ob-accent);
  width: 13px;
  height: 13px;
  margin: 0;
}
.ob-checkbox-group label:has(input:checked),
.ob-radio-group label:has(input:checked) {
  border-color: var(--ob-accent);
  background: var(--ob-accent-light);
  color: var(--ob-accent);
}

/* ── Conditional Panels ───────────────────────── */
.ob-conditional {
  display: none;
  margin-top: 10px;
  padding: 14px;
  background: #f8faff;
  border-left: 2px solid var(--ob-accent);
  border-radius: 0 6px 6px 0;
}
.ob-conditional.visible { display: block; }
.ob-conditional .ob-field-row { margin-bottom: 0; }

/* ── Privacy Note ─────────────────────────────── */
.ob-privacy-note {
  font-size: 11px;
  color: var(--ob-dim);
  margin: 16px 0 0;
  line-height: 1.5;
}
.ob-privacy-note a { color: var(--ob-accent); text-decoration: none; }
.ob-privacy-note a:hover { text-decoration: underline; }

/* ── Section Navigation ───────────────────────── */
.ob-section-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
}
.ob-btn-prev {
  background: none;
  border: none;
  color: var(--ob-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.15s;
}
.ob-btn-prev:hover { color: var(--ob-text); }

.ob-btn-next,
.ob-btn-submit {
  background: var(--ob-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ob-btn-next:hover,
.ob-btn-submit:hover { background: var(--ob-accent-hover); }
.ob-btn-submit.loading { pointer-events: none; opacity: 0.75; }
.ob-btn-submit.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ob-spin .6s linear infinite;
}
@keyframes ob-spin { to { transform: rotate(360deg); } }

/* ── Success State ────────────────────────────── */
.ob-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
  padding: 48px 24px;
  text-align: center;
}
.ob-success.visible { display: flex !important; }
.ob-success-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--ob-secure-bg);
  border: 2px solid #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--ob-done);
  margin-bottom: 24px;
}
.ob-success h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ob-text);
  margin: 0 0 12px;
}
.ob-success p {
  font-size: 14px;
  color: var(--ob-muted);
  max-width: 380px;
  line-height: 1.65;
  margin: 0;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 680px) {
  .bitsmart-ob-app  { margin-left: 0; width: 100%; }
  .ob-layout.visible {
    flex-direction: column;
    padding: 20px 16px 40px;
    gap: 0;
  }
  .ob-sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    padding-top: 0;
  }
  .ob-sidebar-item  { padding: 5px 8px; }
  .ob-sidebar-label { font-size: 11px; }
  .ob-section-card  { padding: 20px; }
  .ob-field-row     { grid-template-columns: 1fr; }
  .ob-field-row--three { grid-template-columns: 1fr 1fr; }
  .ob-welcome-inner { text-align: left; }
  .ob-welcome-icon  { display: none; }
}
