:root {
  --ink: #173238;
  --ink-soft: #5a6e72;
  --navy: #102f35;
  --navy-2: #174750;
  --teal: #167f78;
  --teal-light: #e3f3ef;
  --blue: #246bfd;
  --coral: #e66c4f;
  --cream: #f6f3ea;
  --paper: #fffdfa;
  --white: #fff;
  --line: #dbe4e1;
  --danger: #a53f34;
  --danger-bg: #fff0ed;
  --success: #21644d;
  --success-bg: #e7f5ed;
  --warning: #815c18;
  --warning-bg: #fff5d8;
  --shadow: 0 18px 55px rgba(16,47,53,.12);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #f2f5f3; font-family: var(--font); line-height: 1.55; }
body::selection { background: #b9e2da; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: #fff; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { position: sticky; z-index: 50; top: 0; display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px max(22px, calc((100% - 1280px) / 2)); color: #fff; background: rgba(16,47,53,.98); box-shadow: 0 4px 22px rgba(16,47,53,.12); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: .86rem; font-weight: 800; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 12px; color: #fff; background: rgba(255,255,255,.1); font-weight: 900; letter-spacing: -.04em; }
.brand-mark--large { width: 62px; height: 62px; border-color: transparent; border-radius: 18px; background: linear-gradient(145deg, var(--teal), var(--navy)); box-shadow: 0 12px 30px rgba(22,127,120,.22); font-size: 1.2rem; }
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a { color: rgba(255,255,255,.77); text-decoration: none; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.main-nav a:hover { color: #fff; }
.nav-user { padding: 5px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: rgba(255,255,255,.72); font-size: .68rem; }
.nav-toggle { display: none; padding: 8px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: #fff; background: transparent; font-weight: 700; }

.site-footer { padding: 26px 20px; color: #788985; text-align: center; font-size: .72rem; }
.global-alert { width: min(1200px, calc(100% - 32px)); margin: 16px auto 0; padding: 14px 17px; border: 1px solid; border-radius: 11px; font-size: .86rem; }
.global-alert--success { border-color: #add5c4; color: var(--success); background: var(--success-bg); }
.global-alert--error { border-color: #efc2ba; color: var(--danger); background: var(--danger-bg); }

.public-body { min-height: 100vh; background: radial-gradient(circle at 82% 4%, rgba(22,127,120,.17), transparent 30%), linear-gradient(180deg,#f7faf8,#eef3f1); }
.public-shell { width: min(920px,calc(100% - 32px)); min-height: calc(100vh - 80px); margin: 0 auto; padding: clamp(34px,7vw,82px) 0; }
.public-hero { display: flex; min-height: 255px; align-items: flex-end; justify-content: space-between; gap: 28px; padding: clamp(28px,6vw,55px); overflow: hidden; border-radius: 28px; color: #fff; background: radial-gradient(circle at 87% 0%,rgba(101,221,200,.42),transparent 34%),linear-gradient(145deg,var(--navy),#1b646c); box-shadow: var(--shadow); }
.public-hero h1 { max-width: 700px; margin: 13px 0 7px; font-family: Georgia,"Times New Roman",serif; font-size: clamp(2.5rem,7vw,4.8rem); font-weight: 500; letter-spacing: -.045em; line-height: .98; }
.public-hero p { margin: 0; color: rgba(255,255,255,.75); }
.public-hero .eyebrow { color: #9fe7dc; }
.public-emblem { display: grid; flex: 0 0 92px; height: 92px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 26px; background: rgba(255,255,255,.09); font-size: 1.55rem; font-weight: 900; }
.public-card { margin-top: 18px; padding: clamp(25px,5vw,45px); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 12px 40px rgba(16,47,53,.08); }
.public-card h1, .public-card h2 { margin: 8px 0; font-family: Georgia,"Times New Roman",serif; font-weight: 500; letter-spacing: -.035em; }
.public-card h1 { font-size: clamp(2rem,5vw,3.3rem); }
.public-card h2 { font-size: clamp(1.7rem,4vw,2.4rem); }
.public-card > p { color: var(--ink-soft); }
.public-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.staff-access { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .75rem; }
.staff-access a { color: var(--teal); text-decoration: none; font-weight: 850; }
.success-card, .manage-card { max-width: 650px; margin-inline: auto; }
.success-card { text-align: center; }
.success-card .public-actions { justify-content: center; }
.success-mark { display: grid; width: 66px; height: 66px; margin: 0 auto 23px; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-size: 1.7rem; font-weight: 900; }
.registration-code { margin: 26px 0; padding: 20px; border: 1px dashed #90b9b1; border-radius: 14px; color: var(--teal); background: var(--teal-light); }
.registration-code span, .registration-code strong { display: block; }
.registration-code span { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.registration-code strong { margin-top: 5px; font-size: 1.7rem; letter-spacing: .08em; }
.privacy-note { padding-top: 18px; border-top: 1px solid var(--line); font-size: .7rem; }

.page-shell { width: min(1200px, calc(100% - 36px)); min-height: calc(100vh - 150px); margin: 0 auto; padding: 48px 0 70px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--coral); font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.page-heading, .welcome-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1, .welcome-panel h1 { margin: 9px 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.page-heading p, .welcome-panel p { margin: 7px 0 0; color: var(--ink-soft); }
.role-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.role-pills span { padding: 6px 9px; border: 1px solid #c7d7d3; border-radius: 999px; color: #3f5d62; background: #fff; font-size: .66rem; font-weight: 750; }

.event-hero-card { position: relative; display: flex; min-height: 185px; align-items: flex-end; justify-content: space-between; gap: 25px; overflow: hidden; margin-bottom: 18px; padding: 34px; border-radius: 22px; color: #fff; background: radial-gradient(circle at 85% -10%, rgba(76,207,185,.42), transparent 35%), linear-gradient(145deg, var(--navy), #195862); box-shadow: var(--shadow); }
.event-hero-card::after { content: ""; position: absolute; right: -60px; bottom: -110px; width: 330px; height: 220px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.event-hero-card > * { position: relative; z-index: 1; }
.event-type { color: #9fe7dc; font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.event-hero-card h2 { margin: 7px 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 500; }
.event-hero-card p { margin: 0; color: rgba(255,255,255,.72); }
.status-badge { display: inline-flex; padding: 7px 11px; border-radius: 999px; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.status-badge--open { color: #d8fff8; background: rgba(77,201,176,.2); }
.status-badge--closed, .status-badge--draft { color: #fff0d2; background: rgba(255,196,91,.18); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin: 18px 0; }
.stat-card { min-height: 142px; padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 7px 25px rgba(16,47,53,.05); }
.stat-card > span { color: var(--ink-soft); font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.stat-card > strong { display: block; margin: 12px 0 4px; color: var(--navy); font-size: 2.35rem; line-height: 1; }
.stat-card > small { color: #7b8c88; font-size: .7rem; }
.stat-card--accent { border-color: #9fd0c6; background: linear-gradient(145deg,#fff,#eaf7f3); }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 22px; }
.action-card { position: relative; min-height: 170px; padding: 25px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 7px 25px rgba(16,47,53,.05); text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.action-card:hover { transform: translateY(-2px); border-color: #a8c9c1; box-shadow: 0 13px 35px rgba(16,47,53,.09); }
.action-card > span { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; color: var(--teal); background: var(--teal-light); font-size: .72rem; font-weight: 900; }
.action-card h3 { margin: 18px 0 5px; font-size: 1.1rem; }
.action-card p { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.action-card--primary { border-color: transparent; color: #fff; background: linear-gradient(145deg, var(--teal), #14645f); }
.action-card--primary > span { color: #fff; background: rgba(255,255,255,.16); }
.action-card--primary p { color: rgba(255,255,255,.72); }
.empty-panel { max-width: 680px; margin: 80px auto; padding: 55px; border: 1px dashed #b9cac5; border-radius: 22px; background: #fff; text-align: center; }
.empty-panel h2 { margin: 16px 0 4px; }
.empty-panel p { margin: 0 0 22px; color: var(--ink-soft); }
.empty-icon { display: grid; width: 55px; height: 55px; margin: 0 auto; place-items: center; border-radius: 15px; color: var(--teal); background: var(--teal-light); font-size: 1.6rem; }

.auth-body { min-height: 100vh; background: radial-gradient(circle at 82% 10%, rgba(45,162,148,.24), transparent 28%), radial-gradient(circle at 5% 90%, rgba(230,108,79,.14), transparent 25%), var(--navy); }
.auth-body .site-footer { color: rgba(255,255,255,.46); }
.auth-shell { display: grid; min-height: calc(100vh - 72px); padding: 45px 20px; place-items: center; }
.auth-card { width: min(470px,100%); padding: clamp(30px,6vw,52px); border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: var(--paper); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.auth-card h1 { margin: 12px 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem,6vw,3rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.auth-card > p { margin: 0; color: var(--ink-soft); }
.auth-brand { margin-bottom: 28px; }
.login-form { display: grid; gap: 16px; margin: 28px 0 20px; }
.login-card > small { display: block; color: #7d8d89; text-align: center; font-size: .68rem; }
.install-card { width: min(880px,100%); }
.install-card fieldset, .stack-form fieldset { margin: 28px 0; padding: 25px; border: 1px solid var(--line); border-radius: 15px; }
.install-card legend, .stack-form legend { padding: 0 8px; font-weight: 850; }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--ink); font-size: .8rem; font-weight: 740; }
.field--wide { grid-column: span 2; }
.field input, .field select, .field textarea, .search-input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #c7d5d1; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-weight: 520; }
.field textarea { min-height: 115px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,127,120,.14); }
.field small { color: #7a8b87; font-size: .68rem; font-weight: 500; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pill { cursor: pointer; }
.choice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pill span { display: grid; min-width: 105px; min-height: 46px; padding: 9px 14px; place-items: center; border: 1px solid #c7d5d1; border-radius: 10px; background: #fff; font-size: .78rem; font-weight: 700; }
.choice-pill input:checked + span { border-color: var(--teal); color: var(--teal); background: var(--teal-light); box-shadow: inset 0 0 0 1px var(--teal); }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-weight: 800; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: var(--coral); box-shadow: 0 9px 22px rgba(230,108,79,.22); }
.button--primary:hover { background: #ca563e; }
.button--secondary { border-color: #c7d5d1; color: var(--ink); background: #fff; }
.button--secondary:hover { border-color: var(--teal); }
.button--danger { color: #fff; background: var(--danger); }
.button--large { min-height: 52px; padding: 13px 22px; }
.button:focus-visible, a:focus-visible { outline: 3px solid rgba(36,107,253,.3); outline-offset: 3px; }

.alert { margin: 22px 0; padding: 15px 17px; border: 1px solid; border-radius: 11px; font-size: .82rem; }
.alert ul { margin: 5px 0 0; padding-left: 18px; }
.alert--error { border-color: #efc2ba; color: var(--danger); background: var(--danger-bg); }
.alert--success { border-color: #add5c4; color: var(--success); background: var(--success-bg); }
.alert--warning { border-color: #ead58e; color: var(--warning); background: var(--warning-bg); }

.panel { padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 7px 25px rgba(16,47,53,.05); }
.panel + .panel { margin-top: 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.panel-heading p { margin: 3px 0 0; color: var(--ink-soft); font-size: .78rem; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 7px 25px rgba(16,47,53,.05); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 14px 16px; border-bottom: 1px solid #e8edeb; text-align: left; font-size: .78rem; }
th { color: #71837f; background: #f8faf9; font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: #7b8c88; font-size: .66rem; }
.row-link { color: var(--teal); text-decoration: none; font-weight: 800; }
.row-link--danger { color: var(--danger); }
.empty-row { padding: 45px; color: #758681; text-align: center; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 850; }
.badge--success { color: var(--success); background: var(--success-bg); }
.badge--warning { color: var(--warning); background: var(--warning-bg); }
.badge--muted { color: #667975; background: #edf1ef; }
.badge--blue { color: #315c8b; background: #eaf1fa; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--teal); text-decoration: none; font-size: .78rem; font-weight: 800; }
.heading-actions, .form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.form-actions { margin-top: 26px; }
.form-note { color: var(--ink-soft); font-size: .76rem; }
.check-line { display: flex; gap: 9px; align-items: center; margin-top: 18px; font-size: .8rem; font-weight: 750; }
.check-line input, .check-card input { width: 18px; height: 18px; accent-color: var(--teal); }
.check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.check-card { display: flex; min-height: 52px; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; font-size: .76rem; font-weight: 740; }
.inline-form { display: inline-flex; gap: 7px; margin-left: 8px; }
.inline-reset { display: flex; gap: 6px; margin-top: 7px; }
.inline-reset input { width: 135px; min-height: 32px; padding: 5px 7px; border: 1px solid #c7d5d1; border-radius: 7px; }
.role-assignment-form { display: grid; grid-template-columns: repeat(2,minmax(180px,1fr)) auto auto; gap: 9px; align-items: end; }
.text-button { padding: 0; border: 0; color: var(--teal); background: transparent; font-size: .7rem; font-weight: 800; }
.catalog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.quick-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-bottom: 18px; }
.quick-add--group { grid-template-columns: 1fr 140px auto; }
.catalog-list { border-top: 1px solid var(--line); }
.catalog-list article { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 2px; border-bottom: 1px solid #edf1ef; }
.catalog-list strong, .catalog-list small { display: block; }
.catalog-list small { color: var(--ink-soft); font-size: .66rem; }
.catalog-edit { display: grid; width: 100%; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.catalog-edit--group { grid-template-columns: minmax(130px,1fr) 115px auto auto; }
.catalog-edit input, .catalog-edit select { min-height: 36px; padding: 6px 8px; border: 1px solid #c7d5d1; border-radius: 8px; background: #fff; }
.registration-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.registration-choice-grid h2 { margin: 15px 0 5px; font-family: Georgia,"Times New Roman",serif; font-size: 1.7rem; font-weight: 500; }
.registration-choice-grid p { margin: 0 0 20px; color: var(--ink-soft); }
.choice-number { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: var(--teal); background: var(--teal-light); font-size: .7rem; font-weight: 900; }
.lookup-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.registration-form { padding: clamp(22px,4vw,42px); }
.form-section { margin: 0; padding: 30px 0; border: 0; border-bottom: 1px solid var(--line); }
.form-section:first-of-type { padding-top: 0; }
.form-section > legend { margin-bottom: 20px; padding: 0; font-size: 1rem; font-weight: 880; }
.children-list { display: grid; gap: 12px; margin: 18px 0; }
.child-card { padding: 20px; border: 1px solid #cfe0dc; border-radius: 14px; background: #f8fcfb; }
.child-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.child-card-heading strong { display: block; margin-top: 2px; font-size: .8rem; }
.child-number { color: var(--teal); font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.child-remove { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--danger); background: transparent; font-size: .7rem; font-weight: 800; }
.child-remove:hover { background: var(--danger-bg); }
.fee-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding: 16px; border-radius: 12px; color: var(--success); background: var(--success-bg); font-size: .76rem; }
.filter-bar { display: grid; grid-template-columns: minmax(220px,2fr) minmax(160px,1fr) auto; gap: 10px; align-items: end; margin-bottom: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.filter-panel { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 25px rgba(16,47,53,.04); }
.filter-panel .form-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.filter-bar--compact { grid-template-columns: repeat(2,minmax(180px,260px)) auto; justify-content: start; }
.payment-form { display: flex; min-width: 440px; align-items: center; gap: 7px; }
.payment-form select { min-height: 34px; padding: 5px 7px; border: 1px solid #c7d5d1; border-radius: 7px; background: #fff; }
.payment-form label { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; }
.church-payment-panel { margin: 18px 0; }
.church-payment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.church-payment-grid a { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfc; text-decoration: none; }
.church-payment-grid span, .church-payment-grid strong, .church-payment-grid small { display: block; }
.church-payment-grid span { color: var(--ink-soft); font-size: .67rem; }
.church-payment-grid strong { margin: 3px 0; color: var(--navy); font-size: 1rem; }
.church-payment-grid small { color: #91a09c; font-size: .65rem; }
.stay-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 22px; }
.stay-summary div { padding: 14px; border-radius: 11px; background: #f4f8f6; }
.stay-summary span, .stay-summary strong { display: block; }
.stay-summary span { color: var(--ink-soft); font-size: .65rem; }
.stay-summary strong { margin-top: 4px; font-size: .82rem; }
.lodging-selector { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-bottom: 22px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfa; }
.delete-panel { max-width: 680px; margin: 20px auto; }
.delete-panel h1 { margin: 10px 0; font-family: Georgia,"Times New Roman",serif; font-size: clamp(2rem,5vw,3.2rem); font-weight: 500; }
.delete-summary { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; margin: 22px 0; }
.delete-summary div { padding: 14px; border-radius: 10px; background: #f7f9f8; }
.delete-summary dt { color: var(--ink-soft); font-size: .66rem; }
.delete-summary dd { margin: 3px 0 0; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin-bottom: 16px; }
.detail-card h2 { margin: 0 0 15px; font-size: 1rem; }
.detail-card dl { margin: 0; }
.detail-card dl div { display: grid; grid-template-columns: 125px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #e8edeb; }
.detail-card dl div:first-child { border-top: 0; }
.detail-card dt { color: var(--ink-soft); font-size: .7rem; }
.detail-card dd { margin: 0; font-size: .8rem; font-weight: 700; }
.family-list { display: grid; gap: 8px; }
.family-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfc; }
.family-list h3 { margin: 6px 0 2px; font-size: .9rem; }
.family-list p { margin: 0; color: var(--ink-soft); font-size: .7rem; }
.family-list article > div:last-child { display: grid; gap: 5px; justify-items: end; }
.fee-total-panel { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 16px; }
.fee-total-panel div { padding: 5px 20px; border-left: 1px solid var(--line); }
.fee-total-panel div:first-child { border-left: 0; }
.fee-total-panel span, .fee-total-panel strong { display: block; }
.fee-total-panel span { color: var(--ink-soft); font-size: .68rem; }
.fee-total-panel strong { margin-top: 3px; font-size: 1.2rem; }
.credential-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.credential-card { min-height: 480px; padding: 24px; overflow: hidden; border: 1px solid #cfd8d5; border-radius: 20px; background: #fff; box-shadow: 0 9px 30px rgba(16,47,53,.08); text-align: center; break-inside: avoid; }
.credential-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.credential-top span { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; color: #fff; background: var(--navy); font-size: .7rem; font-weight: 900; }
.credential-top small { overflow: hidden; color: var(--ink-soft); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.qr-box { display: grid; min-height: 200px; margin: 20px 0 8px; place-items: center; }
.qr-box img { width: 180px; height: 180px; image-rendering: pixelated; }
.credential-card h2 { margin: 10px 0 5px; font-family: Georgia,"Times New Roman",serif; font-size: 1.75rem; line-height: 1.05; }
.credential-card > p { margin: 0; color: var(--ink-soft); font-size: .72rem; }
.credential-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); font-size: .68rem; }
.credential-meta strong { font-size: .85rem; letter-spacing: .05em; }
.scanner-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 15px; margin: 18px 0; }
.qr-reader { min-height: 310px; overflow: hidden; border: 1px dashed #adc4bf; border-radius: 14px; background: #f6faf8; }
.qr-reader video { border-radius: 12px; }
.camera-actions { display: flex; gap: 8px; margin-top: 14px; }
.camera-message { min-height: 20px; color: var(--danger); font-size: .72rem; }
.scan-form { display: grid; gap: 18px; }
.scan-result { display: flex; align-items: center; gap: 15px; margin: 16px 0; padding: 18px; border: 1px solid; border-radius: 14px; }
.scan-result > span { display: grid; flex: 0 0 45px; height: 45px; place-items: center; border-radius: 50%; font-size: 1.2rem; font-weight: 900; }
.scan-result strong { display: block; font-size: 1rem; }
.scan-result p { margin: 2px 0 0; font-size: .75rem; }
.scan-result--success { border-color: #add5c4; color: var(--success); background: var(--success-bg); }
.scan-result--success > span { color: #fff; background: var(--success); }
.scan-result--warning { border-color: #ead58e; color: var(--warning); background: var(--warning-bg); }
.scan-result--warning > span { color: #fff; background: var(--warning); }
.quick-meal-form { display: grid; grid-template-columns: 150px 160px 1fr 170px auto; gap: 9px; align-items: end; }
.session-selector { max-width: 520px; margin-bottom: 16px; }
.stats-grid--meal { grid-template-columns: repeat(3,minmax(0,1fr)); }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .main-nav { position: absolute; top: 64px; right: 14px; display: none; width: min(330px,calc(100vw - 28px)); align-items: stretch; flex-direction: column; gap: 0; padding: 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: var(--navy); box-shadow: 0 18px 45px rgba(0,0,0,.25); }
  .main-nav.is-open { display: flex; }
  .main-nav a, .nav-user { padding: 10px 9px; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px,1200px); padding-top: 32px; }
  .page-heading, .welcome-panel, .event-hero-card { align-items: flex-start; flex-direction: column; }
  .role-pills { justify-content: flex-start; }
  .action-grid, .form-grid { grid-template-columns: 1fr; }
  .catalog-grid, .registration-choice-grid, .detail-grid { grid-template-columns: 1fr; }
  .church-payment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .public-hero { align-items: flex-start; flex-direction: column-reverse; }
  .public-emblem { flex-basis: 68px; width: 68px; height: 68px; border-radius: 18px; }
  .staff-access { align-items: flex-start; flex-direction: column; }
  .scanner-layout, .quick-meal-form { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quick-add, .quick-add--group, .lookup-form, .filter-bar { grid-template-columns: 1fr; }
  .role-assignment-form { grid-template-columns: 1fr; }
  .filter-panel .form-grid { grid-template-columns: 1fr; }
  .credential-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .field--wide { grid-column: auto; }
  .event-hero-card { min-height: 210px; padding: 27px; }
  .install-card fieldset, .stack-form fieldset { padding: 18px; }
}

@media (max-width: 480px) {
  .topbar { padding-inline: 14px; }
  .brand > span:last-child { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 125px; padding: 16px; }
  .stat-card > strong { font-size: 1.9rem; }
  .auth-shell { padding-inline: 12px; }
  .auth-card { padding: 28px 20px; }
  .check-grid, .credential-grid, .fee-total-panel { grid-template-columns: 1fr; }
  .fee-total-panel div { border-top: 1px solid var(--line); border-left: 0; }
  .fee-total-panel div:first-child { border-top: 0; }
  .family-list article, .fee-summary { align-items: flex-start; flex-direction: column; }
  .stay-summary, .delete-summary { grid-template-columns: 1fr; }
  .church-payment-grid { grid-template-columns: 1fr; }
  .lodging-selector { grid-template-columns: 1fr; }
  .family-list article > div:last-child { justify-items: start; }
}

@media print {
  .topbar, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .page-shell { width: 100%; padding: 0; }
  .credential-grid { grid-template-columns: repeat(2,1fr); gap: 8mm; }
  .credential-card { min-height: 125mm; box-shadow: none; page-break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
