/* ============================================================================
   Wellness Docs — Anniversary Event front-desk check-in.
   Guests scan a QR at the door and check themselves in by email/phone, or
   sign in as a walk-in. Tablet-first, big tap targets, brand-aligned.
   Blue #26ACE2 + black #22211E.
   ============================================================================ */

:root {
  --brand-blue: #26ACE2;
  --brand-blue-dark: #1E8DBB;
  --brand-blue-tint: #EAF7FD;
  --brand-black: #22211E;
  --ink: #373531;
  --ink-soft: #6B6964;
  --cream: #FAFAF7;
  --line: #E8E7E3;
  --line-strong: #D9D7D2;
  --white: #FFFFFF;
  --good: #16A34A;
  --good-tint: #F0FBF4;
  --warn: #F59E0B;
  --bad: #DC2626;
  --radius: 0.7rem;
  --radius-lg: 1.1rem;
  --radius-xl: 1.5rem;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.09);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
[hidden] { display: none !important; }

body.checkin {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(38,172,226,0.12), transparent 60%),
    linear-gradient(180deg, #F4FAFE 0%, #FAFAF7 100%);
  background-attachment: fixed;
  color: var(--brand-black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============ PIN GATE (staff unlock) ============ */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(38,172,226,0.22), transparent 55%),
    linear-gradient(135deg, var(--brand-black) 0%, #14130F 100%);
  padding: 2rem;
}
.gate__card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.8rem 2.2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: gate-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes gate-in {
  from { transform: translateY(14px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.gate__logo { height: 58px; width: auto; margin: 0 auto 1.4rem; display: block; }
.gate__title {
  font-weight: 800; font-size: 1.55rem; letter-spacing: -0.01em; margin-bottom: 0.45rem;
}
.gate__sub { font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 1.6rem; line-height: 1.45; }
.gate__pin {
  width: 100%;
  font-size: 2.1rem; font-weight: 700; text-align: center; letter-spacing: 0.55em;
  padding: 1rem 0 1rem 0.55em;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gate__pin:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(38,172,226,0.14); }
.gate__pin.shake { animation: shake 0.4s; border-color: var(--bad); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-8px); }
  40%,80% { transform: translateX(8px); }
}
.gate__err { color: var(--bad); margin-top: 0.9rem; font-weight: 600; font-size: 0.95rem; min-height: 1.2rem; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--brand-blue); color: var(--white);
  border: none; border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-family: inherit; font-weight: 700; font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(38,172,226,0.28);
  transition: background 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--brand-blue-dark); box-shadow: 0 6px 18px rgba(38,172,226,0.34); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn--block { width: 100%; }
.btn--lg { padding: 1.35rem 1.5rem; font-size: 1.32rem; }

/* ============ MAIN APP ============ */
.checkin__main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.6rem 1.2rem 4rem;
}

/* Header card — dark brand bar with logo */
.checkin__head {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, var(--brand-black) 0%, #2E2C28 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}
.checkin__logo { height: 44px; width: auto; flex-shrink: 0; }
.checkin__heading { flex: 1; min-width: 0; }
.checkin__eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-blue); margin-bottom: 0.2rem;
}
.checkin__heading h1 {
  font-size: 1.42rem; font-weight: 800; margin-bottom: 0.15rem; letter-spacing: -0.01em; line-height: 1.1;
}
.checkin__day { font-size: 0.95rem; color: rgba(255,255,255,0.72); }
.checkin__day strong { color: var(--brand-blue); font-weight: 700; }

/* ============ TABS ============ */
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
  margin-bottom: 1.3rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.45rem;
  box-shadow: var(--shadow);
}
.tab {
  background: transparent; border: none; font-family: inherit;
  font-size: 1.12rem; font-weight: 700; color: var(--ink-soft);
  padding: 1.15rem 0.5rem; border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab--active { background: var(--brand-blue); color: var(--white); box-shadow: 0 4px 12px rgba(38,172,226,0.28); }
.tab:hover:not(.tab--active) { background: var(--cream); color: var(--brand-black); }

/* ============ PANELS ============ */
.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-md);
}
.panel[hidden] { display: none; }
.panel-intro { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 1.2rem; line-height: 1.45; }
.panel-intro em { font-style: normal; font-weight: 700; color: var(--brand-blue-dark); }

