/* Table of Hope Food Pantry — shared styles.
   One stylesheet for every screen. No build step, no framework. */

:root {
  --ink: #16242c;
  --ink-soft: #5a6b75;
  --line: #d7e0e6;
  --bg: #f4f7f9;
  --card: #ffffff;
  --navy: #2f4858;
  --blue: #33658a;
  --blue-soft: #eef4f7;
  --green: #2d6a4f;
  --green-soft: #e8f3ed;
  --amber: #b4690e;
  --amber-soft: #fdf3e3;
  --red: #8c2f39;
  --red-soft: #fbedee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 36, 44, .06), 0 4px 12px rgba(22, 36, 44, .06);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100vh; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}
.topbar h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 650;
  letter-spacing: .01em;
}
.topbar .spacer { flex: 1; }
.topbar .who {
  font-size: 13px;
  opacity: .85;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar a, .topbar button.link {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  opacity: .85;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
}
.topbar a:hover, .topbar button.link:hover { opacity: 1; background: rgba(255,255,255,.12); }
.topbar a.on { background: rgba(255,255,255,.18); opacity: 1; }

.demo-flag {
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- layout ---------- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 18px; }
.cols { display: grid; gap: 18px; }
@media (min-width: 900px) { .cols.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cols.side { grid-template-columns: 1.15fr .85fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card > h2 {
  margin: 0;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card > h2 .count {
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  letter-spacing: 0;
}
.card .body { padding: 14px 16px; }
.card .body.flush { padding: 0; }

/* ---------- day strip ---------- */
.daystrip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 4px;
  max-width: 1400px;
  margin: 0 auto;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 13px;
  min-width: 86px;
}
.stat .n { font-size: 21px; font-weight: 700; line-height: 1.1; }
.stat .l { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.stat.warn { background: var(--amber-soft); border-color: #e8d3ae; }
.stat.warn .n { color: var(--amber); }

/* ---------- buttons ---------- */
button, .btn {
  font-family: inherit;
  font-size: 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 550;
  transition: background .12s, border-color .12s;
}
button:hover, .btn:hover { background: var(--blue-soft); border-color: #b9cfdc; }
button:active { transform: translateY(1px); }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover { background: #2a5677; }
button.go { background: var(--green); border-color: var(--green); color: #fff; }
button.go:hover { background: #255a42; }
button.danger { background: #fff; border-color: #e0bcc0; color: var(--red); }
button.danger:hover { background: var(--red-soft); }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); padding: 6px 8px; }
button.ghost:hover { background: var(--blue-soft); color: var(--blue); }
button.tiny { font-size: 12px; padding: 4px 8px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:disabled:hover { background: #fff; border-color: var(--line); }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 5px; }
.right { margin-left: auto; }

/* ---------- forms ---------- */
label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-soft); margin-bottom: 4px; letter-spacing: .03em; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  width: 100%;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.field { margin-bottom: 12px; }
.fields2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }

.search {
  font-size: 17px;
  padding: 13px 15px;
}

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: none; }
.list li.done { opacity: .5; }
.list li.hi { background: var(--blue-soft); }
.grow { flex: 1; min-width: 0; }
.name { font-weight: 650; font-size: 15px; }
.meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.token { font-variant-numeric: tabular-nums; font-weight: 650; }

.pos {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

.pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  white-space: nowrap;
}
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red   { background: var(--red-soft); color: var(--red); }
.pill.grey  { background: #eef1f3; color: var(--ink-soft); }

.note {
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  padding: 6px 10px;
  border-radius: 0 7px 7px 0;
  font-size: 13px;
  margin-top: 6px;
}

.empty { padding: 26px 16px; text-align: center; color: var(--ink-soft); font-size: 14px; }

/* ---------- tablet cards on the dispatch board ---------- */
.tablets { display: grid; gap: 12px; padding: 14px 16px; }
.tcard {
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.tcard.free { border-left-color: var(--green); background: var(--green-soft); }
.tcard.busy { border-left-color: var(--blue); }
.tcard.ready { border-left-color: var(--amber); background: var(--amber-soft); }
.tcard h3 { margin: 0 0 3px; font-size: 15px; }
.tcard .sub { font-size: 12.5px; color: var(--ink-soft); }
.progress { height: 6px; background: #e6ecf0; border-radius: 3px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; background: var(--blue); }

/* ---------- modal ---------- */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(22, 36, 44, .5);
  display: grid; place-items: center;
  padding: 18px;
  z-index: 100;
}
.modal {
  background: #fff;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.modal h3 { margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 17px; }
.modal .body { padding: 18px 20px; }
.modal .foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--navy); color: #fff;
  padding: 11px 18px; border-radius: 10px;
  font-size: 14px; z-index: 200;
  box-shadow: 0 8px 26px rgba(0,0,0,.28);
  opacity: 0; pointer-events: none; transition: opacity .18s;
  max-width: 90vw;
}
#toast.show { opacity: 1; }
#toast.bad { background: var(--red); }

/* ---------- connection dot ---------- */
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: #7bbf95; display: block; }
.conn.off i { background: #c9a227; }

/* ---------- login ---------- */
.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 30px; width: 100%; max-width: 420px; text-align: center;
}
.login h1 { margin: 0 0 4px; font-size: 22px; }
.login p.sub { margin: 0 0 22px; color: var(--ink-soft); font-size: 14px; }
.pin-display {
  font-size: 30px; letter-spacing: .34em; height: 46px;
  font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 700;
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.keypad button { height: 62px; font-size: 22px; font-weight: 600; }
.hint { margin-top: 16px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; text-align: left;
        background: var(--blue-soft); padding: 12px 14px; border-radius: 10px; }
.hint b { color: var(--navy); }
