:root {
    --ink: #1f2937;
    --muted: #667085;
    --line: #e5e7eb;
    --panel: #ffffff;
    --soft: #f5f7fb;
    --primary: #2457a6;
}

body {
    background: var(--soft);
    color: var(--ink);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -.5rem;
    margin-left: -.5rem;
}

.row > * {
    box-sizing: border-box;
    max-width: 100%;
    padding-right: .5rem;
    padding-left: .5rem;
}

.g-3 {
    row-gap: 1rem;
}

.col-sm-6,
.col-md-3,
.col-md-4,
.col-md-6,
.col-lg-4,
.col-xl-3 {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 576px) {
    .col-sm-6 { width: 50%; }
}

@media (min-width: 768px) {
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.333333%; }
    .col-md-6 { width: 50%; }
}

@media (min-width: 992px) {
    .col-lg-4 { width: 33.333333%; }
}

@media (min-width: 1200px) {
    .col-xl-3 { width: 25%; }
}

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.h-100 { height: 100%; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.p-0 { padding: 0; }
.p-4 { padding: 1.5rem; }
.mx-auto { margin-right: auto; margin-left: auto; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-danger { color: #dc3545; }
.fw-semibold { font-weight: 600; }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    vertical-align: middle;
}

.table th,
.table td {
    padding: .75rem;
    border-bottom: 1px solid var(--line);
}

.table thead th {
    color: #475467;
    font-size: .78rem;
    text-transform: uppercase;
    background: #f8fafc;
}

.table-hover tbody tr:hover {
    background: #f9fafb;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: .45rem .8rem;
    color: #1f2937;
    background: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.btn-sm,
.btn-group-sm > .btn {
    min-height: 32px;
    padding: .3rem .55rem;
    font-size: .875rem;
}

.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-warning { color: #fff; background: #f97316; border-color: #f97316; }
.btn-danger { color: #fff; background: #dc3545; border-color: #dc3545; }
.btn-light { background: #f8f9fa; border-color: #f1f3f5; }
.btn-link { color: var(--primary); background: transparent; border-color: transparent; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-secondary { color: #667085; border-color: #cbd5e1; }
.btn-outline-success { color: #198754; border-color: #198754; }
.btn-outline-danger { color: #dc3545; border-color: #dc3545; }

.btn-group,
.btn-group-sm {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group > .btn,
.btn-group-sm > .btn {
    border-radius: 0;
}

.btn-group > .btn:first-child,
.btn-group-sm > .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-group > .btn:last-child,
.btn-group-sm > .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.form-label {
    display: inline-block;
    margin-bottom: .35rem;
    font-weight: 700;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    min-height: 40px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: .5rem .7rem;
    color: var(--ink);
    background: #fff;
}

.form-text {
    margin-top: .25rem;
    color: var(--muted);
    font-size: .875rem;
}

.input-group {
    display: flex;
    width: 100%;
}

.input-group > .form-control {
    flex: 1 1 auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn {
    border-radius: 0;
}

.input-group > .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    min-width: 12rem;
    margin: .125rem 0 0;
    padding: .5rem 0;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item,
.dropdown-header {
    display: block;
    width: 100%;
    padding: .5rem 1rem;
    color: var(--ink);
    text-decoration: none;
}

.dropdown-header {
    color: var(--muted);
    font-weight: 800;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1055;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-dialog {
    width: auto;
    max-width: 500px;
    margin: 1.75rem auto;
}

.modal-lg {
    max-width: 800px;
}

.modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
    display: flex;
    align-items: center;
}

.modal-dialog-scrollable {
    max-height: calc(100% - 3.5rem);
}

.modal-content {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.modal-body {
    padding: 1rem;
}

.btn-close {
    width: 1em;
    height: 1em;
    border: 0;
    background: transparent;
    opacity: .65;
    cursor: pointer;
}

.btn-close::before {
    content: "x";
    font-size: 1.4rem;
    line-height: 1;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(22, 32, 51, .96)),
        #162033;
    color: #fff;
    padding: 22px 16px;
    box-shadow: 14px 0 40px rgba(15, 23, 42, .16);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    color: #fff;
    font-size: 1.06rem;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.2;
}

.brand::before {
    content: "SQ";
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #f7c948, #f59e0b);
    color: #162033;
    font-size: .9rem;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(247, 201, 72, .18);
}

.sidebar .nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    color: #d8deea;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 700;
    line-height: 1.2;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.sidebar .nav-link::before {
    content: "";
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: rgba(216, 222, 234, .36);
    box-shadow: 0 0 0 4px rgba(255,255,255,.04);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(36, 87, 166, .95), rgba(20, 150, 109, .82));
    color: #fff;
    transform: translateX(3px);
    box-shadow: 0 12px 26px rgba(4, 12, 24, .22);
}

.sidebar .nav-link:hover::before,
.sidebar .nav-link.active::before {
    background: #f7c948;
    box-shadow: 0 0 0 4px rgba(247, 201, 72, .16);
}

.finance-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.sidebar .nav-sublink {
    font-size: .92rem;
    min-height: 36px;
    margin-left: 16px;
    padding-left: 14px;
    color: rgba(216, 222, 234, .86);
}

.sidebar .nav-sublink::before {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
}

.finance-submenu {
    display: none;
    margin: 4px 0 8px;
    padding-left: 4px;
    border-left: 1px solid rgba(255,255,255,.14);
}

.finance-submenu.open {
    display: grid;
    gap: 4px;
}

.main {
    min-width: 0;
}

.topbar {
    min-height: 72px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
    backdrop-filter: blur(12px);
}

.topbar-user-name strong {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #162033;
}

.topbar-user-name strong::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #12b76a;
    box-shadow: 0 0 0 5px rgba(18, 183, 106, .13);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-photo-wrap {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.user-access-level {
    max-width: 96px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
}

.birthday-notification {
    position: relative;
}

.event-notification {
    position: relative;
}

.event-button {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    position: relative;
    border: 1px solid #fde7bc;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff, #fff7e8);
    color: #b45309;
    box-shadow: 0 10px 24px rgba(180, 83, 9, .13);
}

.event-button:hover,
.event-button:focus {
    border-color: #d97706;
    color: #92400e;
    background: #fff7e8;
    box-shadow: 0 12px 28px rgba(180, 83, 9, .2);
}

.event-icon {
    width: 20px;
    height: 20px;
    position: relative;
    display: block;
    border: 2px solid currentColor;
    border-radius: 6px;
}

.event-icon::before {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 5px;
    border-top: 2px solid currentColor;
}

.event-icon::after {
    content: "";
    width: 4px;
    height: 4px;
    position: absolute;
    right: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: -7px 0 0 currentColor;
}

.event-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    position: absolute;
    top: -4px;
    right: -4px;
    border-radius: 999px;
    background: #d92d20;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    border: 2px solid #fff;
}

.event-menu {
    width: 330px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 18px 45px rgba(31, 41, 55, .14);
}

.event-item {
    display: block;
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.event-item:hover {
    background: #fff7e8;
    color: var(--ink);
}

.event-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.event-item-head strong {
    line-height: 1.2;
}

.event-item-head span {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: .72rem;
    font-weight: 800;
}

.event-item small,
.event-item em,
.event-empty {
    display: block;
    color: var(--muted);
    font-size: .88rem;
}

.event-item em {
    margin-top: 2px;
    font-style: normal;
}

.event-empty {
    padding: 10px 16px;
}

.birthday-button {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    position: relative;
    border: 1px solid #d7e3f7;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #eef4ff);
    color: var(--primary);
    box-shadow: 0 10px 24px rgba(36, 87, 166, .14);
}

.birthday-button:hover,
.birthday-button:focus {
    border-color: #2457a6;
    color: #2457a6;
    background: #eef4ff;
    box-shadow: 0 12px 28px rgba(36, 87, 166, .2);
}

.birthday-icon {
    width: 18px;
    height: 20px;
    position: relative;
    display: block;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 4px 4px;
}

.birthday-icon::before {
    content: "";
    width: 8px;
    height: 4px;
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.birthday-icon::after {
    content: "";
    width: 8px;
    height: 8px;
    position: absolute;
    left: 50%;
    bottom: -7px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 -4px 0 -2px currentColor;
}

.birthday-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    position: absolute;
    top: -4px;
    right: -4px;
    border-radius: 999px;
    background: #d92d20;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    border: 2px solid #fff;
}

.birthday-menu {
    width: 280px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 18px 45px rgba(31, 41, 55, .14);
}

.birthday-item {
    padding: 10px 16px;
    border-top: 1px solid var(--line);
}

.birthday-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.birthday-item strong,
.birthday-item span {
    display: block;
}

.birthday-origin {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2457a6;
    font-size: .72rem;
    font-weight: 700;
}

.birthday-item span,
.birthday-empty {
    color: var(--muted);
    font-size: .9rem;
}

.birthday-item .birthday-origin {
    display: inline-block;
    color: #2457a6;
    font-size: .72rem;
}

.birthday-empty {
    padding: 10px 16px;
}

.user-box img,
.preview-img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid var(--line);
}

.user-box img,
.preview-img {
    object-fit: cover;
}

.content {
    padding: 24px;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-title h2 {
    margin: 0;
    font-size: 1.5rem;
}

.page-title p {
    color: var(--muted);
    margin: 4px 0 0;
}

.panel,
.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.metric span {
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

.metric strong {
    font-size: 1.8rem;
}

.section-title {
    color: #344054;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-form {
    width: min(100%, 760px);
    padding: 10px;
    border: 1px solid #cddcf3;
    background:
        linear-gradient(135deg, rgba(36, 87, 166, .1), rgba(20, 150, 109, .08)),
        #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.search-form .input-group {
    gap: 7px;
    align-items: center;
    border-radius: 8px;
    flex-wrap: nowrap;
}

.search-form .form-control {
    min-height: 40px;
    border-radius: 8px !important;
    border: 1px solid #bfd0ea;
    background: #fff;
    color: #243247;
    font-size: .94rem;
    padding: 8px 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.search-form .form-control:focus {
    border-color: #2457a6;
    box-shadow: 0 0 0 .18rem rgba(36, 87, 166, .13);
}

.search-form .btn {
    min-height: 40px;
    border-radius: 8px !important;
    font-size: .9rem;
    font-weight: 800;
    padding: 8px 14px;
    white-space: nowrap;
}

.search-form .search-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: linear-gradient(135deg, #2457a6, #14966d);
    color: #fff;
    box-shadow: 0 8px 18px rgba(36, 87, 166, .2);
}

.search-form .search-submit::before {
    content: "";
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 7px 7px 0 -5px currentColor;
    transform: rotate(-12deg);
}

.search-form .search-submit:hover,
.search-form .search-submit:focus {
    color: #fff;
    background: linear-gradient(135deg, #1f4d94, #0f7f5c);
    box-shadow: 0 10px 22px rgba(20, 150, 109, .24);
}

.search-form .clear-search {
    background: rgba(255, 255, 255, .82);
    border-color: #d6deeb;
    color: #5e6f88;
}

.search-form .clear-search:hover,
.search-form .clear-search:focus {
    background: #eef4fb;
    border-color: #c6d3e4;
    color: #344054;
}

.metric-blue {
    border-left: 5px solid #2457a6;
}

.metric-green {
    border-left: 5px solid #12b76a;
}

.metric-amber {
    border-left: 5px solid #f59e0b;
}

.metric-red {
    border-left: 5px solid #f04438;
}

.metric-cyan {
    border-left: 5px solid #06aed4;
}

.metric-purple {
    border-left: 5px solid #7c3aed;
}

.finance-map {
    display: grid;
    gap: 18px;
}

.finance-row-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.finance-track {
    height: 14px;
    background: #edf0f5;
    border-radius: 999px;
    overflow: hidden;
}

.finance-bar {
    height: 100%;
    border-radius: inherit;
}

.finance-blue {
    background: #2457a6;
}

.finance-green {
    background: #12b76a;
}

.finance-amber {
    background: #f59e0b;
}

.finance-cyan {
    background: #06aed4;
}

.finance-purple {
    background: #7c3aed;
}

.finance-red {
    background: #f04438;
}

.finance-map-cards {
    align-items: stretch;
}

.finance-map-card {
    min-height: 132px;
    height: 100%;
    border-left-width: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.finance-map-card span {
    font-size: 1rem;
    font-weight: 600;
}

.finance-map-card strong {
    display: block;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    word-break: break-word;
}

.finance-map-card-navy {
    border-left-color: #2457a6;
}

.finance-map-card-teal {
    border-left-color: #0f766e;
}

.finance-map-card-violet {
    border-left-color: #7c3aed;
}

.finance-map-card-green {
    border-left-color: #16a34a;
}

.finance-map-card-emerald {
    border-left-color: #059669;
}

.finance-map-card-amber {
    border-left-color: #d97706;
}

.finance-map-card-orange {
    border-left-color: #ea580c;
}

.finance-map-card-rose {
    border-left-color: #e11d48;
}

.finance-map-card-red {
    border-left-color: #dc2626;
}

.finance-summary-grid {
    margin-top: 4px;
}

.finance-overview-grid {
    align-items: stretch;
}

.finance-summary-card {
    min-height: 136px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 22px;
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--line);
    border-left-width: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.finance-summary-card::after {
    content: none;
}

.finance-summary-card::before {
    content: none;
}

.finance-summary-card span {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    position: relative;
    z-index: 1;
}

.finance-summary-card strong {
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.1;
    position: relative;
    z-index: 1;
    word-break: break-word;
}

.finance-summary-navy {
    border-left-color: #2457a6;
}

.finance-summary-teal {
    border-left-color: #0f766e;
}

.finance-summary-violet {
    border-left-color: #7c3aed;
}

.finance-summary-green {
    border-left-color: #16a34a;
}

.finance-summary-emerald {
    border-left-color: #059669;
}

.finance-summary-amber {
    border-left-color: #d97706;
}

.finance-summary-orange {
    border-left-color: #ea580c;
}

.finance-summary-rose {
    border-left-color: #e11d48;
}

.finance-summary-red {
    border-left-color: #dc2626;
}

.action-buttons {
    white-space: nowrap;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.table-action {
    width: auto;
    min-width: 92px;
    height: auto;
    min-height: 36px;
    padding: .42rem .82rem;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 10px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 0 1px 1px rgba(15, 23, 42, .22);
    box-shadow:
        0 10px 20px rgba(15, 23, 42, .14),
        inset 0 1px 0 rgba(255, 255, 255, .34);
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, border-color .18s ease;
}

.table-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,.34), rgba(255,255,255,0) 42%),
        linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0));
    pointer-events: none;
}

.table-action:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .58);
    box-shadow:
        0 16px 30px rgba(15, 23, 42, .22),
        inset 0 1px 0 rgba(255, 255, 255, .42);
    filter: saturate(1.16) brightness(1.03);
}

.table-action:active {
    transform: translateY(0);
    box-shadow: 0 7px 14px rgba(15, 23, 42, .14);
}

.table-action:focus-visible {
    outline: 3px solid rgba(36, 87, 166, .24);
    outline-offset: 2px;
}

.table-action-view {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 54%, #06b6d4 100%);
}

.table-action-edit {
    background: linear-gradient(135deg, #047857 0%, #16a34a 56%, #65a30d 100%);
}

.table-action-delete {
    background: linear-gradient(135deg, #be123c 0%, #e11d48 52%, #ef4444 100%);
}

.status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    border: 3px solid rgba(255,255,255,.8);
}

.status-dot.green {
    background: #12b76a;
}

.status-dot.red {
    background: #f04438;
}

.modal.show {
    background: rgba(15, 23, 42, .45);
}

.delete-confirm {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.delete-confirm-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #d92d20;
    border: 8px solid #fee4e2;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.message-confirm-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #12b76a;
    border: 8px solid #d1fadf;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.message-confirm-icon.danger {
    background: #d92d20;
    border-color: #fee4e2;
}

.message-confirm-text {
    color: var(--ink);
    font-weight: 700;
}

.app-loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 42%, rgba(20, 150, 109, .18), transparent 28%),
        radial-gradient(circle at 48% 54%, rgba(36, 87, 166, .24), transparent 34%),
        rgba(15, 23, 42, .48);
    backdrop-filter: blur(7px);
}

.app-loading.is-visible {
    display: grid;
}

.app-loading-box {
    min-width: min(320px, 100%);
    position: relative;
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 30px 32px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(238, 244, 255, .94)),
        #fff;
    color: #162033;
    box-shadow: 0 34px 90px rgba(15, 23, 42, .34);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.app-loading-box::before {
    content: "";
    width: 180px;
    height: 180px;
    position: absolute;
    top: -96px;
    right: -78px;
    z-index: -1;
    border-radius: 50%;
    background: rgba(20, 150, 109, .14);
}

.app-loading-box::after {
    content: "";
    width: 120px;
    height: 120px;
    position: absolute;
    left: -56px;
    bottom: -62px;
    z-index: -1;
    border-radius: 50%;
    background: rgba(36, 87, 166, .13);
}

.app-loading-art {
    width: 82px;
    height: 82px;
    display: block;
    position: relative;
    border-radius: 50%;
    background:
        url("loading-spinner.jfif") center / cover no-repeat,
        #05070b;
    box-shadow:
        0 0 0 8px rgba(36, 87, 166, .08),
        0 0 0 16px rgba(20, 150, 109, .06),
        0 16px 34px rgba(36, 87, 166, .24);
    animation: appLoadingPulse 1.5s ease-in-out infinite;
}

.app-loading-art::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #14966d;
    border-right-color: #2457a6;
    animation: appLoadingSpin 1s linear infinite;
}

.app-loading-text {
    color: #182230;
    font-size: .98rem;
    font-weight: 900;
}

.app-loading-text::after {
    content: "";
    display: inline-block;
    width: 1.1em;
    text-align: left;
    animation: appLoadingDots 1.3s steps(4, end) infinite;
}

.btn.is-loading {
    pointer-events: none;
    opacity: .82;
}

.btn.is-loading::after {
    content: "";
    width: 1em;
    height: 1em;
    display: inline-block;
    margin-left: .55rem;
    vertical-align: -.15em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: appLoadingSpin .7s linear infinite;
}

.modal-loading-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 700;
}

.modal-loading-state::before {
    content: "";
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background:
        url("loading-spinner.jfif") center / cover no-repeat,
        #05070b;
    box-shadow:
        0 0 0 7px rgba(36, 87, 166, .08),
        0 12px 26px rgba(15, 23, 42, .16);
    animation: appLoadingPulse 1.5s ease-in-out infinite;
}

@keyframes appLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes appLoadingPulse {
    0%,
    100% {
        transform: scale(1);
        filter: saturate(1);
    }

    50% {
        transform: scale(1.06);
        filter: saturate(1.18);
    }
}

@keyframes appLoadingDots {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75%,
    100% {
        content: "...";
    }
}

.delete-confirm-message {
    color: var(--ink);
    font-weight: 700;
}

.delete-confirm-name {
    color: #d92d20;
    font-weight: 700;
    word-break: break-word;
}

.toast.show {
    display: block;
    opacity: 1;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(36, 87, 166, .12), transparent 28%),
        linear-gradient(135deg, #f7fafc 0%, #eef4ff 45%, #f8fbf6 100%);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1fr 420px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(31, 41, 55, .16);
}

.login-intro {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    background: linear-gradient(145deg, #162033, #2457a6);
    color: #fff;
}

.login-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.28);
    font-weight: 800;
    margin-bottom: 24px;
}

.login-intro h1 {
    font-size: 2.1rem;
    margin-bottom: 12px;
}

.login-intro p {
    max-width: 360px;
    color: rgba(255,255,255,.78);
    margin: 0;
}

.login-card {
    background: #fff;
    padding: 46px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card-head {
    margin-bottom: 26px;
}

.login-card-head span {
    color: var(--primary);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.login-card h2 {
    font-size: 1.55rem;
    margin: 6px 0 0;
}

.login-card .form-control {
    min-height: 48px;
    border-radius: 6px;
}

.login-card .btn {
    min-height: 48px;
    border-radius: 6px;
    font-weight: 700;
}

.user-menu {
    position: relative;
}

.user-photo-button {
    padding: 0;
    border: 0;
    background: transparent;
}

.user-photo-button:focus-visible {
    outline: 3px solid rgba(36, 87, 166, .28);
    outline-offset: 4px;
    border-radius: 8px;
}

.user-dropdown {
    min-width: 170px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 18px 45px rgba(31, 41, 55, .16);
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 2px;
    padding: 11px 14px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #f97316);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(225, 29, 72, .25);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.logout-link:hover,
.logout-link:focus {
    color: #fff;
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 14px 30px rgba(225, 29, 72, .32);
}

.logout-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    font-size: 1rem;
    line-height: 1;
}

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.user-dropdown-head img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-dropdown-head strong,
.user-dropdown-head span {
    display: block;
}

.user-dropdown-head span {
    color: var(--muted);
    font-size: .86rem;
    word-break: break-word;
}

.member-profile {
    display: grid;
    gap: 18px;
}

.member-profile-head {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 8px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(22, 32, 51, .95), rgba(36, 87, 166, .92)),
        linear-gradient(45deg, transparent, rgba(255,255,255,.12));
}

.member-profile-head img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid rgba(255,255,255,.28);
    background: #fff;
}

.member-profile-head span {
    display: inline-block;
    margin-bottom: 6px;
    color: #f7c948;
    font-weight: 800;
    text-transform: uppercase;
    font-size: .78rem;
}

.member-profile-head h3 {
    margin: 0;
    font-size: clamp(1.4rem, 2.8vw, 2.1rem);
}

.member-profile-head p {
    margin: 6px 0 0;
    color: rgba(255,255,255,.8);
}

.member-profile-grid,
.member-family {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.member-family {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-profile-grid > div,
.member-family > div {
    min-height: 88px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.member-profile-grid span,
.member-family span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.member-profile-grid strong,
.member-family strong {
    display: block;
    color: var(--ink);
    font-size: .98rem;
    word-break: break-word;
}

.record-profile {
    display: grid;
    gap: 16px;
}

.record-profile-hero {
    display: grid;
    grid-template-columns: 136px 1fr;
    gap: 20px;
    align-items: center;
    min-height: 190px;
    padding: 22px;
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #162033, #2457a6);
}

.record-profile-pastor .record-profile-hero {
    background: linear-gradient(135deg, #0f5132, #14966d);
}

.record-profile-user .record-profile-hero {
    background: linear-gradient(135deg, #3b265f, #7c3aed);
}

.record-profile-hero::after {
    content: "";
    width: 220px;
    height: 220px;
    position: absolute;
    right: -70px;
    top: -80px;
    border-radius: 50%;
    border: 38px solid rgba(255,255,255,.12);
}

.record-profile-photo {
    width: 136px;
    height: 136px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
    position: relative;
    z-index: 1;
}

.record-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

.record-profile-hero > div:last-child {
    position: relative;
    z-index: 1;
}

.record-profile-hero span {
    color: #f7c948;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.record-profile-hero h3 {
    margin: 8px 0 6px;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.record-profile-hero p {
    margin: 0 0 10px;
    color: rgba(255,255,255,.82);
}

.record-profile-hero strong {
    display: inline-flex;
    max-width: 100%;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: #fff;
    word-break: break-word;
}

.record-profile-highlights,
.record-profile-grid,
.record-profile-family {
    display: grid;
    gap: 12px;
}

.record-profile-highlights {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.record-profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-profile-family {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-profile-highlights > div,
.record-profile-grid > div,
.record-profile-family > div {
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.record-profile-highlights > div {
    border-top: 4px solid #2457a6;
}

.record-profile-pastor .record-profile-highlights > div {
    border-top-color: #14966d;
}

.record-profile-user .record-profile-highlights > div {
    border-top-color: #7c3aed;
}

.record-profile-highlights span,
.record-profile-grid span,
.record-profile-family span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.record-profile-highlights strong,
.record-profile-grid strong,
.record-profile-family strong {
    display: block;
    color: var(--ink);
    word-break: break-word;
}

.attendance-profile {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.attendance-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.attendance-profile-head span {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.attendance-profile-head h4 {
    margin: 4px 0 0;
}

.attendance-totals {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.attendance-totals strong {
    min-width: 94px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-align: center;
    border: 1px solid var(--line);
}

.attendance-totals span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .74rem;
}

.attendance-profile .table {
    margin: 0;
}

.single-attendance {
    display: grid;
    gap: 14px;
}

.single-attendance-head {
    padding: 18px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #162033, #2457a6);
}

.single-attendance-head span {
    color: #f7c948;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.single-attendance-head h4 {
    margin: 6px 0 0;
}

.print-page {
    background: #eef1f6;
    padding: 28px;
}

.member-print-sheet {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 34px;
    background: #fff;
    color: #111827;
    border: 1px solid #d7dce5;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .15);
}

.member-print-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 3px solid #2457a6;
}

.member-print-sheet header span {
    color: #2457a6;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.member-print-sheet h1 {
    margin: 6px 0 0;
    font-size: 2rem;
}

.member-print-sheet header img {
    width: 112px;
    height: 132px;
    object-fit: cover;
    border: 1px solid #98a2b3;
}

.member-print-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #d7dce5;
    border-left: 1px solid #d7dce5;
}

.member-print-grid > div {
    min-height: 66px;
    padding: 10px 12px;
    border-right: 1px solid #d7dce5;
    border-bottom: 1px solid #d7dce5;
}

.member-print-grid span {
    display: block;
    color: #475467;
    font-size: .78rem;
    font-weight: 800;
}

.member-print-grid strong {
    display: block;
    margin-top: 5px;
    word-break: break-word;
}

.member-print-sheet footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 54px;
    color: #475467;
}

.member-print-sheet footer div {
    padding-top: 12px;
    border-top: 1px solid #98a2b3;
}

.record-print-sheet {
    width: min(930px, 100%);
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    color: #111827;
    border: 1px solid #d7dce5;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .15);
    position: relative;
    overflow: hidden;
}

.record-print-sheet::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 10px;
    background: #2457a6;
}

.record-print-pastor::before {
    background: #14966d;
}

.record-print-user::before {
    background: #7c3aed;
}

.record-print-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 14px 0 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #d7dce5;
}

.record-print-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.record-print-brand img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d7dce5;
}

.record-print-brand span,
.record-print-name span,
.record-print-grid span {
    display: block;
    color: #475467;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.record-print-brand h1 {
    margin: 6px 0 0;
    font-size: 2rem;
}

.record-print-letterhead {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.record-print-letterhead img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 50%;
}

.record-print-letterhead p {
    margin: 0;
    color: #111827;
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.25;
}

.record-print-letterhead h1 {
    margin: 12px 0 0;
    color: #111827;
    font-size: 1.6rem;
    text-transform: uppercase;
}

.record-print-photo {
    width: 132px;
    flex: 0 0 auto;
    text-align: center;
}

.record-print-photo img {
    width: 112px;
    height: 132px;
    object-fit: cover;
    border: 1px solid #98a2b3;
    background: #fff;
}

.record-print-photo strong {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    color: #2457a6;
}

.record-print-name {
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: #f5f7fb;
    border: 1px solid #d7dce5;
}

.record-print-name strong {
    display: block;
    margin-top: 4px;
    font-size: 1.35rem;
}

.record-print-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #d7dce5;
    border-left: 1px solid #d7dce5;
}

.record-print-grid > div {
    min-height: 64px;
    padding: 10px 12px;
    border-right: 1px solid #d7dce5;
    border-bottom: 1px solid #d7dce5;
}

.record-print-grid strong {
    display: block;
    margin-top: 5px;
    word-break: break-word;
}

.record-print-sheet footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 52px;
    color: #475467;
}

.record-print-sheet footer div {
    padding-top: 12px;
    border-top: 1px solid #98a2b3;
}

.record-print-attendance {
    margin-top: 22px;
}

.record-print-attendance h2 {
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.record-print-attendance p {
    margin: 4px 0 10px;
    color: #475467;
    font-weight: 700;
}

.record-print-attendance-totals {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.record-print-attendance-totals strong {
    padding: 8px 10px;
    border: 1px solid #d7dce5;
    border-radius: 8px;
    background: #f5f7fb;
}

.record-print-attendance table {
    width: 100%;
    border-collapse: collapse;
}

.record-print-attendance th,
.record-print-attendance td {
    padding: 8px;
    border: 1px solid #d7dce5;
    text-align: left;
}

.record-print-attendance th {
    background: #f5f7fb;
    color: #475467;
    font-size: .8rem;
    text-transform: uppercase;
}

.assembly-print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 29mm 19mm 13mm;
    background: #fff;
    color: #111827;
    border: 1px solid #d7dce5;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .15);
    display: flex;
    flex-direction: column;
}

.assembly-print-header {
    text-align: center;
}

.assembly-print-logo {
    display: block;
    width: 25mm;
    height: 25mm;
    margin: 0 auto 5mm;
    object-fit: contain;
}

.assembly-print-letterhead p {
    margin: 0 0 4.5mm;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.25;
}

.assembly-print-date {
    margin: 1.5mm 0 0;
    text-align: right;
    font-size: .84rem;
    font-weight: 400;
}

.assembly-print-header h1 {
    width: 161mm;
    min-height: 6.5mm;
    margin: 11mm auto 9mm;
    padding: 1mm 4mm;
    background: #f1f1f1;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.assembly-print-list {
    margin: 0 0 0 7mm;
    padding: 0;
    list-style: none;
    counter-reset: attendance;
    font-size: .95rem;
}

.assembly-print-list li {
    counter-increment: attendance;
    display: flex;
    gap: 2mm;
    min-height: 4.8mm;
    margin: 0;
    line-height: 1.22;
}

.assembly-print-list li::before {
    content: counter(attendance) "-";
    min-width: 5mm;
    text-align: right;
}

.assembly-print-list span {
    display: inline-block;
}

.assembly-print-signature {
    width: 121mm;
    margin: auto auto 0;
    padding-top: 30mm;
    text-align: center;
    background: #fff;
}

.assembly-print-signature p {
    margin: 0 0 6mm;
    font-weight: 400;
}

.assembly-print-signature div {
    border-top: 1px solid #111827;
}

.assembly-print-signature strong {
    display: block;
    margin-top: 3mm;
    font-weight: 400;
}

.parish-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #f7f6f1;
    color: #182230;
    --parish-container: 1360px;
    --parish-page-pad: clamp(20px, 4vw, 72px);
}

.parish-page #home {
    width: 100%;
    overflow-x: hidden;
}

.parish-header {
    width: 100%;
    min-height: 72px;
    margin: 0;
    padding: 10px max(16px, calc((100vw - var(--parish-container)) / 2));
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.78);
    border-radius: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(248, 251, 246, .9)),
        rgba(255,255,255,.9);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .14);
    backdrop-filter: blur(14px);
}

.parish-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 6px 10px 6px 6px;
    border-radius: 8px;
    color: #162033;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.parish-brand:hover {
    background: rgba(36, 87, 166, .06);
    transform: translateY(-1px);
}

.parish-brand span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #174c3c, #d19113);
    color: #fff8df;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(22, 32, 51, .2);
}

.parish-brand strong {
    font-size: 1rem;
    line-height: 1.15;
}

.parish-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.parish-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 10px 13px;
    border-radius: 8px;
    color: #344054;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.parish-nav a::after {
    content: "";
    height: 3px;
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 6px;
    border-radius: 999px;
    background: #f7c948;
    opacity: 0;
    transform: scaleX(.45);
    transition: opacity .18s ease, transform .18s ease;
}

.parish-nav a:hover {
    background: #eef4ff;
    color: #2457a6;
    transform: translateY(-1px);
}

.parish-nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.parish-nav .parish-login-link {
    padding-inline: 16px;
    background: linear-gradient(135deg, #174c3c, #14966d);
    color: #fff;
    box-shadow: 0 12px 24px rgba(20, 150, 109, .2);
}

.parish-nav .parish-login-link::after {
    background: rgba(255,255,255,.72);
}

.parish-nav .parish-login-link:hover {
    background: linear-gradient(135deg, #123d30, #0f7f5c);
    color: #fff;
    box-shadow: 0 14px 30px rgba(20, 150, 109, .24);
}

.parish-hero {
    width: 100%;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    max-height: none;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    align-items: center;
    gap: clamp(26px, 5vw, 72px);
    padding-right: max(22px, calc((100vw - var(--parish-container)) / 2));
    overflow: hidden;
    border-radius: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,.92), rgba(255,248,223,.76) 48%, rgba(236,253,243,.9)),
        #f7f6f1;
    color: #182230;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .08);
}

.parish-hero-content {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 7vw, 86px) 0 clamp(34px, 7vw, 86px) max(22px, calc((100vw - var(--parish-container)) / 2));
    position: relative;
    z-index: 1;
}

.parish-kicker,
.parish-section-label,
.parish-banner span {
    color: #f7c948;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.parish-hero h1 {
    margin: 10px 0 16px;
    max-width: 760px;
    font-size: clamp(2.6rem, 5.2vw, 5.5rem);
    line-height: .98;
    color: #17382f;
}

.parish-hero p {
    max-width: 620px;
    color: #58665f;
    font-size: clamp(1.02rem, 1.5vw, 1.22rem);
}

.parish-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.parish-hero-actions .btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    font-weight: 800;
}

