/* Executive Dashboard command-center refinement.
   This layer intentionally changes hierarchy and readability only; analytics,
   authorization and persisted-data semantics remain owned by the existing M11
   backend and dashboard template. */

body:has(#overview.m11-dashboard-section) .m11-dashboard-heading {
    padding-bottom: 2px;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-heading h1 {
    margin-bottom: 4px;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-heading .muted {
    max-width: 760px;
    font-size: 12px;
    line-height: 1.5;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-tabs {
    gap: 4px;
    margin-bottom: 18px;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-tabs a {
    padding: 10px 12px 11px;
    font-size: 11px;
    font-weight: 800;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-section {
    margin-bottom: 34px;
}

body:has(#overview.m11-dashboard-section) .m11-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

body:has(#overview.m11-dashboard-section) .m11-section-heading h2 {
    margin-bottom: 2px;
}

body:has(#overview.m11-dashboard-section) .m11-section-heading .muted {
    max-width: 620px;
    font-size: 11px;
    line-height: 1.45;
    text-align: right;
}

/* Primary executive summary: five questions, one row on large screens. */
body:has(#overview.m11-dashboard-section) #overview .m11-kpi-grid-primary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi[data-command-center-hidden="true"] {
    display: none;
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi {
    min-height: 104px;
    padding: 13px 14px;
    border-radius: 9px;
    box-shadow: 0 3px 12px rgba(18, 38, 46, .055);
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi[data-command-center-target] {
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi[data-command-center-target]:hover,
body:has(#overview.m11-dashboard-section) #overview .m11-kpi[data-command-center-target]:focus-visible {
    transform: translateY(-1px);
    border-color: #b8d9d3;
    box-shadow: 0 6px 18px rgba(18, 38, 46, .085);
    outline: none;
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi span {
    font-size: 10px;
    line-height: 1.25;
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi strong {
    margin: 7px 0 5px;
    font-size: 29px;
    line-height: 1;
}

body:has(#overview.m11-dashboard-section) #overview .m11-kpi small {
    font-size: 10px;
    line-height: 1.4;
}

/* Make the promoted attention queue feel like the first operational decision surface. */
body:has(#overview.m11-dashboard-section) .m11-overview-attention {
    margin: 0 0 12px;
    border-top: 3px solid var(--dq-escalation);
}

body:has(#overview.m11-dashboard-section) .m11-overview-attention .widget-heading {
    padding-bottom: 10px;
}

body:has(#overview.m11-dashboard-section) .m11-overview-attention .widget-kicker::after {
    content: " · act first";
    color: var(--dq-escalation);
}

/* Improve dashboard typography without sacrificing board density elsewhere. */
body:has(#overview.m11-dashboard-section) .dashboard-widget .widget-kicker {
    font-size: 10px;
    letter-spacing: .045em;
}

body:has(#overview.m11-dashboard-section) .dashboard-widget .widget-heading h2 {
    font-size: 15px;
}

body:has(#overview.m11-dashboard-section) .dashboard-widget .widget-caption {
    font-size: 10px;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-table th {
    padding: 9px 10px;
    font-size: 9px;
    letter-spacing: .04em;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-table td {
    padding: 9px 10px;
    font-size: 11px;
    line-height: 1.35;
}

body:has(#overview.m11-dashboard-section) .m11-dashboard-table td small {
    margin-top: 2px;
    font-size: 9px;
}

body:has(#overview.m11-dashboard-section) .m11-state-tag,
body:has(#overview.m11-dashboard-section) .m11-inline-progress b {
    font-size: 9px;
}

body:has(#overview.m11-dashboard-section) .m11-chart-legend span,
body:has(#overview.m11-dashboard-section) .m11-ranking-bars > div > span,
body:has(#overview.m11-dashboard-section) .m11-ranking-bars strong,
body:has(#overview.m11-dashboard-section) .m11-comparison-grid span,
body:has(#overview.m11-dashboard-section) .m11-comparison-grid small,
body:has(#overview.m11-dashboard-section) .m11-comparison-grid em,
body:has(#overview.m11-dashboard-section) .m11-big-progress small {
    font-size: 10px;
}

body:has(#overview.m11-dashboard-section) .m11-mini-ranking p strong,
body:has(#overview.m11-dashboard-section) .m11-mini-ranking b,
body:has(#overview.m11-dashboard-section) .m11-active-work-grid p strong,
body:has(#overview.m11-dashboard-section) .m11-exception-list p strong,
body:has(#overview.m11-dashboard-section) .m11-simple-list p strong,
body:has(#overview.m11-dashboard-section) .m11-active-work-grid b {
    font-size: 11px;
}

body:has(#overview.m11-dashboard-section) .m11-mini-ranking p small,
body:has(#overview.m11-dashboard-section) .m11-active-work-grid p small,
body:has(#overview.m11-dashboard-section) .m11-exception-list p small,
body:has(#overview.m11-dashboard-section) .m11-simple-list p small,
body:has(#overview.m11-dashboard-section) .m11-exception-list a > b,
body:has(#overview.m11-dashboard-section) .m11-exception-list em,
body:has(#overview.m11-dashboard-section) .m11-simple-list a > span {
    font-size: 9px;
}

body:has(#overview.m11-dashboard-section) .m11-ranking-bars > div > div {
    height: 14px;
}

body:has(#overview.m11-dashboard-section) .m11-stacked-chart {
    height: 52px;
}

body:has(#overview.m11-dashboard-section) .m11-stacked-chart i {
    font-size: 11px;
}

/* Secondary operational analytics remain available but should not visually
   compete with readiness, status, attention and people signals. */
body:has(#overview.m11-dashboard-section) .m11-secondary-insight {
    opacity: .92;
    border-style: dashed;
}

body:has(#overview.m11-dashboard-section) .m11-secondary-insight .widget-heading::after {
    content: "Secondary analysis";
    margin-left: auto;
    color: var(--dq-muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Visually separate workload facts from quality assessment in the Employee table. */
body:has(#overview.m11-dashboard-section) #employees .m11-dashboard-table th:last-child,
body:has(#overview.m11-dashboard-section) #employees .m11-dashboard-table td:last-child {
    border-left: 2px solid #e6e1f0;
    background: #fcfbfe;
}

body:has(#overview.m11-dashboard-section) #employees .m11-dashboard-table th:last-child {
    color: #725c9a;
}

/* Clear focus treatment for dashboard navigation and command cards. */
body:has(#overview.m11-dashboard-section) .m11-dashboard-tabs a:focus-visible,
body:has(#overview.m11-dashboard-section) .m11-overview-attention a:focus-visible,
body:has(#overview.m11-dashboard-section) .m11-overview-attention button:focus-visible {
    outline: 2px solid rgba(43, 156, 141, .34);
    outline-offset: 2px;
}

@media (max-width: 1380px) {
    body:has(#overview.m11-dashboard-section) #overview .m11-kpi-grid-primary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    body:has(#overview.m11-dashboard-section) #overview .m11-kpi-grid-primary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body:has(#overview.m11-dashboard-section) .m11-section-heading {
        display: block;
    }
    body:has(#overview.m11-dashboard-section) .m11-section-heading .muted {
        margin-top: 4px;
        text-align: left;
    }
}

@media (max-width: 560px) {
    body:has(#overview.m11-dashboard-section) #overview .m11-kpi-grid-primary {
        grid-template-columns: 1fr;
    }
}
