/* Caseload at a Glance page styles.
   Theme, form controls and Select2 styling live in ../../assets/site.css and ../toolkit.css */

.pie-chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.empty-pie-placeholder {
    width: 240px;
    height: 240px;
    border-radius: 9999px;
    border: 2px dashed rgba(128, 128, 128, 0.4);
}

.color-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.dx-tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px 2px 2px 0;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.15);
}

.table-responsive {
    overflow-x: auto;
}

.caseload-table th,
.caseload-table td {
    vertical-align: middle;
}
/* Headcount and weekly-hours totals */
.caseload-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: center;
}
.caseload-stats .stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.35));
    border-radius: 6px;
    min-height: 64px;
}
.caseload-stats .stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.caseload-stats .stat-label { font-size: 0.75rem; font-weight: 600; }
.caseload-stats .stat-input input { width: 100%; }
.caseload-stats .stat-note { grid-column: 1 / -1; margin: 0; }

.dx-count-mode { display: inline-flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.dx-count-mode label { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }

/* Column picker and per-column filters */
.column-picker { position: relative; }
.column-picker > summary { list-style: none; cursor: pointer; }
.column-picker > summary::-webkit-details-marker { display: none; }
.column-picker-body {
    position: absolute;
    right: 0;
    z-index: 20;
    margin-top: 0.25rem;
    min-width: 220px;
    padding: 0.6rem 0.75rem;
    display: grid;
    gap: 0.35rem;
    font-size: 0.8rem;
    background: var(--bg-main, #fff);
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.35));
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.column-picker-body label { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.caseload-table .filter-row th { font-weight: 400; }
.caseload-table .column-filter { min-width: 90px; }
