/* DARA sign-in kiosk — sized for iPad (portrait & landscape) and desktop */
:root { --accent: #1f4e8c; --bg: #f3f5f8; --card: #fff; --ink: #1b2430; --muted: #5d6b7c; --line: #d6dde6; --ok: #1d7a46; --warn: #b4540a; --err: #b42318; --r: 12px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 18px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: var(--accent); color: #fff; padding-top: max(14px, env(safe-area-inset-top)); }
.top .logo { height: 64px; width: auto; background: #fff; border-radius: 8px; padding: 4px; }
.top h1 { margin: 0; font-size: 1.6rem; font-weight: 700; }
.top .event { opacity: .85; font-size: 1rem; }
.cb-badge { margin-left: auto; font-size: .8rem; background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 99px; }

main { max-width: 1100px; margin: 0 auto; padding: 16px 20px 48px; }
.welcome { font-size: 1.1rem; color: var(--muted); margin: 8px 4px 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card h2 { margin: 0 0 12px; font-size: 1.15rem; }

.fld { display: block; margin-bottom: 12px; }
.fld .lbl, .chk .lbl { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input:not([type=checkbox]), select { width: 100%; font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 52px; }
select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.invalid { border-color: var(--err) !important; background: #fff5f4 !important; }
input[name=callsign] { text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.hint { display: block; min-height: 1.2em; font-size: .8rem; color: var(--muted); margin-top: 3px; }
.hint.ok { color: var(--ok); } .hint.warn { color: var(--warn); } .hint.busy { color: var(--muted); font-style: italic; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* people rows: one line per person on wide screens, stacked card on narrow */
.people-head, .person { display: grid; grid-template-columns: var(--cols, 34px 1.1fr 1fr 1fr 92px 92px 44px); gap: 10px; align-items: start; }
.people-head { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 0 0 6px; }
.people-head .chk { text-align: center; cursor: pointer; user-select: none; }
body.group .people-head .chk { text-decoration: underline dotted; }
.person { padding: 8px 0; border-top: 1px solid #eef1f5; }
.person:first-child { border-top: 0; }
.person .num { font-weight: 700; color: var(--accent); padding-top: 14px; text-align: center; }
.person .fld { margin: 0; }
.person .fld .lbl { display: none; }
.person .chk { display: flex; justify-content: center; align-items: center; min-height: 52px; cursor: pointer; }
.person .chk .lbl { display: none; }
input[type=checkbox] { width: 30px; height: 30px; accent-color: var(--accent); cursor: pointer; }
.remove { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; width: 44px; height: 52px; border-radius: 10px; cursor: pointer; }
.remove:hover { background: #f1f3f6; color: var(--err); }
.add { margin-top: 10px; width: 100%; border: 2px dashed var(--line); background: #fafbfd; color: var(--accent); font: inherit; font-weight: 700; padding: 14px; border-radius: 10px; cursor: pointer; }
.add span { font-size: 1.4rem; vertical-align: -2px; margin-right: 6px; }
.add:active { background: #eef3fa; }

.privacy { font-size: .8rem; color: var(--muted); margin: -4px 2px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.errors { background: #fff5f4; border: 1px solid #f3c0bb; color: var(--err); border-radius: 10px; padding: 8px 16px; margin-bottom: 16px; }
.errors ul { margin: 6px 0; padding-left: 18px; }
.submit { display: block; width: 100%; font: inherit; font-size: 1.3rem; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 12px; padding: 18px; cursor: pointer; min-height: 64px; }
.submit:disabled { opacity: .6; }
.submit:active { filter: brightness(.92); }
.link { background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; margin-top: 12px; }

.overlay { position: fixed; inset: 0; background: rgba(15,23,35,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.overlay .box { background: #fff; border-radius: 18px; padding: 32px 28px; max-width: 520px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.overlay h2 { margin: 8px 0; }
.check { width: 84px; height: 84px; line-height: 84px; margin: 0 auto 6px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 48px; }
.spinner { width: 56px; height: 56px; margin: 0 auto 12px; border: 6px solid #e3e8ef; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-list { list-style: none; padding: 0; margin: 16px 0 0; text-align: left; font-size: .9rem; }
.wait-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #eef1f5; }
.wait-list li span { color: var(--muted); text-align: right; }
.wait-list li.running span { color: var(--accent); } .wait-list li.error span { color: var(--warn); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .top h1 { font-size: 1.25rem; } .top .logo { height: 44px; }
  .grid2 { grid-template-columns: 1fr; }
  .people-head { display: none; }
  .person { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px 0; }
  .person .num { grid-column: 1 / -1; text-align: left; padding: 0; }
  .person .num:empty { display: none; }
  .person .fld.call { grid-column: 1 / -1; }
  .person .fld .lbl { display: block; }
  .person .chk { justify-content: flex-start; gap: 10px; min-height: 44px; }
  .person .chk .lbl { display: inline; margin: 0; color: var(--ink); font-size: .95rem; }
  .person .remove { grid-column: 1 / -1; width: auto; height: 40px; justify-self: end; font-size: .9rem; }
  .person .remove::after { content: " Remove"; }
}
