/* Deleted Scenes premiere - guest check-in. Shared by index.html (desk) and admin.html */
:root {
  --bg: #0e0d0f;
  --surface: #17151a;
  --surface-2: #1f1c22;
  --line: #2c2830;
  --text: #f3e6e6;          /* sampled from the Deleted Scenes logo */
  --muted: #a1979b;
  --red: #ed1b24;           /* sampled from the BBDO logo */
  --red-soft: rgba(237, 27, 36, .14);
  --green: #2fbf71;
  --green-soft: rgba(47, 191, 113, .14);
  --amber: #f2b33d;
  --amber-soft: rgba(242, 179, 61, .15);
  --brand-bar: #f7f7f7;     /* exact background of the BBDO logo file */
  --brand-ink: #231f20;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 var(--font);
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

/* ---------- Brand header: BBDO is the main (highlighted) logo ---------- */
.brand {
  background: var(--brand-bar);
  color: var(--brand-ink);
  border-bottom: 4px solid var(--red);
}
.brand-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 20px;
}
.brand-main { height: 54px; width: auto; display: block; }
.brand-spacer { flex: 1; }
.brand-links { display: flex; gap: 8px; align-items: center; }
.brand-links a {
  white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid #d9d9d9; background: #fff;
}
.brand-links a.active { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }

.hero {
  max-width: 1280px; margin: 0 auto; padding: 18px 20px 6px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.hero-ds { height: 64px; width: auto; display: block; opacity: .95; }
.hero-title { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.hero-title b { display: block; color: var(--text); font-size: 20px; letter-spacing: .06em; }
.sync { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.off { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.dot.err { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

main { max-width: 1280px; margin: 0 auto; padding: 10px 20px 60px; }

/* ---------- Controls ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button {
  border: 0; background: transparent; padding: 10px 22px; border-radius: 999px;
  font-weight: 700; color: var(--muted); letter-spacing: .02em;
}
.seg button.on { background: var(--red); color: #fff; }
.seg button.on.meal { background: var(--amber); color: #1b1407; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.search {
  flex: 1 1 320px; position: relative;
}
.search input {
  width: 100%; height: 56px; padding: 0 48px 0 52px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 19px; outline: none;
}
.search input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.search svg { position: absolute; left: 17px; top: 17px; width: 22px; height: 22px; color: var(--muted); }
.search .clear {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 22px;
}
select, .input {
  height: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 14px; font-size: 16px; outline: none; min-width: 0;
}
select:focus, .input:focus { border-color: var(--red); }
select option { background: var(--surface); }

.btn {
  height: 56px; padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 700; white-space: nowrap;
}
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.chip.on { color: #fff; border-color: var(--red); background: var(--red-soft); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 15px; color: var(--muted); font-weight: 600; }
.bar { height: 6px; background: var(--line); border-radius: 6px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 6px; width: 0; transition: width .4s; }
.bar.meal i { background: var(--amber); }

/* ---------- Guest list ---------- */
.list { display: grid; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 12px 12px 18px; min-height: 76px;
}
.row.done { border-color: rgba(47, 191, 113, .45); background: linear-gradient(90deg, var(--green-soft), var(--surface) 55%); }
.row.meal-done { border-color: rgba(242, 179, 61, .45); background: linear-gradient(90deg, var(--amber-soft), var(--surface) 55%); }
.row .who { flex: 1; min-width: 0; }
.row .name { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.row .name mark { background: transparent; color: var(--red); }
.row .meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.tag { border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tag.cat { color: var(--text); }
.tag.new { border-color: var(--red); color: #ff8a8f; }
.tag.ok { border-color: rgba(47, 191, 113, .5); color: #7fe0aa; }
.tag.meal { border-color: rgba(242, 179, 61, .55); color: #f7cd7a; }
.row .act { display: flex; gap: 8px; align-items: center; }
.go {
  min-width: 150px; height: 56px; border-radius: 12px; border: 0; font-weight: 800; font-size: 16px;
  background: var(--red); color: #fff; letter-spacing: .02em;
}
.go.meal { background: var(--amber); color: #1b1407; }
.go.undo { background: transparent; border: 1px solid var(--line); color: var(--muted); min-width: 0; padding: 0 16px; font-weight: 600; }
.go:active { transform: scale(.98); }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }
.more { text-align: center; color: var(--muted); font-size: 14px; padding: 12px; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 50; padding: 16px;
}
.modal {
  width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  max-height: calc(100vh - 32px); overflow: auto;
}
.modal h2 { margin: 0 0 14px; font-size: 20px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.field .input, .field select { height: 50px; width: 100%; }
.check { display: flex; gap: 10px; align-items: center; margin: 6px 0 4px; color: var(--muted); }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(560px, calc(100% - 32px)); }
.toast {
  background: #fff; color: #111; border-radius: 12px; padding: 13px 16px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); border-left: 6px solid var(--green);
  display: flex; gap: 12px; align-items: center; animation: tin .2s ease-out;
}
.toast.warn { border-left-color: var(--amber); }
.toast.err { border-left-color: var(--red); }
.toast span { flex: 1; }
.toast button { border: 0; background: #eee; border-radius: 8px; padding: 6px 12px; font-weight: 700; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Admin ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cats { width: 100%; border-collapse: collapse; font-size: 15px; }
.cats th, .cats td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.cats th { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.cats td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cats .bar { margin-top: 0; min-width: 80px; }
.cats tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { position: sticky; top: 0; background: var(--surface); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.tbl td.t { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl .nm { font-weight: 600; }
.mini { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.mini.red { background: var(--red); border-color: var(--red); color: #fff; }
.mini.amb { background: var(--amber); border-color: var(--amber); color: #1b1407; }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.log { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-size: 14px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.log li time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.links { display: grid; gap: 6px; font-size: 14px; }
.link-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: 0; }
.link-row span { flex: 1; }
.links a { color: var(--muted); text-decoration: none; white-space: nowrap; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.links a:hover { color: var(--text); border-color: var(--red); }

@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .brand-inner { padding: 10px 16px; gap: 10px; }
  .brand-main { height: 34px; }
  .brand-links a { padding: 6px 10px; font-size: 13px; }
  .hero { padding: 12px 16px 0; }
  .hero-ds { height: 40px; }
  .hero-title b { font-size: 16px; }
  main { padding: 8px 16px 60px; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .toolbar select, .toolbar .btn { flex: 1 1 45%; }
  .row { flex-wrap: wrap; padding: 12px; }
  .row .act { width: 100%; }
  .go { flex: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
}
