/* Everise onboarding — Revolut-style (ref: /workspace/mobbin-shots/revolut-*)
   Near-black canvas, navy glow, white bold titles, dark-grey rounded surfaces,
   full-width white pill CTA, list rows with chevrons. */
:root {
  --bg: #000;
  --navy: #1a2a8c;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --surface-solid: #1c1c1e;
  --surface-hover: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.08);
  --text: #fff;
  --muted: rgba(235, 235, 245, 0.6);
  --faint: rgba(235, 235, 245, 0.38);
  --blue: var(--myriad); /* owner rule: boarding accent everywhere (was #3b6cff) */
  --blue-glow: var(--myriad-glow);
  /* Myriad Capital brand accent (#30E5CB) — soft Revolut-style glow */
  --myriad: #30E5CB;
  --myriad-glow: rgba(48, 229, 203, 0.45);
  --myriad-glow-soft: rgba(48, 229, 203, 0.22);
  --green: #34c759;
  --amber: #ffb340;
  --red: #ff453a;
  --r-card: 20px;
  --r-field: 16px;
  --font: "Aeonik Pro", "Manrope", "SF Pro Display", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(70% 38% at 70% 0%, rgba(48, 229, 203, 0.18), transparent 70%),
    radial-gradient(120% 55% at 20% -5%, #0d2a28 0%, #071412 38%, rgba(0, 0, 0, 0) 72%),
    var(--bg);
  background-attachment: fixed;
}
/* Welcome / done: soft Myriad green glow (Revolut-style, non-intrusive) */
body[data-current="start"], body[data-current="done"] {
  background:
    radial-gradient(95% 48% at 50% -5%, rgba(48, 229, 203, 0.42), transparent 68%),
    radial-gradient(60% 35% at 80% 10%, rgba(48, 229, 203, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}


.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82em; background: var(--surface); padding: 1px 6px; border-radius: 6px; }

.app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}

/* Thin Myriad accent stripe (subtle, under header) */
.brand-stripe {
  height: 1.5px;
  margin: 0 -20px 4px;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(48, 229, 203, 0.15) 12%,
    rgba(48, 229, 203, 0.55) 50%,
    rgba(48, 229, 203, 0.15) 88%,
    transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
}
body[data-current="start"] .brand-stripe,
body[data-current="done"] .brand-stripe {
  opacity: 1;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(48, 229, 203, 0.25) 10%,
    var(--myriad) 50%,
    rgba(48, 229, 203, 0.25) 90%,
    transparent 100%
  );
  box-shadow: 0 0 18px var(--myriad-glow-soft);
}


/* ---------- Top nav: back chevron + segmented progress ---------- */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 10px;
}
.icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--text);
  width: 40px; height: 40px; margin-left: -8px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--surface); }

.nav-brand {
  flex: 0 1 auto;
  min-width: 0;
  display: grid;
  place-items: center;
  height: 32px;
  margin-right: 2px;
  opacity: 0.92;
  transition: opacity .15s;
}
.nav-brand:hover { opacity: 1; }
/* Full Myriad Capital logo (mark + wordmark, same SVG as the start screen); scales down, never cut */
.nav-brand img { display: block; height: 28px; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 760px) { .nav-brand img { height: 22px; } }
@media (max-width: 380px) { .nav-brand img { height: 18px; } .nav-count { font-size: 12.5px; } .nav { gap: 10px; } }
body[data-current="start"] .nav-brand { visibility: hidden; width: 0; margin: 0; overflow: hidden; }

