html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Shared back link (Marriage + all SAC-PREP pages). Global on purpose:
   Blazor scoped CSS only styles its own component, so pages reusing the
   class would otherwise render an unstyled browser link. */
.marriage-prep-back {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 2px;
    color: #0b5cab;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.marriage-prep-back:hover,
.marriage-prep-back:focus {
    background: #eaf3fb;
    color: #08427a;
}

/* SAC-PREP shared landing styles (parent + 6 child tracks). Global on purpose:
   Blazor scoped CSS only applies to its own component, and all 7 landings
   share the same banner/card/coming-soon shell. Mobile-first adaptive grid. */
.sac-prep-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 2rem;
    color: #173a5e;
}

.sac-prep-hero {
    overflow: hidden;
    margin: 0 0 14px;
    border: 1px solid #ead8b6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(26, 55, 84, 0.04);
}

.sac-prep-hero-banner {
    display: block;
    width: 100%;
    height: auto;
}

.sac-prep-hero-body {
    padding: 16px 18px 18px;
}

.sac-prep-title {
    margin: 12px 0 0;
    color: #c59a45;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.sac-prep-hero .sac-prep-title {
    margin-top: 0;
}

.sac-prep-description {
    max-width: 640px;
    margin: 6px 0 0;
    color: #173a5e;
    font-size: 0.82rem;
    line-height: 1.35;
}

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

.sac-prep-card {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 10px 10px 12px;
    border: 1px solid #ead8b6;
    border-radius: 10px;
    background: #fff;
    color: #173a5e;
    text-decoration: none;
}

.sac-prep-card:hover {
    border-color: #c59a45;
    background: #fcfaf5;
}

.sac-prep-card-banner {
    display: block;
    width: 100%;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
}

.sac-prep-card-title {
    color: #0c2b4d;
    font-size: 0.88rem;
    font-weight: 700;
}

.sac-prep-card-action {
    color: #092e55;
    font-size: 0.78rem;
    font-weight: 700;
}

@media (max-width: 860px) {
    .sac-prep-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .sac-prep-grid {
        grid-template-columns: 1fr;
    }

    .sac-prep-card-banner {
        height: 160px;
    }
}

/* SAC-PREP splash pages (e.g. Baptism): full-width banner, right-aligned
   actions, left-aligned search, last-10 table. Shared by future tracks. */
.sac-prep-splash-banner {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ead8b6;
    border-radius: 12px;
    background: #fff;
}

.sac-prep-splash-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 14px 0 26px;
}

.sac-prep-public-url {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 60%;
    padding: 6px 6px 6px 12px;
    border: 1px dashed #8a6d2b;
    border-radius: 6px;
    background: #fdf9ef;
    font-size: 0.78rem;
}

.sac-prep-public-url-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0c2b4d;
}

.sac-prep-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.sac-prep-action--primary {
    background: #c59a45;
    color: #fff;
}

.sac-prep-action--primary:hover {
    background: #a97825;
    color: #fff;
}

.sac-prep-action--secondary {
    border-color: #092e55;
    background: #fff;
    color: #092e55;
}

.sac-prep-action--secondary:hover {
    background: #f4f7fa;
    color: #092e55;
}

.sac-prep-splash-search {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.sac-prep-search-input {
    flex: 0 1 220px;
    max-width: 260px;
    min-width: 0;
    min-height: 36px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #e4a44b;
    border-radius: 6px;
    background: #fff;
    color: #183858;
    font-family: inherit;
    font-size: 0.82rem;
}

.sac-prep-filter-input {
    width: auto;
    min-height: 36px;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #183858;
    color-scheme: light;
    font-family: inherit;
    font-size: 0.82rem;
}

.sac-prep-search-input:focus-visible {
    outline: 2px solid #c98923;
    outline-offset: 1px;
}

.sac-prep-filter-button {
    min-height: 36px;
    padding: 7px 15px;
    border: 1px solid #092e55;
    border-radius: 6px;
    background: #092e55;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.sac-prep-filter-button:hover {
    background: #0b3d70;
}

.ocia-stage-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0 0 12px;
}