.parish-hero-actions .btn-light {
    border-color: #174c3c;
    background: #174c3c;
    color: #fff;
    box-shadow: 0 14px 28px rgba(23, 76, 60, .18);
}

.parish-hero-actions .btn-outline-light {
    border-color: #d6b65b;
    background: #fffdf6;
    color: #7a4f01;
}

.parish-hero-actions .btn-light:hover {
    background: #123d30;
    color: #fff;
}

.parish-hero-actions .btn-outline-light:hover {
    border-color: #b98509;
    background: #fff6d8;
    color: #6b4600;
}

.parish-hero-highlights {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: clamp(22px, 4vw, 42px);
}

.parish-hero-highlights div {
    min-height: 92px;
    padding: 16px;
    border: 1px solid rgba(214, 182, 91, .34);
    border-radius: 8px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 16px 34px rgba(23, 76, 60, .08);
}

.parish-hero-highlights strong,
.parish-hero-highlights span {
    display: block;
}

.parish-hero-highlights strong {
    color: #17382f;
    font-size: .96rem;
    line-height: 1.15;
}

.parish-hero-highlights span {
    margin-top: 8px;
    color: #667085;
    font-size: .88rem;
    line-height: 1.25;
}

.parish-hero-panel {
    width: min(100%, 520px);
    display: grid;
    gap: 16px;
    padding: clamp(22px, 4vw, 42px) 0 clamp(22px, 4vw, 42px) 0;
}

