/* css/pages/onboarding.css — light mode, matchar app-tokens */

.onboarding-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  color: var(--text-1);
  font-family: var(--font-ui);
}

/* ─── Header ──────────────────────────────────────────────────────── */
.onboarding-header {
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.onboarding-header__back {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 10px 6px 6px;
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  transition: color 0.15s, background 0.15s;
}

.onboarding-header__back:hover {
  color: var(--text-1);
  background: var(--accent-subtle);
}

.onboarding-header__logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-1);
}

.onboarding-header__logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.onboarding-header__secure {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 10px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ─── Steg-indikatorer ────────────────────────────────────────────── */
.onboarding-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: var(--s-4) 0 0;
}

.onboarding-dot {
  width: 24px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s, width 0.3s;
}

.onboarding-dot.active {
  background: var(--accent);
}

/* ─── Body ────────────────────────────────────────────────────────── */
.onboarding-body {
  flex: 1;
  padding: var(--s-6) var(--s-5) var(--s-8);
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.onboarding-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: var(--s-2);
  letter-spacing: -0.3px;
}

.onboarding-sub {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: var(--s-5);
  line-height: 1.55;
}

/* ─── Bank-sökning ────────────────────────────────────────────────── */
.ob-search-wrap {
  position: relative;
  margin-bottom: var(--s-4);
}

.ob-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
}

.onboarding-search {
  width: 100%;
  padding: 11px var(--s-4) 11px 38px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.onboarding-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 94, 102, 0.08);
}

.onboarding-search::placeholder { color: var(--text-2); opacity: 0.7; }

/* ─── Bank-grid ───────────────────────────────────────────────────── */
.bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.bank-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
  user-select: none;
  position: relative;
}

.bank-card:hover {
  background: var(--accent-subtle);
  border-color: rgba(31, 94, 102, 0.3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.bank-card:active { transform: translateY(0); }

.bank-card.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 3px rgba(31, 94, 102, 0.08);
}

.bank-card__info { flex: 1; min-width: 0; }

.bank-card__name {
  color: var(--text-1);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-card__type {
  color: var(--text-2);
  font-size: var(--text-xs);
  margin-top: 2px;
}

.bank-card__check {
  flex-shrink: 0;
  color: var(--gain);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bank-card.selected .bank-card__check {
  opacity: 1;
  transform: scale(1);
}

/* ─── CTA + skip ──────────────────────────────────────────────────── */
.onboarding-connect-btn {
  width: 100%;
  margin-bottom: var(--s-3);
  background: var(--accent);
  color: #fff;
  border: none;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}

.onboarding-connect-btn:not(:disabled):hover {
  background: #2E7A82;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(31, 94, 102, 0.25);
}

.onboarding-connect-btn:not(:disabled):active { transform: translateY(0); }

.onboarding-skip {
  display: block;
  width: 100%;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-2);
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--s-2);
  font-family: var(--font-ui);
  transition: color 0.15s;
}

.onboarding-skip:hover { color: var(--text-1); }

/* ══════════════════════════════════════════════════════════════════
   SCREEN 1 — HUB INTRO
══════════════════════════════════════════════════════════════════ */
.ob-hub-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s-5) var(--s-5) var(--s-8);
  text-align: center;
  overflow-y: auto;
}

.ob-hub-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-5);
}

/* Orbiting rings */
.ob-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: ob-pulse 4s ease-in-out infinite;
}

.ob-orbit-1 { width: 100px; height: 100px; }
.ob-orbit-2 { width: 188px; height: 188px; animation-delay: 0.9s; }
.ob-orbit-3 { width: 276px; height: 276px; animation-delay: 1.8s; }

@keyframes ob-pulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.65; border-color: rgba(31, 94, 102, 0.35); }
}

