/* Shared sign-in shell. Colors and sizes match the iOS and Android auth screens. */
:root {
  --tm-primary: #2F5FD0;
  --tm-ink: #14142B;
  --tm-muted: #6B7280;
  --tm-border: #E3E5EE;
  --tm-danger: #C8381A;
  --tm-success: #0B7A5C;
  --tm-wash: #E6EEFF;
  --tm-bg: #F6F8FC;
  --tm-disabled: #E3E5EE;
  --tm-disabled-text: #9CA3AF;
  --tm-hero-start: #244DB8;
  --tm-hero-mid: #2A57C4;
  --tm-hero-end: #2F5FD0;
  --navy: #2F5FD0;
  --teal: #2F5FD0;
  --ink: #14142B;
  --muted: #6B7280;
  --line: #E3E5EE;
  --bg: #F6F8FC;
}

* { box-sizing: border-box; }
html { color-scheme: only light; -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  min-height: 100%;
  font: 15px/1.45 Poppins, system-ui, sans-serif;
  color: var(--tm-ink);
  background: #fff;
}
body.auth { min-height: 100dvh; overflow-x: hidden; }
a { color: var(--tm-primary); font-weight: 500; text-decoration: none; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

.auth-scroll {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-hero {
  position: relative;
  flex: none;
  height: clamp(240px, 40dvh, 380px);
  padding: max(20px, env(safe-area-inset-top)) 24px 64px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(180deg, var(--tm-hero-start) 0%, var(--tm-hero-mid) 48%, var(--tm-hero-end) 100%);
}
.auth-hero.has-back { padding-top: max(64px, calc(env(safe-area-inset-top) + 52px)); }
.auth-brand { position: relative; z-index: 1; }
.auth-brand::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 0 14px;
  border-radius: 16px;
  background: #fff url(/favicon.png) center / cover;
  box-shadow: 0 8px 18px rgba(8, 20, 60, 0.22);
}
.auth-brand h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.auth-brand p {
  margin: 4px 0 0;
  max-width: 280px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.auth-back {
  position: fixed;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--tm-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(20, 20, 43, 0.16);
}

.auth-card {
  position: relative;
  z-index: 2;
  flex: 1;
  margin-top: -36px;
  background: #fff;
  border-radius: 36px 36px 0 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  padding: 24px 20px max(32px, env(safe-area-inset-bottom));
}
.auth-card form,
.auth-card .done,
.auth-card .box,
.auth-card > section {
  width: min(100%, 480px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card h2 {
  margin: 0;
  padding-top: 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--tm-ink);
}
.sub { margin: 0; color: var(--tm-muted); font-size: 14px; line-height: 1.45; }
.sub:empty { display: none; }
.kicker { display: none; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-card input:not([type="checkbox"]),
.auth-card select,
.auth-card textarea {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  background: #fff;
  color: var(--tm-ink);
  font: 16px/1.3 Poppins, system-ui, sans-serif;
}
.auth-card textarea { height: auto; min-height: 120px; padding: 14px 16px; }
.auth-card input::placeholder,
.auth-card textarea::placeholder { color: var(--tm-muted); }
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  outline: none;
  border-color: var(--tm-primary);
  box-shadow: 0 0 0 3px rgba(47, 95, 208, 0.2);
}
.auth-card input.otp {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
}

.phone-row { display: flex; gap: 8px; align-items: center; }
.phone-row .dial {
  width: 132px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: #F3F4F6;
  font-size: 14px;
  font-weight: 600;
}
.phone-row input { flex: 1; min-width: 0; }

.consent { display: flex; align-items: flex-start; gap: 10px; }
.consent input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--tm-primary);
}
.consent label {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--tm-ink);
  cursor: pointer;
}

.auth-card button,
.auth-card a.store {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--tm-primary);
  color: #fff;
  font: 600 16px/1 Poppins, system-ui, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.auth-card button:hover:not(:disabled),
.auth-card a.store:hover { background: var(--tm-hero-start); }
.auth-card button.btn-success { background: var(--tm-success); }
.auth-card button.btn-success:hover:not(:disabled) { background: #09694e; }
.auth-card button.btn-dark,
.auth-card a.store.dark { background: var(--tm-ink); }
.auth-card button.btn-dark:hover:not(:disabled),
.auth-card a.store.dark:hover { background: #0d0d1c; }
.auth-card button.ghost {
  background: transparent;
  color: var(--tm-primary);
  border: 1px solid var(--tm-primary);
}
.auth-card button.ghost:hover:not(:disabled) { background: var(--tm-wash); }
.auth-card button:disabled {
  background: var(--tm-disabled);
  color: var(--tm-disabled-text);
  border-color: transparent;
  cursor: default;
}
.auth-card button:focus-visible,
.auth-card a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 95, 208, 0.28);
}

.err { margin: 0; color: var(--tm-danger); font-size: 13px; line-height: 1.4; }
.err:empty, .ok:empty { display: none; }
.ok { margin: 0; color: var(--tm-success); font-size: 14px; line-height: 1.5; }

.or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--tm-muted);
  font-size: 13px;
}
.or:before, .or:after { content: ""; flex: 1; height: 1px; background: var(--tm-border); }
#googleBtn { display: flex; justify-content: center; min-height: 44px; }

.link-row, .foot, .legal { margin: 0; text-align: center; font-size: 14px; }
.foot { color: var(--tm-muted); }
.foot a, .link-row a { font-weight: 600; }
.legal { font-size: 13px; color: var(--tm-muted); }
.legal a { font-weight: 500; }
.foot.split { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; text-align: left; }

/* Legal and info pages: same blue header and the app icon. */
.doc-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 6px 14px rgba(8, 20, 60, 0.22);
  background: #fff;
}
body.doc header {
  position: relative;
  padding-bottom: 64px;
  background: linear-gradient(180deg, #244DB8 0%, #2A57C4 48%, #2F5FD0 100%);
}
body.doc main { position: relative; margin-top: 20px; }
body.doc article,
body.doc .about,
body.doc .card,
body.doc .faq-section,
body.doc .quick-card {
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(20, 20, 43, 0.06);
}

@media (min-width: 960px) {
  body.auth {
    background: linear-gradient(180deg, var(--tm-hero-start) 0%, var(--tm-hero-mid) 48%, var(--tm-hero-end) 100%);
  }
  .auth-scroll {
    width: min(520px, calc(100% - 48px));
    margin: 0 auto;
    justify-content: center;
    padding: 40px 0;
  }
  .auth-hero {
    height: auto;
    padding: 0 0 8px;
    text-align: center;
    background: none;
  }
  .auth-hero.has-back { padding-top: 28px; }
  .auth-brand::before { margin-left: auto; margin-right: auto; }
  .auth-brand p { max-width: none; margin-left: auto; margin-right: auto; }
  .auth-card {
    flex: none;
    margin-top: 20px;
    border-radius: 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    padding: 8px 32px 32px;
  }
}
