/* Lovetts Admin — single sign-on front door for the two booking apps.
   Base tokens/reset copied verbatim from lovetts-workspace / lovetts-tables
   (same warm-stone-turned-grey brand family, Archivo + Hanken Grotesk) so
   this reads as the same product, not a bolted-on third thing. This app has
   no booking flow, so it skips everything in the siblings' stylesheets that
   exists only for desk/table pickers, floor plans and receipts - just a
   header, one centred card, and the switcher grid at the end. */

:root {
  --bg:        #dcdcdc;
  --ink:       #1c1a17;
  --card:      #e6e6e6;
  --muted:     #857f74;
  --body2:     #4f4a42;
  --hair:      #cfcfcf;
  --hair2:     #d4d4d4;
  --err-ink:   #9a2d18;
  --ok:        #3f7d62;
  --ui: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --display: 'Archivo', var(--ui);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui);
  -webkit-font-smoothing: antialiased; min-height: 100vh; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input { font-family: inherit; }
a { color: inherit; }
.wrap { min-height: 100vh; display: flex; flex-direction: column; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise   { from { transform: translateY(12px) } to { transform: none } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

.eyebrow { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* ── header ──────────────────────────────────────────────────────────────── */
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px clamp(20px,5vw,56px); border-bottom: 1px solid var(--ink); flex-wrap: wrap; }
.hdr__brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hdr__brand img { height: 40px; display: block; position: relative; top: 1px; }
.hdr__divider { width: 1px; height: 30px; background: rgba(28,26,23,0.2); align-self: center; flex: none; }
.hdr__label { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.signed { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pill { font-size: 13px; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px;
  padding: 8px 16px; white-space: nowrap; background: none; }
.pill:hover { background: var(--ink); color: var(--card); }

main { flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(24px,5vw,56px) 20px; }

/* ── the one card everything happens in ─────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--ink); border-radius: 6px;
  width: min(420px,100%); padding: clamp(28px,4vw,38px); animation: rise .3s ease; }
.card h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 4px 0 6px; }
.card p.sub { font-size: 13px; color: var(--muted); margin: 0 0 22px; line-height: 1.6; }

.field { margin-top: 18px; }
.field > label { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; }
.field input { width: 100%; padding: 13px 14px; border: 1px solid var(--ink); border-radius: 3px;
  background: #fff; font-size: 15px; color: var(--ink); appearance: none; }

/* 6-digit TOTP entry: one wide, letter-spaced monospace field reads clearer
   than six boxes for a code you're squinting at on a phone screen anyway. */
.code-input { font-family: 'SFMono-Regular', Consolas, Menlo, monospace; font-size: 24px;
  letter-spacing: 0.5em; text-align: center; padding-left: 22px; }

.btn { width: 100%; margin-top: 26px; padding: 16px; background: var(--ink); color: var(--card);
  border-radius: 3px; font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn:hover { opacity: .92; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { width: 100%; margin-top: 12px; padding: 13px; border: 1px solid var(--ink); border-radius: 3px;
  font-size: 13px; text-align: center; background: none; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--card); }
.link-btn { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.link-btn:hover { color: var(--ink); }

.err { color: var(--err-ink); font-size: 13px; margin-top: 14px; text-align: center; }
.ok  { color: var(--ok); font-size: 13px; margin-top: 14px; text-align: center; }

/* ── TOTP enrolment: manual-entry secret + otpauth link ─────────────────── */
.secretbox { background: #fff; border: 1px solid var(--ink); border-radius: 3px; padding: 14px 16px;
  margin-top: 8px; font-family: 'SFMono-Regular', Consolas, Menlo, monospace; font-size: 15px;
  letter-spacing: 0.08em; word-break: break-all; text-align: center; }
.secret-hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row .pill { flex: 1; text-align: center; }

/* ── recovery codes: shown exactly once at enrolment ─────────────────────── */
.codes-note { background: #fff; border: 1px solid var(--err-ink); border-radius: 3px; padding: 14px 16px;
  margin: 8px 0 4px; font-size: 12.5px; color: var(--err-ink); line-height: 1.6; }
.codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace; font-size: 14px; }
.codes-grid div { background: #fff; border: 1px solid var(--hair2); border-radius: 3px; padding: 8px 10px; text-align: center; }

/* ── switcher: the two admin areas, once signed in ───────────────────────── */
.switch-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.switch-card { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px; border: 1px solid var(--ink); border-radius: 4px; background: #fff; text-decoration: none;
  color: var(--ink); transition: .15s; }
.switch-card:hover { background: var(--ink); color: var(--card); }
.switch-card b { display: block; font-size: 17px; font-weight: 700; }
.switch-card span { display: block; font-size: 12.5px; opacity: .75; margin-top: 3px; }
.switch-card .arr { font-size: 20px; flex: none; }
.switch-card.rec { outline: 2px solid var(--ok); outline-offset: 2px; }

.foot { border-top: 1px solid var(--hair); padding: 22px clamp(20px,5vw,56px); font-size: 12px;
  letter-spacing: 0.04em; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
