body {
    margin: 0;
    background: #f8fafc;
    font-family: "Open Sans", Arial, sans-serif;
    color: #1f2937;
}

.reports-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background: #f4f3f1;
}

.reports-heading {
    margin: 0 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.8vw, 3.25rem);
    line-height: 1.1;
    color: #020617;
}

.page-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 12px;
}

.page-description {
    color: #6b7280;
    margin-top: 8px;
}

.report-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px;
    width: 100%;
}

.report-grid > .report-grid-item {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0;
}

.report-card {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.report-card-header {
    padding: 16px 20px;
    border-top: 4px solid #6cc04a;
    border-bottom: 1px solid #e5e7eb;
    min-height: 72px;
}

.report-category-title {
    margin: 0;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.report-category-icon {
    color: #1ba1e2;
    font-size: 1.1em;
}

.report-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-item {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    text-align: left;
}

.report-item:last-child {
    border-bottom: 0;
}

.report-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.report-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 auto;
    width: 100%;
    color: #0563c1;
    text-decoration: underline;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
}

.report-item-title .bi-box-arrow-up-right {
    margin-left: 12px;
    flex: 0 0 auto;
}

.report-open-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.05rem;
    color: #0d6efd;
    line-height: 1;
    padding-top: 0;
    white-space: nowrap;
}

.report-description {
    margin-top: 0.4rem;
    color: #111827;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 0.98rem;
    line-height: 1.4;
    text-align: left;
}



.category-toggle-btn {
    min-width: 96px;
    margin-left: auto;
    margin-right: 0;
}

.results-panel {
    border: 1px solid #d9d9d9;
    border-top: 6px solid #c8005a;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 24px 28px 44px;
    margin: 20px 0 32px;
    min-height: 250px;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.results-title {
    margin: 0;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 3.6vw, 3.1rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: #000000;
}

.results-title i {
    margin-right: 8px;
    font-size: 0.5em;
    vertical-align: 0.25em;
}

.results-actions {
    margin-top: 12px;
    text-align: right;
}

.results-actions a {
    color: #1a6fb5;
    font-size: 1.05rem;
    text-decoration: underline;
}

.results-inline-table {
    margin-top: 20px;
}

.results-inline-table thead th {
    font-weight: 500;
    color: #1f2937;
    border-bottom-color: #d1d5db;
}

.results-inline-table tbody td {
    border-bottom-color: #d1d5db;
}

.results-title-link {
    color: #0563c1;
    font-weight: 700;
    text-decoration: underline;
}

.report-results-popup-link {
    background: #009a3e;
    border-color: #009a3e;
    color: #ffffff;
    text-decoration: none;
    padding: 0.7rem 1.6rem;
    font-weight: 700;
    border-radius: 2px;
}

.report-results-popup-link:hover,
.report-results-popup-link:focus {
    background: #007d32;
    border-color: #007d32;
    color: #ffffff;
}

.results-popup-page {
    max-width: 1080px;
    margin: 22px auto;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
}

.results-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid #d1d5db;
    position: relative;
    padding-right: 64px;
}

.results-popup-header h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: #111827;
}

.results-popup-close {
    border: 0;
    background: transparent;
    font-size: 42px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 14px;
}

.results-table-shell {
    padding: 16px 24px;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    min-width: 640px;
}

.results-table th {
    background: #e0f2fe;
    color: #374151;
    font-weight: 600;
}

.results-actions-cell {
    white-space: nowrap;
}

.results-action-btn {
    min-width: 32px;
    padding: 0.2rem 0.45rem;
    margin-right: 6px;
}

.results-action-btn:last-child {
    margin-right: 0;
}

.results-empty-row {
    text-align: left;
    color: #1f2937;
}

.results-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 10px 24px 18px;
}

.request-panel {
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.request-field {
    min-width: 0;
}

.request-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.request-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-style: italic;
}

.required-indicator {
    color: #b91c1c;
}

.request-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}

.request-select {
    height: 38px;
}

.request-select-multi {
    min-height: 120px;
}

.request-radio-list input {
    margin-right: 6px;
}

.request-radio-list label {
    margin-right: 14px;
    font-weight: 400;
}

.request-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.report-viewer-shell {
    margin-top: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: auto;
    background: #ffffff;
    padding: 10px;
}

.viewer-warning {
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #92400e;
    border-radius: 8px;
}

body.report-overlay-open {
    overflow: hidden;
}

.report-overlay-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    padding: 20px;
}

.report-overlay-backdrop.is-visible {
    display: flex;
}

.report-overlay-panel {
    background: #ffffff;
    border-radius: 10px;
    width: min(96vw, 1400px);
    height: min(92vh, 980px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.35);
}

.report-overlay-panel--small {
    width: min(92vw, 900px);
    height: min(82vh, 620px);
}

.report-overlay-panel--large {
    width: min(96vw, 1400px);
    height: min(92vh, 980px);
}

.report-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #d1d5db;
    background: #f8fafc;
    position: relative;
    padding-right: 46px;
}

.report-overlay-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.report-overlay-close {
    border: 0;
    background: transparent;
    width: 32px;
    height: 32px;
    font-size: 28px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    position: absolute;
    top: 6px;
    right: 10px;
}

.report-overlay-frame {
    border: 0;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
}

@media (max-width: 992px) {
    .reports-page {
        padding: 18px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .report-category-title {
        font-size: 1.4rem;
    }

    .report-item-title {
        font-size: 1.15rem;
    }

    .report-description {
        font-size: 1rem;
    }

    .results-empty-state {
        font-size: 1.35rem;
        margin-top: 28px;
    }

    .request-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .results-popup-header h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .reports-page {
        padding: 14px;
    }

    .report-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .results-panel {
        padding: 16px;
        min-height: 0;
    }

    .results-actions {
        text-align: left;
    }

    .results-empty-state {
        font-size: 1.1rem;
        margin: 24px 0 10px;
    }

    .report-results-popup-link {
        width: 100%;
    }

    .request-grid {
        grid-template-columns: 1fr;
    }

    .request-radio-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .request-radio-list label {
        margin-right: 0;
    }

    .request-actions {
        flex-direction: column;
    }

    .report-viewer-shell {
        padding: 6px;
    }

    .results-popup-page {
        margin: 10px;
    }

    .results-popup-header {
        padding: 14px 16px;
    }

    .results-popup-header h1 {
        font-size: 28px;
    }

    .results-popup-close {
        font-size: 32px;
    }

    .results-table-shell {
        padding: 10px 12px;
    }

    .results-pagination {
        padding: 10px 12px 14px;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .report-overlay-backdrop {
        padding: 8px;
    }

    .report-overlay-panel,
    .report-overlay-panel--small,
    .report-overlay-panel--large {
        width: 100%;
        height: 92vh;
        border-radius: 8px;
    }
}
