/* Sign-in, sign-up and waiting pages (owner 2026-10-01, the sign-up flow mockups: "dumb it down,
 * way too much copy", "see edgeiq"). Signed-out pages: they load g-tokens.css for the app's colours
 * and fonts, never shell.css / modals.css (those are the signed-in app's). Phones: one column, the
 * form on the page; from 900px: the pitch on the left, the form in a card on the right. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.auth-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--g-bg);
  color: var(--g-fg);
  font-family: var(--g-font);
  font-size: 15px;
  line-height: 1.4;
}
.auth-body a { color: var(--g-amber); text-decoration: none; }
.auth-body a:hover { color: #ffd27a; }
.auth-body [hidden] { display: none !important; }

.auth-page {
  min-height: 100dvh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--g-amber);
  color: var(--g-on-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}
.auth-brand .title { margin: 0; font-size: 18px; font-weight: 700; color: var(--g-strong); }
.auth-brand .subtitle { margin: 2px 0 0; font-size: 12px; color: var(--g-muted); }

.auth-pitch { display: flex; flex-direction: column; gap: 22px; }
/* 6.2em: breaks "Let the bot / bet for you." at every width, never a lone last word. */
.auth-headline { max-width: 6.2em; margin: 0; font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; color: var(--g-strong); }
.auth-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.auth-stat {
  padding: 12px;
  border-radius: 14px;
  background: var(--g-card);
  box-shadow: inset 0 0 0 1px var(--g-card-ring);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.auth-stat b { font: 600 20px/1.1 var(--g-mono); color: var(--g-strong); white-space: nowrap; }
.auth-stat b.up { color: var(--g-teal); }
.auth-stat span { font-size: 11px; color: var(--g-muted); }
.auth-perks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.auth-perks li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--g-fg); }
.auth-perk-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--g-btn);
  box-shadow: inset 0 0 0 1px var(--g-btn-ring);
  color: var(--g-amber);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card { display: flex; flex-direction: column; gap: 12px; }
.auth-card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: var(--g-strong); }
.auth-google {
  height: 52px;
  border-radius: 14px;
  background: var(--g-chip);
  box-shadow: inset 0 0 0 1px var(--g-pill-ring);
  color: var(--g-strong) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}
.auth-google.is-disabled { opacity: 0.5; pointer-events: none; }
.auth-or { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--g-label); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--g-card-ring); }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field label { font-size: 13px; font-weight: 600; color: var(--g-soft); }
.auth-input { position: relative; }
.auth-input > svg { position: absolute; left: 14px; top: 15px; color: var(--g-label); pointer-events: none; }
.auth-input input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 0;
  border-radius: 12px;
  background: var(--g-pill);
  box-shadow: inset 0 0 0 1px var(--g-pill-ring);
  color: var(--g-fg);
  font: 500 16px var(--g-font); /* 16px: iOS never zooms into the field */
  outline: none;
}
.auth-input input::placeholder { color: #5d6b7c; }
.auth-input input:focus { box-shadow: inset 0 0 0 1px #5a6a7c; }
.auth-input.has-eye input { padding-right: 52px; }
.auth-eye {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--g-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.auth-primary {
  height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: var(--g-amber);
  color: var(--g-on-amber);
  font: 700 16px var(--g-font);
  cursor: pointer;
}
.auth-primary:disabled { opacity: 0.6; cursor: default; }
.auth-alert { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 123, 110, 0.1); color: #ffb3aa; font-size: 14px; }
.auth-switch { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--g-muted); }
.auth-switch a, .auth-switch button { font-weight: 600; }
.auth-link-btn { padding: 0; border: 0; background: none; color: var(--g-amber); font: inherit; cursor: pointer; }

/* Keyboard focus only: a click or tap draws no ring (inputs show their quiet border instead). */
.auth-body a:focus-visible, .auth-body button:focus-visible { outline: 2px solid var(--g-amber); outline-offset: 2px; }

/* The waiting page. */
.wait-page { position: relative; }
.wait-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.wait-badge {
  width: 88px;
  height: 88px;
  border-radius: 44px;
  background: rgba(245, 185, 66, 0.12);
  box-shadow: inset 0 0 0 1px rgba(245, 185, 66, 0.4), 0 0 0 10px rgba(245, 185, 66, 0.05);
  color: var(--g-amber);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wait-badge.is-denied { background: rgba(255, 123, 110, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 123, 110, 0.4); color: var(--g-coral); }
.wait-center h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--g-strong); }
.wait-center p { margin: 0; font-size: 15px; color: var(--g-soft); }
.wait-who {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--g-card);
  box-shadow: inset 0 0 0 1px var(--g-card-ring);
  font-size: 14px;
  color: var(--g-soft);
}
.wait-who img, .wait-initials {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--g-avatar);
  box-shadow: inset 0 0 0 1px var(--g-avatar-ring);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--g-fg);
}
.wait-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wait-out {
  height: 50px;
  border-radius: 14px;
  background: var(--g-btn);
  box-shadow: inset 0 0 0 1px var(--g-btn-ring);
  color: var(--g-fg) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
}

@media (min-width: 900px) {
  .auth-page { padding: 64px 72px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: center; }
  .auth-pitch { gap: 32px; }
  .auth-brand { gap: 14px; }
  .auth-mark { width: 48px; height: 48px; border-radius: 13px; font-size: 26px; }
  .auth-brand .title { font-size: 22px; }
  .auth-brand .subtitle { font-size: 13px; }
  .auth-headline { font-size: 54px; line-height: 1.02; letter-spacing: -0.035em; }
  .auth-stats { gap: 12px; max-width: 520px; }
  .auth-stat { padding: 20px; border-radius: 18px; gap: 8px; }
  .auth-stat b { font-size: 30px; line-height: 1; }
  .auth-stat span { font-size: 13px; }
  .auth-perks { flex-direction: row; flex-wrap: wrap; gap: 12px 18px; }
  .auth-card {
    justify-self: center;
    width: 460px;
    padding: 40px;
    border-radius: 22px;
    background: var(--g-card);
    box-shadow: inset 0 0 0 1px var(--g-card-ring), 0 24px 60px rgba(0, 0, 0, 0.45);
  }
  .auth-card h2 { font-size: 24px; }
  .auth-page.wait-page { display: flex; flex-direction: column; align-items: stretch; }
  .wait-out { position: absolute; top: 40px; right: 48px; height: 42px; padding: 0 18px; border-radius: 12px; font-size: 14px; }
}
