/* BallotNexus v6.2.4 — concise whole-product UI/UX convergence and interaction hardening layer.
   Loaded last so authenticated and public surfaces share one final interaction standard
   without changing election authority, persistence, or ballot semantics. */
:root {
  --bnx-refine-focus: #0f766e;
  --bnx-refine-focus-ring: rgba(20, 184, 166, .24);
  --bnx-refine-surface: #ffffff;
  --bnx-refine-surface-soft: #f8fafc;
  --bnx-refine-border: #e2e8f0;
  --bnx-refine-border-strong: #cbd5e1;
  --bnx-refine-text: #0f172a;
  --bnx-refine-muted: #64748b;
  --bnx-refine-radius: 14px;
  --bnx-refine-radius-sm: 10px;
  --bnx-refine-shadow: 0 1px 2px rgba(15,23,42,.025), 0 10px 28px rgba(15,23,42,.045);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-variant-numeric: tabular-nums;
}

/* Accessible keyboard entry point added by ballotnexus-refinement.js. */
.bnx-skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 20050;
  transform: translate(-50%, -150%);
  min-height: 40px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  color: #0f172a !important;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15,23,42,.18);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  transition: transform .16s ease;
}

.bnx-skip-link:focus {
  transform: translate(-50%, 0);
  outline: none;
}

.bnx-visually-hidden-live {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Canonical canvas. v6.1 removes the need for Bootstrap fixed-width containers in EC. */
.bnx-shell-canvas {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.sidebar-mini .content-wrapper,
body.sidebar-mini .right-side {
  overflow-x: clip;
}

/* Final generic surface normalization for legacy pages not yet using bnx-* components. */
.content .box,
.content .well,
.content .panel,
.content .mgmt-panel,
.content .case-panel,
.content .ops-panel,
.content .bnx-panel {
  border: 1px solid var(--bnx-refine-border) !important;
  border-radius: var(--bnx-refine-radius) !important;
  background: var(--bnx-refine-surface) !important;
  box-shadow: var(--bnx-refine-shadow) !important;
}

.content .well {
  padding: 18px !important;
}

.content .box-header,
.content .panel-heading {
  border-bottom-color: #eef2f6 !important;
  background: transparent !important;
}

/* Controls — consistent density and reliable touch/keyboard targets. */
.btn {
  min-height: 40px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px !important;
  font-weight: 750 !important;
  line-height: 1.25;
  box-shadow: none !important;
  white-space: normal;
}

.btn.btn-sm,
.input-group-sm > .input-group-btn > .btn {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 9px !important;
  font-size: 12px;
}

.btn.btn-xs {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px !important;
  font-size: 11px;
}

.btn .fa,
.btn .glyphicon {
  margin: 0 !important;
}

.btn[disabled],
.btn.disabled,
fieldset[disabled] .btn {
  opacity: .55 !important;
  cursor: not-allowed !important;
  filter: saturate(.72);
}

.form-control,
select.form-control,
textarea.form-control {
  min-height: 40px;
  border-color: var(--bnx-refine-border-strong) !important;
  border-radius: 10px !important;
  color: var(--bnx-refine-text) !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
}

textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

.form-control.input-sm,
.input-sm,
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon {
  min-height: 36px;
  height: 36px;
  border-radius: 9px !important;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  border-color: #2dd4bf !important;
  box-shadow: 0 0 0 3px var(--bnx-refine-focus-ring) !important;
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  color: #64748b !important;
  background: #f1f5f9 !important;
  opacity: 1 !important;
}

label,
.control-label {
  color: #334155;
  font-weight: 750;
}

.help-block,
.form-text,
small.text-muted {
  color: var(--bnx-refine-muted) !important;
  line-height: 1.55;
}

/* Strong, consistent focus states across old and new controls. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--bnx-refine-focus-ring) !important;
  outline-offset: 2px !important;
}

/* Table convergence: readable density, horizontal containment and stable hover feedback. */
.bnx-table-scroll,
.table-responsive,
.mgmt-table-wrap,
.ops-table-wrap,
.case-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  border-radius: 12px;
}

.bnx-table-scroll:focus-visible,
.table-responsive:focus-visible,
.mgmt-table-wrap:focus-visible,
.ops-table-wrap:focus-visible,
.case-table-wrap:focus-visible {
  outline: 3px solid var(--bnx-refine-focus-ring) !important;
  outline-offset: 2px;
}

.content table.table {
  margin-bottom: 0;
  color: var(--bnx-refine-text);
}

.content table.table > thead > tr > th {
  padding-top: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--bnx-refine-border) !important;
  color: #475569;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
  vertical-align: middle;
}

.content table.table > tbody > tr > td {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top-color: #eef2f6 !important;
  vertical-align: middle;
}

.content table.table > tbody > tr:hover > td {
  background: #fbfefd;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 36px;
  border: 1px solid var(--bnx-refine-border-strong);
  border-radius: 9px;
  background: #fff;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  color: var(--bnx-refine-muted) !important;
  font-size: 12px;
}

.pagination > li > a,
.pagination > li > span {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--bnx-refine-border) !important;
  color: #334155 !important;
}

.pagination > .active > a,
.pagination > .active > span {
  color: #fff !important;
  background: #0f766e !important;
  border-color: #0f766e !important;
}

/* Alerts that still render inline should look like deliberate status surfaces. */
.alert {
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  line-height: 1.55;
}