.sac-prep-splash-list {
    margin-bottom: 14px;
    padding: 16px 18px 18px;
    border: 1px solid #e8b86b;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(26, 55, 84, 0.04);
}

.sac-prep-list-title {
    margin: 0 0 13px;
    color: #0c2b4d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.08;
}

.sac-prep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.sac-prep-table thead th {
    padding: 10px 12px;
    border-bottom: 2px solid #ead8b6;
    color: #0c2b4d;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.sac-prep-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0e3c8;
    color: #173a5e;
    vertical-align: middle;
}

.sac-prep-table tbody tr:last-child td {
    border-bottom: none;
}

.sac-prep-row {
    cursor: pointer;
}

.sac-prep-row:hover td {
    background: #fcfaf5;
}

.sac-prep-empty {
    padding: 25px 16px;
    border: 1px dashed #e4c99d;
    border-radius: 8px;
    background: #fcfaf5;
    text-align: center;
}

.sac-prep-empty strong {
    color: #0c2b4d;
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .sac-prep-splash-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .sac-prep-public-url {
        margin-right: 0;
        flex: 1 1 100%;
        max-width: none;
    }

    .sac-prep-action {
        flex: 1 1 0;
    }

    .sac-prep-search-input,
    .sac-prep-filter-button {
        width: 100%;
        max-width: none;
    }

    .sac-prep-table thead {
        display: none;
    }

    .sac-prep-table,
    .sac-prep-table tbody,
    .sac-prep-table tr,
    .sac-prep-table td {
        display: block;
        width: 100%;
    }

    .sac-prep-table tr {
        margin-bottom: 10px;
        border: 1px solid #ead8b6;
        border-radius: 8px;
    }

    .sac-prep-table tbody td {
        display: grid;
        grid-template-columns: minmax(110px, 40%) 1fr;
        gap: 8px;
        border-bottom: 1px solid #f0e3c8;
    }

    .sac-prep-table tbody td::before {
        content: attr(data-label);
        color: #6e7d8d;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

/* Baptism settings workspace. Global (not scoped) so future tracks can share
   the shell; mirrors the Marriage settings visual language. */
.bap-settings-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 0 2rem;
    color: #173a5e;
}

.bap-settings-header {
    margin: 0 0 14px;
}

.bap-settings-header h1 {
    margin: 0;
    color: #c59a45;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

.bap-settings-lead {
    margin: 6px 0 0;
    color: #173a5e;
    font-size: 0.82rem;
    line-height: 1.35;
}

.bap-settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bap-settings-section {
    background: #fff;
    border: 1px solid #e8b86b;
    border-radius: 12px;
    padding: 15px 18px 16px;
    box-shadow: 0 1px 2px rgba(26, 55, 84, 0.04);
}

.bap-settings-section-title {
    margin: 0 0 3px;
    color: #0c2b4d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.08;
}

.bap-settings-description {
    margin: 0 0 12px;
    color: #173a5e;
    font-size: 0.76rem;
    line-height: 1.35;
}

.bap-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 16px;
}

.bap-names-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.bap-names-row--maiden {
    grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr) minmax(0, 1fr);
}

.bap-city-state-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 12px;
}

.bap-contact-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bap-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bap-settings-field--compact {
    max-width: 230px;
}

.bap-settings-field--narrow {
    max-width: 360px;
}

.bap-settings-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.bap-settings-label {
    color: #0c2b4d;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.bap-settings-readonly {
    min-height: 34px;
    padding: 7px 0;
    color: #0c2b4d;
    font-size: 0.88rem;
    font-weight: 700;
}

.bap-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0c2b4d;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.bap-check input[type='checkbox'] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #092e55;
    cursor: pointer;
}

.bap-settings-input,
.bap-settings-select {
    box-sizing: border-box;
    min-width: 0;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid #e4a44b;
    border-radius: 6px;
    background: #fff;
    color: #183858;
    font-family: inherit;
    font-size: 0.84rem;
    line-height: 1.2;
}

