/* BallotNexus v6.3.0 — EC workspace visual and structural convergence.
   This layer intentionally loads after the legacy/shared styles and uses a
   small number of !important declarations to neutralize page-local legacy CSS. */

:root{
  --bnx-ec-bg:#f2f6fa;
  --bnx-ec-surface:#ffffff;
  --bnx-ec-surface-soft:#f8fbfd;
  --bnx-ec-border:#dce5ee;
  --bnx-ec-text:#10233d;
  --bnx-ec-muted:#64748b;
  --bnx-ec-accent:#0f9f91;
  --bnx-ec-shadow:0 8px 24px rgba(15,23,42,.055);
  --bnx-ec-radius:17px;
}

/* One canvas language across EC workspaces. */
html body :is(.mgmt-shell,.results-shell,.report-shell,.ec-print-shell){
  background:linear-gradient(180deg,#f5f8fb 0%,var(--bnx-ec-bg) 100%) !important;
}
html body :is(.mgmt-shell,.results-shell,.report-shell,.ec-print-shell) > :is(.bnx-shell-canvas,.content){
  min-width:0;
}

/* Compact contextual header. Large marketing gradients do not belong inside
   authenticated operational workspaces. */
html body .bnx-setup-page .mgmt-hero,
html body .results-hero,
html body .report-hero,
html body .ec-print-hero{
  position:relative !important;
  overflow:hidden !important;
  margin:0 0 14px !important;
  padding:17px 19px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:var(--bnx-ec-radius) !important;
  background:linear-gradient(135deg,#fff 0%,#fbfefd 68%,#f1faf8 100%) !important;
  color:var(--bnx-ec-text) !important;
  box-shadow:var(--bnx-ec-shadow) !important;
}
html body :is(.bnx-setup-page .mgmt-hero,.results-hero,.report-hero,.ec-print-hero)::before,
html body :is(.bnx-setup-page .mgmt-hero,.results-hero,.report-hero,.ec-print-hero)::after{
  display:none !important;
}
html body .bnx-setup-page .mgmt-hero-title,
html body .results-hero-title,
html body .report-hero h1,
html body .ec-print-title{
  margin:7px 0 5px !important;
  color:var(--bnx-ec-text) !important;
  font-size:clamp(24px,2vw,30px) !important;
  font-weight:800 !important;
  letter-spacing:-.022em !important;
  line-height:1.12 !important;
}
html body .bnx-setup-page .mgmt-hero-description,
html body .results-hero-description,
html body .report-hero p,
html body .ec-print-desc{
  max-width:900px !important;
  margin:0 !important;
  color:var(--bnx-ec-muted) !important;
  font-size:12.5px !important;
  line-height:1.5 !important;
}
html body :is(.mgmt-hero-badges,.results-hero-badges,.ec-print-badges){gap:6px !important;margin-bottom:0 !important}
html body :is(.mgmt-pill,.mgmt-mini-pill,.mgmt-state-pill,.results-pill,.results-status-pill,.results-mini-pill,.report-pill,.ec-print-badge,.ec-print-state){
  min-height:29px !important;
  padding:5px 9px !important;
  gap:6px !important;
  border:1px solid #dbe4ee !important;
  border-radius:999px !important;
  background:#fff !important;
  color:#3b4c63 !important;
  font-size:10.75px !important;
  font-weight:750 !important;
  box-shadow:none !important;
}
html body :is(.mgmt-state-pill,.results-status-pill,.ec-print-state).state-live{background:#ecfdf5 !important;border-color:#a7f3d0 !important;color:#047857 !important}
html body :is(.mgmt-state-pill,.results-status-pill,.ec-print-state).state-upcoming{background:#eff6ff !important;border-color:#bfdbfe !important;color:#1d4ed8 !important}
html body :is(.mgmt-state-pill,.results-status-pill,.ec-print-state).state-closed{background:#f1f5f9 !important;border-color:#dbe4ee !important;color:#475569 !important}
html body :is(.mgmt-state-pill,.results-status-pill,.ec-print-state).state-unscheduled{background:#fff7ed !important;border-color:#fed7aa !important;color:#9a3412 !important}
html body :is(.mgmt-hero-actions,.results-hero-actions,.ec-print-actions){gap:7px !important;margin-top:12px !important}
html body :is(.mgmt-hero-actions,.results-hero-actions,.ec-print-actions) .btn{
  min-height:34px !important;
  padding:6px 11px !important;
  border-radius:9px !important;
  font-size:11.5px !important;
}

/* Compact card/panel geometry across the pages shown in hosted UAT. */
html body :is(.bnx-setup-page .mgmt-card,.results-card,.report-card,.ec-print-card){
  min-height:104px !important;
  padding:14px 15px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:14px !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 6px 18px rgba(15,23,42,.04) !important;
}
html body :is(.bnx-setup-page .mgmt-card,.results-card,.report-card,.ec-print-card)::before{width:3px !important}
html body :is(.mgmt-card-label,.results-card-label,.report-card>span,.ec-print-card>span){font-size:9.75px !important;margin-bottom:4px !important}
html body :is(.mgmt-card-value,.results-card-value,.report-card>strong,.ec-print-card>strong){font-size:24px !important;margin:4px 0 5px !important;line-height:1.05 !important}
html body :is(.mgmt-card-meta,.results-card-meta,.report-card>small,.ec-print-card>small){min-height:0 !important;font-size:10.75px !important;line-height:1.35 !important}
html body .results-card-top{margin-bottom:5px !important}
html body .results-card-top i{width:32px !important;height:32px !important;border-radius:10px !important;font-size:14px !important}

html body :is(.bnx-setup-page .mgmt-panel,.results-panel,.report-panel,.ec-print-panel){
  margin-bottom:14px !important;
  padding:15px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:var(--bnx-ec-radius) !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 6px 20px rgba(15,23,42,.045) !important;
}
html body .bnx-setup-page .mgmt-panel-header{
  margin:0 0 10px !important;
  padding:0 0 11px !important;
  border-bottom:1px solid #e8eef5 !important;
  background:transparent !important;
}
html body :is(.mgmt-panel-title,.results-panel-title,.report-panel-title,.ec-print-head h3){font-size:16px !important;line-height:1.25 !important}
html body :is(.mgmt-panel-subtitle,.results-panel-subtitle,.report-panel-subtitle,.ec-print-head p){font-size:11.5px !important;line-height:1.45 !important}

/* Election setup progress should guide rather than dominate Access Center. */
html body .bnx-setup{
  margin-bottom:14px !important;
  padding:13px 15px !important;
  border-radius:16px !important;
  box-shadow:0 6px 18px rgba(15,23,42,.04) !important;
}
html body .bnx-setup__header{gap:10px !important}
html body .bnx-setup h3{margin:3px 0 2px !important;font-size:15px !important}
html body .bnx-setup p{font-size:11px !important;line-height:1.4 !important}
html body .bnx-setup__progress{height:4px !important;margin:10px 0 !important}
html body .bnx-setup__steps{gap:6px !important}
html body .bnx-setup-step{min-height:46px !important;padding:7px 8px !important;border-radius:11px !important;gap:7px !important}
html body .bnx-setup-step__number{width:26px !important;height:26px !important;flex-basis:26px !important;border-radius:8px !important}
html body .bnx-setup-step__copy strong{font-size:11px !important}
html body .bnx-setup-step__copy small{font-size:9.5px !important}

/* Verification: use the available width and remove the duplicate DataTables search. */
html body .verify-toolbar{margin:0 0 10px !important}
html body .verify-toolbar-left{display:none !important}
html body .verify-toolbar-right{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(180px,1fr)) !important;
  width:100% !important;
  gap:8px !important;
}
html body .verify-toolbar-right .form-control{width:100% !important;min-width:0 !important;height:35px !important;border-radius:9px !important}
html body #verificationTable_wrapper > .row:first-child .dataTables_filter{display:none !important}
html body #verificationTable_wrapper > .row:first-child{padding-top:2px !important;padding-bottom:4px !important}
html body #verificationTable_wrapper > .row:last-child{padding-top:6px !important}
html body .bnx-compact-guidance--verify{margin-bottom:12px !important;padding:10px 12px !important;border-radius:13px !important}

/* Access Center: first-run guidance and official links should be useful without
   looking like full dashboards nested inside a dashboard. */
html body .bnx-access-first-run-panel{padding:0 !important}
html body .bnx-access-first-run-panel .mgmt-panel-header{padding:13px 15px !important;margin:0 !important}
html body .bnx-setup-page .bnx-access-first-run{
  min-height:0 !important;
  padding:20px 18px !important;
  border:0 !important;
  border-radius:0 0 16px 16px !important;
  background:transparent !important;
}
html body .bnx-access-first-run .bnx-context-empty__icon{width:42px !important;height:42px !important;border-radius:12px !important;margin-bottom:7px !important}
html body .bnx-access-first-run h3{margin:0 0 4px !important;font-size:16px !important}
html body .bnx-access-first-run p{margin-bottom:10px !important;font-size:11.5px !important}
html body .bnx-access-first-run .bnx-process-steps{margin:0 0 11px !important;gap:6px !important}
html body .bnx-access-first-run .bnx-process-steps>span{min-height:31px !important;padding:5px 9px !important;font-size:10.5px !important;box-shadow:none !important}
html body .access-link-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:10px !important}
html body .access-link-card{padding:13px !important;border-radius:13px !important;box-shadow:none !important}
html body .access-link-title{margin-bottom:5px !important;font-size:13px !important}
html body .access-link-meta{font-size:10.75px !important;line-height:1.4 !important;min-height:30px}
html body .access-link-input{margin-top:8px !important}
html body .access-link-actions{margin-top:8px !important}
html body .access-link-input .form-control,html body .access-link-input .btn{height:34px !important}

/* Results: live controls and analytics should not duplicate the same summary
   or render huge zero-value visualisations. */
html body .results-livebar{
  margin-bottom:12px !important;
  padding:9px 11px !important;
  border-radius:14px !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 5px 16px rgba(15,23,42,.04) !important;
}
html body .results-live-left,html body .results-live-right,html body .results-live-metrics{gap:6px !important}
html body .results-livebar .form-control{height:31px !important;min-width:86px !important;padding:4px 9px !important}
html body .results-livebar .btn{min-height:31px !important;padding:5px 10px !important;border-radius:8px !important}
html body .results-hero-metrics{display:none !important}
html body .results-card-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:10px !important;margin-bottom:12px !important}
html body .results-card-grid + .results-panel{margin-top:0 !important}
html body .results-chart-shell{height:220px !important}
html body .results-chart-shell.sm{height:190px !important}
html body .results-empty{min-height:0 !important;padding:18px 14px !important;border-radius:13px !important}
html body .results-empty i{width:36px !important;height:36px !important;border-radius:11px !important;margin-bottom:6px !important}
html body .results-signal-list{gap:7px !important}
html body .results-signal-item{padding:10px 11px !important;border-radius:12px !important}
html body .results-signal-item strong{margin-bottom:3px !important;font-size:12.5px !important}
html body .results-signal-item span{font-size:10.75px !important;line-height:1.4 !important}
html body .results-table{min-width:680px !important}
html body .results-table thead th{padding:9px 10px !important;font-size:9.75px !important}
html body .results-table tbody td{padding:10px !important;font-size:11.5px !important}
html body #resultsApprovalPanel[hidden],html body #resultsStatusPanel[hidden],html body #resultsMarginPanel[hidden]{display:none !important}
html body #resultsStandingsColumn.is-full-width{width:100% !important}

/* Operations Reports: remove the accidental light cards inside dark mode and
   align its bespoke CSS with the shared EC component geometry. */
html body .report-toolbar,
html body .report-filter{
  margin:0 0 12px !important;
  padding:11px 13px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:14px !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 5px 16px rgba(15,23,42,.04) !important;
}
html body .report-toolbar{margin-top:0 !important}
html body .report-filter-grid{gap:9px !important}
html body .report-filter .form-group{margin-bottom:0 !important}
html body .report-filter label{margin-bottom:4px !important;font-size:9.75px !important}
html body .report-filter .form-control{height:35px !important;border-radius:9px !important;font-size:11.5px !important}
html body .report-filter .report-actions{margin-top:10px !important;justify-content:flex-end !important}
html body .report-filter .btn{min-height:34px !important;padding:6px 10px !important;border-radius:9px !important}
html body .report-card-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:10px !important;margin-bottom:12px !important}
html body .report-panel-header{margin-bottom:10px !important}
html body .report-table{min-width:760px !important}
html body .report-table thead th{padding:9px 10px !important;font-size:9.75px !important}
html body .report-table tbody td{padding:10px !important;font-size:11.5px !important}
html body .report-empty{padding:18px 14px !important;border-radius:13px !important}
html body .report-empty i{width:36px !important;height:36px !important;border-radius:11px !important;margin-bottom:6px !important}

/* Print Results: task-specific identity and compact preview chrome. */
html body .ec-print-shell .content{padding-top:20px !important}
html body .ec-print-cards{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important;margin-bottom:12px !important}
html body .ec-print-panel{padding:15px !important}
html body .ec-print-head{margin-bottom:10px !important}
html body .ec-print-empty{padding:22px 14px !important;border-radius:13px !important}
html body .ec-print-empty i{width:38px !important;height:38px !important;border-radius:11px !important;margin-bottom:6px !important}
html body .ec-print-table th,html body .ec-print-table td{padding:9px 10px !important;font-size:11px !important}

/* Dark mode uses the same hierarchy instead of a different visual system. */
html.dark-mode body :is(.mgmt-shell,.results-shell,.report-shell,.ec-print-shell),
body.dark-mode :is(.mgmt-shell,.results-shell,.report-shell,.ec-print-shell){
  --bnx-ec-bg:#071426;
  --bnx-ec-surface:#0d1c34;
  --bnx-ec-surface-soft:#102441;
  --bnx-ec-border:rgba(131,161,205,.18);
  --bnx-ec-text:#f4f7fc;
  --bnx-ec-muted:#aab9cf;
  --bnx-ec-shadow:0 8px 24px rgba(1,7,20,.22);
  background:#071426 !important;
}
html.dark-mode body .bnx-setup-page .mgmt-hero,
body.dark-mode .bnx-setup-page .mgmt-hero,
html.dark-mode body .results-hero,
body.dark-mode .results-hero,
html.dark-mode body .report-hero,
body.dark-mode .report-hero,
html.dark-mode body .ec-print-hero,
body.dark-mode .ec-print-hero{
  background:linear-gradient(135deg,#102642 0%,#10384a 100%) !important;
  border-color:rgba(94,234,212,.18) !important;
  color:#f7fbff !important;
}
html.dark-mode body :is(.bnx-setup-page .mgmt-hero-title,.results-hero-title,.report-hero h1,.ec-print-title),
body.dark-mode :is(.bnx-setup-page .mgmt-hero-title,.results-hero-title,.report-hero h1,.ec-print-title){color:#f7fbff !important}
html.dark-mode body :is(.bnx-setup-page .mgmt-hero-description,.results-hero-description,.report-hero p,.ec-print-desc),
body.dark-mode :is(.bnx-setup-page .mgmt-hero-description,.results-hero-description,.report-hero p,.ec-print-desc){color:#bfd0e5 !important}
html.dark-mode body :is(.mgmt-pill,.mgmt-mini-pill,.mgmt-state-pill,.results-pill,.results-status-pill,.results-mini-pill,.report-pill,.ec-print-badge,.ec-print-state),
body.dark-mode :is(.mgmt-pill,.mgmt-mini-pill,.mgmt-state-pill,.results-pill,.results-status-pill,.results-mini-pill,.report-pill,.ec-print-badge,.ec-print-state){
  background:#132846 !important;
  border-color:rgba(143,177,222,.18) !important;
  color:#e0ebf8 !important;
}
html.dark-mode body :is(.bnx-setup-page .mgmt-card,.bnx-setup-page .mgmt-panel,.results-card,.results-panel,.report-card,.report-panel,.ec-print-card,.ec-print-panel,.report-toolbar,.report-filter,.results-livebar),
body.dark-mode :is(.bnx-setup-page .mgmt-card,.bnx-setup-page .mgmt-panel,.results-card,.results-panel,.report-card,.report-panel,.ec-print-card,.ec-print-panel,.report-toolbar,.report-filter,.results-livebar){
  background:#0d1c34 !important;
  border-color:rgba(131,161,205,.17) !important;
  box-shadow:0 8px 22px rgba(1,7,20,.22) !important;
}
html.dark-mode body :is(.mgmt-card-value,.mgmt-panel-title,.mgmt-main-line,.results-card-value,.results-panel-title,.results-main-line,.report-card>strong,.report-panel-title,.ec-print-card>strong,.ec-print-head h3,.access-link-title),
body.dark-mode :is(.mgmt-card-value,.mgmt-panel-title,.mgmt-main-line,.results-card-value,.results-panel-title,.results-main-line,.report-card>strong,.report-panel-title,.ec-print-card>strong,.ec-print-head h3,.access-link-title){color:#f4f7fc !important}
html.dark-mode body :is(.mgmt-card-label,.mgmt-card-meta,.mgmt-panel-subtitle,.mgmt-sub-line,.results-card-label,.results-card-meta,.results-panel-subtitle,.results-sub-line,.report-card>span,.report-card>small,.report-panel-subtitle,.ec-print-card>span,.ec-print-card>small,.ec-print-head p,.access-link-meta),
body.dark-mode :is(.mgmt-card-label,.mgmt-card-meta,.mgmt-panel-subtitle,.mgmt-sub-line,.results-card-label,.results-card-meta,.results-panel-subtitle,.results-sub-line,.report-card>span,.report-card>small,.report-panel-subtitle,.ec-print-card>span,.ec-print-card>small,.ec-print-head p,.access-link-meta){color:#aab9cf !important}
html.dark-mode body .access-link-card,body.dark-mode .access-link-card{background:#10213d !important;border-color:rgba(131,161,205,.16) !important;box-shadow:none !important}
html.dark-mode body :is(.access-link-input .form-control,.report-filter .form-control),body.dark-mode :is(.access-link-input .form-control,.report-filter .form-control){background:#0b1930 !important;border-color:rgba(131,161,205,.22) !important;color:#eaf2fb !important}
html.dark-mode body .report-filter label,body.dark-mode .report-filter label{color:#9fb1c9 !important}
html.dark-mode body :is(.report-empty,.results-empty,.ec-print-empty),body.dark-mode :is(.report-empty,.results-empty,.ec-print-empty){background:#10213d !important;border-color:rgba(131,161,205,.17) !important;color:#aab9cf !important}
html.dark-mode body .results-signal-item,body.dark-mode .results-signal-item{background:#10213d !important;border-color:rgba(131,161,205,.16) !important}
html.dark-mode body .results-signal-item strong,body.dark-mode .results-signal-item strong{color:#f4f7fc !important}
html.dark-mode body .results-signal-item span,body.dark-mode .results-signal-item span{color:#aab9cf !important}
html.dark-mode body :is(.report-table thead th,.results-table thead th,.ec-print-table thead th),body.dark-mode :is(.report-table thead th,.results-table thead th,.ec-print-table thead th){background:#112541 !important;color:#91dff0 !important;border-color:rgba(131,161,205,.16) !important}
html.dark-mode body :is(.report-table tbody td,.results-table tbody td,.ec-print-table tbody td),body.dark-mode :is(.report-table tbody td,.results-table tbody td,.ec-print-table tbody td){color:#dae6f5 !important;border-color:rgba(131,161,205,.12) !important}

@media (max-width:1199px){
  html body .access-link-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  html body .results-card-grid,html body .report-card-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (max-width:991px){
  html body .verify-toolbar-right{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  html body :is(.bnx-setup-page .mgmt-hero,.results-hero,.report-hero,.ec-print-hero){padding:16px !important}
}
@media (max-width:767px){
  html body :is(.bnx-setup-page .mgmt-hero-title,.results-hero-title,.report-hero h1,.ec-print-title){font-size:22px !important}
  html body .verify-toolbar-right{grid-template-columns:1fr !important}
  html body .access-link-grid{grid-template-columns:1fr !important}
  html body .results-card-grid,html body .report-card-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  html body .results-livebar{align-items:stretch !important}
  html body .results-live-left,html body .results-live-right{width:100% !important}
  html body .results-live-right{justify-content:flex-start !important}
}
@media (max-width:520px){
  html body .results-card-grid,html body .report-card-grid,html body .ec-print-cards{grid-template-columns:1fr !important}
}
@media (prefers-reduced-motion:reduce){
  html body :is(.bnx-setup-step,.results-card,.report-card,.ec-print-card){transition:none !important}
}

/* Explicit setup typography in dark mode: prevents inherited legacy heading
   colors from turning setup titles nearly black. */
html.dark-mode body .bnx-setup h3,body.dark-mode .bnx-setup h3{color:#f4f7fc !important}
html.dark-mode body .bnx-setup p,body.dark-mode .bnx-setup p{color:#aab9cf !important}
html.dark-mode body .bnx-setup-step,body.dark-mode .bnx-setup-step{background:#10213d !important;border-color:rgba(131,161,205,.16) !important;color:#dce8f6 !important}
html.dark-mode body .bnx-setup-step.is-active,body.dark-mode .bnx-setup-step.is-active{background:#12384a !important;border-color:rgba(94,234,212,.32) !important;color:#a7f3d0 !important}


/* --------------------------------------------------------------------------
   BallotNexus v6.3.1 — residual EC workspace convergence.
   Remove the remaining page-local visual islands and keep persistent election
   context in the shell while each page uses a short functional identity.
   -------------------------------------------------------------------------- */

/* Live/status bars share one restrained operational surface. */
html body :is(.ecw-bar,.ecp-livebar,.ec-livebar,.notify-livebar){
  min-height:0 !important;
  margin:0 0 12px !important;
  padding:8px 10px !important;
  gap:8px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:13px !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 4px 14px rgba(15,23,42,.035) !important;
  backdrop-filter:none !important;
}
html body :is(.ecw-left,.ecw-right,.ecp-live-left,.ecp-live-right,.ec-live-left,.ec-live-right,.notify-live-left,.notify-live-right,.notify-live-metrics){gap:6px !important}
html body :is(.ecw-pill,.ecw-status,.ecp-pill,.ecp-state-pill,.ecp-readiness-pill,.ec-pill,.ec-status-pill,.ec-mini-pill,.notify-live-pill,.notify-severity-pill,.notify-mini-pill){
  min-height:27px !important;
  padding:4px 8px !important;
  gap:5px !important;
  border-radius:999px !important;
  font-size:10.25px !important;
  line-height:1.2 !important;
}
html body :is(.ecw-bar,.ecp-livebar,.ec-livebar,.notify-livebar) :is(.form-control,.btn){min-height:32px !important;height:32px !important;border-radius:9px !important;font-size:10.75px !important}

/* Remaining page-specific heroes follow the same contextual workspace grammar. */
html body :is(.ecw-hero,.ecp-hero,.ec-hero,.notify-hero){
  margin:0 0 12px !important;
  padding:15px 17px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:16px !important;
  background:linear-gradient(135deg,#fff 0%,#fbfefd 72%,#f0faf7 100%) !important;
  color:var(--bnx-ec-text) !important;
  box-shadow:var(--bnx-ec-shadow) !important;
}
html body :is(.ecw-hero,.ecp-hero,.ec-hero,.notify-hero)::before,
html body :is(.ecw-hero,.ecp-hero,.ec-hero,.notify-hero)::after{display:none !important}
html body :is(.ecw-title,.ecp-title,.ec-hero-title,.notify-hero-title){
  max-width:920px !important;
  margin:6px 0 4px !important;
  color:var(--bnx-ec-text) !important;
  font-size:clamp(23px,1.85vw,29px) !important;
  font-weight:800 !important;
  letter-spacing:-.022em !important;
  line-height:1.12 !important;
}
html body :is(.ecw-desc,.ecp-desc,.ec-hero-description,.notify-hero-description){
  max-width:760px !important;
  margin:0 !important;
  color:var(--bnx-ec-muted) !important;
  font-size:12px !important;
  line-height:1.45 !important;
}
html body :is(.ecw-actions,.ecp-hero-actions,.ec-hero-actions,.notify-hero-actions){margin-top:10px !important;gap:6px !important}

/* Dashboard/portfolio/workspace summary cards should read as one metric family. */
html body :is(.ecw-cards,.ecp-card-grid,.ec-card-grid,.notify-card-grid){
  grid-template-columns:repeat(auto-fit,minmax(155px,1fr)) !important;
  gap:8px !important;
  margin-bottom:12px !important;
}
html body :is(.ecw-card,.ecp-card,.ec-card,.notify-card){
  min-height:94px !important;
  padding:11px 13px 10px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:13px !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 4px 14px rgba(15,23,42,.035) !important;
}
html body :is(.ecw-card,.ecp-card,.ec-card,.notify-card)::before{width:3px !important}
html body :is(.ecw-card,.ecp-card,.ec-card,.notify-card)>span{margin-bottom:3px !important;font-size:9.25px !important}
html body :is(.ecw-card,.ecp-card,.ec-card,.notify-card)>strong{margin:3px 0 4px !important;font-size:23px !important;line-height:1.05 !important}
html body :is(.ecw-card,.ecp-card,.ec-card,.notify-card)>small{font-size:10.25px !important;line-height:1.3 !important}

/* Panels, inner items and empty states use a shorter vertical rhythm. */
html body :is(.ecw-panel,.ecp-panel,.ec-panel,.notify-panel,.case-panel){
  margin-bottom:12px !important;
  padding:13px 14px !important;
  border:1px solid var(--bnx-ec-border) !important;
  border-radius:14px !important;
  background:var(--bnx-ec-surface) !important;
  box-shadow:0 4px 16px rgba(15,23,42,.035) !important;
}
html body :is(.ecw-head,.ecp-panel-header,.ec-panel-header,.notify-panel-header){margin-bottom:9px !important;gap:7px !important}
html body :is(.ecw-head h3,.ecp-panel-title,.ec-panel-title,.notify-panel-title,.case-panel-title){font-size:15.5px !important;line-height:1.22 !important}
html body :is(.ecw-head p,.ecp-panel-subtitle,.ec-panel-subtitle,.notify-panel-subtitle){margin-top:2px !important;font-size:11px !important;line-height:1.4 !important}
html body :is(.ecw-item,.ecp-activity-item,.ec-item,.notify-item,.case-item){padding:10px 11px !important;border-radius:11px !important;box-shadow:none !important}
html body :is(.ecw-empty,.ecp-empty,.ec-empty,.notify-empty,.case-empty){padding:13px 12px !important;border-radius:12px !important;font-size:11px !important;line-height:1.4 !important}
html body :is(.ecp-empty,.ec-empty,.notify-empty) i{width:34px !important;height:34px !important;border-radius:10px !important;font-size:13px !important;margin-bottom:6px !important}

/* Compact analytic canvases; the zero-data runtime already swaps these for empty states. */
html body .ec-chart-shell{height:230px !important}
html body .ec-chart-shell.sm{height:195px !important}
html body .ec-legend{gap:6px !important;margin-top:8px !important}

/* Tables use one dense desktop rhythm. Portfolio remains horizontally scrollable
   rather than forcing compressed columns. */
html body :is(.ecw-table,.ecp-table,.ec-table,.notify-table) thead th{padding:8px 9px !important;font-size:9.75px !important;line-height:1.25 !important}
html body :is(.ecw-table,.ecp-table,.ec-table,.notify-table) tbody td{padding:8px 9px !important;font-size:11px !important;line-height:1.35 !important}
html body :is(.ecw-sub,.ecp-sub-line,.ec-sub-line,.notify-sub-line){margin-top:2px !important;font-size:10px !important;line-height:1.35 !important}

/* Voter case is an operational dossier, not a sequence of large dashboard cards. */
html body .case-shell .case-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr)) !important;gap:8px !important;margin-bottom:12px !important}
html body .case-shell .case-stat{min-height:92px !important;padding:11px 12px !important;border-radius:12px !important;box-shadow:none !important}
html body .case-shell .case-stat h4{margin:0 0 5px !important;font-size:10px !important;letter-spacing:.05em !important;text-transform:uppercase !important}
html body .case-shell .case-stat strong{margin:0 0 5px !important;font-size:20px !important;line-height:1.08 !important}
html body .case-shell .case-stat p{font-size:10.5px !important;line-height:1.35 !important}
html body .case-shell .case-dual-grid{gap:10px !important}
html body .case-shell .case-kv{grid-template-columns:minmax(110px,145px) minmax(0,1fr) !important;gap:6px 10px !important}
html body .case-shell .case-kv dt{font-size:9.75px !important}
html body .case-shell .case-kv dd{font-size:11.5px !important}
html body .case-shell .case-timeline{gap:7px !important}
html body .case-shell .case-timeline-item{padding:10px 11px 10px 46px !important;border-radius:11px !important}
html body .case-shell .case-timeline-icon{left:11px !important;top:11px !important;width:25px !important;height:25px !important;font-size:11px !important}
html body .case-shell .case-timeline-title{margin-bottom:3px !important}
html body .case-shell .case-timeline-title strong{font-size:11.5px !important}
html body .case-shell .case-timeline-time,
html body .case-shell .case-timeline-meta{font-size:9.75px !important}
html body .case-shell .case-timeline-summary{font-size:10.75px !important;line-height:1.4 !important}

/* Election onboarding remains visible but no longer becomes a full-height marketing section. */
html body .ecw-onboarding{margin:12px 0 !important;border-radius:15px !important}
html body .ecw-onboarding-hero{padding:15px 17px !important}
html body .ecw-onboarding-title{font-size:clamp(23px,2vw,29px) !important}
html body .ecw-onboarding-copy{max-width:820px !important;font-size:11.5px !important;line-height:1.45 !important}
html body .ecw-onboarding-body{padding:13px 16px 15px !important}
html body .ecw-step{padding:9px !important}
html body .ecw-step strong{font-size:11px !important}
html body .ecw-step span{font-size:9.75px !important}

/* Dark mode mirrors the same hierarchy instead of reviving page-local gradients. */
html.dark-mode body :is(.ecw-bar,.ecp-livebar,.ec-livebar,.notify-livebar,.ecw-card,.ecp-card,.ec-card,.notify-card,.ecw-panel,.ecp-panel,.ec-panel,.notify-panel,.case-panel,.case-shell .case-stat),
html body.dark-mode :is(.ecw-bar,.ecp-livebar,.ec-livebar,.notify-livebar,.ecw-card,.ecp-card,.ec-card,.notify-card,.ecw-panel,.ecp-panel,.ec-panel,.notify-panel,.case-panel,.case-shell .case-stat){
  background:#0d1c34 !important;
  border-color:rgba(125,170,255,.15) !important;
  box-shadow:0 6px 18px rgba(2,6,23,.22) !important;
}
html.dark-mode body :is(.ecw-hero,.ecp-hero,.ec-hero,.notify-hero),
html body.dark-mode :is(.ecw-hero,.ecp-hero,.ec-hero,.notify-hero){
  background:linear-gradient(135deg,#102642 0%,#10384a 100%) !important;
  border-color:rgba(125,170,255,.16) !important;
  color:#f8fafc !important;
}
html.dark-mode body :is(.ecw-title,.ecp-title,.ec-hero-title,.notify-hero-title),
html body.dark-mode :is(.ecw-title,.ecp-title,.ec-hero-title,.notify-hero-title){color:#f8fafc !important}
html.dark-mode body :is(.ecw-desc,.ecp-desc,.ec-hero-description,.notify-hero-description),
html body.dark-mode :is(.ecw-desc,.ecp-desc,.ec-hero-description,.notify-hero-description){color:#b8c9df !important}
html.dark-mode body :is(.ecw-item,.ecp-activity-item,.ec-item,.notify-item,.case-item),
html body.dark-mode :is(.ecw-item,.ecp-activity-item,.ec-item,.notify-item,.case-item){background:#102642 !important;border-color:rgba(125,170,255,.12) !important}
html.dark-mode body :is(.ecw-head h3,.ecp-panel-title,.ec-panel-title,.notify-panel-title,.case-panel-title,.ecw-main,.ecp-main-line,.ec-main-line,.notify-main-line),
html body.dark-mode :is(.ecw-head h3,.ecp-panel-title,.ec-panel-title,.notify-panel-title,.case-panel-title,.ecw-main,.ecp-main-line,.ec-main-line,.notify-main-line){color:#edf4ff !important}
html.dark-mode body :is(.ecw-head p,.ecp-panel-subtitle,.ec-panel-subtitle,.notify-panel-subtitle,.ecw-sub,.ecp-sub-line,.ec-sub-line,.notify-sub-line),
html body.dark-mode :is(.ecw-head p,.ecp-panel-subtitle,.ec-panel-subtitle,.notify-panel-subtitle,.ecw-sub,.ecp-sub-line,.ec-sub-line,.notify-sub-line){color:#9eb2d7 !important}

@media (max-width:991px){
  html body :is(.ecw-hero,.ecp-hero,.ec-hero,.notify-hero){padding:14px !important}
  html body .case-shell .case-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  html body .case-shell .case-dual-grid{grid-template-columns:1fr !important}
}
@media (max-width:767px){
  html body :is(.ecw-bar,.ecp-livebar,.ec-livebar,.notify-livebar){padding:8px !important}
  html body :is(.ecw-title,.ecp-title,.ec-hero-title,.notify-hero-title){font-size:22px !important}
  html body :is(.ecw-cards,.ecp-card-grid,.ec-card-grid,.notify-card-grid){grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  html body .ec-chart-shell,html body .ec-chart-shell.sm{height:210px !important}
  html body .case-shell .case-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (max-width:480px){
  html body :is(.ecw-cards,.ecp-card-grid,.ec-card-grid,.notify-card-grid),
  html body .case-shell .case-grid{grid-template-columns:1fr !important}
}

/* --------------------------------------------------------------------------
   BallotNexus v6.3.2 — Admin operational surface convergence.
   Complete the authenticated cross-portal hierarchy after EC convergence.
   -------------------------------------------------------------------------- */

/* Dashboard, operations and analytics status bars use the same compact shell. */
html body :is(.dashboard-livebar,.ops-livebar,.votes-livebar){
  min-height:0 !important;
  margin:0 0 12px !important;
  padding:8px 10px !important;
  gap:8px !important;
  border:1px solid rgba(148,163,184,.18) !important;
  border-radius:13px !important;
  background:#fff !important;
  box-shadow:0 4px 14px rgba(15,23,42,.035) !important;
  backdrop-filter:none !important;
}
html body :is(.dashboard-livebar-left,.dashboard-livebar-right,.dashboard-live-metrics,.ops-live-left,.ops-live-right,.ops-live-metrics,.votes-live-left,.votes-live-right,.votes-live-metrics){gap:6px !important}
html body :is(.live-status-pill,.live-metric-pill,.live-refresh-pill,.ops-pill,.votes-pill,.votes-status-pill){
  min-height:27px !important;
  padding:4px 8px !important;
  gap:5px !important;
  border-radius:999px !important;
  font-size:10.25px !important;
  line-height:1.2 !important;
}
html body :is(.dashboard-livebar,.ops-livebar,.votes-livebar) :is(.form-control,.btn){
  min-height:32px !important;
  height:32px !important;
  border-radius:9px !important;
  font-size:10.75px !important;
}

/* Operational heroes are context headers, not marketing banners. */
html body :is(.dashboard-hero,.ops-hero,.votes-hero){
  margin:0 0 12px !important;
  padding:15px 17px !important;
  border:1px solid rgba(148,163,184,.18) !important;
  border-radius:16px !important;
  background:linear-gradient(135deg,#fff 0%,#fbfefd 72%,#f0faf7 100%) !important;
  color:#0f2239 !important;
  box-shadow:0 7px 20px rgba(15,23,42,.055) !important;
  overflow:hidden !important;
}
html body :is(.dashboard-hero,.ops-hero,.votes-hero)::before,
html body :is(.dashboard-hero,.ops-hero,.votes-hero)::after{display:none !important}
html body :is(.hero-title,.ops-hero-title,.votes-hero-title){
  max-width:920px !important;
  margin:6px 0 4px !important;
  color:#0f2239 !important;
  font-size:clamp(23px,1.85vw,29px) !important;
  line-height:1.12 !important;
  letter-spacing:-.022em !important;
  font-weight:800 !important;
}
html body :is(.hero-description,.ops-hero-description,.votes-hero-description){
  max-width:760px !important;
  margin:0 0 10px !important;
  color:#60738d !important;
  font-size:12.5px !important;
  line-height:1.5 !important;
}
html body :is(.hero-badges,.ops-hero-badges,.votes-hero-badges,.hero-actions,.ops-hero-actions,.votes-hero-actions){gap:6px !important}
html body :is(.hero-badge,.status-badge,.ops-state-pill){
  min-height:27px !important;
  padding:4px 8px !important;
  border-radius:999px !important;
  background:#f7fafc !important;
  border:1px solid rgba(148,163,184,.2) !important;
  color:#32445c !important;
  font-size:10.25px !important;
  line-height:1.2 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}
html body .hero-badge--schedule{max-width:min(100%,440px)}
html body :is(.hero-actions,.ops-hero-actions,.votes-hero-actions) .btn{
  min-height:32px !important;
  padding:6px 10px !important;
  border-radius:9px !important;
  font-size:10.75px !important;
}

/* Dashboard control stack keeps customization but stops consuming half a page. */
html body .dashboard-commandbar,
html body .bnx-dashboard-viewbar,
html body .bnx-dashboard-guidance,
html body .ops-viewbar{
  margin-bottom:10px !important;
  padding:8px 10px !important;
  border-radius:13px !important;
  box-shadow:0 4px 14px rgba(15,23,42,.035) !important;
}
html body .dashboard-search-wrap{min-height:34px !important}
html body .dashboard-search-wrap input{min-height:32px !important;font-size:11px !important}
html body :is(.dashboard-commandbar,.bnx-dashboard-viewbar,.bnx-dashboard-guidance,.ops-viewbar) :is(.btn,.bnx-dashboard-view-button,.bnx-dashboard-customize-button,.ops-view-tab){
  min-height:32px !important;
  padding:6px 10px !important;
  font-size:10.75px !important;
  border-radius:9px !important;
}
html body .bnx-dashboard-viewbar-copy strong{font-size:12px !important}
html body .bnx-dashboard-viewbar-copy span{font-size:10.75px !important;line-height:1.35 !important}
html body .bnx-dashboard-guidance{grid-template-columns:minmax(0,1.4fr) minmax(170px,.6fr) auto !important;gap:12px !important;align-items:center !important}
html body .bnx-dashboard-guidance h3{margin:3px 0 !important;font-size:14px !important}
html body .bnx-dashboard-guidance p{margin:0 !important;font-size:10.75px !important;line-height:1.4 !important}
html body .bnx-dashboard-guidance-kicker{font-size:9.5px !important}

/* Summary cards and panels share the compact operational rhythm. */
html body :is(.dashboard-card,.ops-card,.votes-card){
  min-height:112px !important;
  padding:13px 14px !important;
  border-radius:15px !important;
  box-shadow:0 6px 18px rgba(15,23,42,.05) !important;
}
html body :is(.dashboard-card-value,.ops-card strong,.votes-card strong){font-size:25px !important;line-height:1 !important;margin:5px 0 !important}
html body :is(.dashboard-card-label,.ops-card span,.votes-card span){font-size:9.5px !important;line-height:1.25 !important}
html body :is(.dashboard-card-meta,.ops-card small,.votes-card small){font-size:10.75px !important;line-height:1.35 !important}
html body :is(.dashboard-panel,.ops-panel,.votes-panel){
  margin-bottom:12px !important;
  padding:15px !important;
  border-radius:16px !important;
  box-shadow:0 6px 18px rgba(15,23,42,.045) !important;
}
html body :is(.dashboard-panel-header,.ops-panel-header,.votes-panel-header){margin-bottom:10px !important;gap:8px !important}
html body :is(.dashboard-panel-title,.ops-panel-title,.votes-panel-title){font-size:16px !important;line-height:1.25 !important}
html body :is(.dashboard-panel-subtitle,.ops-panel-subtitle,.votes-panel-subtitle){font-size:10.75px !important;line-height:1.4 !important}
html body :is(.chart-shell,.votes-chart-shell){height:230px !important}
html body .turnout-chart-shell,html body .votes-chart-shell.sm{height:200px !important}
html body .ops-chart-shell{height:220px !important}
html body :is(.empty-state,.ops-empty,.votes-empty){padding:16px 12px !important;border-radius:13px !important;font-size:11px !important}
html body .empty-state i{width:36px !important;height:36px !important;border-radius:11px !important;margin-bottom:7px !important}

/* Tables remain dense but readable on operational dashboards. */
html body :is(.dashboard-table,.ops-table,.votes-table) thead th{padding:8px 9px !important;font-size:9.5px !important}
html body :is(.dashboard-table,.ops-table,.votes-table) tbody td{padding:9px !important;font-size:11px !important;line-height:1.35 !important}

/* Dark mode follows the same geometry instead of restoring the old heavy cards. */
html.dark-mode body :is(.dashboard-livebar,.ops-livebar,.votes-livebar,.dashboard-card,.ops-card,.votes-card,.dashboard-panel,.ops-panel,.votes-panel,.dashboard-commandbar,.bnx-dashboard-viewbar,.bnx-dashboard-guidance,.ops-viewbar),
html body.dark-mode :is(.dashboard-livebar,.ops-livebar,.votes-livebar,.dashboard-card,.ops-card,.votes-card,.dashboard-panel,.ops-panel,.votes-panel,.dashboard-commandbar,.bnx-dashboard-viewbar,.bnx-dashboard-guidance,.ops-viewbar){
  background:#0d1c34 !important;
  border-color:rgba(125,170,255,.15) !important;
  box-shadow:0 6px 18px rgba(2,6,23,.22) !important;
}
html.dark-mode body :is(.dashboard-hero,.ops-hero,.votes-hero),
html body.dark-mode :is(.dashboard-hero,.ops-hero,.votes-hero){
  background:linear-gradient(135deg,#102642 0%,#10384a 100%) !important;
  border-color:rgba(125,170,255,.16) !important;
  color:#f8fafc !important;
}
html.dark-mode body :is(.hero-title,.ops-hero-title,.votes-hero-title),
html body.dark-mode :is(.hero-title,.ops-hero-title,.votes-hero-title){color:#f8fafc !important}
html.dark-mode body :is(.hero-description,.ops-hero-description,.votes-hero-description),
html body.dark-mode :is(.hero-description,.ops-hero-description,.votes-hero-description){color:#b8c9df !important}
html.dark-mode body :is(.hero-badge,.status-badge),html body.dark-mode :is(.hero-badge,.status-badge){background:#132846 !important;border-color:rgba(143,177,222,.18) !important;color:#e0ebf8 !important}

@media (max-width:1199px){
  html body .bnx-dashboard-guidance{grid-template-columns:1fr auto !important}
  html body .bnx-dashboard-guidance > :nth-child(2){grid-column:1 / -1}
}
@media (max-width:991px){
  html body :is(.dashboard-hero,.ops-hero,.votes-hero){padding:14px !important}
  html body :is(.dashboard-livebar,.ops-livebar,.votes-livebar){align-items:stretch !important}
  html body :is(.dashboard-livebar-left,.dashboard-livebar-right,.ops-live-left,.ops-live-right,.votes-live-left,.votes-live-right){width:100% !important}
}
@media (max-width:767px){
  html body :is(.hero-title,.ops-hero-title,.votes-hero-title){font-size:22px !important}
  html body .bnx-dashboard-guidance{grid-template-columns:1fr !important}
  html body .bnx-dashboard-guidance > *{grid-column:auto !important}
  html body :is(.chart-shell,.votes-chart-shell,.ops-chart-shell,.turnout-chart-shell,.votes-chart-shell.sm){height:200px !important}
}
