/* SikaCollect app styles. Phone-first, no build step. Colours match sikacollect.com. */
:root {
  --p-900: #073b21; --p-700: #0d6b3a; --p-600: #12864a; --p-500: #17a05a; --p-100: #e3f6ea;
  --gold: #ffcf33; --gold-600: #e0ac00; --gold-ink: #6b4e00; --gold-100: #fff3cc;
  --paper: #f4f7f4; --card: #ffffff; --ink: #14201a; --soft: #5d6e64; --rule: #dfe7e1;
  --red: #c94545; --red-100: #fbe8e8;
  --radius: 14px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--paper); }
a { color: var(--p-700); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--display); font-size: 1.6rem; color: var(--p-900); }
h2 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--soft); }
.small { font-size: 0.85rem; }
.stack { display: grid; gap: 1rem; }
.stack-sm { display: grid; gap: 0.5rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.between { justify-content: space-between; }

/* Top bar */
.topbar { background: var(--p-900); color: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.topbar-in { max-width: 760px; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem; }
.g-badge { width: 38px; height: 38px; border-radius: 11px; background: var(--gold); color: var(--p-900); font-weight: 800; font-size: 0.85rem; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.g-badge img { width: 100%; height: 100%; object-fit: cover; }
.g-name { font-weight: 800; line-height: 1.2; min-width: 0; flex: 1; }
.g-name span { display: block; font-weight: 600; font-size: 0.75rem; color: #b9e2c9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-name b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { background: var(--p-700); }
.nav-in { max-width: 760px; margin: 0 auto; padding: 0 0.5rem; display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav a { color: #d6f0df; text-decoration: none; font-weight: 700; font-size: 0.88rem; padding: 0.7rem 0.75rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a.on { color: #fff; border-bottom-color: var(--gold); }
.nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

main { max-width: 760px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.85rem 0.95rem; }
.stat b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--p-900); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.8rem; font-weight: 700; color: var(--soft); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.list li:first-child { border-top: none; padding-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; overflow-wrap: anywhere; }
.officials li { flex-wrap: wrap; }
.officials .actions { display: flex; align-items: center; gap: 0.5rem; }
@media (max-width: 520px) { .officials .actions { width: 100%; padding-left: calc(34px + 0.75rem); } }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--p-100); color: var(--p-700); font-weight: 800; font-size: 0.75rem; display: grid; place-items: center; flex-shrink: 0; }

.pill { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 0.15rem 0.55rem; border-radius: 20px; background: var(--p-100); color: var(--p-700); white-space: nowrap; }
.pill.gold { background: var(--gold-100); color: var(--gold-ink); }
.pill.grey { background: #eef1ef; color: var(--soft); }

/* Forms */
label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.3rem; }
.hint { font-size: 0.8rem; color: var(--soft); margin-top: 0.25rem; }
input[type=text], input[type=search], textarea, input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--rule); border-radius: 11px; padding: 0.7rem 0.8rem; min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--p-500); box-shadow: 0 0 0 3px var(--p-100); }
input[type=file] { font: inherit; font-size: 0.9rem; max-width: 100%; }
.field.err input, .field.err select { border-color: var(--red); }
.err-msg { color: var(--red); font-size: 0.82rem; font-weight: 600; margin-top: 0.25rem; }
.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 600; font-size: 0.9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--p-600); }
.choices { display: grid; gap: 0.5rem; }
.choice { display: flex; gap: 0.7rem; align-items: flex-start; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0.75rem; cursor: pointer; font-weight: 500; margin: 0; }
.choice input { margin-top: 0.2rem; accent-color: var(--p-600); width: 18px; height: 18px; flex-shrink: 0; }
.choice b { display: block; }
.choice:has(input:checked) { border-color: var(--p-500); background: var(--p-100); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font: inherit; font-weight: 800; font-size: 0.95rem; border: none; border-radius: 12px; padding: 0.75rem 1.2rem; min-height: 46px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--p-700); color: #fff; }
.btn-primary:hover { background: var(--p-900); }
.btn-gold { background: var(--gold); color: var(--p-900); }
.btn-wa { background: #1faa59; color: #fff; }
.btn-wa:hover { background: #18914b; }
.check-line { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .92rem; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--gold); }
.btn-ghost { background: #fff; color: var(--p-700); border: 1.5px solid #cfe0d5; box-shadow: 0 1px 2px rgba(7,59,33,.08), 0 6px 14px -10px rgba(7,59,33,.45); }
.btn-ghost:hover { border-color: var(--p-500); background: #f6fbf8; }
.btn-danger { background: #fff; color: var(--red); border: 1.5px solid #f0b4ae; box-shadow: 0 1px 2px rgba(7,59,33,.08), 0 6px 14px -10px rgba(7,59,33,.45); }
.btn-danger:hover { border-color: var(--red); background: #fff6f5; }
.btn-sm { min-height: 36px; padding: 0.4rem 0.75rem; font-size: 0.82rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.linkbtn { background: none; border: none; font: inherit; color: #d6f0df; font-weight: 700; cursor: pointer; padding: 0.4rem; }

.flash { border-radius: 12px; padding: 0.75rem 0.9rem; font-weight: 600; font-size: 0.9rem; }
.flash.ok { background: var(--p-100); color: var(--p-900); }
.flash.bad { background: var(--red-100); color: var(--red); }

/* Sign-in pages */
.auth { min-height: 100vh; display: grid; place-items: start center; padding: 2.5rem 1rem; background: linear-gradient(160deg, var(--p-900), var(--p-700)); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 1.6rem 1.3rem; box-shadow: 0 24px 48px -20px rgba(0,0,0,0.45); }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; color: #fff; text-decoration: none; margin-bottom: 1.3rem; font-size: 1.1rem; }
.brand .g-badge { width: 34px; height: 34px; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: 0.9rem; }

table.log { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.log td { padding: 0.65rem 0.4rem; border-top: 1px solid var(--rule); vertical-align: top; }
.log tr:first-child td { border-top: none; }
.log .when { white-space: nowrap; color: var(--soft); font-variant-numeric: tabular-nums; width: 1%; }
.pager { display: flex; justify-content: space-between; margin-top: 1rem; }
.coming { border: 1.5px dashed var(--rule); border-radius: var(--radius); padding: 1rem; }
.coming li { padding: 0.25rem 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Phase 2: students, classes, import */
.nowrap { white-space: nowrap; }
.pill.red { background: var(--red-100); color: var(--red); }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filters .field { min-width: 0; }
.member-list li { padding: 0.65rem 0; gap: 0.5rem; }
.member-list li:first-child { padding-top: 0.65rem; }
.member-link { color: inherit; text-decoration: none; display: block; }
.member-link:hover b { color: var(--p-700); }
.member-link .small { display: block; margin-top: 0.1rem; }
.chev { color: var(--soft); font-size: 1.3rem; }
.sg-list li { flex-wrap: wrap; }
.sg-edit { order: 3; width: 100%; }
.sg-edit summary { list-style: none; display: inline-flex; }
.sg-edit summary::-webkit-details-marker { display: none; }
.sg-edit:not([open]) { width: auto; order: 0; }
table.sheet { border-collapse: collapse; font-size: 0.85rem; width: 100%; }
.sheet th, .sheet td { border-bottom: 1px solid var(--rule); padding: 0.45rem 0.5rem; text-align: left; vertical-align: top; }
.sheet th { background: var(--paper); font-weight: 800; white-space: nowrap; }
.preview tr.skip td { color: var(--soft); }
.preview .note { font-size: 0.75rem; color: var(--soft); margin-top: 0.2rem; max-width: 16rem; }
.stat a { color: inherit; text-decoration: none; }

/* Phase 3: contributions and payments */
a.stat { color: inherit; text-decoration: none; }
a.stat:hover b { color: var(--p-600); }
.stat b { font-size: 1.35rem; overflow-wrap: anywhere; }
.big-num { font-family: var(--display); font-size: 1.5rem; color: var(--p-900); }
.bar { height: 10px; background: #e6ece8; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--p-600), var(--p-500)); border-radius: 6px; }
.contrib-card { color: inherit; text-decoration: none; display: grid; gap: 0.55rem; }
.contrib-card:hover { border-color: var(--p-500); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.85rem; color: var(--soft); }
.mini-stats b { color: var(--ink); }
.contrib-card .pill, .row .pill { text-decoration: none; }
.pay-list li { padding: 0.7rem 0; }
.pay-list li:first-child { padding-top: 0.7rem; }
.pay-list .grow > span { display: block; margin-top: 0.15rem; }
.ledger li { align-items: flex-start; padding: 0.7rem 0; }
.ledger li:first-child { padding-top: 0.7rem; }
.ledger .grow > span { display: block; margin-top: 0.1rem; }
.ledger-acts { display: flex; gap: 0.8rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.suspended-box { border: 1.5px solid var(--gold); }
.suspended-box .list li { gap: .6rem; }
.suspended-box .grow > span { display: block; }
.amt { text-align: right; display: grid; gap: 0.2rem; white-space: nowrap; }
.neg { color: var(--red); }
.struck { text-decoration: line-through; color: var(--soft); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem 1rem; }
.seg { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; border: 1.5px solid var(--rule); border-radius: 11px; padding: 0.6rem 0.9rem; font-weight: 700; font-size: 0.9rem; cursor: pointer; background: #fff; }
.seg input:checked + span { border-color: var(--p-500); background: var(--p-100); color: var(--p-900); }
.link-forms { margin: 0.2rem 0 0.7rem; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Phase 4: online payments */
.test-banner { background: var(--gold); color: var(--p-900); text-align: center; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em; padding: 0.35rem 1rem; }
.public main { max-width: 520px; }
.pay-line { border-top: 1px solid var(--rule); padding-top: 0.8rem; display: grid; gap: 0.35rem; }
.pay-line .field { max-width: 12rem; }
.breakdown { display: grid; gap: 0.55rem; }
.breakdown .big { font-size: 1.15rem; }
.breakdown .big b { font-family: var(--display); font-size: 1.4rem; color: var(--p-900); }
.settle-list li { gap: 0.6rem; padding: 0.6rem 0; }
.settle-list li:first-child { padding-top: 0.6rem; }
.settle-list .check { font-weight: 500; }
.settle-list input[type=text] { min-height: 40px; padding: 0.45rem 0.6rem; }
.sticky-total { position: sticky; bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 10px 30px -12px rgba(7,59,33,0.35); }
.spinner { width: 42px; height: 42px; margin: 0 auto 0.4rem; border: 4px solid var(--p-100); border-top-color: var(--p-600); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.tick-big { width: 56px; height: 56px; margin: 0 auto 0.3rem; border-radius: 50%; background: var(--p-100); color: var(--p-700); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; }

/* ===== App home: "What kind of group do you run?" (group type tiles) ===== */
.home-body { background: var(--paper); color-scheme: light; }
.home-shell { min-height: 100vh; min-height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; background: var(--paper); }
.home-top { position: relative; overflow: hidden; color: #fff; background: linear-gradient(150deg, var(--p-900) 0%, var(--p-700) 55%, var(--p-600) 100%); padding: calc(1.6rem + env(safe-area-inset-top, 0px)) 1.25rem 1.9rem; border-radius: 0 0 30px 30px; }
.home-top::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,207,51,0.18), transparent 70%); top: -90px; right: -60px; }
.home-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, #ffcf33 0 14px, #17a05a 14px 28px, #fff3cc 28px 34px, #0d6b3a 34px 48px); }
.home-top-row { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.home-brand { display: flex; align-items: center; gap: 0.55rem; }
.home-badge { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--gold), #ffe27a); color: var(--p-900); display: grid; place-items: center; font-weight: 800; font-size: 0.74rem; }
.home-eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; color: #bfe8cf; }
.home-iconbtn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,0.14); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.home-iconbtn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.home-top h1 { font-family: var(--display); color: #fff; font-size: 1.5rem; line-height: 1.2; margin: 0.9rem 0 0; position: relative; z-index: 1; }
.home-top p { font-size: 0.88rem; color: #cdeed9; margin: 0.45rem 0 0; line-height: 1.5; position: relative; z-index: 1; }
.home-main { flex: 1; padding: 1.25rem 1.1rem 1.5rem; display: grid; gap: 1.1rem; align-content: start; }

.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.home-tile { position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 20px; padding: 1rem 0.45rem 0.9rem; min-height: 122px; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; text-align: center; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(15,40,25,0.06); transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.home-tile:hover { border-color: #bfe2cc; box-shadow: 0 8px 20px -6px rgba(9,50,28,0.18); }
.home-tile:active { transform: scale(0.95); }
.home-tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.home-tile b { font-size: 0.78rem; line-height: 1.25; overflow-wrap: anywhere; }
.home-tile.pilot { border-color: var(--p-500); box-shadow: 0 0 0 2px rgba(23,160,90,0.18); }
.home-flag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--p-900); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; padding: 0.12rem 0.5rem; border-radius: 20px; }
.home-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--p-100); color: var(--p-700); flex-shrink: 0; }
.home-tile:nth-child(even) .home-ic { background: var(--gold-100); color: var(--gold-ink); }

.home-row { background: #fff; border: 1px solid var(--rule); border-radius: 18px; padding: 0.85rem 1rem; box-shadow: 0 1px 2px rgba(15,40,25,0.06); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 0.75rem; }
details.home-row { display: block; }
.home-row summary { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; list-style: none; }
.home-row summary::-webkit-details-marker { display: none; }
.home-row .home-ic { width: 38px; height: 38px; border-radius: 12px; }
.home-row b { display: block; font-size: 0.9rem; }
.home-row span span { display: block; font-size: 0.78rem; color: var(--soft); }
.home-row p { font-size: 0.85rem; color: var(--soft); margin-top: 0.75rem; line-height: 1.55; }
.home-row p b { display: inline; font-size: inherit; color: var(--ink); overflow-wrap: anywhere; }
.home-chev { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--p-100); color: var(--p-600); display: grid; place-items: center; flex-shrink: 0; transition: transform 0.15s; }
details[open] .home-chev { transform: rotate(90deg); }

.home-card { background: #fff; border: 1px solid var(--rule); border-radius: 20px; padding: 1.1rem; box-shadow: 0 8px 20px -6px rgba(9,50,28,0.18); display: grid; gap: 1rem; }
.home-chosen { display: flex; align-items: center; gap: 0.7rem; background: var(--p-100); color: var(--p-900); border-radius: 14px; padding: 0.65rem 0.75rem; font-size: 0.85rem; }
.home-chosen .home-ic { width: 36px; height: 36px; border-radius: 11px; background: #fff; }
.home-chosen a { margin-left: auto; color: var(--p-700); font-weight: 800; font-size: 0.8rem; text-decoration: none; padding: 0.3rem; }
.home-words { border-top: 1px dashed var(--rule); padding-top: 0.9rem; }
.home-words h3 { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); margin: 0 0 0.6rem; }
.home-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.home-chip { font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.65rem; border-radius: 20px; background: var(--gold-100); color: var(--gold-ink); }
.home-chip.g { background: var(--p-100); color: var(--p-700); }
.home-btn { width: 100%; border: 0; border-radius: 15px; padding: 0.95rem; min-height: 50px; font: inherit; font-weight: 800; font-size: 0.95rem; cursor: pointer; background: linear-gradient(135deg, #ffd95e, #f2b705); color: var(--p-900); box-shadow: 0 10px 20px -8px rgba(226,168,0,0.55), inset 0 1px 0 rgba(255,255,255,0.55); display: flex; align-items: center; justify-content: center; gap: 0.45rem; }
.home-btn:active { transform: scale(0.98); }
.home-btn:focus-visible { outline: 3px solid var(--p-500); outline-offset: 2px; }
.home-note { font-size: 0.8rem; color: var(--soft); text-align: center; }

.home-tabs { position: sticky; bottom: 0; margin: 0 0.75rem calc(0.8rem + env(safe-area-inset-bottom, 0px)); display: flex; background: #fff; border-radius: 26px; padding: 0.4rem; box-shadow: 0 20px 44px -14px rgba(7,59,33,0.35), 0 0 0 1px var(--rule) inset; }
.home-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-size: 0.66rem; font-weight: 700; color: var(--soft); padding: 0.5rem 0.2rem 0.7rem; border-radius: 18px; text-decoration: none; position: relative; }
.home-tab.on { background: var(--p-100); color: var(--p-900); }
.home-tab.on::after { content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--gold-600); }
.home-tab.locked { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 350px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
.start-chosen { display: flex; align-items: center; gap: 0.7rem; background: var(--p-100); color: var(--p-900); border-radius: 14px; padding: 0.6rem 0.75rem; }
.start-chosen .home-ic { width: 38px; height: 38px; border-radius: 12px; background: #fff; }
.start-chosen b { display: block; font-size: 0.92rem; line-height: 1.25; }
.start-chosen .small { display: block; }
.start-chosen a { margin-left: auto; font-weight: 800; font-size: 0.82rem; text-decoration: none; padding: 0.3rem; }

/* ===== Signed-in app: prototype look (green header, bottom tabs, ring, quick buttons, profile) ===== */
.app-body { background: var(--paper); color-scheme: light; }
.app-body main { padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px)); }
.apphead { position: relative; overflow: hidden; color: #fff; background: linear-gradient(150deg, var(--p-900) 0%, var(--p-700) 55%, var(--p-600) 100%); border-radius: 0 0 28px 28px; }
.apphead::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,207,51,0.17), transparent 70%); top: -100px; right: -60px; }
.apphead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(90deg, #ffcf33 0 14px, #17a05a 14px 28px, #fff3cc 28px 34px, #0d6b3a 34px 48px); }
.apphead-in { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 1rem 1.2rem; }
.apphead.has-hero .apphead-in { padding-bottom: 3.6rem; }
.apphead-row { display: flex; align-items: center; gap: 0.7rem; }
.apphead .g-badge { text-decoration: none; background: linear-gradient(135deg, var(--gold), #ffe27a); }
.head-btn { width: 36px; height: 36px; border-radius: 11px; border: 0; background: rgba(255,255,255,0.14); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.head-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.greeting { font-family: var(--display); color: #fff; font-size: 1.45rem; margin-top: 1rem; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0.5rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(244,247,244,0), var(--paper) 40%); pointer-events: none; }
.tabbar-in { pointer-events: auto; max-width: 560px; margin: 0 auto; display: flex; background: #fff; border-radius: 26px; padding: 0.4rem; box-shadow: 0 20px 44px -14px rgba(7,59,33,0.35), 0 0 0 1px var(--rule) inset; }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.18rem; font-size: 0.68rem; font-weight: 700; color: var(--soft); padding: 0.5rem 0.15rem 0.72rem; border-radius: 18px; text-decoration: none; position: relative; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { background: var(--p-100); color: var(--p-900); }
.tab.on::after { content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--gold-600); }
.tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

/* Home: ring card + quick buttons */
.ring-card { position: relative; z-index: 2; margin-top: -3.6rem; display: flex; align-items: center; gap: 1rem; padding: 1.1rem; border-radius: 24px; color: #fff; overflow: hidden; background: linear-gradient(140deg, var(--p-700), var(--p-900)); box-shadow: 0 18px 32px -14px rgba(7,59,33,0.6); }
.ring-card::before { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -40px; top: -60px; background: radial-gradient(circle, rgba(255,207,51,0.22), transparent 70%); }
.ring { flex-shrink: 0; position: relative; }
.ring-text { position: relative; min-width: 0; }
.ring-label { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: #bfe8cf; font-weight: 700; }
.ring-amt { font-family: var(--display); font-size: 1.55rem; line-height: 1.15; margin-top: 0.1rem; font-variant-numeric: tabular-nums; }
.ring-amt small { font-family: var(--font); font-size: 0.75rem; font-weight: 600; color: #bfe8cf; }
.ring-sub { font-size: 0.8rem; color: #d5f0df; margin-top: 0.3rem; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; text-decoration: none; font-size: 0.72rem; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.2; }
.q-ic { width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center; background: #fff; color: var(--p-700); border: 1px solid var(--rule); box-shadow: 0 8px 20px -6px rgba(9,50,28,0.18); transition: transform 0.12s; }
.quick-btn:nth-child(even) .q-ic { background: var(--gold-100); color: var(--gold-ink); border-color: #f6e3a0; }
.quick-btn:active .q-ic { transform: scale(0.92); }
.quick-btn:focus-visible .q-ic { outline: 3px solid var(--gold); outline-offset: 2px; }
.switcher { display: flex; align-items: center; gap: 0.6rem; }
.switcher label { margin: 0; font-size: 0.8rem; color: var(--soft); }
.switcher select { min-height: 40px; padding: 0.4rem 0.7rem; }

/* Section titles and list items */
.sec { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font); font-size: 0.95rem; font-weight: 800; margin: 0.4rem 0 -0.4rem; }
.sec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(255,207,51,0.28); flex-shrink: 0; }
.sec a { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--p-600); text-decoration: none; }
.item { width: 100%; font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 0.75rem; background: #fff; border: 1px solid var(--rule); border-radius: 18px; padding: 0.8rem 0.9rem; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(15,40,25,0.06); transition: transform 0.12s, border-color 0.12s; }
a.item:hover, button.item:hover { border-color: #bfe2cc; }
a.item:active, button.item:active { transform: scale(0.98); }
.item.static { cursor: default; }
.item:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.item .grow { flex: 1; min-width: 0; }
.item .grow > b { display: block; font-size: 0.93rem; overflow-wrap: anywhere; }
.item .grow > span { display: block; font-size: 0.78rem; color: var(--soft); margin-top: 0.1rem; }
.item-ic { width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; background: var(--p-100); color: var(--p-700); }
.item-ic.gold { background: var(--gold-100); color: var(--gold-ink); }
.item-ic.red { background: var(--red-100); color: var(--red); }
.chev-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--p-100); color: var(--p-600); display: grid; place-items: center; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; padding: 0.28rem 0.6rem; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.paid { background: var(--p-100); color: var(--p-700); }
.badge.owing { background: var(--red-100); color: var(--red); }
.badge.extra { background: var(--gold-100); color: var(--gold-ink); }
.list-card { padding: 0.35rem 1rem; }
.footnote { text-align: center; }
.empty { padding: 1rem 0; text-align: center; }
.nowrap { white-space: nowrap; }
.back { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 700; text-decoration: none; color: var(--p-700); }

/* Students list */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--p-600), var(--p-900)); color: var(--gold); font-weight: 800; font-size: 0.82rem; }
.avatar.lg { width: 54px; height: 54px; font-size: 1.05rem; }
.member-list li { padding: 0; }
.member-list li:first-child { padding-top: 0; }
.member-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; color: inherit; text-decoration: none; width: 100%; }
.member-link .grow { flex: 1; min-width: 0; }
.member-link .grow b { display: block; }

/* Student profile */
.profile { background: #fff; border-radius: 22px; padding: 1.15rem; box-shadow: 0 8px 20px -6px rgba(9,50,28,0.18); }
.profile-top { display: flex; align-items: center; gap: 0.8rem; }
.profile-top .grow { flex: 1; min-width: 0; }
.profile-name { font-size: 1.3rem; color: var(--ink); overflow-wrap: anywhere; }
.profile-meta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--soft); margin-top: 0.8rem; }
.profile-meta b { color: var(--ink); }
.balance-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin: 1rem 0 0.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.88rem; font-weight: 600; color: var(--soft); }
.balance-row b { font-size: 1.05rem; }
.balance-row .owing { color: var(--red); }
.balance-row .paidtxt { color: var(--p-700); }
.bar.thin { display: block; height: 6px; margin-top: 0.45rem; }
.history li { align-items: flex-start; }
.history .grow b { font-size: 0.92rem; }
.history .small { display: block; }
.history .ref { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.75rem; }
.amt { color: var(--p-700); white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt.neg { color: var(--red); }

/* More page */
.link-box { background: var(--paper); border: 1.5px solid var(--rule); border-radius: 11px; padding: 0.7rem 0.85rem; font-size: 0.85rem; word-break: break-all; }
@media (max-width: 360px) { .quick-btn { font-size: 0.66rem; } .q-ic { width: 50px; height: 50px; } .tab { font-size: 0.62rem; } }

/* ===== Reports ===== */
.report-head { display: grid; gap: 0.4rem; }
.report-actions { margin-top: 0.3rem; }
.report-group { font-weight: 800; color: var(--p-700); }
.table-card { padding: 0.2rem 0; overflow-x: auto; }
table.report { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.report th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--soft); font-weight: 800; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.report td { padding: 0.6rem 0.8rem; border-top: 1px solid var(--rule); vertical-align: middle; }
.report tbody tr:first-child td { border-top: 0; }
.report tfoot td { font-weight: 800; border-top: 2px solid var(--rule); }
.report .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report .rate { min-width: 7rem; }
.report .rate .bar { display: inline-block; width: 4rem; vertical-align: middle; margin: 0 0.4rem 0 0; }
.report .badge { font-size: 0.68rem; }
.owing-txt { color: var(--red); }
.extra-txt, .owe-sum.extra-sum { color: var(--gold-ink); font-weight: 700; }
.extra-card { display: flex; align-items: center; gap: 0.8rem; background: var(--gold-100); border-color: transparent; }
.extra-card .grow { display: grid; gap: 0.15rem; }
.extra-card b { color: var(--gold-ink); }
.sec-total { margin-left: auto; font-weight: 700; }
a.plain { color: inherit; text-decoration: none; }
.report-split { display: grid; gap: 0.8rem; }
@media (min-width: 640px) { .report-split { grid-template-columns: 2fr 1fr; align-items: start; } }
.print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  body, .app-body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .apphead, .tabbar, .no-print, .flash { display: none !important; }
  .print-only { display: block; }
  .app-body main { padding: 0; max-width: none; }
  .card, .profile, .item { box-shadow: none !important; break-inside: avoid; }
  .table-card { overflow: visible; }
  .report tr { break-inside: avoid; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  a { color: inherit; text-decoration: none; }
}

/* Payment list (WhatsApp text) */
.wa-msg { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font); font-size: 0.88rem; line-height: 1.5; background: #e7fbe4; border: 1px solid #c9eec3; border-radius: 4px 16px 16px 16px; padding: 0.9rem 1rem; color: var(--ink); max-height: 26rem; overflow: auto; }

/* SMS outbox */
.notice { background: var(--gold-100); border: 1px solid #f6e3a0; color: var(--gold-ink); border-radius: 14px; padding: 0.8rem 1rem; font-size: 0.88rem; }
.sms { align-items: flex-start; }
.sms .sms-body { display: block; margin-top: 0.4rem; color: var(--ink) !important; background: var(--paper); border-radius: 10px; padding: 0.55rem 0.7rem; font-size: 0.84rem; }
.badge.grey { background: #eef1ef; color: var(--soft); }
.report td:first-child { white-space: nowrap; }

/* Narrow phones (320px): never let one long item widen the whole page */
.app-body main.stack { grid-template-columns: minmax(0, 1fr); }
.app-body main > * , .card > *, form > * { min-width: 0; }
select, input, textarea { max-width: 100%; }
.check { flex-wrap: wrap; }
.sms .sms-body, .link-box, .wa-msg { overflow-wrap: anywhere; }

/* ===== SikaCollect HQ (owner's admin panel) ===== */
.hq { background: var(--paper); color-scheme: light; }
.hq-head { position: relative; color: #fff; background: linear-gradient(150deg, #05261a, #073b21 45%, #0d6b3a); }
.hq-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(90deg, #ffcf33 0 14px, #17a05a 14px 28px, #fff3cc 28px 34px, #0d6b3a 34px 48px); }
.hq-in { max-width: 1100px; margin: 0 auto; padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 1.1rem 0; }
.hq-row { display: flex; align-items: center; gap: 0.7rem; }
.hq-row .g-badge { text-decoration: none; background: linear-gradient(135deg, var(--gold), #ffe27a); }
.hq-back { margin-left: auto; color: #cdebd8; font-size: 0.82rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hq-nav { display: flex; gap: 0.15rem; overflow-x: auto; margin-top: 0.8rem; scrollbar-width: none; }
.hq-nav::-webkit-scrollbar { display: none; }
.hq-nav a { color: #cdebd8; text-decoration: none; font-weight: 700; font-size: 0.88rem; padding: 0.65rem 0.8rem 1rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.hq-nav a.on { color: #fff; border-bottom-color: var(--gold); }
.hq-n { background: var(--red); color: #fff; border-radius: 10px; font-size: 0.7rem; padding: 0.05rem 0.4rem; margin-left: 0.25rem; }
.hq-main { max-width: 1100px; margin: 0 auto; padding: 1.3rem 1.1rem 3rem; display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.hq-main > * { min-width: 0; }
.hq-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.hq-stats .stat b { font-size: clamp(1.1rem, 3.8vw, 1.55rem); overflow-wrap: anywhere; }
.hq-stats .stat em { display: block; font-style: normal; font-size: 0.75rem; color: var(--p-600); font-weight: 700; margin-top: 0.2rem; }
.stat.hq-gold { background: linear-gradient(140deg, var(--p-700), var(--p-900)); border: 0; }
.stat.hq-gold b { color: var(--gold); } .stat.hq-gold span { color: #bfe8cf; } .stat.hq-gold em { color: #d5f0df; }
.hq-grid2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.1rem; align-items: start; }
.hq-grid2 > * { display: grid; gap: 0.9rem; min-width: 0; }
.hq-table tr.click { cursor: pointer; } .hq-table tr.click:hover td { background: #f7faf7; }
.gname a { color: inherit; text-decoration: none; } .gname b { display: block; } .gname span { font-size: 0.76rem; color: var(--soft); }
.badge.warn { background: var(--gold-100); color: var(--gold-ink); }
.hq-alert { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.75rem 0; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.hq-alert:first-child { border-top: 0; padding-top: 0; }
.hq-alert:last-child { padding-bottom: 0; }
.hq-alert b { display: block; font-size: 0.9rem; } .hq-alert span span { display: block; font-size: 0.8rem; color: var(--soft); }
.hq-dot { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; }
.hq-dot.bad { background: var(--red-100); color: var(--red); } .hq-dot.warn { background: var(--gold-100); color: var(--gold-ink); } .hq-dot.ok { background: var(--p-100); color: var(--p-700); }
.hq-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem 1rem; margin: 0; font-size: 0.88rem; }
.hq-kv dt { color: var(--soft); font-weight: 600; } .hq-kv dd { margin: 0; font-weight: 700; }
.hq-bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 170px; }
.hq-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.3rem; font-size: 0.7rem; font-weight: 700; color: var(--soft); }
.hq-bar i { display: block; width: 100%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--gold), var(--gold-600)); }
.hq-bar b { color: var(--p-700); font-size: 0.66rem; white-space: nowrap; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) { .hq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hq-grid2 { grid-template-columns: minmax(0, 1fr); } .hide-sm { display: none; } }
.hq-main .sec { margin: 0.3rem 0 -0.4rem; }
.hq-grid2 > * > div { display: grid; gap: 0.8rem; }
.hq-grid2 .sec { margin: 0; }
@media (min-width: 761px) { .hq-alerts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.6rem; } .hq-alerts .hq-alert:nth-child(2) { border-top: 0; padding-top: 0; } }
.hq-grid2 .stack, .hq-grid2 > * > div { grid-template-columns: minmax(0, 1fr); }
.hq-main .list li { flex-wrap: wrap; }

/* Due-date reminder on Home (officials share it on WhatsApp) */
.reminder-card { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); background: #fffaf0; border: 1.5px solid #f6e3a0; border-radius: 18px; padding: 0.8rem 0.9rem; }
.reminder-card .grow { flex: 1; min-width: 0; }
.reminder-card .grow > b { display: block; font-size: 0.93rem; }
.reminder-card .grow > span { display: block; font-size: 0.78rem; color: var(--soft); margin-top: 0.1rem; }
.reminder-card .rc-btn { display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0; font-size: 0.8rem; font-weight: 800; background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 0.4rem 0.75rem; }
.reminder-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Continue with Google */
.btn-google { background: #fff; color: var(--ink); border: 1.5px solid var(--rule); font-weight: 800; }
.btn-google:hover { border-color: #bfe2cc; background: #f6fbf8; }
.or-line { display: flex; align-items: center; gap: .7rem; color: var(--soft); font-size: .8rem; margin: .2rem 0; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* Amount per Form on the dues form */
.form-amounts { display: grid; gap: .5rem; }
.form-amount { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: .5rem .7rem; }
.form-amount input[type=text] { width: 7.5rem; text-align: right; }

/* Dues page: Manage at the top, totals by Form */
.manage-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .6rem; align-items: stretch; }
.manage-bar form { display: contents; }
.manage-bar .btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; width: 100%; }
.contrib-main { display: flex; align-items: center; justify-content: center; gap: .45rem; }
.form-table { padding: .2rem 1rem; }
.form-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 5.5rem; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.form-row:last-child { border-bottom: 0; }
.form-row .fr-name b { display: block; }
.form-row .fr-name span { display: block; }
.fr-nums { display: flex; flex-wrap: wrap; gap: .25rem .9rem; color: var(--soft); }
.fr-nums b { color: var(--ink); }
.fr-rate { display: grid; gap: .25rem; text-align: right; }
.fr-rate .bar { margin: 0; height: 6px; }
@media (max-width: 560px) {
  .form-row { grid-template-columns: minmax(0, 1fr) 4.5rem; }
  .form-row .fr-nums { grid-column: 1 / -1; grid-row: 2; }
}

/* Home: one ring per Form */
.ring-card.has-forms { flex-direction: column; align-items: stretch; gap: .9rem; }
.ring-card .ring-amt small { font-size: .85rem; }
.form-rings { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.form-ring { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: #fff; text-decoration: none; border-radius: 16px; padding: .35rem 0 .45rem; }
.form-ring:hover { background: rgba(255,255,255,0.06); }
.form-ring:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.form-ring span { font-size: .8rem; font-weight: 800; color: #d5f0df; }

/* Header: "Sign out" with a Stay / Sign out pop-up */
.signout { position: relative; margin-left: auto; }
.head-btn-label { width: auto; padding: 0 .75rem; gap: .4rem; display: inline-flex; align-items: center; font: inherit; font-size: .82rem; font-weight: 800; }
.head-search { min-width: 11rem; justify-content: flex-start; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.28); color: #fff; text-decoration: none; }
.head-search span { font-weight: 700; opacity: .92; }
@media (max-width: 480px) { .head-search { min-width: 0; } }
.signout-pop { position: fixed; z-index: 200; width: 15.5rem; background: #fff; color: var(--ink); border-radius: 18px; padding: .9rem; box-shadow: 0 18px 40px rgba(4,30,17,.28); }
.signout-pop::before { content: ""; position: absolute; top: -6px; right: 22px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.signout-pop p { margin: 0 0 .7rem; font-weight: 700; font-size: .92rem; }
.signout-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.signout-actions form { margin: 0; }
.signout-actions .btn { width: 100%; justify-content: center; }
.signout-actions .btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.sg-form { padding: .35rem .5rem; font-size: .82rem; max-width: 8.5rem; }

/* Students: tabs per Form, with Open / Close */
.form-tabs { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .15rem; scrollbar-width: none; }
.form-tabs::-webkit-scrollbar { display: none; }
.form-tab { flex: 1 0 auto; min-width: 5.2rem; display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .55rem .8rem; border-radius: 16px; background: #fff; border: 1.5px solid var(--rule); text-decoration: none; color: var(--ink); }
.form-tab b { font-size: .9rem; }
.form-tab span { font-size: .75rem; color: var(--soft); font-weight: 700; }
.form-tab.on { background: var(--p-700); border-color: var(--p-700); color: #fff; }
.form-tab.on span { color: #cdeedb; }
.form-tab.closed:not(.on) { background: #f1f3f2; color: var(--soft); }
.form-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.form-head { display: flex; align-items: center; gap: .8rem; background: var(--p-100); border-radius: 18px; padding: .8rem 1rem; }
.form-head .grow { flex: 1; min-width: 0; }
.form-head b { display: block; font-size: 1.02rem; }
.form-head .small { color: var(--p-900); }
.form-head.closed { background: #eef1ef; }
.form-head form { margin: 0; }
.linkish { background: none; border: 0; padding: .2rem 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--p-700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: center; }
.linkish:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* New school year */
.ny-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .65rem; font-size: .9rem; }
.ny-steps b { color: var(--p-900); }
.center-note { text-align: center; }
.check > span { flex: 1; min-width: 0; }
.form-seg label span { min-width: 5.2rem; text-align: center; }
.cap-note { margin: 0; }
.cap-reached { border: 1.5px solid #f6e3a0; background: #fffaf0; }

/* Record Pay: find a student */
.record-search { display: flex; gap: .5rem; }
.record-search input { flex: 1; min-width: 0; font-size: 1.05rem; padding: .85rem 1rem; border-radius: 14px; }
.member-link .btn { flex-shrink: 0; }

/* Pay Link pop-up on Home */
.sheet-backdrop { position: fixed; inset: 0; z-index: 210; background: rgba(4,30,17,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.pop-sheet { background: #fff; width: 100%; max-width: 30rem; border-radius: 24px 24px 0 0; padding: .6rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(4,30,17,.25); display: grid; gap: .7rem; animation: sheet-up .18s ease-out; }
.pop-sheet h2 { margin: 0; font-size: 1.15rem; }
.pop-sheet { position: relative; }
.sheet-x { position: absolute; top: .7rem; right: .7rem; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.12); color: inherit; }
.sheet-x:hover { background: rgba(255,255,255,.22); }
.sheet-x:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pop-sheet p { margin: 0; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--rule); justify-self: center; }
.sheet-actions { display: grid; gap: .5rem; }
.sheet-actions .btn { width: 100%; justify-content: center; }
body.sheet-open { overflow: hidden; }
@keyframes sheet-up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .pop-sheet { border-radius: 24px; } }

/* Who owes: by Form */
.owe-jump { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; }
.owe-jump a { flex: 1 0 auto; min-width: 6.5rem; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: .55rem .8rem; text-decoration: none; color: var(--ink); }
.owe-jump b { display: block; font-size: .85rem; }
.owe-jump span { font-size: .8rem; color: var(--red); font-weight: 700; }
.owe-form { margin-top: 1.1rem; scroll-margin-top: 5rem; }
.owe-form-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: 1.1rem; margin: 0 0 .4rem; padding-bottom: .35rem; border-bottom: 2px solid var(--gold); }
.owe-sum { font-size: .82rem; font-weight: 700; color: var(--red); }
@media print { .owe-jump { display: none; } .owe-form { break-before: page; } .owe-form:first-of-type { break-before: auto; } }
.hq-del { flex-basis: 100%; }
.hq-del summary { cursor: pointer; color: var(--red); list-style: none; display: inline; }
.hq-del form { margin-top: .5rem; }
.owe-line { display: block; font-size: .78rem; color: var(--soft); margin-top: .1rem; }

/* Public payment: name suggestions */
.sugg { display: grid; gap: .4rem; }
.sugg-item { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%; text-align: left; font: inherit; background: #fff; border: 1.5px solid var(--rule); border-radius: 14px; padding: .75rem .9rem; cursor: pointer; color: var(--ink); }
.sugg-item:hover, .sugg-item:focus-visible { border-color: var(--p-500); background: var(--p-100); outline: none; }
.sugg-item b { font-size: .95rem; letter-spacing: .01em; }
.sugg-item span { font-size: .8rem; color: var(--soft); flex-shrink: 0; }
.pay-result { text-align: center; }
.pay-result .actions { display: grid; gap: .5rem; margin-top: .4rem; }
.closed-note { text-align: center; }
.tick-big.bad { background: var(--red-100); color: var(--red); }
.pay-list .row-link { display: block; color: inherit; text-decoration: none; }
.pay-list .row-link > b { display: block; }
.pay-list .row-link > span { display: block; margin-top: .15rem; }
.pay-list .row-link:hover b { color: var(--p-700); }

/* Star ratings */
.stars { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 2.1rem; line-height: 1; color: #b3beb8; cursor: pointer; padding: 0 .05rem; margin: 0; transition: color .1s, transform .1s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--gold); }
.stars input:focus-visible + label { outline: 3px solid var(--p-500); outline-offset: 2px; border-radius: 6px; }
.stars label:active { transform: scale(1.15); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rate-card { display: grid; gap: .55rem; justify-items: center; border-top: 1px solid var(--rule); padding-top: .9rem; margin-top: .4rem; }
.rate-card .rate-q { margin: 0; }
.rate-card textarea { width: 100%; }
.rate-actions { display: flex; gap: .5rem; }
.rate-thanks { color: var(--p-700); font-weight: 700; margin: .4rem 0 0; }
.fb-stars { color: var(--gold-ink); letter-spacing: .08em; }
.fb-comment { margin: .25rem 0; white-space: pre-line; }
.fb-done { opacity: .55; }
textarea { resize: vertical; line-height: 1.45; }
.stars.sent { opacity: .6; pointer-events: none; }

/* Pay collected cash: the Proceed bar stays at the top while scrolling */
.proceed-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + .5rem); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  background: var(--p-900); color: #fff; border-radius: 16px; padding: .65rem .7rem .65rem 1rem; box-shadow: 0 12px 28px -12px rgba(7,59,33,.55); }
.proceed-bar b { color: #fff; }
.proceed-bar .btn:disabled { opacity: .5; }

/* A Form's page: Paid / Owe tiles */
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.fs-tile { display: grid; gap: .1rem; text-decoration: none; color: var(--ink); background: #fff; border: 1.5px solid var(--rule); border-radius: 18px; padding: .85rem 1rem; }
.fs-tile b { font-family: var(--display, inherit); font-size: 1.9rem; line-height: 1.1; }
.fs-tile span { font-size: .85rem; font-weight: 700; color: var(--soft); }
.fs-tile.paid b { color: var(--p-700); }
.fs-tile.owing b { color: var(--red); }
.fs-tile.on.paid { border-color: var(--p-500); background: var(--p-100); }
.fs-tile.on.owing { border-color: var(--red); background: var(--red-100); }
.tab span.tab-long { font-size: .6rem; letter-spacing: -.01em; overflow: visible; text-overflow: clip; }

/* Contribution page: share row and Students / Payments switch */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.share-label { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin-right: .2rem; }
.view-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: .25rem; }
.view-tabs a { text-align: center; text-decoration: none; font-weight: 700; font-size: .9rem; color: var(--soft); padding: .6rem .5rem; border-radius: 11px; }
.view-tabs a span { font-weight: 800; margin-left: .2rem; color: inherit; opacity: .75; }
.view-tabs a.on { background: var(--p-900); color: #fff; }

/* Home: first-time checklist */
.setup-card { background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; padding: 1rem 1.05rem .55rem; box-shadow: 0 14px 30px -20px rgba(7,59,33,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.setup-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.setup-head h2 { margin: 0; font-size: 1.02rem; font-family: var(--font); font-weight: 800; color: var(--ink); }
.setup-head span { font-size: .8rem; font-weight: 800; color: var(--p-700); white-space: nowrap; }
.setup-bar { height: 7px; border-radius: 9px; background: rgba(13,107,58,.12); overflow: hidden; margin: .6rem 0 .3rem; }
.setup-bar i { display: block; height: 100%; background: var(--p-500); border-radius: inherit; }
.setup-steps { list-style: none; margin: 0; padding: 0; }
.setup-steps li { display: flex; align-items: center; gap: .7rem; padding: .62rem 0; border-top: 1px solid rgba(13,107,58,.1); font-size: .92rem; }
.setup-steps li:first-child { border-top: 0; }
.setup-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 800; flex-shrink: 0; border: 2px solid var(--rule); color: var(--soft); background: #fff; }
.setup-steps li.done .setup-n { background: var(--p-500); border-color: var(--p-500); color: #fff; }
.setup-steps li.done .setup-t { color: var(--soft); text-decoration: line-through; }
.setup-steps li.next .setup-n { border-color: var(--gold); background: var(--gold-100); color: var(--gold-ink); }
.setup-steps li.next .setup-t { font-weight: 800; }
.setup-t { flex: 1; min-width: 0; }
.setup-go { flex-shrink: 0; background: var(--gold); color: var(--p-900); font-weight: 800; font-size: .8rem; border-radius: 11px; padding: .45rem .75rem; text-decoration: none; }
.setup-ask { flex-shrink: 0; font-size: .75rem; font-weight: 700; color: var(--soft); }
.ring-today { color: var(--gold); font-weight: 800; }

/* Dark green tab bar: the active tab rises into a gold circle that slides between tabs */
.tabbar { background: none; }
.tabbar-in { position: relative; max-width: 520px; height: 66px; align-items: stretch; background: #06301b; border-radius: 34px; padding: 0 .4rem; box-shadow: 0 18px 36px -14px rgba(4,30,17,.65); }
.tab-glow { position: absolute; top: -18px; width: 54px; height: 54px; border-radius: 50%; background: var(--gold);
  left: calc(.4rem + (100% - .8rem) / var(--n) * var(--i) + (100% - .8rem) / var(--n) / 2 - 27px);
  box-shadow: 0 0 0 5px #eaf2ec, 0 10px 24px rgba(255,207,51,.5); transition: left .2s cubic-bezier(.3,.75,.25,1); z-index: 1; }
.tabbar-in.no-anim .tab-glow, .tabbar-in.no-anim .tab-ic { transition: none !important; }
.tab { z-index: 2; justify-content: flex-end; gap: .2rem; color: #cfe0d5; padding: 0 .1rem .62rem; border-radius: 0; background: none !important; }
.tab::after { display: none !important; }
.tab-ic { display: grid; place-items: center; transition: transform .2s cubic-bezier(.3,.75,.25,1), color .15s; }
.tab.on { color: var(--gold); }
.tab.on .tab-ic { transform: translateY(-20px); color: var(--p-900); }
.tab.on .tab-label { margin-top: 0; }
.tab-label { font-size: .68rem; font-weight: 800; }
.tab span.tab-long { font-size: .6rem; letter-spacing: -.01em; overflow: visible; text-overflow: clip; }
.tab:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .tab-glow, .tab-ic { transition: none; } }

/* ===== Light frosted glass (Option B) =====
   A soft green-and-gold background sits behind every signed-in page; cards are white frosted glass
   with dark text, so everything stays readable in sunlight. The Home money card stays deep green. */
:root { --glass: rgba(255,255,255,.66); --glass-hi: rgba(255,255,255,.86); --glass-line: rgba(255,255,255,.92); --glass-shadow: 0 12px 28px -20px rgba(7,59,33,.45); }
.app-body, body.public:not(.moment) { background: #eaf2ec; }
.app-body::before, body.public:not(.moment)::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 8% 18%, rgba(255,207,51,.32), transparent 62%),
              radial-gradient(55% 45% at 95% 55%, rgba(31,154,90,.26), transparent 62%),
              radial-gradient(50% 35% at 25% 100%, rgba(13,107,58,.18), transparent 60%), #eef5f0; }
.app-body .card, .app-body .stat, .app-body .item, .app-body .profile, .app-body .reminder-card, .app-body .view-tabs,
.app-body .fs-tile, .app-body .owe-jump a, .app-body .form-tab, .app-body .q-ic, .app-body .signout-pop,
body.public:not(.moment) .card, body.public:not(.moment) .sugg-item {
  background: var(--glass); border-color: var(--glass-line); box-shadow: var(--glass-shadow); }
.app-body .quick-btn:nth-child(even) .q-ic { background: rgba(255,243,204,.82); border-color: rgba(246,227,160,.9); }
.app-body .item:hover, .app-body .fs-tile:hover { background: var(--glass-hi); }
.app-body input[type=text], .app-body input[type=search], .app-body input[type=email], .app-body input[type=password], .app-body input[type=tel],
.app-body input[type=date], .app-body input[type=time], .app-body input[type=number], .app-body select, .app-body textarea,
body.public:not(.moment) input[type=text], body.public:not(.moment) input[type=tel] { background: rgba(255,255,255,.9); border-color: rgba(13,107,58,.16); }
.app-body .seg span, .app-body .chips span { background: rgba(255,255,255,.75); }
.app-body .pop-sheet .seg span { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.3); }
.app-body .pop-sheet .seg input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--p-900); }
.app-body .link-box { background: rgba(255,255,255,.7); }
.app-body .coming { background: rgba(255,255,255,.45); }
.app-body .list li, .app-body .form-row { border-color: rgba(13,107,58,.1); }
.app-body .fs-tile.on.paid { background: rgba(227,246,234,.9); } .app-body .fs-tile.on.owing { background: rgba(251,232,232,.9); }
.app-body .view-tabs a.on { background: var(--p-900); }
.app-body .stat b, .app-body h1 { color: var(--p-900); }
.app-body .apphead { box-shadow: 0 16px 34px -22px rgba(4,30,17,.7); }
/* the money card on Home: deep green with a glass sheen */
.ring-card { background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.02) 45%), linear-gradient(160deg, #0b5a31, #063a20) !important; border: 1px solid rgba(255,255,255,.18); }
@media print { .app-body::before, body.public::before { display: none; } }

/* ===== Dark glass for moments =====
   Sign-in, the parent's payment result, the Payment Link pop-up, "Cash paid in" and big "done" screens. */
:root { --dg-bg: radial-gradient(55% 38% at 12% 15%, rgba(255,207,51,.30), transparent 60%), radial-gradient(50% 35% at 90% 85%, rgba(31,154,90,.48), transparent 60%), radial-gradient(40% 30% at 80% 20%, rgba(58,42,5,.55), transparent 60%), linear-gradient(160deg, #0b3d24, #061a10 55%, #0a2c1a);
  --dg-card: rgba(255,255,255,.09); --dg-line: rgba(255,255,255,.2); --dg-soft: rgba(255,255,255,.74); --mint: #6ee7a0; }
.ok-word { font-style: normal; color: var(--mint); }
.label-up { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0; }
.dg, body.public.moment main .card, .auth-card, .moment-card, .pop-sheet {
  background: var(--dg-card) !important; border: 1px solid var(--dg-line) !important; color: #fff;
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 60px -24px rgba(0,0,0,.65) !important; }
/* the parent's payment result pages */
body.public.moment { background: #061a10; color: #fff; }
body.public.moment::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--dg-bg); }
body.public.moment .topbar { background: rgba(4,24,14,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.public.moment main { min-height: calc(100vh - 70px); align-content: center; }
body.public.moment main .card { border-radius: 26px; padding: 1.6rem 1.3rem; }
body.public.moment h1, body.public.moment h2 { color: #fff; }
body.public.moment .muted, body.public.moment .small.muted, body.public.moment main > p.small { color: var(--dg-soft) !important; }
body.public.moment a:not(.btn) { color: var(--gold); }
body.public.moment .big-num { color: var(--gold); font-size: 2.2rem; }
body.public.moment .tick-big { width: 64px; height: 64px; border-radius: 18px; background: rgba(0,0,0,.28); color: #fff; border: 2px solid #34d27f; box-shadow: 0 0 26px rgba(52,210,127,.5); font-size: 1.9rem; }
body.public.moment .tick-big.bad { border-color: #ff8a7a; box-shadow: 0 0 26px rgba(255,120,100,.4); color: #ffb3a8; }
body.public.moment .spinner { border-color: rgba(255,255,255,.18); border-top-color: var(--gold); }
body.public.moment .list li { border-color: rgba(255,255,255,.14); }
body.public.moment .pill { background: rgba(52,210,127,.2); color: var(--mint); }
body.public.moment .btn-primary { background: linear-gradient(180deg, #34d27f, #1f9a5a); color: #04210f; box-shadow: 0 10px 26px -8px rgba(52,210,127,.6); }
body.public.moment .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border: 1px solid var(--dg-line); }
body.public.moment .rate-card { border-color: rgba(255,255,255,.14); }
body.public.moment .stars label { color: rgba(255,255,255,.25); }
body.public.moment .stars label:hover, body.public.moment .stars label:hover ~ label, body.public.moment .stars input:checked ~ label { color: var(--gold); }
body.public.moment .linkish, body.public.moment .rate-thanks { color: var(--gold); }
body.public.moment .flash.bad { background: rgba(255,120,100,.18); color: #ffd0c9; }
/* sign-in and the other account pages */
.auth { background: var(--dg-bg), #061a10; }
.auth-card { border-radius: 26px; }
.auth-card h1, .auth-card h2, .auth-card label, .auth-card b { color: #fff; }
.auth-card .muted, .auth-card .hint, .auth-card p { color: var(--dg-soft); }
.auth-card a:not(.btn) { color: var(--gold); }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-card input[type=tel] { background: rgba(0,0,0,.28); border-color: var(--dg-line); color: #fff; }
.auth-card input::placeholder { color: rgba(255,255,255,.45); }
.auth-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,207,51,.2); }
.auth-card .btn-primary { background: linear-gradient(180deg, #ffd84d, #f2b900); color: var(--p-900); box-shadow: 0 10px 26px -8px rgba(255,207,51,.55); }
.auth-card .btn-google, .auth-card .btn-ghost { background: rgba(255,255,255,.07); color: #fff; border: 1px solid var(--dg-line); }
.auth-card .check, .auth-card .check span { color: var(--dg-soft); }
.auth-card .flash.ok { background: rgba(52,210,127,.18); color: #c9f5da; } .auth-card .flash.bad { background: rgba(255,120,100,.18); color: #ffd0c9; }
.auth-card .err-msg { color: #ffb3a8; }
.auth-card .or-line { color: var(--dg-soft); } .auth-card .or-line::before, .auth-card .or-line::after { background: var(--dg-line); }
/* Payment Link pop-up */
.sheet-backdrop { background: rgba(2,14,8,.55); }
.pop-sheet { background: rgba(9,40,24,.72) !important; border-bottom: 0 !important; }
.pop-sheet h2 { color: #fff; } .pop-sheet .muted { color: var(--dg-soft) !important; }
.pop-sheet .link-box { background: rgba(0,0,0,.3); border-color: var(--dg-line); color: #fff; }
.pop-sheet .btn-ghost { background: rgba(255,255,255,.07); color: #fff; border: 1px solid var(--dg-line); }
.pop-sheet .sheet-grip { background: rgba(255,255,255,.35); }
/* big "done" screens inside the app */
.moment-stage { position: relative; margin: -.4rem -1rem 0; padding: 2.2rem 1rem 2.6rem; border-radius: 28px; overflow: hidden; background: #061a10; min-height: 62vh; display: grid; place-items: center; }
.moment-stage::before { content: ""; position: absolute; inset: 0; background: var(--dg-bg); }
.moment-card { position: relative; width: 100%; max-width: 380px; border-radius: 26px; padding: 1.6rem 1.3rem 1.3rem; text-align: center; display: grid; gap: .5rem; justify-items: center; }
.moment-card h1 { color: #fff !important; font-family: var(--font); font-size: 1.35rem; margin: 0; }
.moment-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; border: 1px solid rgba(110,231,160,.5); background: rgba(31,154,90,.2); color: var(--mint); }
.moment-big { font-family: var(--display); font-size: 2rem; color: var(--gold); margin: .2rem 0 0; }
.moment-sub { color: var(--dg-soft); font-size: .88rem; margin: 0; }
.moment-tick { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; border: 2px solid #34d27f; box-shadow: 0 0 26px rgba(52,210,127,.5); background: rgba(0,0,0,.28); margin: .5rem 0; }
.btn-green { background: linear-gradient(180deg, #34d27f, #1f9a5a); color: #04210f; font-weight: 800; box-shadow: 0 10px 26px -8px rgba(52,210,127,.6); }
.moment-home { color: var(--gold); font-weight: 700; font-size: .88rem; margin-top: .2rem; }
@media (prefers-reduced-transparency: reduce) { .dg, body.public.moment main .card, .auth-card, .moment-card, .pop-sheet { background: #0d3a24 !important; backdrop-filter: none; } }
.app-body .greeting { color: #fff; }
.app-body .form-tab.on { background: var(--p-700); border-color: var(--p-700); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Speed: no live blur behind the many cards and rows (the soft background looks the same without it,
   and blurring every row made low-cost phones slow to draw each page). */
.app-body .card, .app-body .stat, .app-body .item, .app-body .fs-tile, .app-body .form-tab, .app-body .q-ic,
body.public:not(.moment) .card, body.public:not(.moment) .sugg-item { backdrop-filter: none; -webkit-backdrop-filter: none; }
.tab { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* Sign out pop-up: dark green glass like the tab bar, gold Sign out */
.signout-pop, .app-body .signout-pop { background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,0) 50%), #06301b; color: #fff;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 22px 44px -12px rgba(4,30,17,.6); backdrop-filter: none; -webkit-backdrop-filter: none; }
.signout-pop::before { background: #0a3a22; border-left: 1px solid rgba(255,255,255,.14); border-top: 1px solid rgba(255,255,255,.14); }
.signout-pop p { color: #fff; }
.signout-actions .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.signout-actions .btn-danger { background: var(--gold); color: #06301b; border-color: var(--gold); }
.home-top .signout { margin-left: 0; }
/* "Setting up School PTAs" on the dark sign-up card: readable */
.auth-card .start-chosen { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.auth-card .start-chosen .small { color: rgba(255,255,255,.74); }
.auth-card .start-chosen b { color: #fff; }
.auth-card .start-chosen a { color: var(--gold); }

/* Name your group: card keeps full width now that the chips are gone */
.home-main { width: 100%; box-sizing: border-box; }
/* Home: a message such as "... is set up" sits under the money card instead of behind it */
main.stack > .ring-card { order: -1; }

/* Sign-up: "Already have an account? Sign in" at the top, beside the logo */
.auth-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: nowrap; }
.auth-head .brand { margin-bottom: 0; }
.auth-head + .auth-card { margin-top: 1.1rem; }
.auth-top { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: #d6f0df; }
.auth-top a { color: #06301b; background: var(--gold); font-weight: 800; text-decoration: none; padding: .45rem .95rem; border-radius: 999px; white-space: nowrap; }
.auth-top a:hover { filter: brightness(1.05); }
@media (max-width: 460px) { .auth-top { font-size: .7rem; gap: .35rem; white-space: nowrap; }
  .auth-top a { padding: .32rem .7rem; font-size: .76rem; }
  .auth-head .brand { font-size: .95rem; gap: .4rem; } .auth-head .brand .g-badge { width: 28px; height: 28px; font-size: .7rem; } }
@media (max-width: 350px) { .auth-top span { display: none; } }

/* ===== Joining a group ===== */
.join-explain { font-size: .9rem; color: var(--soft); line-height: 1.55; margin: 0; }
.join-explain b { color: var(--ink); }
.join-link { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff; border: 1px dashed rgba(255,255,255,.3); border-radius: 16px; padding: .8rem .95rem; }
.join-link b { display: block; font-size: .9rem; }
.join-link span span { display: block; font-size: .78rem; color: rgba(255,255,255,.7); margin-top: .1rem; }
.join-link .chev { margin-left: auto; font-size: 1.4rem; color: var(--gold); line-height: 1; }
.invite-head { display: flex; align-items: center; gap: .85rem; }
.invite-head h1 { margin: .1rem 0 .35rem; font-size: 1.45rem; }
.invite-logo { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; }
.join-requests h2 { display: flex; align-items: center; gap: .5rem; }
.app-body .list li.req-row { display: grid; grid-template-columns: 1fr; gap: .55rem; align-items: start; }
.req-row .grow span { display: block; }
.req-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.req-actions select { width: auto; min-height: 36px; padding: .3rem .5rem; font-size: .85rem; }
.join-code-val { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; font-weight: 800; letter-spacing: .12em; color: var(--p-900); }
.join-alert { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); background: rgba(255,243,204,.92); border: 1px solid rgba(246,227,160,.95); border-radius: 18px; padding: .8rem .9rem; box-shadow: var(--glass-shadow); }
.join-alert b { display: block; font-size: .95rem; }
.join-alert .grow span { display: block; font-size: .8rem; color: var(--soft); }
.join-alert-go { background: var(--p-900); color: #fff; font-weight: 800; font-size: .8rem; border-radius: 999px; padding: .4rem .85rem; }
/* Add to home screen */
.a2hs { display: flex; align-items: center; gap: .7rem; background: #06301b; color: #fff; border-radius: 18px; padding: .75rem .8rem; box-shadow: 0 14px 30px -16px rgba(4,30,17,.6); position: relative; }
.a2hs[hidden] { display: none; }
.a2hs-ic img { display: block; border-radius: 11px; }
.a2hs b { display: block; font-size: .9rem; }
.a2hs .grow span { display: block; font-size: .78rem; color: rgba(255,255,255,.75); margin-top: .1rem; }
.a2hs .grow span b { display: inline; font-size: inherit; color: #fff; }
.a2hs-x { background: none; border: 0; color: rgba(255,255,255,.7); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: .2rem .3rem; }

a.home-btn { text-decoration: none; }

/* Brand: the SikaCollect emblem in its gold coin, with the two-colour name */
.brand-coin { width: 40px; height: 40px; display: block; flex-shrink: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.brand-gold { color: var(--gold); }
.home-coin { width: 36px; height: 36px; }
@media (max-width: 460px) { .auth-head .brand-coin { width: 32px; height: 32px; } }

/* HQ People */
.people-search input { flex: 1; min-width: 0; }
.list.people li.person { display: grid; grid-template-columns: 1fr; gap: .35rem; align-items: start; }
.person-main, .person-when { display: grid; gap: .15rem; }
.person-when { color: var(--soft); }
.person-when b { color: var(--ink); font-weight: 700; }
.person-del summary { cursor: pointer; color: var(--red); font-weight: 700; font-size: .82rem; }
.person-del form { margin-top: .5rem; }

/* HQ Transactions */
.tx-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .55rem; align-items: end; }
.tx-filters input[type=search] { grid-column: 1 / -1; }
.tx-filters label { display: grid; gap: .2rem; }
.list.tx-list li.tx { display: grid; grid-template-columns: 1fr; gap: .4rem; align-items: start; }
.tx-main { display: grid; gap: .15rem; }
.tx-amt { float: right; font-weight: 800; color: var(--p-900); }
.tx-amt.neg { color: var(--red); }
.tx-rev summary { cursor: pointer; color: var(--red); font-weight: 700; font-size: .82rem; }
.tx-rev form { margin-top: .5rem; }

/* Home money card: Balance (what reaches the account) + paid fully / part / not paid. Compact. */
.ring-card.money-card { flex-direction: column; align-items: stretch; gap: .5rem; padding: .75rem 1rem .6rem; margin-top: -3rem; border-radius: 22px; }
.money-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #bfe6cf; }
.money-card .ring-amt { font-size: 1.5rem; line-height: 1.1; margin-top: 0; }
.money-card .ring-sub { margin-top: .2rem; font-size: .76rem; }
.pay-rings { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .45rem; }
.pay-ring { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: #fff; text-decoration: none; border-radius: 14px; padding: .2rem 0 .3rem; }
.pay-ring:hover { background: rgba(255,255,255,.06); }
.pay-ring:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pay-ring span { font-size: .7rem; font-weight: 800; color: #d5f0df; }

/* Home: one ring per Form split into paid fully (green), part paid (gold), not paid (red) */
.form-pay { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .45rem; }
.form-pay-ring { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: #fff; text-decoration: none; border-radius: 14px; padding: .2rem 0 .25rem; }
.form-pay-ring:hover { background: rgba(255,255,255,.06); }
.form-pay-ring:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.form-pay-ring b { font-size: .74rem; color: #d5f0df; }
.fp-nums { display: flex; gap: .35rem; font-size: .72rem; font-weight: 800; }
.fp-nums i, .fp-key i { font-style: normal; }
.fp-nums .g { color: #6ee7a0; } .fp-nums .y { color: #ffcf33; } .fp-nums .r { color: #ff8a80; }
.fp-key { position: relative; display: flex; justify-content: center; gap: .8rem; font-size: .68rem; color: #d5f0df; font-weight: 700; }
.fp-key span { display: inline-flex; align-items: center; gap: .3rem; }
.fp-key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fp-key .g { background: #6ee7a0; } .fp-key .y { background: #ffcf33; } .fp-key .r { background: #ff8a80; }

/* Current Balance and the amount on one line; bigger rings */
.money-row { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.money-row .ring-amt { font-size: 1.15rem; margin: 0; white-space: nowrap; }
.money-amt { display: inline-flex; align-items: center; gap: .45rem; }
.bal-eye { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #e6f6ec; display: grid; place-items: center; cursor: pointer; padding: 0; }
.bal-eye:hover { background: rgba(255,255,255,.22); }
.bal-eye:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.bal-eye .eye-off, .money-card .amt-mask { display: none; }
.money-card.bal-hidden .amt-real, .money-card.bal-hidden .bal-eye .eye-on { display: none; }
.money-card.bal-hidden .amt-mask, .money-card.bal-hidden .bal-eye .eye-off { display: inline; }
.money-card.bal-hidden .bal-eye .eye-off { display: grid; }
.money-card .ring-sub { margin-top: .1rem; }
.form-pay-ring b { font-size: .8rem; }
.fp-nums { font-size: .78rem; }

/* Parent payment: quick amount choices and Add another student */
.amt-quick { display: flex !important; flex-direction: row; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 .45rem; }
.amt-quick button { width: auto !important; flex: 0 0 auto; }
.pay-line .field[hidden] { display: none; }
.amt-quick button { font: inherit; font-size: .82rem; font-weight: 700; padding: .45rem .75rem; border-radius: 999px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; }
.amt-quick button.on { background: var(--p-900); border-color: var(--p-900); color: #fff; }
.add-student summary { cursor: pointer; font-weight: 800; color: var(--p-800, #0b5a31); list-style: none; display: flex; align-items: center; gap: .55rem; }
.add-student summary::-webkit-details-marker { display: none; }
.add-plus { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--p-900); display: grid; place-items: center; font-size: 1.1rem; line-height: 1; }

/* Pay Collected Cash: amount box under each ticked student */
.app-body .list.settle-list li { flex-wrap: wrap; }
.app-body .settle-list .settle-amt { flex: 1 0 100%; width: auto !important; margin: .1rem 0 0 1.9rem; }
.app-body .settle-list .settle-amt input { max-width: 12rem; }
.settle-amt[hidden] { display: none; }

/* Deleting a contribution that has payments */
.del-box { border: 1.5px solid rgba(200,40,40,.35); }
.deleted-list summary { cursor: pointer; font-weight: 800; }

/* Arrears on the student page */
.arrear-off { margin: -.3rem 0 .6rem 3.4rem; }
.arrear-off summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--soft); }
.arrear-off form { margin-top: .4rem; }
/* Who owes / Completed school: keep the amount column in view on phones */
.owe-form table.report { table-layout: fixed; }
.owe-form table.report th:last-child, .owe-form table.report td.num { width: 7.2rem; }
.owe-form .nowrap { white-space: normal; }
.owe-form table.report td:first-child { overflow-wrap: anywhere; }
.check .pill { flex: none; }
.owe-form .owe-line { white-space: normal; word-break: break-word; padding-right: .3rem; }
.owe-form table.report td:first-child { padding-right: .2rem; }

.fp-bal { font-family: var(--display); font-size: .92rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* New contribution: pick the Forms that pay */
.form-picks { display: flex; flex-wrap: wrap; gap: .5rem; }
.form-pick { position: relative; cursor: pointer; }
.form-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.form-pick span { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--rule); background: #fff; font-weight: 800; color: var(--ink); }
.form-pick span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--rule); background: #fff; }
.form-pick input:checked + span { background: var(--p-900); border-color: var(--p-900); color: #fff; }
.form-pick input:checked + span::before { border-color: var(--gold); background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%2306301b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.form-pick input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Phone with several children: tick the ones to pay for */
.sugg-pick { display: flex; align-items: center; gap: .7rem; cursor: pointer; }
.sugg-pick input { width: 20px; height: 20px; accent-color: var(--p-700); flex: none; }
.sugg-pick b { flex: 1; }
/* Contribution page: Payment link and Share on WhatsApp side by side, same size. */
.share-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .6rem; }
.share-pair .btn { justify-content: center; white-space: nowrap; padding-left: .5rem; padding-right: .5rem; min-width: 0; }
/* ---------- HQ: sidebar dashboard ---------- */
.hq2 { background: #eaf1ee; }
.hq-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, #062a1b 250px, transparent 250px); }
.hq-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.4rem; padding: 1.4rem 1rem 1rem; color: #d5ece0; background: linear-gradient(180deg, #08301f, #062a1b 60%, #05231a); overflow-y: auto; }
.hq-brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; padding: 0 .4rem; }
.hq-brand b { display: block; font-size: 1.2rem; letter-spacing: -.01em; }
.hq-brand b i { font-style: normal; color: var(--gold); }
.hq-brand small { display: block; font-size: .74rem; color: #a9d4bc; font-weight: 600; }
.hq-menu { display: grid; gap: .2rem; }
.hq-menu a { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px; color: #d5ece0; text-decoration: none; font-weight: 600; font-size: .92rem; }
.hq-menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.hq-menu a.on { background: #cfe8dc; color: #06301e; font-weight: 800; }
.hq-menu a span { flex: 1; }
.hq-menu .hq-n { font-style: normal; }
.hq-side-foot { margin-top: auto; display: grid; gap: .8rem; }
.hq-mygroup { display: block; padding: .8rem .9rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.hq-mygroup b { display: block; font-size: .88rem; } .hq-mygroup span { font-size: .78rem; color: #a9d4bc; }
.hq-me { display: flex; align-items: center; gap: .6rem; padding: .3rem .2rem; }
.hq-me .grow { min-width: 0; } .hq-me b { display: block; color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hq-me small { color: #a9d4bc; font-size: .74rem; }
.hq-me form { margin: 0; }
.hq-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: .82rem; color: var(--p-900); background: linear-gradient(135deg, var(--gold), #ffe27a); }
.hq-icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--rule); background: #fff; color: var(--p-900); cursor: pointer; text-decoration: none; }
.hq-side .hq-icon-btn { width: 34px; height: 34px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #d5ece0; }
.hq-ping { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-style: normal; font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
.hq-body { min-width: 0; }
.hq-top { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.8rem .4rem; }
.hq-search { display: flex; align-items: center; gap: .55rem; flex: 0 1 380px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 0 .85rem; color: var(--soft); }
.hq-search input { border: 0; outline: 0; background: transparent; padding: .7rem 0; width: 100%; font: inherit; color: var(--ink); box-shadow: none; }
.hq-search:focus-within { border-color: var(--p-500); box-shadow: 0 0 0 3px rgba(23,160,90,.15); }
.hq-top-icons { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.hq-av-top { width: 40px; height: 40px; }
.hq2 .hq-main { max-width: 1400px; margin: 0; padding: .8rem 1.8rem 3rem; }
.hq2 .card { border-radius: 18px; }
.hq2 h2 { font-size: 1.05rem; margin: 0; }
.hq-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.hq-dash { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "hero hero attn" "tiles tiles top" "chart donut top"; gap: 1.1rem; }
.hq-hero { grid-area: hero; display: flex; align-items: center; gap: 1rem; overflow: hidden; padding: 1.5rem 1.6rem; }
.hq-hero-text { flex: 1; min-width: 0; display: grid; gap: .7rem; }
.hq-hero h1 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; }
.hq-hero .muted { margin: 0; }
.eyebrow-sm { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--p-600); }
.hq-hero-art { position: relative; width: 210px; height: 190px; flex-shrink: 0; display: grid; place-items: center; }
.hq-hero-art img { position: relative; width: 170px; height: auto; filter: drop-shadow(0 14px 22px rgba(7,59,33,.25)); }
.hq-orb { position: absolute; border-radius: 50%; }
.hq-orb.o1 { width: 180px; height: 180px; background: radial-gradient(circle, #dff2e7, transparent 70%); }
.hq-orb.o2 { width: 26px; height: 26px; top: 14px; right: 18px; background: var(--gold); opacity: .8; }
.hq-orb.o3 { width: 14px; height: 14px; bottom: 22px; left: 16px; background: var(--p-500); opacity: .5; }
.hq-attn { grid-area: attn; display: grid; gap: .8rem; align-content: start; }
.hq-attn-box { border: 1px solid var(--rule); border-radius: 14px; padding: .9rem; display: grid; gap: .7rem; }
.hq-attn-item { display: flex; gap: .65rem; align-items: flex-start; color: inherit; text-decoration: none; }
.hq-attn-item b { display: block; font-size: .86rem; } .hq-attn-item span span { font-size: .76rem; color: var(--soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hq-attn-item .hq-dot { width: 26px; height: 26px; border-radius: 8px; font-size: .78rem; }
.hq-attn-more { display: flex; justify-content: space-between; align-items: center; padding: .6rem .8rem; border-radius: 10px; background: #e8f3ed; color: var(--p-700); font-weight: 700; font-size: .86rem; text-decoration: none; }
.hq-tiles { grid-area: tiles; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.hq-tile { display: grid; gap: .35rem; align-content: start; padding: 1.05rem 1.1rem; }
.hq-tile span { font-size: .84rem; color: var(--soft); font-weight: 600; }
.hq-tile b { font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 800; color: var(--ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.hq-tile em { font-style: normal; font-size: .76rem; color: var(--soft); }
.hq-tile em.up { color: var(--p-600); font-weight: 700; } .hq-tile em.bad { color: var(--red); font-weight: 700; }
.hq-tile-gold { background: linear-gradient(140deg, var(--p-700), var(--p-900)) !important; border: 0; }
.hq-tile-gold span, .hq-tile-gold em { color: #bfe8cf; } .hq-tile-gold b { color: var(--gold); }
.hq-top-groups { grid-area: top; display: grid; gap: .85rem; align-content: start; }
.hq-perf { display: grid; gap: .35rem; color: inherit; text-decoration: none; }
.hq-perf-row { display: flex; gap: .6rem; font-size: .88rem; } .hq-perf-row .grow { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hq-perf-row b { font-size: .82rem; color: var(--p-700); white-space: nowrap; }
.hq-perf-bar { height: 8px; border-radius: 6px; background: #e3ece7; overflow: hidden; }
.hq-perf-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #0b5a31, #12864a); }
.hq-perf:first-of-type .hq-perf-bar i { background: linear-gradient(90deg, #c99400, var(--gold)); }
.hq-chart { grid-area: chart; display: grid; gap: .8rem; }
.hq-chart svg { width: 100%; height: 170px; display: block; }
.hq-chart-x { display: flex; justify-content: space-between; font-size: .78rem; color: var(--soft); }
.hq-donut { grid-area: donut; display: grid; gap: .8rem; align-content: start; }
.hq-donut-row { display: flex; align-items: center; gap: 1rem; }
.hq-donut-pct { font: 800 20px var(--font); fill: var(--ink); } .hq-donut-sub { font: 600 9px var(--font); fill: #7a8a82; }
.hq-legend { display: grid; grid-template-columns: auto auto; gap: .45rem .9rem; margin: 0; font-size: .86rem; }
.hq-legend dt { display: flex; align-items: center; gap: .45rem; color: var(--soft); } .hq-legend dd { margin: 0; font-weight: 800; }
.hq-legend i { width: 12px; height: 12px; border-radius: 3px; } .hq-legend .k1 { background: #0e6b45; } .hq-legend .k2 { background: #dcebe2; border: 1px solid #b9d3c4; }
.hq-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.hq-mini span { display: grid; justify-items: center; padding: .55rem .3rem; border-radius: 10px; background: #e8f0ec; font-size: .72rem; color: var(--soft); }
.hq-mini b { font-size: 1rem; color: var(--ink); }
.hq-dash-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: start; margin-top: 1.1rem; }
.hq-mini-table td small { display: block; color: var(--soft); font-size: .74rem; }
.hq-check { background: #fbe9ec !important; border-color: #f4ccd3 !important; display: grid; gap: .2rem; align-content: start; }
.hq-check .hq-card-head { padding-bottom: .5rem; border-bottom: 1px solid #f0c3cc; margin-bottom: .2rem; }
.hq-check h2 { color: #9d1730; } .hq-check .hq-card-head a { color: #9d1730; }
.hq-check-item { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid #f3d2d8; color: inherit; text-decoration: none; }
.hq-check-item:last-child { border-bottom: 0; }
.hq-check-item b { display: block; font-size: .88rem; } .hq-check-item span span { display: block; font-size: .76rem; color: #9d4555; }
.hq-latest { display: grid; gap: .6rem; align-content: start; }
.hq-mini-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.hq-mini-table th { text-align: left; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); font-weight: 700; padding: .4rem .3rem; }
.hq-mini-table td { padding: .6rem .3rem; border-top: 1px solid var(--rule); }
.hq-mini-table .num { text-align: right; }
.hq-amt { display: inline-block; padding: .2rem .5rem; border-radius: 7px; background: #e8f0ec; font-weight: 700; white-space: nowrap; }
.hq-amt.on { background: #0e6b45; color: #fff; } .hq-amt.neg { background: var(--red-100); color: var(--red); }
.hq-feed { display: grid; gap: .6rem; align-content: start; }
.hq-feed ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .75rem; }
.hq-feed li b { display: block; font-size: .86rem; font-weight: 600; } .hq-feed li span { font-size: .76rem; color: var(--soft); }
.hq-results { display: grid; padding: .3rem 1.1rem; }
.hq-results a { display: grid; padding: .75rem 0; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.hq-results a:first-child { border-top: 0; }
.hq-results a span { font-size: .8rem; color: var(--soft); }
@media (max-width: 1180px) {
  .hq-dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "hero hero" "attn top" "tiles tiles" "chart donut"; }
}
@media (max-width: 900px) {
  .hq-shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .hq-side { position: static; height: auto; flex-direction: column; gap: .8rem; padding: 1rem; }
  /* Phones: every HQ page visible at once, 4 across, icon over the name. */
  .hq-menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
  .hq-menu a { position: relative; flex-direction: column; gap: .3rem; padding: .6rem .2rem; text-align: center; font-size: .72rem; line-height: 1.15; }
  .hq-menu a span { flex: none; }
  .hq-menu .hq-n { position: absolute; top: .25rem; right: .35rem; margin: 0; }
  .hq-side-foot { display: none; }
  .hq-top { padding: 1rem 1rem .3rem; }
  .hq2 .hq-main { padding: .6rem 1rem 3rem; }
  .hq-dash, .hq-dash-3 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "attn" "tiles" "chart" "donut" "top"; }
  .hq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-hero-art { display: none; }
}
.hq-n.live { background: #1faa59; }
.hq-person-head { display: flex; align-items: center; gap: 1rem; }
.hq-person-head .hq-av { width: 54px; height: 54px; font-size: 1.05rem; }
.hq-person-head h1 { margin: 0; font-size: 1.4rem; }
.hq-ptiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.hq-day { display: grid; gap: .6rem; }
.hq-day h3 { margin: 0; font-size: .95rem; color: var(--p-700); }
.hq-steps { list-style: none; margin: 0; padding: 0 0 0 .2rem; display: grid; }
.hq-steps li { position: relative; display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .6rem; padding: .45rem 0 .45rem 1.1rem; border-left: 2px solid #dbe8e1; }
.hq-steps li::before { content: ""; position: absolute; left: -6px; top: .75rem; width: 10px; height: 10px; border-radius: 50%; background: #b9d3c4; }
.hq-steps li.action::before { background: var(--p-600); }
.hq-steps li.sign::before { background: var(--gold); }
.hq-steps .t { font-size: .78rem; color: var(--soft); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.hq-steps .w { font-size: .88rem; }
.hq-steps li.action .w { font-weight: 700; }
.hq-steps .w small { display: block; font-size: .74rem; color: var(--soft); font-weight: 400; }
@media (max-width: 900px) { .hq-ptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.people-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px) auto; gap: .6rem; align-items: center; }
.people-filter select { margin: 0; }
@media (max-width: 640px) { .people-filter { grid-template-columns: minmax(0, 1fr) auto; } .people-filter select { grid-column: 1 / -1; grid-row: 2; } }
.hq-did-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.seg-links { display: inline-flex; padding: 3px; border-radius: 11px; background: #dfeae4; }
.seg-links a { padding: .4rem .8rem; border-radius: 9px; font-size: .84rem; font-weight: 700; color: var(--p-700); text-decoration: none; }
.seg-links a.on { background: #fff; color: var(--p-900); box-shadow: 0 1px 3px rgba(7,59,33,.15); }
.hq-rem-days { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.hq-rem-days label { display: grid; gap: .3rem; font-size: .84rem; font-weight: 700; }
.hq-rem-days input { margin: 0; }
.hq-compose textarea { width: 100%; min-height: 8rem; resize: vertical; }
.hq-compose .check { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .9rem; margin: .25rem 0; }
.hq-sent { display: grid; gap: .3rem; color: inherit; text-decoration: none; }
.hq-read { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; margin-top: .2rem; }
.hq-msg-card { position: relative; display: grid; gap: .45rem; padding: 1rem 1.1rem; border-radius: 18px; background: linear-gradient(140deg, #fff7d6, #fff); border: 1px solid #f3dd8a; box-shadow: 0 10px 24px -16px rgba(120,90,0,.5); }
.hq-msg-top { display: flex; align-items: center; gap: .5rem; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); }
.hq-msg-top time { margin-left: auto; white-space: nowrap; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--soft); }
.hq-msg-card h2 { margin: 0; font-size: 1.08rem; }
.hq-msg-card p { margin: 0; font-size: .92rem; line-height: 1.45; }
.hq-msg-card form { margin: .2rem 0 0; }
.hq-stats.hq-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) { .hq-stats.hq-stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-pay.form-pay-one { grid-template-columns: minmax(0, 1fr); justify-items: center; }

/* ---- Messages between SikaCollect and an executive ---- */
.hq-msg-btns { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .2rem; }
.hq-msg-btns form { margin: 0; }
.chat { display: grid; gap: .55rem; padding: .25rem 0 .5rem; }
.chat-day { text-align: center; margin: .5rem 0 .1rem; font-size: .72rem; font-weight: 700; color: var(--soft); }
.chat-day span { background: rgba(13,107,58,.08); padding: .2rem .65rem; border-radius: 999px; }
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-bubble { max-width: min(82%, 560px); padding: .6rem .8rem .45rem; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid #e3ece6; box-shadow: 0 6px 16px -14px rgba(5,38,26,.5); display: grid; gap: .2rem; }
.chat-row.mine .chat-bubble { background: #e3f4ea; border-color: #c6e5d2; border-radius: 16px 16px 4px 16px; }
.chat-bubble.is-msg { background: linear-gradient(140deg, #fff7d6, #fff); border-color: #f3dd8a; }
.chat-bubble.is-fb { background: #f4f2ff; border-color: #ddd8fb; }
.chat-bubble p { margin: 0; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.chat-title { font-size: .95rem; }
.chat-tag { font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); }
.chat-re { font-size: .78rem; color: var(--soft); border-left: 3px solid #f3dd8a; padding-left: .45rem; }
.chat-meta { font-size: .72rem; color: var(--soft); text-align: right; }
.chat-meta a { font-weight: 700; }
.chat-compose textarea { width: 100%; resize: vertical; }
.hq-chat-wrap { max-height: 62vh; overflow-y: auto; padding: .25rem .4rem; border-radius: 16px; background: rgba(13,107,58,.035); }
.hq-inbox li { padding: 0; }
.hq-inbox-row { display: flex; gap: .75rem; align-items: center; padding: .75rem .9rem; color: inherit; text-decoration: none; width: 100%; }
.hq-inbox-row .grow { display: grid; gap: .1rem; min-width: 0; }
.hq-inbox-last { font-size: .86rem; color: var(--ink, #1c2b24); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-inbox-last i { color: var(--soft); font-style: normal; }
.hq-inbox li.unread .hq-inbox-last { font-weight: 700; }
.hq-inbox li.unread { background: #f3faf6; }

/* Show/hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 3.1rem !important; }
.pw-eye { position: absolute; top: 50%; right: .45rem; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: inherit; opacity: .75; cursor: pointer; }
.pw-eye:hover, .pw-eye[aria-pressed=true] { opacity: 1; }
.pw-eye:focus-visible { outline: 2px solid var(--gold, #f5c518); outline-offset: 1px; }

/* ---- Events ---- */
.linklike { background: none; border: 0; padding: 0; color: var(--red, #c0392b); text-decoration: underline; cursor: pointer; font: inherit; }
.ev-empty { text-align: center; display: grid; justify-items: center; gap: .4rem; padding: 1.6rem 1.2rem; }
.ev-empty h2 { margin: 0; }
.ev-empty-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: #e3f6ea; color: #0d6b3a; }
.ev-card { display: flex; align-items: center; gap: .9rem; color: inherit; text-decoration: none; padding: .85rem 1rem; }
.ev-card .grow { display: grid; gap: .2rem; min-width: 0; }
.ev-date { flex-shrink: 0; width: 52px; height: 56px; border-radius: 14px; display: grid; place-content: center; text-align: center; background: linear-gradient(160deg, #0d6b3a, #073b21); color: #fff; box-shadow: 0 8px 16px -10px rgba(7,59,33,.8); line-height: 1; }
.ev-date b { font-size: 1.35rem; }
.ev-date span { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffd95e; margin-top: .2rem; }
.ev-date.big { width: 64px; height: 70px; border-radius: 18px; }
.ev-date.big b { font-size: 1.7rem; }
.ev-hero { display: flex; gap: .9rem; align-items: flex-start; }
.ev-hero h1 { margin: 0; line-height: 1.15; }
.ev-stats { grid-template-columns: repeat(3, 1fr); }
.ev-stats .stat b { font-size: 1rem; }
.ev-short b { color: var(--red, #c0392b); }
.ev-pay { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.ev-pay .grow { min-width: 0; }
.ev-money-row { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; }
.ev-money-row select, .ev-money-row input { min-width: 0; }
.ev-budget { padding: .8rem .9rem; }
.ev-brow { display: grid; grid-template-columns: 1fr 5.6rem 5.6rem; gap: .5rem; align-items: center; padding: .55rem .2rem; }
.ev-brow .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-brow small { display: block; color: var(--soft); font-size: .74rem; font-weight: 500; }
.ev-bhead { padding-top: 0; font-weight: 700; }
.ev-item { border-top: 1px solid #edf1ee; }
.ev-item summary { list-style: none; cursor: pointer; }
.ev-item summary::-webkit-details-marker { display: none; }
.ev-item[open] summary { background: #f3faf6; border-radius: 10px; }
.ev-todo { font-size: .78rem; font-weight: 800; color: #0d6b3a; background: #e3f6ea; padding: .15rem .5rem; border-radius: 20px; }
.ev-over { color: var(--red, #c0392b); font-weight: 700; }
.ev-edit { display: grid; gap: .55rem; padding: .6rem .2rem .9rem; }
.ev-edit label { display: grid; gap: .25rem; font-size: .8rem; font-weight: 700; }
.ev-btotal { border-top: 2px solid #d9e4dc; font-weight: 800; }
.ev-add, .ev-tadd-row { display: grid; grid-template-columns: 1fr 5.5rem auto; gap: .5rem; margin-top: .7rem; }
.ev-add input, .ev-tadd input, .ev-tadd select { min-width: 0; }
.ev-tadd { display: grid; gap: .5rem; margin-top: .4rem; }
.ev-tadd-row { grid-template-columns: 1fr 1fr auto; margin-top: 0; }
.ev-tasks { padding: .8rem .9rem; }
.ev-tlist { list-style: none; margin: 0; padding: 0; }
.ev-tlist li { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid #edf1ee; }
.ev-tlist li form { margin: 0; }
.ev-tlist .grow { display: grid; min-width: 0; }
.ev-tlist small { color: var(--soft); font-size: .78rem; }
.ev-tlist li.done b { text-decoration: line-through; color: var(--soft); font-weight: 600; }
.ev-tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #9fc3ad; background: #fff; display: grid; place-items: center; color: #fff; cursor: pointer; padding: 0; }
.ev-tlist li.done .ev-tick { background: #12864a; border-color: #12864a; }
.ev-x { background: none; border: 0; font-size: 1.3rem; line-height: 1; color: #9bb3a5; cursor: pointer; padding: .2rem .4rem; }
.ev-late { color: var(--red, #c0392b); font-weight: 700; }
.ev-when { display: grid; grid-template-columns: 1.4fr 1fr; gap: .7rem; }
.ev-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .4rem; }
.ev-actions form { margin: 0; display: grid; }
.ev-actions .btn { justify-content: center; }
.ev-home { display: flex; align-items: center; gap: .85rem; color: inherit; text-decoration: none; }
.ev-home .grow { display: grid; gap: .15rem; min-width: 0; }
.gold-ink { color: var(--gold-ink); }
.ev-stats .stat { padding: .7rem .6rem; }
.ev-stats .stat b { font-size: .95rem; white-space: nowrap; font-family: inherit; font-weight: 800; }
.ev-brow { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: .75rem; }
.ev-brow .num { min-width: 4.8rem; font-size: .88rem; }
.ev-tlist .grow { flex: 1; }
.ev-tadd input[type=text], .ev-add input[type=text] { width: 100%; }
.ev-when { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } .ev-when input { min-width: 0; }

/* Who's coming */
.ev-cadd { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin-top: .7rem; }
.ev-cadd input[name=name] { grid-column: 1 / -1; }
.ev-cadd input, .ev-cadd select { min-width: 0; }
.ev-clist { margin-top: .6rem; }
.ev-plus { display: inline-block; font-size: .72rem; font-weight: 800; padding: .05rem .4rem; border-radius: 20px; background: var(--gold-100); color: var(--gold-ink); vertical-align: 1px; }
.ev-clinks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.ev-hero-public { display: flex; gap: .9rem; align-items: flex-start; }
.ev-hero-public h1 { margin: 0; font-size: 1.35rem; }
.ev-reply .row b { font-size: 1.02rem; }
.ev-done { justify-items: center; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.ev-done-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--p-100); color: var(--p-700); }

/* New password checks, ticked as you type */
.pw-rules { list-style: none; margin: -.35rem 0 .1rem; padding: 0; display: grid; gap: .3rem; font-size: .84rem; }
.pw-rules li { display: flex; align-items: center; gap: .5rem; opacity: .72; }
.pw-rules li::before { content: ""; flex: none; width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; box-sizing: border-box; }
.pw-rules li.ok { opacity: 1; font-weight: 700; }
.pw-rules li.ok::before { content: "✓"; opacity: 1; border-color: #12864a; background: #12864a; color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }

/* Student page: actions at the top */
.profile-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .85rem 0 .3rem; }
.profile-actions form { margin: 0; display: grid; }
.profile-actions .btn { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .3rem; height: 100%; min-height: 4.1rem; padding: .7rem .35rem .55rem; font-size: .8rem; line-height: 1.15; text-align: center; white-space: normal; }
.profile-actions .btn svg { flex: none; }

/* "Are you sure?" pop-up, centred */
dialog.cfm { border: 0; padding: 0; margin: auto; width: min(92vw, 25rem); border-radius: 22px; background: #fff; color: var(--ink, #10231a); box-shadow: 0 30px 70px -20px rgba(4, 40, 22, .55); }
dialog.cfm::backdrop { background: rgba(6, 30, 18, .55); backdrop-filter: blur(2px); }
dialog.cfm[open] { animation: cfm-in .16s ease-out; }
@keyframes cfm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.cfm[open] { animation: none; } }
.cfm-box { padding: 1.4rem 1.3rem 1.2rem; display: grid; gap: .55rem; margin: 0; }
.cfm-box h2 { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.cfm-box p { margin: 0; color: var(--soft); font-size: .95rem; line-height: 1.5; }
.cfm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .7rem; }
.cfm-btns .btn { width: 100%; justify-content: center; }
.cfm-btns .btn-danger { background: var(--red); color: #fff; border-color: var(--red); }

/* A student who has left: hard to miss */
.pill.left-badge { background: var(--red); color: #fff; font-weight: 800; font-size: .8rem; padding: .25rem .7rem; letter-spacing: .02em; box-shadow: 0 4px 10px -4px rgba(200, 50, 50, .55); }
.badge.left-unpaid { background: #eef1ef; color: var(--soft); }
.balance-row b.left-unpaid { color: var(--soft); }

/* Button alignment pass (29 Oct) */
/* Report actions: even grid, never one button left alone on a line */
.report-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 34rem; }
.report-actions:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 23rem; }
.report-actions:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .report-actions:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 46rem; } }
.report-actions { align-items: stretch; }
.report-actions .btn { width: 100%; justify-content: center; white-space: nowrap; font-size: .8rem; padding-left: .4rem; padding-right: .4rem; gap: .35rem; }
/* From / To dates with the button underneath on phones, beside them on wider screens */
.date-filter { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; }
.date-filter .field { min-width: 0; margin: 0; }
.date-filter input { min-width: 0; width: 100%; }
.date-filter-go { grid-column: 1 / -1; justify-content: center; }
@media (min-width: 640px) { .date-filter { grid-template-columns: 1fr 1fr auto; } .date-filter-go { grid-column: auto; } }
/* HQ transactions: the three buttons get their own line */
.tx-filters > .row { grid-column: 1 / -1; }
/* Event money: choice on its own line, amount and Start below (phones) */
.ev-money-row { grid-template-columns: 1fr auto; }
.ev-money-row select { grid-column: 1 / -1; }
@media (min-width: 640px) { .ev-money-row { grid-template-columns: auto 1fr auto; } .ev-money-row select { grid-column: auto; } }
.tx-filters select, .tx-filters input[type=date] { height: 2.9rem; }

/* Home, groups without Forms: one ring per contribution when there are one or two */
.form-pay-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-pay-two .form-pay-ring b { text-align: center; line-height: 1.2; padding: 0 .3rem; }
.fp-solo { position: relative; display: flex; align-items: center; gap: 1rem; padding: .6rem .4rem .35rem; border-top: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.fp-solo:hover { background: rgba(255,255,255,.06); }
.fp-solo:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.fp-solo .ring { width: 84px; height: 84px; flex: none; }
.fp-solo-txt { display: grid; gap: .2rem; min-width: 0; }
.fp-solo-txt b { font-size: .95rem; line-height: 1.2; }
.fp-solo-amt { font-size: .78rem; color: #bfe6cf; font-weight: 700; }
.fp-solo-rows { display: grid; gap: .1rem; margin-top: .15rem; font-size: .76rem; font-weight: 700; color: #d5f0df; }
.fp-solo-rows span { display: inline-flex; align-items: center; gap: .4rem; }
.fp-solo-rows i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fp-solo-rows .g { background: #6ee7a0; } .fp-solo-rows .y { background: #ffcf33; } .fp-solo-rows .r { background: #ff8a80; }
/* One contribution: words on the left, ring on the right */
.fp-solo { justify-content: space-between; padding-left: .2rem; padding-right: .2rem; }
.fp-solo .ring { order: 2; }
.fp-solo .ring { width: 100px; height: 100px; }
.fp-solo { justify-content: center; gap: 2.2rem; }
@media (min-width: 640px) { .fp-solo { justify-content: space-around; gap: 1rem; } }
/* Contribution form: Forms in one even row */
.form-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr)); gap: .5rem; }
.form-picks .form-pick { margin: 0; justify-content: center; }
.form-picks .form-pick span { display: flex; width: 100%; justify-content: center; padding-left: .6rem; padding-right: .6rem; }
.form-picks { max-width: 30rem; }
/* Contribution page buttons: same as every outline button (see .btn-ghost), a little taller */
.manage-bar .btn, .share-pair .btn { min-height: 44px; }

/* Page links for long lists (HQ and anywhere ->links() is used) */
nav.pager { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: .6rem 0; }
.pager-btn { display: inline-flex; align-items: center; min-height: 40px; padding: .45rem 1rem; border-radius: 999px; border: 1.5px solid #cfe0d5; background: #fff; color: var(--p-700); font-weight: 800; font-size: .85rem; text-decoration: none; box-shadow: 0 1px 2px rgba(7,59,33,.08); }
.pager-btn:hover { border-color: var(--p-500); background: #f6fbf8; }
.pager-btn.off { color: #a9b8af; background: transparent; box-shadow: none; cursor: default; }
.pager-info { font-size: .85rem; font-weight: 700; color: var(--soft); }

/* =================== HQ: glass look (30 Oct) =================== */
body.hq-g {
  --card: rgba(255,255,255,.065); --ink: #f3fbf6; --soft: #a9c9b8; --rule: rgba(255,255,255,.12); --paper: transparent;
  --p-900: #f3fbf6; --p-700: #8be3b2; --p-600: #8be3b2; --p-500: #5fd796; --p-100: rgba(61,220,132,.16);
  --red: #ff9b91; --red-100: rgba(255,122,110,.16); --gold-100: rgba(245,197,66,.16); --gold-ink: #ffd76a;
  --hg-glass: rgba(255,255,255,.065); --hg-edge: rgba(255,255,255,.13); --hg-t3: #8fb3a0;
  color: var(--ink); color-scheme: dark; min-height: 100vh;
  background: radial-gradient(900px 600px at 12% -10%, rgba(245,197,66,.18), transparent 60%),
              radial-gradient(800px 700px at 105% 10%, rgba(61,220,132,.16), transparent 60%),
              radial-gradient(900px 700px at 50% 120%, rgba(20,140,85,.32), transparent 60%),
              linear-gradient(160deg, #06291b, #04170f 60%, #031109);
  background-color: #031109;
}
html:has(body.hq-g) { background: #031109; }
.hq-g a { color: var(--p-700); }
.hq-g h1 { font-family: var(--font); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.hq-g .muted, .hq-g .hint { color: var(--soft); }
.hq-g .card, .hq-g .stat, .hqg-glass {
  background: var(--hg-glass); border: 1px solid var(--hg-edge); border-radius: 22px;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 20px 40px -26px rgba(0,0,0,.65);
}
.hq-g .stat b { font-family: var(--font); color: var(--ink); }
/* Shell */
.hqg-shell { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; padding: 18px; min-height: 100vh; }
.hqg-rail { position: sticky; top: 18px; height: calc(100vh - 36px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0; border-radius: 28px;
  background: rgba(255,255,255,.06); border: 1px solid var(--hg-edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 30; }
.hqg-logo { margin-bottom: 8px; } .hqg-logo img { display: block; width: 44px; height: 44px; }
.hqg-ri { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #b9d6c6 !important; text-decoration: none; background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.hqg-ri:hover { background: rgba(255,255,255,.09); color: #fff !important; }
.hqg-ri.on { background: #fff; color: #06291b !important; box-shadow: 0 6px 18px -6px rgba(255,255,255,.5); }
.hqg-tip { display: none; }
.hqg-hover { position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); white-space: nowrap; pointer-events: none; opacity: 0;
  background: #fff; color: #06291b; font-size: .8rem; font-weight: 800; padding: .42rem .75rem; border-radius: 10px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); transition: opacity .12s, transform .12s; }
.hqg-hover::before { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; background: #fff; transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
.hqg-ri:hover .hqg-hover, .hqg-ri:focus-visible .hqg-hover { opacity: 1; transform: translate(0, -50%); }
.hqg-n { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #f5c542; color: #3b2a00; font: 800 10px/17px var(--font); font-style: normal; text-align: center; }
.hqg-n.live { background: #3ddc84; color: #04170f; }
.hqg-gap { flex: 1; }
.hqg-foot { margin: 0; }
.hqg-body { min-width: 0; }
.hqg-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.hqg-crumb { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 99px !important; text-decoration: none; color: var(--ink) !important; min-width: 0; }
.hqg-crumb img { width: 32px; height: 32px; flex: none; }
.hqg-crumb b { display: block; font-size: .84rem; line-height: 1.2; } .hqg-crumb small { display: block; font-size: .7rem; color: var(--hg-t3); line-height: 1.2; }
.hqg-crumb-pg { font-size: .84rem; font-weight: 700; color: #d7ecdf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.hqg-search { flex: 1; max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 99px !important; color: var(--hg-t3); }
.hqg-search input { border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; padding: .78rem 0 !important; width: 100%; font: inherit; font-size: .88rem; color: var(--ink); min-height: 0; }
.hqg-search input::placeholder { color: var(--hg-t3); }
.hqg-search:focus-within { border-color: rgba(245,197,66,.6); }
.hqg-btn-gold, .hq-g .btn-primary, .hq-g .btn-gold { background: linear-gradient(180deg, #ffd76a, #e9a90c); color: #2e2100 !important; border: 0; box-shadow: 0 10px 24px -12px rgba(245,197,66,.85); }
.hq-g .btn-primary:hover, .hqg-btn-gold:hover { background: linear-gradient(180deg, #ffe08a, #f0b41c); }
.hqg-btn-gold { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.1rem; border-radius: 99px; font-weight: 800; font-size: .86rem; text-decoration: none; white-space: nowrap; }
.hqg-clock { padding: .45rem .95rem; border-radius: 99px !important; text-align: center; line-height: 1.15; white-space: nowrap; }
.hqg-clock b { display: block; font-size: .84rem; } .hqg-clock small { font-size: .66rem; color: var(--hg-t3); }
.hqg-round { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50% !important; display: grid; place-items: center; color: var(--ink) !important; text-decoration: none; }
.hqg-ping { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ff7a6e; color: #fff; font-style: normal; font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
.hqg-av { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .84rem; color: #2e2100; background: linear-gradient(140deg, #ffd76a, #e9a90c); }
.hq-g.hq2 .hq-main { max-width: none; padding: 0 0 3rem; }
/* Common pieces on the dark glass */
.hq-g .btn-ghost { background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid rgba(255,255,255,.18); box-shadow: none; }
.hq-g .btn-ghost:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.hq-g .btn-danger { background: rgba(255,122,110,.12); color: #ffb1a9; border: 1px solid rgba(255,122,110,.45); box-shadow: none; }
.hq-g .btn-danger:hover { background: rgba(255,122,110,.22); border-color: #ff7a6e; }
.hq-g .btn-sm, .hq-g .btn { border-radius: 99px; }
.hq-g input[type=text], .hq-g input[type=search], .hq-g textarea, .hq-g input[type=email], .hq-g input[type=password], .hq-g input[type=tel],
.hq-g input[type=date], .hq-g input[type=time], .hq-g input[type=number], .hq-g select {
  background: rgba(255,255,255,.07); color: var(--ink); border: 1px solid rgba(255,255,255,.18); }
.hq-g input::placeholder, .hq-g textarea::placeholder { color: var(--hg-t3); }
.hq-g select option { background: #0a2a1c; color: #f3fbf6; }
.hq-g input:focus, .hq-g select:focus, .hq-g textarea:focus { border-color: rgba(245,197,66,.7); box-shadow: 0 0 0 3px rgba(245,197,66,.18); }
.hq-g .pill { background: rgba(61,220,132,.16); color: #9ff5c4; }
.hq-g .pill.gold { background: rgba(245,197,66,.18); color: #ffd76a; }
.hq-g .pill.grey { background: rgba(255,255,255,.1); color: #c9ddd2; }
.hq-g .pill.red { background: rgba(255,122,110,.18); color: #ffb1a9; }
.hq-g .flash.ok { background: rgba(61,220,132,.16); color: #b6f7d2; border: 1px solid rgba(61,220,132,.3); }
.hq-g .flash.bad { background: rgba(255,122,110,.16); color: #ffc2bb; border: 1px solid rgba(255,122,110,.35); }
.hq-g .notice { background: rgba(245,197,66,.14); color: #ffe39a; border: 1px solid rgba(245,197,66,.35); }
.hq-g .seg span { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: var(--ink); }
.hq-g .seg input:checked + span { background: rgba(245,197,66,.2); border-color: rgba(245,197,66,.6); color: #ffe39a; }
.hq-g .sec::before { box-shadow: 0 0 0 3px rgba(255,207,51,.2); }
.hq-g table th { color: var(--hg-t3); }
.hq-g table td, .hq-g table th { border-color: rgba(255,255,255,.09); }
.hq-g hr { border-color: rgba(255,255,255,.1); }
.hq-g .list li { border-top-color: rgba(255,255,255,.09); }
.hq-g .check input, .hq-g .check-line input { accent-color: #f5c542; }
.hq-g code { background: rgba(255,255,255,.09); color: #e6f6ec; }
/* Phones and small screens */
@media (max-width: 900px) {
  .hqg-shell { grid-template-columns: minmax(0, 1fr); align-content: start; padding: 12px; gap: 12px; }
  .hqg-rail { position: static; height: auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 4px; padding: 10px 8px; border-radius: 22px; justify-items: stretch; }
  .hqg-logo, .hqg-gap, .hqg-foot, .hqg-ri.hqg-foot, .hqg-hover { display: none; }
  .hqg-ri { width: 100%; height: auto; border-radius: 14px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: .64rem; font-weight: 700; }
  .hqg-tip { display: block; text-align: center; line-height: 1.1; }
  .hqg-n { right: 14%; }
  .hqg-top { gap: 8px; margin-bottom: 12px; }
  .hqg-search, .hqg-clock, .hqg-newmsg, .hqg-crumb-pg { display: none; }
  .hqg-crumb { flex: 1; }
}
@media (min-width: 901px) and (max-width: 1240px) { .hqg-clock, .hqg-crumb small { display: none; } .hqg-newmsg { padding: .7rem .9rem; } }
/* HQ Overview (glass) */
.hqo-notice { margin-bottom: 14px; }
.hqo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 2px 0 16px; }
.hqo-head h1 { font-size: 1.75rem; margin: 0; } .hqo-head p { margin-top: .3rem; font-size: .88rem; }
.hqo-acts { display: flex; align-items: center; gap: 10px; }
.hqo-month { padding: .62rem 1rem; border-radius: 99px; font-weight: 700; font-size: .84rem; background: var(--hg-glass); border: 1px solid var(--hg-edge); white-space: nowrap; }
.hqo-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.hq-g .hqo-stat { display: flex; flex-direction: column; min-height: 150px; padding: 18px; color: var(--ink); text-decoration: none; transition: transform .15s; }
.hq-g .hqo-stat:hover { transform: translateY(-2px); }
.hqo-lbl { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; font-weight: 600; color: #b9d6c6; }
.hqo-go { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff !important; }
.hqo-go.big { width: 40px; height: 40px; }
.hqo-num { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hqo-num b { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; color: var(--ink); line-height: 1.1; }
.hqo-num b.hqo-green { color: #8be3b2; }
.hqo-chg { font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 99px; background: rgba(61,220,132,.16); color: #8af2bd; white-space: nowrap; }
.hqo-chg.bad { background: rgba(255,122,110,.16); color: #ffb1a9; }
.hqo-stat small { display: block; margin-top: 6px; font-size: .76rem; color: var(--hg-t3); }
.hq-g .hqo-stat.hot { background: linear-gradient(150deg, rgba(255,215,106,.55), rgba(233,169,12,.22) 55%, rgba(233,169,12,.10)); border-color: rgba(255,215,106,.45); }
.hqo-stat.hot .hqo-lbl, .hqo-stat.hot small { color: #fff3cf; }
.hqo-stat.hot .hqo-go { background: #fff; color: #2e2100 !important; }
.hqo-stat.hot .hqo-chg { background: rgba(255,255,255,.22); color: #fff; }
.hqo-g2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.hq-g .hqo-g2 .card, .hq-g .hqo-g3 .card { padding: 18px; }
.hqo-g2 h2, .hqo-g3 h2 { font-size: 1rem; font-weight: 800; }
.hqo-sub { margin: .2rem 0 0; font-size: .76rem; color: var(--hg-t3); }
.hqo-ch { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hq-g .hqo-rev { display: flex; flex-direction: column; }
.hqo-bars { display: flex; align-items: flex-end; gap: 12px; flex: 1; min-height: 190px; height: 190px; margin-top: 34px; padding: 0 2px; background: repeating-linear-gradient(to top, rgba(255,255,255,.07) 0 1px, transparent 1px 47.5px); }
.hqo-bar { position: relative; flex: 1; border-radius: 10px 10px 6px 6px; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.08)); border: 1px solid rgba(255,255,255,.2); }
.hqo-bar.on { background: linear-gradient(180deg, #ffd76a, rgba(233,169,12,.35)); border-color: rgba(255,215,106,.7); }
.hqo-bar i { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fff; color: #06291b; font-size: .7rem; font-weight: 800; font-style: normal; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.hqo-x { display: flex; gap: 12px; margin-top: 8px; } .hqo-x span { flex: 1; text-align: center; font-size: .72rem; color: var(--hg-t3); }
.hqo-ring { display: flex; align-items: center; gap: 18px; margin: 18px 0 12px; }
.hqo-bign { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; } .hqo-bign span { font-size: 1rem; font-weight: 600; color: #b9d6c6; margin-left: 5px; }
.hqo-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hqo-mini span { text-align: center; padding: 10px 4px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: .72rem; color: var(--hg-t3); }
.hqo-mini b { display: block; font-size: 1.1rem; color: var(--ink); }
.hqo-attn-list { margin-top: 6px; }
.hqo-attn-list a { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.08); color: var(--ink); text-decoration: none; }
.hqo-attn-list a:first-child { border-top: 0; }
.hqo-attn-list b { display: block; font-size: .88rem; }
.hqo-attn-list .grow span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .76rem; color: var(--hg-t3); line-height: 1.35; }
.hqo-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: rgba(245,197,66,.2); color: #f5c542; }
.hqo-dot.bad { background: rgba(255,122,110,.2); color: #ffa79e; } .hqo-dot.ok { background: rgba(61,220,132,.18); color: #7af0b0; }
.hqo-ar { margin-left: auto; color: var(--hg-t3); }
.hqo-more { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: .6rem .9rem; border-radius: 12px; background: rgba(255,255,255,.07); color: var(--ink) !important; font-weight: 700; font-size: .84rem; text-decoration: none; }
.hqo-more:hover { background: rgba(255,255,255,.12); }
.hqo-g3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hqo-perf { display: block; margin-top: 14px; color: var(--ink) !important; text-decoration: none; }
.hqo-perf-row { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 7px; }
.hqo-perf-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hqo-perf-row b { color: #f5c542; white-space: nowrap; }
.hqo-track { display: block; height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.hqo-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3ddc84, #f5c542); }
.hqo-empty { margin-top: 12px; }
.hqo-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .84rem; }
.hqo-table th { text-align: left; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 8px 6px; }
.hqo-table td { padding: 10px 6px; border-top: 1px solid rgba(255,255,255,.08); vertical-align: middle; }
.hqo-table td small { display: block; color: var(--hg-t3); font-size: .72rem; }
.hqo-table .num { text-align: right; }
.hqo-amt { display: inline-block; padding: 4px 9px; border-radius: 99px; background: rgba(61,220,132,.14); color: #9ff5c4; font-weight: 800; font-size: .76rem; white-space: nowrap; }
.hqo-amt.neg { background: rgba(255,122,110,.16); color: #ffb1a9; }
.hqo-feed { list-style: none; margin: 10px 0 0; padding: 0; }
.hqo-feed li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: .86rem; }
.hqo-feed li:first-child { border-top: 0; }
.hqo-feed span { display: block; font-size: .74rem; color: var(--hg-t3); }
@media (max-width: 1240px) {
  .hqo-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hqo-g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hqo-rev { grid-column: 1 / -1; }
  .hqo-g3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hqo-tx { grid-column: 1 / -1; order: 3; }
}
/* Phones: three numbers, the chart, what needs attention, top 3 groups */
@media (max-width: 700px) {
  .hqo-head { margin-bottom: 12px; } .hqo-head p, .hqo-acts { display: none; } .hqo-head h1 { font-size: 1.3rem; }
  .hqo-g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .hqo-groups { display: none !important; }
  .hq-g .hqo-stat { min-height: 0; padding: 12px 11px; border-radius: 18px; }
  .hqo-go, .hqo-chg { display: none !important; }
  .hqo-lbl { font-size: .68rem; line-height: 1.2; }
  .hqo-num { margin-top: 10px; } .hqo-num b { font-size: 1rem; }
  .hqo-stat small { font-size: .64rem; margin-top: 3px; }
  .hqo-g2, .hqo-g3 { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
  .hqo-ready, .hqo-tx, .hqo-act { display: none !important; }
  .hq-g .hqo-g2 .card, .hq-g .hqo-g3 .card { padding: 15px; border-radius: 20px; }
  .hqo-bars { height: 110px; min-height: 110px; flex: none; gap: 7px; margin-top: 16px; background-size: 100% 27.5px; } .hqo-bar i { display: none; } .hqo-x { gap: 7px; }
  .hqo-attn-list a:nth-child(n+4) { display: none; }
  .hqo-attn-list .grow span { -webkit-line-clamp: 1; }
  .hqo-perf:nth-of-type(n+4) { display: none; }
}
.hq-g .hqo-ready { display: flex; flex-direction: column; } .hqo-ready .hqo-ring { margin: auto 0; padding: 14px 0; }
.hq-g .badge.grey { background: rgba(255,255,255,.1); color: #c9ddd2; }
.hq-g .seg-links { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.hq-g .seg-links a { color: #c9ddd2; }
.hq-g .seg-links a.on { background: #fff; color: #06291b; }
.hq-g .pager-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: var(--ink); box-shadow: none; }
.hq-g .pager-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.hq-g .pager-btn.off { background: transparent; color: rgba(255,255,255,.3); }
.hq-g .pager-info { color: var(--soft); }
.hq-g .check { flex-wrap: nowrap; align-items: flex-start; } .hq-g .check input { flex: none; width: 18px; height: 18px; margin: .15rem 0 0; }

/* HQ: three-line button opens and hides the menu */
.hqg-burger { cursor: pointer; padding: 0; font: inherit; }
.hqg-scrim { display: none; }
@media (min-width: 901px) {
  body.hqg-wide .hqg-shell { grid-template-columns: 220px minmax(0, 1fr); }
  body.hqg-wide .hqg-rail { align-items: stretch; padding: 14px 12px; }
  body.hqg-wide .hqg-logo { align-self: flex-start; margin-left: 4px; }
  body.hqg-wide .hqg-ri { width: 100%; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 12px; font-size: .9rem; font-weight: 700; }
  body.hqg-wide .hqg-hover { position: static; opacity: 1; transform: none; background: none; color: inherit; padding: 0; box-shadow: none; font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.hqg-wide .hqg-hover::before { display: none; }
  body.hqg-wide .hqg-n { position: static; margin-left: auto; }
  body.hqg-wide .hqg-ri.on { box-shadow: none; }
}
@media (max-width: 900px) {
  .hqg-rail { position: fixed; top: 68px; left: 12px; right: 12px; z-index: 60; background: rgba(6,41,27,.94); box-shadow: 0 24px 48px -16px rgba(0,0,0,.8);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .15s, transform .15s, visibility .15s; }
  body.hqg-open .hqg-rail { opacity: 1; visibility: visible; transform: none; }
  .hqg-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
  body.hqg-open .hqg-scrim { opacity: 1; visibility: visible; }
  body.hqg-open .hqg-burger { background: #fff; color: #06291b !important; }
  .hqg-ri.hqg-foot { display: flex; }
  .hqg-rail form.hqg-foot { display: contents; }
}
@media (max-width: 900px) {
  .hqg-burger { position: relative; z-index: 70; }
  .hqg-crumb small { display: none; } .hqg-crumb b { font-size: .9rem; white-space: nowrap; }
  .hqg-crumb { padding: 5px 14px 5px 5px; }
  .hqg-round, .hqg-av { width: 42px; height: 42px; }
}

/* HQ glass: the "Are you sure?" pop-up in the same dark glass */
body.hq-g dialog.cfm { background: rgba(10, 40, 26, .92); color: #f3fbf6; border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.hq-g dialog.cfm::backdrop { background: rgba(2, 14, 8, .6); }
body.hq-g .cfm-box h2 { color: #fff; }
body.hq-g .cfm-box p { color: #c3dccf; }
body.hq-g .cfm-btns .btn-danger { background: #d9534f; border-color: #d9534f; color: #fff; }

/* HQ glass: chat bubbles (Inbox, Messages) */
body.hq-g .chat-day span { background: rgba(255,255,255,.08); color: #c3dccf; }
body.hq-g .chat-bubble { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #f3fbf6; box-shadow: none; }
body.hq-g .chat-row.mine .chat-bubble { background: rgba(61,220,132,.16); border-color: rgba(61,220,132,.3); }
body.hq-g .chat-bubble.is-msg { background: rgba(245,197,66,.12); border-color: rgba(245,197,66,.32); }
body.hq-g .chat-bubble.is-fb { background: rgba(160,140,255,.14); border-color: rgba(160,140,255,.32); }
body.hq-g .chat-tag { color: #ffd76a; }
body.hq-g .chat-re { color: #c3dccf; border-left-color: rgba(245,197,66,.5); }
body.hq-g .chat-meta { color: #a9c9b8; }
body.hq-g .hq-av { color: #1d2a12; }

/* Home: Messages button in the top bar, with a count of new messages */
.head-msg { position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.28); text-decoration: none; }
.head-msg em { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #1d2a12; font-style: normal; font-size: .7rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #0d5a33; }
@media (max-width: 480px) {
  .apphead-row:has(.head-msg) { gap: .4rem; }
  .apphead-row:has(.head-msg) .head-btn-label { padding: 0 .6rem; }
}

/* Top bar buttons (Search, Messages, Sign out): yellow icons and words */
.apphead .head-search, .apphead .head-msg, .apphead #signout-btn { color: var(--gold); }
.apphead .head-search span { opacity: 1; }
.apphead .head-msg em { background: #d64541; color: #fff; box-shadow: 0 0 0 2px #0d5a33; }

/* Payment list: Form buttons (All · Form 1 · Form 2 · Form 3), clear to see */
.form-switch { display: flex; gap: .5rem; width: 100%; margin: .2rem 0 .7rem; padding: 0; background: none; flex-wrap: wrap; }
.form-switch a { flex: 1 1 4.5rem; text-align: center; padding: .7rem .6rem; border-radius: 12px; background: #fff; border: 1.5px solid var(--p-600, #128a4a); color: var(--p-700); font-size: .92rem; font-weight: 800; box-shadow: 0 4px 12px -8px rgba(7,59,33,.35); }
.form-switch a.on { background: var(--p-700); border-color: var(--p-700); color: #fff; box-shadow: 0 6px 16px -8px rgba(7,59,33,.6); }
/* Three report buttons on a phone: Print and Save PDF side by side, WhatsApp full width below */
@media (max-width: 480px) {
  .report-actions:has(> .btn-wa):not(:has(> :nth-child(4))) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .report-actions:has(> .btn-wa):not(:has(> :nth-child(4))) > .btn-wa { grid-column: 1 / -1; }
}

/* HQ glass: table rows on hover stay dark and readable */
body.hq-g .hq-table tr.click:hover td, body.hq-g .hq-table tbody tr:hover td { background: rgba(255,255,255,.07); }

/* Payment records (simplified) */
.rec-pick .form-switch { margin: .2rem 0 0; }
.form-switch a { text-decoration: none; }
.rec-total { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.rec-total b { font-family: var(--font-head, Georgia, serif); font-size: 1.6rem; color: var(--p-900); }
.rec-total span { color: var(--soft); font-size: .92rem; }
.rec-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.rec-acts .btn { width: 100%; justify-content: center; min-height: 44px; font-size: .86rem; padding-left: .3rem; padding-right: .3rem; gap: .35rem; white-space: nowrap; }
.rec-c { padding: 0; overflow: hidden; }
.rec-c-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .85rem 1rem; background: var(--p-100); }
.rec-c-head a { font-weight: 800; color: var(--p-900); text-decoration: none; }
.rec-c-head small { display: block; color: var(--soft); font-size: .78rem; font-weight: 600; }
.rec-c-head b { color: var(--p-700); white-space: nowrap; }
.rec-cls { padding: .6rem 1rem .25rem; font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-ink); }
.rec-stu { border-top: 1px solid var(--rule); display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; }
.rec-n { color: var(--soft); width: 1.5rem; font-size: .85rem; flex-shrink: 0; }
.rec-name { flex: 1; font-weight: 650; min-width: 0; }
.rec-name small { display: block; font-weight: 500; color: var(--soft); font-size: .78rem; }
.rec-tag { display: inline-block; margin-left: .35rem; font-size: .68rem; font-weight: 800; padding: .05rem .45rem; border-radius: 999px; background: #eef0ef; color: #4f5c55; vertical-align: middle; }
.rec-tag.gold { background: var(--gold-100); color: var(--gold-ink); }
.rec-amt { white-space: nowrap; }
.rec-amt.struck { text-decoration: line-through; color: var(--soft); font-weight: 600; }
@media print { .rec-stu { padding: .3rem 0; } .rec-c { box-shadow: none; } }
