/* ================================================================
   WORKFORCE ANALYTICS — PAGE STYLES
   ================================================================ */

/* ---- Module Status Indicators ---- */
.module-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.module-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--org-surface);
    border: 1px solid var(--org-border);
    box-shadow: var(--shadow-sm);
    font-size: 0.88rem;
    font-weight: 500;
    flex: 1 1 250px;
    min-width: 250px;
}

.module-status-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.module-status--available .module-status-icon {
    background-color: var(--org-green, #2e8540);
}

.module-status--unavailable .module-status-icon {
    background-color: #999;
}

.module-status--available .module-status-label {
    color: var(--org-text);
}

.module-status--unavailable .module-status-label {
    color: var(--org-text-muted);
}

.module-status-detail {
    font-weight: 400;
    color: var(--org-text-muted);
    font-size: 0.82rem;
    margin-left: 4px;
}

/* ---- Survey Selector ---- */
.survey-selector-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.survey-selector-bar label {
    font-weight: 600;
    color: var(--org-text);
    white-space: nowrap;
}

.survey-selector-bar select {
    padding: 6px 10px;
    border: 1px solid var(--org-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.88rem;
    background: var(--org-surface);
    color: var(--org-text);
    max-width: 400px;
}

/* ---- Heatmap Table ---- */
.heatmap-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
}

.heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 700px;
}

.heatmap-table caption {
    /* sr-only visually but accessible */
}

.heatmap-table th,
.heatmap-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--org-border);
    vertical-align: middle;
}

.heatmap-table thead th {
    background: var(--org-light-gray, #f1f3f5);
    font-weight: 700;
    color: var(--org-text);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    user-select: none;
}

.heatmap-table thead th[aria-sort] {
    cursor: pointer;
}

.heatmap-table thead th[aria-sort]:hover {
    background: #e4e8ec;
}

.heatmap-table thead th[aria-sort]::after {
    content: ' \25B4\25BE';
    font-size: 0.7em;
    color: #999;
    margin-left: 4px;
}

.heatmap-table thead th[aria-sort="ascending"]::after {
    content: ' \25B4';
    color: var(--org-primary);
}

.heatmap-table thead th[aria-sort="descending"]::after {
    content: ' \25BE';
    color: var(--org-primary);
}

.heatmap-table tbody tr:hover {
    background: rgba(0, 50, 86, 0.03);
}

/* ---- Score Indicators ---- */
.score-value {
    font-weight: 600;
}

.score-value--high {
    color: var(--org-green, #2e8540);
}

.score-value--medium {
    color: var(--org-orange, #e67e22);
}

.score-value--low {
    color: var(--org-red, #c0392b);
}

.score-population {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--org-text-muted);
    margin-top: 2px;
}

.cell-muted {
    color: var(--org-text-muted);
    font-style: italic;
    font-size: 0.84rem;
}

.cell-suppressed {
    color: var(--org-text-muted);
    font-style: italic;
    font-size: 0.82rem;
}

/* ---- Risk Level Badges ---- */
.risk-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.risk-badge--low {
    background: #e6f4ea;
    color: #1a7431;
}

.risk-badge--medium {
    background: #fff3e0;
    color: #b35c00;
}

.risk-badge--high {
    background: #fde8e8;
    color: #a41e22;
}

.risk-badge--insufficient {
    background: #f1f3f5;
    color: #666;
}

/* ---- Heatmap Footnote ---- */
.heatmap-footnote {
    font-size: 0.82rem;
    color: var(--org-text-muted);
    font-style: italic;
    margin-top: 8px;
    padding: 0 4px;
    line-height: 1.5;
}

/* ---- Key Insights Panel ---- */
.insights-panel {
    background: var(--org-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-top: 24px;
}

.insights-panel h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--org-text);
    margin-bottom: 16px;
}

.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insights-list li {
    padding: 10px 14px;
    background: var(--org-light-gray, #f1f3f5);
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--org-text);
}

.insights-list li strong {
    color: var(--org-primary);
}

.insight-guidance {
    padding: 12px 14px;
    background: #e8f0fe;
    border-left: 4px solid var(--org-accent, #0071bc);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.88rem;
    color: var(--org-text);
    margin-top: 12px;
    line-height: 1.5;
}

.insight-guidance a {
    color: var(--org-accent, #0071bc);
    font-weight: 600;
    text-decoration: none;
}

.insight-guidance a:hover {
    text-decoration: underline;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--org-text-muted);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.empty-state h2 {
    font-size: 1.15rem;
    color: var(--org-text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.92rem;
    max-width: 500px;
    margin: 0 auto 16px;
    line-height: 1.5;
}

.empty-state-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-links a {
    color: var(--org-accent, #0071bc);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.empty-state-links a:hover {
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .module-status-bar {
        flex-direction: column;
    }

    .module-status {
        flex: 1 1 100%;
    }

    .heatmap-table {
        min-width: 600px;
    }
}
