:root {
  --bg: #12100d;
  --panel: #1c1916;
  --panel-2: #262119;
  --line: #3a3229;
  --gold: #c9a227;
  --gold-soft: #e3c765;
  --text: #f2ece1;
  --muted: #a1958180;
  --muted-solid: #a19581;
  --green: #4c9a5a;
  --red: #b4483c;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px; letter-spacing: -0.5px;
}
.brand-text { min-width: 0; }
.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px; letter-spacing: 0.3px; line-height: 1.1;
}
.brand-sub {
  font-size: 11px; color: var(--muted-solid);
  text-transform: uppercase; letter-spacing: 1.1px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------- generic ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card + .card { margin-top: 14px; }

h2 { font-family: Georgia, serif; font-weight: 500; font-size: 20px; margin: 0 0 4px; }
.sub { color: var(--muted-solid); font-size: 14px; margin: 0 0 16px; line-height: 1.45; }

button {
  font: inherit;
  border-radius: 11px;
  border: 1px solid transparent;
  padding: 15px 18px;
  cursor: pointer;
  transition: filter .15s, opacity .15s;
  touch-action: manipulation;
}
button:active { filter: brightness(.9); }
button:disabled { opacity: .5; cursor: default; }

.btn-primary {
  width: 100%;
  background: var(--gold);
  color: #1a1408;
  font-weight: 650;
  letter-spacing: .2px;
}
.btn-secondary {
  width: 100%;
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost {
  background: transparent; border: none; color: var(--muted-solid);
  font-size: 14px; padding: 10px;
}
.btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.btn-small {
  padding: 9px 13px; font-size: 13px; border-radius: 9px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}

label { display: block; font-size: 13px; color: var(--muted-solid); margin-bottom: 7px;
        text-transform: uppercase; letter-spacing: .8px; }

input[type=text], input[type=tel], input[type=number], input[type=password],
input[type=search], select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 11px;
  padding: 15px 16px;
  font: inherit;
  outline: none;
}
input:focus, select:focus { border-color: var(--gold); }
input::placeholder { color: #6f6558; }

.field + .field { margin-top: 14px; }

/* ---------- screens ---------- */
.screen { display: none; animation: fade .18s ease; flex: 1; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ---------- scanner ---------- */
#reader {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  min-height: 240px;
}
#reader video { width: 100% !important; display: block; }
.scan-hint {
  text-align: center; color: var(--muted-solid); font-size: 13px;
  margin: 12px 0 2px; line-height: 1.5;
}
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted-solid); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 20px 0 16px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------- member card ---------- */
.member-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  background: var(--panel-2); border: 1.5px solid var(--gold);
  display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 20px; color: var(--gold-soft);
}
.member-name { font-family: Georgia, serif; font-size: 21px; line-height: 1.2; }
.member-code { font-size: 13px; color: var(--muted-solid); margin-top: 3px; letter-spacing: .5px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 14px;
}
.stat-label { font-size: 11px; color: var(--muted-solid); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 19px; margin-top: 5px; font-family: Georgia, serif; }
.stat-value.low { color: var(--red); }

.pill {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; letter-spacing: .5px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted-solid);
}
.pill.ok { color: var(--green); border-color: #2f5c38; background: #16281a; }
.pill.warn { color: var(--gold-soft); border-color: #5c4c1c; background: #2a2410; }

/* ---------- success ---------- */
.success-mark {
  width: 72px; height: 72px; margin: 6px auto 16px;
  border-radius: 50%; display: grid; place-items: center;
  background: #16281a; border: 2px solid var(--green);
  color: var(--green); font-size: 34px;
}
.center { text-align: center; }

/* ---------- amounts ---------- */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.amount-btn {
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); padding: 16px 6px; font-size: 17px;
  font-family: Georgia, serif; border-radius: 11px;
}
.amount-btn.selected { border-color: var(--gold); background: #2e2712; color: var(--gold-soft); }

#card-container {
  background: #fff; border-radius: 11px; padding: 4px 12px; min-height: 56px;
}
.sandbox-note {
  margin-top: 12px; font-size: 12px; color: var(--muted-solid);
  background: var(--panel-2); border: 1px dashed var(--line);
  border-radius: 9px; padding: 11px 13px; line-height: 1.6;
}
.sandbox-note code { color: var(--gold-soft); font-size: 12px; }

/* ---------- misc ---------- */
.msg { border-radius: 10px; padding: 13px 15px; font-size: 14px; margin-bottom: 14px; line-height: 1.5; }
.msg.error { background: #2c1512; border: 1px solid #6b2c24; color: #f0b6ae; }
.msg.info  { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted-solid); }
.hidden { display: none !important; }

.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }
.list-row .meta { font-size: 13px; color: var(--muted-solid); margin-top: 3px; }
.list-main { min-width: 0; }
.list-title { font-size: 16px; }

