/* VisaReady — Customer App
   Mobile-first; centered ~430px frame on desktop.
   Palette from customer UI designs: blue #2E5BFF, orange accent #F58220,
   gray inputs #F2F4F7, ink #101828. */

:root {
  --blue: #2E5BFF;
  --blue-dark: #1F44C8;
  --blue-soft: #E8EEFF;
  --navy: #16244C;
  --orange: #F58220;
  --ink: #101828;
  --muted: #667085;
  --faint: #98A2B3;
  --line: #E4E7EC;
  --field: #F2F4F7;
  --error: #D92D20;
  --error-bg: #FEF3F2;
  --ok: #12B76A;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --shadow-card: 0 8px 30px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100dvh;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* Desktop: phone-like centered frame */
@media (min-width: 768px) {
  body { background: #E9ECF5; }
  #app {
    max-width: 430px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(22, 36, 76, 0.06), 0 24px 80px rgba(22, 36, 76, 0.18);
  }
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  animation: vr-fade 0.22s ease-out;
}

@keyframes vr-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

button { font-family: inherit; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-outline:hover:not(:disabled) { background: #F9FAFB; }

.btn-danger-outline {
  background: #fff;
  color: var(--error);
  border: 1px solid #FECDC9;
}
.btn-danger-outline:hover:not(:disabled) { background: var(--error-bg); }

.btn .arrow { font-weight: 400; }

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- fields */

.field { margin-bottom: 18px; text-align: left; }

.field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-wrap { position: relative; }

.field input {
  width: 100%;
  border: 1px solid transparent;
  background: var(--field);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input::placeholder { color: var(--faint); }

.field input:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(46, 91, 255, 0.12);
}

.field .helper {
  margin: 8px 2px 0;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

.eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.eye-btn:hover { color: var(--ink); }
.eye-btn svg { width: 20px; height: 20px; display: block; }

.input-wrap input.has-eye { padding-right: 46px; }

/* ---------------------------------------------------------------- alerts */

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
  text-align: left;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #FECDC9;
}

.alert-info {
  background: var(--blue-soft);
  color: var(--navy);
  border: 1px solid #C7D6FF;
}

/* ------------------------------------------------------------- checklist */

.checklist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.checklist li .tick {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: all 0.15s ease;
}

.checklist li .tick svg { width: 10px; height: 10px; display: none; }

.checklist li.ok { color: var(--ok); }
.checklist li.ok .tick { background: var(--ok); border-color: var(--ok); }
.checklist li.ok .tick svg { display: block; }

/* ---------------------------------------------------------------- splash */

.s-splash {
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 9dvh 28px 5dvh;
  background: #fff;
}

.splash-logo { margin-top: 2dvh; }
.splash-logo svg { width: min(52vw, 210px); height: auto; display: block; }

.splash-shield { margin: 3dvh 0; }
.splash-shield svg { width: min(56vw, 230px); height: auto; display: block; }

.splash-footer { line-height: 1.35; }
.splash-footer .powered { display: block; font-size: 15px; color: #475467; }
.splash-footer .tectogo { display: block; font-size: 24px; font-weight: 800; color: #2456C8; letter-spacing: 0.4px; }

/* ------------------------------------------------------------ onboarding */

.s-onb { padding: 4dvh 28px 4dvh; text-align: center; background: #fff; }

.onb-dots { display: flex; justify-content: center; gap: 8px; padding: 6px 0 2px; }
.onb-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #D9DEE8;
  transition: all 0.2s ease;
}
.onb-dots .dot.active { width: 30px; background: var(--blue); }

.onb-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 12px 0;
}
.onb-art svg { width: min(74vw, 300px); height: auto; display: block; }

.onb-copy h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.onb-copy p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 auto 30px;
  max-width: 320px;
}

.onb-skip {
  margin-top: 18px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
}
.onb-skip:hover { color: var(--ink); }

/* ----------------------------------------------------------------- auth */

.s-auth { background: #fff; }

.auth-hero {
  background: var(--blue);
  text-align: center;
  padding: 52px 24px 78px;
  color: #fff;
}

.auth-hero .logo-chip {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(9, 25, 74, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.auth-hero .logo-chip svg { width: 48px; height: 48px; display: block; }

.auth-hero h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-hero p {
  margin: 10px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin: -46px 16px 0;
  padding: 22px 20px 26px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Email | Mobile pill toggle */
.pill-toggle {
  display: flex;
  background: var(--field);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 6px;
}

.pill-toggle button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-toggle button.active { background: var(--blue); color: #fff; }
.pill-toggle button:disabled { cursor: not-allowed; opacity: 0.55; }

.pill-note {
  font-size: 12.5px;
  color: var(--faint);
  margin: 4px 2px 18px;
}

.auth-fields { margin-top: 6px; }

.forgot-row { text-align: right; margin: -8px 0 16px; }
.forgot-row .link { font-size: 13.5px; }

.auth-switch { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--faint);
  font-size: 13px;
  margin: 22px 0 16px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google { position: relative; }
.btn-google svg { width: 20px; height: 20px; }
.btn-google:disabled { opacity: 0.55; cursor: not-allowed; }

.google-note { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }

.auth-terms {
  margin: 26px 8px 34px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}
.auth-terms a { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------- forgot */

.s-forgot { background: #fff; }

.forgot-hero {
  background: var(--blue);
  color: #fff;
  padding: 44px 24px 66px;
  text-align: center;
}
.forgot-hero h1 { margin: 0; font-size: 23px; font-weight: 800; }
.forgot-hero p { margin: 8px 0 0; font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.5; }

.forgot-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin: -40px 16px 0;
  padding: 24px 20px 28px;
  position: relative;
  z-index: 1;
}

.code-row {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 8px 0 18px;
}

.code-box {
  width: 46px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  transition: all 0.12s ease;
  padding: 0;
}

.code-box:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(46, 91, 255, 0.12);
}

.resend-row {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

.forgot-links { text-align: center; margin-top: 18px; font-size: 14px; }

.success-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #E7F8F0;
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 18px;
}
.success-badge svg { width: 36px; height: 36px; }

.forgot-success { text-align: center; }
.forgot-success h2 { margin: 0 0 8px; font-size: 20px; }
.forgot-success p { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* --------------------------------------------------------------- consent */

.s-consent { background: #fff; padding: 0; }

.consent-hero {
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 52px 24px 30px;
}
.consent-hero h1 { margin: 0; font-size: 22px; font-weight: 800; }
.consent-hero p { margin: 8px 0 0; font-size: 14px; color: rgba(255,255,255,0.85); }

.consent-body { padding: 22px 20px 30px; display: flex; flex-direction: column; flex: 1; }

.version-chip {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.terms-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FCFCFD;
  padding: 18px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #344054;
  text-align: left;
  margin-bottom: 20px;
}
.terms-card h3 { margin: 14px 0 6px; font-size: 14.5px; color: var(--ink); }
.terms-card h3:first-child { margin-top: 0; }
.terms-card p, .terms-card ul { margin: 0 0 10px; }
.terms-card ul { padding-left: 18px; }

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #344054;
  text-align: left;
  margin-bottom: 22px;
  cursor: pointer;
  line-height: 1.5;
}
.consent-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); flex: 0 0 auto; }

/* ----------------------------------------------------------------- home */

.s-home { background: #F6F7FB; }

.home-body { flex: 1; padding: 22px 18px 96px; }

.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.home-head .hi { font-size: 21px; font-weight: 800; margin: 0; }
.home-head .sub { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #fff;
}

.start-card {
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: left;
  background: linear-gradient(115deg, #2E5BFF 0%, #4C7AFF 100%);
  color: #fff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(46, 91, 255, 0.32);
  margin-bottom: 26px;
  font-family: inherit;
}
.start-card .t { font-size: 17px; font-weight: 800; margin: 0 0 5px; }
.start-card .s { font-size: 13px; color: rgba(255,255,255,0.85); margin: 0; line-height: 1.45; }
.start-card .go {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.start-card .go svg { width: 20px; height: 20px; }

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 12px;
}
.section-row h2 { font-size: 16.5px; font-weight: 800; margin: 0; }
.section-row .link { font-size: 13px; }

.empty-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 22px;
  text-align: center;
}
.empty-card svg { width: 74px; height: 74px; margin-bottom: 12px; }
.empty-card .t { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; }
.empty-card .s { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }

/* tab placeholder panels */
.tab-panel { text-align: center; padding: 60px 24px; }
.tab-panel svg { width: 64px; height: 64px; color: #C3CBDC; margin-bottom: 14px; }
.tab-panel .t { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.tab-panel .s { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.55; }

/* profile tab */
.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  margin-bottom: 18px;
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  text-transform: uppercase;
}
.profile-card .name { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.profile-card .email { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.profile-card .badge {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 5px 12px;
}

.profile-meta {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 6px 18px;
  margin-bottom: 22px;
  text-align: left;
}
.profile-meta .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.profile-meta .row:last-child { border-bottom: 0; }
.profile-meta .k { color: var(--muted); }
.profile-meta .v { font-weight: 600; text-align: right; word-break: break-all; }

/* bottom tab bar */
.tabbar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
}

.tabbar button {
  flex: 1;
  background: none;
  border: 0;
  padding: 6px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--faint);
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.15s ease;
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active { color: var(--blue); }

/* --------------------------------------------------------------- misc */

.loading-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  color: var(--muted);
  font-size: 15px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: vr-spin 0.8s linear infinite;
  margin-right: 12px;
}

@keyframes vr-spin { to { transform: rotate(360deg); } }

.shake { animation: vr-shake 0.3s ease; }
@keyframes vr-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