.segments { flex: 1; display: flex; gap: 4px; }
.seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); transition: background .3s; }
.seg.done { background: rgba(255, 255, 255, 0.9); }
.seg.current { background: linear-gradient(90deg, #fff 50%, var(--myriad) 78%, rgba(255,255,255,0.18) 78%); box-shadow: 0 0 8px var(--myriad-glow-soft); }
.nav-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
body[data-current="start"] .nav-count { visibility: hidden; }

main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Steps ---------- */
.step { display: none; flex-direction: column; flex: 1; padding: 18px 0 0; }
.step.active { display: flex; animation: rise .32s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.title {
  margin: 8px 0 10px;
  font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em;
}
.lead { margin: 0 0 26px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.eyebrow { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.eyebrow span:last-child { color: var(--faint); }

/* Welcome: heavy uppercase display */
.step[data-step="start"] .title { text-transform: uppercase; font-size: 38px; line-height: 1.02; letter-spacing: -0.01em; font-weight: 800; margin-top: 18px; }
.hero-logo {
  margin-top: 36px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 28px var(--myriad-glow));
}
.hero-logo img {
  display: block;
  width: min(220px, 72vw);
  height: auto;
}

/* ---------- Lists / rows ---------- */
.list { list-style: none; margin: 0; padding: 6px 0; border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row strong { display: block; font-weight: 600; font-size: 16px; }
.list-row span:not(.list-ic) { color: var(--muted); font-size: 14px; }
.list-ic {
  flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1); font-weight: 700; font-size: 15px;
}

/* Selectable cards (Verify your identity) */
.choice-grid { display: grid; gap: 12px; margin: 0 0 16px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 18px 44px 18px 18px; border-radius: var(--r-card);
  background: var(--surface); border: 2px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.choice::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--faint); border-top: 2px solid var(--faint);
  transform: translateY(-50%) rotate(45deg);
}
.choice:hover { background: var(--surface-hover); }
.choice.selected { border-color: var(--blue); background: rgba(48, 229, 203, 0.12); }
.choice > input { position: absolute; opacity: 0; pointer-events: none; }
.choice strong { display: block; font-size: 17px; font-weight: 600; margin-bottom: 3px; }
.choice span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.choice-ic {
  flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); color: #fff;
}

/* Grouped checkbox rows (Risk disclosure consent) */
.group-list { border-radius: var(--r-card); background: var(--surface); overflow: hidden; margin-bottom: 12px; }
.check-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; position: relative;
}
.group-list .check-row + .check-row { border-top: 1px solid var(--line); }
.q-fields > .check-row, .q-group .check-row {
  background: var(--surface); border-radius: var(--r-field); margin-bottom: 8px;
}
.check-row label { flex: 1; cursor: pointer; font-size: 15px; line-height: 1.4; }
.check-row label::before { content: ""; position: absolute; inset: 0; }
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: 0 0 22px; width: 22px; height: 22px; margin: 0;
  border-radius: 7px; border: 2px solid rgba(255, 255, 255, 0.45); background: transparent;
  display: grid; place-items: center; cursor: pointer; position: relative; z-index: 1;
  transition: background .15s, border-color .15s;
}
input[type="checkbox"]:checked { background: #fff; border-color: #fff; }
input[type="checkbox"]:checked::after {
  content: ""; width: 10px; height: 5px; border-left: 2.4px solid #000; border-bottom: 2.4px solid #000;
  transform: translateY(-1px) rotate(-45deg);
}

/* ---------- Fields: dark-grey boxes with floating label ---------- */
.field { margin-bottom: 12px; }
.field > label {
  display: block; font-size: 15px; font-weight: 600; color: var(--text); margin: 6px 2px 10px; line-height: 1.35;
}
.field:has(> input), .field:has(> select), .field:has(> textarea), .field:has(> .input-icon) { position: relative; }
.field:has(> input) > label, .field:has(> select) > label, .field:has(> textarea) > label, .field:has(> .input-icon) > label {
  position: absolute; z-index: 1; left: 17px; right: 40px; top: 10px; margin: 0;
  font-size: 12.5px; font-weight: 500; color: var(--muted); pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
input:where(:not([type="checkbox"]):not([type="radio"])), select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-field);
  padding: 15px 16px; min-height: 58px; outline: none;
  transition: border-color .15s, background .15s;
}
.field:has(> label) > input, .field:has(> label) > select { padding: 30px 16px 10px; min-height: 64px; line-height: 22px; }
.field:has(> label) > textarea { padding: 32px 16px 10px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { background: rgba(255, 255, 255, 0.15); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); background: rgba(255, 255, 255, 0.12); }
textarea { resize: vertical; min-height: 92px; }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff99' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
select option { background: #1c1c1e; color: #fff; }
input[type="date"] { color-scheme: dark; }
.input-xl { font-size: 22px !important; padding-top: 30px !important; min-height: 70px !important; line-height: 28px !important; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 16px; bottom: 13px; color: var(--muted); pointer-events: none; }
.input-icon input { padding: 30px 16px 10px 44px !important; min-height: 64px; line-height: 22px; }
.field:has(> .input-icon) > label { left: 45px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2 > .field { margin-bottom: 12px; }
.hint { font-size: 13px; color: var(--faint); margin-top: 8px; line-height: 1.4; }
.field > .hint { margin-left: 4px; }
.req { color: var(--muted); font-weight: 400; }

.field.invalid > input, .field.invalid > select, .field.invalid > textarea { border-color: var(--red); }
.field.invalid > label { color: var(--red); }
.field.invalid .radio-pill { box-shadow: inset 0 0 0 2px rgba(255, 69, 58, 0.6); }

/* ---------- Radio → selectable rows (one per line, radio dot right) ---------- */
.radio-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.radio-stack { grid-template-columns: 1fr; }
.radio-pill {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 16px 50px 16px 18px; min-height: 56px;
  background: var(--surface); border-radius: var(--r-field); border: 2px solid transparent;
  font-size: 15px; line-height: 1.35; cursor: pointer; transition: background .15s, border-color .15s;
}
.radio-pill:hover { background: var(--surface-hover); }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill::after {
  content: ""; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4);
  transition: border .15s, background .15s;
}
.radio-pill:has(input:checked) { border-color: var(--blue); background: rgba(48, 229, 203, 0.12); }
.radio-pill:has(input:checked)::after { border: 6px solid #fff; background: #000; }
.radio-pill:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Questionnaire sub-pager ---------- */
.q-form { display: flex; flex-direction: column; }
.q-section { display: none; }
.q-section.active { display: block; animation: rise .28s cubic-bezier(.2,.8,.2,1); }
.q-section > .title { margin-top: 10px; }
.q-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.q-fields > * { grid-column: 1 / -1; }
.q-fields > .field.half { grid-column: auto; }
.q-sub {
  margin: 20px 2px 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.q-sub.invalid { color: var(--red); }
.q-group { padding: 4px 0 4px 12px; border-left: 2px solid rgba(255,255,255,.12); margin: 0 0 8px; }
.q-group.hidden { display: none; }
.q-address > .q-fields .field { margin-bottom: 8px; }
.q-address > label { position: static !important; font-size: 15px !important; color: var(--text) !important; font-weight: 600 !important; margin: 6px 2px 10px !important; }
.q-key { display: none; }

.instrument-card {
  background: var(--surface); border-radius: var(--r-card); padding: 16px; margin-bottom: 12px;
  border: 2px solid transparent;
}
.instrument-card.invalid { border-color: var(--red); }
.instrument-card h4 { margin: 2px 2px 12px; font-size: 17px; font-weight: 700; }
.instrument-card .subgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.instrument-card select { background-color: rgba(255,255,255,.08); }

/* ---------- Actions: pinned full-width pill CTA ---------- */
.actions {
  position: sticky; bottom: 0; z-index: 4; margin-top: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px 0 calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.85) 35%, #000 100%);
}
.step > .actions { margin-top: auto; }
.btn {
  appearance: none; border: 0; width: 100%; min-height: 54px; padding: 14px 22px;
  border-radius: 999px; font: inherit; font-size: 16.5px; font-weight: 600; letter-spacing: -0.005em;
  cursor: pointer; transition: transform .1s, background .15s, opacity .15s, box-shadow .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover:not(:disabled) { background: #e9e9ee; }
.btn-primary:disabled { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.4); cursor: not-allowed; }
.btn-secondary, .btn-ghost { background: #1c1c1e; color: #fff; }
.btn-secondary:hover:not(:disabled), .btn-ghost:hover:not(:disabled) { background: #2c2c2e; }
.btn-secondary:disabled, .btn-ghost:disabled { color: rgba(255, 255, 255, 0.4); cursor: not-allowed; }
.btn-success { background: #fff; color: #000; }
.btn-sm { min-height: 44px; font-size: 15px; width: auto; padding: 10px 18px; }
[data-step="start"] .btn-primary { box-shadow: 0 0 0 1.5px rgba(48,229,203,.55), 0 0 28px var(--myriad-glow); }
.btn .spinner { border-color: rgba(0,0,0,.2); border-top-color: #000; }

/* ---------- Alerts / pills (inline banners, Revolut-style) ---------- */
.alert {
  display: none; border-radius: var(--r-field); padding: 14px 16px 14px 46px; margin: 4px 0 14px;
  font-size: 14.5px; line-height: 1.45; background: var(--surface); color: var(--text); position: relative;
}
.alert.show { display: block; }
.alert::before {
  content: "i"; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #000; background: var(--muted);
}
.alert-info::before { background: var(--myriad); }
.alert-ok::before { content: "✓"; background: var(--green); }
.alert-warn::before { content: "!"; background: var(--amber); }
.alert-err { background: rgba(255, 69, 58, 0.14); }
.alert-err::before { content: "!"; background: var(--red); color: #fff; }
.alert .hint { color: var(--muted); }
.alert .btn { margin-top: 10px; }

.result-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: #fff; color: #000;
}
.result-pill.ok::before { content: "✓"; }

/* ---------- Dev drawers (kept, visually quiet) ---------- */
details.dev {
  margin: 14px 0; border-radius: var(--r-field); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); padding: 0 16px;
}
details.dev > summary {
  list-style: none; cursor: pointer; padding: 14px 0; font-size: 14px; color: var(--muted); font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
}
details.dev > summary::-webkit-details-marker { display: none; }
details.dev > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .2s; }
details.dev[open] > summary::after { transform: rotate(-135deg); }
details.dev[open] { padding-bottom: 14px; }
.payload-preview {
  margin: 0; background: #0a0a0c; border-radius: 12px; padding: 12px; max-height: 260px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  white-space: pre-wrap; word-break: break-word; color: rgba(255,255,255,.75);
}

/* ---------- Done ---------- */
.done-brand {
  margin-top: 28px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 22px var(--myriad-glow));
}
.done-brand img {
  display: block;
  width: min(180px, 60vw);
  height: auto;
  opacity: 0.95;
}
.done-icon {
  width: 72px; height: 72px; border-radius: 50%; margin-top: 18px; display: grid; place-items: center;
  background: #fff; color: #000; box-shadow: 0 10px 40px var(--myriad-glow);
}
.summary { border-radius: var(--r-card); background: var(--surface); padding: 6px 18px; font-size: 14.5px; color: var(--muted); }
.summary:empty { display: none; }
.summary strong { color: var(--text); }
.summary code { background: transparent; color: var(--text); padding: 0; }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Desktop: centered phone-like column ---------- */
@media (min-width: 720px) {
  .app { padding: 24px 28px 0; }
  .brand-stripe { margin-left: -28px; margin-right: -28px; }
  .title { font-size: 36px; }
  [data-step="start"] .title { font-size: 44px; }
}
@media (max-width: 400px) {
  .grid-2, .instrument-card .subgrid { grid-template-columns: 1fr; gap: 0; }
  .q-fields > .field.half { grid-column: 1 / -1; }
  .title { font-size: 28px; }
}

.disclosure-box{background:#f6fbfa;border:1px solid rgba(48,229,203,.35);border-radius:16px;padding:16px 18px;margin:12px 0;line-height:1.45;color:#1a2b2a}
.disclosure-box p{margin:0 0 10px}
.disclosure-box p:last-child{margin:0}
.check-row{display:flex;gap:10px;align-items:flex-start;margin-top:14px;font-weight:600}
.check-row.invalid{color:#b42318}
.choice-stack{display:flex;flex-direction:column;gap:10px}
.instrument-card.invalid,.instrument-card .field.invalid{outline:1px solid rgba(180,35,24,.45);border-radius:12px}

/* Official Priimtinumo instrument cards */
.inst-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  margin-right: 0.25rem;
  border-radius: 0.35rem;
  background: var(--myriad);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
}
.inst-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
}
.inst-badge.required { background: #fef3c7; color: #92400e; }
.inst-badge.optional { background: rgba(48, 229, 203, 0.14); color: var(--myriad); }
.inst-hint {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}
.knowledge-qs {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.knowledge-qs .field label {
  font-weight: 500;
  line-height: 1.35;
}
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}





/* ---------- Ondato KYC step ---------- */
.ondato-actions { gap: 10px; }
.ondato-actions .btn-secondary { order: 0; }
.ondato-support {
  margin: 0 0 8px;
  font-size: 13px;
  word-break: break-all;
}
.ondato-fallback {
  margin-top: 8px;
  opacity: 0.72;
}
.ondato-fallback .check-row label { font-weight: 500; font-size: 13.5px; color: var(--muted); }


/* ---------- Smart-ID / Mobile-ID auth step ---------- */
.auth-panel { margin: 0 0 14px; }
.auth-panel[hidden], .challenge-box[hidden], .account-picker[hidden] { display: none !important; }
.challenge-box {
  margin: 0 0 14px; padding: 18px 16px; border-radius: var(--r-card);
  background: var(--surface); text-align: center;
  border: 1px solid rgba(48, 229, 203, 0.35);
}
.challenge-title { margin: 0 0 8px; font-weight: 600; font-size: 16px; }
.challenge-code {
  margin: 0 0 8px; font-size: 36px; font-weight: 800; letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums; color: #fff;
}
.account-picker { display: grid; gap: 10px; margin: 0 0 14px; }
.account-picker .choice { cursor: pointer; }
.manual-fallback {
  margin-top: 18px; border-radius: var(--r-card); background: var(--surface);
  padding: 0 14px; border: 1px solid var(--line);
}
.manual-fallback > summary {
  list-style: none; cursor: pointer; padding: 14px 4px; font-size: 14px;
  color: var(--muted); font-weight: 500; display: flex; align-items: center; justify-content: space-between;
}
.manual-fallback > summary::-webkit-details-marker { display: none; }
.manual-fallback > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg); transition: transform .2s; margin-right: 4px;
}
.manual-fallback[open] > summary::after { transform: rotate(-135deg); }
.manual-fallback[open] { padding-bottom: 14px; }
.field-hint { font-size: 13px; color: var(--faint); margin: 6px 2px 0; line-height: 1.4; }


/* ---------- Existing-client card (kliento kortelė) ---------- */
.client-card {
  margin: 0 0 18px;
  padding: 22px 18px 18px;
  border-radius: var(--r-card);
  background:
    linear-gradient(145deg, rgba(48, 229, 203, 0.14), transparent 55%),
    var(--surface-solid);
  border: 1px solid rgba(48, 229, 203, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.client-card-loading,
.client-card-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 2px;
}
.client-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.client-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #06241f;
  background: linear-gradient(145deg, var(--myriad), #1aa894);
  flex-shrink: 0;
}
.client-card-name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.client-card-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.client-card-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}
.client-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}
.client-card-row .label {
  font-size: 12px;
  color: var(--faint);
  font-weight: 500;
}
.client-card-row .value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.client-card-chips-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.client-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 4px;
}
.status-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}
.status-chip.done {
  border-color: rgba(52, 199, 89, 0.35);
  background: rgba(52, 199, 89, 0.12);
  color: #9dffb5;
}
.status-chip.pending {
  border-color: rgba(255, 179, 64, 0.35);
  background: rgba(255, 179, 64, 0.12);
  color: #ffd48a;
}
.status-chip.progress {
  border-color: rgba(48, 229, 203, 0.4);
  background: rgba(48, 229, 203, 0.14);
  color: var(--myriad);
}
.status-chip.clickable {
  cursor: pointer;
}
.status-chip.clickable:hover {
  filter: brightness(1.08);
}
.status-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.account-actions {
  flex-wrap: wrap;
}
body[data-current="account"] {
  background:
    radial-gradient(85% 42% at 50% -8%, rgba(48, 229, 203, 0.28), transparent 68%),
    var(--bg);
  background-attachment: fixed;
}

