/* R-Rollout Enterprise Visual Redesign – Phase 3
 * Remaining specialist surfaces only. No business logic or content changes.
 */

/* Management / portfolio */
.management-dashboard,
.management-dashboard--executive {
    --mgmt-accent: var(--brand-primary);
    --mgmt-accent-strong: var(--brand-primary-hover);
    --mgmt-navy: var(--text-primary);
    --mgmt-soft: var(--bg-surface-secondary);
    --mgmt-border: var(--border-default);
    --mgmt-green: var(--success);
    --mgmt-amber: var(--warning);
    --mgmt-red: var(--danger);
}

.executive-hero,
.executive-score,
.executive-attention,
.executive-week,
.executive-insight-card,
.executive-projects,
.historical-weeks--executive {
    border-color: var(--border-default);
    border-radius: var(--radius-card);
    background: var(--bg-surface);
    box-shadow: var(--shadow-card);
}
.executive-hero { padding: 22px 24px; }
.executive-hero::before { width: 4px; background: var(--brand-primary); }
.executive-hero::after { display: none; }
.executive-hero h2,
.executive-score > strong,
.executive-kpis .ui2-kpi strong,
.executive-week__primary strong,
.week-achievement,
.executive-distribution-item strong,
.history-column > strong { color: var(--text-primary); }
.executive-score { background: var(--bg-surface-secondary); }
.executive-score .ui2-progress > span { background: var(--accent-primary); }
.executive-kpis { gap: 10px; }
.executive-kpis .ui2-kpi { border-color: var(--border-default); background: var(--bg-surface); }
.executive-kpis .ui2-kpi::after { height: 2px; background: var(--border-strong); }
.executive-kpis .ui2-kpi:nth-child(1)::after,
.executive-kpis .ui2-kpi:nth-child(5)::after { background: var(--brand-primary); }
.executive-kpis .ui2-kpi:nth-child(2)::after { background: var(--success); }
.executive-kpis .ui2-kpi:nth-child(3)::after,
.executive-kpis .ui2-kpi:nth-child(4)::after { background: var(--accent-primary); }
.executive-kpis .ui2-kpi:nth-child(6)::after { background: var(--warning); }
.executive-attention .ui2-attention-item,
.executive-week__primary > div,
.executive-distribution-item { border-color: var(--border-default); background: var(--bg-surface-secondary); }
.executive-attention .ui2-attention-item:first-child {
    border-left-color: var(--brand-primary);
    background: color-mix(in srgb, var(--brand-primary) 5%, var(--bg-surface));
}
.portfolio-bar,
.health-stack,
.delivery-stack,
.history-column__bar { background: var(--bg-surface-secondary); border-color: var(--border-default); }

/* Governance and administration surfaces */
.governance-dashboard,
.governance-panel,
.governance-card,
.admin-card,
.settings-card,
.profile-card,
.audit-card {
    border-color: var(--border-default) !important;
    border-radius: var(--radius-card) !important;
    background: var(--bg-surface) !important;
    box-shadow: var(--shadow-card) !important;
}
.governance-dashboard h1,
.governance-dashboard h2,
.governance-dashboard h3,
.governance-panel h2,
.governance-card h2,
.admin-card h2,
.settings-card h2,
.profile-card h2 { color: var(--text-primary); }

/* Reporting / data-heavy views */
.reporting-dashboard,
.reporting-panel,
.report-card,
.export-card,
.import-card,
.integration-card,
.budget-card {
    border-color: var(--border-default) !important;
    border-radius: var(--radius-card) !important;
    background: var(--bg-surface) !important;
    box-shadow: var(--shadow-card) !important;
}
.reporting-dashboard .filter-grid,
.reporting-panel .filter-grid,
.report-filters,
.export-filters,
.import-filters { background: var(--bg-surface-secondary); border-color: var(--border-default); }

/* Login and account experience */
.login-shell,
.login-card,
.auth-card,
.account-card {
    border-color: var(--border-default) !important;
    border-radius: var(--radius-modal) !important;
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-elevated) !important;
}
.login-card .brand__mark,
.auth-card .brand__mark { background: var(--brand-primary); }

/* Consistent secondary interaction language on specialist pages */
.management-dashboard a:not(.button),
.governance-dashboard a:not(.button),
.reporting-dashboard a:not(.button),
.profile-card a:not(.button),
.settings-card a:not(.button) { color: var(--accent-primary); }

/* Remove old decorative gradients from legacy specialist components. */
.management-dashboard [class*="hero"],
.governance-dashboard [class*="hero"],
.reporting-dashboard [class*="hero"],
.profile-card [class*="hero"] {
    background-image: none;
}

/* Shared empty/loading states */
.empty-state,
.loading-state,
.no-results,
.placeholder-card {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-card);
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
}

/* Accessible keyboard focus for specialist controls */
.management-dashboard :is(a,button,input,select,textarea):focus-visible,
.governance-dashboard :is(a,button,input,select,textarea):focus-visible,
.reporting-dashboard :is(a,button,input,select,textarea):focus-visible,
.login-shell :is(a,button,input,select,textarea):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

@media (max-width: 900px) {
    .executive-hero,
    .executive-decision-grid,
    .executive-insight-grid { grid-template-columns: 1fr; }
    .executive-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .executive-kpis { grid-template-columns: 1fr; }
    .executive-hero { padding: 18px; }
}
