/* UI-3: shared Admin presentation, scoped away from the certified Overview pilot. */
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) { min-width: 0; color: var(--staff-foundation-text); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.section-header, .leads-hero, .finance-header, .phase2e-header) { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: var(--staff-foundation-space-4); min-width: 0; margin-bottom: var(--staff-foundation-space-6); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.section-header, .leads-hero, .finance-header, .phase2e-header) > * { min-width: 0; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.section-header, .leads-hero, .finance-header, .phase2e-header) h1 { margin: 0; color: var(--staff-foundation-text); font-size: var(--staff-foundation-type-page); line-height: 1.2; overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.section-header, .leads-hero, .finance-header, .phase2e-header) :where(.subtitle, p) { overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.header-actions, .leads-hero-actions, .staff-inline-actions) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--staff-foundation-space-2); min-width: 0; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.phase2e-header, .finance-header) > .btn { color: var(--staff-foundation-text); background: var(--staff-foundation-surface); border-color: var(--staff-foundation-border); }

/* Promote the UI-2 surface, state and action rhythm for genuine multi-module consumers. */
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.billing-card, .finance-card, .finance-row, .leads-work-summary, .leads-work-queue, .phase2e-detail) { min-width: 0; padding: var(--staff-foundation-space-5); border: 1px solid var(--staff-foundation-border); border-radius: var(--staff-foundation-radius-surface); background: var(--staff-foundation-surface); color: var(--staff-foundation-text); overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.billing-empty, .finance-empty, .phase2e-empty, .aws-state, .ui-empty-cell, .staff-students-list-status) { color: var(--staff-foundation-text-muted); font-size: var(--staff-foundation-type-body); line-height: 1.5; overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.billing-snapshot, .finance-snapshot, .phase2e-meta, .leads-work-status) { color: var(--staff-foundation-text-muted); font-size: var(--staff-foundation-type-body); line-height: 1.5; overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.billing-card-n, .finance-card strong) { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* A visible rail makes long tab sets discoverable without changing routing. */
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.leads-tabs, .billing-tabs, .aws-tabs, .asp-tabs, .ops-tabs, .staff-tab-rail, .pay-tabs, .pm-tabs, .ca-seg) { max-width: 100%; min-width: 0; scrollbar-width: thin; scrollbar-color: var(--staff-foundation-border) var(--staff-foundation-surface-soft); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.leads-tabs, .billing-tabs, .aws-tabs, .ops-tabs, .staff-tab-rail, .pay-tabs, .pm-tabs, .ca-seg) :is(button, [role="tab"]) { min-height: var(--staff-foundation-interaction-height); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.leads-tabs, .billing-tabs, .aws-tabs, .ops-tabs, .staff-tab-rail, .pay-tabs, .pm-tabs, .ca-seg) [aria-selected="true"] { font-weight: 700; }
body.staff-app.is-admin[data-staff-foundation="2a"] :where(#academic .aws-tabs, .asp-tabs) { scrollbar-width: thin; }
body.staff-app.is-admin[data-staff-foundation="2a"] :where(#academic .aws-tabs, .asp-tabs)::-webkit-scrollbar { display: block; width: var(--staff-foundation-space-2); height: var(--staff-foundation-space-2); }
body.staff-app.is-admin[data-staff-foundation="2a"] #academic .aws-head { padding: var(--staff-foundation-space-5); border-color: var(--staff-foundation-border); background: var(--staff-foundation-surface); box-shadow: none; }

/* Filters, forms, tables and pagination share the foundation's control geometry. */
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(button, [role="tab"], input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) { min-height: var(--staff-foundation-interaction-height); }
body.staff-app.is-admin[data-staff-foundation="2a"] #class-schedule-grid .p2d-nav [data-p2d-nav] { min-width: var(--staff-foundation-interaction-height); flex-shrink: 0; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(input, select, textarea) { max-width: 100%; min-width: 0; box-sizing: border-box; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.form-group, .staff-students-controls, .leads-work-filters, .finance-toolbar, .phase2e-filters, .pay-filters, .aws-toolbar) { min-width: 0; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.form-group, .finance-toolbar label, .phase2e-filters label, .leads-work-filters label) :where(label, span:first-child) { color: var(--staff-foundation-text); font-size: var(--staff-foundation-type-label); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.table-responsive, .data-table-wrap, .staff-students-table-wrap, .leads-work-table-wrap, .billing-table-wrap, .pay-table-wrap, .phase2e-table-scroll) { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--staff-foundation-border) var(--staff-foundation-surface-soft); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(table, th, td) { overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.staff-pagination, .leads-work-pages, .pay-pagination, .billing-pagination) { display: flex; align-items: center; flex-wrap: wrap; gap: var(--staff-foundation-space-2); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.staff-pagination, .leads-work-pages, .pay-pagination, .billing-pagination) button { min-height: var(--staff-foundation-interaction-height); }
body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--staff-foundation-focus); outline-offset: 2px; }

/* Overlay panels retain their existing focus and close logic; only geometry is shared. */
body.staff-app.is-admin[data-staff-foundation="2a"] :where(.billing-drawer-panel, .leads-drawer, .finance-modal-card, .asp-drawer, .admission-action-confirm) { max-width: 100%; max-height: 100dvh; overflow-y: auto; overflow-wrap: anywhere; }
body.staff-app.is-admin[data-staff-foundation="2a"] :where(.billing-drawer-x, .leads-drawer-close, .finance-modal-head button, .asp-close) { min-width: var(--staff-foundation-interaction-height); min-height: var(--staff-foundation-interaction-height); }
body.staff-app.is-admin[data-staff-foundation="2a"] #profile .staff-profile-avatar-wrap { margin-bottom: var(--staff-foundation-space-8); }

@media (max-width: 600px) {
  body.staff-app.is-admin[data-staff-foundation="2a"] #students .staff-students-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.staff-app.is-admin[data-staff-foundation="2a"] #students .staff-students-actions > .btn { width: auto; min-width: 0; white-space: normal; }
  body.staff-app.is-admin[data-staff-foundation="2a"] :where(#leads-root .leads-tabs, #billing .billing-tabs) { overflow-x: auto; scrollbar-width: thin; }
  body.staff-app.is-admin[data-staff-foundation="2a"] #academic .aws-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
  body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.section-header, .leads-hero, .finance-header, .phase2e-header) { align-items: stretch; }
  body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.header-actions, .leads-hero-actions) { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  body.staff-app.is-admin[data-staff-foundation="2a"] .content-section:not(#dashboard) :where(.billing-tab, .leads-tab, .aws-tab, .ops-tab, .finance-tabs button) { transition-duration: 0s; animation-duration: 0s; }
}