.bap-settings-input {
    width: 100%;
}

.bap-settings-input:focus-visible,
.bap-settings-select:focus-visible {
    outline: 2px solid #c98923;
    outline-offset: 1px;
}

.bap-settings-subtitle {
    margin: 15px 0 2px;
    color: #9a5a08;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.2;
}

.bap-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 0;
    border-bottom: 1px solid #eee5d4;
}

.bap-settings-row:last-of-type {
    border-bottom: 0;
}

.bap-settings-row-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #0c2b4d;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.bap-settings-row > .bap-settings-input.bap-settings-row-name {
    width: auto;
}

.bap-settings-select {
    flex: 0 0 auto;
    width: auto;
}

.bap-settings-add,
.bap-settings-submit,
.bap-settings-link {
    font-family: inherit;
    cursor: pointer;
}

.bap-settings-add {
    align-self: flex-start;
    margin-top: 7px;
    padding: 2px 0 3px;
    border: 0;
    background: transparent;
    color: #063d78;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.bap-settings-add:hover {
    color: #092e55;
    text-decoration: underline;
}

.bap-settings-link {
    flex: 0 0 auto;
    padding: 6px 11px;
    border: 1px solid #e08a83;
    border-radius: 6px;
    background: #fff;
    color: #b3262e;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
}

.bap-settings-link:hover {
    border-color: #b3262e;
    background: #fff5f4;
}

.bap-settings-submit {
    align-self: flex-end;
    min-width: 122px;
    min-height: 42px;
    padding: 8px 15px;
    border: 0;
    border-radius: 6px;
    background: #062d55;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
}

.bap-settings-submit:hover {
    background: #0b3d70;
}

.bap-settings-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.not-found-page {
    max-width: 40rem;
    margin: 3rem auto;
    padding: 0 1.25rem;
    text-align: center;
}

.not-found-page h1 {
    font-size: 1.6rem;
    margin: 0 0 0.6rem;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
}

a.not-found-action {
    text-decoration: none;
}

a.bap-settings-submit.not-found-action {
    display: inline-flex;
    align-items: center;
    color: #fff;
}

.bap-settings-message {
    margin: 0 0 7px;
    color: #173a5e;
    font-size: 0.84rem;
}

.bap-settings-message--error {
    color: #a1262d;
}

.bap-settings-message--ok {
    color: #1c6a43;
}

.bap-settings-notes {
    min-height: 76px;
    resize: vertical;
}

.bap-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Baptism case workspace: tabs, facts, documents, modals, certificate. */
.bap-case-page-title {
    margin: 0 0 12px;
    color: #c59a45;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.15;
}

.bap-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid #092e55;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.bap-tab {
    flex: 1 1 0;
    padding: 9px 10px;
    border: 1px solid #d8e0e8;
    border-radius: 6px;
    background: #f4f7fa;
    color: #6e7d8d;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

.bap-tab:hover {
    color: #0c2b4d;
    border-color: #092e55;
}

.bap-tab--active {
    border-color: #062d55;
    background: #062d55;
    color: #fff;
}

.bap-facts {
    display: grid;
    gap: 9px;
    margin: 14px 0;
}

.bap-facts > div {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 10px;
}

.bap-facts dt {
    color: #6e7d8d;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bap-facts dd {
    margin: 0;
    color: #0c2b4d;
    font-size: 0.88rem;
}

.bap-status-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #1c6a43;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
}

.bap-mode-badge {
    flex: 0 0 auto;
    color: #6e7d8d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bap-doc-state {
    flex: 0 0 auto;
    color: #0c2b4d;
    font-size: 0.82rem;
    font-weight: 700;
}

.bap-doc {
    padding: 10px 0;
    border-bottom: 1px solid #eee5d4;
}

.bap-doc:last-of-type {
    border-bottom: 0;
}

.bap-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.bap-doc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    border: 1px solid #092e55;
    border-radius: 6px;
    background: #fff;
    color: #092e55;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.bap-doc-button:hover {
    background: #f4f7fa;
}

