/* Shop Checkin — shared styles. Dark industrial, orange accent, touch-first. */
:root {
  --bg: #0f1419;
  --panel: #1a2129;
  --panel2: #222b35;
  --line: #2e3a46;
  --text: #eef2f5;
  --muted: #8fa0af;
  --accent: #ff6a00;
  --accent-hover: #ff8433;
  --ok: #2ecc71;
  --warn: #f5b041;
  --err: #ff5252;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--accent); }
button {
  font: inherit; cursor: pointer; border: none; border-radius: var(--radius);
  transition: background .15s, transform .05s;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: default; }
.btn-primary {
  background: var(--accent); color: #fff; font-size: 20px; font-weight: 700;
  padding: 18px 32px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--panel2); color: var(--text); font-size: 20px; font-weight: 600;
  padding: 18px 32px; border: 1px solid var(--line);
}
.btn-ghost { background: transparent; color: var(--muted); padding: 10px 16px; font-size: 15px; }
.btn-sm {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  padding: 7px 14px; font-size: 13px; border-radius: 8px;
}
.btn-sm.accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-sm.warn { color: var(--err); }
input, select, textarea {
  font: inherit; width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font-size: 17px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.muted { color: var(--muted); }
.error { color: var(--err); font-size: 15px; }
.hidden { display: none !important; }
.wordmark { font-weight: 800; letter-spacing: .02em; }
.wordmark .v { color: var(--accent); }

.badge-pill {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 800;
  border-radius: 8px; padding: 4px 12px; letter-spacing: .04em;
}
/* status pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.on   { background: rgba(46,204,113,.15); color: var(--ok); }
.pill.out  { background: var(--panel2); color: var(--muted); }
.pill.wait { background: rgba(245,176,65,.15); color: var(--warn); }
.pill.bad  { background: rgba(255,82,82,.15); color: var(--err); }
.pill.hold { background: rgba(155,89,182,.18); color: #c39bd3; }

/* signature pad */
.sigpad {
  width: 100%; height: 160px; background: #fff; border-radius: 10px;
  touch-action: none; display: block;
}
.ackrow {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; margin-top: 10px;
}
.ackrow input[type=checkbox] { width: 26px; height: 26px; flex: 0 0 auto; accent-color: var(--accent); margin-top: 2px; }
.ackrow span { font-size: 15px; line-height: 1.45; }
.agreement {
  max-height: 140px; overflow-y: auto; font-size: 14px; color: var(--muted);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; line-height: 1.5; margin-top: 6px;
}

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: rgba(255,255,255,.02); }
.tablecard { padding: 0; overflow-x: auto; }

/* tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  padding: 10px 18px; font-size: 15px; font-weight: 600; border-radius: 10px;
}
.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .n { font-size: 34px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* banner */
.banner {
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
  font-size: 15px; line-height: 1.45; border: 1px solid;
}
.banner.warn { background: rgba(245,176,65,.1); border-color: rgba(245,176,65,.4); color: var(--warn); }
.banner.err  { background: rgba(255,82,82,.1); border-color: rgba(255,82,82,.4); color: var(--err); }
.banner.info { background: rgba(255,106,0,.08); border-color: rgba(255,106,0,.35); color: var(--text); }

/* modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; z-index: 40; padding: 16px;
}
.modal .card { width: min(520px, 94vw); max-height: 90vh; overflow-y: auto; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-size: 15px; z-index: 100;
  box-shadow: 0 8px 30px rgba(0,0,0,.45); max-width: 90vw;
}
#toast.err { border-color: var(--err); color: var(--err); }

/* big pairing / badge code */
.bigcode {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 44px; font-weight: 800; letter-spacing: .18em; text-align: center;
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px;
  padding: 22px 10px; margin: 14px 0;
}
.codebox {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; word-break: break-all;
}

/* loading */
.loading { color: var(--muted); text-align: center; padding: 36px 0; font-size: 15px; }
.empty { color: var(--muted); text-align: center; padding: 34px 12px; font-size: 15px; }

/* checkmark circles */
.checkmark {
  width: 90px; height: 90px; border-radius: 50%; background: var(--ok);
  display: flex; align-items: center; justify-content: center; font-size: 48px; color: #fff;
}
.checkmark.wait { background: var(--warn); }

/* roll call print */
@media print {
  body { background: #fff; color: #000; }
  body.printing-rollcall * { visibility: hidden; }
  body.printing-rollcall #rollcallPrint, body.printing-rollcall #rollcallPrint * { visibility: visible; }
  body.printing-rollcall #rollcallPrint { position: absolute; left: 0; top: 0; width: 100%; color: #000; }
}
