/*
 * Žuvelė administration design system.
 *
 * This file is intentionally loaded after the historical module stylesheet.
 * Shared geometry, spacing and responsive behaviour live here so a module
 * cannot accidentally collapse another module's layout through source order.
 */

:root {
    --admin-content-max: 1680px;
    --admin-gutter: clamp(20px, 3vw, 44px);
    --admin-section-gap: clamp(22px, 2.4vw, 32px);
    --admin-card-pad: clamp(22px, 2.5vw, 32px);
    --admin-card-gap: clamp(16px, 2vw, 22px);
    --admin-control-height: 48px;
    --admin-touch-target: 46px;
    --admin-text-measure: 72ch;
}

/* One paid retreat order may contain two separate participant records. */
.retreat-order-participant-grid {
    display: grid;
    gap: 14px;
}

.retreat-order-person {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 18px;
    background: #fbf8f2;
}

.retreat-order-person.is-current {
    border-color: #79bddb;
    box-shadow: inset 4px 0 0 #1878a8;
}

.retreat-order-person > div:first-child {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.retreat-order-person span,
.retreat-order-person small {
    color: #75695c;
}

.retreat-order-person strong,
.retreat-order-person small {
    overflow-wrap: anywhere;
}

.retreat-order-person-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .retreat-order-person,
    .retreat-order-person-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .retreat-order-person-actions .button {
        width: 100%;
    }
}

html,
body {
    max-width: 100%;
}

body.admin-page {
    overflow-x: hidden;
}

.admin-workspace,
.admin-content,
.admin-content > *,
.panel,
.card,
.module-card,
.form-panel,
.form-grid,
.filter-bar,
.page-heading,
.panel-heading,
.section-heading,
.table-wrap {
    min-width: 0;
}

.admin-content {
    container: admin-content / inline-size;
    width: min(100%, var(--admin-content-max));
    padding: var(--admin-gutter);
}

.admin-content :where(h1, h2, h3, p, strong, small, label, legend, summary) {
    overflow-wrap: break-word;
}

.admin-content :where(img, video, iframe, input, select, textarea, button) {
    max-width: 100%;
}

.preserve-lines {
    white-space: pre-wrap;
}

.break-all {
    word-break: break-all;
}

.is-overdue {
    color: #b42318 !important;
    font-weight: 750;
}

.admin-media-preview {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 560px;
    margin-inline: auto;
    border-radius: 16px;
    object-fit: contain;
}

/* Readability floor: operational labels must remain legible on every screen. */
.admin-content small,
.admin-content :where(.eyebrow, .page-kicker, .section-kicker, .panel-kicker, .newsletter-block-number, .newsletter-block-help, [data-block-summary]) {
    font-size: .8rem;
    line-height: 1.4;
}

.admin-content :where(p, .help-text, .form-intro) {
    max-width: var(--admin-text-measure);
}

.admin-content > .page-heading,
.admin-content > .welcome-panel,
.admin-content > .stat-grid,
.admin-content > .module-grid,
.admin-content > .panel,
.admin-content > .card,
.admin-content > form,
.admin-content > details,
.admin-content > .form-layout,
.admin-content > .retreat-program-actions,
.admin-content > .retreat-workflow-grid,
.admin-content > .mail-template-grid {
    margin-top: 0;
    margin-bottom: var(--admin-section-gap);
}

.admin-content > :last-child {
    margin-bottom: 0;
}

/* Page and section hierarchy */
.page-heading,
.panel-heading,
.section-heading,
.card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px 24px;
}

.page-heading > :first-child,
.panel-heading > :first-child,
.section-heading > :first-child,
.card-header > :first-child {
    min-width: 0;
}

.page-heading h1 {
    max-width: 28ch;
    margin: 8px 0 12px;
    font-size: clamp(2rem, 3vw, 3.15rem);
    line-height: 1.06;
}

.page-heading p,
.panel-heading p,
.section-heading p,
.card-header p {
    margin-bottom: 0;
}

.panel-heading h2,
.section-heading h2,
.card-header h2 {
    margin: 7px 0 0;
    font-size: clamp(1.35rem, 1.8vw, 1.85rem);
    line-height: 1.13;
}

.page-heading > .button,
.page-heading > .button-row,
.page-heading-actions,
.panel-heading-actions,
.section-heading > .button-row {
    justify-self: end;
}

/* Surfaces and predictable inner rhythm */
.panel,
.card,
.module-card,
.metric-card,
.stat-card,
.subpanel {
    min-width: 0;
}

.form-panel,
.form-card,
.panel.stack,
.recent-panel,
.card,
.admin-form {
    padding: var(--admin-card-pad);
}

.panel > :first-child,
.card > :first-child,
.form-panel > :first-child {
    margin-top: 0;
}

.panel > :last-child,
.card > :last-child,
.form-panel > :last-child {
    margin-bottom: 0;
}

.panel + .panel,
.panel + .card,
.card + .panel,
.card + .card,
.admin-form + .admin-form,
.form-panel + .form-panel {
    margin-top: var(--admin-section-gap);
}

.panel-subsection,
.subpanel {
    padding: clamp(18px, 2vw, 24px);
}

.stack,
.form-stack {
    gap: 18px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
}

.form-grid > *,
.filter-bar > *,
.form-layout > *,
.newsletter-two-columns > *,
.mail-template-grid > *,
.retreat-workflow-grid > * {
    min-width: 0;
}

.field-wide,
.span-2,
.form-grid > .full {
    grid-column: 1 / -1;
}

.direct-mail-form {
    width: 100%;
    max-width: none;
}

.direct-mail-form .form-grid {
    width: 100%;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.direct-mail-form .field-half {
    grid-column: span 6;
}

.direct-mail-form .field-wide {
    grid-column: 1 / -1;
}

.direct-mail-form textarea {
    width: 100%;
    min-height: 320px;
    resize: vertical;
}

.field,
.form-grid > label:not(.check-control):not(.checkbox-row),
.filter-bar > label:not(.check-control):not(.checkbox-row),
.stack > label:not(.check-control):not(.checkbox-row) {
    gap: 7px;
}

.settings-choice {
    min-height: var(--admin-control-height);
    padding: 12px 14px;
    border: 1px solid var(--zuv-line);
    border-radius: 14px;
    color: var(--zuv-ink);
    background: var(--zuv-sand);
    cursor: pointer;
}

.settings-choice > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.settings-choice strong,
.settings-choice small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-choice strong {
    font-size: 0.92rem;
    line-height: 1.3;
}

.settings-choice small {
    color: var(--zuv-muted);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
}

.settings-choice:has(input:checked) {
    border-color: rgba(24, 120, 168, 0.34);
    background: var(--zuv-blue-soft);
}

.field :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.form-grid > label > :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.filter-bar > label > :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.stack > label > :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100%;
    min-width: 0;
    min-height: var(--admin-control-height);
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    align-items: end;
    gap: 14px;
}

.filter-actions,
.form-footer,
.form-actions,
.button-row,
.table-actions,
.page-heading-actions,
.panel-heading-actions,
.newsletter-heading-actions,
.newsletter-workflow-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-actions,
.form-footer,
.form-actions {
    justify-content: flex-end;
}

.button,
.icon-button,
button,
input[type="submit"],
input[type="button"],
details > summary {
    min-height: var(--admin-touch-target);
}

.button {
    max-width: 100%;
    line-height: 1.25;
    text-align: center;
}

.plain-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

details.form-panel > summary,
details.panel > summary {
    align-items: center;
    cursor: pointer;
}

details.form-panel > summary + * {
    margin-top: 18px;
}

/* Data tables */
.table-wrap,
.responsive-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.data-table,
.table-wrap > table {
    width: 100%;
    min-width: 760px;
}

.data-table th,
.data-table td,
.table-wrap > table th,
.table-wrap > table td {
    padding: 14px 16px;
}

.data-table th,
.table-wrap > table th {
    font-size: .8rem;
    line-height: 1.35;
}