.bap-doc-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bap-doc-button--danger {
    border-color: #e08a83;
    color: #b3262e;
}

.bap-doc-button--danger:hover {
    border-color: #b3262e;
    background: #fff5f4;
}

label.bap-doc-button input[type='file'] {
    display: none;
}

.bap-qr-code {
    display: block;
    width: 200px;
    height: 200px;
    margin: 12px auto;
}

.bap-preview-image {
    display: block;
    width: 100%;
    border: 1px solid #ead8b6;
    border-radius: 8px;
}

.bap-preview-frame {
    width: 100%;
    min-height: 60vh;
    border: 1px solid #ead8b6;
    border-radius: 8px;
}

.bap-close-case {
    min-height: 42px;
    padding: 8px 18px;
    border: 0;
    border-radius: 6px;
    background: #a1262d;
    color: #fff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.bap-close-case:hover {
    background: #841d23;
}

.bap-edit-link {
    display: inline-block;
    margin-top: 6px;
    border-color: #063d78;
    color: #063d78;
    text-decoration: none;
}

.bap-edit-link:hover {
    border-color: #092e55;
    background: #f4f7fa;
    color: #092e55;
}

.bap-celebrant-field {
    margin-top: 14px;
}

.bap-prep-block {
    padding: 12px 0;
    border-bottom: 1px solid #eee5d4;
}

.bap-prep-block:last-of-type {
    border-bottom: 0;
}

.bap-prep-block .bap-settings-subtitle {
    margin-top: 0;
}

.bap-prep-name {
    margin: 0 0 10px;
    color: #0c2b4d;
    font-size: 1.05rem;
    font-weight: 700;
}

.bap-prep-question {
    margin-top: 10px;
}

.bap-radio-row {
    display: flex;
    gap: 18px;
    margin-top: 2px;
}

.bap-check input[type='radio'] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #092e55;
    cursor: pointer;
}

.bap-prep-alert {
    margin: 10px 0 0;
    color: #a1262d;
    font-size: 0.82rem;
    font-weight: 700;
}

.sac-prep-cell-delete {
    width: 44px;
    text-align: right;
}

.sac-prep-delete {
    min-width: 30px;
    min-height: 30px;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #b3262e;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.sac-prep-delete:hover {
    background: #fff5f4;
    border-color: #e08a83;
}

.sac-prep-delete--confirm {
    border-color: #b3262e;
    background: #fff5f4;
    font-size: 0.72rem;
    white-space: nowrap;
}

.sac-prep-col-delete {
    display: inline-block;
    width: 44px;
}

.bap-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 5vh 16px;
    background: rgba(9, 46, 85, 0.55);
}

.bap-modal {
    width: min(560px, 100%);
    padding: 20px 22px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(9, 46, 85, 0.35);
}

.bap-modal .bap-form-actions {
    margin-top: 16px;
}

.bap-cert-modal {
    width: min(680px, 100%);
}

/* OCIA norms modal: full-width banner opens the norms overview rendered
   with the house markdown style (.library-markdown). */
.ocia-banner-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.ocia-norms-modal {
    width: min(760px, 100%);
}

.ocia-norms-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
}

/* New OCIA Case: numbered sections, screening rail, determined path. */
.ocia-new-page {
    background: #eef1f6;
    border-radius: 12px;
    padding: 18px 20px 22px;
}

.ocia-new-page .marriage-prep-back {
    display: inline-block;
    margin-bottom: 6px;
}

.ocia-new-title {
    margin: 0;
    color: #c59a45;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.ocia-new-subtitle {
    margin: 2px 0 14px;
    color: #486581;
    font-size: 0.82rem;
    text-align: center;
}

.ocia-section {
    margin-bottom: 14px;
    padding: 16px 20px 18px;
    border: 1px solid #e1e7ee;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.ocia-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.ocia-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #102a43;
    font-size: 0.98rem;
    font-weight: 800;
}

.ocia-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #1f6fb2;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
}

.ocia-required-note {
    color: #c0392b;
    font-size: 0.7rem;
    white-space: nowrap;
}

