/* ============================================================================
   Beta auth / deny / error pages.

   Loaded ONLY by the beta copies of login.html, no-access.html, auth-failed.html
   and employment-lookup-login.html, served by web/beta-server.js. Built entirely
   on the mockup.css token set (--bg-app, --brand, --r-lg, --sp-*, …) so these
   pages render standalone and NEVER link the production styles.css.

   Deliberately additive: this file is new and lives under public/beta/, so it
   cannot affect the production pages (which this file is not loaded by).
   ========================================================================= */

/* ---------- page frame ---------- */
.beta-auth-page {
  min-height: 100vh;            /* fallback first … */
  min-height: 100dvh;           /* … dvh last so it wins where supported (mobile Safari) */
  margin: 0;
  padding: calc(var(--sp-5) + env(safe-area-inset-top, 0px)) var(--sp-4)
    calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  overflow-x: clip;
  background:
    radial-gradient(120% 150% at 0% 0%, var(--brand-soft) 0%, transparent 58%),
    radial-gradient(90% 120% at 100% 100%, var(--accent-2-soft, var(--brand-soft)) 0%, transparent 60%),
    var(--bg-app);
}

.beta-auth-shell {
  width: 100%;
  max-width: 960px;
  display: grid;
  gap: var(--sp-4);
}
@media (min-width: 880px) {
  .beta-auth-shell.split { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: stretch; }
  .beta-auth-shell.narrow { max-width: 520px; }
}

/* ---------- card ---------- */
.beta-auth-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
  text-align: center;
}
.beta-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand) 22%, var(--accent-2) 55%, var(--brand) 78%, transparent);
  opacity: .9;
}
.beta-auth-card.bad::before {
  background: linear-gradient(90deg, transparent, var(--bad) 24%, var(--bad) 76%, transparent);
}
.beta-auth-card.aside {
  text-align: center;
  justify-content: center;
  gap: var(--sp-3);
  background: linear-gradient(160deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
}

/* ---------- brand row ---------- */
.beta-auth-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-align: left;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.beta-auth-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  box-shadow: 0 8px 22px var(--brand-soft);
}
.beta-auth-mark.bad { background: linear-gradient(145deg, var(--bad), #A32A2D); box-shadow: 0 8px 22px var(--bad-soft); }
.beta-auth-brand b { display: block; font-size: 14px; }
.beta-auth-brand small {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.beta-auth-badge { margin-left: auto; flex: 0 0 auto; }

/* ---------- logo ---------- */
.beta-auth-logo {
  height: 58px;
  width: auto;
  max-width: 220px;
  margin: 0 auto;
  object-fit: contain;
}
.beta-auth-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.beta-auth-logo-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.beta-auth-logo-item img { height: 68px; width: auto; max-width: 130px; object-fit: contain; }
.beta-auth-logo-item span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.beta-auth-logo-item.frs span { color: var(--brand); }
.beta-auth-logo-item.mas span { color: var(--accent-2); }
.beta-auth-logo-item.police span { color: var(--info); }

/* logo strip used by auth-failed */
.beta-auth-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.beta-auth-strip img { height: 62px; width: auto; max-width: 150px; object-fit: contain; }
.beta-auth-strip .beta-auth-divider {
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, transparent, var(--line-strong), transparent);
}

/* ---------- type ---------- */
.beta-auth-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.beta-auth-title.wide { letter-spacing: .06em; text-transform: uppercase; font-size: 20px; }
.beta-auth-sub { color: var(--text-3); font-size: 13px; }
.beta-auth-lead { color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.beta-auth-lead + .beta-auth-lead { margin-top: calc(var(--sp-3) * -1 + var(--sp-1)); }
.beta-auth-hint {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
  padding: var(--sp-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--field-bg);
  text-align: left;
}
.beta-auth-hint b, .beta-auth-hint strong { color: var(--text); }

.beta-auth-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.beta-auth-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.beta-auth-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--brand);
}
.beta-auth-list b, .beta-auth-list strong { color: var(--text); }

/* ---------- actions ---------- */
.beta-auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: stretch;
}
.beta-auth-actions.row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.beta-auth-actions.row .btn { flex: 1 1 200px; }
.beta-auth-sub-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  font-size: 12.5px;
}
.beta-auth-sub-actions a { color: var(--brand); font-weight: 600; }
.beta-auth-sub-actions a:hover { text-decoration: underline; }

/* ---------- footer / apply panel ---------- */
.beta-auth-apply-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--bg-hover) 0%, var(--bg-surface-2) 100%);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.beta-auth-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  justify-content: center;
  color: var(--text-3);
  font-size: 11.5px;
  text-align: center;
}
.beta-auth-foot .dot { opacity: .5; }

/* ---------- responsive / touch ---------- */
@media (max-width: 560px) {
  .beta-auth-page { justify-content: flex-start; padding-top: calc(var(--sp-5) + env(safe-area-inset-top, 0px)); }
  .beta-auth-card { padding: var(--sp-4); border-radius: var(--r-lg); }
  .beta-auth-title { font-size: 20px; }
  .beta-auth-logo { height: 48px; }
  .beta-auth-logo-item img { height: 54px; }
  .beta-auth-strip img { height: 48px; }
  .beta-auth-strip { gap: var(--sp-4); }
}
/* A glove-friendly minimum: mockup.css sizes .btn at 38px, which is below the 44px target. */
@media (max-width: 768px) {
  .beta-auth-card .btn { min-height: 46px; }
  .beta-auth-sub-actions a { min-height: 44px; display: inline-flex; align-items: center; }
}
