html, body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(173, 221, 255, 0.48), transparent 24%),
        radial-gradient(circle at top right, rgba(123, 190, 226, 0.22), transparent 20%),
        linear-gradient(180deg, #f5fbff 0%, #eef7fc 48%, #e7f0f7 100%);
    color: #16354c;
    font-size: 93.75%;
}

* { box-sizing: border-box; }
a { color: #155179; text-decoration: none; }

.site-shell { min-height: 100vh; }
.top-bar, .main-content { max-width: min(80vw, 1480px); margin: 0 auto; }
.floating-help-launcher {
    position: fixed;
    top: 10.5rem;
    right: 1.5rem;
    z-index: 30;
}
.floating-help-button {
    display: grid;
    gap: 0.2rem;
    min-width: 220px;
    padding: 0.95rem 1.1rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff4e4 0%, #ffe2b8 100%);
    border: 1px solid rgba(217, 108, 6, 0.16);
    color: #8a4a06;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 18px 46px rgba(39, 61, 82, 0.16);
    cursor: pointer;
    text-align: center;
    justify-items: center;
}
.floating-help-button:hover {
    transform: translateY(-2px);
}
.floating-help-badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #b05a05;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.floating-help-title {
    font-size: 1rem;
    line-height: 1.25;
    text-align: center; /* Centers the text horizontally */
}
.floating-help-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.help-modal-backdrop:target {
    display: grid;
}
.help-modal-shell {
    width: min(640px, 100%);
}
.modal-close-button {
    border: none;
    cursor: pointer;
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.75rem 0 0.75rem;
}
.main-content { padding: 0 0 2rem; display: grid; gap: 1.5rem; }
.admin-main-content { padding-top: 2rem; }
.brand-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}
.brand-title {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}
.brand-banner {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(12, 42, 61, 0.14);
}
.brand-subtitle, .brand-copy, .donation-copy, .payment-detail-card p {
    color: #58788e;
    line-height: 1.5;
}
.brand-subtitle {
    max-width: 700px;
    margin: 0 auto;
}
.top-bar-actions { display: flex; align-items: center; gap: 1rem; }
.ghost-link, .inline-button.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: #eef4f7;
    color: #16354c;
    font-weight: 700;
}
.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.72fr);
    align-items: start;
    gap: 1.1rem;
    padding: 1rem 1.2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #123b5b 0%, #1d577b 45%, #4f9ec4 100%);
    color: #f7fbff;
}
.eyebrow, .section-kicker, .stat-pill-label {
    margin: 0 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
}
.hero-summary h1, .panel-heading h2, .admin-hero h1 { margin: 0; }
.hero-disclaimer {
    margin: 0.65rem 0 0;
    max-width: 48rem;
    padding: 0.75rem 0.95rem;
    border-radius: 16px;
    background: rgba(247, 251, 255, 0.14);
    border: 1px solid rgba(247, 251, 255, 0.16);
    line-height: 1.55;
}
.hero-disclaimer a { color: #fff; font-weight: 700; text-decoration: underline; }
.hero-art { display: grid; justify-items: center; gap: 0.8rem; }
.hero-art img { width: 100%; max-width: 300px; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; width: 100%; }
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.65rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(235, 246, 255, 0.24);
    border-radius: 999px;
    background: rgba(235, 246, 255, 0.13);
}
.stat-pill-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-left: 0.15rem;
    border-radius: 999px;
    color: #f7fbff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}