.parish-hero-card,
.parish-hero-mini div {
    border: 1px solid rgba(23, 76, 60, .12);
    border-radius: 8px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 20px 54px rgba(23, 76, 60, .12);
}

.parish-hero-card-main {
    min-height: 290px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 38px);
    background:
        linear-gradient(140deg, rgba(23, 76, 60, .96), rgba(20, 150, 109, .9) 58%, rgba(209, 145, 19, .86)),
        #174c3c;
    color: #fff;
}

.parish-hero-card-main::before {
    content: "PQ";
    position: absolute;
    right: 24px;
    top: 20px;
    color: rgba(255,255,255,.12);
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 1;
}

.parish-hero-card span,
.parish-hero-mini span {
    color: #f7c948;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.parish-hero-card strong {
    display: block;
    max-width: 22rem;
    margin-top: 10px;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.04;
}

.parish-hero-card p {
    max-width: 24rem;
    margin: 14px 0 0;
    color: rgba(255,255,255,.8);
}

.parish-hero-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.parish-hero-mini div {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}

.parish-hero-mini span {
    color: #9a6504;
}

.parish-hero-mini strong {
    color: #17382f;
    font-size: 1.18rem;
    line-height: 1.15;
}

.parish-hero-art {
    position: relative;
    min-height: 520px;
    background:
        linear-gradient(180deg, rgba(247, 201, 72, .24), rgba(255,255,255,.06)),
        linear-gradient(145deg, #2a5ca8, #0f172a);
    overflow: hidden;
}

.parish-hero-art::before,
.parish-hero-art::after {
    content: "";
    position: absolute;
    inset: auto;
    background: rgba(255,255,255,.14);
}

.parish-hero-art::before {
    width: 150%;
    height: 210px;
    left: -20%;
    bottom: -80px;
    transform: rotate(-8deg);
}

.parish-hero-art::after {
    width: 56%;
    height: 86%;
    right: 8%;
    bottom: 0;
    border-radius: 160px 160px 0 0;
    border: 16px solid rgba(255,255,255,.26);
    background: rgba(255,255,255,.08);
}

.parish-window {
    width: 230px;
    height: 320px;
    position: absolute;
    right: 16%;
    top: 17%;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
    border-radius: 120px 120px 8px 8px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: inset 0 0 0 10px rgba(255,255,255,.1);
}

.parish-window span {
    border-radius: 70px 70px 6px 6px;
    background: linear-gradient(180deg, #f7c948, #f3a712);
    opacity: .9;
}

.parish-steeple {
    width: 92px;
    height: 260px;
    position: absolute;
    left: 14%;
    bottom: 0;
    z-index: 1;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.26);
}

.parish-steeple::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -92px;
    transform: translateX(-50%);
    border-left: 58px solid transparent;
    border-right: 58px solid transparent;
    border-bottom: 92px solid rgba(255,255,255,.22);
}

