/* Pad-Up Security - built for a tablet at the gate: big targets, one column,
   nothing that needs a mouse. Green is the office portal's own (the login
   tiles are Bootstrap's success green). */
:root {
  --ground: #F2F4F2;
  --surface: #FFFFFF;
  --sunk: #E9EDEA;
  --ink: #16201A;
  --muted: #5B6760;
  --line: #D9DFDB;
  --green: #1E7E34;
  --green-dk: #166228;
  --green-bg: #E4F3E8;
  --amber: #8A5A00;
  --amber-bg: #FBF0D9;
  --red: #A8321F;
  --red-bg: #FAE6E1;
  --focus: #1B6FD1;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- header ---------- */
.bar { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 5; }
.bar-in {
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: #9BE3AE; }
.clock { font-variant-numeric: tabular-nums; opacity: .9; font-size: 15px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.out { color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 8px; padding: 6px 12px; text-decoration: none; }
.out:hover { background: rgba(255,255,255,.12); }
.tabs {
  max-width: 1100px; margin: 0 auto; padding: 0 12px 8px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: #E3F5E8; text-decoration: none; padding: 9px 14px; border-radius: 8px;
  white-space: nowrap; font-weight: 600; font-size: 15px;
}
.tabs a.on { background: #fff; color: var(--green-dk); }
.tabs a:not(.on):hover { background: rgba(255,255,255,.12); }

/* ---------- page ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 19px; margin: 30px 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; max-width: 64ch; }

.flash { border-radius: 10px; padding: 14px 16px; margin: 0 0 18px; font-size: 16px; }
.flash.ok  { background: var(--green-bg); color: var(--green-dk); }
.flash.err { background: var(--red-bg);   color: var(--red); }
.flash.warn{ background: var(--amber-bg); color: var(--amber); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.card h2 { margin-top: 0; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 15px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.field { margin: 0 0 16px; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: #fff; border: 1px solid #BFC9C3; border-radius: 10px;
  padding: 12px 14px; min-height: 50px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(30,126,52,.2); outline-offset: 0; }
.code-input { font-size: 30px; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }
.stamp {
  background: var(--sunk); border-radius: 10px; padding: 12px 14px; font-variant-numeric: tabular-nums;
  color: var(--muted); font-size: 15px;
}
.stamp b { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 17px; min-height: 52px; padding: 0 22px;
  border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--green); color: #fff;
}
.btn:hover { background: var(--green-dk); }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--green-dk); border: 2px solid var(--green); }
.btn.ghost:hover { background: var(--green-bg); }
.btn.warn { background: var(--amber); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* the code a person is given: made to be copied */
.ticket {
  text-align: center; background: var(--green-bg); border: 2px dashed var(--green);
  border-radius: 14px; padding: 18px; margin: 0 0 18px;
}
.ticket .n { font-size: 54px; font-weight: 800; letter-spacing: .12em; color: var(--green-dk); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ticket p { margin: 6px 0 0; color: var(--green-dk); }

/* details popped up for confirmation */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- lists ---------- */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #FAFBFA; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pill.open { background: var(--amber-bg); color: var(--amber); }
.pill.done { background: var(--green-bg); color: var(--green-dk); }
.empty { color: var(--muted); padding: 18px; text-align: center; }

/* ---------- dashboard tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tile {
  display: block; text-decoration: none; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-height: 140px;
}
.tile:hover { border-color: var(--green); }
.tile .t { font-weight: 700; font-size: 19px; }
.tile .n { font-size: 40px; font-weight: 800; color: var(--green-dk); line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile .s { color: var(--muted); font-size: 14px; }
.tile.soon { opacity: .6; pointer-events: none; }

/* ---------- sign-in ---------- */
.signin { max-width: 420px; margin: 8vh auto 0; }
.signin .card { padding: 28px; }
.signin h1 { font-size: 24px; }

/* ---------- staff picker ---------- */
.picker { position: relative; }
.picker ul {
  list-style: none; margin: 4px 0 0; padding: 4px; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #BFC9C3; border-radius: 10px; position: absolute; left: 0; right: 0; z-index: 4;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.picker li { padding: 12px 12px; border-radius: 8px; cursor: pointer; }
.picker li:hover, .picker li.hi { background: var(--green-bg); }
.picker li small { color: var(--muted); display: block; }
.picked { margin-top: 8px; font-size: 14px; color: var(--green-dk); }
.picked.off { color: var(--amber); }

@media (max-width: 520px) {
  .who span { display: none; }
  .ticket .n { font-size: 44px; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
