/* Flow Fuel — shared styles for auth pages (login, signup, reset) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
}
html, body { max-width: 100%; overflow-x: hidden; }

.auth-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 460px;
  backdrop-filter: blur(16px);
}

.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-logo img { height: 44px; border-radius: 8px; }
.auth-logo span { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }

.auth-card h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -.02em; }
.auth-sub { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 26px; line-height: 1.5; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.75rem; font-weight: 600; color: #cbd5e1; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem; /* 16px — iOS zooms the page on focus below this */
  color: #fff;
  outline: none;
  transition: border .2s, background .2s;
  width: 100%;
}
.field input::placeholder { color: rgba(255,255,255,.55); }
.field input:focus, .field select:focus { border-color: #60a5fa; background: rgba(255,255,255,.12); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid #60a5fa; outline-offset: 1px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Password field with show/hide toggle */
.field-input { position: relative; }
.field-input input { padding-right: 46px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: color .2s;
}
.pw-toggle:hover { color: #fff; }
.pw-toggle:focus-visible { outline: 2px solid #60a5fa; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.showing .eye { display: none; }
.pw-toggle.showing .eye-off { display: block; }

.btn-auth {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(29,78,216,.4);
  transition: all .2s;
  margin-top: 4px;
}
.btn-auth:hover { background: linear-gradient(135deg, #3b82f6, #2563eb); transform: translateY(-1px); }
.btn-auth:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-foot { margin-top: 22px; font-size: 0.875rem; color: #cbd5e1; text-align: center; line-height: 1.7; }
.auth-foot a { color: #60a5fa; text-decoration: none; font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

.msg { border-radius: 10px; padding: 13px 15px; font-size: 0.875rem; margin-bottom: 18px; display: none; line-height: 1.45; }
.msg.error   { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.msg.success { background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.3);  color: #86efac; }
.msg.info    { background: rgba(96,165,250,.1);  border: 1px solid rgba(96,165,250,.25); color: #93c5fd; }

/* Always-visible note on the code-entry screens. Cognito sends from the
   generic no-reply@verificationemail.com (the pool is on COGNITO_DEFAULT
   after SES production access was denied), which mail providers filter
   aggressively — naming the sender lets people search for it. */
.auth-note {
  background: rgba(96,165,250,.1);
  border: 1px solid rgba(96,165,250,.25);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: -14px 0 20px;
}
.auth-note strong { color: #fff; }
.auth-note-addr { color: #93c5fd; word-break: break-all; }

.back-home {
  position: fixed; z-index: 5;
  /* Fixed elements ignore body padding, so this carries the notch inset itself —
     otherwise in the app it sits under the iPhone status bar, untappable. */
  top: calc(10px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left));
  padding: 13px 10px; font-size: 0.85rem; color: #93c5fd; text-decoration: none; font-weight: 600;
}
.back-home:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* Shared box model for federated sign-in buttons. Apple's HIG requires the
   Sign in with Apple button be no smaller and no less prominent than other
   sign-in buttons, so both providers deliberately use identical metrics and
   differ only in colour. */
.btn-social {
  width: 100%;
  border-radius: 10px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .2s;
  margin-bottom: 10px;
}
.btn-social:hover { transform: translateY(-1px); }
.btn-social:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

.btn-google {
  background: #fff;
  color: #1e293b;
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-google:hover { background: #f1f5f9; }

.btn-apple {
  background: #000;
  color: #fff;
  border: 1.5px solid #000;
}
.btn-apple:hover { background: #1a1a1a; }

.auth-foot a { display: inline-block; padding: 6px 2px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  /* 8px here + the 10px below the last social button reproduces the 18px gap
     the single Google button used to have. */
  margin-top: 8px;
  margin-bottom: 20px;
  color: #cbd5e1;
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.1);
}

/* ---------- Sign-up: individual or business ---------- */
.acct-type-q { font-size: 0.75rem; font-weight: 600; color: #cbd5e1; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.acct-type { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.acct-type-opt {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 12px 14px;
  border: 1.5px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.06); cursor: pointer;
}
.acct-type-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.acct-type-opt strong { font-size: 0.95rem; font-weight: 700; }
.acct-type-opt small { font-size: 0.78rem; color: #cbd5e1; }
.acct-type-opt:hover { border-color: rgba(96,165,250,.6); }
.acct-type-opt.is-on { border-color: #60a5fa; background: rgba(96,165,250,.18); }
.acct-type-opt:focus-within { outline: 2px solid #60a5fa; outline-offset: 2px; }