.parish-steeple::after {
    content: "+";
    position: absolute;
    left: 50%;
    top: -128px;
    transform: translateX(-50%);
    color: #f7c948;
    font-size: 54px;
    font-weight: 300;
}

.parish-banners,
.parish-section,
.parish-quiz,
.parish-contact {
    width: min(var(--parish-container), calc(100% - 40px));
    margin: clamp(22px, 4vw, 44px) auto 0;
}

.parish-banners {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: clamp(14px, 2vw, 22px);
}

.parish-banner {
    min-height: clamp(230px, 26vw, 330px);
    padding: clamp(22px, 3vw, 34px);
    border-radius: 8px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    box-shadow: 0 20px 54px rgba(15, 23, 42, .16);
    transition: transform .22s ease, box-shadow .22s ease;
}

.parish-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 66px rgba(15, 23, 42, .22);
}

.parish-banner::before {
    content: "";
    width: 190px;
    height: 190px;
    position: absolute;
    right: -70px;
    top: -70px;
    border-radius: 50%;
    border: 34px solid rgba(255,255,255,.14);
    z-index: 0;
}

.parish-banner::after {
    content: "";
    width: 96px;
    height: 6px;
    position: absolute;
    left: clamp(22px, 3vw, 34px);
    bottom: 0;
    border-radius: 999px 999px 0 0;
    background: #f7c948;
    z-index: 2;
}

