/* ==========================================================================
   NIKE x BTS — Reservation queue
   Shared stylesheet for public (reserve, status), staff console, and login.
   Design system ported from mockups/: Anton + Pretendard, paper/ink/red,
   rough red brush swashes, grain. State is server-driven, so per-state
   styling keys off element classes (.pass.status-*, .dash.closed), never a
   one-time body class — HTMX swaps must repaint correctly.
   ========================================================================== */

:root {
  --paper: #f0eee8;
  --paper-2: #faf9f4;
  --card: #fff;
  --ink: #141210;
  --ink-2: #56514a;
  --ink-3: #8a8278;
  --red: #e8112d;
  --red-2: #c20e26;
  --redbg: #fdecee;
  --persimmon-tint: rgba(232, 17, 45, .1);
  --green: #138a3e;
  --line: rgba(20, 18, 16, .18);
  --line-2: rgba(20, 18, 16, .32);
  --disp-en: "Anton", Impact, sans-serif;
  --disp-ko: "Pretendard", "Pretendard Variable", sans-serif;
  --disp: "Anton", Impact, sans-serif;
  --sans: "Pretendard", "Pretendard Variable", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  /* Site-wide crumpled paper background — pinned to the viewport so it
     stays put while content scrolls. Loaded here in app.css so admin,
     login, and public pages all share the same stage. */
  background-color: #efece4;
  background-image: url("../img/paper_texture.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* Legacy atmosphere divs from base.html — hidden because the body texture
   replaces what they used to provide. Left here as no-ops so any future
   template that still emits them won't break the layout. */
.bg, .grain { display: none !important; }
svg.defs { position: absolute; width: 0; height: 0; }

/* ----- Brand swoosh (inline svg, recolorable) ----- */
.swoosh, .sw { display: block; height: auto; fill: var(--ink); }
.swoosh { width: 54px; }

/* ----- i18n: always bilingual — Korean primary, English beneath -----
   Both languages always render. English is a muted secondary line (color is
   inherited + dimmed, so it works on the light form card and on black alike).
   No toggle; the per-customer language is only used to pick the notification
   template. Short labels override this back to inline (see .seg / .nl-label). */
.t-en {
  display: block;
  font-weight: 600;
  font-size: .82em;
  letter-spacing: .01em;
  text-transform: none;
  line-height: 1.3;
  opacity: .58;
  margin-top: 1px;
}
/* reserve: help line follows chosen contact method */
body.m-phone .help .h-email { display: none; }
body.m-email .help .h-phone { display: none; }

/* ----- Reveal-on-load ----- */
.reveal { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ----- Layout shells ----- */
.wrap {
  position: relative; z-index: 1;
  width: min(100%, 540px); min-height: 100dvh; margin: 0 auto;
  padding: 20px 20px 36px; display: flex; flex-direction: column;
}
.wrap-status { max-width: 480px; }
.auth-wrap { position: relative; z-index: 1; width: min(100%, 420px); margin: 0 auto; padding: 48px 20px; }
.admin-wrap { position: relative; z-index: 1; width: min(100%, 1120px); margin: 0 auto; padding: 0 18px 60px; }

/* ==========================================================================
   Public header (cobrand + language toggle)
   ========================================================================== */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.cobrand, .brandline { display: flex; align-items: center; gap: 11px; }
.cobrand .x, .brand-x { width: 1px; height: 22px; background: var(--line); }
.bts { font-family: var(--disp-en); font-size: 22px; letter-spacing: .04em; line-height: 1; }
.lang { display: inline-flex; border: 2px solid var(--ink); overflow: hidden; }
.lang button {
  font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 6px 12px; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: .2s;
}
.lang button.on { background: var(--ink); color: var(--paper-2); }

/* ==========================================================================
   Reserve page
   ========================================================================== */
.kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kicker .k { font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }
.kicker .rule { flex: 1; height: 2px; background: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red-2); white-space: nowrap; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 17, 45, .5); } 70% { box-shadow: 0 0 0 8px rgba(232, 17, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 17, 45, 0); } }

