/* Turf app demo (from the VVAY To Play app): made for a phone held in one hand. A light, calm look (owner, 2026-11-25):
   white header and cards on a soft background, gentle green for what is selected or saved,
   soft tints instead of strong fills, medium-weight text. Big tap targets stay. */

:root {
  --accent: #2e7d55;        /* text, icons and lines for what is active */
  --accent-fill: #4f9a74;   /* the one solid button: Save / Renew */
  --accent-soft: #eaf5ee;   /* selected and highlighted backgrounds */
  --accent-line: #cfe6d8;
  --bg: #f5f7f4;
  --card: #ffffff;
  --ink: #24302a;
  --muted: #6f7b74;
  --line: #e5ebe3;
  --field: #dde4da;
  --cash: #2e7d55;
  --cash-bg: #ebf6ef;
  --upi: #5b4bb0;
  --upi-bg: #f1eefb;
  --ok: #4fa774;
  --soon: #d3912f;
  --bad: #d05a5a;
  --shadow: 0 1px 3px rgba(30, 50, 40, .06);
  --radius: 16px;
  --tabs-h: 64px;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
body.is-login { background: var(--bg); }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.boot { margin: auto; color: var(--muted); }
a { color: inherit; }
button { font: inherit; }

/* ---- Header ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: #fff; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.top-logo { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.top-titles { flex: 1; min-width: 0; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.top h1 { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: inherit;
  cursor: pointer; text-decoration: none;
}
.top .icon-btn { color: var(--muted); }
.top .icon-btn:active { background: var(--bg); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---- Page ---- */
.page { flex: 1; padding: 14px 12px 28px; display: flex; flex-direction: column; gap: 12px; }
.page.with-tabs { padding-bottom: calc(var(--tabs-h) + 88px + env(safe-area-inset-bottom)); }
.page.with-bar { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); font-weight: 500; }

