﻿/* Parish Management System - Holy Ghost Church, Bangalore
   Colours are taken from the church's own certificate paper: cathedral blue, deep navy and the gold band.
   Headings use Marcellus (Roman inscription capitals, like lettering carved on a church front);
   everything else uses Source Sans 3. Both fall back to Windows fonts when the internet is off. */
:root {
  --navy: #13284a;          /* header, headings */
  --blue: #1e4e9c;          /* buttons, links (cathedral blue) */
  --blue-soft: #e7eef9;
  --gold: #e9b425;          /* the one accent: active tab, focus, key totals */
  --gold-soft: #fbf2d6;
  --stone: #eef1f5;         /* page background */
  --paper: #ffffff;
  --ink: #1c2533;
  --muted: #5b6577;
  --line: #d5dce6;
  --ok: #1e6b47;
  --ok-soft: #e3f2ea;
  --warn: #7a5300;
  --warn-soft: #fbf2d6;
  --bad: #b3261e;
  --bad-soft: #fbe7e5;
  --radius: 8px;
  --accent: var(--blue);    /* older views use these names */
  --accent-ink: #ffffff;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Marcellus", "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--stone); color: var(--ink); font: 15.5px/1.5 var(--body); }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1 { font: 400 1.75rem/1.2 var(--display); color: var(--navy); margin: 0 0 6px; letter-spacing: .01em; }
h2 { font-size: 1.12rem; font-weight: 600; color: var(--navy); margin: 0 0 12px; }
h3 { color: var(--navy); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- header: navy band with the dove, a thin gold rule, then the white tab strip ---- */
.topbar { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { flex: none; }
.brand-name { font: 400 1.3rem/1.1 var(--display); letter-spacing: .02em; }
.brand small { display: block; font: 400 .82rem/1.3 var(--body); color: #c9d4e6; margin-top: 3px; }
.userbox { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: #dbe3f0; }
.userbox select { padding: 4px 6px; border-radius: 4px; border: 0; }
.userbox a, .linkbutton { color: #fff; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.4); }
.userbox a:hover, .linkbutton:hover { text-decoration-color: var(--gold); color: #fff; }
.user-name { color: #fff; font-weight: 600; }

.navbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.nav { max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; padding: 11px 11px 9px; border-bottom: 3px solid transparent; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--blue); border-bottom-color: var(--line); }
.nav a.active { color: var(--navy); border-bottom-color: var(--gold); }
.nav .nav-gap { flex: 1; }
/* line icons (Views/Shared/_Icons.cshtml) */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a .ic { color: var(--blue); }
.nav a.active .ic { color: var(--gold); }
.nav-more { position: relative; }
.nav-more summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--ink); padding: 11px 11px 9px; border-bottom: 3px solid transparent; font-weight: 600; font-size: .95rem; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover { color: var(--blue); border-bottom-color: var(--line); }
.nav-more.active summary { color: var(--navy); border-bottom-color: var(--gold); }
.nav-more summary .ic { color: var(--blue); }
.nav-more.active summary .ic { color: var(--gold); }
.nav-more summary .ic-caret { width: 15px; height: 15px; color: var(--muted); margin-left: -3px; transition: transform .15s; }
.nav-more[open] summary .ic-caret { transform: rotate(180deg); }
.nav-menu { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 210px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(19,40,74,.16); padding: 6px; }
.nav-menu a { display: flex; padding: 9px 12px; border-bottom: 0; border-radius: 6px; }
.nav-menu a:hover { background: var(--blue-soft); border-bottom: 0; }
.nav-menu a.active { background: var(--gold-soft); border-bottom: 0; }
.btn .ic { width: 17px; height: 17px; margin: -3px 6px -3px 0; vertical-align: middle; }
.nav a.nav-find { color: var(--blue); font-weight: 600; }
.nav kbd { color: var(--muted); background: var(--stone); }

/* ---- page ---- */
.page { max-width: 1240px; margin: 0 auto; padding: 26px 20px 56px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.flash { background: var(--ok-soft); color: var(--ok); border-left: 4px solid var(--ok); border-radius: 4px; padding: 10px 14px; margin-bottom: 16px; }
.alert { background: var(--bad-soft); color: var(--bad); border-left: 4px solid var(--bad); border-radius: 4px; padding: 10px 14px; margin-bottom: 16px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.notice { background: var(--warn-soft); color: var(--warn); border-left: 4px solid var(--gold); border-radius: 4px; padding: 10px 14px; margin-bottom: 16px; }

/* ---- buttons ---- */
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: 600 .95rem/1.3 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-light { background: var(--paper); color: var(--blue); border-color: #b9c8e2; }
.btn-light:hover { background: var(--blue-soft); color: var(--navy); border-color: var(--blue); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #8e1d17; border-color: #8e1d17; }
.btn-small { padding: 4px 10px; font-size: .86rem; }
.btn:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- figures on the home page ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font: 600 1.5rem/1.2 var(--body); color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span { color: var(--muted); font-size: .9rem; }
.stats .stat:first-child { border-top: 3px solid var(--gold); }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.field label, .field .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; color: var(--ink); }
.field .req { color: var(--bad); }
.field input[type=text], .field input[type=date], .field input[type=number], .field input[type=password],
.field input[type=email], .field input[type=time], .field input[type=month], .field input[type=tel], .field select, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #bfc9d8; border-radius: 6px; font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); outline-offset: 0; }
.field textarea { min-height: 70px; }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.field-validation-error { color: var(--bad); font-size: .85rem; display: block; margin-top: 3px; }
.input-validation-error { border-color: var(--bad) !important; background: var(--bad-soft) !important; }
.validation-summary-valid { display: none; }
.radios { display: flex; gap: 18px; padding-top: 6px; }
.radios label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0 0 6px; }
legend { font-weight: 600; color: var(--navy); margin-bottom: 12px; padding: 0 0 4px; border-bottom: 2px solid var(--gold); }
.age-row { display: flex; gap: 8px; }
.age-row input { flex: 1; }
.age-row select { width: 110px; }

/* ---- search bar ---- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table.list { border-collapse: collapse; width: 100%; min-width: 720px; }
table.list th, table.list td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e4e9f0; vertical-align: top; }
table.list thead th { font-size: .84rem; font-weight: 600; color: var(--navy); background: #f4f6f9; border-bottom: 1px solid var(--line); }
table.list tfoot th { background: #f4f6f9; color: var(--navy); }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #f6f9fd; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: .78rem; font-weight: 600; }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-muted { background: #e9edf3; color: var(--muted); }

/* ---- details ---- */
dl.details { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 7px 18px; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.history { font-size: .88rem; padding-left: 18px; }
.history li { margin-bottom: 6px; }

/* ---- sign-in pages ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.auth-box { width: 100%; max-width: 420px; background: var(--paper); border-radius: 10px; padding: 30px 30px 26px; border-top: 4px solid var(--gold); }
.auth-mark { display: flex; justify-content: center; margin-bottom: 10px; }
.auth-box h1 { text-align: center; font-size: 1.6rem; }
.auth-box h1 + .muted { text-align: center; margin: 0 0 20px; }
.auth-box .field { margin-bottom: 14px; }
.auth-box .btn { width: 100%; padding: 10px 16px; }

@media (max-width: 640px) {
  dl.details { grid-template-columns: 1fr; }
  dl.details dt { margin-top: 6px; }
  .topbar-inner { padding: 10px 16px; }
  .page { padding: 20px 16px 48px; }
  .nav .nav-gap { display: none; }
}

/* ---- F3 family search window ---- */
.fs-backdrop { position: fixed; inset: 0; background: rgba(19,40,74,.45); display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px; z-index: 50; }
.fs-dialog { background: var(--paper); border-radius: 10px; width: 100%; max-width: 580px; padding: 18px; border-top: 4px solid var(--gold); box-shadow: 0 14px 40px rgba(19,40,74,.3); }
.fs-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; color: var(--navy); }
.fs-input { width: 100%; padding: 11px 12px; font: inherit; font-size: 1.05rem; border: 1px solid #bfc9d8; border-radius: 6px; }
.fs-input:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); }
.fs-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.fs-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.fs-list li.on, .fs-list li[data-i]:hover { background: var(--blue-soft); }
kbd { font: .8rem/1 var(--body); font-weight: 600; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--paper); }

/* ---- new receipt screen ---- */
.rc-top { margin-bottom: 0; }
.rc-family { margin-top: 10px; line-height: 1.6; }
.rc-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; align-items: end; }
.rc-add .field input, .rc-add .field select { width: 100%; padding: 8px 10px; border: 1px solid #bfc9d8; border-radius: 6px; font: inherit; background: var(--paper); }
#itemTable tfoot th { font-size: 1.05rem; }
#itemTable tfoot #total { color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); }
.money { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Auditor reports */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.report-card { display: block; margin: 0; color: inherit; text-decoration: none; border-top: 3px solid var(--gold); transition: box-shadow .15s, transform .15s; }
.report-card:hover, .report-card:focus-visible { box-shadow: 0 4px 14px rgba(19,40,74,.14); transform: translateY(-1px); }
.report-card h2 { color: var(--navy); margin: 0 0 6px; font-size: 1.1rem; }
.report-card p { margin: 0; font-size: .92rem; }
table.list tr.subtotal td { background: var(--stone); }
table.list tr.cancelled td { color: #8a2a2a; text-decoration: line-through; text-decoration-color: rgba(138,42,42,.45); }

/* ---- Home page ---- */
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d9a312; border-color: #d9a312; color: var(--navy); }
.home-hero { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-end; justify-content: space-between;
  background: linear-gradient(120deg, #fff 0%, #fff 55%, var(--blue-soft) 100%); border: 1px solid var(--line);
  border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; }
.home-hero h1 { margin: 2px 0 4px; font: 400 1.9rem/1.15 var(--display); color: var(--navy); }
.home-date { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--blue); }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.home-main > *, .home-side > * { margin-bottom: 20px; }
.home-search h2 { margin-top: 0; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--stone); margin-bottom: 12px; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 5px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.seg input:checked + span { background: var(--paper); color: var(--navy); box-shadow: 0 1px 3px rgba(19,40,74,.18); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
.home-search-row { display: flex; gap: 8px; }
.home-search-row input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 1.05rem; border: 1px solid var(--line); border-radius: 6px; }
.home-search .hint { margin-top: 8px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.reg-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  color: inherit; text-decoration: none; border-top: 3px solid var(--blue); transition: box-shadow .15s, transform .15s; }
.reg-card:hover, .reg-card:focus-visible { box-shadow: 0 4px 14px rgba(19,40,74,.14); transform: translateY(-1px); color: inherit; }
.reg-icon { float: right; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.reg-icon .ic { width: 21px; height: 21px; }
.reg-label { display: block; font-weight: 600; color: var(--blue); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.reg-card b { display: block; font: 600 1.8rem/1.2 var(--body); color: var(--navy); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.reg-sub { color: var(--muted); font-size: .88rem; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.card-head h2 { margin-top: 0; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.recent li:first-child { border-top: 0; }
.recent li > a { font-weight: 600; }
.recent-amt { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ok); }
.recent-when { margin-left: auto; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.tag { display: inline-block; min-width: 70px; text-align: center; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 4px; background: var(--stone); color: var(--muted); }
.tag-baptism { background: var(--blue-soft); color: var(--blue); }
.tag-marriage { background: var(--gold-soft); color: var(--warn); }
.tag-death { background: #ececec; color: #444; }
.tag-family { background: var(--ok-soft); color: var(--ok); }
.tag-receipt { background: #efe9f8; color: #4b2d83; }
.today { border-top: 3px solid var(--gold); }
.today-label { font-weight: 600; color: var(--blue); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.today-amt { font: 600 2rem/1.2 var(--body); color: var(--navy); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.today-split { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--line); }
.today-split a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.today-split a:hover b { text-decoration: underline; }
.today-split small { display: block; color: var(--muted); font-size: .78rem; }
.today-split b { color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 16px 0 12px; }
.week-day { text-align: center; }
.week-bar { height: 64px; display: flex; align-items: flex-end; background: var(--stone); border-radius: 4px; overflow: hidden; }
.week-bar span { display: block; width: 100%; background: #9db3d8; border-radius: 4px 4px 0 0; }
.week-day.is-today .week-bar span { background: var(--gold); }
.week-day small { color: var(--muted); font-size: .75rem; }
.week-day.is-today small { color: var(--navy); font-weight: 600; }
.today-month { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.today-month b { color: var(--navy); font-variant-numeric: tabular-nums; }
.today-links { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.verse { background: var(--navy); color: #e3e9f3; border: 0; }
.verse p { margin: 0; font: 400 1.05rem/1.5 var(--display); }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } .home-side { order: -1; } .seg { border-radius: 12px; } }

/* ---- Mass Booking ---- */
.mb-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; margin-bottom: 18px; }
.mb-title { display: inline-flex; align-items: center; gap: 8px; font: 400 1.15rem var(--display); color: var(--navy); margin-right: 12px; }
.mb-title .ic { color: var(--gold); width: 22px; height: 22px; }
.mb-tabs a { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); text-decoration: none; }
.mb-tabs a:hover { color: var(--blue); background: var(--stone); }
.mb-tabs a.on { background: var(--blue-soft); color: var(--navy); }
.mb-day { font: 400 1.25rem var(--display); color: var(--navy); margin: 22px 0 10px; }
.mb-mass { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.mb-mass-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; background: var(--stone); border-bottom: 1px solid var(--line); }
.mb-time { background: var(--navy); color: #fff; border-radius: 5px; padding: 2px 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mb-type { font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }
.mb-type-special { background: var(--gold-soft); color: var(--warn); }
.mb-ann-tgs { background: var(--ok-soft); color: var(--ok); }
.mb-ann-dep { background: #ececec; color: #333; }
.mb-ann-int { background: var(--blue-soft); color: var(--blue); }
.mb-confirm { border: 0; border-radius: var(--radius); padding: 22px 26px; width: min(660px, calc(100vw - 32px)); box-shadow: 0 18px 48px rgba(19,40,74,.32); border-top: 4px solid var(--gold); }
.mb-confirm::backdrop { background: rgba(19,40,74,.45); }
.mb-confirm h2 { margin-top: 0; color: var(--navy); }
.mb-confirm .details { margin-bottom: 10px; }
.mb-confirm-list { max-height: 9.5em; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--stone); line-height: 1.6; }
.mb-saved { display: flex; gap: 16px; align-items: center; background: var(--ok-soft); border: 1px solid #b9dcc8; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.mb-saved h1 { margin: 0 0 2px; color: var(--ok); }
.mb-saved-mark { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; }
.mb-note { margin-top: 8px; padding: 8px 12px; border-radius: 6px; background: var(--gold-soft); border-left: 4px solid var(--gold); color: var(--warn); font-size: .92rem; }
.mb-note[hidden] { display: none; }
.sm-time { display: grid; grid-template-columns: 1fr auto 1fr 1fr; align-items: center; gap: 6px; }
.sm-time select { width: 100%; min-width: 0; }
.sm-time span { font-weight: 600; }
.mb-note.is-bad { background: var(--bad-soft); border-left-color: var(--bad); color: var(--bad); }
/* Mass schedule (configuration) */
table.list tr.ms-off td { color: #8a93a2; }
.ms-grid td.num a { font-weight: 600; }

/* Mass Booking overview */
.ov-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; border-top: 3px solid var(--blue); color: inherit; text-decoration: none; }
.ov-card:hover { box-shadow: 0 4px 14px rgba(19,40,74,.12); color: inherit; }
.ov-card.ov-gold { border-top-color: var(--gold); }
.ov-card small { display: block; color: var(--blue); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.ov-card b { display: block; font-size: 1.6rem; color: var(--navy); margin: 2px 0; font-variant-numeric: tabular-nums; }
.ov-card span { color: var(--muted); font-size: .88rem; }
.ov-card .ov-of { font-size: 1rem; }
.ov-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 14px; }
.ov-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--stone); }
.ov-seg a { padding: 5px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); text-decoration: none; }
.ov-seg a.on { background: var(--paper); color: var(--navy); box-shadow: 0 1px 3px rgba(19,40,74,.18); }
.ov-title { color: var(--navy); min-width: 170px; text-align: center; }
.ov-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: var(--muted); }
.ov-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.ov-dot-free { background: #2e9d62; } .ov-dot-near { background: #e9b425; } .ov-dot-full { background: #c0392b; } .ov-dot-off { background: #b8bec8; }
.ov-week { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ov-day { display: grid; grid-template-columns: 150px minmax(0, 1fr); border-top: 1px solid var(--line); }
.ov-day:first-child { border-top: 0; }
.ov-date { padding: 12px 14px; background: var(--stone); font-weight: 600; color: var(--navy); }
.ov-date small { display: block; color: var(--muted); font-weight: 400; }
.ov-today .ov-date { background: var(--gold-soft); }
.ov-past { opacity: .72; }
.ov-tag { display: inline-block; margin-top: 4px; font-size: .72rem; font-weight: 700; color: var(--warn); background: var(--gold-soft); border: 1px solid #f0d27a; border-radius: 4px; padding: 0 5px; }
.ov-slots { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ov-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ov-lbl { width: 66px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ov-chip { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; font-size: .88rem; background: var(--paper); text-decoration: none; color: var(--ink); }
a.ov-chip:hover { box-shadow: 0 2px 6px rgba(19,40,74,.18); color: var(--ink); }
.ov-chip b { font-variant-numeric: tabular-nums; }
.ov-chip small { color: var(--muted); font-size: .8rem; }
.ov-free { border-color: #9fd3b6; background: #eaf6ef; }
.ov-near { border-color: #f0d27a; background: #fdf6e0; }
.ov-full, .ov-booked { border-color: #e7a59d; background: #fbecea; }
.ov-off { border-color: var(--line); background: #f1f3f6; color: #7a8494; }
.ov-closed { color: #7a8494; font-style: italic; }
.ov-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ov-mh { font-weight: 700; font-size: .8rem; color: var(--muted); text-align: center; text-transform: uppercase; }
.ov-mc { display: flex; flex-direction: column; gap: 3px; min-height: 84px; padding: 6px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; color: inherit; text-decoration: none; }
a.ov-mc:hover { box-shadow: 0 2px 8px rgba(19,40,74,.16); color: inherit; }
.ov-mc.ov-empty { border: 0; background: transparent; }
.ov-mc.ov-today { border: 2px solid var(--gold); }
.ov-n { font-weight: 700; color: var(--navy); }
.ov-mt { font-size: .78rem; color: var(--muted); }
.ov-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.ov-dots .ov-dot { width: 13px; height: 13px; margin: 0; }
@media (max-width: 700px) { .ov-day { grid-template-columns: 1fr; } .ov-month { gap: 3px; } .ov-mc { min-height: 60px; padding: 4px; } .ov-mt { display: none; } }
.mb-book { align-items: start; margin-bottom: 18px; }
.mb-line { display: grid; grid-template-columns: 175px minmax(0, 1fr) auto auto; gap: 8px 10px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.mb-line:first-child { padding-top: 0; }
.mb-line .field { margin: 0; }
.mb-line-cat { grid-column: 1 / 2; }
.mb-line-int { grid-column: 2 / -1; }
.mb-line-int label { display: flex; justify-content: space-between; gap: 8px; }
.mb-same { font-weight: 400; font-size: .85rem; }
.mb-line-note { grid-column: 1 / -1; color: var(--bad); }
.mb-line-note:empty { display: none; }
.mb-total { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.05rem; }
.mb-total b { color: var(--navy); font-size: 1.25rem; margin-left: 6px; }
@media (max-width: 640px) { .mb-line { grid-template-columns: 1fr 1fr; } .mb-line-time, .mb-line-cat, .mb-line-int { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Footer credit and its pop-up */
.credit { text-align: center; font-size: .85rem; color: var(--muted); padding: 18px 16px 22px; }
.credit-link { background: none; border: 0; padding: 2px 4px; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.credit-link:hover, .credit-link:focus-visible { color: var(--navy); }
.credit-box { border: 0; border-radius: 16px; padding: 22px 22px 18px; width: min(380px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgba(19,40,74,.25); color: var(--ink); }
.credit-box::backdrop { background: rgba(19,40,74,.45); }
.credit-head { display: flex; align-items: center; gap: 14px; }
.credit-avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; padding: 0; background: var(--navy); color: var(--gold, #e0b545); display: flex; align-items: center; justify-content: center; font: inherit; font-size: 19px; font-weight: 700; cursor: default; }
.credit-box h2 { margin: 0; font-family: Marcellus, serif; font-size: 1.3rem; color: var(--navy); }
.credit-role { font-size: .85rem; color: var(--muted); }
.credit-about { margin: 14px 0 12px; font-size: .92rem; line-height: 1.55; color: var(--muted); }
.credit-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.credit-actions a { display: block; text-align: center; padding: 9px 6px; border: 1px solid #cfd6e2; border-radius: 8px; color: var(--navy); font-weight: 600; text-decoration: none; }
.credit-actions a:hover, .credit-actions a:focus-visible { background: #f1f4f9; }
.credit-note { margin: 12px 0 0; background: #faf1dc; color: #6b4a07; border-radius: 8px; padding: 9px 12px; font-size: .88rem; line-height: 1.45; }
.credit-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.credit-foot form { margin: 0; }
.credit-close { border: 1px solid #cfd6e2; background: #fff; border-radius: 8px; padding: 6px 14px; font: inherit; font-size: .9rem; color: var(--navy); cursor: pointer; }
/* the hidden Infant Jesus blessing */
.credit-box { transition: background .4s ease; }
.credit-box.blessed { background: #fffaf0; }
.credit-box.blessed .credit-avatar { background: #e0b545; color: var(--navy); }
.credit-blessing { margin: 16px 0 4px; padding: 14px 12px 14px; border-radius: 14px; background: #14213d; text-align: center; animation: creditGlow .6s ease; }
.credit-blessing svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.credit-blessing .bless-ring { fill: #f1d98b; font-family: Marcellus, serif; font-size: 13.6px; letter-spacing: 1.4px; }
.credit-prayer { margin: 6px 0 0; font-size: .86rem; color: #f5e6b8; font-style: italic; opacity: .9; }
@keyframes creditGlow { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .credit-blessing { animation: none; } .credit-box { transition: none; } }
@media print { .credit, .credit-box { display: none !important; } }