.parish-banner-photo {
    background: #162033;
}

.parish-banner-photo::before {
    content: "";
    width: auto;
    height: auto;
    inset: 0;
    right: auto;
    top: auto;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .08) 24%, rgba(15, 23, 42, .84) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, .45), rgba(15, 23, 42, .08));
    z-index: 1;
}

.parish-banner-photo::after {
    background: #f7c948;
}

.parish-banner-slides,
.parish-banner-poster > img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.parish-banner-slides img,
.parish-banner-poster > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parish-banner-poster > img {
    object-position: center;
    transform: scale(1.02);
    animation: parishPosterBannerFloat 10s ease-in-out infinite alternate;
}

.parish-banner-slides img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.6s ease, transform 7s ease;
}

.parish-banner-slides img.is-active {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes parishPosterBannerFloat {
    from {
        transform: scale(1.02) translateY(0);
    }

    to {
        transform: scale(1.1) translateY(-6px);
    }
}

.parish-banner strong {
    display: block;
    margin-top: 8px;
    max-width: 18rem;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.18;
}

.parish-banner p {
    margin: 10px 0 0;
    max-width: 18rem;
    color: rgba(255,255,255,.78);
}

.parish-banner span,
.parish-banner strong,
.parish-banner p {
    position: relative;
    z-index: 2;
    transition: opacity .24s ease, transform .24s ease;
}

.parish-banner.is-changing span,
.parish-banner.is-changing strong,
.parish-banner.is-changing p {
    opacity: 0;
    transform: translateY(8px);
}

.parish-banner-gold {
    background: linear-gradient(135deg, #7a4f01, #d19113);
}

.parish-banner-green {
    background: linear-gradient(135deg, #0f5132, #14966d);
}

.parish-banner-blue {
    background: linear-gradient(135deg, #17382f, #d19113);
}

.parish-section,
.parish-contact {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr);
    gap: clamp(24px, 5vw, 58px);
    align-items: center;
    padding: clamp(42px, 7vw, 96px) 0;
}

.parish-section h2,
.parish-contact h2 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1;
}

.parish-section p,
.parish-contact p {
    color: #5f6b7a;
    font-size: 1.04rem;
    line-height: 1.75;
}

.parish-section-copy {
    max-width: 560px;
}

.parish-timeline {
    display: grid;
    gap: 14px;
    position: relative;
}

.parish-timeline div,
.parish-contact-card {
    padding: clamp(18px, 2.4vw, 24px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
}

.parish-timeline div {
    position: relative;
    padding-left: clamp(64px, 7vw, 86px);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.parish-timeline div:hover {
    transform: translateX(4px);
    border-color: #cddcf3;
    box-shadow: 0 20px 48px rgba(36, 87, 166, .12);
}

.parish-timeline span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    position: absolute;
    left: 18px;
    top: 18px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2457a6;
    font-size: .82rem;
    font-weight: 900;
}

.parish-timeline strong,
.parish-contact-card strong,
.parish-contact-card span {
    display: block;
}

.parish-timeline p {
    margin: 6px 0 0;
    font-size: .96rem;
    line-height: 1.55;
}

.parish-contact {
    margin-bottom: clamp(28px, 5vw, 54px);
    padding: clamp(30px, 5vw, 58px);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 76, 60, .95), rgba(20, 150, 109, .82) 58%, rgba(209, 145, 19, .72)),
        #174c3c;
    color: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .16);
}