.alert-success { color: #166534 !important; background: #f0fdf4 !important; border-color: #bbf7d0 !important; }
.alert-danger  { color: #991b1b !important; background: #fef2f2 !important; border-color: #fecaca !important; }
.alert-warning { color: #92400e !important; background: #fffbeb !important; border-color: #fde68a !important; }
.alert-info    { color: #075985 !important; background: #f0f9ff !important; border-color: #bae6fd !important; }

/* Connection-state banner: visible only when the runtime detects loss of network. */
.bnx-connectivity-banner {
  position: fixed;
  top: var(--bnx-shell-header, 64px);
  left: var(--bnx-shell-sidebar, 252px);
  right: 0;
  z-index: 1039;
  min-height: 38px;
  padding: 8px 18px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7c2d12;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  box-shadow: 0 5px 16px rgba(15,23,42,.05);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.bnx-connectivity-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: currentColor;
}

.bnx-connectivity-banner.is-visible {
  display: flex;
}

.bnx-connectivity-banner.is-online {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

body.bnx-connectivity-offset .content-wrapper,
body.bnx-connectivity-offset .right-side {
  padding-top: 38px !important;
}

body:not(.sidebar-mini) .bnx-connectivity-banner {
  top: 0;
  left: 0;
}

/* Public footer convergence. */
.bnx-public-footer {
  margin-top: 28px;
  padding: 18px 0;
  color: #64748b;
  background: rgba(255,255,255,.88);
  border-top: 1px solid #e2e8f0;
  backdrop-filter: blur(12px);
}

.bnx-public-footer .bnx-public-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 12px;
}

.bnx-public-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a !important;
  font-weight: 850;
  text-decoration: none !important;
}

.bnx-public-footer .footer-brand img {
  width: 26px;
  height: 26px;
}

.bnx-public-footer .bnx-public-footer-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Dark-mode coverage for remaining Bootstrap-native surfaces. */
html.dark-mode .content .box,
html.dark-mode .content .well,
html.dark-mode .content .panel,
html.dark-mode .content .mgmt-panel,
html.dark-mode .content .case-panel,
html.dark-mode .content .ops-panel,
html.dark-mode .content .bnx-panel,
body.dark-mode .content .box,
body.dark-mode .content .well,
body.dark-mode .content .panel {
  border-color: rgba(148,163,184,.18) !important;
  background: #111827 !important;
  color: #e5edf7 !important;
}

html.dark-mode .form-control,
html.dark-mode select.form-control,
html.dark-mode textarea.form-control,
body.dark-mode .form-control {
  border-color: #334155 !important;
  color: #e5edf7 !important;
  background: #0f172a !important;
}

html.dark-mode .content table.table > thead > tr > th,
body.dark-mode .content table.table > thead > tr > th {
  color: #cbd5e1 !important;
  background: #172033 !important;
  border-color: #334155 !important;
}

html.dark-mode .content table.table > tbody > tr > td,
body.dark-mode .content table.table > tbody > tr > td {
  border-color: rgba(148,163,184,.14) !important;
}

html.dark-mode .content table.table > tbody > tr:hover > td,
body.dark-mode .content table.table > tbody > tr:hover > td {
  background: rgba(20,184,166,.06) !important;
}

html.dark-mode .bnx-connectivity-banner,
body.dark-mode .bnx-connectivity-banner {
  color: #fdba74;
  background: #431407;
  border-color: #9a3412;
}

html.dark-mode .bnx-connectivity-banner.is-online,
body.dark-mode .bnx-connectivity-banner.is-online {
  color: #86efac;
  background: #052e16;
  border-color: #166534;
}

html.dark-mode .bnx-public-footer,
body.dark-mode .bnx-public-footer {
  color: #94a3b8;
  background: rgba(15,23,42,.94);
  border-color: #273449;
}

html.dark-mode .bnx-public-footer .footer-brand,
body.dark-mode .bnx-public-footer .footer-brand {
  color: #f8fafc !important;
}

@media (max-width: 767px) {
  html { scroll-padding-top: 70px; }

  .bnx-connectivity-banner {
    top: var(--bnx-shell-header, 60px);
    left: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  .content .btn:not(.btn-xs) {
    min-height: 40px;
  }

  .mgmt-toolbar,
  .mgmt-toolbar-left,
  .mgmt-toolbar-right,
  .bnx-page-actions,
  .bnx-toolbar,
  .case-toolbar,
  .ops-toolbar {
    gap: 8px !important;
  }

  .mgmt-toolbar-right > .form-control,
  .mgmt-toolbar-right > .btn,
  .bnx-page-actions > .btn {
    max-width: 100%;
  }

  .bnx-public-footer .bnx-public-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .bnx-public-footer .bnx-public-footer-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .btn {
    max-width: 100%;
  }

  .content table.table > thead > tr > th,
  .content table.table > tbody > tr > td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (prefers-contrast: more) {
  .form-control,
  .btn,
  .content .box,
  .content .well,
  .content .panel,
  .mgmt-panel {
    border-width: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bnx-skip-link,
  .bnx-connectivity-banner,
  .btn,
  .form-control {
    transition: none !important;
  }
}

/* Public authenticated voter navigation identity. */
.main-header .navbar-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
}

.bnx-public-nav-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
}

/* v6.1.1 interaction hardening: synchronous POST actions stay visibly local and
   accidental repeat submissions are suppressed without disabling named submitters. */
.bnx-form-submitting {
  cursor: progress;
}

.btn.is-bnx-busy,
button.is-bnx-busy,
input.is-bnx-busy {
  cursor: progress !important;
}

button.is-bnx-busy,
.btn.is-bnx-busy {
  position: relative;
  padding-left: 34px !important;
}

button.is-bnx-busy::before,
.btn.is-bnx-busy::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -6.5px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: .72;
  animation: bnx-refine-spin .72s linear infinite;
}

@keyframes bnx-refine-spin {
  to { transform: rotate(360deg); }
}

/* EC operational state is status text, not a fake hyperlink. */
.header-pill > .bnx-header-status-static {
  min-height: 38px;
  height: 38px;
  margin: 0;
  padding: 0 11px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bnx-ink-3, #475569);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

/* Explicitly wrap action clusters instead of letting narrow layouts overflow. */
.mgmt-row-actions,
.bnx-row-actions,
.access-row-actions,
.case-actions,
.report-actions,
.ecp-actions,
.results-hero-actions,
.votes-hero-actions,
.notify-hero-actions,
.ops-hero-actions,
.mgmt-hero-actions,
.bnx-page-actions {
  flex-wrap: wrap;
}

/* AdminLTE breadcrumbs are positioned absolutely by default. v6.1.1 keeps them
   readable on phones and prevents them from colliding with long page titles. */
@media (max-width: 767px) {
  .content-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .content-header > h1 {
    margin: 0 !important;
    line-height: 1.2;
  }

  .content-header > .breadcrumb {
    position: static !important;
    top: auto !important;
    right: auto !important;
    float: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 0 2px !important;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    background: transparent !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .content-header > .breadcrumb > li {
    flex: 0 0 auto;
  }

  .mgmt-row-actions,
  .bnx-row-actions,
  .access-row-actions,
  .report-actions,
  .ecp-actions,
  .mgmt-hero-actions,
  .bnx-page-actions {
    width: 100%;
  }

  .mgmt-row-actions > .btn,
  .bnx-row-actions > .btn,
  .access-row-actions > .btn {
    flex: 1 1 auto;
  }
}

html.dark-mode .header-pill > .bnx-header-status-static,
body.dark-mode .header-pill > .bnx-header-status-static {
  color: #cbd5e1;
}

@media (prefers-reduced-motion: reduce) {
  button.is-bnx-busy::before,
  .btn.is-bnx-busy::before {
    animation-duration: 1.4s;
  }
}

.sidebar-online-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  padding-right: 5px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.sidebar-online-state .fa-circle {
  font-size: 8px;
}

/* --------------------------------------------------------------------------
   BallotNexus v6.2.3 — concise page architecture
   Global last-mile layer for all browser-rendered Admin, EC, voter/public and
   authentication surfaces. The goal is less vertical chrome, fewer competing
   visual blocks, and a clear primary task without changing workflow logic.
   -------------------------------------------------------------------------- */

html {
  --bnx-concise-gap: 14px;
  --bnx-concise-pad: 16px;
  --bnx-concise-radius: 14px;
  --bnx-concise-shadow: 0 1px 2px rgba(15,23,42,.025), 0 8px 24px rgba(15,23,42,.045);
}

html body .content-wrapper {
  background: #f4f7fa;
}

html body .content {
  padding: 14px 18px 24px;
}

html body .content-header {
  padding: 14px 18px 0;
  min-height: 0;
}

html body .content-header > h1 {
  margin: 0;
  color: #102a43;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 800;
  line-height: 1.18;
}

html body.bnx-has-local-hero .content-header {
  display: none !important;
}

html body .content > :first-child,
html body .bnx-shell-canvas > .content > :first-child {
  margin-top: 0;
}

/* Shared management pages --------------------------------------------------- */
html body .mgmt-hero {
  padding: 16px 18px 15px !important;
  margin: 0 0 14px !important;
  border: 1px solid #dbe6ec !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8fcfc 72%, #eefaf7 100%) !important;
  color: #102a43 !important;
  box-shadow: var(--bnx-concise-shadow) !important;
  overflow: hidden;
}

html body .mgmt-hero::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  width: 4px !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, #0f766e, #14b8a6) !important;
  opacity: 1 !important;
}

html body .mgmt-hero::after {
  opacity: .035 !important;
  transform: scale(.72);
  transform-origin: top right;
}

html body .mgmt-hero-badges,
html body .mgmt-hero-actions {
  gap: 7px !important;
}

html body .mgmt-pill,
html body .mgmt-state-pill,
html body .mgmt-mini-pill,
html body .mgmt-toolbar-meta {
  padding: 5px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

html body .mgmt-hero-title {
  margin: 8px 0 4px !important;
  max-width: 980px;
  color: #102a43 !important;
  font-size: clamp(24px, 2.1vw, 34px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em;
}

html body .mgmt-hero-description {
  max-width: 760px !important;
  margin: 0 0 10px !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

html body .mgmt-hero-actions .btn {
  min-height: 34px !important;
  padding: 7px 11px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

html body .mgmt-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

html body .mgmt-card {
  min-height: 0 !important;
  padding: 13px 15px 12px !important;
  border-radius: 14px !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}

html body .mgmt-card::before {
  width: 3px !important;
}

html body .mgmt-card-label {
  margin-bottom: 5px !important;
  font-size: 10.5px !important;
}

html body .mgmt-card-value {
  margin-bottom: 5px !important;
  font-size: 25px !important;
  line-height: 1.05 !important;
}

html body .mgmt-card-meta {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

html body .mgmt-panel {
  padding: 15px 16px !important;
  margin-bottom: 14px !important;
  border-radius: 14px !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}

html body .mgmt-panel-header {
  gap: 8px !important;
  margin-bottom: 11px !important;
}

html body .mgmt-panel-title {
  font-size: 17px !important;
  line-height: 1.2 !important;
}

html body .mgmt-panel-subtitle {
  max-width: 72ch;
  margin-top: 3px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html body .mgmt-toolbar,
html body .mgmt-filter-row,
html body .mgmt-row-actions {
  gap: 7px !important;
}

html body .mgmt-empty,
html body .verify-empty,
html body .access-empty,
html body .case-empty {
  padding: 18px 14px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

/* One-line guidance replaces instructional card clusters. */
html .bnx-compact-guidance {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #dbe6ec;
  border-radius: 13px;
  background: #f8fbfc;
  color: #334155;
  box-shadow: 0 4px 14px rgba(15,23,42,.025);
}

html .bnx-compact-guidance > .fa {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e6f7f4;
  color: #0f766e;
  font-size: 13px;
}

html .bnx-compact-guidance__copy {
  min-width: 0;
  flex: 1 1 auto;
}

html .bnx-compact-guidance__copy strong,
html .bnx-compact-guidance__copy span {
  display: block;
}

html .bnx-compact-guidance__copy strong {
  margin-bottom: 1px;
  color: #102a43;
  font-size: 12px;
  line-height: 1.3;
}

html .bnx-compact-guidance__copy span {
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.35;
}

/* Secondary history remains available without dominating the initial page. */
html .bnx-secondary-disclosure {
  margin: 0 0 14px;
  border: 1px solid #dbe6ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--bnx-concise-shadow);
  overflow: hidden;
}

html .bnx-secondary-disclosure > summary {
  min-height: 52px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  color: #102a43;
  background: #fbfdfe;
  user-select: none;
}

html .bnx-secondary-disclosure > summary::-webkit-details-marker { display: none; }
html .bnx-secondary-disclosure > summary::after {
  content: '\f107';
  font-family: FontAwesome;
  flex: 0 0 auto;
  color: #64748b;
  font-size: 14px;
  transition: transform .16s ease;
}
html .bnx-secondary-disclosure[open] > summary::after { transform: rotate(180deg); }
html .bnx-secondary-disclosure > summary > span {
  font-size: 13px;
  font-weight: 800;
}
html .bnx-secondary-disclosure > summary > small {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
html .bnx-secondary-disclosure__body {
  padding: 12px 14px 1px;
  border-top: 1px solid #edf2f7;
}
html .bnx-secondary-disclosure__body > :first-child {
  margin-top: 0 !important;
}
html .bnx-secondary-disclosure__body .case-panel,
html .bnx-secondary-disclosure__body .ecw-panel,
html .bnx-secondary-disclosure__body .ecp-panel,
html .bnx-secondary-disclosure__body .notify-panel {
  box-shadow: none !important;
}

/* Major dashboard/operations heroes --------------------------------------- */
html body :is(.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero) {
  padding: 16px 18px 15px !important;
  margin-bottom: 14px !important;
  border: 1px solid #dbe6ec !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg,#ffffff 0%,#f8fcfc 72%,#eefaf7 100%) !important;
  color: #102a43 !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}

html body :is(.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero)::before {
  opacity: .04 !important;
  transform: scale(.68);
  transform-origin: top right;
}

html body :is(.hero-title,.ops-hero-title,.votes-hero-title,.notify-hero-title,.ec-hero-title,.ecw-title,.ecp-hero h1,.audit-hero h1,.results-hero-title) {
  margin: 8px 0 4px !important;
  max-width: 1000px;
  color: #102a43 !important;
  font-size: clamp(24px,2.2vw,35px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em;
}

html body :is(.hero-description,.ops-hero-description,.votes-hero-description,.notify-hero-description,.ec-hero-description,.ecw-desc,.ecp-hero-description,.audit-hero p,.results-hero-description) {
  max-width: 760px !important;
  margin: 0 0 10px !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

html body :is(.hero-badge,.ops-pill,.ops-state-pill,.notify-live-pill,.ec-pill,.ec-status-pill,.ecw-pill,.ecw-status,.ecp-pill,.results-pill,.votes-pill) {
  padding: 5px 9px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

html body :is(.hero-meta,.ops-hero-metrics,.votes-hero-metrics,.ec-hero-metrics,.ecw-hero-metrics,.results-hero-metrics) {
  gap: 9px !important;
  margin: 9px 0 11px !important;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr)) !important;
}

html body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) {
  min-height: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: rgba(248,250,252,.86) !important;
  color: #334155 !important;
  box-shadow: none !important;
}

html body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) span {
  color: #64748b !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
html body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) strong {
  margin-top: 3px !important;
  color: #102a43 !important;
  font-size: 18px !important;
  line-height: 1.12 !important;
}
html body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) small {
  margin-top: 4px !important;
  color: #64748b !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
}

html body :is(.hero-actions,.ops-hero-actions,.votes-hero-actions,.notify-hero-actions,.ec-hero-actions,.ecw-actions,.ecp-hero-actions,.audit-hero-actions,.results-hero-actions) {
  gap: 7px !important;
}
html body :is(.hero-actions,.ops-hero-actions,.votes-hero-actions,.notify-hero-actions,.ec-hero-actions,.ecw-actions,.ecp-hero-actions,.audit-hero-actions,.results-hero-actions) .btn {
  min-height: 34px !important;
  padding: 7px 11px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

/* High-density dashboard cards and panels. */
html body :is(.dashboard-card,.ops-card,.notify-card,.votes-card,.ec-card,.ecw-card,.ecp-card,.results-card) {
  min-height: 0 !important;
  padding: 13px 15px 12px !important;
  border-radius: 14px !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}
html body :is(.dashboard-card-value,.ops-card strong,.notify-card strong,.votes-card strong,.ec-card strong,.ecw-card strong,.ecp-card strong,.results-card strong) {
  font-size: 25px !important;
  line-height: 1.05 !important;
}
html body :is(.dashboard-card-meta,.ops-card small,.notify-card small,.votes-card small,.ec-card small,.ecw-card small,.ecp-card small,.results-card small) {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

html body :is(.dashboard-panel,.ops-panel,.notify-panel,.votes-panel,.ec-panel,.ecw-panel,.ecp-panel,.results-panel,.case-panel,.report-panel) {
  padding: 15px 16px !important;
  margin-bottom: 14px !important;
  border-radius: 14px !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}
html body :is(.dashboard-panel-header,.ops-panel-header,.notify-panel-header,.votes-panel-header,.ec-panel-header,.ecw-head,.ecp-panel-header,.results-panel-header,.report-panel-header) {
  gap: 8px !important;
  margin-bottom: 11px !important;
}
html body :is(.dashboard-panel-title,.ops-panel-title,.notify-panel-title,.votes-panel-title,.ec-panel-title,.ecw-head h3,.ecp-panel-title,.results-panel-title,.case-panel-title,.report-panel-title) {
  font-size: 17px !important;
  line-height: 1.2 !important;
}
html body :is(.dashboard-panel-subtitle,.ops-panel-subtitle,.notify-panel-subtitle,.votes-panel-subtitle,.ec-panel-subtitle,.ecw-head p,.ecp-panel-subtitle,.results-panel-subtitle,.report-panel-subtitle) {
  max-width: 72ch;
  margin-top: 3px !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html body :is(.dashboard-card-grid,.ops-card-grid,.notify-card-grid,.ec-card-grid,.ecw-cards,.results-card-grid) {
  gap: 10px !important;
  margin-bottom: 14px !important;
}

html body :is(.ops-livebar,.notify-livebar,.votes-livebar,.ec-livebar,.ecw-bar,.results-livebar,.bnx-dashboard-guidance,.bnx-dashboard-viewbar,.ops-viewbar) {
  min-height: 0 !important;
  padding: 9px 11px !important;
  margin-bottom: 12px !important;
  border-radius: 13px !important;
  box-shadow: 0 4px 14px rgba(15,23,42,.03) !important;
}

html body .bnx-dashboard-guidance h3 {
  margin: 2px 0 2px !important;
  font-size: 15px !important;
}
html body .bnx-dashboard-guidance p,
html body .ops-view-hint {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

/* Tables stay readable but stop consuming unnecessary vertical space. */
html body :is(.mgmt-table,.dashboard-table,.ops-table,.notify-table,.votes-table,.ec-table,.ecw-table,.results-table,.table) thead th {
  padding: 9px 11px !important;
  font-size: 10.5px !important;
}
html body :is(.mgmt-table,.dashboard-table,.ops-table,.notify-table,.votes-table,.ec-table,.ecw-table,.results-table,.table) tbody td {
  padding: 10px 11px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

/* Public / voter / authentication surfaces: same content-density rule. */
html body :is(.entry-hero,.reg-hero,.selector-hero,.public-hero,.prc-hero,.report-hero,.verification-hero-panel,.counter-hero-panel,.ballot-hero,.ec-print-hero,.state-hero-copy) {
  padding: 18px !important;
  margin-bottom: 14px !important;
  border-radius: 16px !important;
}
html body :is(.entry-hero,.reg-hero,.selector-hero,.public-hero,.prc-hero,.report-hero,.verification-hero-panel,.counter-hero-panel,.ballot-hero,.ec-print-hero) :is(h1,h2,.ballot-hero-title) {
  font-size: clamp(24px,2.6vw,36px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em;
}
html body :is(.entry-hero,.reg-hero,.selector-hero,.public-hero,.prc-hero,.report-hero,.verification-hero-panel,.counter-hero-panel,.ballot-hero,.ec-print-hero) p {
  max-width: 72ch;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

/* Forms and action controls retain touch targets while reducing desktop bulk. */
html body .form-group { margin-bottom: 12px; }
html body .form-control:not(textarea) { min-height: 36px; }
html body textarea.form-control { min-height: 82px; }
html body .btn:not(.btn-lg) { min-height: 34px; }

/* Dark mode keeps the compact architecture but uses purpose-built dark surfaces. */
html.dark-mode body .content-wrapper,
html body.dark-mode.bnx-concise .content-wrapper {
  background: #071427 !important;
}
html.dark-mode body .mgmt-hero,
html body.dark-mode.bnx-concise .mgmt-hero,
html.dark-mode body :is(.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero),
html body.dark-mode.bnx-concise :is(.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero) {
  background: linear-gradient(145deg,#0b1f36 0%,#102f43 62%,#0f4945 100%) !important;
  border-color: rgba(125,170,255,.17) !important;
  color: #edf4ff !important;
  box-shadow: 0 14px 34px rgba(2,6,23,.34) !important;
}
html.dark-mode body :is(.mgmt-hero-title,.hero-title,.ops-hero-title,.votes-hero-title,.notify-hero-title,.ec-hero-title,.ecw-title,.ecp-hero h1,.audit-hero h1,.results-hero-title),
html body.dark-mode.bnx-concise :is(.mgmt-hero-title,.hero-title,.ops-hero-title,.votes-hero-title,.notify-hero-title,.ec-hero-title,.ecw-title,.ecp-hero h1,.audit-hero h1,.results-hero-title) {
  color: #f8fafc !important;
}
html.dark-mode body :is(.mgmt-hero-description,.hero-description,.ops-hero-description,.votes-hero-description,.notify-hero-description,.ec-hero-description,.ecw-desc,.ecp-hero-description,.audit-hero p,.results-hero-description),
html body.dark-mode.bnx-concise :is(.mgmt-hero-description,.hero-description,.ops-hero-description,.votes-hero-description,.notify-hero-description,.ec-hero-description,.ecw-desc,.ecp-hero-description,.audit-hero p,.results-hero-description) {
  color: #b8c9df !important;
}
html.dark-mode body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric),
html body.dark-mode.bnx-concise :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) {
  background: rgba(7,20,39,.46) !important;
  border-color: rgba(125,170,255,.14) !important;
}
html.dark-mode body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) strong,
html body.dark-mode.bnx-concise :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) strong {
  color: #f8fafc !important;
}
html.dark-mode body :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) :is(span,small),
html body.dark-mode.bnx-concise :is(.hero-meta-card,.ops-hero-metric,.votes-hero-metric,.ec-hero-metric,.ecw-metric,.results-hero-metric) :is(span,small) {
  color: #9eb2d7 !important;
}
html.dark-mode .bnx-compact-guidance,
html.dark-mode .bnx-secondary-disclosure,
html body.dark-mode .bnx-compact-guidance,
html body.dark-mode .bnx-secondary-disclosure {
  background: #0b1f36;
  border-color: rgba(125,170,255,.16);
  color: #dbeafe;
}
html.dark-mode .bnx-compact-guidance__copy strong,
html body.dark-mode .bnx-compact-guidance__copy strong,
html.dark-mode .bnx-secondary-disclosure > summary,
html body.dark-mode .bnx-secondary-disclosure > summary {
  color: #edf4ff;
}
html.dark-mode .bnx-compact-guidance__copy span,
html body.dark-mode .bnx-compact-guidance__copy span,
html.dark-mode .bnx-secondary-disclosure > summary > small,
html body.dark-mode .bnx-secondary-disclosure > summary > small {
  color: #9eb2d7;
}
html.dark-mode .bnx-secondary-disclosure > summary,
html body.dark-mode .bnx-secondary-disclosure > summary {
  background: #0d243e;
}
html.dark-mode .bnx-secondary-disclosure__body,
html body.dark-mode .bnx-secondary-disclosure__body {
  border-color: rgba(125,170,255,.12);
}

@media (max-width: 991px) {
  html body .content { padding: 12px 14px 22px; }
  html body .mgmt-hero,
  html body :is(.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero) {
    padding: 15px !important;
  }
}

@media (max-width: 767px) {
  html body .content { padding: 10px 11px 20px; }
  html body .content-header { padding: 10px 11px 0; }
  html body .mgmt-hero-title,
  html body :is(.hero-title,.ops-hero-title,.votes-hero-title,.notify-hero-title,.ec-hero-title,.ecw-title,.ecp-hero h1,.audit-hero h1,.results-hero-title) {
    font-size: 23px !important;
  }
  html body .mgmt-hero-description,
  html body :is(.hero-description,.ops-hero-description,.votes-hero-description,.notify-hero-description,.ec-hero-description,.ecw-desc,.results-hero-description) {
    font-size: 12.5px !important;
  }
  html body :is(.hero-meta,.ops-hero-metrics,.votes-hero-metrics,.ec-hero-metrics,.ecw-hero-metrics,.results-hero-metrics) {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  html body .mgmt-card-grid,
  html body :is(.ops-card-grid,.notify-card-grid,.ec-card-grid,.ecw-cards,.results-card-grid) {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  html .bnx-compact-guidance { align-items: flex-start; }
  html .bnx-compact-guidance > .mgmt-mini-pill { display: none; }
  html .bnx-secondary-disclosure > summary { align-items: flex-start; }
  html .bnx-secondary-disclosure > summary > small { display: none; }
}

@media (max-width: 520px) {
  html body :is(.hero-meta,.ops-hero-metrics,.votes-hero-metrics,.ec-hero-metrics,.ecw-hero-metrics,.results-hero-metrics),
  html body .mgmt-card-grid,
  html body :is(.ops-card-grid,.notify-card-grid,.ec-card-grid,.ecw-cards,.results-card-grid) {
    grid-template-columns: 1fr !important;
  }
}

/* v6.2.0 public verification keeps the lookup primary and history secondary. */
html body .verification-workspace-grid {
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}
html body .verification-main-stack { order: 1 !important; }
html body .verification-side-stack {
  order: 2 !important;
  position: static !important;
  top: auto !important;
  grid-template-columns: 1fr !important;
}
html body .verification-history-disclosure { margin-top: 0; }

/* v6.2.0 first-election onboarding is a compact setup surface, not a marketing hero. */
html body .ecw-onboarding {
  margin: 14px 0 !important;
  border-radius: 16px !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}
html body .ecw-onboarding-hero {
  padding: 18px 20px !important;
  background: linear-gradient(145deg,#ffffff 0%,#f5fbfc 62%,#eefaf6 100%) !important;
  color: #102a43 !important;
}
html body .ecw-onboarding-hero:after { opacity: .18 !important; background: #14b8a6 !important; }
html body .ecw-onboarding-icon {
  width: 38px !important; height: 38px !important; border-radius: 12px !important;
  margin-bottom: 10px !important; background: #e6f7f4 !important; color: #0f766e !important; font-size: 16px !important;
}
html body .ecw-onboarding-title {
  margin: 8px 0 6px !important; font-size: clamp(24px,2.4vw,34px) !important; color: #102a43 !important;
}
html body .ecw-onboarding-copy { color: #52647a !important; font-size: 13px !important; line-height: 1.5 !important; }
html body .ecw-onboarding-actions { margin-top: 13px !important; }
html body .ecw-onboarding-actions .btn { padding: 8px 13px !important; border-radius: 10px !important; font-size: 12px !important; }
html body .ecw-onboarding-body { padding: 16px 20px 18px !important; }
html body .ecw-onboarding-body h3 { font-size: 16px !important; }
html body .ecw-onboarding-body > p { margin-bottom: 12px !important; font-size: 12px !important; }
html body .ecw-steps { grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 8px !important; }
html body .ecw-step { padding: 12px !important; border-radius: 12px !important; }
html body .ecw-step-num { width: 24px !important; height: 24px !important; margin-bottom: 7px !important; }
html body .ecw-onboarding-note { margin-top: 10px !important; padding: 10px 12px !important; }
html.dark-mode body .ecw-onboarding-hero,
html body.dark-mode.bnx-concise .ecw-onboarding-hero {
  background: linear-gradient(145deg,#0b1f36 0%,#102f43 62%,#0f4945 100%) !important;
  color: #f8fafc !important;
}
html.dark-mode body .ecw-onboarding-title,
html body.dark-mode.bnx-concise .ecw-onboarding-title { color: #f8fafc !important; }
html.dark-mode body .ecw-onboarding-copy,
html body.dark-mode.bnx-concise .ecw-onboarding-copy { color: #b8c9df !important; }
@media (max-width: 900px) { html body .ecw-steps { grid-template-columns: repeat(2,minmax(0,1fr)) !important; } }
@media (max-width: 520px) { html body .ecw-steps { grid-template-columns: 1fr !important; } }

/* v6.2.0 Admin/EC utility heroes use neutral light-mode surfaces. */
html body :is(.prc-hero,.ec-print-hero,.report-hero) {
  padding: 16px 18px 15px !important;
  margin-bottom: 14px !important;
  border: 1px solid #dbe6ec !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg,#ffffff 0%,#f8fcfc 72%,#eefaf7 100%) !important;
  color: #102a43 !important;
  box-shadow: var(--bnx-concise-shadow) !important;
}
html body :is(.prc-hero,.ec-print-hero,.report-hero) :is(h1,h2,.ec-print-title) {
  margin: 8px 0 4px !important; color: #102a43 !important; font-size: clamp(24px,2.2vw,34px) !important; line-height: 1.12 !important;
}
html body :is(.prc-hero,.ec-print-hero,.report-hero) :is(p,.ec-print-desc) {
  max-width: 760px !important; margin-bottom: 10px !important; color: #64748b !important; font-size: 13px !important; line-height: 1.5 !important;
}
html body .prc-badge,
html body .ec-print-badge,
html body .ec-print-state {
  padding: 5px 9px !important; background: #f8fafc !important; border-color: #e2e8f0 !important; color: #475569 !important; font-size: 11px !important;
}
html body .prc-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 9px !important; margin-top: 10px !important; }
html body .prc-stat { padding: 10px 12px !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; background: #f8fafc !important; color: #334155 !important; }
html body .prc-stat :is(span,small) { color: #64748b !important; font-size: 10.5px !important; }
html body .prc-stat strong { margin-top: 4px !important; color: #102a43 !important; font-size: 18px !important; }
html body .prc-panel { padding: 15px 16px !important; margin-bottom: 14px !important; border-radius: 14px !important; box-shadow: var(--bnx-concise-shadow) !important; }
html body .prc-card { padding: 14px !important; border-radius: 14px !important; }
html body .prc-card h3 { font-size: 17px !important; }
html body .prc-card p { margin-top: 4px !important; font-size: 12px !important; line-height: 1.4 !important; }
html body .prc-meta-grid { gap: 8px !important; margin-top: 10px !important; }
html body .prc-meta-item { padding: 10px 11px !important; border-radius: 11px !important; }
html.dark-mode body :is(.prc-hero,.ec-print-hero,.report-hero),
html body.dark-mode.bnx-concise :is(.prc-hero,.ec-print-hero,.report-hero) {
  background: linear-gradient(145deg,#0b1f36 0%,#102f43 62%,#0f4945 100%) !important; color: #f8fafc !important; border-color: rgba(125,170,255,.17) !important;
}
html.dark-mode body :is(.prc-hero,.ec-print-hero,.report-hero) :is(h1,h2,.ec-print-title),
html body.dark-mode.bnx-concise :is(.prc-hero,.ec-print-hero,.report-hero) :is(h1,h2,.ec-print-title) { color: #f8fafc !important; }
html.dark-mode body :is(.prc-hero,.ec-print-hero,.report-hero) :is(p,.ec-print-desc),
html body.dark-mode.bnx-concise :is(.prc-hero,.ec-print-hero,.report-hero) :is(p,.ec-print-desc) { color: #b8c9df !important; }
@media (max-width: 767px) { html body .prc-summary-grid { grid-template-columns: 1fr !important; } }

/* --------------------------------------------------------------------------
   BallotNexus v6.2.3 — compact metric-card system
   Summary/KPI cards are scan surfaces, not full content panels. Keep their
   information hierarchy intact while removing unnecessary vertical bulk.
   -------------------------------------------------------------------------- */

/* Admin dashboard KPI cards: compact, balanced, and four-up on wide screens. */
html body #dashboardCardGrid {
  margin-right: -5px !important;
  margin-left: -5px !important;
}
html body #dashboardCardGrid > [data-dashboard-card-wrap] {
  padding-right: 5px !important;
  padding-left: 5px !important;
}
html body .dashboard-card {
  height: auto !important;
  min-height: 128px !important;
  padding: 12px 14px 11px !important;
  margin-bottom: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 13px !important;
}
html body .dashboard-card::before { width: 3px !important; }
html body .dashboard-card-top {
  gap: 8px !important;
  margin-bottom: 4px !important;
}
html body .dashboard-card-top i {
  width: 31px !important;
  height: 31px !important;
  flex: 0 0 31px !important;
  border-radius: 9px !important;
  font-size: 14px !important;
}
html body .dashboard-card-label {
  margin-bottom: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
html body .dashboard-card-value {
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1 !important;
}
html body .dashboard-card-meta {
  min-height: 0 !important;
  margin-top: 6px !important;
  font-size: 10.75px !important;
  line-height: 1.3 !important;
}
html body .dashboard-card-link {
  margin-top: auto !important;
  padding-top: 7px !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}

/* Management/setup metrics: these cards contain only label, value and context. */
html body .mgmt-card-grid {
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr)) !important;
  gap: 9px !important;
  margin-bottom: 12px !important;
}
html body .mgmt-card {
  min-height: 96px !important;
  padding: 11px 13px 10px !important;
  border-radius: 12px !important;
}
html body .mgmt-card::before { width: 3px !important; }
html body .mgmt-card-label {
  margin-bottom: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
html body .mgmt-card-value {
  margin-bottom: 5px !important;
  font-size: 24px !important;
  line-height: 1 !important;
}
html body .mgmt-card-meta {
  font-size: 10.5px !important;
  line-height: 1.28 !important;
}

/* Dynamic operational KPI grids use one compact geometry across modules. */
html body :is(.ops-card-grid,.notify-card-grid,.ec-card-grid,.ecw-cards,.ecp-card-grid,.results-card-grid) {
  grid-template-columns: repeat(auto-fit,minmax(165px,1fr)) !important;
  gap: 9px !important;
  margin-bottom: 12px !important;
}
html body :is(.ops-card,.notify-card,.votes-card,.ec-card,.ecw-card,.ecp-card,.results-card) {
  min-height: 98px !important;
  padding: 11px 13px 10px !important;
  border-radius: 12px !important;
}
html body :is(.ops-card,.notify-card,.votes-card,.ec-card,.ecw-card,.ecp-card,.results-card)::before {
  width: 3px !important;
}
html body :is(.ops-card,.notify-card,.ec-card,.ecw-card,.ecp-card) > span,
html body :is(.results-card-label,.votes-card-label) {
  margin-bottom: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
html body :is(.ops-card,.notify-card,.ec-card,.ecw-card,.ecp-card) > strong,
html body :is(.results-card-value,.votes-card-value) {
  margin-bottom: 5px !important;
  font-size: 24px !important;
  line-height: 1 !important;
}
html body :is(.ops-card,.notify-card,.ec-card,.ecw-card,.ecp-card) > small,
html body :is(.results-card-meta,.votes-card-meta) {
  min-height: 0 !important;
  font-size: 10.5px !important;
  line-height: 1.28 !important;
}
html body :is(.results-card-top,.votes-card-top) {
  gap: 8px !important;
  margin-bottom: 5px !important;
}
html body :is(.results-card-top,.votes-card-top) > i {
  width: 31px !important;
  height: 31px !important;
  flex: 0 0 31px !important;
  border-radius: 9px !important;
  font-size: 14px !important;
}

/* Newer directory/account metrics: move the icon out of the vertical flow. */
html body .bnx-metric-grid {
  gap: 9px !important;
  margin-bottom: 12px !important;
}
html body .bnx-metric-card {
  min-height: 108px !important;
  padding: 12px 13px 11px !important;
  border-radius: 12px !important;
}
html body .bnx-metric-icon {
  position: absolute !important;
  top: 11px !important;
  right: 11px !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}
html body .bnx-metric-label {
  max-width: calc(100% - 38px) !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
html body .bnx-metric-value {
  margin: 6px 0 5px !important;
  font-size: 25px !important;
  line-height: 1 !important;
}
html body .bnx-metric-meta {
  min-height: 0 !important;
  padding-right: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
}

/* Compact density becomes denser still, without shrinking tap targets. */
html.bnx-density-compact body .dashboard-card { min-height: 118px !important; padding: 10px 12px 9px !important; }
html.bnx-density-compact body .mgmt-card,
html.bnx-density-compact body :is(.ops-card,.notify-card,.votes-card,.ec-card,.ecw-card,.ecp-card,.results-card) {
  min-height: 90px !important;
  padding: 9px 11px !important;
}
html.bnx-density-compact body .bnx-metric-card { min-height: 100px !important; padding: 10px 11px !important; }

@media (max-width: 1199px) {
  html body .dashboard-card { min-height: 124px !important; }
}
@media (max-width: 767px) {
  html body #dashboardCardGrid { margin-right: -4px !important; margin-left: -4px !important; }
  html body #dashboardCardGrid > [data-dashboard-card-wrap] { padding-right: 4px !important; padding-left: 4px !important; }
  html body .dashboard-card { min-height: 118px !important; padding: 11px 12px 10px !important; }
  html body .mgmt-card-grid,
  html body :is(.ops-card-grid,.notify-card-grid,.ec-card-grid,.ecw-cards,.ecp-card-grid,.results-card-grid) {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 8px !important;
  }
  html body .bnx-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
}
@media (max-width: 520px) {
  html body .mgmt-card-grid,
  html body :is(.ops-card-grid,.notify-card-grid,.ec-card-grid,.ecw-cards,.ecp-card-grid,.results-card-grid),
  html body .bnx-metric-grid {
    grid-template-columns: 1fr !important;
  }
  html body .dashboard-card,
  html body .mgmt-card,
  html body :is(.ops-card,.notify-card,.votes-card,.ec-card,.ecw-card,.ecp-card,.results-card),
  html body .bnx-metric-card {
    min-height: 0 !important;
  }
}


/* --------------------------------------------------------------------------
   BallotNexus v6.2.4 - workspace ergonomics and dense data views
   The v6.2.3 metric-card pass reduced dashboard bulk. This layer continues the
   same density rule through panel headers, filter/tool bars, tables, row
   actions, pagination and empty states without hiding workflow controls.
   -------------------------------------------------------------------------- */

html {
  --bnx-data-control-height: 34px;
  --bnx-data-radius: 11px;
  --bnx-data-gap: 8px;
  --bnx-data-row-y: 8px;
  --bnx-data-row-x: 10px;
}

/* Do not wait for JavaScript to suppress the duplicate legacy page heading
   when a local workspace hero is already present. Modern browsers apply this
   before first paint; the existing runtime class remains the compatibility
   fallback. */
@supports selector(.content-wrapper:has(.mgmt-hero)) {
  html body .content-wrapper:has(.mgmt-hero,.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero,.report-hero,.prc-hero,.ec-print-hero) > .content-header,
  html body .bnx-shell-canvas:has(.mgmt-hero,.dashboard-hero,.ops-hero,.votes-hero,.notify-hero,.ec-hero,.ecw-hero,.ecp-hero,.audit-hero,.results-hero,.report-hero,.prc-hero,.ec-print-hero) > .content-header {
    display: none !important;
  }
}

/* Workspace panel headers should introduce the data, not dominate it. */
html body .bnx-workspace-panel__header {
  gap: 12px !important;
  padding: 14px 16px 11px !important;
}
html body .bnx-workspace-panel__header h2 {
  margin: 1px 0 2px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}
html body .bnx-workspace-panel__header p {
  max-width: 70ch !important;
  font-size: 11.25px !important;
  line-height: 1.4 !important;
}
html body .bnx-result-count,
html body :is(.mgmt-toolbar-meta,.report-pill,.audit-pill) {
  min-height: 26px !important;
  padding: 4px 8px !important;
  font-size: 9.75px !important;
  line-height: 1.2 !important;
}

/* Search/filter/action bars use one compact operational geometry. */
html body .bnx-directory-toolbar {
  gap: var(--bnx-data-gap) !important;
  padding: 9px 14px !important;
}
html body .bnx-directory-search {
  width: min(360px,100%) !important;
}
html body .bnx-directory-search > i {
  left: 11px !important;
  font-size: 12px !important;
}
html body .bnx-directory-search .form-control {
  height: var(--bnx-data-control-height) !important;
  min-height: var(--bnx-data-control-height) !important;
  padding: 5px 10px 5px 31px !important;
  border-radius: var(--bnx-data-radius) !important;
  font-size: 11.5px !important;
}
html body .bnx-directory-filters {
  gap: 6px !important;
}
html body .bnx-directory-filters .form-control,
html body .bnx-filter-reset {
  height: var(--bnx-data-control-height) !important;
  min-height: var(--bnx-data-control-height) !important;
  min-width: 132px !important;
  padding: 5px 9px !important;
  border-radius: var(--bnx-data-radius) !important;
  font-size: 11.25px !important;
}
html body .bnx-filter-reset {
  min-width: 0 !important;
}

html body :is(.mgmt-toolbar,.verify-toolbar,.audit-toolbar,.report-toolbar,.ecp-toolbar,.access-search-toolbar,.access-print-console-toolbar,.notify-inbox-tools) {
  gap: 7px !important;
}
html body :is(.mgmt-toolbar,.audit-toolbar,.report-toolbar,.access-print-console-toolbar) {
  padding: 9px 11px !important;
  margin-bottom: 11px !important;
  border-radius: 12px !important;
}
html body .access-search-toolbar,
html body .verify-toolbar,
html body .ecp-toolbar {
  margin-bottom: 11px !important;
}
html body :is(.mgmt-toolbar,.verify-toolbar,.audit-toolbar,.report-toolbar,.ecp-toolbar,.access-search-toolbar,.access-print-console-toolbar) :is(.form-control,.btn) {
  min-height: var(--bnx-data-control-height) !important;
  height: auto;
  border-radius: var(--bnx-data-radius) !important;
  font-size: 11.25px !important;
}
html body :is(.mgmt-toolbar,.verify-toolbar,.audit-toolbar,.report-toolbar,.ecp-toolbar,.access-search-toolbar,.access-print-console-toolbar) .form-control:not(textarea) {
  height: var(--bnx-data-control-height) !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}
html body :is(.mgmt-toolbar,.verify-toolbar,.audit-toolbar,.report-toolbar,.ecp-toolbar,.access-search-toolbar,.access-print-console-toolbar) .btn {
  padding: 5px 9px !important;
}

/* Report/audit filters were among the last large form surfaces. */
html body :is(.report-filter,.audit-panel) {
  border-radius: 14px !important;
}
html body .report-filter {
  padding: 13px 15px 11px !important;
  margin-bottom: 13px !important;
}
html body :is(.report-filter-grid,.audit-filter-grid) {
  gap: 9px !important;
}
html body :is(.report-filter,.audit-filter-grid) .form-group {
  margin-bottom: 6px !important;
}
html body :is(.report-filter,.audit-filter-grid) label {
  margin-bottom: 4px !important;
  font-size: 9.75px !important;
  line-height: 1.2 !important;
}
html body :is(.report-filter,.audit-filter-grid) .form-control {
  height: 34px !important;
  min-height: 34px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 11.25px !important;
}
html body :is(.report-filter,.audit-panel) :is(.report-actions,.audit-filter-actions) {
  gap: 7px !important;
  margin-top: 8px !important;
}

/* Remaining report/audit summary cards join the compact metric hierarchy. */
html body :is(.report-card-grid,.audit-kpi-grid) {
  grid-template-columns: repeat(auto-fit,minmax(165px,1fr)) !important;
  gap: 9px !important;
  margin-bottom: 12px !important;
}
html body :is(.report-card,.audit-kpi) {
  min-height: 98px !important;
  padding: 11px 13px 10px !important;
  border-radius: 12px !important;
}
html body .report-card::before { width: 3px !important; }
html body :is(.report-card,.audit-kpi) > span {
  margin-bottom: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
html body :is(.report-card,.audit-kpi) > strong {
  margin-bottom: 5px !important;
  font-size: 24px !important;
  line-height: 1 !important;
}
html body :is(.report-card,.audit-kpi) > small {
  margin-top: 0 !important;
  font-size: 10.5px !important;
  line-height: 1.28 !important;
}

/* Dense tables: more rows in view while retaining readable identity/status
   hierarchy. The scroll wrapper gets JS-driven edge cues when more columns are
   available horizontally. */
html body :is(.bnx-table-wrap,.mgmt-table-wrap,.ops-table-wrap,.notify-table-wrap,.votes-table-wrap,.ec-table-wrap,.ecp-table-wrap,.results-table-wrap,.report-table-wrap,.audit-table-wrap,.case-table-wrap,.access-table-wrap,.table-responsive,.bnx-table-scroll) {
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
  transition: box-shadow .16s ease;
}
html body .bnx-scrollable-table.bnx-has-horizontal-overflow:not(.bnx-at-scroll-end) {
  box-shadow: inset -16px 0 16px -18px rgba(15,23,42,.38) !important;
}
html body .bnx-scrollable-table.bnx-has-horizontal-overflow:not(.bnx-at-scroll-start):not(.bnx-at-scroll-end) {
  box-shadow: inset 16px 0 16px -18px rgba(15,23,42,.22), inset -16px 0 16px -18px rgba(15,23,42,.38) !important;
}
html body .bnx-scrollable-table.bnx-has-horizontal-overflow.bnx-at-scroll-end:not(.bnx-at-scroll-start) {
  box-shadow: inset 16px 0 16px -18px rgba(15,23,42,.22) !important;
}

html body :is(.bnx-directory-table,.mgmt-table,.dashboard-table,.ops-table,.notify-table,.votes-table,.ec-table,.ecw-table,.ecp-table,.results-table,.report-table,.audit-table,.case-table,.table) > thead > tr > th,
html body :is(.bnx-directory-table,.mgmt-table,.dashboard-table,.ops-table,.notify-table,.votes-table,.ec-table,.ecw-table,.ecp-table,.results-table,.report-table,.audit-table,.case-table,.table) thead th {
  padding: 8px 9px !important;
  font-size: 9.75px !important;
  line-height: 1.25 !important;
  letter-spacing: .045em !important;
}
html body :is(.bnx-directory-table,.mgmt-table,.dashboard-table,.ops-table,.notify-table,.votes-table,.ec-table,.ecw-table,.ecp-table,.results-table,.report-table,.audit-table,.case-table,.table) > tbody > tr > td,
html body :is(.bnx-directory-table,.mgmt-table,.dashboard-table,.ops-table,.notify-table,.votes-table,.ec-table,.ecw-table,.ecp-table,.results-table,.report-table,.audit-table,.case-table,.table) tbody td {
  padding: var(--bnx-data-row-y) var(--bnx-data-row-x) !important;
  font-size: 11.5px !important;
  line-height: 1.32 !important;
}
html body :is(.mgmt-main-line,.audit-main-line,.ec-main-line,.notify-main-line,.bnx-inline-label) {
  line-height: 1.25 !important;
}
html body :is(.mgmt-sub-line,.audit-sub-line,.ec-sub-line,.notify-sub-line,.bnx-cell-meta,.bnx-cell-date) {
  margin-top: 2px !important;
  font-size: 10px !important;
  line-height: 1.28 !important;
}
html body .bnx-identity-mark,
html body .mgmt-photo {
  width: 32px !important;
  height: 32px !important;
  flex-basis: 32px !important;
  border-radius: 9px !important;
}
html body .bnx-identity-cell {
  gap: 8px !important;
}

/* Row tools are commands, not full-sized call-to-action buttons. */
html body :is(.mgmt-row-actions,.bnx-row-actions,.access-row-actions,.case-actions,.report-actions,.ecp-actions) {
  gap: 4px !important;
}
html body :is(.mgmt-row-actions,.bnx-row-actions,.access-row-actions,.case-actions,.ecp-actions) .btn {
  min-height: 30px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}
html body :is(.mgmt-row-actions,.bnx-row-actions,.access-row-actions,.case-actions) form {
  margin: 0 !important;
}

/* DataTables chrome should not create a second oversized toolbar. */
html body .dataTables_wrapper > .row:first-child,
html body .dataTables_wrapper > .row:last-child {
  margin: 0 !important;
  padding: 7px 9px !important;
}
html body .dataTables_wrapper :is(.dataTables_length,.dataTables_filter,.dataTables_info) {
  margin: 0 !important;
  padding: 0 !important;
  color: #64748b !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
}
html body .dataTables_wrapper :is(.dataTables_filter input,.dataTables_length select) {
  height: 32px !important;
  min-height: 32px !important;
  padding: 4px 8px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}
html body .dataTables_wrapper .pagination {
  margin: 0 !important;
}
html body .dataTables_wrapper .pagination > li > :is(a,span) {
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 10.5px !important;
}

/* Empty states should explain the next move without becoming half a page. */
html body :is(.bnx-empty-state,.mgmt-empty,.verify-empty,.access-empty,.case-empty,.report-empty,.audit-empty,.ops-empty,.votes-empty,.notify-empty,.ec-empty,.ecw-empty,.ecp-empty,.public-empty,.position-empty,.selector-empty,.dashboard-table-empty) {
  margin-top: 18px !important;
  margin-bottom: 20px !important;
  padding: 16px 13px !important;
  border-radius: 12px !important;
  font-size: 11.25px !important;
  line-height: 1.4 !important;
}
html body :is(.bnx-empty-state__icon,.audit-empty i,.report-empty i) {
  width: 40px !important;
  height: 40px !important;
  margin-bottom: 8px !important;
  border-radius: 11px !important;
  font-size: 15px !important;
}
html body .bnx-empty-state h3 {
  margin-bottom: 4px !important;
  font-size: 15px !important;
}
html body .bnx-empty-state p {
  margin-bottom: 9px !important;
  font-size: 10.75px !important;
  line-height: 1.4 !important;
}

/* Compact panel headings for the remaining specialized workspaces. */
html body :is(.audit-panel,.report-panel) {
  padding: 14px 15px !important;
  margin-bottom: 13px !important;
  border-radius: 14px !important;
}
html body :is(.audit-panel-header,.report-panel-header,.verification-modern-card > header) {
  gap: 7px !important;
  margin-bottom: 9px !important;
}
html body :is(.audit-panel-title,.report-panel-title) {
  font-size: 16px !important;
  line-height: 1.2 !important;
}
html body :is(.audit-panel-subtitle,.report-panel-subtitle) {
  margin-top: 2px !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

/* Dark-mode scroll cues remain subtle. */
html.dark-mode body .bnx-scrollable-table.bnx-has-horizontal-overflow:not(.bnx-at-scroll-end),
html body.dark-mode .bnx-scrollable-table.bnx-has-horizontal-overflow:not(.bnx-at-scroll-end) {
  box-shadow: inset -16px 0 16px -18px rgba(148,163,184,.42) !important;
}
html.dark-mode body .bnx-scrollable-table.bnx-has-horizontal-overflow:not(.bnx-at-scroll-start):not(.bnx-at-scroll-end),
html body.dark-mode .bnx-scrollable-table.bnx-has-horizontal-overflow:not(.bnx-at-scroll-start):not(.bnx-at-scroll-end) {
  box-shadow: inset 16px 0 16px -18px rgba(148,163,184,.26), inset -16px 0 16px -18px rgba(148,163,184,.42) !important;
}

@media (max-width: 991px) {
  html body .bnx-directory-toolbar { align-items: stretch !important; }
  html body .bnx-directory-search { width: 100% !important; max-width: none !important; }
  html body :is(.report-filter-grid,.audit-filter-grid) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

@media (max-width: 767px) {
  html { --bnx-data-row-y: 8px; --bnx-data-row-x: 0px; }
  html body .bnx-workspace-panel__header { padding: 13px 14px 10px !important; }
  html body .bnx-directory-toolbar { padding: 9px 12px !important; }
  html body .bnx-directory-filters { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  html body .bnx-directory-filters .form-control,
  html body .bnx-filter-reset { width: 100% !important; min-width: 0 !important; }
  html body :is(.report-filter-grid,.audit-filter-grid) { grid-template-columns: 1fr !important; }

  /* Mobile row actions remain proper touch targets even though desktop rows are
     denser. */
  html body :is(.mgmt-row-actions,.bnx-row-actions,.access-row-actions,.case-actions,.ecp-actions) .btn {
    min-height: 36px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
  }

  /* Existing card-table transforms own their cell layout on phones. */
  html body .bnx-directory-table > tbody > tr > td,
  html body .ecp-table tbody td,
  html body .notify-table-wrap:not(.is-empty) .notify-table td {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
}

@media (max-width: 520px) {
  html body .bnx-directory-filters { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   BallotNexus v6.2.5 - navigation and state clarity
   Compact the persistent application chrome and make page/action state easier
   to scan without reducing touch targets on phones or hiding workflow controls.
   ========================================================================== */
:root {
  --bnx-shell-sidebar: 228px;
  --bnx-shell-sidebar-collapsed: 60px;
  --bnx-shell-header: 60px;
  --bnx-shell-footer: 42px;
  --bnx-shell-gutter: 22px;
  --bnx-shell-control: 36px;
}

/* Header: keep workspace context readable while reclaiming vertical space. */
html body.sidebar-mini .main-header .logo {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
html body.sidebar-mini .main-header .logo .brand-text {
  font-size: 14px !important;
  letter-spacing: .04em !important;
}
html body.sidebar-mini .main-header .navbar .sidebar-toggle {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  margin-left: 6px !important;
  margin-right: 4px !important;
  border-radius: 10px !important;
}
html body .bnx-header-context {
  padding-left: 5px !important;
  padding-right: 5px !important;
}
html body .bnx-header-context-icon {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-radius: 10px !important;
}
html body .bnx-header-context-label {
  font-size: 8.75px !important;
  line-height: 1.15 !important;
  letter-spacing: .045em !important;
}
html body .bnx-header-context-main strong {
  font-size: 12.25px !important;
  line-height: 1.25 !important;
}
html body .bnx-header-context-org,
html body .bnx-header-state {
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}
html body .admin-modern-header .navbar-custom-menu {
  padding-left: 6px !important;
  padding-right: 10px !important;
}
html body .admin-modern-header .bnx-header-command,
html body .admin-modern-header .bnx-header-icon,
html body .admin-modern-header .theme-toggle-btn,
html body .admin-modern-header .header-quick > a,
html body .admin-modern-header .header-user-trigger {
  min-height: var(--bnx-shell-control) !important;
  height: var(--bnx-shell-control) !important;
  border-radius: 10px !important;
}
html body .bnx-header-command {
  min-width: 144px !important;
  padding-left: 10px !important;
  padding-right: 7px !important;
  gap: 7px !important;
  font-size: 11.5px !important;
}
html body .bnx-header-icon {
  width: var(--bnx-shell-control) !important;
  min-width: var(--bnx-shell-control) !important;
}
html body .admin-modern-header .header-user-trigger .user-image {
  width: 28px !important;
  height: 28px !important;
}

/* Sidebar: context remains visible, but navigation gets more of the viewport. */
html body.sidebar-mini .main-sidebar > .sidebar,
html body.sidebar-mini .left-side > .sidebar {
  padding: 10px 10px 58px !important;
}
html body .sidebar-search-wrap {
  margin-bottom: 8px !important;
}
html body .sidebar-search-wrap .form-control,
html body .sidebar-search-wrap input {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
}
html body .sidebar-widget.sidebar-election-widget {
  margin-bottom: 10px !important;
  padding: 10px !important;
  border-radius: 12px !important;
}
html body .sidebar-widget-title {
  font-size: 9.25px !important;
  line-height: 1.25 !important;
}
html body .sidebar-widget-subtext {
  margin: 6px 0 6px !important;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 10.25px !important;
  line-height: 1.35 !important;
}
html body .sidebar-countdown-label {
  font-size: 9px !important;
  line-height: 1.3 !important;
  letter-spacing: .035em !important;
}
html body .sidebar-election-widget .sidebar-countdown {
  margin-top: 3px !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
}
html body .bnx-ec-scope-summary {
  gap: 4px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
}
html body .bnx-ec-scope-summary > div {
  gap: 6px !important;
}
html body .bnx-ec-scope-summary span,
html body .bnx-ec-scope-summary strong {
  font-size: 9.75px !important;
  line-height: 1.3 !important;
}
html body .bnx-ec-switch-hint {
  margin-top: 6px !important;
  font-size: 9.5px !important;
  line-height: 1.35 !important;
}
html body .main-sidebar .sidebar-menu > li.header {
  padding: 10px 8px 4px !important;
  font-size: 9px !important;
  letter-spacing: .08em !important;
}
html body .main-sidebar .sidebar-menu > li:not(.header) > a,
html body .enhanced-sidebar-menu > .menu-group > a,
html body .enhanced-sidebar-menu .treeview-menu > li > a {
  min-height: 36px !important;
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}
html body .main-sidebar .sidebar-menu > li.active > a::after,
html body .enhanced-sidebar-menu > li.active > a::after,
html body .enhanced-sidebar-menu > .menu-group.active > a::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 9px;
  width: 5px;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34,211,238,.09);
}
html body .bnx-sidebar-utility {
  gap: 6px !important;
  margin-top: 5px !important;
  padding-top: 7px !important;
}
html body .bnx-sidebar-utility button {
  min-height: 34px !important;
  padding: 6px 6px !important;
  gap: 6px !important;
  font-size: 10px !important;
}

/* Page title/breadcrumb rhythm: less chrome before the actual task. */
html body .content-header {
  padding-top: 20px !important;
  padding-bottom: 6px !important;
}
html body .content {
  padding-top: 8px !important;
  padding-bottom: 24px !important;
}
html body .content-header > h1,
html body .admin-dashboard-shell .content-header > h1 {
  font-size: clamp(22px,1.8vw,28px) !important;
  line-height: 1.16 !important;
}
html body .content-header > .breadcrumb {
  padding: 0 !important;
  color: #64748b !important;
  background: transparent !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}
html body .content-header > .breadcrumb > li > a {
  color: #64748b !important;
}
html body .content-header > .breadcrumb > li > a:hover,
html body .content-header > .breadcrumb > li > a:focus-visible {
  color: #0f766e !important;
  outline: none !important;
}

/* Action hierarchy and tab controls should read as compact commands. */
html body :is(.bnx-page-actions,.mgmt-hero-actions,.ops-hero-actions,.notify-hero-actions,.votes-hero-actions,.results-hero-actions,.dashboard-commandbar-right) .btn {
  min-height: 34px !important;
  padding: 5px 10px !important;
  border-radius: 9px !important;
  font-size: 10.75px !important;
}
html body .ops-viewbar {
  margin-bottom: 13px !important;
  padding: 6px !important;
  border-radius: 12px !important;
}
html body .ops-view-tab {
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 9px !important;
  font-size: 10.5px !important;
}
html body .ops-view-hint {
  font-size: 10.5px !important;
}

/* Feedback is important but should not become a second content panel. */
html body .alert {
  margin-bottom: 12px !important;
  padding: 9px 11px !important;
  border-radius: 10px !important;
  font-size: 11.25px !important;
  line-height: 1.4 !important;
}
html body :is(a,button,.btn,[role="button"]).focus-visible,
html body :is(a,button,.btn,[role="button"]):focus-visible {
  outline: 2px solid rgba(13,148,136,.42) !important;
  outline-offset: 2px !important;
}

/* Footer: retain live/system status but progressively remove duplicate prose. */
html body.sidebar-mini .main-footer,
html body.sidebar-mini .modern-footer {
  padding-left: 16px !important;
  padding-right: 16px !important;
  gap: 12px !important;
}
html body .modern-footer .footer-left,
html body .modern-footer .footer-right {
  gap: 7px !important;
  font-size: 10.75px !important;
}
html body .bnx-footer-version {
  padding: 2px 6px !important;
  font-size: 9px !important;
}
html body .modern-footer .footer-divider {
  height: 14px !important;
}

@media (max-width: 1399px) and (min-width: 768px) {
  :root {
    --bnx-shell-sidebar: 220px;
    --bnx-shell-gutter: 20px;
  }
  html body .modern-footer .footer-copy,
  html body .modern-footer .footer-context {
    display: none !important;
  }
  html body .bnx-header-command {
    min-width: 126px !important;
  }
  html body .bnx-header-context-main strong {
    max-width: 250px !important;
  }
}

@media (max-width: 1199px) and (min-width: 768px) {
  :root {
    --bnx-shell-sidebar: 216px;
    --bnx-shell-gutter: 18px;
  }
  html body .modern-footer .bnx-footer-shortcut,
  html body .modern-footer .footer-security,
  html body .modern-footer .footer-divider:nth-last-of-type(-n+2) {
    display: none !important;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  :root {
    --bnx-shell-sidebar: 208px;
    --bnx-shell-gutter: 16px;
  }
  html body .content-header {
    padding-top: 17px !important;
  }
  html body .bnx-header-context-main strong {
    max-width: 170px !important;
  }
}

@media (max-width: 767px) {
  :root {
    --bnx-shell-header: 60px;
    --bnx-shell-footer: 42px;
    --bnx-shell-gutter: 14px;
  }
  html body.sidebar-mini .main-sidebar,
  html body.sidebar-mini .left-side {
    width: min(84vw,286px) !important;
  }
  html body.sidebar-mini .main-sidebar > .sidebar,
  html body.sidebar-mini .left-side > .sidebar {
    padding: 10px 10px 56px !important;
  }
  html body .content-header {
    padding-top: 15px !important;
    padding-bottom: 5px !important;
  }
  html body .content {
    padding-top: 7px !important;
    padding-bottom: 20px !important;
  }
  html body .content-header > h1,
  html body .admin-dashboard-shell .content-header > h1 {
    font-size: 22px !important;
  }
  html body :is(.bnx-page-actions,.mgmt-hero-actions,.ops-hero-actions,.notify-hero-actions,.votes-hero-actions,.results-hero-actions) .btn {
    min-height: 38px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 480px) {
  :root { --bnx-shell-gutter: 12px; }
}


/* ==========================================================================
   BallotNexus v6.2.6 - collapsed rail, adaptive workspace and footer parity
   One geometry authority for expanded/collapsed desktop shells. The compact
   rail must expand the work canvas and footer together, never duplicate the
   brand mark, and keep navigation discoverable without restoring bulky labels.
   ========================================================================== */

/* Smooth only shell geometry that changes after an explicit user action. */
@media (min-width: 768px) {
  html body.sidebar-mini .main-header .logo,
  html body.sidebar-mini .main-header .navbar,
  html body.sidebar-mini .main-sidebar,
  html body.sidebar-mini .left-side,
  html body.sidebar-mini .content-wrapper,
  html body.sidebar-mini .right-side,
  html body.sidebar-mini .main-footer,
  html body.sidebar-mini .modern-footer {
    transition: left .18s ease, width .18s ease, margin-left .18s ease, padding .18s ease !important;
  }

  /* Persisted compact preference participates in first paint; sidebar-collapse
     takes over as soon as the shell runtime initializes. */
  html.bnx-sidebar-pref-compact body.sidebar-mini,
  html body.sidebar-mini.sidebar-collapse {
    --bnx-shell-sidebar-collapsed: 60px;
    --bnx-shell-content-max: 1760px;
    --bnx-shell-gutter: 18px;
  }

  html.bnx-sidebar-pref-compact body.sidebar-mini .main-header .logo,
  html body.sidebar-mini.sidebar-collapse .main-header .logo {
    width: var(--bnx-shell-sidebar-collapsed) !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-header .logo .logo-lg,
  html body.sidebar-mini.sidebar-collapse .main-header .logo .logo-lg {
    display: none !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-header .logo .logo-mini,
  html body.sidebar-mini.sidebar-collapse .main-header .logo .logo-mini {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-header .logo .logo-mini .bnx-brand-logo,
  html body.sidebar-mini.sidebar-collapse .main-header .logo .logo-mini .bnx-brand-logo {
    width: 29px !important;
    height: 29px !important;
    flex-basis: 29px !important;
  }

  html.bnx-sidebar-pref-compact body.sidebar-mini .main-header .navbar,
  html body.sidebar-mini.sidebar-collapse .main-header .navbar {
    left: var(--bnx-shell-sidebar-collapsed) !important;
    margin-left: 0 !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar,
  html.bnx-sidebar-pref-compact body.sidebar-mini .left-side,
  html body.sidebar-mini.sidebar-collapse .main-sidebar,
  html body.sidebar-mini.sidebar-collapse .left-side {
    width: var(--bnx-shell-sidebar-collapsed) !important;
    transform: none !important;
    overflow: visible !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .content-wrapper,
  html.bnx-sidebar-pref-compact body.sidebar-mini .right-side,
  html body.sidebar-mini.sidebar-collapse .content-wrapper,
  html body.sidebar-mini.sidebar-collapse .right-side {
    margin-left: var(--bnx-shell-sidebar-collapsed) !important;
    width: auto !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-footer,
  html.bnx-sidebar-pref-compact body.sidebar-mini .modern-footer,
  html body.sidebar-mini.sidebar-collapse .main-footer,
  html body.sidebar-mini.sidebar-collapse .modern-footer {
    left: var(--bnx-shell-sidebar-collapsed) !important;
    right: 0 !important;
    width: auto !important;
    margin-left: 0 !important;
    transform: none !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar > .sidebar,
  html body.sidebar-mini.sidebar-collapse .main-sidebar > .sidebar {
    padding: 8px 7px 54px !important;
    overflow: visible !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar :is(.sidebar-search-wrap,.sidebar-search-empty,.sidebar-widget,.sidebar-menu > li.header),
  html body.sidebar-mini.sidebar-collapse .main-sidebar :is(.sidebar-search-wrap,.sidebar-search-empty,.sidebar-widget,.sidebar-menu > li.header) {
    display: none !important;
  }

  /* Compact rail links are centered touch/click targets. Flat links use a
     BallotNexus tooltip; tree groups retain AdminLTE's submenu flyout behavior. */
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar .sidebar-menu > li:not(.header):not(.treeview) > a,
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.header):not(.treeview) > a {
    position: relative !important;
    width: 44px !important;
    min-width: 44px !important;
    min-height: 38px !important;
    margin: 2px auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    border-radius: 10px !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar .sidebar-menu > li:not(.header):not(.treeview) > a > span,
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.header):not(.treeview) > a > span,
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar .sidebar-menu > li:not(.header):not(.treeview) > a > .pull-right-container,
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.header):not(.treeview) > a > .pull-right-container {
    display: none !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar .sidebar-menu > li:not(.header) > a > i,
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.header) > a > i,
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar .sidebar-menu > li:not(.header) > a > .fa,
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.header) > a > .fa {
    width: auto !important;
    margin: 0 !important;
    font-size: 14px !important;
    text-align: center !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .main-sidebar .sidebar-menu > li.active:not(.treeview) > a::after,
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li.active:not(.treeview) > a::after {
    right: 2px !important;
    width: 5px !important;
    height: 5px !important;
  }

  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.treeview) > a[data-bnx-rail-label]::before {
    content: attr(data-bnx-rail-label);
    position: absolute;
    left: calc(100% + 9px);
    top: 50%;
    z-index: 1105;
    transform: translate(4px,-50%);
    max-width: 210px;
    padding: 6px 9px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 8px;
    color: #f8fafc;
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(2,6,23,.22);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
  }
  html body.sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:not(.treeview) > a[data-bnx-rail-label]:is(:hover,:focus-visible)::before {
    opacity: 1;
    visibility: visible;
    transform: translate(0,-50%);
  }

  html.bnx-sidebar-pref-compact body.sidebar-mini .bnx-sidebar-utility,
  html body.sidebar-mini.sidebar-collapse .bnx-sidebar-utility {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    margin: 6px 0 0 !important;
    padding: 6px 0 0 !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .bnx-sidebar-utility button,
  html body.sidebar-mini.sidebar-collapse .bnx-sidebar-utility button {
    width: 44px !important;
    min-width: 44px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }
  html.bnx-sidebar-pref-compact body.sidebar-mini .bnx-sidebar-utility button span,
  html body.sidebar-mini.sidebar-collapse .bnx-sidebar-utility button span {
    display: none !important;
  }

  /* Footer rebalances immediately with the rail. Prevent legacy 50px margin
     rules from leaving the dock detached from the content canvas. */
  html body.sidebar-mini.sidebar-collapse .modern-footer .footer-left,
  html body.sidebar-mini.sidebar-collapse .modern-footer .footer-right {
    min-width: 0 !important;
  }
  html body.sidebar-mini.sidebar-collapse .modern-footer .footer-left {
    flex: 1 1 auto !important;
  }
  html body.sidebar-mini.sidebar-collapse .modern-footer .footer-right {
    flex: 0 1 auto !important;
    justify-content: flex-end !important;
  }
}

/* Notifications are a primary working queue. A short watchlist must not leave
   half of a tall priority inbox as empty page background. */
html body .notify-primary-row > .col-lg-7,
html body .notify-primary-row > .col-lg-5 {
  width: 100% !important;
  float: none !important;
}
html body .notify-primary-row .notify-panel {
  margin-bottom: 10px !important;
}
html body .notify-primary-row > .col-lg-5 .notify-panel {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
html body .notify-list {
  gap: 8px !important;
}
html body .notify-item {
  padding: 10px 12px !important;
  gap: 10px !important;
  border-radius: 12px !important;
  align-items: center !important;
}
html body .notify-item-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
html body .notify-item h4 {
  margin-bottom: 3px !important;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
}
html body .notify-item p {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}
html body .notify-item-meta {
  gap: 5px !important;
  margin-top: 6px !important;
}
html body :is(.notify-severity-pill,.notify-mini-pill,.notify-ack-badge) {
  padding: 4px 7px !important;
  gap: 5px !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}
html body .notify-item-actions {
  flex: 0 0 auto !important;
}
html body .notify-ack-btn {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 9px !important;
  font-size: 10.5px !important;
}
html body .notify-ack-btn.btn-primary {
  background: #0f766e !important;
  border-color: #0f766e !important;
  box-shadow: none !important;
}

/* Explicit dark notification contrast wins over older page-local gradients. */
html.dark-mode body .notify-item,
html body.dark-mode .notify-item {
  color: #dbe7f5 !important;
  background: #10254a !important;
  border-color: rgba(125,170,255,.22) !important;
}
html.dark-mode body .notify-item h4,
html.dark-mode body .notify-main-line,
html body.dark-mode .notify-item h4,
html body.dark-mode .notify-main-line {
  color: #f8fbff !important;
}
html.dark-mode body .notify-item p,
html.dark-mode body .notify-sub-line,
html body.dark-mode .notify-item p,
html body.dark-mode .notify-sub-line {
  color: #c2d0e4 !important;
}
html.dark-mode body .notify-ack-btn.btn-primary,
html body.dark-mode .notify-ack-btn.btn-primary {
  color: #052e2b !important;
  background: #5eead4 !important;
  border-color: #5eead4 !important;
}

@media (max-width: 767px) {
  html body .notify-item {
    align-items: stretch !important;
    padding: 11px !important;
  }
  html body .notify-item-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }
  html body .notify-ack-btn {
    min-height: 38px !important;
  }
}

/* ==========================================================================
   BallotNexus v6.2.7 - form and workflow clarity
   One concise field language for page forms, Bootstrap dialogs and dynamic
   forms. Required state, help relationships, invalid feedback and file
   selection feedback stay visible without reintroducing bulky form layouts.
   ========================================================================== */
:root {
  --bnx-field-height: 34px;
  --bnx-field-height-modal: 38px;
  --bnx-field-invalid: #c2413b;
  --bnx-field-invalid-ring: rgba(194,65,59,.12);
}

html body :is(.form-group,.bnx-form-field,.bnx-field) {
  position: relative;
  margin-bottom: 10px !important;
}
html body :is(.form-group,.bnx-form-field,.bnx-field) > label,
html body :is(.form-group,.bnx-form-field,.bnx-field) > .control-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 5px !important;
  color: #334155 !important;
  font-size: 10.75px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
}
html body .bnx-required-copy {
  color: #0f766e;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}
html body :is(.form-group,.bnx-form-field,.bnx-field) :is(.help-block,.form-text,small.text-muted) {
  margin: 4px 0 0 !important;
  color: #64748b !important;
  font-size: 9.75px !important;
  line-height: 1.4 !important;
}
html body :is(.form-group,.bnx-form-field,.bnx-field) .form-control:not(textarea),
html body :is(.form-group,.bnx-form-field,.bnx-field) select.form-control {
  min-height: var(--bnx-field-height) !important;
  height: var(--bnx-field-height) !important;
  padding: 5px 9px !important;
  border-radius: 9px !important;
  font-size: 11.25px !important;
}
html body :is(.form-group,.bnx-form-field,.bnx-field) textarea.form-control {
  min-height: 76px !important;
  padding: 8px 9px !important;
  border-radius: 9px !important;
  font-size: 11.25px !important;
  line-height: 1.45 !important;
}

/* Modal forms are compact on desktop, but still clearly separated. */
html body .bnx-modal .modal-header {
  padding: 15px 18px 11px !important;
}
html body .bnx-modal .modal-title {
  font-size: 17px !important;
  line-height: 1.25 !important;
}
html body .bnx-modal .bnx-modal-subtitle {
  margin-top: 4px !important;
  font-size: 10.25px !important;
  line-height: 1.45 !important;
}
html body .bnx-modal .modal-body {
  padding: 14px 18px 8px !important;
}
html body .bnx-modal .modal-footer {
  gap: 6px !important;
  padding: 9px 18px 13px !important;
}
html body .bnx-modal :is(.form-group,.bnx-form-field,.bnx-field) {
  margin-bottom: 11px !important;
}
html body .bnx-modal :is(.form-control,select.form-control):not(textarea) {
  min-height: var(--bnx-field-height-modal) !important;
  height: var(--bnx-field-height-modal) !important;
  padding: 6px 9px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
}
html body .bnx-modal textarea.form-control {
  min-height: 82px !important;
  padding: 8px 9px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
}
html body .bnx-modal input[type="file"] {
  min-height: 40px !important;
  padding: 7px 9px !important;
  border-radius: 9px !important;
  font-size: 10.5px !important;
}
html body .bnx-modal .modal-footer .btn {
  min-height: 34px !important;
  padding: 5px 10px !important;
  border-radius: 9px !important;
  font-size: 10.75px !important;
}

/* First-party inline validation replaces detached browser validation bubbles. */
html body .bnx-control-invalid,
html body .bnx-field-invalid .form-control {
  border-color: var(--bnx-field-invalid) !important;
  box-shadow: 0 0 0 3px var(--bnx-field-invalid-ring) !important;
}
html body .bnx-field-invalid > label,
html body .bnx-field-invalid > .control-label {
  color: #9f2f2a !important;
}
html body .bnx-field-error {
  margin: 4px 0 0 !important;
  color: #a8322d !important;
  font-size: 9.75px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
}
html body .bnx-file-status {
  margin-top: 4px;
  color: #0f766e;
  font-size: 9.75px;
  line-height: 1.35;
  font-weight: 750;
  overflow-wrap: anywhere;
}

/* Check/radio controls should read as one compact choice row. */
html body :is(.checkbox,.radio,.bnx-check-field) {
  margin-top: 6px !important;
  margin-bottom: 7px !important;
}
html body :is(.checkbox,.radio,.bnx-check-field) label {
  color: #475569 !important;
  font-size: 10.75px !important;
  line-height: 1.4 !important;
}

html.dark-mode body :is(.form-group,.bnx-form-field,.bnx-field) > label,
html.dark-mode body :is(.form-group,.bnx-form-field,.bnx-field) > .control-label,
html body.dark-mode :is(.form-group,.bnx-form-field,.bnx-field) > label,
html body.dark-mode :is(.form-group,.bnx-form-field,.bnx-field) > .control-label {
  color: #dbe7f5 !important;
}
html.dark-mode body .bnx-required-copy,
html body.dark-mode .bnx-required-copy,
html.dark-mode body .bnx-file-status,
html body.dark-mode .bnx-file-status {
  color: #5eead4 !important;
}
html.dark-mode body .bnx-control-invalid,
html.dark-mode body .bnx-field-invalid .form-control,
html body.dark-mode .bnx-control-invalid,
html body.dark-mode .bnx-field-invalid .form-control {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 3px rgba(248,113,113,.12) !important;
}
html.dark-mode body .bnx-field-invalid > label,
html.dark-mode body .bnx-field-error,
html body.dark-mode .bnx-field-invalid > label,
html body.dark-mode .bnx-field-error {
  color: #fca5a5 !important;
}

@media (max-width: 767px) {
  :root {
    --bnx-field-height: 42px;
    --bnx-field-height-modal: 42px;
  }
  html body :is(.form-group,.bnx-form-field,.bnx-field) {
    margin-bottom: 12px !important;
  }
  html body :is(.form-group,.bnx-form-field,.bnx-field) .form-control:not(textarea),
  html body :is(.form-group,.bnx-form-field,.bnx-field) select.form-control,
  html body .bnx-modal :is(.form-control,select.form-control):not(textarea) {
    min-height: 42px !important;
    height: 42px !important;
    font-size: 13px !important;
  }
  html body :is(.form-group,.bnx-form-field,.bnx-field) textarea.form-control,
  html body .bnx-modal textarea.form-control {
    min-height: 96px !important;
    font-size: 13px !important;
  }
  html body .bnx-modal .modal-header {
    padding: 17px 56px 13px 17px !important;
  }
  html body .bnx-modal .modal-body {
    padding: 15px 17px 12px !important;
  }
  html body .bnx-modal .modal-footer {
    padding: 10px 17px 15px !important;
  }
  html body .bnx-modal .modal-footer .btn {
    min-height: 42px !important;
    font-size: 12px !important;
  }
}


/* ==========================================================================
   BallotNexus v6.2.8 - workflow state and action hierarchy
   Standardize empty/loading/error surfaces and make dense row operations easier
   to scan without hiding commands or weakening mobile touch targets.
   ========================================================================== */
:root {
  --bnx-state-surface: #f8fafc;
  --bnx-state-border: #dbe4ee;
  --bnx-state-muted: #64748b;
  --bnx-action-secondary-bg: #ffffff;
  --bnx-action-secondary-border: #d6e0ea;
  --bnx-action-primary-bg: #ecfdf5;
  --bnx-action-primary-border: #99f6e4;
  --bnx-action-primary-text: #0f766e;
  --bnx-action-danger-bg: #fff7f7;
  --bnx-action-danger-border: #fecaca;
  --bnx-action-danger-text: #b42318;
}

/* Empty/zero states are part of the workflow, not oversized standalone cards. */
html body .bnx-state-surface,
html body :is(.bnx-empty-state,.mgmt-empty,.verify-empty,.access-empty,.case-empty,.report-empty,.audit-empty,.ops-empty,.votes-empty,.notify-empty,.ec-empty,.ecw-empty,.ecp-empty,.public-empty,.position-empty,.selector-empty,.dashboard-table-empty,.bnx-collection-empty) {
  min-height: 0 !important;
  margin: 9px 0 12px !important;
  padding: 12px 13px !important;
  border: 1px dashed var(--bnx-state-border) !important;
  border-radius: 11px !important;
  background: var(--bnx-state-surface) !important;
  box-shadow: none !important;
  color: #475569 !important;
}
html body .bnx-state-empty :is(h2,h3,h4,.mgmt-main-line,.audit-main-line,.notify-main-line) {
  margin-top: 0 !important;
  margin-bottom: 3px !important;
  color: #172033 !important;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
}
html body .bnx-state-empty :is(p,.mgmt-sub-line,.audit-sub-line,.notify-sub-line) {
  margin-top: 0 !important;
  margin-bottom: 7px !important;
  color: var(--bnx-state-muted) !important;
  font-size: 10.5px !important;
  line-height: 1.4 !important;
}
html body .bnx-state-empty :is(.btn,a.btn) {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 10.5px !important;
}
html body tr.bnx-empty-table-row > td,
html body td.dataTables_empty {
  padding: 17px 12px !important;
  border-bottom: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  text-align: center !important;
  font-size: 10.75px !important;
  line-height: 1.4 !important;
}

/* Async table work remains in-context instead of looking like a second modal. */
html body .dataTables_wrapper {
  position: relative;
}
html body .bnx-processing-state,
html body .dataTables_processing.bnx-processing-state {
  position: absolute !important;
  z-index: 6 !important;
  top: 8px !important;
  right: 9px !important;
  left: auto !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 6px 10px 6px 30px !important;
  transform: none !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 7px 18px rgba(15,23,42,.08) !important;
  color: #475569 !important;
  font-size: 10.25px !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
}
html body .bnx-processing-state::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border: 2px solid #0f766e;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bnx-refine-spin .72s linear infinite;
}

/* Row operations have one hierarchy: primary work, neutral utilities, danger last. */
html body .bnx-action-group {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}
html body .bnx-action-group > form {
  display: inline-flex !important;
  margin: 0 !important;
}
html body .bnx-action-group .bnx-action-command {
  min-height: 30px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
}
html body .bnx-action-group .bnx-action-secondary {
  color: #334155 !important;
  background: var(--bnx-action-secondary-bg) !important;
  border-color: var(--bnx-action-secondary-border) !important;
}
html body .bnx-action-group .bnx-action-primary {
  color: var(--bnx-action-primary-text) !important;
  background: var(--bnx-action-primary-bg) !important;
  border-color: var(--bnx-action-primary-border) !important;
}
html body .bnx-action-group .bnx-action-danger {
  color: var(--bnx-action-danger-text) !important;
  background: var(--bnx-action-danger-bg) !important;
  border-color: var(--bnx-action-danger-border) !important;
}
html body .bnx-action-group .bnx-action-command:hover,
html body .bnx-action-group .bnx-action-command:focus-visible {
  border-color: #94a3b8 !important;
  transform: translateY(-1px);
}
html body .bnx-action-group .bnx-action-danger:hover,
html body .bnx-action-group .bnx-action-danger:focus-visible {
  color: #991b1b !important;
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}
html body .bnx-action-group .bnx-action-command[disabled],
html body .bnx-action-group .bnx-action-command.disabled,
html body .bnx-action-group .bnx-action-command[aria-disabled="true"] {
  opacity: .48 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Compact feedback strips remain visually distinct from workflow panels. */
html body .alert.bnx-state-message {
  position: relative;
  padding-left: 13px !important;
  border-left-width: 3px !important;
  box-shadow: none !important;
}
html body .alert-success.bnx-state-message { border-left-color: #16a34a !important; }
html body .alert-warning.bnx-state-message { border-left-color: #d97706 !important; }
html body .alert-danger.bnx-state-message { border-left-color: #dc2626 !important; }
html body .alert-info.bnx-state-message { border-left-color: #0284c7 !important; }

html.dark-mode body .bnx-state-surface,
html body.dark-mode .bnx-state-surface,
html.dark-mode body :is(.bnx-empty-state,.mgmt-empty,.verify-empty,.access-empty,.case-empty,.report-empty,.audit-empty,.ops-empty,.votes-empty,.notify-empty,.ec-empty,.ecw-empty,.ecp-empty,.public-empty,.position-empty,.selector-empty,.dashboard-table-empty,.bnx-collection-empty),
html body.dark-mode :is(.bnx-empty-state,.mgmt-empty,.verify-empty,.access-empty,.case-empty,.report-empty,.audit-empty,.ops-empty,.votes-empty,.notify-empty,.ec-empty,.ecw-empty,.ecp-empty,.public-empty,.position-empty,.selector-empty,.dashboard-table-empty,.bnx-collection-empty) {
  --bnx-state-surface: #0f1f35;
  --bnx-state-border: rgba(148,163,184,.22);
  --bnx-state-muted: #aebdd1;
  color: #dbe7f5 !important;
}
html.dark-mode body .bnx-state-empty :is(h2,h3,h4,.mgmt-main-line,.audit-main-line,.notify-main-line),
html body.dark-mode .bnx-state-empty :is(h2,h3,h4,.mgmt-main-line,.audit-main-line,.notify-main-line) {
  color: #f8fbff !important;
}
html.dark-mode body .bnx-action-group .bnx-action-secondary,
html body.dark-mode .bnx-action-group .bnx-action-secondary {
  color: #dbe7f5 !important;
  background: #13243b !important;
  border-color: rgba(148,163,184,.25) !important;
}
html.dark-mode body .bnx-action-group .bnx-action-primary,
html body.dark-mode .bnx-action-group .bnx-action-primary {
  color: #99f6e4 !important;
  background: rgba(13,148,136,.12) !important;
  border-color: rgba(45,212,191,.34) !important;
}
html.dark-mode body .bnx-action-group .bnx-action-danger,
html body.dark-mode .bnx-action-group .bnx-action-danger {
  color: #fca5a5 !important;
  background: rgba(127,29,29,.16) !important;
  border-color: rgba(248,113,113,.30) !important;
}
html.dark-mode body .bnx-processing-state,
html body.dark-mode .bnx-processing-state {
  color: #dbe7f5 !important;
  background: rgba(15,31,53,.97) !important;
  border-color: rgba(148,163,184,.24) !important;
}

@media (max-width: 767px) {
  html body .bnx-state-surface,
  html body :is(.bnx-empty-state,.mgmt-empty,.verify-empty,.access-empty,.case-empty,.report-empty,.audit-empty,.ops-empty,.votes-empty,.notify-empty,.ec-empty,.ecw-empty,.ecp-empty,.public-empty,.position-empty,.selector-empty,.dashboard-table-empty,.bnx-collection-empty) {
    padding: 13px !important;
  }
  html body .bnx-action-group-row {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    width: 100% !important;
    gap: 6px !important;
  }
  html body .bnx-action-group-row > :is(.btn,a.btn,button,form),
  html body .bnx-action-group-row > form > :is(.btn,button) {
    width: 100% !important;
  }
  html body .bnx-action-group-row .bnx-action-command {
    min-height: 38px !important;
    justify-content: center !important;
    padding: 7px 9px !important;
    font-size: 11px !important;
  }
  html body .bnx-processing-state,
  html body .dataTables_processing.bnx-processing-state {
    top: 6px !important;
    right: 6px !important;
  }
}

@media (max-width: 420px) {
  html body .bnx-action-group-row {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .bnx-action-group .bnx-action-command,
  html body .bnx-processing-state::before {
    transition: none !important;
  }
  html body .bnx-action-group .bnx-action-command:hover,
  html body .bnx-action-group .bnx-action-command:focus-visible {
    transform: none !important;
  }
}


/* ========================================================================== 
   BallotNexus v6.2.9 - workspace continuity and state clarity
   Make restored structural filters and table sort state immediately legible
   without adding new panels or persisting free-text voter/search queries.
   ========================================================================== */
html body :is(.bnx-directory-toolbar,.access-toolbar,.report-filter,.audit-filter-grid) .form-control.bnx-filter-active,
html body .access-filter-select.bnx-filter-active,
html body [data-bnx-persist-filter].bnx-filter-active {
  border-color: #5eead4 !important;
  background: #f0fdfa !important;
  box-shadow: 0 0 0 2px rgba(13,148,136,.08) !important;
  color: #134e4a !important;
}
html body table.dataTable thead > tr > th.sorting_asc,
html body table.dataTable thead > tr > th.sorting_desc,
html body table.dataTable thead > tr > td.sorting_asc,
html body table.dataTable thead > tr > td.sorting_desc {
  color: #0f766e !important;
  background-color: #f0fdfa !important;
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  border-color: #99f6e4 !important;
  background: #ecfdf5 !important;
  color: #0f766e !important;
  box-shadow: none !important;
}
html.dark-mode body :is(.bnx-directory-toolbar,.access-toolbar,.report-filter,.audit-filter-grid) .form-control.bnx-filter-active,
html body.dark-mode :is(.bnx-directory-toolbar,.access-toolbar,.report-filter,.audit-filter-grid) .form-control.bnx-filter-active,
html.dark-mode body .access-filter-select.bnx-filter-active,
html body.dark-mode .access-filter-select.bnx-filter-active,
html.dark-mode body [data-bnx-persist-filter].bnx-filter-active,
html body.dark-mode [data-bnx-persist-filter].bnx-filter-active {
  border-color: rgba(45,212,191,.50) !important;
  background: rgba(13,148,136,.12) !important;
  box-shadow: 0 0 0 2px rgba(45,212,191,.07) !important;
  color: #ccfbf1 !important;
}
html.dark-mode body table.dataTable thead > tr > :is(th,td).sorting_asc,
html.dark-mode body table.dataTable thead > tr > :is(th,td).sorting_desc,
html body.dark-mode table.dataTable thead > tr > :is(th,td).sorting_asc,
html body.dark-mode table.dataTable thead > tr > :is(th,td).sorting_desc {
  color: #99f6e4 !important;
  background-color: rgba(13,148,136,.11) !important;
}
html.dark-mode body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html.dark-mode body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
html body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  border-color: rgba(45,212,191,.35) !important;
  background: rgba(13,148,136,.14) !important;
  color: #99f6e4 !important;
}

@media (max-width: 767px) {
  html body :is(.bnx-directory-toolbar,.access-toolbar) .form-control.bnx-filter-active,
  html body .access-filter-select.bnx-filter-active {
    box-shadow: inset 3px 0 0 #14b8a6 !important;
  }
}

/* --------------------------------------------------------------------------
   BallotNexus v6.3.2 - public and voter surface convergence.
   Keep public pages welcoming while matching the concise operational system.
   -------------------------------------------------------------------------- */

html body :is(.entry-shell,.reg-page,.selector-shell,.public-results){max-width:1320px !important;padding-top:20px !important;padding-bottom:30px !important}
html body :is(.entry-panel,.entry-side,.reg-card,.reg-form-card,.selector-controls,.selector-card,.public-box,.public-hero,.public-panel){
  border-radius:18px !important;
  box-shadow:0 8px 24px rgba(15,23,42,.075) !important;
}
html body :is(.entry-hero,.reg-hero,.selector-hero,.public-hero){
  padding:18px 20px !important;
  border-radius:18px !important;
  margin-bottom:12px !important;
}
html body :is(.entry-hero h1,.reg-hero h1,.selector-hero h1,.public-hero h1){
  margin:8px 0 5px !important;
  font-size:clamp(26px,2.6vw,36px) !important;
  line-height:1.08 !important;
  letter-spacing:-.035em !important;
}
html body .entry-hero small{margin-top:5px !important;font-size:13px !important;line-height:1.35 !important}
html body :is(.entry-hero p,.reg-hero p,.selector-hero p,.public-hero p){margin:0 !important;font-size:12.5px !important;line-height:1.5 !important}
html body :is(.entry-badge,.reg-badge,.reg-status,.selector-eyebrow,.public-pill){min-height:27px !important;padding:4px 8px !important;font-size:10.25px !important;line-height:1.2 !important}

/* Voter sign-in and registration forms use less container chrome. */
html body :is(.entry-body,.entry-side,.reg-card-body,.reg-form-body){padding:16px !important}
html body .entry-grid,html body .reg-grid{gap:12px !important}
html body .entry-section-title{margin:13px 0 7px !important}
html body :is(.entry-link-card,.entry-election-card,.reg-metric,.reg-election-card){padding:12px !important;border-radius:14px !important;box-shadow:0 4px 14px rgba(15,23,42,.045) !important}
html body .entry-link-card strong,html body .entry-election-card strong{font-size:14px !important;line-height:1.35 !important}
html body :is(.entry-link-card span,.entry-election-card span,.entry-side p,.entry-meta,.entry-countdown-copy){font-size:11.5px !important;line-height:1.45 !important}
html body .entry-submit{height:44px !important;border-radius:12px !important;font-size:13px !important}
html body .entry-inline-btn{min-height:44px !important;border-radius:12px !important;font-size:12px !important}
html body .entry-scanner-panel{padding:12px !important;border-radius:14px !important}
html body .entry-scanner-stage,html body .entry-scanner-stage video{min-height:150px !important;border-radius:12px !important}

html body .reg-metrics{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:9px !important}
html body .reg-metric{min-height:92px !important}
html body .reg-metric strong{margin-top:5px !important;font-size:14px !important;line-height:1.35 !important}
html body .reg-metric small{margin-top:4px !important;font-size:10.75px !important;line-height:1.4 !important}
html body .reg-form-head{margin-bottom:12px !important}
html body .reg-form-grid{gap:10px !important}

/* Public election selector behaves like a compact directory. */
html body .selector-hero{padding:16px 18px !important}
html body .selector-stats{gap:9px !important;margin-bottom:12px !important}
html body .selector-stat{min-height:104px !important;padding:12px 13px !important;border-radius:15px !important;box-shadow:0 5px 16px rgba(15,23,42,.05) !important}
html body .selector-stat strong{font-size:25px !important;margin-top:4px !important}
html body .selector-stat small{font-size:10.75px !important;line-height:1.35 !important}
html body .selector-controls{padding:14px !important;margin-bottom:12px !important}
html body .selector-controls-head h2{font-size:16px !important}
html body .selector-controls-head p{font-size:11px !important;margin-top:3px !important}
html body .selector-filters{gap:9px !important;margin-top:11px !important}
html body .selector-filter-group .form-control{height:38px !important;border-radius:10px !important;font-size:12px !important}
html body .selector-grid{gap:10px !important}
html body .selector-card{padding:14px !important;border-radius:16px !important;box-shadow:0 6px 18px rgba(15,23,42,.05) !important}

/* Public results keeps election identity, but summary data lives in summary cards. */
html body .public-box{padding:8px 10px !important;margin-bottom:12px !important}
html body .public-row,html body .public-actions{gap:6px !important}
html body .public-box :is(.btn,.form-control){min-height:32px !important;height:32px !important;border-radius:9px !important;font-size:10.75px !important}
html body .public-hero{padding:16px 18px !important;background:linear-gradient(135deg,#16324f 0%,#0d6172 58%,#0b7464 100%) !important}
html body .public-hero-context{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
html body .public-hero-context .public-pill{background:rgba(255,255,255,.13) !important;border-color:rgba(255,255,255,.16) !important;color:#f8fbff !important;text-transform:none !important;letter-spacing:0 !important}
html body .public-cards{grid-template-columns:repeat(auto-fit,minmax(170px,1fr)) !important;gap:9px !important;margin-bottom:12px !important}
html body .public-card{min-height:106px !important;padding:12px 13px !important;border-radius:15px !important;box-shadow:0 5px 16px rgba(15,23,42,.05) !important}
html body .public-card strong{font-size:25px !important;margin:5px 0 !important}
html body .public-card span{font-size:9.5px !important;margin-bottom:4px !important}
html body .public-card small{font-size:10.75px !important;line-height:1.35 !important}
html body .public-panel{padding:15px !important;margin-bottom:12px !important}
html body .public-panel h3{font-size:16px !important}
html body .public-panel p{font-size:10.75px !important;margin-bottom:10px !important;line-height:1.4 !important}
html body .public-results-controls{padding:14px !important}
html body .public-results-filters{grid-template-columns:minmax(210px,1.5fr) repeat(3,minmax(140px,1fr)) !important;gap:9px !important;margin-top:11px !important}
html body .public-results-filter-group .form-control{height:38px !important;border-radius:10px !important;font-size:12px !important}
html body .public-results-board{gap:12px !important;padding:12px !important}
html body .public-position-card{border-radius:17px !important;box-shadow:0 6px 18px rgba(15,23,42,.05) !important}
html body .public-position-head{padding:14px !important;gap:12px !important;grid-template-columns:minmax(0,1fr) minmax(260px,360px) !important}
html body .public-position-title strong{font-size:18px !important}
html body .public-position-note{font-size:11.5px !important;line-height:1.45 !important}
html body .public-position-stat{padding:9px 10px !important;border-radius:12px !important}
html body .public-position-stat strong{font-size:16px !important}
html body .public-position-summary{margin:10px 14px 0 !important;padding:10px 12px !important;border-radius:13px !important}
html body .public-position-table-shell{padding:12px 14px 14px !important}
html body .public-position-table{border-radius:14px !important}
html body .public-position-table-head{padding:9px 11px !important}
html body .public-candidate-row{padding:10px 11px !important}
html body .public-chart{height:230px !important}
html body .public-chart.sm{height:200px !important}
html body .public-empty{padding:16px 12px !important;border-radius:13px !important;font-size:11px !important}

/* Shared dark public surfaces keep text hierarchy without heavy glow/shadow. */
html.dark-mode body :is(.entry-panel,.entry-side,.reg-card,.reg-form-card,.selector-controls,.selector-card,.public-box,.public-panel,.public-card,.public-position-card),
html body.dark-mode :is(.entry-panel,.entry-side,.reg-card,.reg-form-card,.selector-controls,.selector-card,.public-box,.public-panel,.public-card,.public-position-card){box-shadow:0 7px 20px rgba(2,6,23,.24) !important}

@media (max-width:1080px){
  html body .public-results-filters{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  html body .public-position-head{grid-template-columns:1fr !important}
}
@media (max-width:767px){
  html body :is(.entry-shell,.reg-page,.selector-shell,.public-results){padding:14px 11px 24px !important}
  html body :is(.entry-hero,.reg-hero,.selector-hero,.public-hero){padding:14px !important}
  html body :is(.entry-hero h1,.reg-hero h1,.selector-hero h1,.public-hero h1){font-size:24px !important}
  html body .reg-metrics,html body .public-results-filters{grid-template-columns:1fr !important}
  html body .public-actions{width:100% !important;overflow-x:auto !important;flex-wrap:nowrap !important;padding-bottom:2px}
  html body .public-actions > *{flex:0 0 auto !important}
  html body .public-position-meta{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (max-width:520px){
  html body .entry-card-list,html body .entry-countdown,html body .public-position-meta{grid-template-columns:1fr !important}
  html body .public-cards{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (max-width:390px){html body .public-cards{grid-template-columns:1fr !important}}

/* --------------------------------------------------------------------------
   BallotNexus v6.3.4 - compact EC election context.
   Keep the current election visible without letting scope metadata dominate
   the navigation rail. Full schedule/scope data remains progressively available.
   -------------------------------------------------------------------------- */
html body .bnx-ec-context-card {
  margin-bottom: 8px !important;
  padding: 9px 10px !important;
  border-radius: 12px !important;
}
html body .bnx-ec-context-card::after {
  width: 2px !important;
  opacity: .45 !important;
}
html body .bnx-ec-context-card .sidebar-widget-title {
  min-height: 20px !important;
  gap: 7px !important;
  align-items: center !important;
}
html body .bnx-ec-context-card .sidebar-widget-title > span:first-child {
  min-width: 0 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  letter-spacing: .055em !important;
}
html body .bnx-ec-context-card .election-status-pill {
  min-height: 19px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  font-size: 8.25px !important;
  line-height: 1.1 !important;
  flex: 0 0 auto !important;
}
html body .bnx-ec-context-card .sidebar-widget-subtext {
  margin: 5px 0 6px !important;
  color: #cbd5e1 !important;
  font-size: 10.25px !important;
  font-weight: 760 !important;
  line-height: 1.28 !important;
  letter-spacing: .005em !important;
  -webkit-line-clamp: 2 !important;
}
html body .bnx-ec-compact-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  color: #8fa0b7 !important;
  font-size: 9.25px !important;
  line-height: 1.2 !important;
}
html body .bnx-ec-compact-meta > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
html body .bnx-ec-compact-meta > span > i {
  width: 12px !important;
  color: #5eead4 !important;
  font-size: 9px !important;
  text-align: center !important;
  flex: 0 0 auto !important;
}
html body .bnx-ec-compact-meta .bnx-ec-role {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html body .bnx-ec-compact-meta .bnx-ec-assignment-count {
  margin-left: auto !important;
  flex: 0 0 auto !important;
}
html body .bnx-ec-context-details {
  margin-top: 6px !important;
  padding-top: 5px !important;
  border-top: 1px solid rgba(148,163,184,.11) !important;
}
html body .bnx-ec-context-details > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 7px !important;
  min-height: 24px !important;
  margin: 0 -3px -2px !important;
  padding: 3px !important;
  border-radius: 7px !important;
  color: #a7b6c9 !important;
  cursor: pointer !important;
  list-style: none !important;
  font-size: 9.25px !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  user-select: none !important;
}
html body .bnx-ec-context-details > summary::-webkit-details-marker {
  display: none !important;
}
html body .bnx-ec-context-details > summary > span:first-child {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
html body .bnx-ec-context-details > summary > span:first-child > i {
  color: #5eead4 !important;
  flex: 0 0 auto !important;
}
html body .bnx-ec-context-disclosure {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #71839a !important;
  font-size: 8.5px !important;
  font-weight: 720 !important;
  flex: 0 0 auto !important;
}
html body .bnx-ec-context-disclosure i {
  transition: transform .18s ease !important;
}
html body .bnx-ec-context-details[open] .bnx-ec-context-disclosure i {
  transform: rotate(180deg) !important;
}
html body .bnx-ec-context-details > summary:hover {
  color: #e2e8f0 !important;
  background: rgba(255,255,255,.035) !important;
}
html body .bnx-ec-context-details > summary:focus-visible {
  outline: 2px solid rgba(45,212,191,.38) !important;
  outline-offset: 1px !important;
}
html body .bnx-ec-context-expanded {
  display: grid !important;
  gap: 5px !important;
  padding: 6px 1px 1px !important;
}
html body .bnx-ec-context-row {
  display: grid !important;
  grid-template-columns: 58px minmax(0,1fr) !important;
  gap: 7px !important;
  align-items: start !important;
  min-width: 0 !important;
}
html body .bnx-ec-context-row > span {
  color: #71839a !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  line-height: 1.32 !important;
}
html body .bnx-ec-context-row > strong {
  min-width: 0 !important;
  color: #cbd5e1 !important;
  font-size: 9px !important;
  font-weight: 720 !important;
  line-height: 1.35 !important;
  text-align: right !important;
  overflow-wrap: anywhere !important;
}
html body .bnx-ec-context-card .bnx-ec-switch-hint {
  margin: 2px 0 0 !important;
  padding-top: 5px !important;
  border-top: 1px solid rgba(148,163,184,.09) !important;
  color: #8091a8 !important;
  font-size: 8.75px !important;
  line-height: 1.35 !important;
}
html body .bnx-ec-context-card + .sidebar-menu {
  margin-top: 1px !important;
}
html body .bnx-ec-context-card + .sidebar-menu > li.header:first-child {
  padding-top: 8px !important;
}
@media (prefers-reduced-motion: reduce) {
  html body .bnx-ec-context-disclosure i {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   BallotNexus v6.3.5 - sidebar navigation density and search clarity.
   Keep the rail task-first after the compact election context: search should
   not crowd itself, section labels should not create dead space, and every
   primary navigation row should remain readable without becoming card-sized.
   -------------------------------------------------------------------------- */
html body .sidebar-search-wrap {
  margin-bottom: 6px !important;
}
html body .sidebar-search-wrap::before {
  left: 10px !important;
  font-size: 11px !important;
}
html body .sidebar-search-wrap .form-control,
html body .sidebar-search-wrap input {
  height: 34px !important;
  min-height: 34px !important;
  padding-left: 31px !important;
  padding-right: 56px !important;
  border-radius: 9px !important;
  font-size: 10.75px !important;
}
html body .sidebar-search-wrap .form-control::placeholder,
html body .sidebar-search-wrap input::placeholder {
  color: #728198 !important;
  opacity: 1 !important;
}
html body .sidebar-search-clear {
  right: 8px !important;
  width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border-radius: 6px !important;
  font-size: 10px !important;
  opacity: 1;
  visibility: visible;
  transition: opacity .14s ease, visibility .14s ease, background-color .14s ease !important;
}
html body .sidebar-search-wrap input:placeholder-shown ~ .sidebar-search-clear {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html body .bnx-sidebar-search-kbd {
  right: 8px !important;
  min-width: 32px !important;
  padding: 2px 4px !important;
  border-radius: 5px !important;
  font-size: 7.75px !important;
  line-height: 1.15 !important;
  transition: opacity .14s ease, visibility .14s ease !important;
}
html body .sidebar-search-wrap input:focus ~ .bnx-sidebar-search-kbd,
html body .sidebar-search-wrap input:not(:placeholder-shown) ~ .bnx-sidebar-search-kbd {
  opacity: 0 !important;
  visibility: hidden !important;
}
html body .sidebar-search-empty {
  margin: 0 0 6px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  font-size: 9.75px !important;
  line-height: 1.3 !important;
}

/* EC flat navigation: smaller icon containers and less vertical chrome reclaim
   several rows without dropping below a practical desktop click target. */
html body .main-sidebar .sidebar-menu > li.header {
  padding: 8px 8px 3px !important;
  color: #748299 !important;
  font-size: 8.5px !important;
  line-height: 1.2 !important;
  letter-spacing: .075em !important;
}
html body .main-sidebar .sidebar-menu > li:not(.header) > a {
  min-height: 34px !important;
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 10.75px !important;
  line-height: 1.25 !important;
}
html body .main-sidebar .sidebar-menu > li:not(.header) > a > i,
html body .main-sidebar .sidebar-menu > li:not(.header) > a > .fa,
html body .main-sidebar .sidebar-menu > li:not(.header) > a > .glyphicon {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  margin-right: 7px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}
html body .main-sidebar .sidebar-menu > li:not(.header) > a > span:not(.pull-right-container) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
html body .main-sidebar .sidebar-menu > li.active > a::after {
  right: 7px !important;
  width: 4px !important;
  height: 4px !important;
  box-shadow: 0 0 0 2px rgba(34,211,238,.08) !important;
}
html body .sidebar-live-badge {
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 2px 5px !important;
  border-radius: 6px !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
}

/* Administrator tree groups follow the same rhythm without flattening their
   hierarchy or changing any permission-driven menu composition. */
html body .enhanced-sidebar-menu > .menu-group > a {
  min-height: 32px !important;
  margin-top: 5px !important;
  margin-bottom: 1px !important;
  padding: 5px 7px !important;
  font-size: 9.5px !important;
  letter-spacing: .065em !important;
}
html body .enhanced-sidebar-menu > .menu-group > a > i:first-child {
  width: 20px !important;
  height: 20px !important;
  margin-right: 4px !important;
  font-size: 10.5px !important;
}
html body .enhanced-sidebar-menu .treeview-menu {
  margin-bottom: 5px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
}
html body .enhanced-sidebar-menu .treeview-menu > .menu-item-leaf > a,
html body .enhanced-sidebar-menu .menu-item-link {
  min-height: 34px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  font-size: 10.75px !important;
}

/* The utility dock remains always reachable but no longer reads like another
   pair of full navigation cards. */
html body .bnx-sidebar-utility {
  gap: 5px !important;
  margin-top: 4px !important;
  padding-top: 6px !important;
}
html body .bnx-sidebar-utility button {
  min-height: 31px !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  gap: 5px !important;
  font-size: 9.5px !important;
}
html body .bnx-sidebar-utility button > i {
  font-size: 10px !important;
}

/* Subtle scrollbars make overflow discoverable without visually competing with
   active-election and active-navigation accents. */
html body.sidebar-mini .main-sidebar > .sidebar,
html body.sidebar-mini .left-side > .sidebar,
html body .main-sidebar .enhanced-sidebar-menu,
html body .main-sidebar > .sidebar > .sidebar-menu {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148,163,184,.24) transparent !important;
}
html body.sidebar-mini .main-sidebar > .sidebar::-webkit-scrollbar,
html body.sidebar-mini .left-side > .sidebar::-webkit-scrollbar,
html body .main-sidebar .enhanced-sidebar-menu::-webkit-scrollbar,
html body .main-sidebar > .sidebar > .sidebar-menu::-webkit-scrollbar {
  width: 4px !important;
}
html body.sidebar-mini .main-sidebar > .sidebar::-webkit-scrollbar-track,
html body.sidebar-mini .left-side > .sidebar::-webkit-scrollbar-track,
html body .main-sidebar .enhanced-sidebar-menu::-webkit-scrollbar-track,
html body .main-sidebar > .sidebar > .sidebar-menu::-webkit-scrollbar-track {
  background: transparent !important;
}
html body.sidebar-mini .main-sidebar > .sidebar::-webkit-scrollbar-thumb,
html body.sidebar-mini .left-side > .sidebar::-webkit-scrollbar-thumb,
html body .main-sidebar .enhanced-sidebar-menu::-webkit-scrollbar-thumb,
html body .main-sidebar > .sidebar > .sidebar-menu::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(148,163,184,.22) !important;
}
html body.sidebar-mini .main-sidebar > .sidebar:hover::-webkit-scrollbar-thumb,
html body.sidebar-mini .left-side > .sidebar:hover::-webkit-scrollbar-thumb,
html body .main-sidebar .enhanced-sidebar-menu:hover::-webkit-scrollbar-thumb,
html body .main-sidebar > .sidebar > .sidebar-menu:hover::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.34) !important;
}

@media (max-width: 767px) {
  /* Preserve mobile touch comfort even though the desktop rail is denser. */
  html body .main-sidebar .sidebar-menu > li:not(.header) > a,
  html body .enhanced-sidebar-menu .treeview-menu > .menu-item-leaf > a,
  html body .enhanced-sidebar-menu .menu-item-link {
    min-height: 40px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
  html body .main-sidebar .sidebar-menu > li:not(.header) > a > i,
  html body .main-sidebar .sidebar-menu > li:not(.header) > a > .fa,
  html body .main-sidebar .sidebar-menu > li:not(.header) > a > .glyphicon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }
  html body .bnx-sidebar-utility button {
    min-height: 36px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .sidebar-search-clear,
  html body .bnx-sidebar-search-kbd {
    transition: none !important;
  }
}