.table-sort-link,
.table-sort-button {
    display: inline-flex;
    width: 100%;
    min-height: 34px;
    padding: 5px 3px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
    text-decoration: none;
    cursor: pointer;
}

.table-sort-link:hover,
.table-sort-button:hover {
    color: var(--zuv-blue);
    background: var(--zuv-blue-soft);
}

.table-sort-link:focus-visible,
.table-sort-button:focus-visible {
    outline: 3px solid rgba(24, 120, 168, .22);
    outline-offset: 1px;
}

.table-sort-indicator {
    flex: 0 0 auto;
    color: var(--zuv-blue);
    font-size: .9rem;
    line-height: 1;
}

th[aria-sort="ascending"] .table-sort-link,
th[aria-sort="descending"] .table-sort-link,
th[aria-sort="ascending"] .table-sort-button,
th[aria-sort="descending"] .table-sort-button {
    color: var(--zuv-blue);
    background: var(--zuv-blue-soft);
}

.data-table td {
    overflow-wrap: break-word;
}

.data-table td > :where(strong, small, span):not(.status-pill):not(.status-badge) {
    max-width: 100%;
}

.data-table .button {
    white-space: nowrap;
}

.pagination,
.zuv-pagination {
    display: flex;
    max-width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Reusable cards and metadata */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
    align-items: stretch;
    gap: var(--admin-card-gap);
}

.module-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-content: start;
    gap: 18px 20px;
    padding: var(--admin-card-pad);
}

.module-card > * {
    min-width: 0;
}

.module-card h2 {
    margin: 6px 0 9px;
}

.module-card p {
    margin-bottom: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.detail-grid > div {
    display: grid;
    min-width: 0;
    padding: 13px 14px;
    align-content: start;
    gap: 4px;
    border: 1px solid var(--zuv-line);
    border-radius: 13px;
    background: var(--zuv-sand);
}

.detail-grid span {
    color: var(--zuv-muted);
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.3;
}

.detail-grid strong {
    color: var(--zuv-ink);
    font-size: .95rem;
    line-height: 1.35;
}

.status-pill,
.status-badge,
.tag,
.badge {
    max-width: 100%;
    font-size: .8rem;
    line-height: 1.35;
    white-space: normal;
}

.retreat-program-card > div > .button-row:first-child :where(.status-pill, .status-badge, .tag, .badge) {
    white-space: nowrap;
}

/* Retreat programmes: these are content cards, never icon cards. */
.retreat-program-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    align-items: stretch;
}

.retreat-program-grid > .retreat-program-card {
    margin-top: 0;
}

.retreat-program-card {
    display: flex;
    height: 100%;
    align-self: stretch;
    padding: var(--admin-card-pad);
}

.retreat-program-card-body {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
}

.retreat-program-card h2 {
    max-width: none;
    margin: 18px 0 14px;
    font-size: clamp(1.45rem, 2vw, 2rem);
    overflow-wrap: anywhere;
}

.retreat-program-card p {
    margin-bottom: 0;
    overflow-wrap: normal;
}

.retreat-program-meta,
.retreat-program-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.retreat-program-meta > .button-row { margin: 0; }

.retreat-registration-state {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #d9cdbd;
    border-radius: 999px;
    color: #5f5144;
    background: #f7f2ea;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
}

