:root {
  color-scheme: light;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: #f2f5f9;
  --ink: #1c2e4a;
  --muted: #52647b;
  --line: #d8e2ef;
  --control-line: #b9c8db;
  --accent: #2b507d;
  --accent-strong: #203c5f;
  --tint: #e7eef8;
  --wash: #f4f7fc;
  --sidebar: #1c2e4a;
  --brand-accent: #c9d9f0;
}
* { box-sizing: border-box; }
.layout.public-declaration { display: block; }
.public-declaration .sidebar, .public-declaration .topbar { display: none; }
.public-declaration .workspace { max-width: 820px; margin: auto; }
.public-declaration .workspace:has(#profile-form) { max-width: 1100px; }
.declaration-heading { text-align: center; }
.pilot-auth { max-width: 560px; margin: 24px auto; }
.pilot-header { min-height: 70px; padding: 11px max(20px, calc((100vw - 1100px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 18px; background: white; }
.pilot-header a { text-decoration: none; }
.pilot-header-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; text-align: end; }
.pilot-header-links a:last-child { white-space: nowrap; }
.pilot-brand { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.pilot-brand .brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
.pilot-page #pilot-main:has(.pilot-hero) { padding: 0; max-width: none; }
.pilot-hero { background: radial-gradient(ellipse at 10% 110%, #407789 0, transparent 48%), linear-gradient(135deg, #152547, #1b5265 68%, #227b83); color: #fff; }
.pilot-hero-inner { width: min(1100px, calc(100% - 40px)); margin-inline: auto; display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: clamp(28px, 7vw, 115px); align-items: center; padding-block: clamp(44px, 8vw, 120px); }
.pilot-intro h2 { margin: 0; font-size: clamp(33px, 4.6vw, 63px); line-height: 1.08; font-weight: 620; letter-spacing: -.04em; }
.pilot-intro p { max-width: 40ch; line-height: 1.6; color: #deedf1; }
.pilot-intro .pilot-eyebrow { color: #a8dedc; margin: 0 0 14px; }
.pilot-hero .pilot-auth { width: 100%; margin: 0; padding: clamp(22px, 3vw, 36px); color: var(--ink); box-shadow: 0 16px 50px #081c3540; }
.pilot-auth h1 { margin-top: 0; font-size: 25px; }
.pilot-auth .field-grid { grid-template-columns: 1fr; }
.pilot-auth button[type=submit] { width: 100%; }
.pilot-auth [role=status]:empty { margin: 0 0 14px; }
.pilot-remember { display: flex; align-items: center; gap: 7px; margin-top: 14px; }
@media (max-width: 720px) { .pilot-hero-inner { grid-template-columns: 1fr; } .pilot-intro h2 br { display: none; } }
.topbar:has(.account-menu) { position: relative; z-index: 5; }
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-popover { position: absolute; z-index: 6; inset-inline-end: 0; top: calc(100% + 9px); width: min(310px, 85vw); display: grid; gap: 11px; padding: 16px; box-shadow: 0 10px 30px #1c2e4a28; }
.account-popover::before { content: ""; position: absolute; inset: -9px 0 auto; height: 9px; }
.account-popover label { display: grid; gap: 5px; }
.account-popover [data-scope-picker] { display: grid; gap: 9px; }
.scope-picker-current { margin: 0; }
.account-popover select { min-width: 0; width: 100%; }
.account-popover p:empty { display: none; }
#pilot-main > .panel, #pilot-main #pilot-editor .panel { margin-bottom: 14px; }
.portal-hero { padding: clamp(22px, 5vw, 52px); margin-top: min(8vh, 64px); }
.portal-hero h1 { margin: 0; font-size: clamp(35px, 7vw, 61px); }
.portal-hero p { color: var(--muted); margin-bottom: 24px; }
.declaration-dialog { width: min(460px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 12px; padding: 24px; color: var(--ink); }
.declaration-dialog::backdrop { background: #14254180; }
.declaration-dialog h2 { margin: 0; }
.declaration-dialog p { margin: 12px 0 20px; }
.declaration-dialog form { display: flex; justify-content: flex-end; }
.duplicate-review { width: min(740px, calc(100% - 32px)); max-height: 85dvh; overflow: auto; }
.duplicate-review form { gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.duplicate-review h3 { margin: 16px 0 6px; }
.duplicate-match { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.duplicate-match a { flex-shrink: 0; }
.duplicate-actions { display: flex; align-items: end; flex-direction: column; gap: 8px; flex-shrink: 0; }
.declaration-resolution form { display: block; }
.declaration-resolution p { margin: 12px 0; }
.declaration-resolution .table-scroll { max-height: 48dvh; margin-bottom: 12px; }
.declaration-resolution :is(td, th) { white-space: normal; overflow-wrap: anywhere; }
.declaration-resolution form > .export-controls { justify-content: flex-end; }
@media (max-width: 520px) {
  .duplicate-match { flex-direction: column; }
  .duplicate-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
@media (max-width: 850px) {
  .public-declaration #profile-form .details-grid { grid-template-columns: 1fr; }
}
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #446fa9; outline-offset: 3px; }
[hidden] { display: none !important; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 26px 14px 18px; background: var(--sidebar); color: #f5f8fd; overflow: auto; }
.sidebar :focus-visible { outline-color: var(--brand-accent); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 22px; }
.sidebar-header .brand { padding-inline: 0; }
.sidebar-header .sidebar-toggle { flex: 0 0 34px; width: 34px; height: 36px; color: var(--brand-accent); background: transparent; border-color: transparent; }
.sidebar-header .sidebar-toggle:hover { background: #ffffff16; }
.mobile-menu-toggle { display: none !important; }
.workbench-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; margin: 18px 0; }
.workbench-card { display: grid; gap: 4px; color: var(--ink); text-decoration: none; }
.workbench-card:hover { border-color: var(--control-line); background: var(--wash); }
.workbench-card strong { font-size: 28px; }
.workbench-card small { color: var(--muted); }
#declaration-qr { display: block; max-width: 100%; height: auto; margin-top: 10px; image-rendering: pixelated; }
.workbench-overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(235px, 1fr); gap: 14px; align-items: start; }
.workbench-caption { color: var(--muted); font-size: 14px; margin: 7px 0 18px; }
.workbench-activities { display: grid; gap: 18px; }
.workbench-activity-label { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.workbench-activity-label a { font-weight: 650; text-decoration: none; }
.workbench-activity-label a:hover { text-decoration: underline; }
.workbench-activity-label strong { font-size: 21px; }
.workbench-activity meter { width: 100%; height: 16px; display: block; margin-block: 4px; }
.workbench-activity meter::-webkit-meter-bar { background: var(--tint); border: 0; }
.workbench-activity meter::-webkit-meter-optimum-value { background: #3679ad; }
.workbench-activity:nth-child(2) meter::-webkit-meter-optimum-value { background: #328477; }
.workbench-activity small { color: var(--muted); }
.workbench-actions { display: grid; gap: 8px; margin-top: 14px; }
.pastoral-dashboard { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; margin: 16px 0; }
.pastoral-dashboard:empty, .pastoral-dashboard:not(:has(> section)):has(> [hidden]) { display: none; }
.pastoral-dashboard-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.pastoral-dashboard-heading h2 { margin-bottom: 0; }
.pastoral-dashboard-heading > span { color: var(--muted); font-size: .9em; }
.pastoral-dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.pastoral-dashboard-stat { display: grid; gap: 4px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--wash); }
.pastoral-dashboard-stat strong { line-height: 1.15; font-size: 25px; }
.pastoral-dashboard-stat small, .pastoral-dashboard-list small { color: var(--muted); }
.pastoral-dashboard-stat strong small { font-size: .55em; font-weight: 500; }
.pastoral-dashboard-list { border-top: 1px solid var(--line); }
.pastoral-dashboard-list summary { cursor: pointer; padding-block: 11px; }
.pastoral-dashboard-count { display: inline-block; padding: 2px 8px; margin-left: 8px; border-radius: 12px; background: var(--tint); color: var(--accent-strong); font-size: .86em; }
.pastoral-dashboard-list ul { margin: 0 0 10px; padding: 0; list-style: none; }
.pastoral-dashboard-list li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 8px 0; }
.pastoral-dashboard-list li small { display: block; }
.pastoral-dashboard-list li > span { white-space: nowrap; }
.pastoral-dashboard-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-bottom: 10px; }
.pastoral-eligibility { grid-column: 1 / -1; }
.pastoral-eligibility-groups { margin: 12px 0 0; padding: 0; list-style: none; }
.pastoral-eligibility-groups > li { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(64px, auto) minmax(210px, auto); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pastoral-eligibility-groups li > div:first-child small { display: block; color: var(--muted); }
.pastoral-eligibility-groups .export-controls { justify-content: flex-end; flex-wrap: wrap; }
.pastoral-eligibility-detail { margin-top: 12px; }
.pastoral-eligibility-detail label { max-width: 370px; margin-bottom: 12px; }
.pastoral-eligibility-detail .table-scroll { margin-bottom: 10px; }
.age-pyramid { grid-column: 1 / -1; min-width: 0; }
.age-pyramid-ratios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; max-width: 730px; }
.age-pyramid-ratios > div { display: grid; gap: 3px; padding: 9px 12px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.age-pyramid-ratios strong { font-size: 1.35rem; }
.age-pyramid-ratios span { color: var(--muted); }
.age-pyramid-chart, .age-pyramid-legend { max-width: 730px; }
.age-pyramid-row, .age-pyramid-legend { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); align-items: center; gap: 5px; text-align: center; }
.age-pyramid-legend { margin: 12px 0 4px; color: var(--muted); font-weight: 600; font-size: .875rem; }
.age-pyramid-row { width: 100%; margin: 0; padding: 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .875rem; }
.age-pyramid-row:hover, .age-pyramid-row[aria-pressed="true"] { background: var(--wash); border-color: var(--control-line); }
.age-pyramid-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; align-items: center; }
.age-pyramid-male { grid-template-columns: auto minmax(0, 1fr); }
.age-pyramid-side i { display: block; width: var(--bar); height: 13px; border-radius: 3px; background: #187a70; }
.age-pyramid-male i { justify-self: end; background: #3273ad; }
.age-pyramid-side span { min-width: 2ch; font-variant-numeric: tabular-nums; }
.age-pyramid-detail { margin-top: 16px; }
.age-pyramid-detail .table-scroll { margin-bottom: 10px; }
.pastoral-parish-life { grid-column: 1 / -1; min-width: 0; }
.pastoral-parish-life-sections > section + section { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.pastoral-parish-life-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 8px 0 12px; }
.pastoral-parish-life-heading h3 { margin: 0; }
.pastoral-parish-life .pastoral-dashboard-pagination { margin-top: 10px; }
@media (min-width: 1400px) {
  .pastoral-dashboard:has(> .age-pyramid) > .pastoral-eligibility,
  .pastoral-dashboard:has(> .pastoral-eligibility) > .age-pyramid { grid-column: auto; }
}
@media (max-width: 580px) {
  .pastoral-eligibility-groups > li { grid-template-columns: minmax(0, 1fr) auto; }
  .pastoral-eligibility-groups .export-controls { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 950px) { .pastoral-dashboard { grid-template-columns: 1fr; } }
@media (max-width: 950px) { .workbench-overview { grid-template-columns: 1fr; } }
.brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px; color: inherit; text-decoration: none; line-height: 1.1; }
.brand-mark { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border: 1px solid #e5eefb; border-radius: 13px; background: linear-gradient(150deg, #eef4fd, #b9cde8); color: var(--ink); box-shadow: 0 3px 9px #101d3155; }
.brand-arch { position: relative; width: 19px; height: 24px; border: 2px solid currentColor; border-radius: 10px 10px 3px 3px; }
.brand-arch::before, .brand-arch::after { position: absolute; left: 50%; top: 50%; border-radius: 2px; background: currentColor; content: ''; }
.brand-arch::before { width: 2px; height: 11px; transform: translate(-50%, -43%); }
.brand-arch::after { width: 8px; height: 2px; transform: translate(-50%, -100%); }
.brand-wordmark { display: block; font-size: 27px; font-weight: 650; letter-spacing: -.035em; }
.brand-wordmark > span { color: var(--brand-accent); }
.brand small, .sidebar-note small { display: block; margin-top: 5px; color: #cbd8e9; font-size: 13px; font-weight: 400; }
.nav-label { margin: 30px 12px 10px; color: #cbd8e9; font-size: 13px; font-weight: 650; }
.nav-item { display: flex; gap: 10px; align-items: center; min-height: 43px; margin: 3px 0; padding: 9px 11px; border-radius: 8px; color: #f5f8fd; font-size: 14px; text-decoration: none; }
.nav-item > span { flex: 0 0 20px; text-align: center; font-size: 17px; }
a.nav-item:hover { background: #ffffff16; }
.nav-group { --nav-icon-width: 20px; --nav-icon-gap: 10px; }
.nav-group > summary {
  display: flex;
  gap: var(--nav-icon-gap);
  cursor: pointer;
  list-style: none;
}
.nav-group > summary > span { flex-basis: var(--nav-icon-width); }
.nav-group-label { font-weight: inherit; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: #ffffff16; }
.nav-group summary::after {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: .85;
}
.nav-group[open] summary::after { transform: rotate(45deg); }
a.nav-item.current { color: var(--ink); background: #dbe7f7; box-shadow: inset 3px 0 #9eb8dc; font-weight: 690; }
.nav-children .nav-item {
  min-height: 33px;
  padding-block: 7px;
  padding-inline-start: calc(11px + var(--nav-icon-width) + var(--nav-icon-gap));
  border-radius: 6px;
  font-size: 13px;
}
.nav-children .nav-item.current {
  color: #f5f8fd;
  background: #ffffff29;
  box-shadow: none;
  font-weight: inherit;
}
.nav-item.disabled { color: #cbd8e9; }
.sidebar-note { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 17px 9px 0; font-size: 13px; border-top: 1px solid #50647e; }
.demo-dot { width: 8px; height: 8px; margin-top: 5px; background: var(--brand-accent); border-radius: 50%; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; min-height: 69px; padding: 10px 28px; background: #f9fbff; border-bottom: 1px solid var(--line); }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.scope, .account { line-height: 1.3; }
.scope span, .account small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.scope .scope-title-emphasis { font-size: clamp(17px, 2vw, 21px); font-weight: 750; }
.account { display: flex; align-items: center; gap: 9px; margin-left: auto; font-size: 14px; }
.account-mark, .avatar { display: inline-grid; flex-shrink: 0; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--tint); color: var(--accent); font-size: 13px; font-weight: 700; }
main { max-width: 1670px; margin: 0 auto; padding: 28px; }
main:focus { outline: none; }
.page-heading p, .profile p { margin: 6px 0 0; color: var(--muted); }
.section-label, .page-heading .section-label, .profile .section-label { margin: 0; color: var(--accent); font-size: 14px; font-weight: 700; }
h1 { margin: 5px 0 0; font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.16; letter-spacing: -.025em; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 21px 0; }
.summary div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.summary span { color: var(--muted); font-size: 14px; }
.summary strong { color: var(--accent); font-size: 24px; font-variant-numeric: tabular-nums; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; }
.filters label { display: grid; gap: 6px; font-size: 14px; font-weight: 620; }
.search-label { flex: 1 1 230px; }
.filters input, .filters select { width: 100%; min-height: 41px; padding: 8px 11px; border: 1px solid var(--control-line); border-radius: 7px; color: var(--ink); background: #fff; font-weight: 400; }
.filters select { appearance: none; padding-right: 29px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 15px center / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 10px center / 5px 5px no-repeat; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; font-weight: 620; text-decoration: none; cursor: pointer; }
.button.muted { background: var(--wash); color: var(--accent); }
.button.secondary { background: #fff; color: var(--accent); }
.button.primary { min-height: 40px; padding-inline: 15px; background: var(--accent); border-color: var(--accent); color: #fff; }
.button.muted:hover:not(:disabled), .button.secondary:hover:not(:disabled) { background: var(--tint); }
.button.primary:hover:not(:disabled) { background: var(--accent-strong); }
.button.compact { min-height: 32px; padding: 4px 9px; }
.button:disabled { opacity: .52; cursor: default; }
.filters .button { min-height: 41px; }
.table-scroll { max-height: max(285px, calc(100dvh - 370px)); overflow: auto; border-block: 1px solid var(--line); }
table { width: 100%; border-spacing: 0; white-space: nowrap; text-align: left; }
th { position: sticky; z-index: 1; top: 0; background: var(--tint); color: var(--accent-strong); font-weight: 670; }
th, td { padding: 10px 14px; border-bottom: 1px solid #e6edf6; font-size: 14px; }
th:first-child, td:first-child { padding-left: 16px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--wash); }
.person-link { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.person-link:hover strong { text-decoration: underline; }
.person-link small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.person-table-note { margin-inline-start: 44px; }
.code { font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; justify-self: start; align-self: start; gap: 6px; padding: 4px 9px; border-radius: 20px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.verified { color: var(--accent-strong); background: var(--tint); }
.badge.pending { color: #72470a; background: #fff0d4; }
.empty { height: 94px; text-align: center; color: var(--muted); }
.pagination, .pagination div { display: flex; align-items: center; gap: 10px; }
.pagination { flex-wrap: wrap; justify-content: space-between; padding: 12px 16px; color: var(--muted); font-size: 14px; }
.back-link { display: inline-block; margin-bottom: 16px; font-weight: 650; }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 20px; }
.avatar.large { width: 58px; height: 58px; font-size: 20px; }
.profile-tabs { display: flex; gap: 6px; margin-top: 15px; padding: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.profile-tabs a, .profile-tabs button { flex-shrink: 0; padding: 9px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; cursor: pointer; }
.profile-tabs a:hover, .profile-tabs a[aria-current], .profile-tabs button:hover, .profile-tabs button[aria-pressed="true"] { color: var(--accent); background: var(--tint); }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.detail-panel { padding: 17px; }
.detail-panel h2 { margin: 0; font-size: 18px; }
.detail-panel dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 10px; margin: 15px 0 0; }
.detail-panel dt { color: var(--muted); font-size: 14px; }
.detail-panel dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.diocese-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; gap: 14px; margin-top: 20px; }
.diocese-panel { overflow: hidden; }
.diocese-panel h2 { margin: 0; padding: 15px 16px; font-size: 18px; }
.diocese-panel table { white-space: normal; }
.diocese-panel .code { width: 54px; font-weight: 700; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.account-editor { max-width: 760px; margin-top: 14px; }
.account-parish-assignment { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.account-parish-assignment #account-parish { flex: 1 1 155px; min-width: 0; }
.additional-parish-list { list-style: none; margin: 0 0 8px; padding: 0; }
.additional-parish-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.menu-permissions { margin: 22px 0 14px; }
.menu-permissions h3 { margin-bottom: 9px; }
.menu-permissions th[scope="row"] { text-align: left; }
.menu-permissions :is(td, th[scope="col"]:not(:first-child)) { text-align: center; }
.menu-permissions input[type="checkbox"] { width: 16px; height: 16px; }
.account-avatar { object-fit: cover; }
.account-list-person { display: inline-flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 650; text-decoration: none; }
.account-list-person:hover { color: var(--accent); text-decoration: underline; }
.account-list-person small { display: block; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.avatar.account-list-avatar { width: 28px; height: 28px; font-size: 11px; }
.account-profile-actions { display: flex; justify-content: flex-start; margin-top: 14px; }
.account-profile-edit.button { background: #fff; font-size: 13px; }
.filters.account-list-filters { padding-inline: 0; }
.account-list-filters label { min-width: 0; }
.account-list-filters input[type="search"] { min-width: min(230px, 100%); }
.account-list-filters select[name="don-vi"] { max-width: min(295px, 100%); }
.account-profile-avatar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.account-profile-avatar label { display: grid; gap: 5px; font-weight: 600; }
.account-profile-avatar input { max-width: 100%; }
.account-profile-avatar [data-account-remove-avatar] { margin-top: 8px; }
.account-profile-assignment { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.organization-directory { max-width: 980px; }
.organization-level { display: grid; align-content: start; gap: 8px; }
.organization-level .export-controls { gap: 6px; }
.organization-directory [data-org-editor]:not(:empty) { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.member-account-page { max-width: 960px; margin-inline: auto; padding: 24px; }
.member-account-page .panel + .panel { margin-top: 14px; }
.member-profile-fields dt { color: var(--muted); font-size: 13px; }
.member-profile-fields dd { margin: 3px 0 0; overflow-wrap: anywhere; }
[data-member-child][aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.member-child-profile { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
.member-child-class { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.member-child-class summary, .member-child-class > p { padding: 10px 12px; }
.member-child-class summary { cursor: pointer; }
.member-child-class summary small { margin-inline-start: 8px; color: var(--muted); }
.member-child-class .table-scroll { border-top: 1px solid var(--line); }
.member-attendance.present { color: #165a38; background: #e4f3eb; }
.member-attendance.excused { color: #72470a; background: #fff0d4; }
.member-attendance.absent { color: #8b2933; background: #fce8eb; }
.member-attendance.unmarked { color: var(--muted); background: var(--wash); }
.member-schedule-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; }
.member-schedule-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.member-schedule-list li + li { border-top: 1px solid var(--line); }
.member-schedule-list li div { display: grid; gap: 4px; }
.member-schedule-list small { color: var(--muted); }
.member-attendance.schedule_changed, .member-attendance.schedule_restored { color: var(--accent-strong); background: var(--tint); }
.member-attendance.schedule_cancelled { color: #8b2933; background: #fce8eb; }
.member-notifications { margin-block: 14px; }
.member-notifications summary { cursor: pointer; }
.member-notifications [data-notice-count] { margin-inline-start: 8px; }
.member-notifications [role="status"]:empty { display: none; }
.member-notifications [data-notice-list] { display: grid; gap: 6px; margin-top: 12px; max-height: 270px; overflow: auto; }
.member-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: start; cursor: pointer; }
.member-notice:hover, .member-notice[aria-pressed="true"] { background: var(--tint); }
.member-notice small { display: block; margin-top: 4px; color: var(--muted); }
.member-notice-status { display: grid; justify-items: start; }
.member-notice .member-notice-unread { color: var(--accent-strong); font-weight: 650; }
.member-notifications [data-notice-detail] { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--wash); }
.member-notifications [data-notice-detail] h3 { margin: 0 0 10px; }
.member-notice-changes { margin-bottom: 0; padding-inline-start: 20px; overflow-wrap: anywhere; }
.member-leave-panel { margin-block: 14px; }
.member-leave-panel summary { cursor: pointer; }
.member-leave-panel [data-leave-status]:empty { display: none; }
.leave-form { margin-block: 14px; }
.leave-request { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.leave-request p { margin-block: 8px; }
.leave-request form { display: grid; gap: 8px; }
.pastoral-editor { max-width: 820px; }
.member-pastoral { margin-block: 14px; }
.member-pastoral [role="status"]:empty { display: none; }
.pastoral-filters { margin-block: 12px; gap: 6px; }
[data-pastoral-type][aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.member-pastoral [data-pastoral-dates] { margin-bottom: 12px; max-width: 400px; }
.pastoral-post { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.pastoral-post h3 { margin: 8px 0; }
.pastoral-post-text { white-space: pre-wrap; margin-bottom: 0; }
.workspace-read-only :is(a[href$="/them"], a[href*="/nhap-excel"], a[href="#/so-bi-tich/cap-nhat"],
  a[href="#/duyet-tu-khai"], [data-restore], .family-form button[type="submit"]) { display: none; }
.profile-actions { margin-bottom: 14px; }
.profile-actions .back-link { margin: 0; }
.save-notice { padding: 10px 13px; border: 1px solid var(--control-line); background: var(--tint); color: var(--accent-strong); border-radius: 8px; }
.wide { grid-column: 1 / -1; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 15px; }
.field-grid label { display: grid; gap: 6px; align-content: start; color: var(--ink); font-size: 14px; font-weight: 600; }
.field-grid .required-mark { color: #a32c22; }
.field-grid input:not([type="checkbox"]), .field-grid select, .field-grid textarea, .membership-table input { width: 100%; min-width: 0; min-height: 39px; border: 1px solid var(--control-line); border-radius: 7px; padding: 7px 9px; color: var(--ink); background: #fff; font: inherit; font-weight: 400; }
.suggestion-field { display: grid; gap: 6px; align-content: start; min-width: 0; font-size: 14px; }
.suggestion-box { position: relative; min-width: 0; }
.suggestion-box:has(.suggestion-toggle) [role="combobox"] { padding-inline-end: 38px; }
.suggestion-toggle { position: absolute; inset-block: 1px; inset-inline-end: 1px; display: grid; place-items: center; width: 34px; border: 0; border-inline-start: 1px solid var(--line); border-radius: 0 6px 6px 0; background: var(--wash); color: var(--accent); cursor: pointer; }
.suggestion-toggle span { width: 7px; height: 7px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.suggestion-list { position: absolute; z-index: 3; inset-inline: 0; top: calc(100% + 4px); max-height: 224px; margin: 0; padding: 4px; overflow: auto; border: 1px solid var(--control-line); border-radius: 7px; background: #fff; box-shadow: 0 5px 18px #1c2e4a24; list-style: none; }
.suggestion-list li { padding: 7px 9px; border-radius: 4px; cursor: pointer; overflow-wrap: anywhere; }
.suggestion-list li:hover, .suggestion-list li[aria-selected="true"] { background: var(--tint); }
.suggestion-list small { display: block; margin-top: 2px; font-size: 12px; }
[data-extra-parishes] .suggestion-list { position: static; margin-top: 4px; box-shadow: none; }
.field-grid input[type="file"] { font-size: 13px; }
.field-grid textarea { resize: vertical; }
.field-grid small { color: var(--muted); }
.field-grid .check-label { display: flex; align-items: center; }
.membership-table { margin-top: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.membership-table input { min-width: 124px; }
.membership-table td:first-child input { min-width: 175px; }
.class-schedule-table .check-label { display: inline-flex; align-items: center; gap: 7px; }
.class-schedule-table input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; min-height: 16px; flex: none; margin: 0; }
.class-schedule-table input[type="date"] { min-width: 130px; }
.class-schedule-table input[type="time"] { min-width: 98px; }
.class-schedule-table :is(.button, .table-note) { white-space: nowrap; }
.session-count { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.form-actions { position: sticky; z-index: 2; bottom: 0; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.form-actions p { flex: 1 1 230px; margin: 0; color: #a32c22; }
img.avatar { object-fit: cover; }
.family-list, .family-form, .register-list { margin-top: 18px; }
.family-form > .panel + .panel { margin-top: 14px; }
.family-children td:first-child { width: 44%; }
.family-children select { width: 100%; min-width: 150px; min-height: 39px; padding: 7px 9px; border: 1px solid var(--control-line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; }
.family-children td:first-child select { min-width: 200px; }
.family-children select:disabled { background: var(--wash); color: var(--muted); }
.children-count { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.section-hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.marriage-source .detail-panel { border: 0; }
.marriage-source-footer { padding: 10px 17px; border-top: 1px solid var(--line); }
.marriage-source-footer .section-hint { margin: 0; }
.banns-rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 16px; }
.banns-round { min-width: 0; margin: 0; padding: 0 13px 13px; border: 1px solid var(--line); border-radius: 9px; }
.banns-round legend { padding-inline: 6px; color: var(--accent-strong); font-weight: 650; }
.banns-round .field-grid { gap: 9px; margin-top: 7px; }
.banns-round input:disabled { background: var(--wash); color: var(--muted); }
.table-note { display: block; margin-top: 4px; color: var(--muted); }
.club-members td:first-child { width: 34%; }
.club-members td:last-child { min-width: 128px; }
.club-members .table-note { margin: 0; }
.export-bar { border-top: 1px solid var(--line); }
.export-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.transfer-content { display: grid; gap: 14px; }
.transfer-card summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.transfer-units dt { font-size: 13px; color: var(--muted); }
.transfer-units dd { margin: 3px 0 0; }
.transfer-history { margin: 10px 0 0; padding-inline-start: 22px; overflow-wrap: anywhere; }
.transfer-history li + li { margin-top: 10px; }
.transfer-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.transfer-content form .export-controls { margin-top: 14px; }
.transfer-notice { margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--tint); color: var(--accent-strong); }
.excel-list-controls { padding: 14px 16px; border-bottom: 1px solid var(--line, #d9e2ef); }
#excel-preview:not(:empty) { margin: 12px 0; }
.club-export { margin-top: 12px; font-size: 14px; }
.club-export label { display: inline-flex; align-items: center; gap: 5px; }
.export-status { align-self: center; color: var(--muted); font-size: 14px; }
.class-pane { margin-top: 14px; }
.class-pane > .panel + .panel { margin-top: 14px; }
.class-roster-table td:last-child { min-width: 112px; }
.class-teacher-table td:first-child { width: 72%; }
.class-teacher-footer { margin-top: 10px; }
.class-teacher-footer p { margin: 0; }
.attendance-table select, .attendance-table input { width: 100%; min-width: 145px; min-height: 37px; border: 1px solid var(--control-line); border-radius: 7px; padding: 7px 9px; color: var(--ink); background: #fff; }
.attendance-table td:last-child { width: 44%; }
.class-results-table .result-check { display: inline-flex; align-items: center; gap: 6px; }
.class-results-table input[type="date"] { min-width: 135px; }
.field-grid input[data-confirmed-class] { background: var(--wash); }
.statistics-table tbody th, .statistics-table tfoot th { position: static; }
.statistics-table tbody th { background: #fff; }
.statistics-summary-table td, .statistics-summary-table thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.statistics-table tfoot { background: var(--tint); font-weight: 650; }
.statistics-note { margin: 0; }
.statistics-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); align-items: end; }
.statistics-filters label, .statistics-filters select { min-width: 0; }
.statistics-filters > .statistics-note { grid-column: 1 / -1; order: 1; margin-top: 2px; }
.declaration-review > .field-grid:first-of-type { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.managed-workspace-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.new-person-parish .managed-workspace-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-transfer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-transfer-heading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 10px; }
.profile-transfer-heading .button { justify-self: start; }
.profile-transfer h3 { margin: 0; font-size: 15px; }
.profile-transfer dl { margin-top: 10px; }
@media (max-width: 450px) {
  .new-person-parish .managed-workspace-fields { grid-template-columns: 1fr; }
}
[data-managed-status]:empty { display: none; }
.bulk-sacrament-table input[type="text"] { width: 100%; min-width: 115px; min-height: 37px; border: 1px solid var(--control-line); border-radius: 7px; padding: 7px 9px; color: var(--ink); }
.bulk-sacrament-table input[data-bulk-detail="sponsor"] { min-width: 163px; }
.bulk-sacrament-table input[type="text"]:disabled { background: var(--wash); }

@media (min-width: 761px) {
  .layout.menu-collapsed { grid-template-columns: 56px minmax(0, 1fr); }
  .menu-collapsed .sidebar { padding-inline: 7px; }
  .menu-collapsed .sidebar-header { justify-content: center; }
  .menu-collapsed :is(.brand, .nav-group-label, .nav-children, .sidebar-note),
  .menu-collapsed .nav-group summary::after { display: none; }
  .menu-collapsed .nav-item { justify-content: center; padding-inline: 0; }
  .menu-collapsed .nav-group:has(a.current) > summary { background: #ffffff29; }
}
@media (max-width: 760px) {
  .mobile-menu-toggle { display: grid !important; }
  .layout { display: block; }
  .sidebar { position: fixed; z-index: 3; top: 64px; inset-inline-start: 0; width: min(260px, 85vw); height: calc(100dvh - 64px); box-shadow: 8px 0 25px #1c2e4a55; }
  .layout:not(.menu-open) .sidebar { display: none; }
  .topbar { position: sticky; z-index: 4; top: 0; height: 64px; min-height: 64px; padding: 8px 13px; }
  main { padding: 18px 13px; }
  .summary { gap: 7px; }
  .summary div { display: grid; padding: 9px; }
  .filters { gap: 9px; padding: 11px; }
  .details-grid { grid-template-columns: 1fr; }
  .profile { grid-template-columns: auto minmax(0, 1fr); padding: 13px; }
  .profile .badge { grid-column: 2; }
  .account > span:last-child { display: none; }
}
@media (max-width: 450px) {
  .field-grid { grid-template-columns: 1fr; }
}
@media print {
  .layout:has(#report-content) { display: block; }
  .layout:has(#report-content) :is(.sidebar,.topbar,.profile-tabs,.report-actions,.field-grid) { display: none; }
}
.report-chart meter { width: min(48vw, 300px); }

.password-field { min-width: 0; }
.password-visibility { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: .85rem; }
.password-visibility input { width: 14px; height: 14px; margin: 0; }
.password-field:has(> label[hidden]) .password-visibility { display: none; }

.sidebar-footer { margin-top: auto; text-align: center; }
.sidebar-sign-out { margin-bottom: 12px; color: #f5f8fd; border-color: #ffffff45; background: #ffffff10; }
.sidebar-sign-out[hidden] { display: none; }
.sidebar-sign-out:hover { background: #ffffff27; }
.sidebar-support { display: block; text-align: center; }
.sidebar-support > strong { display: flex; justify-content: center; align-items: center; gap: 8px; }
.support-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd8e9; }

.auth-demo-accounts { display: grid; gap: .65rem; margin-top: 1rem; color: #e5f2f6; }
.auth-demo-accounts p { max-width: none; margin: 0; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.auth-demo-accounts a { color: #fff; width: fit-content; }