/* ============ FORMS ============ */
.match-form, .walkin-form { display: flex; flex-direction: column; gap: 1.1rem; }
.walkin-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 620px) { .walkin-row { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft);
}
.field input {
  font-family: inherit; font-size: 1.3rem;
  padding: 1rem 1.15rem;
  border: 2px solid var(--line-strong); border-radius: var(--radius);
  background: var(--white); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(38,172,226,0.12); }
.field input.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(220,38,38,0.1); }

.field-or {
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--ink-soft); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.field-or::before, .field-or::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }

.walkin-hint { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.4; }
.walkin-hint em { font-style: italic; color: var(--brand-blue-dark); font-weight: 600; }

/* ============ RESULT BANNERS ============ */
.match-result, .walkin-result {
  margin-top: 1.1rem; padding: 1.15rem 1.2rem; border-radius: var(--radius);
  font-weight: 600; font-size: 1.05rem; line-height: 1.45;
  animation: result-in 0.25s ease-out;
}
@keyframes result-in {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.match-result.is-ok, .walkin-result:not(.is-err) {
  background: var(--good-tint); border: 1.5px solid rgba(22,163,74,0.3); color: var(--good);
}
.match-result.is-err, .walkin-result.is-err {
  background: rgba(220,38,38,0.06); border: 1.5px solid rgba(220,38,38,0.3); color: var(--bad);
}
.result-name { font-weight: 800; }
.result-sub { display: block; margin-top: 0.35rem; font-weight: 500; font-size: 0.95rem; color: var(--ink); }

/* ============ CROSS-TAB LINK ============ */
.panel-xlink {
  margin-top: 1.7rem; padding-top: 1.2rem;
  border-top: 1.5px dashed var(--line-strong);
  text-align: center; font-size: 1.05rem; color: var(--ink-soft);
}
.panel-xlink__btn {
  background: transparent; border: none; font-family: inherit;
  font-size: 1.1rem; font-weight: 800; color: var(--brand-blue);
  cursor: pointer; padding: 0.45rem 0.7rem; border-radius: 0.4rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.panel-xlink__btn:hover { background: var(--brand-blue-tint); color: var(--brand-blue-dark); }

/* ============ TOAST ============ */
.toast {
  position: fixed; left: 50%; top: 1.4rem; transform: translateX(-50%);
  background: var(--good); color: var(--white);
  padding: 0.95rem 1.5rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1.02rem; z-index: 50;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease-out;
}
.toast.is-err { background: var(--bad); }
@keyframes toast-in {
  from { transform: translateX(-50%) translateY(-10px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ============ FOOTER ============ */
.checkin__foot {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-top: 1.5rem; padding: 0.95rem 1rem;
  background: rgba(255,255,255,0.75);
  border-radius: var(--radius); border: 1px solid var(--line);
}
#counter { color: var(--ink-soft); font-size: 0.92rem; }
#counter strong { color: var(--brand-blue-dark); font-weight: 800; }

/* ============ SMALL SCREENS (phones — primary target) ============ */
@media (max-width: 620px) {
  .checkin__main { padding: 1rem 0.85rem 2.5rem; }
  .checkin__head { gap: 0.8rem; padding: 0.95rem 1.05rem; margin-bottom: 1.1rem; }
  .checkin__logo { height: 38px; }
  .checkin__heading h1 { font-size: 1.18rem; }
  .checkin__eyebrow { font-size: 0.66rem; }
  .checkin__day { font-size: 0.86rem; }
  .tabs { padding: 0.35rem; gap: 0.35rem; margin-bottom: 1rem; }
  .tab { font-size: 1rem; padding: 0.95rem 0.4rem; }
  .panel { padding: 1.2rem 1.05rem; }
  .panel-intro { font-size: 0.98rem; margin-bottom: 0.95rem; }
  .field input { font-size: 1.15rem; padding: 0.9rem 1rem; }
  .btn--lg { font-size: 1.18rem; padding: 1.1rem 1rem; }
  .panel-xlink { font-size: 1rem; margin-top: 1.3rem; padding-top: 1rem; }
  .panel-xlink__btn { font-size: 1.02rem; }
  .gate__card { padding: 2.2rem 1.6rem; }
}
@media (max-width: 380px) {
  .tab { font-size: 0.9rem; padding: 0.85rem 0.3rem; }
}