/* Extra instruments (Margin minimal package) */
.extra-instruments {
  margin-top: 18px;
  padding: 14px 14px 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}
.extra-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.extra-toggles { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; }
.extra-toggle {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.05); cursor: pointer;
  font-size: 14px; line-height: 1.35;
}
.extra-toggle input { margin-top: 3px; accent-color: #30E5CB; }
.extra-toggle .inst-letter { font-weight: 800; color: #30E5CB; min-width: 1.2em; }
#extraInstrumentCards .instrument-card { margin-top: 10px; }


/* =====================================================================
   Onboarding status stepper (wizard top + "Paskyros atidarymo būsena")
   Same palette as the rest of the prototype: dark surfaces, Myriad #30E5CB,
   existing amber / blue / faint tokens. No new brand colours.
   ===================================================================== */
.back-btn {
  width: auto; height: 40px; padding: 0 12px 0 4px; gap: 2px; border-radius: 999px;
  display: inline-flex; align-items: center; font: inherit; font-size: 15px; font-weight: 600;
}
.nav-spacer { flex: 1; }
.nav-count { min-width: 0; white-space: nowrap; }

/* ---- shared vertical timeline ---- */
.stage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.stage { position: relative; }
.stage:not(:last-child)::after {
  content: ""; position: absolute; left: 26px; top: 46px; bottom: -8px; width: 2px; border-radius: 2px;
  background: var(--line); pointer-events: none;
}
.stage.s-done:not(:last-child)::after { background: rgba(48, 229, 203, 0.45); }
.stage-btn {
  appearance: none; width: 100%; border: 1px solid transparent; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; border-radius: 16px;
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 10px 10px 11px; transition: background .15s, border-color .15s;
}
.stage-btn:hover { background: var(--surface); }
.stage-btn:focus-visible { outline: 2px solid var(--myriad); outline-offset: 2px; }
.stage.s-current .stage-btn { background: rgba(48, 229, 203, 0.08); border-color: rgba(48, 229, 203, 0.35); }
.stage.s-locked .stage-btn { cursor: not-allowed; }
.stage.s-locked .stage-btn:hover { background: transparent; }
.stage.s-locked .stage-title { color: var(--muted); }

.stage-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  font-size: 14px; font-weight: 800; background: rgba(255, 255, 255, 0.08); color: var(--faint);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}
.s-done .stage-dot { background: var(--myriad); border-color: var(--myriad); color: #06241f; }
.s-current .stage-dot { background: #000; border: 2px solid var(--myriad); box-shadow: 0 0 0 4px var(--myriad-glow-soft); }
.s-current .stage-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--myriad); }
.s-missing .stage-dot, .s-next .stage-dot { background: rgba(255, 179, 64, 0.14); border-color: rgba(255, 179, 64, 0.55); color: var(--amber); }
.s-waiting .stage-dot { background: rgba(48, 229, 203, 0.14); border-color: rgba(48, 229, 203, 0.45); color: var(--myriad); }
.s-locked .stage-dot { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); color: var(--faint); }