.ocia-info-note {
    color: #7b8794;
    font-size: 0.7rem;
}

.ocia-personal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 14px;
}

.ocia-personal-grid .bap-settings-input,
.ocia-branch-form .bap-settings-input {
    border-color: #d8bd7f;
    border-radius: 6px;
    background: #fff;
}

.ocia-personal-grid .bap-settings-input:focus-visible,
.ocia-branch-form .bap-settings-input:focus-visible {
    outline: 2px solid #c59a45;
    outline-offset: 1px;
}

.ocia-personal-grid .bap-settings-label {
    color: #334e68;
    font-size: 0.72rem;
    font-weight: 700;
}

.ocia-span-2 {
    grid-column: span 2;
}

.ocia-state-zip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.ocia-age-text {
    display: block;
    margin-top: 2px;
    color: #7b8794;
    font-size: 0.7rem;
}

.ocia-field-error {
    display: block;
    margin-top: 2px;
    color: #c0392b;
    font-size: 0.7rem;
    font-weight: 700;
}

.ocia-age-text--minor {
    color: #b3262e;
    font-weight: 700;
}

.bap-settings-input--error {
    border-color: #b3262e;
    background: #fdf1f1;
}

.ocia-summary {
    margin: 0;
}

.ocia-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.ocia-summary dt {
    color: #6e7d8d;
}

.ocia-summary dd {
    margin: 0;
    font-weight: 700;
}

.ocia-path-panel--danger {
    border-color: #e5a9ad;
    background: #fdf1f1;
    color: #7a1f24;
}

.ocia-danger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #b3262e;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.ocia-screen-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 16px;
    align-items: start;
}

.ocia-questions {
    position: relative;
    padding-left: 18px;
}

.ocia-questions::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 5px;
    width: 2px;
    background: #1f6fb2;
    border-radius: 2px;
}

.ocia-question {
    position: relative;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ebf2fa;
}

.ocia-question::before {
    content: "";
    position: absolute;
    top: 16px;
    left: -17px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1f6fb2;
}

.ocia-question .bap-settings-label {
    display: block;
    margin-bottom: 6px;
    color: #102a43;
    font-size: 0.8rem;
    font-weight: 700;
}

.ocia-question .bap-radio-row {
    gap: 18px;
}

.ocia-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ocia-rail-card {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.ocia-rail-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.ocia-rail-card p {
    margin: 0 0 6px;
}

.ocia-rail-card p:last-child {
    margin-bottom: 0;
}

.ocia-rail-card ol,
.ocia-rail-card ul {
    margin: 4px 0;
    padding-left: 1.25rem;
}

.ocia-rail-card li {
    margin: 3px 0;
}

.ocia-status-card {
    border: 1px solid #f0d9a8;
    background: #fdf3e3;
    color: #6b4e16;
}

.ocia-status-card--ok {
    border-color: #bfe0c3;
    background: #e9f6ec;
    color: #1f5c2e;
}

.ocia-next-card {
    border: 1px solid #e0e6ec;
    background: #f2f5f9;
    color: #334e68;
}

.ocia-require-box {
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px solid #bfe0c3;
    border-radius: 8px;
    background: #e9f6ec;
    font-size: 0.8rem;
    color: #1f5c2e;
}

.ocia-require-box p {
    margin: 4px 0 10px;
}

.ocia-require-box--error {
    border-color: #f0b6b0;
    background: #fdecea;
    color: #8f1d16;
}

.ocia-result-box {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px solid #f0d9a8;
    border-radius: 8px;
    background: #fdf3e3;
    font-size: 0.8rem;
    color: #6b4e16;
}

.ocia-result-box p {
    margin: 4px 0 0;
}

.ocia-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d69e2e;
    color: #fff;
    font-weight: 700;
}

.ocia-branch-form {
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px dashed #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.ocia-appointment {
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #f0d9a8;
    border-radius: 8px;
    background: #fdf3e3;
    font-size: 0.8rem;
    color: #6b4e16;
}

