/* Dashboard-only responsive guardrails. Desktop rules remain untouched. */
.dashboard-shell, .dashboard-shell * { min-width: 0; }
.dashboard-shell { overflow-x: clip; }
.dashboard-shell .dpms-page { min-width: 0; }
.dashboard-shell img, .dashboard-shell svg { max-width: 100%; }
.dashboard-shell a, .dashboard-shell button { touch-action: manipulation; }
.dashboard-shell .dpms-topbar > div { min-width: 0; }
.dashboard-shell .dpms-topbar h1 { min-width: 0; overflow-wrap: anywhere; }
.dashboard-shell .role-guide-panel { max-width: calc(100vw - 32px); }

@media (max-width: 1023px) {
    .dashboard-shell .dpms-page { padding: 20px 16px !important; }
    .dashboard-shell .dpms-topbar > div { padding-inline: 16px !important; }
    .dashboard-shell .dpms-topbar .flex.items-center.gap-4 { gap: 8px !important; }
    .dashboard-shell .dpms-topbar .font-semibold { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-shell .dpms-sidebar { width: min(82vw, 320px) !important; }
}

@media (max-width: 640px) {
    .dashboard-shell .dpms-page { padding: 16px 12px !important; }
    .dashboard-shell .dpms-topbar > div { height: 60px !important; padding-inline: 12px !important; }
    .dashboard-shell .dpms-topbar h1 { font-size: 1rem !important; line-height: 1.35; }
    .dashboard-shell .dpms-topbar .role-guide-panel { margin-inline: 12px !important; }
    .dashboard-shell .role-guide-panel { max-height: calc(100vh - 76px); overflow-y: auto; }
    .dashboard-shell .role-guide-panel .grid { grid-template-columns: 1fr !important; }
    .dashboard-shell .dpms-topbar .relative > button { min-width: 44px; min-height: 44px; padding: 8px !important; }
    .dashboard-shell .dpms-topbar .relative > button span { display: none; }
    .dashboard-shell .dpms-topbar .relative > div { right: auto; left: 0; width: min(88vw, 320px) !important; }
    .dashboard-shell .dpms-page .dash-welcome-body { flex-wrap: wrap; }
    .dashboard-shell .dpms-page .dash-welcome-body > .dash-welcome-copy { flex-basis: calc(100% - 64px); }
    .dashboard-shell .dpms-page .dash-welcome-body > .rbac-banner-close { margin-inline-start: auto; }
    .dashboard-shell [data-doctor-income-widget] { padding: 16px !important; }
}

@media (max-width: 390px) {
    .dashboard-shell .dpms-page { padding-inline: 8px !important; }
    .dashboard-shell .dpms-topbar > div { padding-inline: 8px !important; }
    .dashboard-shell .dpms-topbar .gap-4 { gap: 4px !important; }
    .dashboard-shell .dpms-sidebar { width: min(90vw, 300px) !important; }
    .dashboard-shell .dpms-page .dash-welcome-body > .dash-welcome-copy { flex-basis: 100%; order: 3; }
    .dashboard-shell .dpms-page .dash-welcome-body > .rbac-banner-icon { order: 1; }
    .dashboard-shell .dpms-page .dash-welcome-body > .rbac-banner-close { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-shell *, .dashboard-shell *::before, .dashboard-shell *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
