:root {
  --bg: #f5f7f4; --surface: #ffffff; --surface-2: #f0f4ef; --border: #e1e7df;
  --text: #1d2b24; --muted: #66756d; --brand: #2f7d55; --brand-600: #256845; --brand-50: #e8f3ec;
  --accent: #e2a03f; --danger: #c2413b; --info: #3b6fb6; --staff: #7a4fb5;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,40,30,.05), 0 4px 16px rgba(20,40,30,.05);
  --sidebar: 248px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.nav-toggle { display: none; }
.sidebar { width: var(--sidebar); background: #173a2a; color: #d6e6dc; position: fixed; inset: 0 auto 0 0; overflow-y: auto; padding: 18px 12px; z-index: 30; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; padding: 4px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; color: #9fbfab; font-size: .78rem; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; flex: none; }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-mark.lg { width: 48px; height: 48px; border-radius: 14px; }
.brand-mark.lg .icon { width: 26px; height: 26px; }
.nav-section { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; color: #87a993; padding: 16px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #d6e6dc; font-size: .93rem; }
.nav-link:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav-link.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; }
.nav-link .badge { margin-left: auto; background: var(--accent); color: #2b1d05; border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(245,247,244,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.page-title { font-size: 1.2rem; margin: 0; flex: 1; }
.menu-btn { display: none; cursor: pointer; padding: 6px; border-radius: 8px; }
.topbar-user { display: flex; align-items: center; gap: 6px; }
.topbar-user form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--text); padding: 4px 8px; border-radius: 99px; }
.user-chip:hover { background: var(--surface-2); text-decoration: none; }
.user-meta strong { display: block; font-size: .88rem; line-height: 1.1; }
.user-meta small { color: var(--muted); text-transform: capitalize; font-size: .75rem; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-weight: 700; font-size: .8rem; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.content { padding: 24px 28px 48px; max-width: 1280px; width: 100%; }
.scrim { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .nav-toggle:checked ~ .shell .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .nav-toggle:checked ~ .shell .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 25; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 40px; }
  .user-meta { display: none; }
}

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card.narrow { max-width: 720px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 40px 20px; }
.sticky { position: sticky; top: 80px; }

.grid-main { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-main > .col { min-width: 0; }
.grid-main > .col.wide { grid-column: span 1; }
.grid-main:has(> .col.wide) { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.grid-main > section.card.col { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1050px) { .grid-main, .grid-main:has(> .col.wide) { grid-template-columns: 1fr; } .sticky { position: static; } }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row form { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .btn { align-self: flex-start; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar form { margin: 0; }

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
label.check, label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.inline input { width: 90px; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); background: #fff; border: 1px solid #cfd8cc; border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); padding: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.toolbar input[type=search], .toolbar select { width: auto; }
.search { margin-bottom: 16px; }
.search input { padding: 11px 14px; border-radius: 10px; }
.row-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row-form label { flex: 1; min-width: 140px; }
.filters { align-items: flex-end; }
.filters label { min-width: 150px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .9rem; border-radius: 9px; padding: 9px 16px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: var(--brand-50); color: var(--brand-600); }
.btn-secondary:hover { background: #d8ebdf; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: rgba(255,255,255,.95); color: var(--brand-600); }
.btn-light:hover { background: #fff; }
.btn-sm { padding: 5px 11px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn.danger, .link-btn.danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--brand-600); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
td.actions { white-space: nowrap; }
td.actions > * { display: inline-block; margin: 0 6px 0 0; }
td.actions form { display: inline; }

.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; transition: opacity .6s; }
.alert-success { background: #e5f4ea; color: #1e5e3c; border: 1px solid #c4e3cf; }
.alert-error { background: #fbeaea; color: #8a2621; border: 1px solid #f1caca; }
.alert.fade { opacity: 0; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.pill.lg { font-size: .88rem; padding: 6px 12px; }
.pill .icon { width: 14px; height: 14px; }
.pill-approved, .pill-active { background: #e2f3e8; color: #1e6b41; }
.pill-pending { background: #fdf1dc; color: #8a5a10; }
.pill-rejected, .pill-inactive { background: #f9e6e5; color: #9b2f29; }
.pill-staff, .pill-role-staff { background: #efe8f8; color: var(--staff); }
.pill-role-admin { background: #e5edf8; color: var(--info); }
.pill-role-volunteer { background: var(--brand-50); color: var(--brand-600); }
.pill-open { background: #e5edf8; color: var(--info); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.seg a { padding: 5px 12px; border-radius: 7px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 8px; border-bottom: 1px solid #eef2ec; vertical-align: top; }
.table tbody tr:hover { background: #fafcf9; }
.table.compact td { padding: 7px 4px; }
.table tfoot th { font-size: .9rem; color: var(--text); border-top: 2px solid var(--border); border-bottom: 0; }
.note { color: #8a5a10; }

/* ---------- Dashboard ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, #2f7d55, #3f9a6b 60%, #6bb58a); color: #fff; border-radius: 16px; padding: 26px 28px; margin-bottom: 20px; box-shadow: var(--shadow); }
.hero h2 { font-size: 1.5rem; }
.hero p { margin: 0; opacity: .92; max-width: 60ch; }
.hero-staff { background: linear-gradient(120deg, #3c2f6b, #5a46a0 60%, #7b67c2); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--text); }
a.stat:hover { text-decoration: none; border-color: #c9d8cd; }
.stat b { display: block; font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); flex: none; }
.stat-icon.warn { background: #fdf1dc; color: #a56b12; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stats, .stats-3 { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 12px; } .stat-icon { display: none; } }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li + li { border-top: 1px solid #eef2ec; }
.event-list a { display: flex; align-items: center; gap: 14px; padding: 10px 4px; color: var(--text); }
.event-list a:hover { text-decoration: none; background: #fafcf9; }
.event-list strong { display: block; }
.event-list small { color: var(--muted); display: block; }
.date-badge { display: grid; place-items: center; width: 46px; height: 50px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); flex: none; line-height: 1.05; }
.date-badge b { font-size: 1.2rem; }
.date-badge small { font-size: .7rem; text-transform: uppercase; font-weight: 700; color: var(--brand-600) !important; }
.date-badge.lg { width: 64px; height: 70px; }
.date-badge.lg b { font-size: 1.6rem; }

.news { padding: 10px 0; }
.news + .news { border-top: 1px solid #eef2ec; }
.news h4 { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.news p { margin: 0 0 4px; color: #3c4a42; }
.pin { color: var(--accent); display: inline-flex; }
.pin .icon { width: 16px; height: 16px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prose { white-space: pre-line; margin-bottom: 12px; }
.news-card.pinned { border-left: 4px solid var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.tile { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-weight: 600; font-size: .9rem; background: #fbfcfa; }
.tile:hover { border-color: var(--brand); background: var(--brand-50); text-decoration: none; }
.tile .icon { color: var(--brand); margin-top: 2px; }
.tile small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.group-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px; }

/* ---------- Calendar ---------- */
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav h2 { margin: 0 6px; min-width: 170px; text-align: center; }
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 10px; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); text-align: center; }
.cal-day { min-height: 112px; border-right: 1px solid #eef2ec; border-bottom: 1px solid #eef2ec; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #fafbf9; }
.cal-day.out .cal-num { color: #b5c0b8; }
.cal-num { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; font-weight: 700; color: var(--muted); padding: 0 2px 2px; }
.cal-day.today .cal-num { color: var(--brand); }
.cal-day.today { background: #f5fbf7; }
.cal-add { opacity: 0; color: var(--muted); display: inline-flex; }
.cal-add .icon { width: 15px; height: 15px; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-event { display: block; font-size: .76rem; padding: 3px 6px; border-radius: 6px; background: #e5edf8; color: #234a80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--info); }
.cal-event:hover { text-decoration: none; filter: brightness(.96); }
.cal-event span { font-weight: 700; }
.cal-event.mine { background: #e2f3e8; color: #1e5e3c; border-left-color: var(--brand); }
.cal-event.staff { background: #efe8f8; color: #4e2f80; border-left-color: var(--staff); }
.cal-event.full { opacity: .6; }
.legend { display: flex; gap: 14px; align-items: center; padding: 10px 14px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--info); display: inline-block; margin-right: -8px; }
.lg-dot.mine { background: var(--brand); } .lg-dot.staff { background: var(--staff); } .lg-dot.full { background: #b9c2bc; }
@media (max-width: 700px) {
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-event { font-size: 0; padding: 0; height: 6px; border-left-width: 0; background: var(--info); }
  .cal-event.mine { background: var(--brand); }
  .cal-event.staff { background: var(--staff); }
  .cal-head span { padding: 6px 0; font-size: .65rem; }
  .month-nav h2 { min-width: 0; font-size: 1.1rem; }
}

.event-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 12px; }
.event-hero p { margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.attendance-bar, .approval-bar { margin-top: 14px; }
.approval-bar input { min-width: 220px; }

/* ---------- People & docs ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.person { text-align: center; margin: 0; }
.person .avatar { margin-bottom: 10px; }
.person-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.person-head h2 { margin: 0; }
.person-head p { margin: 0; text-transform: capitalize; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0 0 14px; }
.dl dt { color: var(--muted); font-size: .85rem; }
.dl dd { margin: 0; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: .7rem; font-weight: 800; background: #f1f1f1; color: #b2b2b2; margin-right: 4px; }
.tick.ok { background: #e2f3e8; color: #1e6b41; }
.doc-list, .team-list { list-style: none; margin: 0; padding: 0; }
.doc-list li, .team-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.doc-list li + li, .team-list li + li { border-top: 1px solid #eef2ec; }
.doc-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); color: var(--brand-600); flex: none; }
.team-list strong { display: block; font-size: .92rem; }
.quick-post { margin-top: 12px; }
.quick-post summary { cursor: pointer; font-weight: 600; color: var(--brand-600); margin-bottom: 10px; }

/* ---------- Reports ---------- */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; font-size: .86rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--brand); border-radius: 6px; min-width: 2px; }
.bar.alt { background: var(--accent); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Auth ---------- */
.auth-body { background: radial-gradient(circle at 20% 0%, #dff0e5, transparent 50%), radial-gradient(circle at 100% 100%, #f6ead3, transparent 45%), var(--bg); }
.auth-wrap { max-width: 520px; margin: 0 auto; padding: 48px 16px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; justify-content: center; }
.auth-brand strong { display: block; font-size: 1.2rem; }
.auth-brand small { color: var(--muted); }
.auth-card { padding: 28px; }
.auth-alt { text-align: center; margin: 16px 0 0; }

/* ---------- Statement / print ---------- */
.print-body { background: #fff; }
.print-bar { display: flex; justify-content: space-between; max-width: 820px; margin: 20px auto 0; padding: 0 16px; }
.statement { max-width: 820px; margin: 0 auto; padding: 32px 16px; }
.statement header { display: flex; gap: 16px; align-items: center; border-bottom: 2px solid var(--brand); padding-bottom: 16px; margin-bottom: 24px; }
.statement h1 { font-size: 1.5rem; margin: 0; }
.statement header p { margin: 0; color: var(--muted); }
.sig { display: flex; gap: 40px; margin: 56px 0 24px; }
.sig div { flex: 1; font-size: .85rem; color: var(--muted); }
.sig span { display: block; border-bottom: 1px solid #333; height: 36px; margin-bottom: 4px; }
@media print {
  .no-print { display: none !important; }
  .statement { padding: 0; }
  .table tbody tr:hover { background: none; }
}
.grid-main > .col > .card:last-child { margin-bottom: 0; }
.grid-main { margin-bottom: 20px; }

/* ---------- Board, security & tools ---------- */
:root { --board: #b5651d; }
.pill-board, .pill-role-board, .pill-aud-board { background: #fbeee0; color: #95511a; }
.pill-aud-staff { background: #efe8f8; color: var(--staff); }
.pill-aud-all { background: var(--brand-50); color: var(--brand-600); }
.hero-board { background: linear-gradient(120deg, #6b3a14, #9a5523 60%, #c27a3e); }
.tile.board .icon { color: var(--board); }
.tile.board:hover { border-color: var(--board); background: #fbf3ea; }
.date-badge.board, .avatar.board { background: #fbeee0; color: #95511a; }
.date-badge.board small { color: #95511a !important; }
.bar.board { background: var(--board); }
.section-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 12px; }
.people-grid + .section-title { margin-top: 28px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 4px 0; }
.inline-form { display: inline; margin-left: 8px; }
.mt { margin-top: 12px; }
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 16px; }
.qr { margin: 12px 0; }
.qr img { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; display: block; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; letter-spacing: .05em; background: var(--surface-2); padding: 8px 12px; border-radius: 8px; display: inline-block; margin-top: 4px; word-break: break-all; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.25rem; letter-spacing: .15em; text-align: center; }
.code-input.short { width: 170px; }
.codes-card { border: 2px solid var(--accent); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 16px; }
.codes code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; background: var(--surface-2); padding: 8px; border-radius: 8px; text-align: center; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 8px 0 8px 12px; border-left: 3px solid var(--brand-50); margin-bottom: 4px; }
.activity li.bad { border-left-color: var(--danger); }
.row-bad td { background: #fff7f6; }
tr.selected td { background: var(--brand-50); }
.break { word-break: break-all; }
details summary { cursor: pointer; }
@media print { body:has(.codes-card) :is(.sidebar, .topbar, .codes-card .row, .grid-main > .col:last-child, .card:not(.codes-card), .alert) { display: none !important; } body:has(.codes-card) .main { margin: 0; } }
.auth-body { min-height: 100vh; }

/* ---------- Email & files ---------- */
.pill-mail-sent { background: #e2f3e8; color: #1e6b41; }
.pill-mail-queued, .pill-mail-sending { background: #e5edf8; color: var(--info); }
.pill-mail-failed { background: #f9e6e5; color: #9b2f29; }
.pill-mail-skipped { background: #fdf1dc; color: #8a5a10; }
.sep { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.tips { padding-left: 18px; margin: 8px 0; }
.tips li { margin-bottom: 6px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; font-weight: 600; }
.crumbs span { color: var(--muted); }
.file-link { display: flex; align-items: center; gap: 10px; color: var(--text); }
.file-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--muted); flex: none; }
.file-icon.dir { background: #fdf1dc; color: #a56b12; }
.table.files td { vertical-align: middle; }
.lib-card { display: block; color: var(--text); margin: 0; }
.lib-card:hover { text-decoration: none; border-color: var(--brand); }
.doc-icon.lg { width: 48px; height: 48px; margin-bottom: 10px; }
@media (max-width: 600px) { .hide-sm { display: none; } }
.presets { margin-bottom: 14px; }

/* ---------- PHP edition additions ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 16px; font-size: .88rem; }
.checks li { padding: 3px 0; }
.checks li.ok { color: #1e6b41; }
.checks li.bad { color: var(--danger); }
.lg-dot.board { background: var(--board); }
.cal-event.board { background: #fbeee0; color: #7a4113; border-left-color: var(--board); }
label.check span { font-weight: 400; }
.auth-wrap:has(form[action$="/setup"]) { max-width: 640px; }
input[type=radio] { width: 17px; height: 17px; padding: 0; flex: none; accent-color: var(--brand); margin-top: 2px; }
label.check { align-items: flex-start; }

/* ---------- Kiosk mode ---------- */
.kiosk-body { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, #e8f3ec, #f5f7f4 45%, #f6ead3); }
.kiosk-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; }
.kiosk-brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.kiosk-clock { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-600); }
.kiosk-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 16px; }
.kiosk-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 10px 40px rgba(20,40,30,.08); padding: 28px; width: 100%; max-width: 460px; text-align: center; }
.kiosk-card.narrow-card { text-align: left; }
.kiosk-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.kiosk-card .avatar.lg { margin-bottom: 10px; }
.kiosk-big { font-size: 1.15rem; margin: 10px 0 18px; }
.kiosk-form { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.kiosk-code { font-size: 2rem; text-align: center; letter-spacing: .5em; padding: 12px; border-radius: 12px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { font: inherit; font-size: 1.6rem; font-weight: 700; padding: 16px 0; border-radius: 14px; border: 1px solid var(--border); background: #fbfcfa; color: var(--text); cursor: pointer; touch-action: manipulation; }
.keypad button:active { background: var(--brand-50); }
.keypad button.soft { font-size: 1rem; color: var(--muted); }
.kiosk-go { font-size: 1.25rem; padding: 16px; width: 100%; border-radius: 14px; }
.kiosk-programs { display: grid; gap: 10px; margin: 16px 0; }
.kiosk-programs .btn { font-size: 1.1rem; padding: 16px; border-radius: 14px; }
.kiosk-check { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.kiosk-check .icon { width: 46px; height: 46px; stroke-width: 2.5; }
.kiosk-here { background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; max-width: 460px; text-align: center; }
.kiosk-foot { text-align: center; padding: 14px; font-size: .85rem; }
.kiosk-foot a { color: var(--muted); }
.clocked-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.clocked-row form { display: flex; gap: 6px; align-items: center; margin: 0; }
.clocked-row input[type=datetime-local] { width: auto; padding: 5px 8px; font-size: .85rem; }
.guide ol { margin-top: 10px; } .guide { background: var(--surface-2); padding: 10px 14px; border-radius: 10px; } [hidden] { display: none !important; }
.brand-logo { height: 52px; width: auto; max-width: 160px; object-fit: contain; flex: none; border-radius: 12px; background: #fff; padding: 2px; }
.brand-logo.lg { height: 110px; max-width: 280px; border-radius: 18px; padding: 4px; }
.auth-brand:has(.brand-logo) { flex-direction: column; text-align: center; gap: 8px; }
.kiosk-brand .brand-logo { height: 64px; }
.statement header .brand-logo.lg { height: 96px; }
.logo-preview { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-preview img { max-height: 72px; max-width: 240px; border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: #fff; }
/* ---------- Welcome steps & waivers ---------- */
.auth-wrap:has(.welcome) { max-width: 600px; }
.welcome h2 { font-size: 1.4rem; }
.welcome-progress { display: flex; gap: 6px; align-items: center; margin-bottom: 18px; }
.welcome-progress span { height: 6px; flex: 1; border-radius: 99px; background: var(--surface-2); }
.welcome-progress span.done { background: var(--brand); }
.welcome-progress span.now { background: var(--accent); }
.welcome-progress small { margin-left: 8px; white-space: nowrap; }
.welcome-list { list-style: none; padding: 0; margin: 0 0 18px; }
.welcome-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef2ec; }
.welcome-list .icon { color: var(--brand); }
.welcome-out { text-align: center; margin-top: 14px; }
.waiver-text { max-height: 320px; overflow-y: auto; background: #fbfcfa; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: .92rem; line-height: 1.6; margin-bottom: 14px; }
.waiver-text.print { max-height: none; overflow: visible; }