.ocia-appointment > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.ocia-branch-form > .bap-settings-link {
    margin-bottom: 8px;
}

.ocia-schedule-button {
    display: block;
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: #1f6fb2;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.ocia-schedule-button:hover {
    background: #195d94;
}

.ocia-schedule-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ocia-button-note {
    margin: 6px 0 0;
    color: #7b8794;
    font-size: 0.7rem;
    text-align: center;
}

.ocia-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-weight: 700;
}

.ocia-check-icon--large {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
}

.ocia-lock-icon {
    font-size: 1.4rem;
}

.ocia-path-panel {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #e0e6ec;
    border-radius: 8px;
    background: #f2f5f9;
    color: #7b8794;
    font-size: 0.83rem;
}

.ocia-path-panel p {
    margin: 4px 0 0;
}

.ocia-path-panel--ready {
    border-color: #bfe0c3;
    background: #e9f6ec;
    color: #1f5c2e;
}

.ocia-path-kicker {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ocia-path-name {
    display: block;
    font-size: 1.08rem;
    font-weight: 800;
}

.ocia-path-sub {
    display: block;
    font-size: 0.8rem;
}

.ocia-form-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

.ocia-create-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ocia-create-button {
    background: #1f6fb2;
    color: #fff;
}

.ocia-create-button:hover:not(:disabled) {
    background: #195d94;
    color: #fff;
}



.ocia-settings-page .ocia-new-title {
    text-align: left;
}

.ocia-settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ocia-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.ocia-add-button {
    flex: none;
    min-height: 32px;
    padding: 5px 12px;
    border: 1px solid #1f6fb2;
    border-radius: 6px;
    background: #fff;
    color: #1f6fb2;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.ocia-add-button:hover:not(:disabled) {
    background: #eef4fa;
}

.ocia-add-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ocia-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e3eefb;
    color: #1f6fb2;
}

.ocia-card-icon svg {
    width: 16px;
    height: 16px;
}

.ocia-settings-table th {
    background: #f2f5f9;
    color: #334e68;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ocia-settings-table td .bap-radio-row {
    gap: 12px;
}

.ocia-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.ocia-compact-name {
    font-weight: 600;
}

.ocia-compact-actions {
    display: inline-flex;
    gap: 2px;
    flex: none;
}

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

.ocia-doc-card {
    border: 1px solid #e0e6ec;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}

.sac-prep-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ocia-banner-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.ocia-banner-button .sac-prep-splash-banner {
    pointer-events: none;
}

.ocia-ws-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ocia-ws-head .bap-case-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
}

.ocia-active-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e9f6ec;
    color: #1f5c2e;
    font-size: 0.7rem;
    font-weight: 700;
}

.ocia-stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 10px 0 18px;
}

.ocia-step {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    text-align: center;
}

.ocia-step::before {
    content: "";
    position: absolute;
    top: 17px;
    left: -50%;
    width: 100%;
    border-top: 2px solid #d9e2ec;
}

.ocia-step:first-child::before {
    display: none;
}

.ocia-step-number {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #d9e2ec;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
}

.ocia-step--current .ocia-step-number {
    background: #1f6fb2;
}

.ocia-step--done .ocia-step-number {
    background: #2e7d32;
}

.ocia-step-label {
    color: #7b8794;
    font-size: 0.78rem;
    line-height: 1.3;
}

.ocia-step-button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.ocia-step--viewing .ocia-step-number {
    outline: 2px solid #1f6fb2;
    outline-offset: 2px;
}

.ocia-step--current .ocia-step-label {
    color: #1f6fb2;
    font-weight: 700;
}

.ocia-step-of {
    margin: 0 0 2px;
    color: #7b8794;
    font-size: 0.74rem;
}

.ocia-stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.ocia-stage-title {
    margin: 0;
    color: #102a43;
    font-size: 1.15rem;
    font-weight: 800;
}

.ocia-focus-box {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ebf2fa;
    color: #334e68;
    font-size: 0.8rem;
}