/* SVG spokes */
.ob-spoke-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.ob-spoke {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.ob-spoke.visible { opacity: 0.25; }

/* Bank logo nodes */
.ob-hub-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ob-hub-node.visible { opacity: 1; transform: scale(1); }

.ob-hub-node[data-pos="0"] { top: 0;      left: 50%;  margin-left: -22px; }
.ob-hub-node[data-pos="1"] { top: 42px;   right: 16px; }
.ob-hub-node[data-pos="2"] { top: 50%;    right: 0;   margin-top: -22px; }
.ob-hub-node[data-pos="3"] { bottom: 36px; right: 48px; }
.ob-hub-node[data-pos="4"] { bottom: 36px; left: 48px; }
.ob-hub-node[data-pos="5"] { top: 50%;    left: 0;    margin-top: -22px; }
.ob-hub-node[data-pos="6"] { top: 42px;   left: 16px; }

/* Center button */
.ob-hub-center {
  position: relative;
  z-index: 10;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 28px rgba(31, 94, 102, 0.12), var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ob-hub-center:hover {
  transform: scale(1.06);
  box-shadow: 0 0 44px rgba(31, 94, 102, 0.22), var(--shadow-md);
}

.ob-hub-center:active { transform: scale(0.97); }

/* Text */
.ob-hub-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-2);
}

.ob-hub-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
  color: var(--text-1);
  margin-bottom: var(--s-3);
}

.ob-hub-sub {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.65;
  max-width: 300px;
  margin-bottom: var(--s-5);
}

/* Security pills */
.ob-pills {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--s-5);
}

.ob-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-2);
}

.ob-pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.ob-hub-cta {
  width: 100%;
  max-width: 340px;
  margin-bottom: var(--s-3);
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--text-md);
  font-weight: 700;
  padding: 14px var(--s-6);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(31, 94, 102, 0.22);
}

.ob-hub-cta:hover {
  background: #2E7A82;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(31, 94, 102, 0.32);
}

.ob-hub-cta:active { transform: translateY(0); }

/* ══════════════════════════════════════════════════════════════════
   SCREEN 3 — CONNECTING (premium)
══════════════════════════════════════════════════════════════════ */
.ob-connect-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--s-5);
}

/* Spinning ring + logo */
.ob-connect-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-5);
}

.ob-connect-ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ob-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 2.5;
}

.ob-ring-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 70 207;
  transform-origin: 50px 50px;
  animation: ob-arc-spin 1.3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ob-arc-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.ob-connect-logo {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Pulse rings behind the logo */
.ob-connect-pulse {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1.5px solid rgba(31, 94, 102, 0.2);
  animation: ob-grow-fade 2s ease-out infinite;
  pointer-events: none;
}

.ob-connect-pulse--2 {
  animation-delay: 1s;
}

@keyframes ob-grow-fade {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0;   }
}

.ob-connect-title {
  text-align: center;
  margin-bottom: var(--s-1);
}

.ob-connect-bank-name { color: var(--accent); }

.ob-connect-sub {
  text-align: center;
  margin-bottom: var(--s-5);
}

/* Step list */
.ob-steps {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.ob-step {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  background: var(--surface);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.ob-step--pending {
  background: transparent;
  border-color: transparent;
  opacity: 0.5;
}

.ob-step--active {
  background: var(--accent-subtle);
  border-color: rgba(31, 94, 102, 0.25);
  box-shadow: 0 2px 10px rgba(31, 94, 102, 0.08);
  opacity: 1;
}

.ob-step--done {
  background: var(--surface);
  border-color: var(--border);
  opacity: 1;
}

.ob-step__icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.ob-step--pending .ob-step__icon-wrap {
  background: var(--bg);
  color: var(--text-2);
}

.ob-step--active .ob-step__icon-wrap {
  background: rgba(31, 94, 102, 0.12);
  color: var(--accent);
  animation: ob-icon-pulse 1.6s ease-in-out infinite;
}

.ob-step--done .ob-step__icon-wrap {
  background: rgba(34, 197, 94, 0.1);
  color: var(--gain);
}

@keyframes ob-icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 94, 102, 0.25); }
  50%       { box-shadow: 0 0 0 5px rgba(31, 94, 102, 0); }
}

