/* ===== 01-theme.css ===== */
:root {
  --bg-a: #e2eef1;
  --bg-b: #eaf3ec;
  --surface: #ffffff;
  --surface-soft: #eef5f2;
  --navy: #17355c;
  --navy-dark: #102845;
  --navy-bg: #17355c;       /* navy used as a BACKGROUND (buttons, table headers) */
  --navy-bg-dark: #102845;
  --green: #2f7d4f;
  --green-light: rgba(47, 125, 79, 0.12);
  --text: #17355c;
  --text-muted: #6b7280;
  --text-faint: #94a3b8;
  --border: #e2e8ec;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 3px 12px rgba(23, 53, 92, 0.06);
  --shadow-md: 0 12px 32px rgba(23, 53, 92, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(165deg, var(--bg-a) 0%, var(--bg-b) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; position: relative; }

.hidden { display: none !important; }

/* ===== 02-login.css ===== */
/* ---------- Login ---------- */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}
.login-screen::before, .login-screen::after {
  content: ""; position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
.login-screen::before {
  width: 300px; height: 300px; top: -100px; right: -100px;
  background: radial-gradient(circle, rgba(120, 190, 150, 0.30) 0%, rgba(120, 190, 150, 0) 70%);
}
.login-screen::after {
  width: 260px; height: 260px; bottom: 30px; left: -100px;
  background: radial-gradient(circle, rgba(90, 160, 200, 0.24) 0%, rgba(90, 160, 200, 0) 70%);
}
.login-screen > * { position: relative; z-index: 1; }

.logo-wrap { text-align: center; margin-bottom: 16px; }
.logo-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 112px; height: 112px; border-radius: 50%;
  filter: drop-shadow(0 8px 18px rgba(23, 53, 92, 0.18));
}
.logo-wrap img { width: 112px; height: 112px; object-fit: contain; border-radius: 50%; }

.app-title {
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
  margin: 4px 0 0;
  line-height: 1.3;
}
.app-subtitle {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 6px;
}
.app-tagline {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 26px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
}
.card-heading {
  display: flex; align-items: center; gap: 8px;
  font-size: 15.5px; font-weight: 700; color: var(--navy);
  margin: 0 0 18px;
}
.card-heading::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  font-size: 16px;
  line-height: 1.3;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.field select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.field input[type="date"] {
  -webkit-appearance: none;
  appearance: auto; /* keep the native calendar icon, just match height/padding above */
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-light);
}

.input-icon-wrap { position: relative; }
.input-icon-wrap svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-faint); pointer-events: none;
}
.input-icon-wrap input { padding-left: 44px; border-radius: var(--radius-pill); }

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 22px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.remember-row-left { display: flex; align-items: center; gap: 8px; }
.remember-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--navy);
  border: 1px solid var(--border); border-radius: 4px;
}
.login-message-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--green); font-weight: 700; font-size: 13px;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--navy-bg); color: #ffffff; box-shadow: 0 8px 20px rgba(23, 53, 92, 0.25); }
.btn-primary:active { background: var(--navy-bg-dark); box-shadow: none; }
.btn-secondary { background: var(--surface); color: var(--navy); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .55; }

.error-msg {
  background: var(--danger-light);
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}
.success-msg {
  background: var(--success-light);
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}

.footer-note { text-align: center; font-size: 11px; color: var(--text-muted); padding: 16px; }
.login-footer { text-align: center; margin-top: 24px; }
.login-footer .brand { font-weight: 700; font-size: 13px; color: var(--navy); }
.login-footer .meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== 03-dashboard.css ===== */
/* ---------- Dashboard ---------- */
.dash-header { padding: 24px 20px 8px; }
.dash-header-top { display: flex; align-items: flex-start; justify-content: space-between; }
.dash-brand .brand-line1 { font-size: 18px; font-weight: 800; color: var(--navy); line-height: 1.25; }
.dash-brand .brand-line2 { font-size: 14.5px; font-weight: 700; color: var(--green); margin-top: 1px; }

.logout-btn {
  background: var(--surface);
  color: var(--navy);
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}

.dash-badge {
  display: inline-block;
  background: var(--surface);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin: 14px 0 10px;
  box-shadow: var(--shadow-sm);
}
.dash-greeting { font-size: 19px; font-weight: 800; color: var(--navy); }

.user-greeting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.user-profile-photo-wrap { flex-shrink: 0; }
.user-profile-photo, .user-profile-photo-placeholder {
  width: 46px; height: 46px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--green);
}
.user-profile-photo { object-fit: cover; display: block; }
.user-profile-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--green-light); color: var(--green);
  font-size: 16px; font-weight: 800;
}
.dash-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.dashboard-body { padding: 16px 18px 20px; flex: 1; }

.panel {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-card .dot-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px;
}
.stat-card .dot-label::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0;
}
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--navy); }

.menu-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.menu-item {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.menu-item .icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--green-light);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.icon svg { width: 20px; height: 20px; }