/* ---- Bottom tabs and the Add button ---- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  position: relative; height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 500;
}
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tab[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px;
  border-radius: 0 0 2px 2px; background: var(--accent);
}
.fab {
  position: fixed; z-index: 21;
  right: max(16px, calc(50vw - 264px));
  bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 6px;
  height: 52px; padding: 0 20px 0 16px;
  border: 1px solid var(--accent-line); border-radius: 26px;
  background: #fff; color: var(--accent);
  font-size: 16px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(30, 50, 40, .12);
  cursor: pointer;
}
.fab:active { background: var(--accent-soft); }

/* ---- Cards and rows ---- */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px 6px; }
.card-head h2 { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.card-sum { font-weight: 650; font-variant-numeric: tabular-nums; }
.card-body { padding: 6px 16px 16px; }

.rows { list-style: none; margin: 0; padding: 0 0 4px; }
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 16px;
  color: inherit; text-decoration: none;
  border-top: 1px solid var(--line);
}
.rows > .row:first-child, .rows > li:first-child > .row { border-top: 0; }
a.row:active, button.row:active, .row-link:active { background: var(--bg); }
button.row { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; color: inherit; }
.row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; align-self: stretch; }
.row-no {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: 13.5px; }
.row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.amt { font-weight: 650; font-size: 16.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.end { font-weight: 600; font-size: 14px; white-space: nowrap; }
.end.soon { color: var(--soon); }
.end.expired { color: var(--bad); }
.end.inactive { color: var(--muted); font-weight: 500; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.tag.cash { background: var(--cash-bg); color: var(--cash); }
.tag.upi { background: var(--upi-bg); color: var(--upi); }
.tag.none { background: #eef0ef; color: var(--muted); }
.tag.kid { margin-left: 6px; background: #fbf4dc; color: #85691a; vertical-align: 2px; }
.tag.bad { background: #fbecec; color: #b04545; }

.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #c4ccc6; }
.dot.active { background: var(--ok); }
.dot.soon { background: var(--soon); }
.dot.expired { background: var(--bad); }
.dot.inactive { background: #d9dedb; }

.empty { text-align: center; padding: 30px 20px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16.5px; font-weight: 600; margin-bottom: 4px; }
.empty.small { padding: 14px 16px 18px; margin: 0; text-align: left; }
.empty .btn { margin-top: 16px; }

/* ---- Date bar ---- */
.datebar { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.datebar .icon-btn { color: var(--accent); background: var(--bg); }
.date-pick { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
.date-main { font-weight: 600; font-size: 16.5px; }
.date-sub { font-size: 12.5px; color: var(--muted); }
.date-overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }
.today-btn { flex: none; height: 44px; padding: 0 10px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 600; cursor: pointer; }

/* ---- Dashboard tiles ---- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
  color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.stat.wide { grid-column: span 2; }
a.stat { position: relative; padding-right: 30px; }
.stat-go { position: absolute; top: 11px; right: 11px; display: grid; color: var(--muted); opacity: .75; }
/* Morning and evening in two soft boxes side by side, a little lighter than other numbers. */
.att-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; font-weight: 500; font-size: 20px; text-align: center; }
.att-split > span { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; }
.att-name { font-weight: 300; }
a.stat.att-tile { padding-right: 14px; }
.stat.hero { background: var(--accent-soft); border-color: var(--accent-line); }
.stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat.hero .stat-label { color: var(--accent); }
.stat-value { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.stat.alert .stat-value { color: var(--bad); }
/* "All-time total" on top of the dashboard: the one solid tile, so it reads as the main number. */
.stat.total { background: var(--accent); border-color: var(--accent); color: #fff; }
.stat.total .stat-label, .stat.total .stat-sub, .stat.total .stat-go { color: rgba(255, 255, 255, .88); opacity: 1; }
.stat.total .stat-value { font-size: 26px; }

.grand-card { background: var(--accent-soft); border-color: var(--accent-line); }
.totals { padding: 10px 16px 14px; }
.totals .line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-variant-numeric: tabular-nums; color: var(--muted); }
.totals .line strong { font-weight: 600; color: var(--ink); }
.totals .grand { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--accent-line); font-size: 19px; font-weight: 600; color: var(--ink); }
.totals .grand strong { color: var(--accent); font-weight: 700; }
.big-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); padding-top: 4px; }
.big-value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 4px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.kv strong { font-weight: 600; }
.card-head + .kv { border-top: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 12px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  cursor: pointer;
}
.btn.block { width: 100%; }
.btn.primary { background: var(--accent-fill); color: #fff; }
.btn.dark { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost svg { color: var(--accent); }
.btn.wa { background: #eaf6ef; color: #23824f; border-color: #cde8d8; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f0d4d4; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:active:not(:disabled) { filter: brightness(.97); }
.btn-stack { display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 16px; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 10px 4px; cursor: pointer; }
.link-btn.small { padding: 0 4px; font-size: 14px; }
.actions { display: flex; gap: 8px; }
.actions .btn { flex: 1; padding: 0 10px; }
.actions .btn.primary { flex: 1.3; }

/* ---- Add chooser ---- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  min-height: 136px; padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  text-align: left; cursor: pointer; box-shadow: var(--shadow);
}
.tile:active { background: var(--bg); }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile-label { display: block; font-weight: 600; font-size: 16.5px; line-height: 1.25; }
.tile-help { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }

/* ---- Forms ---- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.label .opt { font-weight: 400; letter-spacing: 0; text-transform: none; }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--field); border-radius: 12px; background: #fff;
  font: inherit; font-size: 17px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.input[type="date"] { min-width: 0; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 125, 85, .12); }
textarea.input { min-height: 72px; resize: vertical; }
.amount-wrap { position: relative; }
.amount-wrap::before {
  content: "₹"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 500; color: var(--muted); pointer-events: none;
}
.amount-input { min-height: 62px; padding-left: 40px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-btn {
  min-height: 54px; border: 1px solid var(--field); border-radius: 12px; background: #fff;
  font-size: 17px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.mode-btn.cash[aria-pressed="true"] { background: var(--cash-bg); border-color: #9fd0b3; color: var(--cash); }
.mode-btn.upi[aria-pressed="true"] { background: var(--upi-bg); border-color: #c5bdee; color: var(--upi); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--field); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.chip-n { font-size: 12.5px; opacity: .7; }
/* Four chips sharing the width, so none hide off the edge. */
.chips.fit { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
.chips.fit .chip { justify-content: center; padding: 0 6px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #eceff0; }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.picker { display: flex; flex-direction: column; gap: 8px; }
.pick-list { max-height: 330px; overflow-y: auto; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 16px; min-height: 60px; }
.who-fixed { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; min-height: 56px; }

.form-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fbeeee; color: #a84444; font-weight: 500; }
.form-error:empty { display: none; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 560px; margin: 0 auto;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
}
.savebar .btn { min-height: 52px; font-size: 17px; }

/* ---- Person ---- */
.person-head { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.person-meta { color: var(--muted); }
.person-meta strong { color: var(--ink); font-weight: 600; }
.status { margin-top: 6px; padding: 11px 14px; border-radius: 12px; font-weight: 500; }
.status.active { background: #ecf7f0; color: #2a7350; }
.status.soon { background: #fdf4e3; color: #8d621c; }
.status.expired { background: #fbeeee; color: #a84444; }
.status.none { background: var(--bg); color: var(--muted); }
.status.inactive { background: #eef0ef; color: var(--muted); }
.wa-mini { color: #23824f; background: #eaf6ef; }

/* ---- Home button in the middle of the bottom bar ---- */
.tab-home { justify-content: flex-end; padding-bottom: 8px; }
.tab-home::before { display: none; }
.home-circle {
  width: 54px; height: 54px; margin-top: -26px; margin-bottom: 2px;
  display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: var(--muted);
  border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(30, 50, 40, .1);
}
.tab-home[aria-current="page"] .home-circle { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

/* ---- Attendance ---- */
.cal-btn { position: relative; overflow: hidden; }
.expired-card { border-color: #f0d6d6; }
.expired-card .card-head h2 { color: var(--bad); }
.expired-card .hint { padding: 0 16px 8px; font-size: 13px; }
.row.att.expired, .row.att.expired.present { background: #fdf5f5; }
.row.att.expired .row-name { color: #b04545; }
.card-sub { padding: 12px 16px 2px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.top-seg { margin-bottom: 2px; }
.att-head { display: flex; align-items: center; gap: 12px; }
.att-head .seg { flex: 1; }
.att-count { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.att-big { font-size: 26px; font-weight: 650; color: var(--accent); font-variant-numeric: tabular-nums; }
.att-of { font-size: 16px; color: var(--muted); font-weight: 500; }
.att-label { font-size: 12px; color: var(--muted); }
/* Present / Absent buttons on each child; nothing chosen until tapped. */
.att-btns { flex: none; display: flex; gap: 6px; }
.att-btn {
  min-height: 40px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--field); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.att-btn.present[aria-pressed="true"] { background: var(--cash-bg); border-color: #9fd0b3; color: var(--accent); }
.att-btn.absent[aria-pressed="true"] { background: #fbeeee; border-color: #efc9c9; color: #b04545; }
.att-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.att-tags .tag { margin-left: 0; }
.row.att.present { background: #f6fbf8; }

/* ---- A child's month of attendance ---- */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; color: var(--accent); }
.cal-title { font-weight: 600; color: var(--ink); text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px 12px 16px; }
.cal-head { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 10px; background: var(--bg); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.cal-cell.blank { background: transparent; }
.cal-cell.future { opacity: .45; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-cell.present { background: #dcefe3; color: var(--accent); }
.cal-day { font-size: 13.5px; font-weight: 600; }
.cal-mark { font-size: 9.5px; font-weight: 600; letter-spacing: .04em; }

/* ---- Notes, courts, settings lists ---- */
.row-note { font-size: 13px; color: #8a6d1e; }
.note-box { display: block; padding: 10px 12px; border-radius: 10px; background: #fbf7e8; border: 1px solid #efe5c2; color: #6f5a1c; text-decoration: none; }
.add-note { align-self: flex-start; padding: 2px 0; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.court-row { gap: 4px; min-height: 54px; padding: 6px 8px 6px 16px; }
.court-row .input { flex: 1; min-width: 0; min-height: 44px; }
.icon-btn.small { width: 38px; height: 38px; color: var(--muted); }
.danger-icon { color: var(--bad) !important; }
.small-btn { min-height: 42px; padding: 0 14px; }
.add-row { display: flex; gap: 8px; padding: 12px 16px; }
.add-row .input { flex: 1; min-width: 0; }
.add-row .btn { flex: none; }
.hint.pad { padding: 0 16px 6px; font-size: 13px; }
.link-btn.pad { display: block; padding: 8px 16px 14px; }
.grand-kv strong { color: var(--accent); font-weight: 650; }
.muted.small { font-size: 12.5px; font-weight: 400; }

/* ---- Sign in ---- */
.login { flex: 1; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink); text-align: center; }
.login-logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); }
.login .kicker { margin-top: 6px; }
.login h1 { margin: 0 0 14px; font-size: 24px; font-weight: 650; }
.login .field { width: 100%; text-align: left; }
.pin { text-align: center; letter-spacing: .45em; font-size: 26px; font-weight: 600; }
.login .form-error { width: 100%; }

/* ---- Toast ---- */
#toast {
  position: fixed; left: 50%; z-index: 50;
  bottom: calc(var(--tabs-h) + 88px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  padding: 11px 16px; border-radius: 12px;
  background: #fff; color: var(--ink); font-weight: 500;
  border: 1px solid var(--accent-line); box-shadow: 0 6px 20px rgba(30, 50, 40, .14);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 16px); transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Print / Save as PDF ---- */
@media print {
  body { background: #fff; }
  .tabs, .fab, .savebar, .no-print, .top .icon-btn { display: none !important; }
  .top { position: static; border: 0; }
  .page.with-tabs { padding-bottom: 0; }
  .card, .stat { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .grand-card { background: #fff; }
}

/* The PAYMENT (and Status) box inside the member and renewal forms. */
.pay-card .form { padding: 6px 16px 16px; }
.list-title { margin: 6px 4px 0; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pay-card .chips.fit .chip { padding: 0 2px; font-size: 13.5px; white-space: nowrap; }

/* Inactive / Make active on a person's page, and the link to the Inactive page under the lists. */
.state-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; margin-top: 4px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--field); background: #fff; color: var(--muted);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.state-btn.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.inactive-link {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  color: var(--muted); font-weight: 600; text-decoration: none;
}
.inactive-link > span:first-of-type { flex: 1; color: var(--ink); }

/* Second user (view only). */
.view-only { margin-left: 8px; padding: 1px 7px; border-radius: 6px; background: #eef0ef; color: var(--muted); letter-spacing: .04em; }
.att-btn:disabled { cursor: default; }
.att-btn:disabled:not([aria-pressed="true"]) { opacity: .45; }

/* The app's own Yes / Cancel box (instead of the browser's confirm). */
.ask-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(24, 36, 30, .38); }
.ask-card { width: 100%; max-width: 400px; padding: 20px 18px 16px; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.ask-msg { margin: 0 0 18px; font-size: 16.5px; line-height: 1.45; color: var(--ink); }
.ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ask-btns .btn { min-height: 48px; }

/* Dashboard: "Set your own PIN" while Vinoth still has the first PIN (2026-12-01) */
.pin-reminder { border-color: var(--accent); }
.pin-reminder .actions { margin-top: 12px; }

/* Demo front page (turf demo) */
.demo-points { width: 100%; margin: 0 0 4px; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; }
.demo-points li { position: relative; padding: 10px 12px 10px 34px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-size: 15px; }
.demo-points li::before { content: ""; position: absolute; left: 13px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: var(--accent-fill); }
.login .hint { margin: 0; }
.made-by { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
