:root {
  --bg-top: #dceffb;
  --bg-bottom: #c9e6fb;
  --card: #ffffff;
  --field: #eef1f7;
  --field-alt: #e9edf4;
  --navy: #0b2545;
  --muted: #5f7186;
  --blue: #1577e6;
  --blue-dark: #0f5fc4;
  --blue-grad-a: #1f86ef;
  --blue-grad-b: #0f63d6;
  --ring: #bcd9f7;
  --radius-card: 26px;
  --radius-field: 16px;
}

* { box-sizing: border-box; }

html {
  /* Gradient anchored to the viewport so it never "jumps" on mobile scroll. */
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) no-repeat;
  background-attachment: scroll;
  background-color: var(--bg-bottom);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;   /* prevent sideways scroll at the document root */
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--navy);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

img, svg, table { max-width: 100%; }

/* ---------- Layout shell (mobile-first) ---------- */
.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;            /* steady against mobile browser chrome */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 40px;
}

/* ---------- Language selector ---------- */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(20, 90, 180, 0.12);
  margin-bottom: 22px;
  cursor: pointer;
  user-select: none;
}
.lang .chev { font-size: 12px; color: var(--muted); }

/* ---------- Badge / brand icon ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--blue);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-align: center;
  box-shadow: 0 6px 18px rgba(20, 90, 180, 0.12);
  margin-bottom: 22px;
}
.badge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(21, 119, 230, 0.18);
  flex-shrink: 0;
}

.brand-icon {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--blue-grad-a), var(--blue-grad-b));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 34px rgba(15, 99, 214, 0.38);
  margin-bottom: 22px;
  flex-shrink: 0;
}
.brand-icon svg { width: 36px; height: 36px; color: #fff; }

/* ---------- Headings ---------- */
.title {
  font-size: 34px;
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 10px;
  text-align: center;
  letter-spacing: -0.01em;
}
.subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 26px;
  text-align: center;
  font-weight: 400;
  max-width: 34ch;
}

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 600px;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: 0 24px 50px rgba(17, 70, 140, 0.14);
}

/* ---------- Fields ---------- */
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--field);
  border: 2px solid transparent;
  border-radius: var(--radius-field);
  padding: 0 14px;
  height: 58px;
  margin-bottom: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.field:focus-within { border-color: var(--ring); background: #fff; }
.field .icon { color: #8a99ad; display: flex; flex-shrink: 0; }
.field .icon svg { width: 21px; height: 21px; }
.field input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 16px;               /* >=16px stops iOS auto-zoom on focus */
  color: var(--navy);
  min-width: 0;
}
.field input::placeholder { color: #8a99ad; }
.field .show-btn {
  border: none;
  background: #fff;
  color: var(--blue);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 11px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(20, 90, 180, 0.10);
}

/* ---------- Custom country dropdown ---------- */
.select-wrap { position: relative; margin-bottom: 14px; }
.select-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--field);
  border: 2px solid transparent;
  border-radius: var(--radius-field);
  padding: 0 14px;
  height: 58px;
  cursor: pointer;
}
.select-trigger.open { border-color: var(--ring); background: #fff; }
.select-trigger .icon { color: #8a99ad; display: flex; flex-shrink: 0; }
.select-trigger .icon svg { width: 21px; height: 21px; }
.select-trigger .value { flex: 1; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .flag { margin-right: 8px; }
.select-trigger .caret { color: #8a99ad; transition: transform .15s; flex-shrink: 0; }
.select-trigger.open .caret { transform: rotate(180deg); }
.select-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(17, 70, 140, 0.22);
  z-index: 30;
  overflow: hidden;
  display: none;
}
.select-panel.open { display: block; }
.select-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid #eef1f7;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}
.select-list { max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.select-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
}
.select-option:hover, .select-option.active { background: #eef5fe; }

/* ---------- Primary button ---------- */
.btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-field);
  background: linear-gradient(180deg, var(--blue-grad-a), var(--blue-grad-b));
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.05em;
  height: 58px;
  margin-top: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 16px 30px rgba(15, 99, 214, 0.32);
  transition: box-shadow .15s ease, transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { box-shadow: 0 18px 36px rgba(15, 99, 214, 0.42); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: not-allowed; }
.btn .arrow { font-size: 19px; }

/* ---------- Divider ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  margin: 20px 0 12px;
  font-size: 14px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e3e9f1; }

/* ---------- Alt link ---------- */
.alt-link { text-align: center; font-size: 15px; color: var(--muted); }
.alt-link a { color: var(--blue); font-weight: 700; text-decoration: none; }
.alt-link a:hover { text-decoration: underline; }

/* ---------- Trust footer ---------- */
.trust {
  display: flex;
  gap: 16px 22px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust .ic-bolt { color: #f5b301; }
.trust .ic-shield { color: #e0556e; }
.trust svg { width: 17px; height: 17px; }

/* ---------- Alert ---------- */
.alert {
  display: none;
  background: #fdecee;
  color: #c0354b;
  border: 1px solid #f6c6cf;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 14px;
}
.alert.show { display: block; }
.alert.success { background: #e8f6ee; color: #1f7a44; border-color: #bfe6cd; }

/* ---------- Responsive scale-ups ---------- */
@media (min-width: 480px) {
  .page { padding: 32px 20px 48px; }
  .title { font-size: 42px; }
  .subtitle { font-size: 17px; max-width: none; }
  .card { padding: 28px; }
}

@media (min-width: 768px) {
  :root { --radius-card: 30px; --radius-field: 18px; }
  .page { padding: 40px 24px 60px; }
  .lang { font-size: 15px; padding: 9px 18px; margin-bottom: 26px; }
  .badge { font-size: 13px; padding: 9px 20px; letter-spacing: 0.08em; margin-bottom: 26px; }
  .brand-icon { width: 84px; height: 84px; border-radius: 24px; margin-bottom: 26px; }
  .brand-icon svg { width: 42px; height: 42px; }
  .title { font-size: 54px; margin-bottom: 12px; }
  .subtitle { font-size: 19px; margin-bottom: 30px; }
  .card { padding: 34px; }
  .field, .select-trigger { height: 62px; padding: 0 16px; margin-bottom: 16px; }
  .field .icon svg, .select-trigger .icon svg { width: 22px; height: 22px; }
  .field input, .select-trigger .value { font-size: 17px; }
  .field .show-btn { font-size: 14px; padding: 8px 16px; }
  .btn { height: 64px; font-size: 18px; letter-spacing: 0.06em; }
  .trust { gap: 34px; font-size: 15px; margin-top: 34px; }
}