.icon-indigo { background: rgba(99,102,241,0.14); color: #6366f1; }
.icon-cyan   { background: rgba(8,145,178,0.14);  color: #0891b2; }
.icon-amber  { background: rgba(180,83,9,0.14);   color: #b45309; }
.icon-pink   { background: rgba(219,39,119,0.14); color: #db2777; }
.icon-violet { background: rgba(124,58,237,0.14); color: #7c3aed; }
.icon-rose   { background: rgba(220,38,38,0.14);  color: #dc2626; }
.icon-slate  { background: rgba(71,85,105,0.14);  color: #475569; }
.icon-teal   { background: rgba(13,148,136,0.14);  color: #0d9488; }
.icon-orange { background: rgba(234,88,12,0.14);   color: #ea580c; }
.icon-sky    { background: rgba(2,132,199,0.14);   color: #0284c7; }
.icon-alert  { background: rgba(220,38,38,0.16) !important; color: #dc2626 !important; }
.icon-gold   { background: rgba(234,179,8,0.18);   color: #a16207; }

/* ===== 04-forms-modals.css ===== */
/* ---------- Modal / Add Member ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 30, 50, .45);
  display: flex; align-items: flex-end;
  z-index: 50;
}
.modal-sheet {
  background: linear-gradient(165deg, var(--bg-a) 0%, var(--bg-b) 100%);
  width: 100%;
  max-height: 92vh;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 32px rgba(23, 53, 92, 0.2);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
}
.modal-header h2 { margin: 0; font-size: 16px; color: var(--navy); font-weight: 800; }
.modal-close {
  background: var(--surface-soft); border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 18px; color: var(--text-muted); cursor: pointer;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
.modal-body { padding: 18px 20px 28px; overflow-y: auto; flex: 1; }

.photo-picker { display: flex; gap: 10px; margin-bottom: 16px; }
.photo-picker .btn { flex: 1; padding: 11px; font-size: 13px; }
.photo-preview {
  width: 100%; max-width: 160px;
  border-radius: var(--radius);
  margin: 0 auto 14px;
  display: block;
  box-shadow: var(--shadow-sm);
}

.required-mark { color: var(--danger); }

/* ---------- QR result ---------- */
.qr-screen { text-align: center; padding: 10px 4px 4px; }
.qr-screen canvas { margin: 10px auto; border-radius: 8px; }
.qr-name { font-weight: 700; font-size: 16px; margin-top: 6px; color: var(--navy); }
.qr-id { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin .6s linear infinite;
  vertical-align: -3px;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Accent usage ---------- */
.btn-accent { background: var(--green); color: #ffffff; }
.btn-accent:active { background: #256640; }
.badge-accent {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* ---------- Dashboard menu grid (2-col for extra buttons) ---------- */
.menu-grid.grid-2 { grid-template-columns: 1fr 1fr; }
.menu-grid.grid-2 .menu-item { flex-direction: column; text-align: center; padding: 16px 10px; font-size: 12.5px; gap: 9px; }
.menu-grid.grid-2 .menu-item .icon { width: 36px; height: 36px; font-size: 16px; border-radius: 11px; }
.menu-grid.grid-2 .menu-item .icon svg { width: 17px; height: 17px; }

/* ---------- Search list (Update Member) ---------- */
.search-field { position: relative; margin-bottom: 14px; }
.member-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.member-list-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border-radius: var(--radius-sm); padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}
.member-list-item .name { font-weight: 700; font-size: 14px; color: var(--navy); }
.member-list-item .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.edit-btn {
  background: var(--green-light); color: var(--green);
  border: none; padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.empty-note { text-align: center; color: var(--text-muted); font-size: 13px; padding: 20px; }

/* ---------- Attendance result card ---------- */
.att-result {
  border-top: 3px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.att-result img.att-photo {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--green);
  margin-bottom: 10px; background: var(--surface-soft);
}
.att-result .att-photo-placeholder {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--green-light); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700;
  margin: 0 auto 10px; box-shadow: 0 0 0 2px var(--green);
}
.att-result .att-name { font-size: 17px; font-weight: 800; color: var(--navy); }
.att-result .att-id { font-size: 12px; color: var(--text-muted); margin: 2px 0 6px; }
.att-status {
  display: inline-block; padding: 6px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; margin-top: 4px;
}
.att-status.recorded { background: var(--success-light); color: #15803d; border: 1px solid #bbf7d0; }
.att-status.duplicate { background: #fff7ed; color: #c2660a; border: 1px solid #fed7aa; }
.att-status.error { background: var(--danger-light); color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- QR Scanner (in-app hint area) ---------- */
.scanner-hint { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }

/* ---------- Edit Member: ID + Points header ---------- */
.id-points-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.id-points-id { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.id-points-id span { color: var(--navy); font-weight: 700; }
.id-points-points { text-align: right; }
.id-points-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  color: #a16207; margin-bottom: 1px;
}
.id-points-value { font-size: 26px; font-weight: 800; color: #ca8a04; line-height: 1; }

/* ===== 05-calendar-tables.css ===== */
/* ---------- Attendance-by-date calendar picker ---------- */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-weight: 700; color: var(--navy); font-size: 15px; }
.cal-nav-btn {
  background: var(--surface-soft); border: none; width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1;
}
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; color: var(--text-muted); font-weight: 700;
  margin-bottom: 6px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--surface); cursor: pointer;
}
.cal-day.cal-day-empty { visibility: hidden; cursor: default; }
.cal-day.cal-day-has-data { background: rgba(220,38,38,0.10); color: #dc2626; }
.cal-day.cal-day-has-data::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #dc2626;
}
.cal-day.cal-day-today { box-shadow: inset 0 0 0 2px var(--green); }
.cal-day.cal-day-selected { background: var(--navy-bg); color: #ffffff; }
.cal-day.cal-day-selected::after { background: #ffffff; }
.cal-legend-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #dc2626; vertical-align: middle; margin-right: 5px;
}

/* ---------- Data table (Today's Attendees / Absent / Follow Up) ---------- */
.data-table-wrap {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.data-table-scroll { max-height: 55vh; overflow-y: auto; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table thead th {
  background: var(--navy-bg); color: #ffffff; text-align: left;
  padding: 9px 10px; font-weight: 600; white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.data-table tbody td {
  padding: 9px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap; color: var(--text);
}
.data-table tbody tr:nth-child(even) td { background: var(--surface-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .cell-name { font-weight: 700; color: var(--navy); }
.data-table .cell-muted { color: var(--text-muted); }
.data-table .cell-status-absent { color: #dc2626; font-weight: 700; }
.data-table .cell-status-followup { color: #c2660a; font-weight: 700; }

/* ---------- Store product card (photo left, info right) ---------- */
.store-card {
  display: flex; align-items: stretch;
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 12px;
  min-height: 140px;
}
.store-card-photo { width: 38%; flex-shrink: 0; background: var(--surface-soft); }
.store-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-card-photo .no-photo {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 11px; text-align: center; padding: 8px;
}
.store-card-info {
  flex: 1; padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.store-card-info .name { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.store-card-info .sub-line { font-size: 12.5px; color: var(--text-muted); }
.store-card-info .buy-btn { margin-top: 10px; }

.gathering-card .g-name { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.gathering-card .g-schedule { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Category tabs (Registered Members by status) ---------- */
.category-tabs { display: flex; gap: 6px; }
.category-tab {
  flex: 1; padding: 9px 6px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.category-tab.active { background: var(--navy-bg); border-color: var(--navy-bg); color: #ffffff; }

.gathering-status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 10px 12px; margin-bottom: 8px;
}
.gathering-status-row .g-name { font-size: 13px; font-weight: 700; color: var(--navy); }
.gathering-status-row .g-time { font-size: 11.5px; color: var(--text-muted); }
.gathering-status-row.excluded { border-left: 3px solid #dc2626; }
.no-gathering-btn { width: auto; padding: 7px 12px; font-size: 11.5px; flex-shrink: 0; }

/* ===== 06-quiz-followup.css ===== */
/* ---------- Task quiz (question cards, choices, result indicators) ---------- */
.quiz-question-card {
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); padding: 14px; margin-bottom: 12px;
}
.quiz-question-num { font-size: 11px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.quiz-question-text { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.quiz-choice {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  margin-bottom: 7px; cursor: pointer; font-size: 13px; color: var(--text);
}
.quiz-choice:last-child { margin-bottom: 0; }
.quiz-choice input { accent-color: var(--green); width: 16px; height: 16px; flex-shrink: 0; }
.quiz-choice.selected { border-color: var(--green); background: var(--green-light); }

.quiz-result-card {
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); padding: 14px; margin-bottom: 12px;
  border-left: 4px solid var(--border);
}
.quiz-result-card.correct { border-left-color: var(--success); }
.quiz-result-card.incorrect { border-left-color: var(--danger); }
.quiz-result-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill);
  margin-bottom: 8px;
}
.quiz-result-status.correct { background: var(--success-light); color: #15803d; }
.quiz-result-status.incorrect { background: var(--danger-light); color: #b91c1c; }
.quiz-result-answer-line { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.quiz-result-answer-line b { color: var(--text); }
.data-table td.cell-photo { width: 40px; padding-right: 4px; }
.bday-photo, .bday-photo-placeholder {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block;
}
.bday-photo-placeholder {
  background: var(--green-light); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

/* ---------- Follow Up List (grouped by Gathering) ---------- */
.followup-group { margin-bottom: 16px; }
.followup-group:last-child { margin-bottom: 0; }
.followup-group-header {
  background: var(--navy-bg); color: #ffffff;
  padding: 10px 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.followup-group-title { font-size: 14px; font-weight: 700; }
.followup-group-sub { font-size: 11.5px; opacity: 0.85; margin-top: 1px; }
.followup-group-count {
  display: inline-block; margin-top: 6px;
  background: rgba(255,255,255,0.16); color: #ffffff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill);
}

/* ---------- Improved downloadable QR card (rendered on hidden canvas) ---------- */
.qr-live-preview {
  display: inline-block; padding: 16px; border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* ===== 07-dark-theme.css ===== */
/* ---------- Theme toggle button ---------- */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface); color: var(--navy); box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle-login { position: absolute; top: 14px; right: 14px; z-index: 2; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Dark theme ----------
   Not pure black: a deep navy base with lifted surfaces, so cards still
   read as raised. Text-navy flips to a light tint while navy-as-background
   (buttons, table headers) stays a saturated blue so white labels keep
   their contrast. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-a: #0d1626;
  --bg-b: #0f1f22;
  --surface: #172133;
  --surface-soft: #1e2b41;
  --navy: #e3ecf8;
  --navy-dark: #c4d3e8;
  --navy-bg: #2a5a96;
  --navy-bg-dark: #214a7d;
  --green: #4cc38a;
  --green-light: rgba(76, 195, 138, 0.16);
  --text: #e3ecf8;
  --text-muted: #97a8bf;
  --text-faint: #6c7d94;
  --border: #2b3950;
  --danger-light: rgba(220, 38, 38, 0.16);
  --success-light: rgba(22, 163, 74, 0.16);
  --shadow-sm: 0 3px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
}
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea { background: var(--surface-soft); }
:root[data-theme="dark"] .btn-primary { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }

/* status colours: the light-mode text shades are too dark on a dark card */
:root[data-theme="dark"] .error-msg { color: #fca5a5; border-color: rgba(220, 38, 38, 0.4); }
:root[data-theme="dark"] .success-msg { color: #86efac; border-color: rgba(22, 163, 74, 0.4); }
:root[data-theme="dark"] .att-status.recorded,
:root[data-theme="dark"] .quiz-result-status.correct { color: #86efac; border-color: rgba(22, 163, 74, 0.4); }
:root[data-theme="dark"] .att-status.error,
:root[data-theme="dark"] .quiz-result-status.incorrect { color: #fca5a5; border-color: rgba(220, 38, 38, 0.4); }
:root[data-theme="dark"] .att-status.duplicate { background: rgba(234, 88, 12, 0.16); color: #fdba74; border-color: rgba(234, 88, 12, 0.4); }
:root[data-theme="dark"] .data-table .cell-status-absent { color: #f87171; }
:root[data-theme="dark"] .data-table .cell-status-followup { color: #fb923c; }

/* action icons: use the light end of each hue */
:root[data-theme="dark"] .icon-indigo { color: #a5b4fc; }
:root[data-theme="dark"] .icon-cyan   { color: #67e8f9; }
:root[data-theme="dark"] .icon-amber  { color: #fcd34d; }
:root[data-theme="dark"] .icon-pink   { color: #f9a8d4; }
:root[data-theme="dark"] .icon-violet { color: #c4b5fd; }
:root[data-theme="dark"] .icon-rose   { color: #fca5a5; }
:root[data-theme="dark"] .icon-slate  { color: #cbd5e1; }
:root[data-theme="dark"] .icon-teal   { color: #5eead4; }
:root[data-theme="dark"] .icon-orange { color: #fdba74; }
:root[data-theme="dark"] .icon-sky    { color: #7dd3fc; }

/* ===== 08-app-shell.css ===== */
/* =====================================================================
   APP SHELL (v2) - app bar, hero, stat cards, tiles, bottom nav, drawer.
   Same navy / green theme; all colours come from the variables above so
   light and dark mode both work.
   ===================================================================== */
:root { --appbar-bg: rgba(232, 241, 241, 0.86); --radius-lg: 20px; }
:root[data-theme="dark"] { --appbar-bg: rgba(13, 22, 38, 0.86); }

body { min-height: 100vh; letter-spacing: -0.005em; }
.app-screen { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Top app bar ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--appbar-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.app-bar-brand { flex: 1; min-width: 0; }
.app-bar-brand .brand-line1 {
  font-size: 15px; font-weight: 800; color: var(--navy); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-bar-brand .brand-line2 {
  font-size: 11.5px; font-weight: 700; color: var(--green); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex-shrink: 0;
  box-shadow: none; transition: transform .12s ease, background .15s ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }
.header-actions { gap: 8px; }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Dashboard body ---------- */
.app-screen .dashboard-body { padding: 16px 16px calc(104px + env(safe-area-inset-bottom)); }

.hero-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-bg) 0%, #1d4a78 62%, #23606a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: 0 14px 30px rgba(23, 53, 92, 0.22);
  margin-bottom: 22px;
}
.hero-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(76, 195, 138, 0.38) 0%, rgba(76, 195, 138, 0) 70%);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card .dash-badge {
  background: rgba(255, 255, 255, 0.14); color: #ffffff; box-shadow: none;
  margin: 0 0 10px; font-size: 10.5px; letter-spacing: 0.8px;
}
.hero-card .dash-greeting { color: #ffffff; font-size: 22px; line-height: 1.25; }
.hero-card .dash-meta { color: rgba(255, 255, 255, 0.78); font-size: 12.5px; margin-top: 4px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill); padding: 7px 12px;
  font-size: 12px; font-weight: 600; color: #ffffff; max-width: 100%;
}
.hero-chip span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4cc38a; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.3);
}
.hero-card .user-greeting-row { margin-top: 0; align-items: flex-start; }
.hero-card .user-profile-photo, .hero-card .user-profile-photo-placeholder {
  width: 56px; height: 56px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.hero-card .user-profile-photo-placeholder { background: rgba(255, 255, 255, 0.16); color: #ffffff; font-size: 18px; }
.hero-points {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px; padding: 12px 14px;
  transition: background .15s ease;
}
.hero-points:active { background: rgba(255, 255, 255, 0.2); }
.hero-points-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(250, 204, 21, 0.2); color: #fde047;
  display: flex; align-items: center; justify-content: center;
}
.hero-points-icon svg { width: 20px; height: 20px; }
.hero-points-text { flex: 1; min-width: 0; }
.hero-points .dot-label { font-size: 12.5px; font-weight: 700; color: #ffffff; }
.hero-points-hint { font-size: 11px; color: rgba(255, 255, 255, 0.7); margin-top: 2px; }
.hero-points .num { font-size: 28px; font-weight: 800; color: #ffffff; line-height: 1; }

.section-title {
  font-size: 13px; font-weight: 800; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.7px;
  margin: 0 4px 12px;
}

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.stat-grid .stat-card {
  border-radius: 18px; padding: 16px; cursor: pointer;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .12s ease;
}
.stat-grid .stat-card:active { transform: scale(.98); }
.stat-grid .stat-card .dot-label::before { display: none; }
.stat-grid .stat-card .dot-label { margin: 10px 0 2px; font-size: 12px; }
.stat-grid .stat-card .num { font-size: 28px; line-height: 1.1; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 19px; height: 19px; }
.stat-card.stat-wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.stat-card.stat-wide .stat-icon { width: 48px; height: 48px; border-radius: 14px; }
.stat-card.stat-wide .stat-icon svg { width: 23px; height: 23px; }
.stat-card.stat-wide .stat-text { flex: 1; }
.stat-card.stat-wide .dot-label { margin: 0 0 2px; }
.stat-chevron { color: var(--text-faint); display: flex; }
.stat-chevron svg { width: 20px; height: 20px; }

/* ---------- Quick-action tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 8px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s ease;
  -webkit-user-select: none; user-select: none;
}
.tile:active { transform: scale(.96); }
.tile .icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.tile .icon svg { width: 22px; height: 22px; }
.tile-label { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.25; }

.app-screen .footer-note { padding: 4px 16px 8px; }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed; z-index: 35; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--appbar-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--border);
}
.bnav-item {
  position: relative;
  background: none; border: none; cursor: pointer; padding: 6px 2px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-muted); font-family: inherit;
}
.bnav-item > svg { width: 22px; height: 22px; }
.bnav-item.active { color: var(--green); }
.bnav-label { font-size: 10.5px; font-weight: 700; }
.bnav-item .notif-dot { top: 3px; right: calc(50% - 16px); }
.bnav-fab .bnav-icon {
  width: 52px; height: 52px; margin-top: -26px; border-radius: 18px;
  background: var(--navy-bg); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px rgba(23, 53, 92, 0.32), 0 0 0 5px var(--bg-a);
}
.bnav-fab .bnav-icon svg { width: 24px; height: 24px; }
.bnav-fab { color: var(--navy); }
.bnav-item:active { transform: scale(.95); }

/* ---------- Hamburger drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 44;
  background: rgba(15, 30, 50, 0.45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 45; top: 0; bottom: 0;
  left: max(0px, calc(50vw - 240px));
  width: min(304px, 84vw);
  background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(-105%); visibility: hidden;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility .24s;
  box-shadow: 12px 0 32px rgba(15, 30, 50, 0.22);
  border-radius: 0 22px 22px 0;
}
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 20px 16px 18px 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  background: linear-gradient(135deg, var(--navy-bg) 0%, #1d4a78 70%, #23606a 100%);
  border-radius: 0 22px 0 0;
}
.drawer-brand { min-width: 0; }
.drawer-brand .brand-line1 { font-size: 16px; font-weight: 800; color: #ffffff; line-height: 1.25; }
.drawer-brand .brand-line2 { font-size: 12px; font-weight: 700; color: #8fe0b6; margin-top: 2px; }
.drawer-head .icon-btn { background: rgba(255, 255, 255, 0.14); border-color: transparent; color: #ffffff; }
.drawer-nav { flex: 1; overflow-y: auto; padding: 8px 10px 12px; }
.drawer-group {
  font-size: 10.5px; font-weight: 800; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 14px 12px 6px;
}
.drawer-item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 11px 12px; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--navy);
}
.drawer-item svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.drawer-item:active, .drawer-item:hover { background: var(--surface-soft); }
.drawer-foot { padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.drawer-logout, .drawer-logout svg { color: var(--danger); }

/* ---------- Pop-ups (bottom sheets) ---------- */
.modal-overlay {
  justify-content: center;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.modal-sheet { max-width: 480px; }
.modal-overlay:not(.hidden) .modal-sheet { animation: sheetUp .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-header { position: relative; padding-top: 22px; border-bottom: 1px solid var(--border); }
.modal-header::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 4px; background: var(--border);
}
.modal-header h2 { font-size: 17px; }

/* ---------- Lists: breathing room between items ---------- */
.member-list-item + .member-list-item { margin-top: 10px; }
.member-list .member-list-item + .member-list-item { margin-top: 0; }
.member-list-item { border: 1px solid var(--border); gap: 12px; }
.member-list-item > div:first-child { min-width: 0; flex: 1; }
.member-list-item .sub { overflow-wrap: anywhere; }
.gathering-card + .gathering-card { margin-top: 0; }
.quiz-result-card, .quiz-question-card { margin-bottom: 14px; }

.inbox-delete-btn {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  border: none; cursor: pointer; background: var(--danger-light); color: var(--danger);
  display: flex; align-items: center; justify-content: center;
}
.inbox-delete-btn svg { width: 17px; height: 17px; }
.inbox-delete-btn:disabled { opacity: .5; }

/* ---------- Update User Records: role filter chips ---------- */
.filter-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; margin-bottom: 4px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.filter-chip.active { background: var(--navy-bg); border-color: var(--navy-bg); color: #ffffff; }

/* ---------- Attendance by Date: one section per gathering ---------- */
.gathering-section + .gathering-section { margin-top: 18px; }
.gathering-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.gathering-section-title { font-size: 14.5px; font-weight: 800; color: var(--navy); }
.gathering-section-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.gathering-section-head .export-gathering-btn { width: auto; padding: 9px 14px; font-size: 12.5px; flex-shrink: 0; }

/* ---------- Settings: "Add New" form hidden until + Add More ---------- */
#gatheringsAddSection.hidden ~ .add-section-submit,
#storeAddSection.hidden ~ .add-section-submit { display: none; }

.field-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.45; }

/* ---------- Login polish ---------- */
.login-card { border: 1px solid var(--border); }
.btn { font-family: inherit; transition: transform .12s ease; }
.btn:active:not(:disabled) { transform: scale(.985); }

/* =====================================================================
   v3: admin dashboard "All features" card + two-way messaging
   ===================================================================== */
.menu-hint-card {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 18px;
  padding: 14px 16px; margin: 0 0 24px; cursor: pointer; font-family: inherit; color: var(--navy);
}
.menu-hint-card:active { transform: scale(.98); }
.menu-hint-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-hint-text b { font-size: 14px; }
.menu-hint-text small { font-size: 12px; color: var(--text-muted); line-height: 1.35; }

.modal-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-icon-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-soft); color: var(--text-muted);
}
.header-icon-btn svg { width: 16px; height: 16px; }
.header-icon-btn.danger { background: var(--danger-light); color: var(--danger); }
.header-icon-btn:disabled { opacity: .5; }

.chat-sheet { height: 88vh; }
.chat-body { padding-bottom: 16px; }
.chat-thread { display: flex; flex-direction: column; gap: 10px; }
#messageDetailReplies, #memberThreadList { display: contents; }
.bubble-row { display: flex; }
.bubble-row.me { justify-content: flex-end; }
.bubble {
  max-width: 82%; padding: 10px 13px 8px; border-radius: 18px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.bubble-row.them .bubble { border-bottom-left-radius: 6px; }
.bubble-row.me .bubble {
  background: var(--navy-bg); color: #ffffff; border-color: transparent;
  border-bottom-right-radius: 6px;
}
.bubble-name { font-size: 11px; font-weight: 800; color: var(--green); margin-bottom: 2px; }
.bubble-row.me .bubble-name { color: #9fe3bf; }
.bubble-text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-time { font-size: 10.5px; opacity: .65; margin-top: 4px; text-align: right; }

.chat-composer {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
}
.chat-composer textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px;
  padding: 11px 14px; font-size: 15px; line-height: 1.4; font-family: inherit;
  border: 1px solid var(--border); border-radius: 22px;
  background: var(--surface-soft); color: var(--text);
}
.chat-composer textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
  background: var(--green); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn svg { width: 19px; height: 19px; margin-left: -2px; }
.chat-send-btn:disabled { opacity: .5; }
.chat-note {
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  font-size: 12.5px; color: var(--text-muted); text-align: center;
  background: var(--surface); border-top: 1px solid var(--border);
}

.reply-count {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: var(--radius-pill);
  background: var(--green-light); color: var(--green); font-size: 10.5px; font-weight: 700; vertical-align: 1px;
}
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; margin-left: 4px;
  background: var(--danger); color: #ffffff; font-size: 10.5px; font-weight: 800; flex-shrink: 0;
}
.drawer-badge {
  margin-left: auto; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--danger); color: #ffffff; font-size: 10.5px; font-weight: 800;
}

/* ===== 09-components.css ===== */
/* ---------- About: Bless the Developer ---------- */
.bless { text-align: center; padding-top: 26px; }
.bless-cup {
  width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center; font-size: 38px;
  background: linear-gradient(135deg, #fdf3e3 0%, #f6e2c4 100%);
  box-shadow: 0 10px 24px rgba(146, 92, 32, 0.18);
}
.bless-title {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 28px; font-weight: 700; color: var(--navy); margin: 0 0 12px;
  letter-spacing: -0.01em; line-height: 1.15;
}
.bless-lead {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 17.5px; font-weight: 600; color: var(--navy); line-height: 1.45;
  margin: 0 auto 12px; max-width: 340px;
}
.bless-lead em { color: var(--green); font-style: italic; font-weight: 600; }
.bless-text { font-size: 14.5px; color: var(--text-muted); line-height: 1.65; margin: 0 auto 22px; max-width: 360px; }
.bless-qr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 18px 18px 16px; margin: 0 auto 22px; max-width: 320px; box-shadow: var(--shadow-md);
}
.bless-qr { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto 12px; border-radius: 10px; image-rendering: pixelated; background: #fff; }
.bless-qr-hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.bless-qr-hint b { color: var(--navy); }
.bless-download { padding: 11px 14px; font-size: 13.5px; }
.bless-soft {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 400; font-size: 16px; color: var(--text); margin: 0 0 6px;
}
.bless-thanks { font-size: 13.5px; font-weight: 800; color: var(--green); letter-spacing: 0.2px; margin: 0 0 6px; }
.drawer-item-bless svg { color: #b45309; }
:root[data-theme="dark"] .bless-cup { background: linear-gradient(135deg, #3a2a18 0%, #4a3420 100%); box-shadow: none; }
:root[data-theme="dark"] .drawer-item-bless svg { color: #fcd34d; }

/* ---------- Update User Records: status badges ---------- */
.record-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-active   { background: var(--success-light); color: #15803d; }
.badge-inactive { background: rgba(100, 116, 139, 0.14); color: #475569; }
.badge-remote   { background: rgba(2, 132, 199, 0.12); color: #0369a1; }
.badge-warn     { background: #fff7ed; color: #c2410c; }
:root[data-theme="dark"] .badge-active   { color: #86efac; }
:root[data-theme="dark"] .badge-inactive { color: #cbd5e1; background: rgba(148, 163, 184, 0.16); }
:root[data-theme="dark"] .badge-remote   { color: #7dd3fc; background: rgba(56, 189, 248, 0.14); }
:root[data-theme="dark"] .badge-warn     { color: #fdba74; background: rgba(234, 88, 12, 0.16); }

/* ---------- Search box (Update User Records) ---------- */
.search-field input {
  display: block; width: 100%; min-height: 46px;
  padding: 12px 16px 12px 44px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 16px center;
  color: var(--text); -webkit-appearance: none; appearance: none;
}
.search-field input::placeholder { color: var(--text-faint); }
.search-field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
:root[data-theme="dark"] .search-field input { background-color: var(--surface-soft); }

/* ---------- In-app confirmation dialog (above every pop-up) ---------- */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(15, 30, 50, 0.5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.confirm-overlay:not(.hidden) .confirm-box { animation: confirmPop .18s cubic-bezier(.2, .8, .2, 1); }
@keyframes confirmPop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.confirm-box {
  width: 100%; max-width: 340px; background: var(--surface);
  border-radius: 22px; padding: 22px 20px 18px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border); text-align: center;
}
.confirm-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: var(--navy); }
.confirm-message { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: var(--text-muted); overflow-wrap: anywhere; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; padding: 13px 10px; font-size: 14.5px; border-radius: var(--radius-pill); }

/* ---------- Quiz: Download Excel Template ---------- */
.template-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 9px 14px; border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid rgba(47, 125, 79, 0.35); background: var(--green-light); color: var(--green);
  font-family: inherit; font-size: 13px; font-weight: 700;
}
.template-btn svg { width: 16px; height: 16px; }
.template-btn:active { transform: scale(.97); }

/* ---------- Edit User Record: Menu Access + Delete Account ---------- */
.access-section, .danger-zone { margin-top: 26px; text-align: left; }
.access-tools { display: flex; gap: 16px; margin: -4px 0 10px; }
.link-btn { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--green); }
.access-list { display: flex; flex-direction: column; gap: 8px; }
.access-item {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--navy);
}
.access-item input { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; margin: 0; }
.access-item:has(input:checked) { border-color: rgba(47, 125, 79, 0.55); background: var(--green-light); }
.access-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.access-icon svg { width: 17px; height: 17px; }
.access-label { flex: 1; min-width: 0; }
.danger-zone { border: 1px solid rgba(220, 38, 38, 0.35); background: var(--danger-light); border-radius: 16px; padding: 16px; }
.danger-zone-title { font-size: 15px; font-weight: 800; color: var(--danger); margin-bottom: 4px; }
.danger-zone-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.confirm-input-wrap { text-align: left; margin: -6px 0 18px; }
.confirm-input-wrap label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.confirm-input-wrap input {
  width: 100%; min-height: 46px; padding: 11px 14px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text);
}
.confirm-input-wrap input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.confirm-input-error { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--danger); }

/* ---------- User: My Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--green); }
.profile-photo-placeholder { display: flex; align-items: center; justify-content: center; background: var(--green-light); color: var(--green); font-size: 24px; font-weight: 800; }
.profile-photo-wrap { flex-shrink: 0; }
.profile-head-text { min-width: 0; }
.profile-name { font-size: 18px; font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.profile-id { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Gatherings: "Who must attend?" ---------- */
.roles-field { margin-bottom: 0; }
.roles-box { display: flex; flex-wrap: wrap; gap: 8px; }
.roles-box .role-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 12px 7px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  margin: 0 !important;
}
.roles-box .role-chip input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--green); flex-shrink: 0;
  -webkit-appearance: auto; appearance: auto; border: none; }
.roles-box .role-chip:has(input:checked) { border-color: rgba(47, 125, 79, 0.5); background: var(--green-light); color: var(--green); }
.roles-box .role-chip-all { font-weight: 800; }
.gathering-card .view-roles { margin-top: 3px; }
.gathering-card .view-roles b { color: var(--navy); }

/* ---------- Red badge on the corner of a tile icon (user side) ---------- */
.tile .icon { position: relative; }
.tile-badge {
  position: absolute; top: -4px; right: -4px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2.5px var(--surface);
}

/* ---------- Announcements ---------- */
.ann-preview { white-space: pre-wrap; }
.ann-item .record-badges { margin: 8px 0 4px; }
.ann-unread { border-color: rgba(220, 38, 38, 0.35); }
.ann-detail-text { font-size: 15.5px; line-height: 1.65; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.member-list-item .tab-count + .inbox-delete-btn { margin-left: 2px; }

/* ---------- Delete buttons beside Edit / scores ---------- */
.row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gathering-actions { display: flex; gap: 8px; margin-top: 10px; }
.gathering-actions .btn { flex: 1; padding: 11px 12px; font-size: 13.5px; border-radius: var(--radius-sm); }
.see-more-btn { margin-top: 12px; padding: 12px; font-size: 13.5px; }

.created-line { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }

/* three-choice dialog (Save / Discard / Continue Editing): stacked */
.confirm-actions.three { flex-direction: column-reverse; gap: 8px; }
.confirm-actions .confirm-alt-btn { color: var(--danger); border-color: rgba(220, 38, 38, 0.35); }

/* ===== 10-features.css ===== */
/* ---------- Backup & Restore / exports ---------- */
.export-row { display: flex; gap: 8px; margin-top: 12px; }
.export-row .btn { flex: 1; width: auto; margin: 0; }
.backup-card { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 16px; margin-bottom: 14px; text-align: left; }
.backup-card-title { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.backup-card-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.backup-count { font-size: 12.5px; font-weight: 700; color: var(--green, #2f7d4f); margin: 6px 0 10px; min-height: 16px; }
.file-pick-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Add to Home Screen guide ---------- */
.a2hs-login-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 14px auto 0; padding: 10px 18px;
  border-radius: 999px; border: 1px dashed rgba(47,125,79,.55); background: rgba(47,125,79,.08); color: var(--green, #2f7d4f);
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.a2hs-login-btn svg { width: 18px; height: 18px; }
.login-screen .a2hs-login-btn { display: flex; width: max-content; }
.a2hs-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(8, 18, 34, .78); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 70px 16px; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.a2hs-overlay.hidden { display: none; }
.a2hs-overlay.arrow-bottom { justify-content: flex-start; padding-top: 48px; }
.a2hs-overlay.arrow-top { justify-content: flex-start; padding-top: 120px; }
.a2hs-card { width: 100%; max-width: 380px; background: var(--surface); color: var(--text, #17355c); border-radius: 20px; padding: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35); text-align: left; }
.a2hs-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.a2hs-icon { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #17355c, #2f7d4f);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 22px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.a2hs-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.a2hs-title { font-size: 17px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.a2hs-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.a2hs-steps { list-style: none; margin: 6px 0 12px; padding: 0; counter-reset: a2hs; }
.a2hs-steps li { counter-increment: a2hs; position: relative; padding: 9px 0 9px 40px; font-size: 14px; line-height: 1.45; border-top: 1px solid var(--border); }
.a2hs-steps li:first-child { border-top: 0; }
.a2hs-steps li::before { content: counter(a2hs); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy-bg); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.a2hs-key { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 26px; height: 24px; padding: 0 7px; margin: 0 2px;
  vertical-align: middle; border-radius: 7px; border: 1px solid var(--border); background: var(--bg, #eef4f6); font-weight: 800; font-size: 13px; color: var(--navy); }
.a2hs-key svg { width: 15px; height: 15px; }
.a2hs-steps b { color: var(--navy); }
.a2hs-note { font-size: 12px; color: var(--text-muted); margin: -4px 0 10px; line-height: 1.45; }
.a2hs-qr { display: flex; justify-content: center; margin: 4px 0 12px; }
.a2hs-qr canvas, .a2hs-qr img { background: #fff; padding: 8px; border-radius: 12px; }
.a2hs-copied { text-align: center; color: var(--green, #2f7d4f); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.a2hs-actions { display: flex; gap: 8px; }
.a2hs-actions .btn { flex: 1; width: auto; margin: 0; }
.a2hs-arrow { position: fixed; z-index: 9001; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #ffd166;
  font-weight: 800; font-size: 13px; text-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none; }
.a2hs-arrow svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.a2hs-arrow.hidden { display: none; }
.a2hs-arrow.pos-top-right { top: 6px; right: 4px; animation: a2hsUp 1s ease-in-out infinite; }
.a2hs-arrow.pos-bottom-center { bottom: 6px; left: 50%; margin-left: -40px; width: 80px; flex-direction: column-reverse; animation: a2hsDown 1s ease-in-out infinite; }
.a2hs-arrow.pos-bottom-right { bottom: 6px; right: 6px; flex-direction: column-reverse; animation: a2hsDown 1s ease-in-out infinite; }
.a2hs-arrow.pos-bottom-center svg, .a2hs-arrow.pos-bottom-right svg { transform: rotate(180deg); }
@keyframes a2hsUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes a2hsDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* ---------- Admin hero logo ---------- */
/* Same look as the login logo: no ring, no white background, whole logo visible. */
.hero-card .user-profile-photo.admin-hero-logo { width: 60px; height: 60px; box-shadow: none; background: transparent; padding: 0;
  object-fit: contain; border-radius: 50%; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25)); }
/* ---------- Image viewer (tap to enlarge) ---------- */
.zoomable-img { cursor: zoom-in; }
.image-viewer { position: fixed; inset: 0; z-index: 9500; background: rgba(5, 10, 20, .92); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 56px 12px 24px; animation: ivFade .18s ease; }
.image-viewer.hidden { display: none; }
.image-viewer img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 12px; background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: ivZoom .2s ease; cursor: zoom-out; }
.image-viewer-caption { color: #e8eef6; font-size: 14px; font-weight: 700; margin-top: 12px; text-align: center; max-width: 90%; }
.image-viewer-close { position: absolute; top: 10px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
@keyframes ivFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ivZoom { from { transform: scale(.92); } to { transform: scale(1); } }

/* ---------- Store: purchase history (user) + pending counts ---------- */
.store-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.store-top-row .badge-accent { margin: 0; }
.btn.btn-inline { width: auto; margin: 0; padding: 8px 14px; font-size: 13px; }
#viewPurchaseHistoryBtn .tab-count { margin-left: 8px; }
.purchase-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); margin-bottom: 10px; }
.purchase-card .name { font-weight: 800; color: var(--navy); font-size: 14.5px; }
.purchase-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.purchase-status { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.purchase-status.pending { background: #fff4d6; color: #9a6700; }
.purchase-status.received { background: var(--green-light); color: var(--green); }
.quiz-result-answer-line .ans-letter { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 6px;
  background: var(--navy-bg); color: #fff; font-size: 11px; font-weight: 800; margin-right: 6px; vertical-align: 1px; }

/* ---------- Captcha + reset password ---------- */
.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.captcha-img { width: 200px; height: 64px; border-radius: 10px; overflow: hidden; background: #eef4f6; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.captcha-img img { display: block; width: 200px; height: 64px; }
.captcha-loading { font-size: 12px; color: #6b7f95; }
.captcha-refresh { position: relative; flex-shrink: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reset-pw-zone { margin-top: 26px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 16px; }
.reset-pw-title { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.temp-pw-box { border: 1px dashed var(--green); background: var(--green-light); border-radius: 12px; padding: 12px; margin-bottom: 12px; text-align: center; }
.temp-pw-label { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.temp-pw-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; font-weight: 800; letter-spacing: 3px; color: var(--navy); margin: 4px 0; }
.temp-pw-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* ===== 11-website.css ===== */
/* ---------- Start-up (church name/logo load before the first screen) ---------- */
#app.booting { visibility: hidden; }
.boot-splash { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 50; }
.boot-splash.hidden { display: none; }
.boot-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(47, 125, 79, 0.25); border-top-color: var(--green, #2f7d4f); animation: bootSpin 0.8s linear infinite; }
@keyframes bootSpin { to { transform: rotate(360deg); } }
.boot-error { text-align: center; color: var(--text, #17355c); font-size: 14px; padding: 24px; max-width: 320px; }
.boot-error .btn { margin-top: 14px; }

/* ---------- Logo picker (Church Setup / Church Settings) ---------- */
.logo-pick { display: flex; align-items: center; gap: 12px; }
.logo-pick-preview { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; border: 1px dashed var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 10.5px; color: var(--text-muted); text-align: center; }
.logo-pick-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-pick .file-pick-btn { flex: 1; width: auto; margin: 0; }

/* ---------- QR Check-In: camera inside the app ---------- */
.scanner-box { position: relative; width: 100%; max-width: 360px; margin: 0 auto 14px; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: #0b1424; box-shadow: var(--shadow-md); }
.scanner-box.hidden { display: none; }
.scanner-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-frame { position: absolute; inset: 16%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(5, 12, 24, 0.35); pointer-events: none; }
.scanner-status { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #fff; font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.scan-result { display: flex; gap: 14px; align-items: center; border-radius: 16px; padding: 14px; margin-bottom: 14px; border: 2px solid var(--border); background: var(--surface); text-align: left; }
.scan-result.hidden { display: none; }
.scan-result.ok { border-color: var(--green); background: var(--green-light); }
.scan-result.dup { border-color: #d98a0b; background: rgba(217, 138, 11, 0.12); }
.scan-result.err { border-color: var(--danger); background: var(--danger-light); }
.scan-result-photo { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; overflow: hidden; background: var(--surface-soft, #eef4f6);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: var(--navy); }
.scan-result-photo img { width: 100%; height: 100%; object-fit: cover; }
.scan-result-status { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; }
.scan-result.ok .scan-result-status { color: var(--green); }
.scan-result.dup .scan-result-status { color: #b06d05; }
.scan-result.err .scan-result-status { color: var(--danger); }
.scan-result-name { font-size: 17px; font-weight: 800; color: var(--navy); margin-top: 2px; }
.scan-result-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }

/* ---------- Install button (phones that support one-tap install) ---------- */
.a2hs-install-btn { margin-top: 4px; }
@media (display-mode: standalone) {
  [data-a2hs] { display: none !important; }
}