.ob-step__icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-step__content { flex: 1; }

.ob-step__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}

.ob-step__detail {
  font-size: var(--text-xs);
  color: var(--text-2);
  margin-top: 2px;
  transition: color 0.2s;
}

.ob-step--active .ob-step__detail { color: var(--accent); }

.ob-step__badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
  min-width: 30px;
  text-align: right;
  transition: color 0.2s;
}

.ob-step__badge--active { color: var(--accent); }
.ob-step__badge--done   { color: var(--gain); }

/* Spinning icon */
.ob-spin-icon {
  animation: ob-icon-spin 0.9s linear infinite;
}

@keyframes ob-icon-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Checkmark pop-in */
.ob-check-pop {
  animation: ob-check-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes ob-check-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════
   SCREEN 4 — SUCCESS
══════════════════════════════════════════════════════════════════ */
.ob-success-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--s-5);
  text-align: center;
}

.ob-success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gain);
  margin-bottom: var(--s-5);
  animation: ob-icon-appear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ob-icon-appear {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.ob-success-title { text-align: center; }
.ob-success-sub   { max-width: 280px; text-align: center; }

/* Total wealth banner */
.ob-success-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-6);
  margin-bottom: var(--s-5);
  width: 100%;
  max-width: 380px;
}

.ob-success-total__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.ob-success-total__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-1);
}

/* Account list */
.ob-success-list {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
  text-align: left;
}

.ob-success-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  animation: ob-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes ob-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ob-success-row__info { flex: 1; min-width: 0; }

.ob-success-row__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
}

.ob-success-row__type {
  font-size: var(--text-xs);
  color: var(--text-2);
  margin-top: 2px;
}

.ob-success-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.ob-success-row__balance {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ob-success-row__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  border-radius: 4px;
  padding: 2px 6px;
}

.ob-success-cta {
  width: 100%;
  max-width: 380px;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--text-md);
  font-weight: 700;
  padding: 14px var(--s-6);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(31, 94, 102, 0.22);
}

.ob-success-cta:hover {
  background: #2E7A82;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(31, 94, 102, 0.3);
}

.ob-success-cta:active { transform: translateY(0); }

/* ══════════════════════════════════════════════════════════════════
   SCREEN 5 — PROFILE COLLECTION
══════════════════════════════════════════════════════════════════ */
.ob-profile-section {
  margin-bottom: var(--s-5);
}

.ob-profile-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: var(--s-2);
  display: block;
}

.ob-profile-options {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.ob-profile-options--row {
  flex-direction: row;
  gap: var(--s-2);
}

.ob-profile-option {
  display: block;
  cursor: pointer;
}

.ob-profile-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ob-profile-option__inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ob-profile-option:hover .ob-profile-option__inner {
  border-color: rgba(31, 94, 102, 0.35);
  background: var(--accent-subtle);
}

.ob-profile-option input:checked ~ .ob-profile-option__inner {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 3px rgba(31, 94, 102, 0.08);
}

.ob-profile-option__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}

.ob-profile-option__sub {
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.4;
}

/* Compact options (risk row) */
.ob-profile-option--compact {
  flex: 1;
}

.ob-profile-option--compact .ob-profile-option__inner {
  align-items: center;
  text-align: center;
  padding: var(--s-3) var(--s-2);
}

/* Birth year input */
.ob-profile-input {
  width: 100%;
  padding: 11px var(--s-4);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.ob-profile-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 94, 102, 0.08);
}

.ob-profile-input::placeholder { color: var(--text-2); opacity: 0.7; }

/* Save button */
.ob-profile-save {
  width: 100%;
  margin-bottom: var(--s-3);
  background: var(--accent);
  color: #fff;
  border: none;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}

.ob-profile-save:hover {
  background: #2E7A82;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(31, 94, 102, 0.25);
}

.ob-profile-save:active { transform: translateY(0); }