.retreat-registration-open { border-color: #a9d8c7; color: #08755d; background: #edf8f3; }
.retreat-registration-waitlist { border-color: #b8dced; color: #086c98; background: #eef8fc; }

.retreat-program-date {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
    padding: 15px 17px;
    border-left: 4px solid #1186b8;
    border-radius: 0 14px 14px 0;
    background: #edf8fc;
}

.retreat-program-date span,
.retreat-program-identity span,
.retreat-program-headline-stats span,
.retreat-program-category-grid span,
.retreat-program-admins > span {
    color: var(--zuv-muted);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .025em;
    line-height: 1.35;
}

.retreat-program-date strong {
    color: #075f8a;
    font-size: clamp(1.12rem, 1.6vw, 1.38rem);
    line-height: 1.25;
}

.retreat-program-identity,
.retreat-program-headline-stats,
.retreat-program-category-grid {
    display: grid;
    gap: 10px;
}

.retreat-program-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.retreat-program-headline-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.retreat-program-category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.retreat-program-identity > div,
.retreat-program-headline-stats > div,
.retreat-program-category-grid > div {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid var(--zuv-line);
    border-radius: 14px;
    background: var(--zuv-sand);
}

.retreat-program-identity strong,
.retreat-program-identity a,
.retreat-program-headline-stats strong,
.retreat-program-category-grid strong {
    min-width: 0;
    color: var(--zuv-ink);
    overflow-wrap: anywhere;
}

.retreat-program-identity a {
    display: grid;
    gap: 3px;
    text-decoration: none;
}

.retreat-program-identity a:hover strong { color: #0877a7; text-decoration: underline; }
.retreat-program-identity small,
.retreat-program-headline-stats small { color: var(--zuv-muted); line-height: 1.35; }
.retreat-program-headline-stats strong { color: #0877a7; font-size: clamp(1.45rem, 2vw, 2rem); line-height: 1; }

.retreat-program-category-heading {
    margin: 20px 0 10px;
}

.retreat-program-category-heading span {
    color: var(--zuv-muted);
    font-size: .8rem;
    font-weight: 800;
}

.retreat-program-category-grid > div { padding: 12px; }
.retreat-program-category-grid strong { font-size: 1.15rem; }
.retreat-program-category-grid em { color: #a05a21; font-style: normal; }

.retreat-program-admins {
    display: grid;
    gap: 7px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--zuv-line);
}

.retreat-program-admins > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 8px;
}

.retreat-program-admins small { color: var(--zuv-muted); }
.retreat-program-admins i { color: #bcaa96; font-style: normal; }

.retreat-program-card-actions {
    margin-top: auto;
    padding-top: 20px;
}

.retreat-program-action {
    min-width: 0;
}

.retreat-program-action > div {
    min-width: 0;
}

.retreat-program-action strong {
    display: block;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.retreat-workflow-grid,
.mail-template-grid {
    align-items: start;
}

.retreat-workflow-grid {
    align-items: stretch;
}

.retreat-workflow-grid > .panel {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.retreat-workflow-grid > .panel + .panel {
    margin-top: 0;
}

.retreat-workflow-action {
    margin: 18px 0;
}

.retreat-workflow-action .button {
    max-width: 100%;
}

/* Dense editors */
.newsletter-two-columns,
.form-layout {
    align-items: start;
}

.episode-editor,
.episode-edit-flow,
.newsletter-builder,
.newsletter-form,
.gift-admin-participant-form,
.gift-content-toolbar,
.gift-dimension-editor,
.question-editor {
    min-width: 0;
    max-width: 100%;
}

.legacy-photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.retreat-participant-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.retreat-participant-summary > div {
    display: grid;
    gap: 5px;
    padding: 15px 17px;
    border: 1px solid var(--zuv-line);
    border-radius: 15px;
    background: var(--zuv-sand);
}

.retreat-participant-summary span {
    color: var(--zuv-muted);
    font-size: .78rem;
    font-weight: 800;
}

.retreat-participant-summary strong {
    color: var(--zuv-blue);
    font-size: 1.55rem;
    line-height: 1;
}

.retreat-participant-table {
    min-width: 100%;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Keep every action cell a real table cell: flex on a td breaks row borders. */
.retreat-participant-table th:nth-child(1) { width: 24%; }
.retreat-participant-table th:nth-child(2) { width: 22%; }
.retreat-participant-table th:nth-child(3) { width: 22%; }
.retreat-participant-table th:nth-child(4) { width: 21%; }
.retreat-participant-table th:nth-child(5) { width: 11%; }
.retreat-participant-table th { text-transform: uppercase; font-size: .72rem; letter-spacing: .055em; }
.retreat-participant-table td {
    vertical-align: top;
    padding: 22px 14px;
    border-bottom: 1px solid var(--zuv-border, #e6d5c5);
    overflow-wrap: anywhere;
    white-space: normal;
}
.retreat-participant-table .retreat-participant-action { display: table-cell; text-align: right; padding-left: 4px; }
.retreat-participant-action .button { padding: 9px 12px; font-size: .8rem; white-space: nowrap; }
.retreat-cell-lines { display: grid; gap: 8px; font-size: .85rem; line-height: 1.5; }
.retreat-person-name { font-size: .98rem; }
.retreat-person-contact, .retreat-person-source, .retreat-room-label { color: var(--zuv-muted, #746859); }
.retreat-person-source { font-size: .78rem; }
.retreat-program-context { display: block; font-size: .7rem; font-weight: 600; color: var(--zuv-muted, #746859); }
.retreat-participant-price { color: var(--zuv-blue, #1679a6); font-size: .96rem; }
.retreat-participant-table .retreat-state-pill {
    display: block;
    width: fit-content;
    max-width: 100%;
    border-radius: 7px;
    padding: 3px 8px;
    font-size: .77rem;
    font-weight: 650;
    line-height: 1.5;
}
.retreat-state-pill.is-green { color: #16613f; background: #e5f5eb; }
.retreat-state-pill.is-yellow { color: #795713; background: #fff3cb; }
.retreat-state-pill.is-red { color: #9c2b32; background: #fde9e9; }
@media (max-width: 1250px) {
    .table-wrap > .data-table.retreat-participant-table { display: block; min-width: 0; width: 100%; }
    .retreat-participant-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .retreat-participant-table tbody { display: grid; gap: 20px; }
    .retreat-participant-table .retreat-participant-row { display: block; border: 1px solid var(--zuv-border, #e6d5c5); border-radius: 15px; overflow: hidden; }
    .retreat-participant-table td, .retreat-participant-table .retreat-participant-action {
        display: grid; grid-template-columns: minmax(100px, 24%) minmax(0, 1fr); gap: 12px;
        width: auto; padding: 15px; text-align: left;
    }
    .retreat-participant-table td::before { content: attr(data-label); font-size: .7rem; text-transform: uppercase; font-weight: 750; color: var(--zuv-muted, #746859); }
    .retreat-participant-table td:last-child { border-bottom: 0; }
    .retreat-participant-table tbody tr:last-child td:not(:last-child) { border-bottom: 1px solid var(--zuv-border, #e6d5c5); }
    .retreat-participant-action .button, .retreat-participant-action form { justify-self: start; }
}
@media (max-width: 540px) {
    .retreat-participant-table td, .retreat-participant-table .retreat-participant-action { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .retreat-participant-table .retreat-participant-action::before { display: none; }
}

.retreat-participant-table td > small {
    display: block;
    margin-top: 5px;
    color: var(--zuv-muted);
}

.retreat-participation-option {
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.retreat-participation-option > strong {
    color: var(--zuv-blue);
}

.retreat-participation-option > small {
    color: var(--zuv-muted);
    line-height: 1.4;
}

.retreat-transfer-form,
.danger-confirm-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 14px;
    width: 100%;
}

.retreat-transfer-form .field,
.danger-confirm-form label {
    min-width: 0;
}

.danger-confirm-form label {
    display: grid;
    gap: 7px;
    font-weight: 800;
}

.danger-confirm-form input {
    width: 100%;
    min-height: var(--admin-control-height);
}

.retreat-delete-form {
    display: grid;
    gap: 12px;
    min-width: min(100%, 320px);
}

.retreat-delete-confirmation {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 800;
}

.retreat-delete-confirmation input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.danger-panel-critical {
    border-color: rgba(177, 60, 43, .45);
    background: rgba(255, 246, 243, .86);
}

/* Responsive component behaviour follows the available content width. */
@container admin-content (max-width: 900px) {
    .page-heading,
    .panel-heading,
    .section-heading,
    .card-header {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-heading > .button,
    .page-heading > .button-row,
    .page-heading-actions,
    .panel-heading-actions,
    .section-heading > .button-row {
        justify-self: stretch;
    }

    .retreat-workflow-grid,
    .mail-template-grid,
    .newsletter-two-columns,
    .form-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .retreat-program-card .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .retreat-program-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container admin-content (max-width: 620px) {
    .form-grid,
    .filter-bar,
    .module-grid,
    .stat-grid,
    .metric-grid,
    .retreat-program-grid,
    .newsletter-module-grid,
    .newsletter-block-fields,
    .newsletter-check-grid,
    .newsletter-queue-summary,
    .newsletter-gates,
    .gift-stage-grid,
    .gift-admin-status-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .field-wide,
    .span-2,
    .form-grid > .full {
        grid-column: auto;
    }

    .direct-mail-form .field-half,
    .direct-mail-form .field-wide {
        grid-column: 1 / -1;
    }

    .module-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .retreat-program-card .detail-grid,
    .detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .retreat-program-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .retreat-program-identity,
    .retreat-program-headline-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .retreat-program-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-actions,
    .form-footer,
    .form-actions,
    .table-actions,
    .page-heading-actions,
    .panel-heading-actions,
    .newsletter-heading-actions,
    .newsletter-workflow-actions {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .filter-actions > *,
    .form-footer > *,
    .form-actions > *,
    .table-actions > *,
    .page-heading-actions > *,
    .panel-heading-actions > *,
    .newsletter-heading-actions > *,
    .newsletter-workflow-actions > * {
        width: 100%;
        min-width: 0;
    }

    .retreat-program-action {
        align-items: stretch;
        flex-direction: column;
    }

    .retreat-program-action .button {
        width: 100%;
    }
}

@media (max-width: 980px) {
    .admin-workspace {
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    :root {
        --admin-gutter: 18px 12px 34px;
        --admin-section-gap: 20px;
        --admin-card-pad: 18px 15px;
        --admin-card-gap: 16px;
    }

    body.admin-page {
        font-size: 16px;
        line-height: 1.5;
    }

    .admin-topbar {
        min-height: 68px;
        padding: 10px 12px;
    }

    .topbar-title {
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-title strong {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.15;
    }

    .admin-content {
        width: 100%;
        padding: var(--admin-gutter);
    }

    .page-heading h1,
    .welcome-panel h1,
    .admin-content > h1 {
        max-width: 100%;
        font-size: clamp(1.8rem, 8.5vw, 2.35rem);
        line-height: 1.08;
    }

    .panel-heading h2,
    .section-heading h2,
    .card-header h2,
    .card h2 {
        font-size: clamp(1.3rem, 6vw, 1.7rem);
    }

    .panel,
    .card,
    .form-panel,
    .form-card,
    .panel.stack,
    .recent-panel,
    .admin-form,
    .module-card {
        border-radius: 18px;
    }

    .data-table,
    .table-wrap > table {
        min-width: 680px;
        font-size: .9rem;
    }

    .data-table th,
    .data-table td,
    .table-wrap > table th,
    .table-wrap > table td {
        padding: 12px 11px;
    }

    .page-view-table-panel .table-wrap {
        overflow-x: visible;
    }

    .page-view-table-panel .page-view-table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .page-view-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .page-view-table tbody {
        display: grid;
        gap: 12px;
    }

    .page-view-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
        padding: 14px;
        border: 1px solid var(--admin-line, #e4d8c8);
        border-radius: 14px;
        background: #fff;
    }

    .page-view-table td {
        display: grid;
        min-width: 0;
        gap: 3px;
        padding: 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .page-view-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .72rem;
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .button,
    button,
    input[type="submit"],
    input[type="button"] {
        white-space: normal;
        overflow-wrap: break-word;
    }

    .retreat-section-nav {
        position: static;
        margin-inline: -2px;
        padding-inline: 2px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .retreat-section-nav a {
        white-space: nowrap;
    }

    .retreat-participant-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .retreat-transfer-form,
    .danger-confirm-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .retreat-transfer-form .button,
    .danger-confirm-form .button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .retreat-program-category-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    :root {
        --admin-gutter: 16px 10px 30px;
        --admin-card-pad: 17px 13px;
    }

    .admin-topbar {
        padding-inline: 9px;
        gap: 9px;
    }

    .admin-topbar .button-small {
        padding-inline: 11px;
    }
}

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

/*
 * Safe panel insets
 *
 * Historical module styles inset only a panel heading. Direct children that
 * followed it (summaries, alerts, tables and help text) could therefore touch
 * the card border. Generic operational panels now own one consistent inset;
 * specialised form, table and destructive-action surfaces keep their purpose-
 * built geometry.
 */
.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) {
    padding: var(--admin-card-pad);
}

.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) > :where(.panel-heading, .section-heading) {
    padding: 0;
}

.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) > :where(.panel-heading, .section-heading) + .metric-grid {
    margin-inline: 0;
}

.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) > :where(.panel-heading, .section-heading) + .button-row,
.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) > .button-row:first-child {
    padding: 0;
}

.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) > .button-row + .help-text,
.admin-content .panel:not(.form-panel):not(.recent-panel):not(.stack):not(.panel-table):not(.retreat-section-nav):not(.danger-panel):not(.danger-zone) > :where(.panel-heading, .section-heading) ~ .help-text {
    margin-inline: 0;
}

.form-subsection-title {
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 18px;
    background: var(--admin-soft, #f8f4ec);
}

.form-subsection-title h3,
.form-subsection-title p {
    margin: 0;
}

.form-subsection-title p {
    margin-top: 6px;
    color: var(--admin-muted, #75695c);
}

.inventory-guidance > h3 {
    margin-bottom: 16px;
}

.inventory-guidance-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 30px;
}

.inventory-guidance-grid > div {
    min-width: 0;
    padding-left: 16px;
    border-left: 3px solid rgba(24, 120, 168, .24);
}

.inventory-guidance-grid strong {
    display: block;
    color: var(--zuv-ink, #2d251f);
}

.inventory-guidance-grid p {
    max-width: none;
    margin-top: 7px;
    line-height: 1.55;
}

@container admin-content (max-width: 920px) {
    .inventory-guidance-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Members and membership review */
.member-admin-panel {
    padding: var(--admin-card-pad);
}

.member-admin-panel + .member-admin-panel,
.member-review-grid + .member-admin-panel {
    margin-top: 24px;
}

.member-page-heading {
    align-items: center;
}

.member-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.member-state-pill,
.member-inline-state,
.member-audit-result {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 850;
    line-height: 1.3;
}

.member-state-pill {
    min-height: 44px;
    padding: 10px 15px;
    font-size: .86rem;
}

.member-inline-state,
.member-audit-result {
    padding: 6px 10px;
    font-size: .78rem;
}

.member-state-pill::before,
.member-inline-state::before,
.member-audit-result::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.member-state-pill.is-active,
.member-inline-state.is-active,
.member-audit-result.is-success {
    border-color: rgba(36, 123, 98, .2);
    color: var(--zuv-green);
    background: var(--zuv-green-soft);
}

.member-state-pill.is-pending,
.member-inline-state.is-pending,
.member-audit-result.is-warning {
    border-color: rgba(166, 113, 17, .2);
    color: #75500f;
    background: #fff5dc;
}

.member-state-pill.is-information-requested,
.member-inline-state.is-information-requested {
    border-color: rgba(24, 120, 168, .2);
    color: var(--zuv-blue-dark);
    background: var(--zuv-blue-soft);
}

.member-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) minmax(210px, 1fr) auto;
    gap: 18px;
    align-items: end;
}

.member-filter-action {
    padding-bottom: 1px;
}

.member-table-wrap {
    margin-top: 22px;
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 18px;
    overflow-x: auto;
}

.member-admin-table {
    width: 100%;
    min-width: 940px;
    border-collapse: collapse;
}

.member-admin-table th,
.member-admin-table td {
    padding: 15px 18px;
    vertical-align: top;
}

.member-admin-table th:first-child,
.member-admin-table td:first-child {
    padding-left: 20px;
}

.member-admin-table th:last-child,
.member-admin-table td:last-child {
    padding-right: 20px;
}

.member-review-grid {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: 28px;
    align-items: start;
}

.member-detail-list {
    margin-top: 20px;
}

.member-review-grid .member-admin-panel {
    margin: 0;
}

.member-admin-panel > .panel-heading {
    margin-bottom: 22px;
}

.member-admin-panel > .panel-heading p {
    margin-top: 9px;
    color: var(--zuv-muted);
}

.member-data-sections,
.member-decision-panel {
    display: grid;
    align-content: start;
    gap: 18px;
}

.member-data-group,
.member-work-section {
    min-width: 0;
    padding: clamp(18px, 2vw, 22px);
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 17px;
    background: var(--admin-soft, #f8f4ec);
}

.member-data-group h3,
.member-work-heading h3,
.member-decision-footer h3 {
    margin: 0;
    color: var(--zuv-ink);
    font-size: 1rem;
    line-height: 1.3;
}

.member-facts-grid {
    display: grid;
    margin: 14px 0 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
}

.member-facts-grid > div {
    min-width: 0;
    padding: 13px 0;
    border-top: 1px solid var(--admin-line, #e4d8c8);
}

.member-facts-grid > div:nth-child(-n + 2) {
    padding-top: 4px;
    border-top: 0;
}

.member-facts-grid .member-fact-wide {
    grid-column: 1 / -1;
}

.member-facts-grid dt {
    color: var(--zuv-muted);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.35;
}

.member-facts-grid dd {
    min-width: 0;
    margin: 5px 0 0;
    color: var(--zuv-ink);
    font-size: .94rem;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.member-facts-grid dd a {
    color: var(--zuv-blue-dark);
    text-decoration: underline;
    text-decoration-color: rgba(24, 120, 168, .25);
    text-underline-offset: 3px;
}

.member-work-heading {
    margin-bottom: 16px;
}

.member-work-heading > div,
.member-decision-footer > div:first-child {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
}

.member-work-heading > div > span,
.member-decision-number {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 50%;
    color: var(--zuv-blue-dark);
    background: var(--zuv-blue-soft);
    font-size: .82rem;
    font-weight: 900;
}

.member-work-heading p,
.member-decision-footer p {
    margin: 4px 0 0;
    color: var(--zuv-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.member-work-section .form-stack {
    display: grid;
    gap: 14px;
}

.member-work-section textarea {
    min-height: 118px;
    resize: vertical;
}

.member-work-actions {
    display: flex;
    justify-content: flex-end;
}

.member-decision-section {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--admin-line, #e4d8c8);
}

.member-decision-footer {
    display: grid;
    padding: clamp(18px, 2vw, 22px);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(24, 120, 168, .2);
    border-radius: 17px;
    background: var(--zuv-blue-soft);
}

.member-decision-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--admin-line, #e4d8c8);
}

.member-decision-footer .member-decision-actions {
    margin: 0;
    padding: 0;
    justify-content: flex-end;
    border: 0;
}

.member-decision-footer .member-decision-actions form {
    margin: 0;
}

.member-decision-footer .member-decision-actions .button {
    min-width: 118px;
}

.member-active-state {
    display: flex;
    padding: 18px 20px;
    align-items: flex-start;
    gap: 13px;
    border: 1px solid rgba(36, 123, 98, .2);
    border-radius: 16px;
    color: var(--zuv-green);
    background: var(--zuv-green-soft);
}

.member-active-state > span {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--zuv-green);
    font-weight: 900;
}

.member-active-state strong {
    display: block;
    margin-top: 2px;
}

.member-active-state p {
    margin: 4px 0 0;
    color: inherit;
}

.member-audit-panel {
    margin-top: 28px;
}

.member-audit-panel > .panel-heading > p {
    max-width: 54ch;
}

.member-audit-table {
    min-width: 860px;
}

.member-audit-table time,
.member-audit-table td:nth-child(2) {
    display: grid;
    gap: 3px;
}

.member-audit-table small {
    color: var(--zuv-muted);
    font-size: .72rem;
    line-height: 1.4;
}

.member-history summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 1.05rem;
}

/* Parish settings chooser: keep long organisation names out of the heading column. */
.parish-settings-panel .parish-settings-heading {
    grid-template-columns: minmax(280px, .62fr) minmax(0, 1.58fr);
    align-items: start;
    gap: clamp(24px, 3vw, 46px);
    margin-bottom: 0;
}

.parish-settings-copy {
    max-width: 34ch;
}

.parish-settings-copy h2 {
    max-width: 20ch;
}

.parish-settings-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 12px;
}

.parish-settings-link.button {
    min-width: 0;
    min-height: 64px;
    padding: 14px 18px;
    justify-content: space-between;
    gap: 14px;
    border-radius: 18px;
    white-space: normal;
    text-align: left;
}

.parish-settings-link > span:first-child {
    min-width: 0;
}

.parish-settings-arrow {
    flex: 0 0 auto;
    color: var(--zuv-blue);
    font-size: 1.1rem;
    line-height: 1;
}

@container admin-content (max-width: 1150px) {
    .parish-settings-panel .parish-settings-heading {
        grid-template-columns: minmax(0, 1fr);
    }

    .parish-settings-copy {
        max-width: 68ch;
    }
}

@container admin-content (max-width: 620px) {
    .parish-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .parish-settings-link.button {
        min-height: 56px;
    }
}

@media (max-width: 980px) {
    .member-filter-bar,
    .member-review-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-filter-action .button {
        width: 100%;
    }
}

@container admin-content (max-width: 1080px) {
    .member-review-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-page-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .member-admin-panel {
        padding: 17px 13px;
    }

    .member-page-actions,
    .member-page-actions > *,
    .member-work-actions,
    .member-work-actions .button {
        width: 100%;
    }

    .member-page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .member-state-pill {
        justify-content: center;
    }

    .member-facts-grid,
    .member-decision-footer {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-facts-grid > div:nth-child(2) {
        padding-top: 13px;
        border-top: 1px solid var(--admin-line, #e4d8c8);
    }

    .member-facts-grid .member-fact-wide {
        grid-column: auto;
    }

    .member-work-actions .button,
    .member-decision-footer .member-decision-actions .button {
        width: 100%;
    }

    .member-decision-actions,
    .member-decision-actions form,
    .member-decision-actions .button {
        width: 100%;
    }
}

/* Retreat waitlist replacement flow: explicit, spacious, and auditable. */
.retreat-waitlist-admin-table {
    min-width: 1180px;
}
.retreat-waitlist-admin-table th:last-child,
.retreat-waitlist-admin-table td:last-child {
    width: 390px;
}
.priority-invite-state {
    display: block;
    margin-top: 7px;
    color: #8a5b13;
    line-height: 1.45;
}
.priority-invite-form {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 90px;
    gap: 10px 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e4d8c8;
    border-radius: 16px;
    background: #fbf8f2;
}
.priority-invite-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.priority-invite-form label > span:first-child {
    color: #75695c;
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.priority-invite-form select {
    min-width: 0;
    width: 100%;
}
.priority-invite-form .priority-invite-confirm {
    grid-column: 1 / -1;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    line-height: 1.45;
}
.priority-invite-form .priority-invite-confirm input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
}
.priority-invite-form .priority-invite-confirm span {
    color: inherit;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
}
.priority-invite-form .button {
    grid-column: 1 / -1;
    width: 100%;
}
.retreat-cancellation-panel {
    border-color: #e2c8ae;
}
.retreat-cancel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.retreat-cancel-choice {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: clamp(20px, 2.6vw, 28px);
    border: 1px solid #e4d8c8;
    border-radius: 20px;
    background: #fbf8f2;
}
.retreat-cancel-choice.is-notify {
    border-color: #e3b39e;
    background: #fff7f2;
}
.retreat-cancel-choice h3 {
    margin: 0 0 8px;
}
.retreat-cancel-choice p {
    margin: 0;
    line-height: 1.65;
}
.retreat-cancel-choice .retreat-delete-confirmation {
    margin-top: auto;
}
@media (max-width: 820px) {
    .retreat-cancel-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Retreat room management: every assignment is visible and reversible. */
.room-editor-state {
    margin: 0 0 20px;
    padding: 12px 16px;
    border: 1px solid #b9ddec;
    border-radius: 14px;
    color: #075f8a;
    background: #edf8fc;
    font-weight: 850;
}
.retreat-room-admin-table {
    min-width: 1180px;
}
.retreat-room-admin-table th:nth-child(1) { width: 20%; }
.retreat-room-admin-table th:nth-child(2) { width: 13%; }
.retreat-room-admin-table th:nth-child(3) { width: 31%; }
.retreat-room-admin-table th:nth-child(4) { width: 14%; }
.retreat-room-admin-table th:nth-child(5) { width: 22%; }
.retreat-room-admin-table td:nth-child(2) strong,
.retreat-room-admin-table td:nth-child(2) small {
    display: block;
}
.retreat-room-admin-table td:nth-child(2) small {
    margin-top: 6px;
}
.room-location {
    display: block;
    margin-top: 6px;
}
.room-assignment-list,
.room-row-actions {
    display: grid;
    align-items: start;
    gap: 10px;
}
.room-assignment-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--admin-line, #e4d8c8);
}
.room-assignment-row:first-child { padding-top: 0; }
.room-assignment-row:last-child { padding-bottom: 0; border-bottom: 0; }
.room-assignment-row > span {
    min-width: 0;
    font-weight: 750;
    overflow-wrap: anywhere;
}
.room-assignment-row form,
.room-row-actions form {
    margin: 0;
}
.room-row-actions .button,
.room-assignment-row .button {
    width: 100%;
}
.room-row-actions small {
    color: var(--admin-muted, #75695c);
    line-height: 1.45;
}
@media (max-width: 720px) {
    .room-assignment-row {
        align-items: stretch;
        flex-direction: column;
    }
}

/* A room does not apply to participants attending without lodging. */
.retreat-participant-table .room-not-applicable {
    display: block;
    width: 100%;
    color: var(--admin-muted, #75695c);
    font-size: 1.15rem;
    line-height: 1;
    text-align: center;
}

/* Retreat templates, FAQs and unified inventory. */
.retreat-create-tools {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(520px, 1.15fr);
    align-items: start;
    gap: clamp(24px, 4vw, 52px);
}
.retreat-create-tools h2 { margin: 10px 0 12px; }
.retreat-create-tools p { max-width: 68ch; margin: 0; line-height: 1.65; }
.retreat-template-actions { display: grid; gap: 14px; }
.retreat-template-actions form { display: grid; gap: 8px; margin: 0; }
.retreat-template-actions select { min-width: min(440px, 100%); }
.retreat-faq-editor {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 20px;
    background: #fbf8f2;
}
.retreat-faq-editor h4 { margin: 0; }
.retreat-faq-editor-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}
.retreat-faq-editor-heading p { max-width: 72ch; margin: 6px 0 0; line-height: 1.55; }
.retreat-faq-list-admin { display: grid; gap: 16px; }
.retreat-faq-admin-row {
    display: grid;
    grid-template-columns: 44px minmax(220px, .75fr) minmax(0, 1.25fr) auto;
    align-items: start;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-line, #e4d8c8);
}
.retreat-faq-number {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #0877a7;
    background: #e9f6fb;
    font-weight: 900;
}
.retreat-faq-admin-row label { display: grid; gap: 8px; }
.retreat-faq-admin-row textarea { min-height: 92px; }
.retreat-faq-admin-row > button { margin-top: 27px; }
.retreat-form-section-label {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--admin-line, #e4d8c8);
}
.retreat-form-section-label strong { color: #0877a7; font-size: 1.05rem; }
.retreat-form-section-label span { color: var(--admin-muted, #75695c); }
.retreat-field-row {
    display: grid;
    gap: 20px;
    margin-bottom: 22px;
}
.retreat-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.retreat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.retreat-location-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr) minmax(130px, .35fr); }
.retreat-language-admission-row { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
.retreat-language-admission-note {
    padding: 18px 20px;
    border: 1px solid #b9ddec;
    border-radius: 16px;
    background: #edf8fc;
}
.retreat-language-admission-note strong { color: #0877a7; }
.retreat-language-admission-note p { margin: 7px 0 0; line-height: 1.5; }
.retreat-language-admission-note-wide { margin-bottom: 22px; }
.retreat-language-editor {
    display: grid;
    gap: 24px;
    margin-top: 34px;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 22px;
    background: #fcfaf6;
}
.retreat-language-editor-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    align-items: end;
    gap: 28px;
}
.retreat-language-editor-head h3 { margin: 8px 0; font-size: clamp(1.5rem, 2.4vw, 2.15rem); }
.retreat-language-editor-head p { max-width: 72ch; margin: 0; line-height: 1.55; }
.retreat-language-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.retreat-language-fields .field { align-content: start; }
.retreat-language-fields textarea { min-height: 112px; }
.retreat-inventory-panel { margin-top: 28px; }
.retreat-inventory-counts { margin-bottom: 28px; }
.retreat-price-capacity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    align-items: stretch;
    gap: 28px;
}
.retreat-price-list { display: grid; gap: 16px; }
.retreat-price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, .26fr);
    gap: 14px;
}
.retreat-currency-field select { color: #2c261f; opacity: 1; }
.retreat-capacity-card {
    min-height: 100%;
    align-content: center;
    padding: clamp(24px, 4vw, 42px);
}
.retreat-capacity-card > strong { font-size: clamp(3.2rem, 8vw, 6.6rem); }
.retreat-capacity-card p { margin: 8px 0 16px; font-weight: 800; }
.retreat-inventory-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inventory-derived-capacity {
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid #b9ddec;
    border-radius: 16px;
    background: #edf8fc;
}
.inventory-derived-capacity > span {
    color: var(--admin-muted, #75695c);
    font-weight: 800;
}
.inventory-derived-capacity > strong {
    color: #0877a7;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    line-height: 1;
}
.inventory-derived-capacity > small { line-height: 1.45; }
@media (max-width: 900px) {
    .retreat-create-tools,
    .retreat-faq-admin-row,
    .retreat-language-editor-head,
    .retreat-language-admission-row,
    .retreat-price-capacity-layout { grid-template-columns: minmax(0, 1fr); }
    .retreat-faq-number { display: none; }
    .retreat-faq-admin-row > button { margin-top: 0; justify-self: start; }
    .retreat-inventory-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .retreat-inventory-metrics { grid-template-columns: minmax(0, 1fr); }
    .retreat-grid-2,
    .retreat-grid-3,
    .retreat-location-row,
    .retreat-language-fields,
    .retreat-price-row { grid-template-columns: minmax(0, 1fr); }
    .retreat-faq-editor-heading,
    .retreat-form-section-label { align-items: stretch; flex-direction: column; }
}

/* Audited retreat bank-transfer entry. */
.retreat-bank-transfer-entry {
    margin-top: 18px;
    border: 1px solid #b9ddec;
    border-radius: 18px;
    background: #f2f9fc;
    overflow: hidden;
}
.retreat-bank-transfer-entry > summary {
    width: fit-content;
    margin: 16px;
    padding: 13px 20px;
    border-radius: 999px;
    color: #fff;
    background: #0c82b5;
    box-shadow: 0 12px 28px rgba(12, 130, 181, .18);
    cursor: pointer;
    font-weight: 850;
    list-style: none;
}
.retreat-bank-transfer-entry > summary::-webkit-details-marker { display: none; }
.retreat-bank-transfer-entry[open] > summary { margin-bottom: 0; }
.retreat-bank-transfer-entry form {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 18px;
}
.retreat-bank-transfer-entry form > p {
    max-width: 76ch;
    margin: 0;
    line-height: 1.6;
}
.retreat-bank-transfer-confirm {
    padding: 14px 16px;
    border: 1px solid #d5c8b8;
    border-radius: 14px;
    background: #fff;
}
.retreat-bank-transfer-confirm label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}
.retreat-bank-transfer-confirm input { margin-top: 4px; }
.retreat-bank-transfer-proof { margin-top: 18px; }
.retreat-bank-transfer-proof p { margin: 6px 0 0; }
@media (max-width: 600px) {
    .retreat-bank-transfer-entry > summary {
        width: auto;
        text-align: center;
    }
}

/* One audited guest-registration form in both retreat and participant workspaces. */
.retreat-guest-entry {
    margin: 28px 0;
    border: 1px solid var(--admin-line, #e4d8c8);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(76, 58, 36, .08);
    overflow: hidden;
}
.retreat-guest-entry > summary {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 76px;
    padding: 18px clamp(20px, 3vw, 30px);
    cursor: pointer;
    list-style: none;
}
.retreat-guest-entry > summary::-webkit-details-marker { display: none; }
.retreat-guest-entry > summary:hover { background: #fbf8f2; }
.retreat-guest-entry > summary > span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.retreat-guest-entry > summary strong { font-size: 1.08rem; }
.retreat-guest-entry > summary small {
    color: var(--admin-muted, #75695c);
    line-height: 1.4;
}
.retreat-guest-entry-icon {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #0c82b5;
    font-size: 1.45rem;
    font-weight: 500;
    transition: transform .18s ease;
}
.retreat-guest-entry[open] .retreat-guest-entry-icon { transform: rotate(45deg); }
.retreat-guest-entry > form {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0 clamp(22px, 4vw, 46px) clamp(26px, 4vw, 42px);
    border-top: 1px solid var(--admin-line, #e4d8c8);
}
.retreat-guest-intro {
    display: grid;
    grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
    align-items: end;
    gap: 30px;
    padding: 30px 0;
}
.retreat-guest-intro h3 {
    margin: 8px 0 0;
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
}
.retreat-guest-intro p {
    max-width: 72ch;
    margin: 0;
    line-height: 1.65;
}
.retreat-guest-form-section {
    display: grid;
    gap: 20px;
    padding: 28px 0;
    border-top: 1px solid var(--admin-line, #e4d8c8);
}
.retreat-guest-section-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.retreat-guest-section-heading > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #0877a7;
    background: #e9f6fb;
    font-weight: 900;
}
.retreat-guest-section-heading h4 {
    margin: 1px 0 4px;
    font-size: 1.18rem;
}
.retreat-guest-section-heading p {
    max-width: 76ch;
    margin: 0;
    color: var(--admin-muted, #75695c);
    line-height: 1.5;
}
.retreat-guest-grid {
    display: grid;
    gap: 18px;
}
.retreat-guest-grid-name { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.retreat-guest-grid-contact { grid-template-columns: minmax(200px, .75fr) minmax(260px, 1.25fr) minmax(180px, .7fr); }
.retreat-guest-grid-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.retreat-guest-program-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #b9ddec;
    border-radius: 16px;
    background: #edf8fc;
}
.retreat-guest-program-card span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #0877a7;
    background: #fff;
    font-weight: 900;
}
.retreat-guest-program-select-hidden { display: none; }
.retreat-guest-choice-layout,
.retreat-guest-payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    align-items: stretch;
    gap: 20px;
}
.retreat-guest-price-card,
.retreat-guest-payment-explainer {
    display: grid;
    align-content: center;
    gap: 7px;
    min-height: 112px;
    padding: 20px 22px;
    border: 1px solid #b9ddec;
    border-radius: 18px;
    background: #edf8fc;
}
.retreat-guest-price-card > span {
    color: var(--admin-muted, #75695c);
    font-weight: 800;
}
.retreat-guest-price-card > strong {
    color: #0877a7;
    font-size: clamp(1.65rem, 2.8vw, 2.25rem);
    line-height: 1;
}
.retreat-guest-price-card > small,
.retreat-guest-payment-explainer { line-height: 1.48; }
.retreat-guest-waiver {
    padding: 18px 20px;
    border: 1px solid #d8c8a9;
    border-radius: 18px;
    background: #fff9ec;
}
.retreat-guest-waiver[hidden] { display: none; }
.retreat-guest-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 28px;
    border-top: 1px solid var(--admin-line, #e4d8c8);
}
.retreat-guest-form-footer p {
    max-width: 70ch;
    margin: 0;
    line-height: 1.55;
}
.retreat-guest-form-footer .button { flex: 0 0 auto; }
@media (max-width: 900px) {
    .retreat-guest-intro,
    .retreat-guest-grid-contact,
    .retreat-guest-choice-layout,
    .retreat-guest-payment-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .retreat-guest-entry { margin: 22px 0; border-radius: 20px; }
    .retreat-guest-entry > summary { align-items: flex-start; padding: 16px 18px; }
    .retreat-guest-entry > form { padding-right: 18px; padding-left: 18px; }
    .retreat-guest-intro,
    .retreat-guest-grid-name,
    .retreat-guest-grid-choices { grid-template-columns: minmax(0, 1fr); }
    .retreat-guest-section-heading { grid-template-columns: minmax(0, 1fr); }
    .retreat-guest-section-heading > span { width: auto; justify-self: start; padding: 0 10px; }
    .retreat-guest-form-footer { align-items: stretch; flex-direction: column; }
    .retreat-guest-form-footer .button { width: 100%; }
}

.retreat-ticket-change-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 22px; }
.retreat-ticket-change-summary > div,
.retreat-ticket-change-entry { padding: 18px; border: 1px solid var(--zuv-line, #ded4c5); border-radius: 18px; background: var(--zuv-sand, #faf6ef); }
.retreat-ticket-change-summary span,
.retreat-ticket-change-summary small { display: block; color: var(--zuv-muted, #716352); }
.retreat-ticket-change-summary strong { display: block; margin: 6px 0; font-size: 1.05rem; }
.retreat-ticket-change-form { margin-top: 20px; }
.retreat-ticket-change-list { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--zuv-line, #ded4c5); }
.retreat-ticket-change-list h3 { margin: 0 0 16px; }
.retreat-ticket-change-entry { display: grid; gap: 14px; margin-top: 14px; background: #fff; }
.retreat-ticket-change-entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.retreat-ticket-change-entry-head > div:first-child { display: grid; gap: 5px; }
.retreat-ticket-change-entry-head > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.retreat-history-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.retreat-history-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--zuv-line, #ded4c5); }
.retreat-history-list li:last-child { border-bottom: 0; }
.retreat-history-list time,
.retreat-history-list small { color: var(--zuv-muted, #716352); }
.retreat-history-list div { display: grid; gap: 5px; }
.readonly-status { display: grid; gap: 5px; min-height: 52px; align-content: center; padding: 10px 14px; border: 1px solid var(--zuv-line, #ded4c5); border-radius: 14px; background: var(--zuv-sand, #faf6ef); }
@media (max-width: 760px) {
    .retreat-ticket-change-summary { grid-template-columns: 1fr; }
    .retreat-ticket-change-entry-head { display: grid; }
    .retreat-ticket-change-entry-head > div:last-child { justify-content: flex-start; }
    .retreat-history-list li { grid-template-columns: 1fr; gap: 6px; }
}

/* Intention workspace: the prayer texts and the next Mass are the primary task. */
.intention-page-heading {
    align-items: end;
    grid-template-columns: minmax(0, 1fr);
}

.intention-page-heading > div:first-child {
    max-width: 76ch;
}

.intention-primary-actions {
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
}

.intention-next-mass {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(20px, 3vw, 42px);
    margin-top: 28px;
    padding: clamp(24px, 3vw, 38px);
    border-color: rgba(13, 126, 174, .28);
    color: #fff;
    background:
        radial-gradient(circle at 88% 15%, rgba(62, 185, 229, .24), transparent 34%),
        linear-gradient(135deg, #1f1914 0%, #25221f 55%, #123b4b 100%);
    box-shadow: 0 22px 54px rgba(39, 29, 19, .16);
}

.intention-next-mass-date {
    display: grid;
    min-height: 112px;
    place-content: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 24px;
    text-align: center;
    background: rgba(255, 255, 255, .09);
}

.intention-next-mass-date span,
.intention-next-mass-date small {
    font-size: .77rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.intention-next-mass-date strong {
    margin: 2px 0;
    color: #73c9ee;
    font-size: 2.7rem;
    line-height: .95;
}

.intention-next-mass-copy {
    min-width: 0;
}

.intention-next-mass-copy .eyebrow {
    color: #73c9ee;
}

.intention-next-mass-copy h2 {
    margin: 8px 0 8px;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    overflow-wrap: break-word;
}

.intention-next-mass-copy p {
    margin: 0;
    color: rgba(255, 255, 255, .8);
    line-height: 1.55;
}

.intention-next-mass-copy p strong {
    color: #fff;
}

.intention-next-mass-action {
    max-width: 265px;
    min-height: 58px;
    white-space: normal;
    text-align: center;
}

.intention-next-mass-empty {
    grid-template-columns: minmax(0, 1fr);
}

.intention-priest-previews {
    margin-top: 28px;
}

.intention-priest-previews .intention-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 18px;
}

.intention-preview-card {
    grid-template-rows: auto auto auto minmax(64px, 1fr) auto;
    align-content: start;
    gap: 14px;
    padding: clamp(20px, 2vw, 26px);
    overflow: hidden;
}

.intention-preview-card .intention-preview-organization {
    min-height: 2.7em;
    color: var(--zuv-brown, #5f4c3a);
    font-size: .82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.intention-preview-card .intention-preview-date {
    display: grid;
    gap: 2px;
    color: var(--zuv-blue-dark, #08658f);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.intention-preview-card .intention-preview-date time {
    display: block;
}

.intention-preview-card .intention-preview-date span {
    color: inherit;
    font-size: .72em;
    font-weight: 800;
}

.intention-preview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.intention-preview-stats span {
    display: grid;
    align-content: start;
    gap: 2px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(13, 126, 174, .14);
    border-radius: 12px;
    color: var(--zuv-muted, #716352);
    background: rgba(13, 126, 174, .055);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.intention-preview-stats b {
    color: var(--zuv-blue-dark, #08658f);
    font-size: 1.15rem;
    line-height: 1;
}

.intention-preview-recipient {
    align-self: stretch;
    margin: 0;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--zuv-muted, #716352);
    background: var(--zuv-sand, #faf6ef);
    font-size: .78rem;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.intention-preview-recipient b {
    color: var(--zuv-ink, #241d17);
}

.intention-preview-recipient.is-warning {
    color: #7b4c12;
    background: #fff3d9;
}

.intention-preview-card > .button {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    margin-top: auto;
    padding: 11px 14px;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.intention-list-panel {
    margin-top: 28px;
    padding: clamp(20px, 3vw, 36px);
    scroll-margin-top: 24px;
}

.intention-list-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
}

.intention-list-heading > div:first-child {
    max-width: 76ch;
}

.intention-list-count {
    display: grid;
    min-width: 128px;
    padding: 15px 18px;
    border-radius: 18px;
    color: #0877a7;
    background: #e9f6fb;
    text-align: center;
}

.intention-list-count strong {
    font-size: 1.9rem;
    line-height: 1;
}

.intention-list-count span {
    margin-top: 5px;
    color: #51483e;
    font-size: .78rem;
    font-weight: 850;
}

.intention-tabs {
    margin: 22px 0 18px;
}

.intention-filter-bar {
    margin-bottom: 28px;
}

.intention-date-list {
    display: grid;
    gap: 22px;
}

.intention-date-group {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--zuv-line, #ded4c5);
    border-radius: 24px;
    background: #fff;
}

.intention-date-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    border-bottom: 1px solid #d9e9ef;
    background: linear-gradient(100deg, #eaf7fb, #f8fbfb 66%, #fff);
}

.intention-date-title {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.intention-date-title time,
.intention-date-title > strong {
    color: #201a15;
    font-size: clamp(1.2rem, 2vw, 1.58rem);
    font-weight: 900;
    line-height: 1.15;
}

.intention-date-title span {
    color: #0877a7;
    font-weight: 850;
}

.intention-date-title small {
    color: var(--zuv-muted, #716352);
    line-height: 1.4;
}

.intention-text-list {
    display: grid;
}

.intention-text-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 245px);
    gap: clamp(20px, 3vw, 42px);
    padding: 22px;
    border-bottom: 1px solid var(--zuv-line, #ded4c5);
}

.intention-text-card:last-child {
    border-bottom: 0;
}

.intention-text-card.is-completed {
    background: #fbfdfc;
}

.intention-text-card.is-archived {
    background: #faf7f3;
}

.intention-text-card-main,
.intention-text-card-meta {
    min-width: 0;
}

.intention-card-states {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
}

.intention-full-text {
    max-width: 78ch;
    margin: 0;
    color: #211b16;
    font-size: clamp(1.05rem, 1.45vw, 1.24rem);
    font-weight: 720;
    line-height: 1.6;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.intention-text-card-meta {
    display: grid;
    align-content: start;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid var(--zuv-line, #ded4c5);
}

.intention-text-card-meta > div,
.intention-text-card-meta > div > small,
.intention-text-card-meta > small {
    display: grid;
    gap: 4px;
}

.intention-text-card-meta small {
    color: var(--zuv-muted, #716352);
    line-height: 1.45;
}

.intention-text-card-meta .button {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
}

.intention-pagination {
    display: grid;
    gap: 15px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--zuv-line, #ded4c5);
}

.intention-pagination > p {
    margin: 0;
    color: var(--zuv-muted, #716352);
}

.intention-settings-after-list {
    margin-top: 28px;
}

@container admin-content (max-width: 1050px) {
    .intention-next-mass {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .intention-next-mass-action {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
    }
}

@container admin-content (max-width: 1280px) {
    .intention-priest-previews .intention-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container admin-content (max-width: 900px) {
    .intention-priest-previews .intention-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container admin-content (max-width: 760px) {
    .intention-page-heading,
    .intention-list-heading,
    .intention-text-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .intention-primary-actions,
    .intention-primary-actions .button,
    .intention-tabs,
    .intention-tabs .button {
        width: 100%;
    }

    .intention-primary-actions,
    .intention-tabs {
        align-items: stretch;
        flex-direction: column;
    }

    .intention-list-count {
        justify-self: start;
        min-width: 150px;
    }

    .intention-date-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .intention-date-heading .button {
        width: 100%;
    }

    .intention-text-card-meta {
        padding: 18px 0 0;
        border-top: 1px solid var(--zuv-line, #ded4c5);
        border-left: 0;
    }
}

@container admin-content (max-width: 520px) {
    .intention-priest-previews .intention-metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .intention-preview-card .intention-preview-organization {
        min-height: 0;
    }

    .intention-next-mass {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 20px;
        border-radius: 22px;
    }

    .intention-next-mass-date {
        grid-template-columns: repeat(3, auto);
        align-items: baseline;
        justify-content: start;
        gap: 8px;
        min-height: 0;
        border: 0;
        background: transparent;
        text-align: left;
    }

    .intention-next-mass-date strong {
        font-size: 1.55rem;
    }

    .intention-list-panel {
        padding: 16px 12px;
    }

    .intention-date-group {
        border-radius: 19px;
    }

    .intention-date-heading,
    .intention-text-card {
        padding: 18px 16px;
    }
}
.admin-form-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.legal-compare-text {
    max-height: 68vh;
    margin: 0;
    padding: 18px;
    overflow: auto;
    border: 1px solid var(--zuv-line, #ded4c5);
    border-radius: 16px;
    background: #fbfaf7;
    color: #342b23;
    font: 500 .86rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.preserve-lines {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.text-danger {
    color: #a5362a;
    font-weight: 800;
}

/* Final production rhythm: wrapped titles and long actions must stay legible. */
.admin-content h1,
.admin-content h2 {
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.admin-content h3,
.admin-content h4 {
    line-height: 1.16 !important;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.admin-content :where(.button, button, input[type="button"], input[type="submit"]) {
    min-height: var(--admin-touch-target);
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Production QA: dense module navigation stays fully visible without a hidden
   horizontal tail, including the thirteen-section volunteer workspace. */
.admin-content .vol-admin-tabs {
    display: flex;
    max-width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
}

.admin-content .vol-admin-tabs a {
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

/* Machine identifiers must wrap inside their own cards instead of widening
   the dashboard or being cut at the content edge. */
.admin-content .stat-card,
.admin-content .detail-grid > div,
.admin-content .detail-grid strong,
.admin-content .distribution-code {
    min-width: 0;
    max-width: 100%;
}

.admin-content .distribution-code {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Names, addresses and gift titles are operational data, not decorative
   labels: show the complete value and let the row grow when necessary. */
.admin-content .administrator-team-table .person-cell > div {
    min-width: 0;
    overflow: visible;
}

.admin-content .administrator-team-table .person-cell strong,
.admin-content .administrator-team-table .person-cell span,
.admin-content .gift-dimension-nav strong {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

/* R491: shared spiritual-gifts email preview, including narrow screens. */
.gift-mail-preview { max-width: 680px; margin-inline: auto; border: 1px solid #e6d8c9; border-radius: 24px; padding: clamp(18px, 4vw, 28px); background: #fff; overflow-wrap: anywhere; }
.gift-mail-preview p { white-space: pre-line; }
.gift-mail-preview-brand { color: #147ca8; font-weight: 700; }
.gift-mail-preview-action { padding-top: 20px; }
.gift-mail-preview .button { max-width: 100%; white-space: normal; text-align: center; }

/* Grid gaps own the spacing between cards, including donations and work items.
   The generic adjacent-panel margin must not stagger cards in the same row. */
.admin-content > .work-detail-grid {
    margin-block: 0 var(--admin-section-gap);
}
.admin-content .work-detail-grid > .panel {
    margin: 0;
    min-width: 0;
}
.admin-content .detail-list {
    display: grid;
    gap: 16px;
    margin: 0;
}
.admin-content .detail-list > div {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr);
    align-items: baseline;
    gap: 4px 18px;
    min-width: 0;
}
.admin-content .detail-list dt {
    color: var(--zuv-muted);
    font-size: .85rem;
    line-height: 1.5;
}
.admin-content .detail-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
}
.donation-mail-history .data-table { min-width: 0; }
.donation-mail-history time { display: block; }
.member-contact-editor { margin: 0 0 24px; }
.member-contact-editor > summary { width: fit-content; cursor: pointer; }
.member-contact-editor > form { margin-top: 20px; }
.member-contact-editor .field { min-width: 0; }
.member-contact-editor .field small { overflow-wrap: anywhere; }
.table-wrap.is-scrollable { overscroll-behavior-x: contain; scrollbar-width: thin; }
.table-wrap:focus-visible { outline: 2px solid var(--zuv-primary, #137fab); outline-offset: 4px; }
.work-alert-banner > span:last-child { flex-shrink: 0; white-space: nowrap; }
@container admin-content (max-width: 900px) {
    .work-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@container admin-content (max-width: 620px) {
    .admin-content .detail-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .donation-mail-history table,
    .donation-mail-history tbody,
    .donation-mail-history tr { display: block; width: 100%; }
    .donation-mail-history thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .donation-mail-history tr + tr { border-top: 1px solid var(--zuv-line); }
    .donation-mail-history .data-table td {
        display: grid;
        grid-template-columns: minmax(90px, .6fr) minmax(0, 1.4fr);
        gap: 12px;
        padding: 10px 0;
        border: 0;
        overflow-wrap: anywhere;
    }
    .donation-mail-history td::before {
        content: attr(data-label);
        color: var(--zuv-muted);
        font-size: .85rem;
    }
    .donation-mail-history td[colspan] { display: block; }
    .donation-mail-history td[colspan]::before { content: none; }
}