.ocia-focus-box strong {
    display: block;
    margin-bottom: 4px;
    color: #102a43;
}

.ocia-focus-box p {
    margin: 0;
}

.ocia-req-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 8px;
}

.ocia-req-title {
    margin: 0;
    color: #102a43;
    font-size: 0.92rem;
    font-weight: 800;
}

.ocia-req-count {
    color: #7b8794;
    font-size: 0.72rem;
    white-space: nowrap;
}

.ocia-req-table th {
    background: #f2f5f9;
    color: #334e68;
    font-size: 0.72rem;
}

.ocia-req-table .ocia-req-name {
    max-width: 240px;
    white-space: normal;
    line-height: 1.35;
}

.ocia-req-table .ocia-req-notes-cell {
    min-width: 220px;
}

.ocia-req-notes-input {
    width: 100%;
    min-height: 34px;
    font-size: 0.78rem;
}

.ocia-req-edit-row td {
    background: #f8fafc;
}

.bap-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* OCIA record document */
.ocia-record-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.ocia-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.ocia-record-kicker {
    margin: 0;
    color: #102a43;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ocia-record-title {
    margin: 0;
    color: #c59a45;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
}

.ocia-record-path {
    margin: 2px 0 0;
    color: #486581;
    font-size: 0.85rem;
}

.ocia-record-banner {
    flex: none;
    width: min(380px, 42%);
    height: 96px;
    border-radius: 8px;
    object-fit: cover;
}

.ocia-record-card {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid #e1e7ee;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}

.ocia-record-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ocia-record-card-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #102a43;
    font-size: 0.92rem;
    font-weight: 800;
}

.ocia-record-icon {
    color: #1f6fb2;
    font-size: 1rem;
}

.ocia-record-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.ocia-record-badge--ok {
    background: #e9f6ec;
    color: #1f5c2e;
}

.ocia-record-badge--warn {
    background: #fdf3e3;
    color: #8a5a00;
}

.ocia-record-badge--muted {
    background: #eef1f6;
    color: #7b8794;
}

.ocia-record-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
    margin: 0;
}

.ocia-record-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px dotted #e6ebf1;
    font-size: 0.78rem;
}

.ocia-record-facts dt {
    color: #7b8794;
}

.ocia-record-facts dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.ocia-record-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.ocia-record-grid .ocia-record-card {
    margin-bottom: 0;
}

.ocia-record-summary {
    margin: 0 0 8px;
    color: #7b8794;
    font-size: 0.74rem;
    font-style: italic;
}

.ocia-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
}

.ocia-mini-table th {
    padding: 5px 8px;
    border-bottom: 1px solid #e1e7ee;
    color: #7b8794;
    font-size: 0.66rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ocia-mini-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}

.ocia-mini-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border: 1px solid #c3ccd6;
    border-radius: 50%;
    color: transparent;
    font-size: 0.7rem;
    vertical-align: -3px;
}

.ocia-mini-check--done {
    border-color: #2e7d32;
    background: #2e7d32;
    color: #fff;
}

.ocia-doc-badge {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
}

.ocia-doc-badge--ok {
    background: #e9f6ec;
    color: #1f5c2e;
}

.ocia-doc-badge--info {
    background: #e3eefb;
    color: #1f6fb2;
}

.ocia-doc-badge--muted {
    background: #eef1f6;
    color: #7b8794;
}

.ocia-norms-modal {
    width: min(760px, 100%);
}

.bap-cert-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.bap-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #092e55;
    border-radius: 8px;
    background: #fff;
    color: #092e55;
    cursor: pointer;
}

.bap-print-button:hover {
    background: #f4f7fa;
}

.bap-print-icon {
    width: 20px;
    height: 20px;
}

.bap-cert {
    border: 3px double #c59a45;
    border-radius: 8px;
    padding: 28px 30px;
    background: #fffdf8;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bap-cert-watermark {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-28deg);
    color: rgba(179, 38, 46, 0.28);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    white-space: nowrap;
    pointer-events: none;
}