.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25); border-top-color: #1a1408;
  display: inline-block; vertical-align: -3px; margin-right: 9px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-link { text-align: center; margin-top: auto; padding-top: 22px; }
.footer-link a { color: var(--muted-solid); font-size: 13px; text-decoration: none; }

/* ---------- membership expiry ---------- */
.expiry {
  margin-top: 12px; padding: 12px 14px; border-radius: 11px;
  font-size: 14px; line-height: 1.45;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted-solid);
}
.expiry.ok      { border-color: #2f5c38; background: #16281a; color: #8fce9c; }
.expiry.soon    { border-color: #5c4c1c; background: #2a2410; color: var(--gold-soft); }
.expiry.expired { border-color: #6b2c24; background: #2c1512; color: #f0b6ae; }
.expiry strong  { font-weight: 650; }

/* ---------- meeting rows ---------- */
.row-actions { display: flex; gap: 6px; flex: none; align-items: center; }
.icon-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted-solid);
  border-radius: 9px; padding: 8px 11px; font-size: 14px; line-height: 1;
}
.icon-btn.danger { color: #d98a80; border-color: #5a2c26; }
.cost-tag { color: var(--gold-soft); }

/* ---------- meeting admission fee toggle ---------- */
.fee-box {
  margin-top: 12px; padding: 14px; border-radius: 11px;
  background: #2a2410; border: 1px solid #5c4c1c;
}
.fee-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.fee-title { font-size: 16px; color: var(--gold-soft); }
.fee-note { font-size: 12.5px; color: var(--muted-solid); margin-top: 3px; line-height: 1.4; }

.switch { position: relative; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  display: block; width: 50px; height: 30px; border-radius: 999px;
  background: #3a3229; border: 1px solid var(--line); transition: background .18s;
}
.switch-thumb {
  display: block; width: 24px; height: 24px; border-radius: 50%;
  background: #8a7f6d; margin: 2px; transition: transform .18s, background .18s;
}
.switch input:checked + .switch-track { background: #5c4c1c; border-color: var(--gold); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); background: var(--gold); }

/* ---------- fee list ---------- */
.fee-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 11px; padding: 14px 15px; margin-bottom: 9px;
}
.fee-item:disabled { opacity: .45; }
.fee-item .amt { font-family: Georgia, serif; font-size: 17px; color: var(--gold-soft); flex: none; }
.fee-item .ext { font-size: 12px; color: var(--muted-solid); margin-top: 3px; }

/* ---------- payment method toggle ---------- */
.method-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.method-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted-solid);
  border-radius: 11px; padding: 14px 8px; font-size: 13.5px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.method-btn.selected { border-color: var(--gold); background: #2e2712; color: var(--gold-soft); }
.method-icon { font-size: 21px; line-height: 1; }
.tap-explain {
  font-size: 13px; color: var(--muted-solid); line-height: 1.6;
  background: var(--panel-2); border: 1px dashed var(--line);
  border-radius: 9px; padding: 12px 14px;
}

/* ---------- contactless overlay ---------- */
.tap-sheet {
  position: fixed; inset: 0; background: #0b0a08f2; z-index: 60;
  display: none; place-items: center; padding: 22px;
}
.tap-sheet.open { display: grid; }
.tap-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 22px 22px; text-align: center; width: 100%; max-width: 380px;
}
.tap-amount { font-family: Georgia, serif; font-size: 34px; margin-top: 8px; color: var(--gold-soft); }
.tap-title { font-size: 17px; margin-top: 12px; line-height: 1.35; }
.tap-sub { font-size: 13.5px; color: var(--muted-solid); margin-top: 8px; line-height: 1.5; }

.nfc { position: relative; width: 108px; height: 108px; margin: 0 auto; }
.nfc-dot {
  position: absolute; top: 50%; left: 50%; width: 15px; height: 15px;
  margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: var(--gold);
}
.nfc-wave {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 2px solid var(--gold); opacity: 0;
  animation: nfcPulse 2.1s ease-out infinite;
}
.nfc-wave.w1 { width: 44px;  height: 44px;  margin: -22px 0 0 -22px; animation-delay: 0s; }
.nfc-wave.w2 { width: 74px;  height: 74px;  margin: -37px 0 0 -37px; animation-delay: .35s; }
.nfc-wave.w3 { width: 104px; height: 104px; margin: -52px 0 0 -52px; animation-delay: .7s; }
@keyframes nfcPulse {
  0%   { opacity: 0;   transform: scale(.65); }
  35%  { opacity: .85; }
  100% { opacity: 0;   transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .nfc-wave { animation: none; opacity: .5; }
}

/* ---------- meeting list rows ---------- */
.meeting-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.meeting-row:last-child { border-bottom: none; }
.meeting-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 5px;
}
.meeting-head .list-title { line-height: 1.25; }
.meeting-head .pill { flex: none; margin-top: 1px; }
.meeting-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 11px;
}

