.pcler-wrap {
    width: 100%;
    max-width: none;
    margin: 1rem 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid #d9e2f1;
    border-radius: 14px;
    box-sizing: border-box;
}

.pcl-all-registrations-page {
    border-color: #d7e4f7;
    border-radius: 16px;
    box-shadow: 0 14px 35px rgba(23, 64, 117, 0.1);
}

.pcl-all-registrations-page > h2 {
    margin-top: 0;
    color: #174b88;
}

.pcl-all-registrations-page .pcl-filter-bar {
    padding: 0.85rem;
    border: 1px solid #dce8f8;
    border-radius: 12px;
    background: #f5f9ff;
}

.pcl-all-registrations-page .pcler-table th {
    color: #5b7699;
    background: #f3f7ff;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.pcl-all-registrations-page .pcler-modal-content {
    width: min(1600px, 100%);
}

.pcl-all-registrations-page .pcler-finance-review-layout {
    grid-template-columns: minmax(0, 1fr);
}

.pcl-all-registrations-page .pcler-finance-right-panel {
    display: none;
}

.pcl-all-registrations-page .pcler-review-table-wrap .pcler-table {
    min-width: 960px;
}

.pcl-all-registrations-page .pcl-filter-bar .button,
.pcl-all-registrations-page .pcl-filter-bar button {
    min-height: 44px;
    padding: 0.45rem 0.8rem;
    border: 1px solid #d4e2f7;
    border-radius: 10px;
    background: #fff;
    color: #174b88;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pcl-all-registrations-page .pcl-filter-bar .button-primary,
.pcl-all-registrations-page .pcl-filter-bar button.button-primary {
    border-color: transparent;
    background: linear-gradient(130deg, #2f73b9, #174b88);
    color: #fff;
}

.pcl-all-registrations-page .pcl-filter-bar .button:hover,
.pcl-all-registrations-page .pcl-filter-bar button:hover {
    transform: translateY(-1px);
}

.pcl-registration-theme .container {
    width: min(100% - 2rem, 1600px);
}

.pcler-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pcler-grid label,
.pcler-wrap label {
    display: block;
    font-weight: 600;
}

.pcler-grid select,
.pcler-wrap input,
.pcler-wrap select,
.pcler-wrap textarea {
    width: 100%;
    margin-top: 0.35rem;
}

.pcler-table-block {
    margin-top: 1rem;
}

.pcler-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pcler-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.pcler-table-block {
    overflow-x: auto;
}

.pcler-table th,
.pcler-table td {
    border-bottom: 1px solid #d9e2f1;
    padding: 0.55rem;
    text-align: left;
    vertical-align: top;
}

.pcler-room-notice {
    margin: 0.6rem 0 0.4rem;
    color: #b91c1c;
    font-weight: 700;
    font-style: italic;
}

.pcler-event-first-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #f0b429;
    border-radius: 8px;
    background: #fff8df;
    color: #7a4b00;
    font-weight: 700;
}

.pcler-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
}

.pcler-confirm-box {
    width: min(440px, 100%);
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #d9e2f1;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.pcler-confirm-box p {
    margin: 0 0 1rem;
    color: #172033;
    font-weight: 600;
    line-height: 1.5;
}

#pcler_councilor_table thead th {
    background: #f3f7ff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.75rem;
    color: #445879;
}

#pcler_councilor_table input,
#pcler_councilor_table select {
    min-height: 38px;
    margin-top: 0;
    font-size: 0.92rem;
}

.pcler-required-missing {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

#pcler_councilor_table .pcler-middle-initial,
#pcler_councilor_table .pcler-gender,
#pcler_councilor_table .pcler-suffix {
    text-align: center;
}

#pcler_councilor_table .pcler-room-label {
    min-width: 110px;
}

#pcler_councilor_table .pcler-room-type {
    min-width: 120px;
}

#pcler_councilor_table .pcler-lgu-name,
#pcler_councilor_table .pcler-province-name {
    min-width: 150px;
}

#pcler_councilor_table .pcler-registration-fee {
    min-width: 135px;
}