.parish-contact p {
    color: rgba(255,255,255,.76);
}

.parish-contact-card {
    color: #182230;
    border-color: rgba(255,255,255,.72);
}

.parish-contact-card strong {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.parish-contact-card span {
    color: #667085;
    margin-top: 4px;
}

.parish-contact-card a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    margin-top: 18px;
    border-radius: 8px;
    background: #174c3c;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(23, 76, 60, .2);
}

.parish-contact-card a:hover {
    background: #123d30;
    color: #fff;
}

.parish-quiz {
    padding: clamp(36px, 6vw, 76px) 0;
}

.parish-quiz-head {
    margin-bottom: 22px;
    text-align: center;
}

.parish-quiz-head h2 {
    margin: 0;
    color: #162033;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.05;
}

.parish-quiz-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 34px);
    border: 1px solid rgba(215, 227, 247, .9);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(36, 87, 166, .08), rgba(20, 150, 109, .08)),
        #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

.parish-quiz-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.parish-quiz-levels {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.parish-quiz-level {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.82);
    color: #667085;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.parish-quiz-level.is-active {
    border-color: #2457a6;
    background: #eef4ff;
    color: #2457a6;
}

.parish-quiz-level.is-complete {
    border-color: #14966d;
    background: #ecfdf3;
    color: #0f5132;
}