.lockup { font-family: var(--disp-en); line-height: 1; text-transform: uppercase; margin-bottom: 16px; }
.lockup .one { font-size: clamp(33px, 11.5vw, 62px); letter-spacing: .01em; white-space: nowrap; }
.lockup .ex { font-family: var(--sans); font-weight: 900; color: var(--red); vertical-align: .02em; margin: 0 .03em; }
.swash { position: relative; display: inline-block; color: var(--ink); padding: .04em .28em .02em; z-index: 0; letter-spacing: .01em; }
.swash::before { content: ""; position: absolute; inset: -.04em -.02em; background: var(--red); z-index: -1; filter: url(#rough); transform: rotate(-1.4deg) scaleX(1); transform-origin: left center; }
.swash.s2::before { transform: rotate(.8deg) scaleX(1); }
.reveal .swash::before { animation: paint .55s var(--ease) both; animation-delay: calc(var(--d, 0s) + .15s); }
@keyframes paint { from { transform: rotate(.8deg) scaleX(0); } }

.lead { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; line-height: 1.45; }
.lead b { color: var(--ink); }
.where { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: .01em; margin-bottom: 18px; }
.glyphs { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.glyphs svg { width: 30px; height: 30px; fill: var(--ink); }
.glyphs .gline { flex: 1; height: 2px; background: var(--ink); opacity: .18; }

.flabel { display: block; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }
.seg { position: relative; display: flex; border: 2px solid var(--ink); margin-bottom: 18px; background: var(--paper-2); }
.seg-ind { position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: var(--ink); transition: transform .34s var(--ease); }
.seg:has(#m-email:checked) .seg-ind { transform: translateX(100%); }
.seg label { position: relative; z-index: 1; flex: 1; text-align: center; padding: 11px 6px; cursor: pointer; }
.seg label .t { display: block; font-size: 14px; font-weight: 800; color: var(--ink); transition: color .2s; }
.seg label .s { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 2px; transition: color .2s; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg:has(#m-phone:checked) label[for="m-phone"] .t, .seg:has(#m-phone:checked) label[for="m-phone"] .s,
.seg:has(#m-email:checked) label[for="m-email"] .t, .seg:has(#m-email:checked) label[for="m-email"] .s { color: var(--paper-2); }

.field { position: relative; margin-bottom: 9px; }
.field input {
  width: 100%; font-family: var(--sans); font-size: 19px; font-weight: 700; color: var(--ink);
  background: var(--paper-2); border: 2px solid var(--ink); padding: 13px 14px; letter-spacing: .01em;
}
.field input::placeholder { color: #a6a09a; font-weight: 600; }
.field input:focus { outline: none; box-shadow: inset 0 -5px 0 var(--red); }
.help { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 20px; display: flex; gap: 7px; align-items: flex-start; }
.help::before { content: ""; width: 0; height: 0; border-left: 6px solid var(--red); border-top: 4px solid transparent; border-bottom: 4px solid transparent; margin-top: 6px; flex: none; }
.field-error { color: var(--red-2); font-size: 12.5px; font-weight: 700; margin: -2px 0 16px; }
.field-error ul { list-style: none; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 22px; cursor: pointer; user-select: none; }
.consent input { position: absolute; opacity: 0; }
.box { flex: none; width: 22px; height: 22px; border: 2px solid var(--ink); margin-top: 1px; display: grid; place-items: center; transition: .18s; background: var(--paper-2); }
.box svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-dasharray: 18; stroke-dashoffset: 18; transition: stroke-dashoffset .28s ease .05s; }
.consent input:checked ~ .box { background: var(--red); border-color: var(--red); }
.consent input:checked ~ .box svg { stroke-dashoffset: 0; }
.consent input:focus-visible ~ .box { box-shadow: 0 0 0 3px var(--persimmon-tint); }
.consent .ctext { font-size: 12.5px; font-weight: 500; color: var(--ink-2); line-height: 1.5; }
.consent .ctext b { font-weight: 800; color: var(--ink); }
.consent .ctext a { color: var(--red-2); font-weight: 700; text-underline-offset: 2px; }

.cta {
  position: relative; width: 100%; font-family: var(--sans); font-size: 16px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--paper-2); background: var(--ink);
  border: 2px solid var(--ink); padding: 18px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 12px; overflow: hidden; transition: .18s var(--ease);
}
.cta:disabled { background: #bdb8b0; border-color: #bdb8b0; color: #f3f1ec; cursor: not-allowed; }
.cta:not(:disabled):hover { background: var(--red); border-color: var(--red); }
.cta:not(:disabled):active { transform: translateY(2px); }
.cta .arrow { font-family: var(--disp-en); font-size: 20px; transition: transform .3s var(--ease); }
.cta:not(:disabled):hover .arrow { transform: translateX(6px); }
.cta .spin { width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; display: none; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
body.loading .cta .arrow { display: none; }
body.loading .cta .spin { display: inline-block; }

.foot { margin-top: 18px; text-align: center; }
.foot a { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.privacy { margin-top: auto; padding-top: 24px; text-align: center; font-size: 10.5px; font-weight: 600; color: #a39d96; letter-spacing: .03em; }

/* reservations-closed panel (no open event) */
.closed-panel { border: 3px solid var(--ink); background: var(--paper-2); padding: 30px 24px; text-align: center; margin: 8px 0 4px; }
.closed-panel h2 { font-family: var(--disp-en); font-size: 34px; text-transform: uppercase; margin-bottom: 8px; }
.closed-panel p { font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* ==========================================================================
   Status page (the "pass")
   ========================================================================== */
.pass { position: relative; border: 3px solid var(--ink); background: var(--paper-2); overflow: hidden; transition: background .35s, color .35s, border-color .35s; }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-bottom: 2px solid var(--ink); }
.pass-head .ttl { font-family: var(--disp-en); font-size: 14px; letter-spacing: .04em; line-height: 1.05; text-transform: uppercase; }
.pass-head .ttl small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .22em; opacity: .7; }
.pass-head .sw { width: 38px; }
.pass .body { padding: 24px 22px 8px; }

.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: 6px 11px; border: 2px solid currentColor; margin-bottom: 18px; }

.numwrap { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.numwrap .lab { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); writing-mode: vertical-rl; align-self: stretch; }
.num { font-family: var(--disp-en); font-size: clamp(74px, 24vw, 104px); line-height: .82; letter-spacing: .005em; }
.num .hash { color: var(--red); }

/* waiting · brush-swash direction */
.wait-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
/* the merged "대기 중 = live" pill — it lights up */
.live-pill { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border: 2px solid var(--ink); color: var(--ink); animation: breathe 2.6s var(--ease) infinite; }
.live-pill .ld { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blip 1.6s infinite; flex: none; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 17, 45, 0); } 50% { box-shadow: 0 0 16px 1px rgba(232, 17, 45, .30); } }
@keyframes blip { 0% { box-shadow: 0 0 0 0 rgba(232, 17, 45, .55); } 70% { box-shadow: 0 0 0 7px rgba(232, 17, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 17, 45, 0); } }
/* prominent ticket number */
.ticket { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; line-height: 1; white-space: nowrap; }
.ticket .tl { font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.ticket .tn { font-family: var(--disp-en); font-size: clamp(30px, 9vw, 42px); color: var(--ink); letter-spacing: .01em; }
.ticket .tn .h { color: var(--red); }
/* people-ahead hero with red brush swash */
.ed { padding: 2px 0; }
.edlab { display: block; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.edrow { display: flex; align-items: flex-end; gap: 10px; margin-top: 4px; }
.ednum { font-family: var(--disp-en); font-size: clamp(90px, 30vw, 150px); line-height: .82; }
.ednum .swash { position: relative; display: inline-block; padding: 0 .12em; z-index: 0; color: var(--ink); }
.ednum .swash::before { content: ""; position: absolute; inset: 16% -.02em 18%; background: var(--red); z-index: -1; filter: url(#rough); transform: rotate(-1.6deg); }
.edunit { font-family: var(--disp-en); font-size: clamp(24px, 7vw, 34px); line-height: 1; padding-bottom: 14px; color: var(--ink); }
.edsub { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 8px; }
.ed.next .ednum { font-size: clamp(34px, 11vw, 54px); line-height: .95; }
.ed.next .ednum .t-ko { font-family: var(--disp-ko); font-weight: 900; letter-spacing: -.02em; }
.note { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.5; margin: 16px 0 6px; }

/* called */
.turn-h { font-family: var(--disp-en); font-size: clamp(32px, 9vw, 46px); line-height: 1.02; text-transform: uppercase; margin-bottom: 14px; }
.turn-h .t-ko { font-family: var(--disp-ko); font-weight: 900; letter-spacing: -.01em; }
.venue { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.venue::before { content: ""; width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-top: 6px; flex: none; }
.count { border: 2px solid currentColor; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.count .cl { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.count .cv { font-family: var(--disp-en); font-size: 30px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.showme { font-size: 13.5px; font-weight: 800; text-align: center; padding: 12px; border: 2px dashed currentColor; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }

/* missed / closed / left / checked-in big head */
.bighead { font-family: var(--disp-en); font-size: clamp(34px, 11vw, 46px); line-height: .96; text-transform: uppercase; margin: 6px 0 12px; }
.bighead .t-ko { font-family: var(--disp-ko); font-weight: 900; letter-spacing: -.01em; }
.muted-num { font-family: var(--disp-en); font-size: 60px; line-height: .85; color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--red); margin-bottom: 10px; }

.act { padding: 0 22px 20px; }
.act form { margin: 0; }
.btn { display: block; width: 100%; font-family: var(--sans); font-size: 14px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; text-align: center; text-decoration: none; padding: 14px; cursor: pointer; border: 2px solid var(--ink); background: transparent; color: var(--ink); transition: .18s; }
.btn:hover { background: var(--ink); color: var(--paper-2); }
.btn.solid { background: var(--ink); color: var(--paper-2); }
.btn.solid:hover { background: var(--red); border-color: var(--red); }

/* called · light card, red as a brush-swash accent (not a full flood) */
.pass.status-called .turn-h .hl { position: relative; display: inline-block; padding: 0 .12em; z-index: 0; color: var(--ink); }
.pass.status-called .turn-h .hl::before { content: ""; position: absolute; inset: 14% -.04em 16%; background: var(--red); opacity: .92; z-index: -1; filter: url(#rough); transform: rotate(-1.4deg); }
.pass.status-called .count .cv { color: var(--red); }
.pass.status-called .count.urgent { border-color: var(--red); background: var(--redbg); }
/* called · de-emphasised secondary elements (smaller, muted) */
.pass.status-called .showme { font-size: 11.5px; padding: 8px 10px; border: 1.5px dashed var(--line); color: var(--ink-2); }
.pass.status-called .act { padding: 10px 20px 16px; }
.pass.status-called .act .btn { font-size: 11.5px; padding: 9px; border-color: var(--line); color: var(--ink-2); }
.pass.status-called .act .btn:hover { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }

/* checked in: confirmed/green accent */
.pass.status-checked_in .badge { color: var(--green); }
.pass.status-checked_in .num .hash { color: var(--green); }

/* closed out: dark */
.pass.status-closed_out { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pass.status-closed_out .pass-head { border-color: rgba(255, 255, 255, .25); }
.pass.status-closed_out .pass-head .sw { fill: var(--paper); }
.pass.status-closed_out .num, .pass.status-closed_out .num .hash { color: var(--paper); }
.pass.status-closed_out .numwrap .lab { color: rgba(240, 238, 232, .7); }
.pass.status-closed_out .note { color: rgba(240, 238, 232, .7); }

/* missed / left: muted */
.pass.status-expired, .pass.status-cancelled { background: #eceae3; }

/* ==========================================================================
   Staff console
   ========================================================================== */
.bar { display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper); padding: 13px 18px; flex-wrap: wrap; }
.bar .sw { width: 46px; fill: var(--paper); flex: none; }
.bar .ev { font-family: var(--disp); font-size: 19px; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.bar .ev small { display: block; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .16em; opacity: .6; margin-top: 3px; text-transform: none; }
.openbadge { font-size: 10px; font-weight: 800; letter-spacing: .14em; background: var(--green); color: #fff; padding: 4px 8px; text-transform: uppercase; }
.dash.closed .openbadge { background: var(--ink-3); }
.bar .sp { flex: 1; }
.who { text-align: right; font-size: 12px; line-height: 1.3; }
.who b { font-weight: 700; }
.who .rl { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.who .rl.mg { color: #ffd23c; }
.logout { font-size: 11px; font-weight: 700; color: var(--paper); border: 1.5px solid rgba(255, 255, 255, .4); background: none; padding: 7px 11px; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
.logout:hover { background: rgba(255, 255, 255, .12); }

.counts { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink); border-top: 0; background: var(--card); }
.counts .c { padding: 16px 14px; border-right: 2px solid var(--line); }
.counts .c:last-child { border-right: 0; }
.counts .n { font-family: var(--disp); font-size: clamp(34px, 6vw, 46px); line-height: .9; }
.counts .l { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: 4px; }
.counts .c.exp .n { color: var(--red); }

.banner { display: none; background: var(--ink); color: var(--paper); padding: 13px 18px; margin: 16px 0; font-weight: 700; font-size: 14px; align-items: center; gap: 10px; }
.dash.closed .banner { display: flex; }
.banner .sw { width: 30px; fill: var(--red); flex: none; }
.notice { border: 2px solid var(--red); background: var(--redbg); color: var(--ink); padding: 11px 14px; margin: 14px 0; font-size: 13px; font-weight: 800; }

.callbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.callbar .lab { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.calls { display: flex; gap: 7px; flex-wrap: wrap; }
.calls form { display: inline; margin: 0; }
.calls button { font-family: var(--disp); font-size: 20px; letter-spacing: .03em; padding: 9px 16px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; transition: .15s; }
.calls button:hover { background: var(--red); border-color: var(--red); }
.calls button:disabled { background: var(--ink-3); border-color: var(--ink-3); cursor: not-allowed; }
.mgrctl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mgrctl .win { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border: 2px solid var(--ink); padding: 6px 10px; background: var(--card); }
.endbtn { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--red-2); background: none; border: 2px solid var(--red); padding: 8px 13px; cursor: pointer; }
.endbtn:hover { background: var(--red); color: #fff; }
.mgrctl form { margin: 0; }

.searchbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.searchbar label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.searchbar input { min-width: min(260px, 100%); border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink); padding: 8px 10px; font: 700 14px var(--sans); }
.searchbar button, .searchbar a { border: 2px solid var(--ink); background: var(--ink); color: var(--paper); padding: 8px 12px; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.search-results { margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.panel { border: 2px solid var(--ink); background: var(--card); }
.panel > h2 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 12px 14px; border-bottom: 2px solid var(--ink); display: flex; align-items: center; gap: 8px; }
.panel > h2 .ct { font-family: var(--disp); font-size: 18px; letter-spacing: .02em; }
.list { max-height: 520px; overflow: auto; }

.ccard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ccard:last-child { border-bottom: 0; }
.ccard .no { font-family: var(--disp); font-size: 26px; line-height: .9; min-width: 62px; }
.ccard .no .h { color: var(--red); font-size: 18px; }
.ccard .contact { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ccard .contact .since { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.ccard .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ccard .right form { margin: 0; }
.timer { font-family: var(--disp); font-size: 18px; letter-spacing: .03em; min-width: 60px; text-align: right; font-variant-numeric: tabular-nums; }
.timer.urgent { color: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .4; } }
.tag-exp { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--red); padding: 4px 7px; }
.ccard.exp { background: var(--redbg); border-left: 4px solid var(--red); }
.bchk { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--paper); background: var(--ink); border: 0; padding: 9px 14px; cursor: pointer; }
.bchk:hover { background: var(--green); }
.bmgr { font-size: 11px; font-weight: 700; color: var(--ink); background: var(--card); border: 1.5px solid var(--line-2); padding: 7px 9px; cursor: pointer; }
.bmgr:hover { border-color: var(--ink); background: var(--paper); }

.wrow { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wrow:last-child { border-bottom: 0; }
.wrow .no { font-family: var(--disp); font-size: 18px; min-width: 50px; }
.wrow .cn { color: var(--ink-2); font-weight: 600; flex: 1; font-variant-numeric: tabular-nums; }
.wrow .sn { font-size: 11px; color: var(--ink-3); }
.more { padding: 11px 14px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; background: var(--paper); }
.recent-checkins { margin-top: 16px; }

/* ==========================================================================
   Login
   ========================================================================== */
.login-panel { border: 2px solid var(--ink); background: var(--paper-2); padding: 28px; }
.login-panel h1 { font-family: var(--disp); font-size: 28px; text-transform: uppercase; letter-spacing: .02em; margin: 18px 0 4px; }
.login-panel .sub { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.login-panel label { display: block; margin-bottom: 14px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.login-panel input { width: 100%; margin-top: 7px; border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink); padding: 12px 14px; font: 700 17px var(--sans); }
.login-panel input:focus { outline: none; box-shadow: inset 0 -5px 0 var(--red); }
.login-panel .btn { margin-top: 6px; }
.form-error { color: var(--red-2); font-weight: 800; font-size: 13px; margin-bottom: 12px; }

/* ==========================================================================
   Responsive + reduced motion
   ========================================================================== */
@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
  .counts { grid-template-columns: repeat(2, 1fr); }
  .mgrctl { margin-left: 0; }
}
@media (max-width: 380px) { .wrap { padding: 16px 14px 30px; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal .swash::before { animation: none !important; opacity: 1; transform: none; }
  .live .dot, .live-pill, .live-pill .ld, .count.urgent, .timer.urgent { animation: none; }
}

/* ==========================================================================
   Day switcher + per-day flush (staff dashboard)
   ========================================================================== */
.daybar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.dateform { display: flex; align-items: center; gap: 8px; margin: 0; }
.dateform label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.dateform input { border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink); padding: 7px 10px; font: 700 14px var(--sans); }
.daysp { flex: 1; }
.flushbtn { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); background: none; border: 2px dashed var(--red); padding: 8px 13px; cursor: pointer; transition: .15s; }
.flushbtn:hover { background: var(--red); border-style: solid; color: #fff; }

.flush-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(10, 9, 9, .55); backdrop-filter: blur(2px); }
.flush-modal[hidden] { display: none; }
.flush-card { width: min(420px, 100%); background: var(--paper-2); border: 3px solid var(--red); padding: 26px 22px; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); }
.flush-card .warn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--disp); font-size: 24px; margin-bottom: 12px; }
.flush-card h3 { font-family: var(--disp); font-size: 24px; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 10px; }
.flush-card p { font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.5; margin-bottom: 8px; }
.flush-card p b { color: var(--ink); }
.flush-card .confirm-hint { font-size: 12.5px; font-weight: 700; color: var(--red-2); margin: 12px 0 6px; }
.flush-confirm { width: 100%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); padding: 10px 12px; font: 700 16px var(--sans); text-align: center; letter-spacing: .04em; margin-bottom: 16px; }
.flush-confirm:focus { outline: none; box-shadow: inset 0 -4px 0 var(--red); }
.flush-card form { margin: 0 0 8px; }
.flush-card .leave { display: block; width: 100%; border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink); padding: 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.flush-card .leave.danger { background: var(--red); border-color: var(--red); color: #fff; }
.flush-card .leave.danger:disabled { background: var(--ink-3); border-color: var(--ink-3); cursor: not-allowed; }