#pcler_councilor_table .pcler-deposit-date {
    min-width: 135px;
}

#pcler_councilor_table .pcler-bank {
    min-width: 105px;
}

#pcler_councilor_table .pcler-position {
    min-width: 170px;
}

#pcler_councilor_table .pcler-position-other {
    min-width: 170px;
}

#pcler_councilor_table .pcler-tshirt {
    min-width: 110px;
}

.pcler-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

#pcler_feedback {
    margin-top: 0.75rem;
    font-weight: 600;
}

.pcler-error {
    color: #b91c1c;
}

.pcler-error .pcler-duplicate-link,
.pcler-error .pcler-duplicate-link:visited {
    color: #1d4ed8;
    text-decoration: underline;
    font-weight: 700;
}

.pcler-error .pcler-duplicate-link:hover,
.pcler-error .pcler-duplicate-link:focus {
    color: #1e40af;
}

.pcler-success {
    color: #166534;
}

#pcler_submit:disabled,
#pcler_submit.pcler-submit-blocked {
    opacity: 0.55;
    cursor: not-allowed;
}

#pcler_submit.pcler-submit-blocked {
    border-color: #b91c1c !important;
    box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.2);
}

.pcler-status {
    display: inline-block;
    font-size: 0.82rem;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
}

.pcler-pending_payment {
    background: #ffedd5;
    color: #92400e;
}

.pcler-for_approval {
    background: #dbeafe;
    color: #1d4ed8;
}

.pcler-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.pcler-queued,
.pcler-approved {
    background: #dcfce7;
    color: #166534;
}

.pcler-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.pcler-modal[hidden] {
    display: none !important;
}

.pcler-modal-content {
    width: min(1800px, 96vw);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem 1.2rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.pcler-finance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pcler-finance-header h3 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    color: #0f172a;
}

.pcler-finance-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.35fr) minmax(260px, 0.75fr);
    gap: 1rem;
    align-items: start;
}

.pcler-modal.pcler-view-mode .pcler-finance-review-layout {
    grid-template-columns: minmax(0, 1fr);
}

.pcler-modal.pcler-view-mode .pcler-finance-right-panel {
    order: -1;
}

.pcler-finance-left-panel,
.pcler-finance-right-panel {
    min-width: 0;
}

.pcler-finance-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pcler-finance-proof-box,
.pcler-finance-decision-box,
.pcler-finance-edit-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.pcler-finance-edit-box {
    display: none;
}

.pcler-modal.pcler-edit-mode .pcler-finance-review-layout {
    grid-template-columns: minmax(0, 2.35fr) minmax(240px, 0.65fr);
}

.pcler-review-note {
    grid-column: 1 / -1;
}

.pcler-review-note textarea {
    width: 100%;
    margin-top: 0.35rem;
    resize: vertical;
    font-family: inherit;
}

.pcler-edit-table th,
.pcler-edit-table td {
    vertical-align: middle;
}

.pcler-edit-table input.pcler-edit-field,
.pcler-edit-table select.pcler-edit-field {
    width: 100%;
    min-width: 90px;
    padding: 0.35rem 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}

.pcler-edit-table input.pcler-edit-field:focus,
.pcler-edit-table select.pcler-edit-field:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.pcler-finance-proof-box h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #0f172a;
}

.pcler-finance-proof-box #pcler_finance_proof {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: start;
    min-height: 0;
}

.pcler-finance-proof-box #pcler_finance_proof img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #dbe7f5;
    background: #fff;
}

.pcler-proof-view-all {
    width: 100%;
    min-height: 40px;
}

/* --- Sidebar Proof Container Fixes --- */
.pcler-finance-proof-box #pcler_finance_proof {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pcler-finance-proof-box #pcler_finance_proof img.pcler-proof-thumb {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #dbe7f5;
    background: #f8fafc;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pcler-finance-proof-box #pcler_finance_proof img.pcler-proof-thumb:hover {
    transform: translateY(-2px);
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