/* ---------- camera card scan ---------- */
.scan-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-bottom: 10px;
}
.scan-icon { font-size: 18px; line-height: 1; color: var(--gold); }
.scan-tip {
  font-size: 12.5px; color: var(--muted-solid); line-height: 1.55;
  margin: 0 0 13px; text-transform: none; letter-spacing: 0;
}
.scan-tip strong { color: var(--gold-soft); }

/* ================= admin dashboard ================= */
.app.wide { max-width: 1000px; }

.tabs-scroll { overflow-x: auto; margin-bottom: 18px; -webkit-overflow-scrolling: touch; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs { display: flex; gap: 8px; min-width: max-content; }
.tab {
  padding: 11px 16px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted-solid); border-radius: 11px; font-size: 14px; white-space: nowrap;
}
.tab.active { border-color: var(--gold); color: var(--gold-soft); background: #2e2712; }

/* headline figures */
.kpi-grid {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.kpi {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 17px;
}
.kpi-label {
  font-size: 11px; color: var(--muted-solid);
  text-transform: uppercase; letter-spacing: 1.1px;
}
.kpi-value {
  font-family: Georgia, serif; font-size: 29px; margin-top: 7px; line-height: 1.1;
}
.kpi-value.gold { color: var(--gold-soft); }
.kpi-value.green { color: #8fce9c; }
.kpi-value.red { color: #f0b6ae; }
.kpi-note { font-size: 12.5px; color: var(--muted-solid); margin-top: 7px; line-height: 1.45; }

.recon {
  /* plain block so the sentence wraps normally instead of splitting into columns */
  display: block; line-height: 1.6;
  font-size: 13.5px; padding: 12px 14px; border-radius: 10px; margin-bottom: 18px;
  background: #16281a; border: 1px solid #2f5c38; color: #8fce9c;
}
.recon.bad { background: #2c1512; border-color: #6b2c24; color: #f0b6ae; }

/* chart */
.chart {
  display: flex; align-items: flex-end; gap: 4px;
  height: 170px; padding: 12px 2px 0; overflow-x: auto;
}
.chart-col {
  flex: 1 0 34px; display: flex; flex-direction: column;
  align-items: center; gap: 5px; height: 100%;
}
.chart-bars {
  flex: 1; width: 100%; display: flex; align-items: flex-end;
  justify-content: center; gap: 3px;
}
.bar { width: 13px; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar.in  { background: var(--gold); }
.bar.out { background: #8a7c64; }
.chart-label {
  font-size: 10px; color: var(--muted-solid); white-space: nowrap;
  transform: rotate(-45deg); transform-origin: center; height: 22px;
}
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted-solid); margin-top: 14px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 380px; }
table.data th {
  text-align: left; font-size: 11px; color: var(--muted-solid);
  text-transform: uppercase; letter-spacing: 1px; font-weight: 400;
  padding: 0 10px 9px 0; border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-family: Georgia, serif; white-space: nowrap; }
table.data .num.in { color: #8fce9c; }
table.data .num.out { color: #d9a08a; }

/* activity feed */
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 8px 13px; border-radius: 999px; font-size: 13px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted-solid);
}
.chip.active { border-color: var(--gold); color: var(--gold-soft); background: #2e2712; }

.event { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: none; }
.event-icon {
  width: 33px; height: 33px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.event-icon.in  { color: #8fce9c; border-color: #2f5c38; }
.event-icon.out { color: #d9a08a; border-color: #5a2c26; }
.event-icon.who { color: var(--gold-soft); border-color: #5c4c1c; }
.event-body { flex: 1; min-width: 0; }
.event-top { display: flex; justify-content: space-between; gap: 10px; }
.event-title { font-size: 15px; }
.event-amt { font-family: Georgia, serif; flex: none; }
.event-amt.in { color: #8fce9c; }
.event-amt.out { color: #d9a08a; }
.event-meta { font-size: 12.5px; color: var(--muted-solid); margin-top: 3px; line-height: 1.45; }

/* product editor */
.product-form {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.inline-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.retired { opacity: .55; }

/* Meeting switcher on the scan screen — full width, sits under the heading. */
.meeting-switch { margin-bottom: 16px; }
.meeting-switch select { width: 100%; }

/* ---------- splash & login ---------- */
/* Both run before sign-in, when the header is hidden, so they centre in the
   whole viewport rather than sitting under a topbar that isn't there. */
.splash {
  /* --splash-ms is set from JS so the progress line and the screen's own
     lifetime cannot drift apart. */
  --splash-ms: 3200ms;
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  min-height: 78vh; gap: 16px;
}
.splash-mark {
  width: 132px; height: 132px;
  color: var(--gold);
  /* Soft pool of light behind the ball so it doesn't float on flat black. */
  background: radial-gradient(circle at 48% 46%, #c9a2271f 0%, transparent 62%);
  animation: yarn-drop .72s cubic-bezier(.17, .84, .44, 1) both;
}
.yarn {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor;
  stroke-width: 2.3; stroke-linecap: round;
}
.yarn-rim { stroke-width: 2.6; }
/* The windings turn inside a fixed rim, so the ball reads as winding on
   rather than the whole icon spinning. */
.yarn-winds {
  transform-origin: 56px 56px;
  animation: yarn-wind 16s linear infinite;
  opacity: .85;
}
/* The loose end draws itself once, in step with the splash. */
.yarn-thread {
  stroke-dasharray: 46;
  stroke-dashoffset: 46;
  opacity: .9;
  animation: yarn-pull calc(var(--splash-ms) * .8) ease-out .28s both;
}

.splash-title {
  font-family: Georgia, serif; font-size: 27px; letter-spacing: .4px;
  animation: splash-in .6s ease .18s both;
}
.splash-sub {
  font-size: 12px; color: var(--muted-solid);
  text-transform: uppercase; letter-spacing: 2.4px; margin-top: -8px;
  animation: splash-in .6s ease .3s both;
}
.splash-progress {
  width: 132px; height: 2px; margin-top: 12px;
  background: var(--line); border-radius: 2px; overflow: hidden;
  animation: splash-in .6s ease .42s both;
}
.splash-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  animation: splash-fill var(--splash-ms) ease-out both;
}

@keyframes splash-in  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
@keyframes yarn-drop  { from { opacity: 0; transform: translateY(-14px) scale(.82); }
                        to   { opacity: 1; transform: none; } }
@keyframes yarn-wind  { to { transform: rotate(360deg); } }
@keyframes yarn-pull  { to { stroke-dashoffset: 0; } }
@keyframes splash-fill { to { width: 100%; } }

/* Anyone who has asked for less motion gets the same screen, held still. */
@media (prefers-reduced-motion: reduce) {
  .splash-mark, .splash-title, .splash-sub, .splash-progress { animation: none; }
  .yarn-winds { animation: none; }
  .yarn-thread { animation: none; stroke-dashoffset: 0; }
  .splash-progress span { animation-duration: var(--splash-ms); }
}

.login-wrap { display: flex; flex-direction: column; justify-content: center; min-height: 70vh; }

/* Six discrete digits, spaced so staff can see how many they have entered. */
.pin-input {
  text-align: center;
  font-size: 26px;
  letter-spacing: 12px;
  text-indent: 12px;   /* re-centre: letter-spacing pads only the right side */
  padding: 18px 16px;
}

/* Logout lives only at the foot of the Dashboard — deliberately out of reach
   of the front desk mid-shift, and red so it reads as the way out. */
.logout-row { margin-top: 22px; text-align: center; }
.btn-logout {
  background: transparent;
  border: none;
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 12px 18px;
}
.btn-logout:hover { text-decoration: underline; }

/* Dashboard action tile — the way through to the Products flow. */
.tile {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
  color: var(--text);
  margin-bottom: 14px;
}
.tile:hover { border-color: var(--gold); }
.tile-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.tile-title { font-family: Georgia, serif; font-size: 19px; color: var(--gold-soft); }
.tile-sub { font-size: 13.5px; color: var(--muted-solid); line-height: 1.45; }
.tile-go { color: var(--gold); font-size: 26px; line-height: 1; flex: none; }

/* Attendance timestamps: a check-in is a record of when someone was in the
   building, so it carries its date as well as its clock time. Without the date
   a meeting checked into across several days reads as one evening. */
.checkin-stamp { text-align: right; flex: none; padding-left: 12px; }
.stamp-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stamp-date {
  font-size: 12px; color: var(--muted-solid);
  margin-top: 3px; white-space: nowrap;
}

/* ---------- meeting list ---------- */
/* The primary action sits above the list: staff adding a meeting should not
   have to scroll past every meeting there is to reach the button. */
.btn-row-top { margin-top: 0; margin-bottom: 14px; }

/* Closed meetings are kept, but folded away — they are history, not a choice
   the front desk is being asked to make. */
.closed-block { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.closed-block summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 2px; cursor: pointer; list-style: none;
  color: var(--muted-solid); font-size: 14px;
}
.closed-block summary::-webkit-details-marker { display: none; }
.closed-block summary::before {
  content: '\203A';
  color: var(--gold); font-size: 20px; line-height: 1;
  transition: transform .18s ease;
}
.closed-block[open] summary::before { transform: rotate(90deg); }
.closed-label { flex: 1; }
.closed-count {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 2px 10px; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.list-empty { color: var(--muted-solid); font-size: 14px; padding: 14px 2px; }

/* Roster rows open a member profile; the badge button sits inside them. */
.roster-row { cursor: pointer; }
.roster-row:hover { border-color: var(--gold); }
.roster-right { text-align: right; flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.roster-right .icon-btn { margin-top: 4px; }

/* ---------- confirm toast ---------- */
/* Used where an action needs a deliberate second press but a full page of
   its own would be too much — overriding a meeting's status, for one. */
.toast-wrap {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: flex-end; justify-content: center;
  padding: 18px calc(16px + env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom));
  background: #0009;
}
.toast-wrap.open { display: flex; }
.toast {
  width: 100%; max-width: 520px;
  background: var(--panel-2);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 16px 40px #000a;
  animation: toast-up .2s ease both;
}
.toast-text { font-size: 15px; line-height: 1.5; }
.toast-actions { display: flex; gap: 10px; margin-top: 16px; }
.toast-actions .btn-small { flex: 1; padding: 13px; font-size: 14px; }
.toast-confirm { background: var(--gold); color: #1a1408; border-color: var(--gold); font-weight: 650; }
@keyframes toast-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- sheet (member add / edit) ---------- */
/* Overlays whichever screen called it, so creating a member from a failed scan
   does not lose the queue's place. */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 70;
  display: none; align-items: flex-start; justify-content: center;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  background: #000000cc; overflow-y: auto;
}
.sheet-wrap.open { display: flex; }
.sheet {
  width: 100%; max-width: 560px;
  background: var(--panel);
  animation: sheet-in .2s ease both;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