.bap-cert-parish {
    margin: 0;
    color: #6e7d8d;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bap-cert-title {
    margin: 6px 0 4px;
    color: #c59a45;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.7rem;
    letter-spacing: 0.1em;
}

.bap-cert-name {
    margin: 0 0 4px;
    color: #0c2b4d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
}

.bap-cert-track {
    margin: 0 0 16px;
    color: #0c2b4d;
    font-size: 1.02rem;
    letter-spacing: 0.06em;
}

.bap-cert .bap-facts {
    text-align: left;
}

@media (max-width: 640px) {
.bap-tabs {
        flex-direction: column;
    }

    .bap-tab {
        border: 1px solid #ead8b6;
        border-radius: 8px;
        text-align: left;
    }

    .bap-facts > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

@media (max-width: 640px) {
    .bap-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .bap-names-row,
    .bap-city-state-row,
    .bap-contact-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .bap-settings-field--compact,
    .bap-settings-field--narrow {
        max-width: none;
    }

    .bap-settings-row {
        flex-wrap: wrap;
    }

    .bap-settings-row-name {
        flex-basis: 100%;
    }

    .bap-settings-select {
        flex: 1 1 auto;
    }

    .bap-settings-submit {
        align-self: stretch;
        width: 100%;
    }

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

    .ocia-span-2 {
        grid-column: auto;
    }

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

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

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

    .ocia-record-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .ocia-record-banner {
        display: none;
    }

    .ocia-form-footer {
        flex-direction: column;
    }

    .ocia-create-wrap {
        align-items: stretch;
    }

}

@media (max-width: 1024px) {
    .ocia-personal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ocia-screen-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* =========================================================================
   Shared settings form/member styles (used by Settings, Setup wizard,
   and the organization members manager).
   ========================================================================= */

.settings-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    margin: 0 0 1.1rem;
    box-shadow: 0 1px 3px rgba(20, 36, 58, 0.06);
}

.settings-section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #14243a;
    margin: 0 0 0.9rem;
}

.settings-note {
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-form--row {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.settings-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334a63;
}

.settings-input {
    border: 1px solid #cfd6df;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: #20242b;
    background: #fff;
}

.settings-input:focus-visible {
    outline: 2px solid #c9a44c;
    outline-offset: 0;
}

.settings-submit {
    background: #14243a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

.settings-submit:hover {
    background: #1c3555;
}

.settings-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-message {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.settings-message--error {
    color: #8f1d2c;
}

.settings-message--ok {
    color: #1a5f3a;
}

.settings-members {
    margin-top: 1rem;
    border-top: 1px solid #eef0f3;
}

.settings-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #eef0f3;
}

.settings-member-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    min-width: 0;
}

.settings-member-email {
    font-size: 0.92rem;
    font-weight: 600;
    color: #14243a;
    overflow-wrap: anywhere;
}

.settings-member-email--secondary {
    font-weight: 400;
    font-size: 0.8rem;
    color: #64748b;
}

.settings-member-role {
    font-size: 0.82rem;
    color: #64748b;
}

.settings-member-status {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.settings-member-status--active {
    color: #1a5f3a;
    background: #e7f4ec;
}

.settings-member-status--inactive {
    color: #8f1d2c;
    background: #fbe9ec;
}

.settings-link {
    background: none;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    color: #14243a;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.settings-link:hover {
    border-color: #c9a44c;
    background: #fbf3e2;
}

.settings-link:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-link--danger {
    border-color: #e3c4c9;
    color: #8f1d2c;
}

.settings-link--danger:hover {
    border-color: #8f1d2c;
    background: #fbe9ec;
}

.settings-member-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-member-password {
    margin: 0 0 0.9rem;
    padding: 0.85rem 0.9rem;
    background: #fbf9f3;
    border: 1px solid #e8e0cd;
    border-radius: 8px;
}

.settings-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.2rem 0;
}

@media (max-width: 600px) {
    .settings-form--row {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-member {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Global Blazor error UI: exactly one #blazor-error-ui lives in App.razor,
   outside every layout, so it is never re-rendered or duplicated. */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