/* Sidebar "View All" Button */
.pcler-btn-view-all {
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: #ffffff;
    border: 1px solid #cce0ff;
    color: #0d6efd;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pcler-btn-view-all:hover {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

/* --- Responsive Lightbox Modal Overlay --- */
.pcler-modal-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.pcler-modal-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Top Right Close Button */
.pcler-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.pcler-modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive Main Image Wrapper */
.pcler-modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.pcler-modal-body img {
    max-width: 85vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #ffffff;
}

/* Modern Nav Footer */
.pcler-modal-footer {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
}

.pcler-modal-btn {
    background: #0d6efd;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pcler-modal-btn:hover {
    background: #0b5ed7;
}

.pcler-modal-counter {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.pcler-finance-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.5rem;
}

.pcler-actions-right {
    justify-content: flex-end;
    margin-top: 1rem;
}

.pcler-review-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.pcler-review-table-wrap .pcler-table {
    min-width: 920px;
}

.pcler-review-table-wrap .pcler-table th,
.pcler-review-table-wrap .pcler-table td {
    font-size: 0.84rem;
    padding: 0.45rem 0.5rem;
    white-space: normal;
    word-break: break-word;
}

.pcler-review-count {
    color: #1d4ed8;
}

.pcler-review-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    background: #f8fbff;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
}

.pcler-review-meta-grid div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pcler-review-meta-grid strong {
    font-size: 0.78rem;
    color: #4b5c82;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#pcler_finance_proof img {
    max-width: 100%;
    height: auto;
    border: 1px solid #d9e2f1;
    border-radius: 8px;
}

.pcler-proof-gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.62);
}

.pcler-proof-gallery-panel {
    width: min(1200px, 96vw);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    padding: 0.9rem;
    border: 1px solid #dbe7f5;
}

.pcler-proof-gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.pcler-proof-gallery-head h4 {
    margin: 0;
}

.pcler-proof-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
}

.pcler-proof-gallery-item {
    margin: 0;
    padding: 0.45rem;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
    background: #f8fbff;
}

.pcler-proof-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.pcler-proof-gallery-item figcaption {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #475569;
}

.pcler-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
}

.pcler-stat {
    border: 1px solid #d9e2f1;
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
}

.pcler-stat strong {
    display: block;
    font-size: 0.85rem;
    color: #475569;
}

.pcler-stat span {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d4ed8;
}

.pcler-muted {
    color: #64748b;
}

.pcler-attendance-summary {
    margin: 0.65rem 0 1rem;
}

.pcler-attendance-summary .pcler-stat span {
    color: #0f766e;
}

.pcler-table td:last-child {
    position: relative;
    overflow: visible;
}

.pcler-qr-popup {
    position: relative;
    display: inline-block;
}

.pcler-qr-popup summary {
    list-style: none;
}

.pcler-qr-popup summary::-webkit-details-marker {
    display: none;
}

.pcler-qr-popup-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 220px;
    max-width: min(320px, 80vw);
    background: #ffffff;
    border: 1px solid #d9e2f1;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    padding: 0.6rem;
    z-index: 20;
}

.pcler-qr-popup-list {
    display: grid;
    gap: 0.4rem;
}

.pcler-qr-popup-list .button {
    display: block;
    width: 100%;
    text-align: left;
}

@media (max-width: 900px) {
    .pcler-grid {
        grid-template-columns: 1fr;
    }

    .pcler-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .pcler-wrap {
        width: 100%;
        margin-left: 0;
        max-width: none;
        padding: 0.75rem;
    }

    .pcler-finance-review-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pcler-review-table-wrap .pcler-table {
        min-width: 820px;
    }
}

@media (max-width: 640px) {
    .pcler-wrap {
        padding: 0.8rem;
        border-radius: 12px;
    }

    .pcler-grid {
        padding: 0.7rem;
    }

    .pcler-table-block {
        overflow-x: auto;
    }

    .pcler-table {
        min-width: 760px;
    }

    .pcler-table-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.6rem;
    }

    .pcler-table-header .button,
    .pcler-actions .button,
    .pcler-actions button {
        width: 100%;
    }

    .pcler-actions {
        flex-direction: column;
    }
}