.stage-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stage-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.stage-n { color: var(--faint); font-weight: 600; }
.stage-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; line-height: 1.35; }
.stage-chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .01em; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--muted);
}
.s-done .stage-chip { border-color: rgba(48, 229, 203, 0.35); background: rgba(48, 229, 203, 0.12); color: var(--myriad); }
.s-current .stage-chip { border-color: var(--myriad); background: var(--myriad); color: #06241f; }
.s-missing .stage-chip, .s-next .stage-chip { border-color: rgba(255, 179, 64, 0.35); background: rgba(255, 179, 64, 0.12); color: #ffd48a; }
.s-waiting .stage-chip { border-color: rgba(48, 229, 203, 0.4); background: rgba(48, 229, 203, 0.14); color: var(--myriad); }
.stage-reason { color: var(--muted); }
.s-locked .stage-reason { color: var(--faint); }
.stage-unlock { font-size: 12px; color: var(--faint); }
.stage-unlock::before { content: "→ "; }
.stage-action {
  display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: var(--myriad);
}
.s-done .stage-action, .s-waiting .stage-action { color: var(--muted); }
.stepper-note {
  margin: 8px 4px 0; font-size: 13px; color: #ffd48a; line-height: 1.4;
}
.stepper-note[hidden] { display: none; }

/* ---- account card: status panel (hero + checklist) ---- */
.status-panel {
  margin: 0 0 14px; padding: 18px 14px 14px; border-radius: var(--r-card);
  background: linear-gradient(145deg, rgba(48, 229, 203, 0.14), transparent 55%), var(--surface-solid);
  border: 1px solid rgba(48, 229, 203, 0.22); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.status-panel[hidden] { display: none; }
.status-hero { display: flex; align-items: center; gap: 14px; padding: 0 4px; }
.status-ring { flex: 0 0 68px; }
.status-ring .ring-track { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 6; }
.status-ring .ring-fill {
  fill: none; stroke: var(--myriad); stroke-width: 6; stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--myriad-glow-soft)); transition: stroke-dashoffset .5s ease;
}
.status-ring .ring-text { fill: #fff; font-size: 15px; font-weight: 800; font-family: var(--font); }
.status-panel-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.status-summary { margin: 4px 0 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.status-next { margin: 14px 4px 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.status-next strong { color: var(--text); }
.status-cta { margin: 12px 0 14px; box-shadow: 0 0 0 1.5px rgba(48, 229, 203, .55), 0 0 22px var(--myriad-glow-soft); }
.status-panel .stage-list { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.status-mini { display: flex; gap: 4px; margin: 14px 4px 0; }
.status-mini i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); }
.status-mini i.m-done, .status-mini i.m-waiting { background: var(--myriad); }
.status-mini i.m-current { background: #fff; box-shadow: 0 0 8px var(--myriad-glow-soft); }
.status-mini i.m-missing, .status-mini i.m-next { background: var(--amber); }
.status-toggle {
  appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600;
  width: 100%; margin: 8px 0 0; padding: 8px 4px 2px; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
}
.status-toggle:hover { color: var(--text); }
.status-panel.open .status-toggle .stepper-caret { transform: rotate(180deg); }
.status-stages[hidden] { display: none; }
.status-hero-text { min-width: 0; flex: 1 1 auto; }
.status-hero .status-cta { flex: 0 0 auto; margin: 0; }
/* Account page: refresh actions sit at the end of the page (not pinned) so the portal menu stays in the first screen. */
body[data-current="account"] .account-actions { position: static; }
.status-foot { margin: 12px 4px 0; font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.client-card-section-title {
  margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}

/* ---- wizard top stepper: mobile = "Etapas X iš N · Name" dropdown ---- */
.wizard-stepper {
  margin: 8px 0 0; border-radius: var(--r-card); background: var(--surface);
  border: 1px solid var(--line); overflow: hidden;
}
.wizard-stepper[hidden] { display: none; }
.stepper-top {
  appearance: none; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "mini caret" "now caret";
  align-items: center; gap: 8px 10px; padding: 12px 14px; cursor: pointer; text-align: left;
}
.stepper-mini { grid-area: mini; display: flex; gap: 4px; }
.stepper-mini i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); }
.stepper-mini i.m-done { background: var(--myriad); }
.stepper-mini i.m-current { background: #fff; box-shadow: 0 0 8px var(--myriad-glow-soft); }
.stepper-mini i.m-missing, .stepper-mini i.m-next { background: var(--amber); }
.stepper-mini i.m-waiting { background: var(--myriad); }
.stepper-now { grid-area: now; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper-now strong { color: var(--text); font-weight: 700; }
.stepper-caret { grid-area: caret; color: var(--muted); transition: transform .2s; }
.wizard-stepper.open .stepper-caret { transform: rotate(180deg); }
.wizard-stepper .stage-list { display: none; padding: 4px 6px 6px; border-top: 1px solid var(--line); }
.wizard-stepper.open .stage-list { display: flex; }
.stepper-summary {
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted);
}
.wizard-stepper.open .stepper-summary { display: flex; }
.stepper-summary .btn { flex: 0 0 auto; min-height: 38px; padding: 8px 18px; font-size: 14.5px; }
.wizard-stepper .stepper-note { margin: 0 14px 12px; }
body[data-current="start"] .wizard-stepper { display: none; }
@media (max-width: 760px) { body[data-current="account"] .wizard-stepper { display: none; } } /* mobile client area: status card instead */
@media (max-width: 899px) {
  /* stage counter stays visible next to the full logo (owner: "Atgal" + logo + "Etapas X iš N" in every stage) */
}

/* ---- wizard top stepper: desktop = compact horizontal stepper ---- */
@media (min-width: 900px) {
  .wizard-stepper {
    width: min(980px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%);
    background: transparent; border: 0; overflow: visible; margin-top: 6px;
  }
  .wizard-stepper .stepper-top { display: none; }
  .wizard-stepper .stage-list,
  .wizard-stepper.open .stage-list {
    display: flex; flex-direction: row; gap: 0; padding: 4px 0 0; border-top: 0;
  }
  .wizard-stepper .stage { flex: 1 1 0; min-width: 0; }
  .wizard-stepper .stage:not(:last-child)::after {
    left: calc(50% + 20px); right: calc(-50% + 20px); width: auto; top: 22px; bottom: auto; height: 2px;
  }
  .wizard-stepper .stage-btn {
    grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 8px 4px; border-radius: 14px;
  }
  .wizard-stepper .stage-text { align-items: center; gap: 4px; }
  .wizard-stepper .stage-title { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
  .wizard-stepper .stage-n { display: none; }
  .wizard-stepper .stage-status { justify-content: center; }
  .wizard-stepper .stage-reason, .wizard-stepper .stage-unlock, .wizard-stepper .stage-action { display: none; }
  .wizard-stepper .stage-chip { font-size: 10.5px; padding: 0 7px; }
  .wizard-stepper .stage.s-current .stage-btn { background: rgba(48, 229, 203, 0.06); }
  .wizard-stepper .stepper-summary {
    display: flex; justify-content: center; border-top: 0; padding: 6px 0 2px;
  }
  .wizard-stepper .stepper-note { text-align: center; }
}

@media (min-width: 761px) and (max-width: 899px) {
  body[data-current="account"] .wizard-stepper {
    width: min(980px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%);
    background: transparent; border: 0; overflow: visible; margin-top: 6px;
  }
  body[data-current="account"] .wizard-stepper .stepper-top { display: none; }
  body[data-current="account"] .wizard-stepper .stage-list,
  body[data-current="account"] .wizard-stepper.open .stage-list {
    display: flex; flex-direction: row; gap: 0; padding: 4px 0 0; border-top: 0;
  }
  body[data-current="account"] .wizard-stepper .stage { flex: 1 1 0; min-width: 0; }
  body[data-current="account"] .wizard-stepper .stage:not(:last-child)::after {
    left: calc(50% + 20px); right: calc(-50% + 20px); width: auto; top: 22px; bottom: auto; height: 2px;
  }
  body[data-current="account"] .wizard-stepper .stage-btn {
    grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 8px 4px; border-radius: 14px;
  }
  body[data-current="account"] .wizard-stepper .stage-text { align-items: center; gap: 4px; }
  body[data-current="account"] .wizard-stepper .stage-title { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
  body[data-current="account"] .wizard-stepper .stage-n { display: none; }
  body[data-current="account"] .wizard-stepper .stage-status { justify-content: center; }
  body[data-current="account"] .wizard-stepper .stage-reason, body[data-current="account"] .wizard-stepper .stage-unlock, body[data-current="account"] .wizard-stepper .stage-action { display: none; }
  body[data-current="account"] .wizard-stepper .stage-chip { font-size: 10.5px; padding: 0 7px; }
  body[data-current="account"] .wizard-stepper .stage.s-current .stage-btn { background: rgba(48, 229, 203, 0.06); }
  body[data-current="account"] .wizard-stepper .stepper-summary {
    display: flex; justify-content: center; border-top: 0; padding: 6px 0 2px;
  }
  body[data-current="account"] .wizard-stepper .stepper-note { text-align: center; }
}

.btn[hidden] { display: none !important; }
/* Sticky header gets a dark backdrop so the status panel does not show through on scroll */
.nav { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
@media (min-width: 720px) { .nav { margin: 0 -28px; padding-left: 28px; padding-right: 28px; } }
/* Narrow screens: review rows show only the chevron, so stage names stay on one line */
@media (max-width: 480px) {
  .s-done .stage-action-label, .s-waiting .stage-action-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stage-title { font-size: 15px; }
  .stage-btn { gap: 10px; padding-right: 6px; }
}

/* =====================================================================
   Client portal (kliento sritis) — tabs inside the existing-client card.
   Existing palette only: dark surfaces, Myriad #30E5CB, amber/blue tokens.
   ===================================================================== */
.portal { display: block; }
.portal[hidden] { display: none; }
/* Menu card: sits directly under the onboarding stepper (#accountStatus); content card follows below. */
.portal-menu { padding: 16px 14px 14px; margin-bottom: 12px; position: relative; z-index: 2; }
.portal-panel.client-card { padding: 16px 14px 14px; }
.portal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 12px; }
.portal-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; }
.portal-top-tools { display: flex; align-items: center; gap: 8px; }
.mini-select {
  width: auto; min-height: 34px !important; padding: 4px 30px 4px 12px !important; font-size: 13px !important;
  border-radius: 999px; background-position: right 11px center; background-color: var(--surface-2);
}
.user-menu { position: relative; }
.user-menu-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
}
.user-menu-btn:hover { background: var(--surface-hover); }
.user-menu-list {
  position: absolute; right: 0; top: 42px; z-index: 6; min-width: 210px; padding: 6px;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
}
.user-menu-list[hidden] { display: none; }
.user-menu-list button {
  appearance: none; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px;
  text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; justify-content: space-between;
}
.user-menu-list button:hover { background: var(--surface); }
.user-menu-list button.danger { color: var(--red); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.portal-preview-note { margin: -4px 2px 10px; font-size: 12.5px; color: #ffd48a; }

/* All five items always visible: 3 + 2 equal-width grid (no horizontal scroll / clipping). */
.portal-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; }
.portal-tab { grid-column: span 2; }
.portal-tab:nth-child(n+4) { grid-column: span 3; }
.portal-tab {
  min-width: 0; appearance: none; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; cursor: pointer;
  padding: 9px 8px; min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted);
  display: flex; align-items: center; justify-content: center; text-align: center; gap: 5px;
}
.portal-tab svg { flex: 0 0 auto; }
.portal-tab-label { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
/* Mobile: 2-column grid, last item (Mano paskyra) full width. */
@media (max-width: 480px) {
  .portal-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-tab, .portal-tab:nth-child(n+4) { grid-column: span 1; }
  .portal-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.portal-tab:hover { color: var(--text); }
.portal-tab.on { color: var(--myriad); border-color: rgba(48, 229, 203, .55); background: rgba(48, 229, 203, .1); }
.portal-tab.locked { color: var(--faint); }
.portal-tab.locked.on { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.07); }
.portal-panel { display: flex; flex-direction: column; gap: 12px; }

.portal-card {
  border-radius: 16px; padding: 16px 14px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(48, 229, 203, 0.18); font-size: 14.5px; line-height: 1.5; color: var(--muted);
}
.portal-card p { margin: 0 0 10px; }
.portal-card p:last-child { margin-bottom: 0; }
.portal-card strong { color: var(--text); }
.portal-card a { color: var(--myriad); text-decoration: none; }
.portal-card a:hover { text-decoration: underline; }
.portal-card-quiet { border-color: var(--line); }
.portal-card-title { margin: 0 0 8px; color: var(--text); font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.portal-card .btn { margin-top: 6px; }
.portal-card .field { margin-bottom: 10px; }
.portal-muted { font-size: 13px; color: var(--faint) !important; margin-top: 10px !important; }
.portal-list { margin: 0 0 12px; padding-left: 18px; }
.portal-list li { margin-bottom: 6px; }
.store-row { display: flex; gap: 10px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: #000; color: var(--text); border: 1px solid rgba(255,255,255,.2); opacity: .75; cursor: default;
}

.portal-locked { text-align: center; padding: 26px 16px 22px; border-radius: 16px; border: 1px dashed rgba(255,255,255,.14); background: rgba(255,255,255,.03); }
.portal-locked-ic { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,255,255,.06); color: var(--muted); margin-bottom: 10px; }
.portal-locked-ic svg { width: 18px; height: 18px; }
.portal-locked-title { margin: 0 0 6px; font-weight: 700; color: var(--text); font-size: 15px; }
.portal-locked-text { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }
.portal-locked .btn { width: auto; }

.bank-pick-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; color: var(--text); font-weight: 600; font-size: 14px; }
.bank-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.bank-tile {
  appearance: none; font: inherit; font-weight: 800; font-size: 15px; letter-spacing: -0.01em; color: var(--text);
  min-height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer;
}
.bank-tile:hover { background: var(--surface-hover); }
.bank-tile.on { border-color: var(--myriad); background: rgba(48, 229, 203, .1); color: var(--myriad); }
@media (max-width: 400px) { .bank-tiles { grid-template-columns: repeat(2, 1fr); } }

.req-list { margin: 6px 0 0; display: grid; gap: 8px; }
.req-list > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); }
.req-list dt { font-size: 12px; color: var(--faint); }
.req-list dd { margin: 0; color: var(--text); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; word-break: break-word; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.copy-btn {
  appearance: none; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.copy-btn:hover { color: var(--myriad); border-color: rgba(48, 229, 203, .4); }

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); }
.doc-main { display: flex; flex-direction: column; min-width: 0; }
.doc-main strong { font-size: 14px; word-break: break-word; }
.doc-main span { font-size: 12.5px; color: var(--faint); }
.doc-row .btn { margin: 0; flex: 0 0 auto; }
.link-btn { appearance: none; border: 0; background: none; padding: 0; color: var(--myriad); font: inherit; cursor: pointer; text-decoration: underline; }

.seg-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); margin-bottom: 12px; }
.seg-toggle button { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.seg-toggle button.on { background: var(--myriad); color: #06241f; }
.hist-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hist-filters .field:last-child { grid-column: 1 / -1; }
.hist-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.hist-tools .btn { margin: 0; min-height: 38px; padding: 8px 14px; font-size: 13.5px; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.pay-table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--text); }
.pay-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); background: rgba(255,255,255,.05); padding: 9px 10px; white-space: nowrap; }
.pay-table td { padding: 9px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.pay-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.my-account .client-card-head { margin-bottom: 14px; }
.addr-field { position: relative; }
.addr-field > input[readonly] { opacity: .6; cursor: default; padding-right: 52px; }
.addr-edit {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 2;
  appearance: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-solid); color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.addr-edit:hover { color: var(--myriad); border-color: rgba(48, 229, 203, .4); }
.addr-editor { padding: 10px 0 2px 12px; border-left: 2px solid rgba(48, 229, 203, .35); margin: 0 0 12px; }
.addr-editor[hidden] { display: none; }
.ro-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.05); margin-bottom: 8px; }
.ro-label { font-size: 12.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.ro-value { font-size: 14px; font-weight: 600; color: var(--text); text-align: right; display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.locked-row { border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.locked-row .ro-value { color: var(--muted); }
.lock-note { display: block; line-height: 1.5; font-size: 12.5px; color: var(--faint) !important; margin: 2px 2px 12px !important; }
.my-account .btn { margin-top: 2px; }

/* deposit link (opens Myriad Payments page in a new tab) + Mano paskyra wrapping fixes */
a.btn.btn-link-ext { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.lock-note svg { vertical-align: -1px; margin-right: 4px; }
.ro-value .mono { white-space: nowrap; }
.locked-row { flex-direction: column; gap: 4px; }
.locked-row .ro-value { text-align: left; word-break: break-all; }
.wd-rule svg { vertical-align: -1px; margin-right: 4px; }
.wd-empty { margin: 4px 0 12px; }
.locked-row .ro-value .mono, .locked-row .ro-value { white-space: normal; word-break: break-all; }

/* developer drawers: only with ?demo=1 */
body:not(.dev-tools) details.dev { display: none !important; }

/* Investavimo programėlė: QR + official store badges */
.app-qr-lead { margin-bottom: 10px !important; }
.app-download { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 4px 0 14px; }
.app-qr { width: 140px; height: 140px; padding: 8px; background: #fff; border-radius: 16px; display: grid; place-items: center; flex: none; }
.app-qr img { width: 124px; height: 124px; display: block; image-rendering: pixelated; }
.app-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.app-badge { display: inline-flex; border-radius: 9px; transition: transform .15s ease, box-shadow .15s ease; }
.app-badge img { display: block; height: 46px; width: auto; }
.app-badge:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--myriad-glow-soft); }
.app-badge:focus-visible { outline: 2px solid var(--myriad); outline-offset: 2px; }
.app-badges { flex-wrap: nowrap; }
@media (max-width: 480px) { .app-badge img { height: 40px; } }

/* ---- Unified flow: temporary manual paths, export card, mock banner (existing palette only) ---- */
.manual-entry { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-card); background: var(--surface); border: 1px dashed var(--line); }
.manual-entry[hidden] { display: none; }
.manual-entry-title { margin: 0; font-weight: 600; color: var(--text); }
.ondato-later { margin-top: 10px; flex-wrap: wrap; }
.doc-checklist .check-row label { color: var(--text); }
.export-card { padding: 14px 18px; }
.export-list { margin-top: 8px; }
.export-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.export-row:last-child { border-bottom: 0; }
.export-row span { color: var(--muted); }
.export-row strong { color: var(--text); text-align: right; font-weight: 500; word-break: break-word; }
.mock-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; padding: 10px 14px; border-radius: var(--r-field);
  background: var(--surface-solid); border: 1px solid var(--myriad-glow-soft); color: var(--muted); font-size: 13px; text-align: center; pointer-events: none; opacity: .92; }
body:has(.mock-banner) main { padding-bottom: 72px; }
.mock-banner b { color: var(--myriad); }
/* Start screen: the header has no visible content (back/brand/count hidden), so don't render the empty bar + stripe */
body[data-current="start"] .nav,
body[data-current="start"] .brand-stripe { display: none; }
body[data-current="start"] main { padding-top: 24px; }

/* ---------- Choice cards (radio/checkbox) — radio in its own fixed column, text never under it ---------- */
.radio-group {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  grid-auto-rows: 1fr; align-items: stretch; gap: 8px;
}
.radio-stack { grid-template-columns: 1fr; grid-auto-rows: auto; }
.radio-pill {
  display: grid; grid-template-columns: minmax(0, 1fr) 22px; column-gap: 14px; align-items: center;
  padding: 14px 16px 14px 18px; min-height: 56px; height: 100%;
  overflow-wrap: anywhere; hyphens: auto; text-align: left;
}
.radio-pill::after { position: static; transform: none; width: 22px; height: 22px; box-sizing: border-box; grid-column: 2; justify-self: end; }
.choice > div { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.check-row > label, .check-row > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.check-row > input[type="checkbox"] { flex: 0 0 22px; margin-top: 1px; }
@media (max-width: 520px) { .radio-group { grid-template-columns: 1fr; grid-auto-rows: auto; } }

/* Sticky header must not cover step / section titles */
html { scroll-padding-top: 0; }
.step .title, .q-section > .title, .q-section, .field[id$="_wrap"] { scroll-margin-top: 96px; }
.nav { background: rgba(0, 0, 0, 0.82); }

/* ---------- Selected / focus states — Myriad accent #30E5CB (no blue anywhere) ---------- */
.choice.selected, .radio-pill:has(input:checked) {
  border-color: var(--myriad); background: rgba(48, 229, 203, 0.08);
  box-shadow: 0 0 0 1px rgba(48, 229, 203, 0.25), 0 0 18px var(--myriad-glow-soft);
}
.radio-pill:has(input:checked)::after { border: 6px solid var(--myriad); background: #000; }
.radio-pill:has(input:focus-visible), .choice:has(input:focus-visible) { outline: 2px solid var(--myriad); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--myriad); }
input[type="checkbox"]:checked { background: var(--myriad); border-color: var(--myriad); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--myriad); outline-offset: 2px; }
:root { accent-color: var(--myriad); }

/* ---- Veriff identity verification (stage 4) — existing tokens only ---- */
.veriff-box { margin: 4px 0 6px; padding: 14px 14px 4px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.veriff-box[hidden] { display: none; }
.veriff-box .actions { position: static; padding: 0; margin: 0 0 10px; background: none; }
.veriff-status { margin: 0 0 12px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.veriff-status[hidden] { display: none; }
.veriff-status a { color: var(--myriad); }
.veriff-chip { display: inline-block; margin-right: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); }
.vs-approved .veriff-chip { color: var(--myriad); border-color: rgba(48, 229, 203, .55); background: rgba(48, 229, 203, .1); }
.vs-review .veriff-chip, .vs-pending .veriff-chip { color: var(--text); }
.vs-resubmission .veriff-chip, .vs-expired .veriff-chip { color: var(--amber); }
.vs-declined .veriff-chip { color: var(--red); }

/* TEMPORARY: existing-client Veriff run in "Mano paskyra" (VERIFF_ALLOW_EXISTING=1) */
#pvVeriffCard .veriff-status { margin: 0 0 12px; }
.pv-veriff-actions { display: flex; flex-wrap: wrap; gap: 10px; }


/* Veriff: success popup + mock InContext overlay (dark theme, Myriad accent) */
.idv-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.idv-modal[hidden] { display: none; }
.idv-modal-box {
  width: min(400px, 100%); padding: 28px 22px 22px; border-radius: var(--r-card); text-align: center;
  background: linear-gradient(145deg, rgba(48, 229, 203, 0.14), transparent 60%), var(--surface-solid);
  border: 1px solid rgba(48, 229, 203, .4); box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 32px var(--myriad-glow-soft);
}
.idv-modal-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #001a16; background: var(--myriad); box-shadow: 0 0 24px var(--myriad-glow-soft); }
.idv-modal-text { margin: 0 0 20px; font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text); }
.idv-modal-box .btn { width: 100%; }
.idv-modal-link { margin: -6px 0 14px; font-size: 15px; }
.idv-modal-link a { color: var(--myriad); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.idv-modal-sub { margin: 0 0 18px; font-size: 15px; line-height: 1.45; color: var(--text); opacity: .9; }
.idv-modal-box .idv-modal-secondary { margin-top: 10px; }
.doc-row.doc-signed { border-color: rgba(48, 229, 203, .45); box-shadow: inset 3px 0 0 var(--myriad); }
.mock-veriff-frame { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: rgba(0, 0, 0, .7); }
.mock-veriff-box { width: min(380px, 92vw); padding: 22px; border-radius: 16px; background: #fff; color: #111; text-align: center; }

/* Desktop client area (>760px): full horizontal 8-stage stepper on top, then the client-area menu as one
   horizontal bar (5 items + LT + profile) aligned with the stepper; selected panel opens below. Mobile unchanged. */
@media (min-width: 761px) {
  body[data-current="account"] #accountStatus,
  body[data-current="account"] section[data-step="account"] > .title,
  body[data-current="account"] section[data-step="account"] > .lead { display: none !important; }
  body[data-current="account"] .wizard-stepper .stepper-summary { display: flex; }
  /* menu bar lives in #portalBar (directly under the stepper) on every page while logged in */
  .portal-bar {
    --top-w: min(980px, calc(100vw - 48px));
    width: var(--top-w); margin-left: calc((100% - var(--top-w)) / 2); margin-top: 10px; margin-bottom: 14px;
  }
  .portal-bar > .portal-menu { margin: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
  .portal-menu .portal-top { order: 2; margin: 0; flex: 0 0 auto; }
  .portal-menu .portal-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .portal-menu .portal-tabs { order: 1; flex: 1 1 0; min-width: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .portal-menu .portal-tab, .portal-menu .portal-tab:nth-child(n+4) { grid-column: auto; }
  .portal-menu .portal-preview-note { order: 3; flex-basis: 100%; margin: 0; }
  .portal-menu #portalToast { order: 4; flex-basis: 100%; }
  .portal-menu { flex-wrap: wrap; }
  .portal-menu .portal-tabs, .portal-menu .portal-top { flex-wrap: nowrap; }
}

/* Stage 1 while logged in: hide the login UI, show only the logout panel */
section[data-step="legal"].logged-in > :not(#legalLoggedIn) { display: none !important; }
.legal-logged-in[hidden] { display: none; }
.legal-logout-actions { position: static; padding: 0; margin-top: 18px; background: none; }

/* Client-area menu bar outside the client area (logged in): directly under the stepper on every page */
@media (max-width: 760px) { .portal-bar { margin: 10px 0 0; } }
.portal-bar[hidden] { display: none !important; }
.portal-bar > .portal-menu { margin-bottom: 4px; }

/* Desktop horizontal stepper: every label reserves 2 lines (top-aligned) so all status chips sit on one line; chips never wrap */
@media (min-width: 900px) {
  .wizard-stepper .stage-title { display: block; min-height: 2.5em; } /* 2 × line-height 1.25 */
  .wizard-stepper .stage-chip { white-space: nowrap; }
  .wizard-stepper .stage-status { flex-wrap: nowrap; }
}
@media (min-width: 761px) and (max-width: 899px) {
  body[data-current="account"] .wizard-stepper .stage-title { display: block; min-height: 2.5em; }
  body[data-current="account"] .wizard-stepper .stage-chip { white-space: nowrap; }
  body[data-current="account"] .wizard-stepper .stage-status { flex-wrap: nowrap; }
}
