/* Shared styles for signup / login / onboarding forms (extends styles.css). */
.form-wrap { min-height: calc(100vh - 78px); background-color: #fbfdff; background-image: radial-gradient(circle, rgba(56,86,137,.13) 1px, transparent 1.2px); background-size: 28px 28px; padding: 64px 20px 96px; display: flex; justify-content: center; }
.form-panel { width: 100%; max-width: 660px; }
.form-panel.narrow { max-width: 520px; }
.form-panel > .section-label { margin-bottom: 14px; }
.form-panel h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 14px; }
.form-panel > p.intro { max-width: 520px; margin-bottom: 34px; }
.form-card { background: #fff; border: 1px solid #dfe4eb; border-radius: 20px; padding: 34px 30px; box-shadow: 0 30px 70px rgba(33,60,102,.08); }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 12px; font-weight: 750; color: #35445d; margin-bottom: 8px; letter-spacing: .02em; }
.field small.hint { display: block; font-size: 11px; color: #7b8492; margin-top: 7px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; border: 1px solid #d4dae5; border-radius: 9px; padding: 10px 14px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19,87,232,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sub-group { display: flex; align-items: stretch; }
.sub-group input { border-radius: 9px 0 0 9px; border-right: 0; }
.sub-suffix { display: flex; align-items: center; padding: 0 14px; border: 1px solid #d4dae5; border-radius: 0 9px 9px 0; background: var(--soft); color: #667183; font-size: 13px; white-space: nowrap; }
.sub-status { font-size: 11px; font-weight: 700; margin-top: 7px; display: none; }
.sub-status.ok { display: block; color: #15935b; }
.sub-status.bad { display: block; color: #c2372f; }
.form-error { display: none; margin: 0 0 18px; padding: 12px 15px; border: 1px solid #f3c6c2; background: #fdf2f1; color: #b03028; border-radius: 10px; font-size: 13px; }
.form-error.show { display: block; }
.submit-btn { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.submit-btn[disabled] { opacity: .6; cursor: default; transform: none !important; }
.after-note { font-size: 11px; color: #7b8492; text-align: center; margin: 16px 0 0; }

/* --- Loading states -------------------------------------------------------
   Shared by every public page. Motion is disabled under prefers-reduced-motion
   at the bottom of this file. */

/* Skeleton blocks: shown while a page fetches its own state. */
.sk { display: block; border-radius: 7px; background: linear-gradient(100deg, #eceff3 25%, #f7f9fb 40%, #eceff3 55%); background-size: 220% 100%; animation: sk-shimmer 1.35s ease infinite; }
@keyframes sk-shimmer { to { background-position: -220% 0; } }
.sk-title { height: 34px; width: 56%; margin-bottom: 12px; }
.sk-line { height: 14px; width: 78%; margin-bottom: 9px; }
.sk-line.short { width: 46%; }
.sk-field { height: 46px; margin-bottom: 18px; }
.sk-label { height: 11px; width: 110px; margin-bottom: 8px; }

/* Inline spinner for buttons mid-submit. */
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; vertical-align: -2px; }
.spin.dark { border-color: rgba(19,87,232,.25); border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Determinate progress bar for file uploads. */
.progress { display: none; margin-top: 14px; }
.progress.show { display: block; }
.progress-track { height: 6px; border-radius: 6px; background: #e7ebf2; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 6px; background: var(--blue); transition: width .25s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: #7b8492; margin-top: 7px; }

/* Page-level boot state: brand mark with a sweeping bar underneath. */
.boot { min-height: 320px; display: flex; align-items: center; justify-content: center; }
.boot-inner { text-align: center; width: min(240px, 70%); }
.boot-brand { font-size: 17px; font-weight: 750; letter-spacing: -.03em; animation: boot-fade 2s ease-in-out infinite; }
.boot-track { margin-top: 14px; height: 3px; border-radius: 3px; background: #e7ebf2; overflow: hidden; }
.boot-track > div { height: 100%; width: 38%; border-radius: 3px; background: var(--blue); animation: boot-sweep 1.25s ease-in-out infinite; }
.boot-note { margin-top: 12px; font-size: 12px; color: #7b8492; }
@keyframes boot-fade { 50% { opacity: .55; } }
@keyframes boot-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }

/* File-upload fields (KYC) */
.upload-field input[type="file"] { padding: 9px 12px; min-height: 0; font-size: 12px; background: var(--soft); cursor: pointer; }
.upload-field input[type="file"]::file-selector-button { border: 1px solid #d4dae5; background: #fff; color: #35445d; border-radius: 7px; padding: 6px 12px; font-size: 12px; font-weight: 700; margin-right: 12px; cursor: pointer; font-family: inherit; }

/* Onboarding step chrome */
.steps-bar { display: flex; gap: 10px; margin-bottom: 26px; }
.steps-bar span { flex: 1; height: 4px; border-radius: 4px; background: #dde3ec; }
.steps-bar span.done { background: var(--blue); }
.section-block { border-top: 1px solid #eef1f5; margin-top: 8px; padding-top: 22px; }
.section-block:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.section-block > h3 { font-size: 15px; margin-bottom: 4px; letter-spacing: -.02em; }
.section-block > p.blurb { font-size: 12px; color: #7b8492; margin-bottom: 18px; }

/* Status cards */
.status-card { text-align: center; padding: 46px 30px; }
.status-card .success-ring { margin: 0 auto 20px; }
.status-card h2 { font-size: 28px; margin-bottom: 12px; }
.status-card p { max-width: 440px; margin: 0 auto 8px; font-size: 14px; }
.status-card .button { margin-top: 24px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.status-pill.review { background: #fff2db; color: #a56b14; }
.status-pill.approved { background: #e3f8ed; color: #138953; }
.status-pill.rejected { background: #fdf2f1; color: #b03028; }

.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12px; color: #5d6879; }

@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 26px 18px; border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .sk, .spin, .boot-brand, .boot-track > div { animation: none; }
  .sk { background: #eceff3; }
  .boot-track > div { width: 100%; }
  .progress-fill { transition: none; }
}

/* Password visibility toggle.
   The control sits inside the field so it cannot be mistaken for a form action,
   and the input gets right padding so long passwords never run underneath it. */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 68px; width: 100%; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #5d6879;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.pw-toggle:hover { background: #eef1f5; color: #1c2430; }
.pw-toggle:focus-visible { outline: 2px solid var(--blue, #1357e8); outline-offset: 1px; }