.parish-quiz-score {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: #162033;
    color: #f7c948;
    font-weight: 900;
    white-space: nowrap;
}

.parish-quiz-progress {
    height: 12px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: #e6ebf3;
    overflow: hidden;
}

.parish-quiz-progress span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #2457a6, #14966d, #f7c948);
    transition: width .28s ease;
}

.parish-quiz-stage {
    min-height: 390px;
    padding: clamp(20px, 4vw, 34px);
    border-radius: 8px;
    background:
        linear-gradient(150deg, rgba(22, 32, 51, .96), rgba(36, 87, 166, .92)),
        #162033;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}

.parish-quiz-meta {
    color: #f7c948;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.parish-quiz-stage h3 {
    min-height: 82px;
    margin: 12px 0 22px;
    font-size: clamp(1.35rem, 3vw, 2.15rem);
    line-height: 1.18;
}

.parish-quiz-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.parish-quiz-option {
    min-height: 68px;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: #fff;
    text-align: left;
    padding: 14px;
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.parish-quiz-option:hover,
.parish-quiz-option:focus {
    transform: translateY(-1px);
    border-color: rgba(247, 201, 72, .76);
    background: rgba(255,255,255,.16);
}

.parish-quiz-option-letter {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    color: #f7c948;
    font-weight: 900;
}

.parish-quiz-option.is-selected {
    border-color: #f7c948;
    background: rgba(247, 201, 72, .18);
}

.parish-quiz-option.is-correct {
    border-color: #14966d;
    background: rgba(20, 150, 109, .28);
}

.parish-quiz-option.is-wrong {
    border-color: #d92d20;
    background: rgba(217, 45, 32, .28);
}

.parish-quiz-feedback {
    min-height: 26px;
    margin-top: 16px;
    color: rgba(255,255,255,.86);
    font-weight: 800;
}

.parish-quiz-feedback.is-correct {
    color: #98f0bd;
}

.parish-quiz-feedback.is-wrong {
    color: #ffb4ad;
}

.parish-quiz-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.parish-quiz-next,
.parish-quiz-reset {
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 900;
}

.parish-quiz-next {
    flex: 1 1 220px;
    border: 0;
    background: linear-gradient(135deg, #2457a6, #14966d);
    text-align: center;
    color: #fff;
}

.parish-quiz-next:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.parish-quiz-reset {
    flex: 0 0 auto;
    border: 1px solid #d7e3f7;
    background: #fff;
    color: #2457a6;
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body.print-page {
        background: #fff;
        padding: 0;
    }

    .member-print-sheet {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
        border: 0;
        padding: 18mm;
    }

    .record-print-sheet {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
        border: 0;
        padding: 16mm;
    }

    .assembly-print-sheet {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
        border: 0;
        padding: 29mm 19mm 13mm;
    }
}

@media (max-width: 820px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .topbar,
    .page-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-panel {
        grid-template-columns: 1fr;
    }

    .login-intro {
        min-height: auto;
        padding: 32px;
    }

    .login-card {
        padding: 32px;
    }
}

@media (min-width: 1440px) {
    .parish-hero {
        grid-template-columns: minmax(0, 1fr) 540px;
        gap: 82px;
    }

    .parish-hero-content {
        padding-top: 86px;
        padding-bottom: 86px;
    }

    .parish-hero-card-main {
        min-height: 320px;
    }

    .parish-hero-mini div {
        min-height: 122px;
    }

    .parish-banner {
        min-height: 320px;
    }
}

@media (min-width: 1600px) and (max-height: 920px) {
    .parish-hero-content {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .parish-hero h1 {
        font-size: clamp(3.8rem, 4.8vw, 5.15rem);
    }

    .parish-hero-highlights {
        margin-top: 28px;
    }

    .parish-hero-card-main {
        min-height: 280px;
    }

    .parish-hero-mini div {
        min-height: 104px;
    }
}

@media (max-width: 900px) {
    .member-profile-head,
    .member-profile-grid,
    .member-family,
    .member-print-grid,
    .member-print-sheet footer,
    .record-profile-hero,
    .record-profile-highlights,
    .record-profile-grid,
    .record-profile-family,
    .record-print-grid,
    .record-print-sheet footer,
    .parish-hero,
    .parish-banners,
    .parish-section,
    .parish-contact {
        grid-template-columns: 1fr;
    }

    .parish-quiz-top,
    .parish-quiz-options {
        grid-template-columns: 1fr;
    }

    .parish-quiz-score {
        justify-content: flex-start;
    }

    .parish-header {
        position: sticky;
        top: 0;
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 16px;
    }

    .parish-nav {
        justify-content: flex-start;
    }

    .parish-hero {
        min-height: calc(100vh - 124px);
        min-height: calc(100dvh - 124px);
        gap: 0;
        padding-right: 0;
    }

    .parish-hero-art {
        display: none;
        min-height: clamp(260px, 42dvh, 430px);
        order: -1;
    }

    .parish-hero-content {
        max-width: none;
        padding: clamp(28px, 8vw, 54px) 24px;
    }

    .parish-hero-panel {
        width: 100%;
        padding: 0 24px clamp(30px, 8vw, 54px);
    }

    .parish-hero-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .parish-banners {
        grid-template-columns: 1fr;
    }

    .record-print-sheet header {
        align-items: flex-start;
        flex-direction: column;
    }

    .record-print-letterhead {
        width: 100%;
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .attendance-profile-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .parish-header {
        min-height: auto;
    }

    .parish-brand {
        min-height: 46px;
    }

    .parish-brand span {
        width: 40px;
        height: 40px;
    }

    .parish-nav {
        width: 100%;
        gap: 6px;
    }

    .parish-nav a {
        min-height: 38px;
        font-size: .92rem;
    }

    .parish-hero {
        min-height: auto;
    }

    .parish-hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.6rem);
    }

    .parish-hero-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .content {
        padding: 16px;
    }

    .search-form {
        width: 100%;
    }

    .search-form .input-group {
        flex-wrap: wrap;
    }

    .search-form .form-control {
        flex-basis: 100%;
    }

    .search-form .btn {
        flex: 1 1 0;
    }

    .user-box {
        flex-wrap: wrap;
    }

    .member-profile-head {
        text-align: center;
    }

    .member-profile-head img,
    .record-profile-photo {
        margin: 0 auto;
    }

    .record-profile-hero {
        text-align: center;
    }

    .print-page {
        padding: 0;
    }

    .member-print-sheet,
    .record-print-sheet,
    .assembly-print-sheet {
        padding: 18px;
    }

    .parish-header,
    .parish-banners,
    .parish-quiz,
    .parish-section,
    .parish-contact {
        width: min(100% - 20px, var(--parish-container));
    }

    .parish-header,
    .parish-hero {
        width: 100%;
    }

    .parish-nav a {
        padding: 9px 10px;
    }

    .parish-hero {
        min-height: auto;
    }

    .parish-hero-actions .btn {
        width: 100%;
    }

    .parish-hero-highlights {
        grid-template-columns: 1fr;
    }

    .parish-hero-highlights div {
        min-height: auto;
        padding: 14px 16px;
    }

    .parish-hero-card-main {
        min-height: 240px;
    }

    .parish-hero-mini {
        grid-template-columns: 1fr;
    }

    .parish-hero-mini div {
        min-height: 92px;
    }

    .parish-banner {
        min-height: 240px;
    }

    .parish-timeline div {
        padding-left: 70px;
    }

}
