/* ==========================================================================
   Sign-in surfaces: customer access code, back office login, first-run setup
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(0, 153, 255, 0.20), transparent 62%),
    radial-gradient(900px 480px at 5% 108%, rgba(10, 48, 191, 0.16), transparent 60%),
    var(--brand-navy);
  display: flex; flex-direction: column;
}

.auth-shell {
  flex: 1 1 auto;
  display: grid; place-items: center;
  padding: 2.5rem 1.25rem;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: min(460px, 100%);
}
.auth-card.is-wide { width: min(560px, 100%); }
.auth-logo { margin-bottom: 1.5rem; display: flex; justify-content: center; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.35rem; text-align: center; }
.auth-lede { text-align: center; color: var(--ink-muted); font-size: 0.95rem; margin-bottom: 1.75rem; }

/* --- The 6 digit code input --------------------------------------------- */
.code-field { margin-bottom: 1.25rem; }
/* Eight boxes have to fit a phone as well as a laptop, so they size
   themselves to the space rather than to a fixed width. */
.code-boxes { display: flex; gap: clamp(0.18rem, 1.1vw, 0.5rem); justify-content: center; }
.code-boxes input {
  width: clamp(1.6rem, 7.6vw, 2.4rem);
  height: clamp(2.3rem, 10vw, 3.1rem);
  min-width: 0;
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.4rem); font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-navy);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.code-boxes input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(10, 48, 191, 0.14);
  transform: translateY(-1px);
}
.code-boxes input.is-filled { border-color: var(--brand-bright); background: #f7fbff; }

.auth-foot {
  text-align: center; padding: 1.5rem;
  color: rgba(255, 255, 255, 0.72); font-size: 0.84rem;
}
.auth-foot a { color: rgba(255, 255, 255, 0.92); text-decoration: underline; }
.auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.88rem; color: var(--ink-muted); }

/* Shake on a rejected code */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shake 0.42s ease; }

@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 0.9rem; }
}

/* --- Brand chooser (shown when more than one brand is active) ------------ */
.brand-choices { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.brand-choice {
  display: block; overflow: hidden; text-decoration: none; color: inherit;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.brand-choice:hover {
  transform: translateY(-3px); text-decoration: none;
  box-shadow: var(--shadow); border-color: var(--choice-accent);
}
.brand-choice-stripe {
  display: block; height: 6px;
  background: linear-gradient(135deg, var(--choice-accent), var(--choice-secondary));
}
.brand-choice-body { display: block; padding: 1.35rem 1.4rem; }
.brand-choice-logo { display: block; color: var(--choice-accent); margin-bottom: 0.75rem; }
.brand-choice-blurb {
  display: block; font-size: 0.87rem; color: var(--ink-muted);
  line-height: 1.55; margin-bottom: 0.9rem;
}
.brand-choice-go {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.85rem; font-weight: 700; color: var(--choice-accent);
}