.stat-pill-clear:hover {
    background: rgba(255, 255, 255, 0.28);
}
.mobile-utility-bar {
    display: none;
}
.mobile-panel-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.mobile-utility-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 18px;
    min-height: 3.25rem;
    padding: 0.8rem 0.9rem;
    background: linear-gradient(180deg, #f7fbfd 0%, #e8f1f7 100%);
    box-shadow: inset 0 0 0 1px rgba(18, 59, 91, 0.08);
    color: #16354c;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
}
.mobile-utility-button.is-active {
    background: #123b5b;
    color: #f7fbff;
}
.panel-support {
    display: none;
}
.support-platform-copy {
    margin-top: 1.5rem;
}
.help-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(217, 108, 6, 0.12);
    color: #8a4a06;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(217, 108, 6, 0.08);
}
.workspace-grid {
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
    gap: 1.5rem;
}
.panel {
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 55px rgba(12, 42, 61, 0.08);
    border: 1px solid rgba(16, 37, 66, 0.08);
}
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.primary-button, .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
}
.primary-button, .inline-button.primary-button {
    background: linear-gradient(135deg, #f28f3b 0%, #d96c06 100%);
    color: #fffaf5;
}
.secondary-button { background: #eef4f7; color: #16354c; }
.secondary-button.is-active { background: #123b5b; color: #f7fbff; }
.inline-button { text-decoration: none; }
.status-message { margin: 0 0 1rem; color: #2f6654; font-weight: 600; }
.status-warning { color: #9a6700; }
.status-error, .validation-message { color: #b42318; }
.filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "search status" "type type" "city city";
    gap: 1rem;
    margin-bottom: 1rem;
}
.filter-grid .field-group { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 0.75rem; }
.filter-grid .field-group:nth-child(1) { grid-area: search; }
.filter-grid .field-group:nth-child(2) { grid-area: status; }
.filter-grid .field-group:nth-child(3) { grid-area: type; }
.filter-grid .field-group:nth-child(4) { grid-area: city; }
.records-filters-shell {
    margin-bottom: 1rem;
}
.records-results-shell {
    display: block;
}
.mobile-filter-heading {
    display: none;
}
.filter-actions {
    display: flex;
    justify-content: flex-end;
}
.field-group, .selected-summary, .payment-details-grid { display: grid; gap: 0.45rem; }
.field-hint {
    color: #6a7f8d;
    font-size: 0.9rem;
}
.field-group-wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px solid #d2dce5;
    background: #f9fbfd;
}
.form-textarea { min-height: 5.6rem; resize: vertical; }
.selection-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    min-height: 1.5rem;
}
.selection-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: #e8f4fb;
    color: #1c547a;
    font-weight: 700;
}
.selection-chip-remove {
    border: none;
    background: transparent;
    color: #1c547a;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.table-shell {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid #e2ebf1;
    background: #fbfdfe;
}
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.table-pagination-summary, .table-pagination-page {
    color: #5e788c;
    font-weight: 600;
}
.table-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pagination-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.directory-table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.directory-table th, .directory-table td {
    padding: 0.9rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e7eef3;
}
.directory-table tbody tr { cursor: pointer; }
.directory-table tbody tr.is-selected { background: #eef7f5; }
.badge-soft {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #e3f0fb;
    color: #24557d;
    font-weight: 700;
}
.subtle-line { display: block; margin-top: 0.2rem; color: #6a7f8d; font-size: 0.86rem; }
.map-canvas {
    min-height: 620px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #dae7ef 0%, #f3f8fb 100%);
    border: 1px solid rgba(18, 50, 75, 0.1);
}
.selected-summary, .document-list, .payment-detail-card {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: #f6fafb;
}
.snapscan-qr-block {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}
.snapscan-qr-image {
    width: min(100%, 220px);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(18, 59, 91, 0.12);
}
.selected-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.compact-link {
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
}
.document-list a { display: block; margin-top: 0.35rem; }
.donation-purpose-grid, .donation-options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.donation-purpose-card, .donation-option-card {
    padding: 1.2rem;
    border-radius: 22px;
    border: 1px solid #dbe9f1;
    background: rgba(255, 255, 255, 0.92);
}
.donation-option-card .primary-button { margin-top: 1rem; }
.donation-tag {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #e8f4fb;
    color: #1c618e;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 1.5rem;
    background: rgba(15, 31, 45, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
}
.modal-backdrop.is-open { display: grid; }
.modal-shell {
    width: min(980px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 28px;
    background: #fff;
}
.donation-modal-shell { width: min(720px, 100%); }
.admin-status-row { display: grid; gap: 0.75rem; }

@media (max-width: 1180px) {
    .floating-help-launcher {
        position: static;
        margin: 0 1rem;
    }

    .top-bar, .main-content {
        max-width: none;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .workspace-grid, .hero-panel, .donation-purpose-grid, .donation-options-grid, .form-grid, .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid { grid-template-areas: "search" "status" "type" "city"; }
}

@media (max-width: 760px) {
    html, body {
        font-size: 90%;
    }

    .brand-subtitle {
        display: none;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-top: 1rem;
    }

    .brand-title {
        width: 100%;
    }

    .brand-banner {
        max-width: 100%;
        border-radius: 14px;
    }

    .top-bar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .panel {
        padding: 1rem;
        border-radius: 20px;
    }

    .panel-heading,
    .selected-summary-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .primary-button,
    .secondary-button,
    .ghost-link,
    .inline-button.secondary-button {
        width: 100%;
    }

    .floating-help-launcher {
        margin: 0 1rem 0.75rem;
    }

    .floating-help-button {
        width: 100%;
        min-width: 0;
    }

    .hero-panel {
        padding: 1rem;
    }

    .hero-art img {
        display: none;
        max-width: 220px;
    }

    .workspace-grid {
        gap: 1rem;
    }

    .mobile-utility-bar {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
        padding: 0.7rem;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(18, 59, 91, 0.1);
        box-shadow: 0 14px 36px rgba(12, 42, 61, 0.08);
    }

    [data-mobile-panel] {
        display: none;
    }

    #mobile-panel-records:checked ~ .mobile-utility-bar label[for="mobile-panel-records"],
    #mobile-panel-map:checked ~ .mobile-utility-bar label[for="mobile-panel-map"],
    #mobile-panel-filters:checked ~ .mobile-utility-bar label[for="mobile-panel-filters"],
    #mobile-panel-support:checked ~ .mobile-utility-bar label[for="mobile-panel-support"] {
        background: linear-gradient(135deg, #123b5b 0%, #246d9b 100%);
        color: #f7fbff;
        box-shadow: 0 10px 24px rgba(18, 59, 91, 0.22);
    }

    #mobile-panel-records:checked ~ .workspace-grid [data-mobile-panel="records"],
    #mobile-panel-filters:checked ~ .workspace-grid [data-mobile-panel="records"],
    #mobile-panel-map:checked ~ .workspace-grid [data-mobile-panel="map"],
    #mobile-panel-support:checked ~ .workspace-grid [data-mobile-panel="support"] {
        display: block;
    }

    .floating-help-launcher {
        display: none;
    }

    .map-canvas {
        min-height: 320px;
    }

    .records-header-shell,
    .records-results-shell,
    .records-filters-shell {
        display: none;
    }

    #mobile-panel-records:checked ~ .workspace-grid .panel-records .records-header-shell,
    #mobile-panel-records:checked ~ .workspace-grid .panel-records .records-results-shell {
        display: block;
    }

    #mobile-panel-filters:checked ~ .workspace-grid .panel-records .records-filters-shell {
        display: block;
    }

    .mobile-filter-heading {
        display: grid;
        gap: 0.35rem;
        margin-bottom: 1rem;
    }

    .mobile-filter-heading h3 {
        margin: 0;
        color: #16354c;
    }

    .records-filters-shell {
        padding: 1rem;
        border-radius: 18px;
        background: #f6fafc;
        border: 1px solid #deebf2;
    }

    .filter-actions {
        margin-top: 1rem;
    }

    .table-shell {
        overflow: visible;
        background: transparent;
        border: none;
    }

    .directory-table {
        min-width: 0;
    }

    .directory-table thead {
        display: none;
    }

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

    .directory-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .directory-table tbody tr {
        padding: 0.95rem;
        border: 1px solid #e2ebf1;
        border-radius: 18px;
        background: #fbfdfe;
        box-shadow: 0 8px 24px rgba(12, 42, 61, 0.06);
    }

    .directory-table tbody tr.is-selected {
        background: #eef7f5;
    }

    .directory-table td {
        padding: 0.4rem 0;
        border: none;
    }

    .directory-table td::before {
        display: block;
        margin-bottom: 0.15rem;
        color: #6a7f8d;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        content: "";
    }

    .directory-table td:nth-child(1)::before { content: "Name"; }
    .directory-table td:nth-child(2)::before { content: "Entry Status"; }
    .directory-table td:nth-child(3)::before { content: "Type"; }
    .directory-table td:nth-child(4)::before { content: "Telephone/Fax"; }
    .directory-table td:nth-child(5)::before { content: "Cell"; }
    .directory-table td:nth-child(6)::before { content: "Email"; }
    .directory-table td:nth-child(7)::before { content: "Physical Address"; }
    .directory-table td:nth-child(8)::before { content: "Languages"; }
    .directory-table td:nth-child(9)::before { content: "Service Days"; }

    .table-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination-controls {
        width: 100%;
        justify-content: space-between;
    }

    .modal-backdrop {
        padding: 0.75rem;
    }

    .modal-shell,
    .donation-modal-shell,
    .help-modal-shell {
        width: 100%;
        max-height: 92vh;
        padding: 1rem;
        border-radius: 22px;
    }

    .form-grid,
    .donation-purpose-grid,
    .donation-options-grid {
        grid-template-columns: 1fr;
    }

    .snapscan-qr-image {
        width: min(100%, 180px);
    }
}
