:root {
  --primary: #4b0082;
  --primary-strong: #3b0068;
  --primary-soft: #6c3a95;
  --primary-rgb: 75, 0, 130;
  --neutral: #E5E4E2;
  --neutral-soft: #F1F0EE;
  --text-main: #2b1640;
  --text-muted: #5a4b6a;
  --glass-bg: rgba(229, 228, 226, 0.78);
  --glass-bg-soft: rgba(229, 228, 226, 0.58);
  --glass-bg-strong: rgba(229, 228, 226, 0.9);
  --border-soft: rgba(75, 0, 130, 0.2);
  --shadow-soft: 0 14px 34px rgba(35, 18, 53, 0.24);
  --radius-lg: 18px;
  --radius-md: 12px;
  --page-bg:
    radial-gradient(circle at -10% -10%, rgba(229, 228, 226, 0.42) 0%, rgba(229, 228, 226, 0) 48%),
    radial-gradient(circle at 110% 5%, rgba(75, 0, 130, 0.4) 0%, rgba(75, 0, 130, 0) 44%),
    linear-gradient(145deg, #2f0a4f, #4b0082 50%, #2a083f 100%);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(229, 228, 226, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 228, 226, 0.11) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.22;
}

.wrapper,
.content-wrapper,
.right-side {
  background: transparent !important;
}

.content-wrapper {
  min-height: calc(100vh - 110px) !important;
  padding-bottom: 28px;
}

.container,
.content,
.content-header {
  position: relative;
  z-index: 1;
}

.main-header .navbar,
.main-header .logo,
.navbar.navbar-static-top {
  background: rgba(45, 7, 72, 0.82) !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(21, 8, 34, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.main-header .logo {
  border-right: 1px solid rgba(229, 228, 226, 0.18) !important;
  color: #f8f5ff !important;
}

.main-header .navbar .navbar-brand,
.main-header .navbar .nav > li > a,
.main-header .logo .logo-lg,
.main-header .logo .logo-mini,
.navbar-brand {
  color: #f8f5ff !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.main-header .navbar-brand {
  display: inline-flex;
  align-items: center;
  height: 50px;
}

.main-header .navbar .sidebar-toggle {
  color: #f8f5ff !important;
}

.main-header .navbar .sidebar-toggle:hover,
.main-header .navbar .nav > li > a:hover,
.main-header .navbar .nav > li > a:focus,
.layout-top-nav .main-header .navbar .nav > li > a:hover {
  background: rgba(229, 228, 226, 0.14) !important;
  color: #fff !important;
}

.main-sidebar,
.left-side {
  background: rgba(40, 8, 63, 0.9) !important;
  border-right: 1px solid rgba(229, 228, 226, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar {
  padding-top: 14px;
}

.sidebar-menu > li.header {
  color: rgba(229, 228, 226, 0.86) !important;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.sidebar-menu > li > a {
  color: #efeaf8 !important;
  border-radius: 12px;
  margin: 0 12px 6px;
  padding: 11px 14px;
  transition: all 0.2s ease;
}

.sidebar-menu > li > a:hover,
.sidebar-menu > li.active > a {
  background: rgba(229, 228, 226, 0.15) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(229, 228, 226, 0.2);
}

.sidebar-menu > li > .treeview-menu {
  background: transparent !important;
}

.user-panel {
  margin: 0 12px 12px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(229, 228, 226, 0.12);
}

.user-panel > .info,
.user-panel > .info > a {
  color: #f8f5ff !important;
}

.box,
.small-box,
.jumbotron,
.results-box,
.modal-content,
.callout,
.alert,
.login-box,
.info-box,
.card-like,
.multi-cand {
  background: var(--glass-bg) !important;
  border: 1px solid rgba(229, 228, 226, 0.45) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-soft);
  color: var(--text-main);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.box,
.small-box,
.jumbotron,
.results-box,
.login-box,
.card-like {
  overflow: hidden;
}

.box-header,
.box-footer,
.modal-header,
.modal-footer {
  background: transparent !important;
  border-color: var(--border-soft) !important;
}

.box-title {
  color: #2a0f42 !important;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.box.box-solid > .box-header,
.box.box-solid > .box-header a,
.results-box .box-header {
  color: #2c0f47 !important;
  background: rgba(229, 228, 226, 0.48) !important;
}

.box.box-solid > .box-body,
.results-box .box-body,
.multi-cand,
.jumbotron,
.modal-body {
  background: transparent !important;
}

.small-box {
  padding: 10px 14px;
  min-height: 150px;
}

.small-box h3 {
  margin: 0 0 8px;
  color: #2a0e44 !important;
  font-size: 30px;
  font-weight: 800;
}

.small-box p {
  color: #4b3b5f !important;
  font-weight: 600;
}

.small-box .icon {
  top: 10px;
  right: 10px;
}

.small-box .icon i {
  color: rgba(75, 0, 130, 0.34) !important;
}

.small-box-footer {
  background: rgba(229, 228, 226, 0.45) !important;
  color: #3b1858 !important;
  font-weight: 600;
}

.bg-aqua,
.bg-green,
.bg-yellow,
.bg-red {
  background: linear-gradient(135deg, rgba(75, 0, 130, 0.18), rgba(229, 228, 226, 0.52)) !important;
  color: var(--text-main) !important;
}

.btn {
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(38, 14, 57, 0.25);
}

.btn-primary,
.btn-success,
.btn-info {
  background: linear-gradient(130deg, #4b0082, #6c3a95) !important;
  color: #f7f3ff !important;
}

.btn-danger {
  background: linear-gradient(130deg, #4b0082, #7d56a3) !important;
  color: #fff !important;
}

.btn-warning {
  background: linear-gradient(130deg, #66517b, #4b0082) !important;
  color: #f7f3ff !important;
}

.btn-default,
.btn-flat {
  background: rgba(229, 228, 226, 0.78) !important;
  color: #351450 !important;
  border: 1px solid rgba(75, 0, 130, 0.2) !important;
}

.btn-default:hover,
.btn-flat:hover {
  background: rgba(241, 240, 238, 0.94) !important;
}

.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 40px;
  border-radius: 12px !important;
  border: 1px solid rgba(75, 0, 130, 0.24) !important;
  background: rgba(241, 240, 238, 0.86) !important;
  color: #2b1640 !important;
  box-shadow: none !important;
}

.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: rgba(75, 0, 130, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.18) !important;
}

.table,
.table-bordered,
.dataTable {
  background: transparent;
  color: var(--text-main);
}

.table > thead > tr > th {
  background: rgba(229, 228, 226, 0.62);
  border-bottom: 1px solid rgba(75, 0, 130, 0.24) !important;
  color: #341650;
  font-weight: 700;
}

.table > tbody > tr > td {
  background: rgba(229, 228, 226, 0.32);
  border-top: 1px solid rgba(75, 0, 130, 0.14) !important;
}

.table-hover > tbody > tr:hover > td {
  background: rgba(229, 228, 226, 0.52);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 10px;
  border: 1px solid rgba(75, 0, 130, 0.24);
  background: rgba(241, 240, 238, 0.9);
  color: #2b1640;
  padding: 6px 10px;
}

.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover {
  background-color: #4b0082 !important;
  border-color: #4b0082 !important;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 26px 28px;
}

.login-logo {
  margin-bottom: 16px;
}

.login-logo b {
  color: #2e1246;
  letter-spacing: 0.03em;
  font-weight: 800;
}

.main-footer {
  background: rgba(36, 8, 58, 0.86) !important;
  border-top: 1px solid rgba(229, 228, 226, 0.18) !important;
  color: #efeaf8 !important;
}

.main-footer a {
  color: #f8f5ff !important;
  font-weight: 600;
}

.page-header,
.content-header > h1,
h1,
h2,
h3,
h4,
h5 {
  color: #2b1143;
}

.title {
  color: #2b1143;
  text-shadow: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.candidate-label {
  display: inline-block;
  width: 100%;
  max-width: 230px;
  cursor: pointer;
}

.candidate-label input {
  display: none !important;
}

.candidate-label .icheckbox_flat-green,
.candidate-label .iradio_flat-green {
  display: none !important;
}

.candidate-label .img-container {
  width: 100%;
  border-radius: 18px;
  padding: 8px;
  border: 1px solid rgba(75, 0, 130, 0.2);
  background: var(--glass-bg-soft);
  transition: all 0.2s ease;
}

.candidate-label .img-container img {
  display: block;
  width: 100%;
  height: 250px;
  border-radius: 12px;
  object-fit: cover;
}

.candidate-label .img-container.checked-state {
  border-color: #4b0082;
  background: linear-gradient(145deg, rgba(75, 0, 130, 0.22), rgba(229, 228, 226, 0.36));
  box-shadow: 0 16px 26px rgba(35, 13, 54, 0.26);
  transform: translateY(-3px);
}

.results-box .btn-result {
  min-width: 132px;
}

#countdown,
#digit-container {
  border-radius: 16px;
  background: rgba(229, 228, 226, 0.48);
  border: 1px solid rgba(75, 0, 130, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.status-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 0 36px;
}

.status-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 28px;
}

.status-card img {
  max-width: min(240px, 70%);
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid rgba(75, 0, 130, 0.2);
}

.status-card h2 {
  margin-top: 0;
  font-weight: 800;
}

.status-card p {
  color: #4a3b5c;
  font-size: 16px;
}

.counter-shell {
  max-width: 940px;
  margin: 0 auto;
  padding: 12px;
}

.counter-total {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
  text-align: center;
}

.counter-digits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.digit-box {
  width: 86px;
  height: 108px;
  line-height: 108px;
  border-radius: 16px;
  border: 1px solid rgba(75, 0, 130, 0.22);
  background: rgba(241, 240, 238, 0.88);
  color: #310f4c;
  font-weight: 800;
  font-size: clamp(2.2rem, 3.2vw, 3.4rem);
  box-shadow: 0 8px 16px rgba(36, 13, 54, 0.16);
}

#moveUpBtn {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1050;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(229, 228, 226, 0.5);
  background: rgba(55, 9, 85, 0.86);
  color: #f8f5ff;
  box-shadow: 0 14px 30px rgba(23, 8, 35, 0.4);
}

#moveUpBtn:hover {
  background: rgba(75, 0, 130, 0.92);
  transform: translateY(-2px);
}

.alert {
  border: 1px solid rgba(75, 0, 130, 0.28) !important;
}

.alert-success {
  color: #2b1143;
  background: rgba(229, 228, 226, 0.9) !important;
}

.alert-danger {
  color: #330f4d;
  background: rgba(228, 214, 237, 0.9) !important;
}

.callout-danger {
  border-color: rgba(75, 0, 130, 0.34) !important;
  background: rgba(229, 218, 237, 0.86) !important;
  color: #350f4e !important;
}

/* Enhanced Modern Layer */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.main-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(229, 228, 226, 0.1), rgba(229, 228, 226, 0.72), rgba(229, 228, 226, 0.1));
}

.navbar-brand,
.logo-lg {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 228, 226, 0.22);
  border: 1px solid rgba(229, 228, 226, 0.36);
  color: #f8f5ff;
  font-size: 13px;
}

.main-header .logo-mini i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 228, 226, 0.2);
  border: 1px solid rgba(229, 228, 226, 0.3);
}

.sidebar-menu > li > a i,
.sidebar-menu > li > a .glyphicon {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 228, 226, 0.2);
  border: 1px solid rgba(229, 228, 226, 0.2);
}

.sidebar-menu > li > a:hover i,
.sidebar-menu > li.active > a i,
.sidebar-menu > li > a:hover .glyphicon,
.sidebar-menu > li.active > a .glyphicon {
  background: rgba(229, 228, 226, 0.24);
  border-color: rgba(229, 228, 226, 0.35);
}

.modern-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}

.modern-footer .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modern-footer .footer-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.modern-footer .footer-left i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 228, 226, 0.18);
  border: 1px solid rgba(229, 228, 226, 0.28);
}

.modern-footer .footer-right {
  color: rgba(248, 245, 255, 0.92);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 12px;
  text-transform: uppercase;
}

.box,
.small-box,
.results-box,
.jumbotron,
.modal-content {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.box:hover,
.small-box:hover,
.results-box:hover,
.jumbotron:hover {
  transform: translateY(-2px);
  border-color: rgba(75, 0, 130, 0.34) !important;
  box-shadow: 0 22px 34px rgba(26, 8, 39, 0.26);
}

.box-header.with-border {
  border-bottom: 1px solid rgba(75, 0, 130, 0.16) !important;
}

.box-header.with-border::before {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #4b0082, rgba(75, 0, 130, 0.2));
}

.dataTables_wrapper {
  padding: 6px;
}

.dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button a {
  border-radius: 10px !important;
  border: 1px solid rgba(75, 0, 130, 0.22) !important;
  margin: 0 2px;
  color: #3a1658 !important;
  background: rgba(229, 228, 226, 0.75) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.active a {
  color: #f8f5ff !important;
  background: linear-gradient(135deg, #4b0082, #6c3a95) !important;
  border-color: rgba(75, 0, 130, 0.5) !important;
}

.table > thead > tr > th:first-child {
  border-top-left-radius: 10px;
}

.table > thead > tr > th:last-child {
  border-top-right-radius: 10px;
}

.modal-content {
  background: var(--glass-bg-strong) !important;
}

.modal-header {
  padding: 16px 18px;
}

.modal-title {
  color: #2e1246;
  font-weight: 800;
}

.modal-header .close {
  opacity: 0.85;
  color: #3b0068;
  text-shadow: none;
}

.modal-header .close:hover {
  opacity: 1;
}

.modal-backdrop.in {
  opacity: 0.62;
}

.swal2-container {
  backdrop-filter: blur(3px);
}

.swal2-modern-popup {
  border-radius: 22px !important;
  border: 1px solid rgba(229, 228, 226, 0.45) !important;
  background: rgba(229, 228, 226, 0.93) !important;
  color: #2b1640 !important;
  box-shadow: 0 22px 46px rgba(22, 8, 33, 0.34) !important;
}

.swal2-modern-title {
  color: #2b1143 !important;
  font-weight: 800 !important;
}

.swal2-modern-text {
  color: #4c3d5d !important;
}

.swal2-modern-btn {
  min-width: 112px;
  margin: 0 4px !important;
}

.swal2-icon.swal2-success .swal2-success-ring,
.swal2-icon.swal2-warning,
.swal2-icon.swal2-error,
.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
  border-color: rgba(75, 0, 130, 0.42) !important;
  color: #4b0082 !important;
}

.swal2-timer-progress-bar {
  background: linear-gradient(90deg, #4b0082, #6c3a95) !important;
}

.status-card {
  background: var(--glass-bg-strong) !important;
}

@media (max-width: 991px) {
  .content-wrapper {
    padding-top: 6px;
  }

  .main-sidebar,
  .left-side {
    padding-top: 52px;
  }

  .small-box {
    min-height: 132px;
  }
}

@media (max-width: 767px) {
  .navbar-brand {
    font-size: 20px !important;
  }

  .login-box {
    padding: 22px;
  }

  .status-card {
    padding: 24px 16px;
  }

  .digit-box {
    width: 64px;
    height: 82px;
    line-height: 82px;
  }

  .counter-total {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .modern-footer,
  .modern-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .box,
  .small-box,
  .jumbotron,
  .results-box,
  .modal-content,
  .callout,
  .alert,
  .login-box,
  .info-box,
  .main-header .navbar,
  .main-header .logo,
  .main-sidebar,
  .left-side {
    background: rgba(241, 240, 238, 0.96) !important;
  }

  .main-header .navbar,
  .main-header .logo,
  .main-sidebar,
  .left-side,
  .main-footer {
    background: #3b0068 !important;
  }
}

/* Multi-Color Revamp */
:root {
  --theme-cyan: #0dcaf0;
  --theme-blue: #0d6efd;
  --theme-indigo: #6610f2;
  --theme-purple: #6f42c1;
  --admin-header-height: 50px;
  --admin-footer-height: 58px;
  --admin-sidebar-width: 230px;
  --admin-sidebar-collapsed-width: 50px;
  --theme-surface: #f6f8ff;
  --theme-surface-2: #eef1ff;
  --theme-text: #231c44;
  --theme-muted: #4f4a78;
  --theme-border: rgba(13, 110, 253, 0.26);
}

body {
  background:
    radial-gradient(circle at 0% 0%, rgba(13, 202, 240, 0.24) 0%, rgba(13, 202, 240, 0) 42%),
    radial-gradient(circle at 100% 0%, rgba(111, 66, 193, 0.24) 0%, rgba(111, 66, 193, 0) 44%),
    linear-gradient(145deg, #eaf1ff, #f2edff 48%, #f8f7ff 100%);
  color: var(--theme-text);
}

body::before {
  background-image:
    linear-gradient(rgba(102, 16, 242, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 16, 242, 0.09) 1px, transparent 1px);
  opacity: 0.2;
}

.main-header .navbar,
.main-header .logo,
.navbar.navbar-static-top {
  background: linear-gradient(120deg, rgba(102, 16, 242, 0.95), rgba(111, 66, 193, 0.92)) !important;
  box-shadow: 0 12px 28px rgba(43, 19, 93, 0.32);
}

.main-sidebar,
.left-side {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.94), rgba(102, 16, 242, 0.9)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-menu > li > a {
  color: #f5fbff !important;
}

.sidebar-menu > li > a:hover,
.sidebar-menu > li.active > a {
  background: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-menu > li > a i,
.sidebar-menu > li > a .glyphicon {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.sidebar-menu > li.header,
.user-panel > .info,
.user-panel > .info > a {
  color: #ecf8ff !important;
}

.sidebar-role-pill {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 202, 240, 0.52);
  background: rgba(13, 202, 240, 0.2);
  color: #e9fbff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-search-wrap {
  position: relative;
  margin: 0 12px 12px;
}

.sidebar-search-wrap .form-control {
  min-height: 36px;
  height: 36px;
  padding-right: 34px;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #f4fbff !important;
}

.sidebar-search-wrap .form-control::placeholder {
  color: rgba(244, 251, 255, 0.75);
}

.sidebar-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(244, 251, 255, 0.78);
  cursor: pointer;
}

.sidebar-search-clear:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sidebar-search-empty {
  display: none;
  margin: 0 12px 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  color: rgba(244, 251, 255, 0.82);
  font-size: 11px;
}

body.sidebar-mini .main-sidebar,
body.sidebar-mini .left-side {
  overscroll-behavior: contain;
}

body.sidebar-mini .main-sidebar .sidebar,
body.sidebar-mini .left-side .sidebar {
  padding-top: 8px;
  padding-bottom: 28px;
}

body.sidebar-mini .main-sidebar .user-panel,
body.sidebar-mini .left-side .user-panel {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 0 12px 10px;
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

body.sidebar-mini .main-sidebar .user-panel > .image,
body.sidebar-mini .left-side .user-panel > .image {
  float: none;
  flex: 0 0 46px;
}

body.sidebar-mini .main-sidebar .user-panel > .image > img,
body.sidebar-mini .left-side .user-panel > .image > img {
  width: 46px !important;
  max-width: 46px !important;
  height: 46px !important;
  object-fit: cover;
}

body.sidebar-mini .main-sidebar .user-panel > .info,
body.sidebar-mini .left-side .user-panel > .info {
  float: none;
  position: static;
  left: auto;
  padding: 0;
  line-height: 1.25;
  width: 100%;
}

body.sidebar-mini .main-sidebar .user-panel > .info > p,
body.sidebar-mini .left-side .user-panel > .info > p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.sidebar-mini .main-sidebar .user-panel > .info > a,
body.sidebar-mini .left-side .user-panel > .info > a {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
}

body.sidebar-mini .main-sidebar .sidebar-search-wrap,
body.sidebar-mini .left-side .sidebar-search-wrap {
  position: relative;
  top: auto;
  z-index: 1;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  background: transparent;
  border-radius: 0;
}

body.sidebar-mini.sidebar-collapse .sidebar-search-wrap,
body.sidebar-mini.sidebar-collapse .sidebar-search-empty,
body.sidebar-mini.sidebar-collapse .sidebar-widget,
body.sidebar-mini.sidebar-collapse .sidebar-role-pill {
  display: none;
}

body.sidebar-mini.sidebar-collapse .main-sidebar .user-panel,
body.sidebar-mini.sidebar-collapse .left-side .user-panel {
  min-height: 56px;
  margin: 0 6px 8px;
  justify-content: center;
}

.sidebar-widget {
  margin: 0 12px 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-widget-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #edf9ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-widget-title i {
  margin-right: 6px;
}

.sidebar-widget-subtext {
  margin: 8px 0 10px;
  color: rgba(237, 249, 255, 0.82);
  font-size: 11px;
  line-height: 1.45;
}

.election-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #eef9ff;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.election-status-pill.state-live {
  border-color: rgba(13, 202, 240, 0.72);
  background: rgba(13, 202, 240, 0.24);
}

.election-status-pill.state-upcoming {
  border-color: rgba(13, 110, 253, 0.72);
  background: rgba(13, 110, 253, 0.24);
}

.election-status-pill.state-closed {
  border-color: rgba(111, 66, 193, 0.74);
  background: rgba(111, 66, 193, 0.24);
}

.election-status-pill.state-unscheduled {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-countdown-label {
  color: rgba(237, 249, 255, 0.78);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-countdown {
  margin-top: 6px;
  color: #f7fdff;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sidebar-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.sidebar-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #f1fbff !important;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-quick-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff !important;
}

.sidebar-link-list,
.sidebar-alert-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.sidebar-link-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sidebar-link-list li.empty {
  margin-bottom: 0;
  color: rgba(237, 249, 255, 0.76);
  font-size: 11px;
}

.sidebar-mini-link {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1fbff !important;
  font-size: 12px;
}

.sidebar-mini-link i {
  width: 14px;
  text-align: center;
  color: #9cefff;
}

.sidebar-mini-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-mini-link {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(241, 251, 255, 0.8);
  cursor: pointer;
}

.remove-mini-link:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.enhanced-sidebar-menu > .menu-group > a {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.enhanced-sidebar-menu .menu-group > a .pull-right-container .fa-angle-left {
  width: auto !important;
  height: auto !important;
  margin-right: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.enhanced-sidebar-menu .treeview-menu {
  padding-bottom: 6px;
}

.enhanced-sidebar-menu .treeview-menu > .menu-item-leaf > a {
  margin-left: 24px !important;
}

.enhanced-sidebar-menu .menu-item-link {
  display: flex !important;
  align-items: center;
}

.enhanced-sidebar-menu .menu-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enhanced-sidebar-menu .menu-meta {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sidebar-live-badge {
  background: rgba(13, 202, 240, 0.26) !important;
  border: 1px solid rgba(13, 202, 240, 0.56);
  color: #f3fcff !important;
  font-weight: 700;
}

.pin-link-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(241, 251, 255, 0.78);
  cursor: pointer;
}

.pin-link-btn:hover,
.pin-link-btn:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.pin-link-btn.is-pinned {
  color: #0dcaf0;
  background: rgba(13, 202, 240, 0.2);
}

.sidebar-alert-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-alert-item a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  color: #f2fbff !important;
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-alert-item a i {
  margin-top: 2px;
  width: 14px;
  text-align: center;
}

.sidebar-alert-item.alert-danger a {
  background: rgba(255, 110, 110, 0.2);
}

.sidebar-alert-item.alert-warning a {
  background: rgba(255, 193, 89, 0.22);
}

.sidebar-alert-item.alert-info a {
  background: rgba(13, 202, 240, 0.2);
}

.sidebar-alert-item.alert-success a {
  background: rgba(71, 214, 147, 0.2);
}

.sidebar-health-grid {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(241, 251, 255, 0.92);
  font-size: 12px;
}

.health-row strong {
  color: #f7fdff;
  font-weight: 700;
}

.health-row strong.health-good {
  color: #98f0ff;
}

.health-row strong.health-bad {
  color: #ffb3c8;
}

.box,
.small-box,
.jumbotron,
.results-box,
.modal-content,
.callout,
.alert,
.login-box,
.info-box,
.card-like,
.multi-cand {
  background: rgba(246, 248, 255, 0.9) !important;
  border: 1px solid rgba(13, 110, 253, 0.2) !important;
  color: var(--theme-text);
  box-shadow: 0 16px 30px rgba(31, 24, 66, 0.14);
}

.box-header,
.box-footer,
.modal-header,
.modal-footer {
  border-color: rgba(13, 110, 253, 0.2) !important;
}

.box-title,
.page-header,
.content-header > h1,
h1,
h2,
h3,
h4,
h5,
.title {
  color: #211941 !important;
}

.main-footer {
  background: linear-gradient(120deg, rgba(111, 66, 193, 0.94), rgba(102, 16, 242, 0.9)) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f8fbff !important;
}

.main-footer a,
.modern-footer .footer-right {
  color: #d8f7ff !important;
}

.btn-primary,
.btn-success,
.btn-info {
  background: linear-gradient(130deg, #0d6efd, #0dcaf0) !important;
  color: #f8fbff !important;
}

.btn-danger {
  background: linear-gradient(130deg, #6610f2, #6f42c1) !important;
  color: #fff !important;
}

.btn-warning {
  background: linear-gradient(130deg, #6f42c1, #6610f2) !important;
  color: #fff !important;
}

.btn-default,
.btn-flat {
  background: rgba(238, 242, 255, 0.92) !important;
  color: #231c44 !important;
  border: 1px solid rgba(13, 110, 253, 0.26) !important;
}

.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid rgba(13, 110, 253, 0.34) !important;
  background: rgba(248, 250, 255, 0.96) !important;
  color: #231c44 !important;
}

.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: rgba(102, 16, 242, 0.74) !important;
  box-shadow: 0 0 0 3px rgba(102, 16, 242, 0.18) !important;
}

.table > thead > tr > th {
  background: rgba(205, 236, 255, 0.86);
  border-bottom: 1px solid rgba(13, 110, 253, 0.32) !important;
  color: #26214f;
}

.table > tbody > tr > td {
  background: rgba(246, 248, 255, 0.76);
  border-top: 1px solid rgba(13, 110, 253, 0.18) !important;
}

.table-hover > tbody > tr:hover > td {
  background: rgba(223, 240, 255, 0.72);
}

.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.active a {
  background: linear-gradient(130deg, #0d6efd, #6610f2) !important;
  border-color: rgba(102, 16, 242, 0.6) !important;
  color: #f8fbff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button a {
  color: #2a2352 !important;
  background: rgba(241, 244, 255, 0.92) !important;
  border-color: rgba(13, 110, 253, 0.28) !important;
}

.bg-aqua {
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.28), rgba(13, 110, 253, 0.38)) !important;
}

.bg-green {
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.2), rgba(13, 110, 253, 0.34)) !important;
}

.bg-yellow {
  background: linear-gradient(130deg, rgba(13, 110, 253, 0.22), rgba(111, 66, 193, 0.34)) !important;
}

.bg-red {
  background: linear-gradient(130deg, rgba(102, 16, 242, 0.22), rgba(111, 66, 193, 0.34)) !important;
}

.small-box p,
.small-box h3,
.small-box-footer,
.status-card p {
  color: #26214f !important;
}

.small-box .icon i {
  color: rgba(43, 35, 86, 0.26) !important;
}

.alert-success {
  background: rgba(208, 243, 255, 0.94) !important;
  color: #0b4b7a !important;
  border-color: rgba(13, 202, 240, 0.4) !important;
}

.alert-danger,
.callout-danger {
  background: rgba(232, 222, 255, 0.92) !important;
  color: #4a238b !important;
  border-color: rgba(102, 16, 242, 0.34) !important;
}

.swal2-modern-popup {
  background: rgba(247, 249, 255, 0.96) !important;
  border: 1px solid rgba(13, 110, 253, 0.3) !important;
  color: #25204a !important;
}

.swal2-modern-title {
  color: #221c45 !important;
}

.swal2-modern-text {
  color: #504c78 !important;
}

.swal2-icon.swal2-success .swal2-success-ring,
.swal2-icon.swal2-warning,
.swal2-icon.swal2-error,
.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
  border-color: rgba(13, 110, 253, 0.5) !important;
  color: #0d6efd !important;
}

.swal2-timer-progress-bar {
  background: linear-gradient(90deg, #0dcaf0, #6610f2) !important;
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .main-header .navbar,
  .main-header .logo {
    background: #6610f2 !important;
  }

  .main-sidebar,
  .left-side {
    background: #0d6efd !important;
  }

  .main-footer {
    background: #6f42c1 !important;
  }
}

/* Admin Header Upgrade */
.admin-modern-header .logo {
  width: var(--admin-sidebar-width) !important;
}

.admin-modern-header .navbar {
  margin-left: 0 !important;
}

.admin-modern-header .navbar-custom-menu {
  float: right;
  width: calc(100% - 58px);
  max-width: calc(100% - 58px);
  overflow: visible;
}

.admin-modern-header .brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 188px;
}

.admin-modern-header .modern-toggle {
  width: 54px;
  text-align: center;
  transition: background 0.2s ease;
}

.admin-modern-header .navbar-custom-menu > .navbar-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: 100%;
  gap: 8px;
  margin-right: 10px;
  overflow: visible;
}

.admin-modern-header .navbar-custom-menu > .navbar-nav > li {
  float: none;
  flex: 0 0 auto;
}

.admin-modern-header .navbar-custom-menu > .navbar-nav > li.user-menu {
  margin-left: auto;
}

.admin-modern-header .navbar-custom-menu > .navbar-nav > li > a {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 14px !important;
  white-space: nowrap;
}

.header-pill > a {
  height: 34px !important;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-pill > a i {
  font-size: 13px;
}

.header-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0dcaf0;
  box-shadow: 0 0 0 6px rgba(13, 202, 240, 0.2);
}

.header-clock #adminHeaderClock {
  min-width: 82px;
  font-variant-numeric: tabular-nums;
}

.header-role-badge {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 202, 240, 0.5);
  background: rgba(13, 202, 240, 0.2);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-election-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.header-election-badge {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-election-badge.state-live {
  background: rgba(13, 202, 240, 0.2);
  border-color: rgba(13, 202, 240, 0.7);
}

.header-election-badge.state-upcoming {
  background: rgba(13, 110, 253, 0.22);
  border-color: rgba(13, 110, 253, 0.7);
}

.header-election-badge.state-closed {
  background: rgba(111, 66, 193, 0.22);
  border-color: rgba(111, 66, 193, 0.72);
}

.header-election-badge.state-unscheduled {
  background: rgba(255, 255, 255, 0.16);
}

.header-quick > a .fa-angle-down {
  opacity: 0.8;
}

.header-quick-menu {
  min-width: 220px;
  margin-top: 8px !important;
  border-radius: 14px;
  border: 1px solid rgba(13, 110, 253, 0.24);
  box-shadow: 0 18px 34px rgba(33, 27, 74, 0.2);
  overflow: hidden;
}

.header-quick-menu > li > a {
  padding: 10px 14px;
  color: #2a2352 !important;
  font-weight: 600;
}

.header-quick-menu > li > a i {
  width: 18px;
  text-align: center;
  margin-right: 8px;
  color: #0d6efd;
}

.header-quick-menu > li > a:hover {
  background: rgba(13, 202, 240, 0.12) !important;
}

.header-user-trigger {
  margin-top: 7px;
  height: 36px !important;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14) !important;
  margin-left: 4px;
  padding: 0 12px 0 8px !important;
  gap: 8px;
  justify-content: flex-start;
  min-width: 178px;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-user-name {
  display: inline-block !important;
  max-width: 188px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.header-user-trigger .fa-angle-down {
  opacity: 0.85;
}

.header-user-trigger:hover,
.header-user-trigger:focus {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 10px 18px rgba(16, 12, 42, 0.24);
}

.admin-modern-header .user-menu.open > .header-user-trigger {
  background: rgba(13, 202, 240, 0.22) !important;
  border-color: rgba(13, 202, 240, 0.58);
}

.admin-modern-header .user-menu .user-image {
  width: 28px;
  height: 28px;
  float: none;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 10px rgba(16, 12, 42, 0.25);
}

.admin-modern-header .navbar-nav > .user-menu > .dropdown-menu.admin-user-menu {
  right: 0;
  left: auto;
  margin-top: 10px !important;
  min-width: 250px;
  z-index: 1065;
}

.admin-modern-header .header-quick > .dropdown-menu.header-quick-menu {
  z-index: 1065;
}

.admin-user-menu {
  border: 1px solid rgba(13, 110, 253, 0.24);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(33, 27, 74, 0.2);
}

.admin-user-menu .user-header {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.9), rgba(102, 16, 242, 0.9));
}

.admin-user-menu .user-header p {
  color: #f8fbff;
}

.admin-user-menu .user-meta {
  display: block;
  margin-top: 6px;
  color: rgba(248, 251, 255, 0.88);
  letter-spacing: 0.03em;
}

.admin-user-menu .user-meta i {
  font-size: 8px;
  margin-right: 6px;
  color: #0dcaf0;
}

.admin-user-menu .user-footer {
  background: rgba(241, 244, 255, 0.9);
}

.main-sidebar .sidebar-menu > li.active > a::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-radius: 50%;
  background: #0dcaf0;
}

.main-sidebar .sidebar-menu > li > a {
  position: relative;
}

@media (max-width: 1780px) {
  .admin-modern-header .header-status {
    display: none !important;
  }

  .header-user-name {
    max-width: 174px;
  }
}

@media (max-width: 1650px) {
  .admin-modern-header .header-election,
  .admin-modern-header .header-clock {
    display: none !important;
  }

  .header-user-trigger {
    min-width: 166px;
  }
}

@media (max-width: 1520px) {
  .admin-modern-header .header-quick {
    display: none !important;
  }

  .header-user-name {
    max-width: 148px;
  }
}

@media (max-width: 1380px) {
  .admin-modern-header .header-pill.hidden-sm.hidden-xs {
    display: none !important;
  }

  .header-user-trigger {
    min-width: 152px;
  }
}

.content-header .breadcrumb > li > a {
  color: #4a3ea0;
}

.content-header .breadcrumb > .active {
  color: #6b7280;
}

.box .box-header.with-border {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.table td img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(13, 202, 240, 0.35);
  box-shadow: 0 6px 14px rgba(33, 27, 74, 0.14);
}

.table td .photo {
  margin-top: 8px;
  color: #6f42c1;
}

.table td .photo:hover {
  color: #6610f2;
}

.btn.btn-sm.btn-flat {
  padding: 6px 10px;
  border-radius: 10px !important;
}

.table td .btn + .btn {
  margin-left: 6px;
}

.candidate-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.candidate-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.candidate-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.box.has-sticky-toolbar .box-header.with-border {
  position: sticky;
  top: 0;
  z-index: 7;
  background: rgba(247, 249, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.box.has-sticky-toolbar .table > thead > tr > th {
  position: sticky;
  top: 58px;
  z-index: 6;
}

.box.table-sticky-head .table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.sidebar-mobile-backdrop {
  display: none;
}

.candidate-toolbar #positionFilter {
  min-width: 210px;
  border-radius: 10px !important;
}

#voterClassFilter,
#maxVoteFilter,
#ecUsernameFilter {
  min-width: 210px;
  border-radius: 10px !important;
}

#selectAllRows,
.row-select,
#selectAllVotersRows,
.row-select-voter,
#selectAllPositionsRows,
.row-select-position,
#selectAllEcRows,
.row-select-ec {
  width: 16px;
  height: 16px;
  accent-color: #0d6efd;
}

table.dataTable tbody tr.selected-row td {
  background: rgba(13, 202, 240, 0.16) !important;
}

.table tbody tr.selected-row td {
  background: rgba(13, 202, 240, 0.16) !important;
}

@media (max-width: 767px) {
  .admin-modern-header .navbar {
    margin-left: 0 !important;
  }

  .admin-modern-header .logo {
    width: 100% !important;
  }

  .admin-modern-header .navbar-custom-menu > .navbar-nav {
    gap: 0;
    margin-right: 0;
  }

  .candidate-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .candidate-toolbar-right {
    width: 100%;
  }

  .candidate-toolbar #positionFilter {
    min-width: 0;
    width: 100%;
  }

  .sidebar-widget {
    margin: 0 10px 10px;
    padding: 10px;
  }

  .sidebar-search-wrap {
    margin: 0 10px 10px;
  }

  .sidebar-quick-grid {
    grid-template-columns: 1fr;
  }

  .enhanced-sidebar-menu .treeview-menu > .menu-item-leaf > a {
    margin-left: 14px !important;
  }

  .header-user-trigger {
    border-left: 0;
    margin-left: 0;
    padding-left: 10px !important;
  }
}

/* Fixed Admin Layout: top header + scrollable sidebar/content */
body.sidebar-mini {
  overflow: hidden;
}

body.sidebar-mini .wrapper {
  height: 100vh;
  overflow: hidden;
}

body.sidebar-mini .main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
}

body.sidebar-mini .main-header .logo {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--admin-sidebar-width) !important;
  height: var(--admin-header-height) !important;
  line-height: var(--admin-header-height) !important;
}

body.sidebar-mini .main-header .navbar {
  position: fixed;
  top: 0;
  left: var(--admin-sidebar-width);
  right: 0;
  height: var(--admin-header-height);
  margin-left: 0 !important;
}

body.sidebar-mini .main-sidebar,
body.sidebar-mini .left-side {
  position: fixed;
  top: var(--admin-header-height);
  bottom: 0;
  width: var(--admin-sidebar-width);
  overflow-y: auto;
  overflow-x: hidden;
}

body.sidebar-mini .main-sidebar {
  z-index: 1035;
}

body.sidebar-mini .content-wrapper,
body.sidebar-mini .right-side {
  margin-top: var(--admin-header-height) !important;
  margin-left: var(--admin-sidebar-width) !important;
  height: calc(100vh - var(--admin-header-height) - var(--admin-footer-height)) !important;
  min-height: calc(100vh - var(--admin-header-height) - var(--admin-footer-height)) !important;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 18px;
}

body.sidebar-mini .main-footer {
  position: static;
  margin-left: var(--admin-sidebar-width);
  min-height: var(--admin-footer-height);
  height: auto;
  display: flex;
  align-items: center;
}

body.sidebar-mini.sidebar-collapse .main-header .logo {
  width: var(--admin-sidebar-collapsed-width) !important;
}

body.sidebar-mini.sidebar-collapse .main-header .navbar {
  left: var(--admin-sidebar-collapsed-width);
}

body.sidebar-mini.sidebar-collapse .main-sidebar,
body.sidebar-mini.sidebar-collapse .left-side {
  width: var(--admin-sidebar-collapsed-width);
}

body.sidebar-mini.sidebar-collapse .content-wrapper,
body.sidebar-mini.sidebar-collapse .right-side {
  margin-left: var(--admin-sidebar-collapsed-width) !important;
}

body.sidebar-mini.sidebar-collapse .main-footer {
  margin-left: var(--admin-sidebar-collapsed-width);
}

@media (min-width: 768px) {
  body.sidebar-mini.sidebar-collapse .main-sidebar,
  body.sidebar-mini.sidebar-collapse .left-side {
    overflow-x: visible;
  }
}

body.sidebar-mini .main-sidebar::-webkit-scrollbar,
body.sidebar-mini .content-wrapper::-webkit-scrollbar {
  width: 8px;
}

body.sidebar-mini .main-sidebar::-webkit-scrollbar-thumb,
body.sidebar-mini .content-wrapper::-webkit-scrollbar-thumb {
  background: rgba(13, 202, 240, 0.4);
  border-radius: 999px;
}

body.sidebar-mini .main-sidebar::-webkit-scrollbar-track,
body.sidebar-mini .content-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
  .sidebar-mobile-backdrop {
    display: block;
    position: fixed;
    top: calc(var(--admin-header-height) + var(--admin-header-height));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1042;
    background: rgba(13, 18, 41, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.sidebar-open .sidebar-mobile-backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.sidebar-mini {
    overflow: hidden;
  }

  body.sidebar-mini .main-header {
    height: calc(var(--admin-header-height) + var(--admin-header-height));
  }

  body.sidebar-mini .main-header .logo {
    width: 100% !important;
    top: 0;
  }

  body.sidebar-mini .main-header .navbar {
    top: var(--admin-header-height);
    left: 0;
  }

  body.sidebar-mini .main-sidebar,
  body.sidebar-mini .left-side {
    top: calc(var(--admin-header-height) + var(--admin-header-height));
    bottom: 0;
    width: var(--admin-sidebar-width);
    z-index: 1045;
  }

  body.sidebar-mini.sidebar-open .main-sidebar,
  body.sidebar-mini.sidebar-open .left-side {
    box-shadow: 18px 0 32px rgba(13, 18, 41, 0.38);
  }

  body.sidebar-mini .content-wrapper,
  body.sidebar-mini .right-side {
    margin-top: calc(var(--admin-header-height) + var(--admin-header-height)) !important;
    margin-left: 0 !important;
    height: calc(100vh - (var(--admin-header-height) + var(--admin-header-height)) - var(--admin-footer-height)) !important;
    min-height: calc(100vh - (var(--admin-header-height) + var(--admin-header-height)) - var(--admin-footer-height)) !important;
  }

  body.sidebar-mini .main-footer {
    margin-left: 0;
  }

  .box.has-sticky-toolbar .table > thead > tr > th,
  .box.table-sticky-head .table > thead > tr > th {
    top: 0;
  }
}

/* Theme Toggle + Global Dark Mode */
.theme-switch-item {
  display: inline-flex;
  align-items: center;
}

.theme-switch-item > .theme-toggle-btn,
.theme-toggle-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  height: 34px;
  margin-top: 8px;
  padding: 0 14px !important;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14) !important;
  color: #f7fbff !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-switch-item > .theme-toggle-btn:hover,
.theme-switch-item > .theme-toggle-btn:focus,
.theme-toggle-btn:hover,
.theme-toggle-btn:focus {
  color: #fff !important;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 10px 18px rgba(16, 12, 42, 0.24);
  outline: 0;
}

.theme-toggle-btn .fa,
.theme-toggle-fab .fa {
  font-size: 13px;
}

.theme-toggle-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  border: 0;
  border-radius: 999px;
  min-width: 118px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f7fbff;
  background: linear-gradient(130deg, #0d6efd, #6610f2);
  box-shadow: 0 16px 30px rgba(16, 12, 42, 0.32);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.theme-toggle-fab:hover,
.theme-toggle-fab:focus {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(16, 12, 42, 0.4);
  color: #fff;
  outline: 0;
}

@media (max-width: 767px) {
  .navbar-nav > .theme-switch-item > .theme-toggle-btn {
    margin-top: 0;
    min-width: 102px;
  }

  .theme-toggle-fab {
    right: 12px;
    bottom: 12px;
  }
}

html.dark-mode {
  color-scheme: dark;
}

html.dark-mode body,
body.dark-mode {
  background:
    radial-gradient(circle at 12% -4%, rgba(13, 202, 240, 0.16) 0%, rgba(13, 202, 240, 0) 40%),
    radial-gradient(circle at 100% 0%, rgba(111, 66, 193, 0.26) 0%, rgba(111, 66, 193, 0) 44%),
    linear-gradient(145deg, #0b132b, #111b3d 48%, #172858 100%) !important;
  color: #e7eeff !important;
}

html.dark-mode body::before,
body.dark-mode::before {
  background-image:
    linear-gradient(rgba(102, 16, 242, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 16, 242, 0.12) 1px, transparent 1px);
  opacity: 0.26;
}

html.dark-mode .wrapper,
html.dark-mode .content-wrapper,
html.dark-mode .right-side,
body.dark-mode .wrapper,
body.dark-mode .content-wrapper,
body.dark-mode .right-side {
  background: transparent !important;
}

html.dark-mode .main-header .navbar,
html.dark-mode .main-header .logo,
html.dark-mode .navbar.navbar-static-top,
body.dark-mode .main-header .navbar,
body.dark-mode .main-header .logo,
body.dark-mode .navbar.navbar-static-top {
  background: linear-gradient(120deg, rgba(13, 25, 62, 0.96), rgba(40, 29, 92, 0.92)) !important;
  border-color: rgba(13, 202, 240, 0.2) !important;
  box-shadow: 0 12px 26px rgba(5, 10, 26, 0.5) !important;
}

html.dark-mode .main-sidebar,
html.dark-mode .left-side,
body.dark-mode .main-sidebar,
body.dark-mode .left-side {
  background: linear-gradient(180deg, rgba(9, 30, 83, 0.97), rgba(40, 24, 93, 0.94)) !important;
  border-right-color: rgba(13, 202, 240, 0.24) !important;
}

html.dark-mode .main-footer,
body.dark-mode .main-footer {
  background: linear-gradient(110deg, rgba(13, 25, 62, 0.96), rgba(40, 29, 92, 0.92)) !important;
  border-top-color: rgba(13, 202, 240, 0.18) !important;
  color: #d8e4ff !important;
}

html.dark-mode .main-footer a,
body.dark-mode .main-footer a {
  color: #90dfff !important;
}

html.dark-mode .sidebar-menu > li > a,
html.dark-mode .sidebar-menu > li > a > span,
html.dark-mode .sidebar-menu > li.header,
html.dark-mode .user-panel > .info,
html.dark-mode .user-panel > .info > a,
body.dark-mode .sidebar-menu > li > a,
body.dark-mode .sidebar-menu > li > a > span,
body.dark-mode .sidebar-menu > li.header,
body.dark-mode .user-panel > .info,
body.dark-mode .user-panel > .info > a {
  color: #dfe9ff !important;
}

html.dark-mode .sidebar-menu > li > a:hover,
html.dark-mode .sidebar-menu > li.active > a,
body.dark-mode .sidebar-menu > li > a:hover,
body.dark-mode .sidebar-menu > li.active > a {
  background: rgba(13, 202, 240, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(13, 202, 240, 0.3);
}

html.dark-mode .sidebar-search-wrap .form-control,
html.dark-mode .sidebar-widget,
body.dark-mode .sidebar-search-wrap .form-control,
body.dark-mode .sidebar-widget {
  background: rgba(11, 28, 76, 0.7) !important;
  border-color: rgba(13, 202, 240, 0.28) !important;
  color: #e7eeff !important;
}

html.dark-mode .box,
html.dark-mode .small-box,
html.dark-mode .jumbotron,
html.dark-mode .results-box,
html.dark-mode .modal-content,
html.dark-mode .callout,
html.dark-mode .alert,
html.dark-mode .login-box,
html.dark-mode .info-box,
html.dark-mode .card-like,
html.dark-mode .multi-cand,
body.dark-mode .box,
body.dark-mode .small-box,
body.dark-mode .jumbotron,
body.dark-mode .results-box,
body.dark-mode .modal-content,
body.dark-mode .callout,
body.dark-mode .alert,
body.dark-mode .login-box,
body.dark-mode .info-box,
body.dark-mode .card-like,
body.dark-mode .multi-cand {
  background: rgba(14, 24, 53, 0.84) !important;
  border-color: rgba(13, 202, 240, 0.22) !important;
  box-shadow: 0 18px 32px rgba(5, 10, 26, 0.42) !important;
  color: #e7eeff !important;
}

html.dark-mode .box-title,
html.dark-mode .content-header > h1,
html.dark-mode .box h1,
html.dark-mode .box h2,
html.dark-mode .box h3,
html.dark-mode .small-box h3,
html.dark-mode .counter-total,
body.dark-mode .box-title,
body.dark-mode .content-header > h1,
body.dark-mode .box h1,
body.dark-mode .box h2,
body.dark-mode .box h3,
body.dark-mode .small-box h3,
body.dark-mode .counter-total {
  color: #edf3ff !important;
}

html.dark-mode .small-box p,
html.dark-mode p,
html.dark-mode .text-muted,
body.dark-mode .small-box p,
body.dark-mode p,
body.dark-mode .text-muted {
  color: #c6d3ef !important;
}

html.dark-mode .box-header,
html.dark-mode .box-footer,
html.dark-mode .modal-header,
html.dark-mode .modal-footer,
body.dark-mode .box-header,
body.dark-mode .box-footer,
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
  border-color: rgba(13, 202, 240, 0.2) !important;
}

html.dark-mode .box.box-solid > .box-header,
html.dark-mode .results-box .box-header,
body.dark-mode .box.box-solid > .box-header,
body.dark-mode .results-box .box-header {
  background: rgba(18, 33, 71, 0.75) !important;
  color: #e9f1ff !important;
}

html.dark-mode .table,
html.dark-mode .table > tbody > tr > td,
html.dark-mode .table > tbody > tr > th,
body.dark-mode .table,
body.dark-mode .table > tbody > tr > td,
body.dark-mode .table > tbody > tr > th {
  color: #e7eeff !important;
  border-color: rgba(13, 202, 240, 0.15) !important;
}

html.dark-mode .table > thead > tr > th,
body.dark-mode .table > thead > tr > th {
  background: rgba(18, 33, 71, 0.72) !important;
  color: #e9f1ff !important;
  border-color: rgba(13, 202, 240, 0.24) !important;
}

html.dark-mode .table-hover > tbody > tr:hover > td,
body.dark-mode .table-hover > tbody > tr:hover > td {
  background: rgba(13, 202, 240, 0.14) !important;
}

html.dark-mode .pagination > li > a,
html.dark-mode .pagination > li > span,
body.dark-mode .pagination > li > a,
body.dark-mode .pagination > li > span {
  background: rgba(14, 24, 53, 0.9) !important;
  border-color: rgba(13, 202, 240, 0.24) !important;
  color: #d5e1ff !important;
}

html.dark-mode .form-control,
html.dark-mode .select2-selection,
html.dark-mode .input-group-addon,
body.dark-mode .form-control,
body.dark-mode .select2-selection,
body.dark-mode .input-group-addon {
  background: rgba(12, 23, 53, 0.9) !important;
  border-color: rgba(13, 202, 240, 0.26) !important;
  color: #eaf1ff !important;
}

html.dark-mode .form-control::placeholder,
body.dark-mode .form-control::placeholder {
  color: #9db2dd !important;
}

html.dark-mode .form-control:focus,
body.dark-mode .form-control:focus {
  border-color: rgba(13, 202, 240, 0.76) !important;
  box-shadow: 0 0 0 3px rgba(13, 202, 240, 0.2) !important;
}

html.dark-mode .btn-default,
body.dark-mode .btn-default {
  background: rgba(18, 33, 71, 0.88) !important;
  color: #dce8ff !important;
  border: 1px solid rgba(13, 202, 240, 0.28) !important;
}

html.dark-mode .btn-primary,
html.dark-mode .btn-info,
html.dark-mode .btn-success,
body.dark-mode .btn-primary,
body.dark-mode .btn-info,
body.dark-mode .btn-success {
  background: linear-gradient(130deg, #0d6efd, #6610f2) !important;
  color: #fff !important;
}

html.dark-mode .dropdown-menu,
body.dark-mode .dropdown-menu {
  background: rgba(14, 24, 53, 0.96) !important;
  border: 1px solid rgba(13, 202, 240, 0.26) !important;
  box-shadow: 0 20px 34px rgba(5, 10, 26, 0.45) !important;
}

html.dark-mode .dropdown-menu > li > a,
body.dark-mode .dropdown-menu > li > a {
  color: #dce8ff !important;
}

html.dark-mode .dropdown-menu > li > a:hover,
body.dark-mode .dropdown-menu > li > a:hover {
  background: rgba(13, 202, 240, 0.16) !important;
}

html.dark-mode .theme-toggle-fab,
body.dark-mode .theme-toggle-fab {
  background: linear-gradient(130deg, #0dcaf0, #0d6efd);
  color: #fff;
}

html.dark-mode .swal2-modern-popup,
body.dark-mode .swal2-modern-popup {
  background: rgba(14, 24, 53, 0.92) !important;
  border: 1px solid rgba(13, 202, 240, 0.28) !important;
  box-shadow: 0 22px 40px rgba(5, 10, 26, 0.52) !important;
}

html.dark-mode .swal2-modern-title,
html.dark-mode .swal2-modern-text,
body.dark-mode .swal2-modern-title,
body.dark-mode .swal2-modern-text {
  color: #eaf1ff !important;
}

/* Global Loading State */
html.is-page-loading,
html.is-page-loading body {
  overflow: hidden !important;
}

.vs-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(13, 202, 240, 0.18) 0%, rgba(13, 202, 240, 0) 40%),
    radial-gradient(circle at 85% 4%, rgba(102, 16, 242, 0.16) 0%, rgba(102, 16, 242, 0) 42%),
    rgba(14, 19, 42, 0.52);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.vs-loader-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vs-loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #0dcaf0, #0d6efd, #6610f2);
  box-shadow: 0 0 16px rgba(13, 202, 240, 0.62);
  transform-origin: left center;
  animation: vs-loader-progress 1.3s ease-in-out infinite;
}

.vs-loader-card {
  min-width: 280px;
  max-width: 360px;
  padding: 22px 26px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(18, 32, 71, 0.86);
  box-shadow: 0 22px 38px rgba(8, 12, 28, 0.46);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.vs-loader-ring {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-top-color: #0dcaf0;
  border-right-color: #6610f2;
  border-radius: 50%;
  animation: vs-loader-spin 0.8s linear infinite;
}

.vs-loader-text {
  color: #ecf3ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@keyframes vs-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes vs-loader-progress {
  0% {
    transform: scaleX(0.12);
    left: 0;
  }

  50% {
    transform: scaleX(1);
    left: 22%;
  }

  100% {
    transform: scaleX(0.18);
    left: 78%;
  }
}

html.dark-mode .vs-loader-overlay,
body.dark-mode .vs-loader-overlay {
  background:
    radial-gradient(circle at 10% 0%, rgba(13, 202, 240, 0.2) 0%, rgba(13, 202, 240, 0) 42%),
    radial-gradient(circle at 100% 0%, rgba(102, 16, 242, 0.22) 0%, rgba(102, 16, 242, 0) 44%),
    rgba(8, 12, 30, 0.62);
}

html.dark-mode .vs-loader-card,
body.dark-mode .vs-loader-card {
  border-color: rgba(13, 202, 240, 0.32);
  background: rgba(11, 20, 45, 0.92);
}

/* Election Closed Page */
.election-closed-shell {
  position: relative;
  overflow: hidden;
}

.election-closed-shell::before,
.election-closed-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.election-closed-shell::before {
  width: 260px;
  height: 260px;
  top: 8%;
  left: -120px;
  background: radial-gradient(circle, rgba(13, 202, 240, 0.2), rgba(13, 202, 240, 0));
}

.election-closed-shell::after {
  width: 260px;
  height: 260px;
  right: -120px;
  bottom: 4%;
  background: radial-gradient(circle, rgba(102, 16, 242, 0.2), rgba(102, 16, 242, 0));
}

.election-closed-card {
  position: relative;
  z-index: 1;
  max-width: 920px;
  padding: 28px 30px 24px;
  border-radius: 22px !important;
  animation: electionClosedReveal 0.45s ease both;
}

.election-closed-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(102, 16, 242, 0.34);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.18), rgba(102, 16, 242, 0.2));
  color: #31285f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: electionClosedPulse 1.9s ease-in-out infinite;
}

.election-closed-pill {
  max-width: 360px;
  margin: 12px auto 0;
  font-weight: 700;
  color: #31285f;
}

.election-closed-meta,
.election-closed-kpis {
  margin-top: 16px;
}

.election-meta-item,
.election-kpi {
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(247, 250, 255, 0.82);
  box-shadow: 0 12px 24px rgba(31, 25, 70, 0.1);
  padding: 12px 14px;
}

.election-meta-label,
.election-kpi-label {
  display: block;
  margin-bottom: 4px;
  color: #50507d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.election-meta-item strong {
  display: block;
  font-size: 14px;
  color: #24214f;
}

.election-kpi {
  text-align: center;
}

.election-kpi-value {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: #27225a;
  line-height: 1.1;
}

.election-closed-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.election-closed-actions .btn {
  min-width: 158px;
}

.not-voting-card {
  max-width: 980px;
}

.status-upcoming-badge {
  border-color: rgba(13, 110, 253, 0.34);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.2), rgba(13, 110, 253, 0.24));
}

.election-upcoming-countdown {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown-segment {
  border-radius: 14px;
  border: 1px solid rgba(13, 110, 253, 0.28);
  background: rgba(248, 251, 255, 0.85);
  box-shadow: 0 12px 22px rgba(32, 24, 69, 0.1);
  padding: 10px 8px;
  text-align: center;
}

.countdown-segment span {
  display: block;
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  font-weight: 800;
  color: #1f2b67;
  line-height: 1.1;
}

.countdown-segment small {
  display: block;
  margin-top: 4px;
  color: #59608f;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.election-upcoming-hint {
  margin-top: 10px;
  color: #334282;
  font-weight: 700;
}

.election-upcoming-actions .btn i {
  margin-right: 6px;
}

@keyframes electionClosedReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes electionClosedPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(13, 202, 240, 0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(13, 202, 240, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .election-closed-card,
  .election-closed-badge {
    animation: none !important;
  }
}

html.dark-mode .election-closed-badge,
body.dark-mode .election-closed-badge {
  border-color: rgba(13, 202, 240, 0.4);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.22), rgba(102, 16, 242, 0.24));
  color: #dbe9ff;
}

html.dark-mode .election-closed-pill,
body.dark-mode .election-closed-pill {
  color: #dce9ff;
}

html.dark-mode .status-upcoming-badge,
body.dark-mode .status-upcoming-badge {
  border-color: rgba(13, 202, 240, 0.4);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.22), rgba(13, 110, 253, 0.25));
}

html.dark-mode .election-meta-item,
html.dark-mode .election-kpi,
body.dark-mode .election-meta-item,
body.dark-mode .election-kpi {
  border-color: rgba(13, 202, 240, 0.24);
  background: rgba(12, 24, 56, 0.86);
  box-shadow: 0 14px 26px rgba(4, 9, 22, 0.42);
}

html.dark-mode .election-meta-label,
html.dark-mode .election-kpi-label,
body.dark-mode .election-meta-label,
body.dark-mode .election-kpi-label {
  color: #9fb5df;
}

html.dark-mode .election-meta-item strong,
html.dark-mode .election-kpi-value,
body.dark-mode .election-meta-item strong,
body.dark-mode .election-kpi-value {
  color: #e6efff;
}

html.dark-mode .countdown-segment,
body.dark-mode .countdown-segment {
  border-color: rgba(13, 202, 240, 0.28);
  background: rgba(11, 24, 56, 0.88);
  box-shadow: 0 14px 24px rgba(4, 9, 22, 0.42);
}

html.dark-mode .countdown-segment span,
body.dark-mode .countdown-segment span {
  color: #dfeaff;
}

html.dark-mode .countdown-segment small,
body.dark-mode .countdown-segment small {
  color: #a0b4dc;
}

html.dark-mode .election-upcoming-hint,
body.dark-mode .election-upcoming-hint {
  color: #aac2ed;
}

@media (max-width: 767px) {
  .election-closed-card {
    padding: 22px 14px 18px;
    border-radius: 16px !important;
  }

  .election-closed-actions .btn {
    min-width: 100%;
  }

  .election-upcoming-countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Public Counter + Verification */
.public-dashboard-shell {
  padding-top: 8px;
  padding-bottom: 8px;
}

.public-hero-card {
  border-radius: 20px;
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(247, 250, 255, 0.84);
  box-shadow: 0 16px 28px rgba(25, 20, 59, 0.12);
  padding: 20px 20px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.public-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.public-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(13, 202, 240, 0.38);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.22), rgba(13, 110, 253, 0.2));
  color: #28316c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.public-hero-updated {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(102, 16, 242, 0.22);
  background: rgba(102, 16, 242, 0.1);
  color: #40347a;
  font-size: 12px;
  font-weight: 700;
}

.public-hero-updated strong {
  color: #1f2b67;
}

.public-hero-subtext {
  margin: 8px auto 0;
  max-width: 680px;
  color: #38457e;
  font-weight: 600;
}

.public-hero-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.public-kpi-row {
  margin-left: -6px;
  margin-right: -6px;
}

.public-kpi-row > [class*='col-'] {
  padding-left: 6px;
  padding-right: 6px;
  margin-bottom: 12px;
}

.live-counter-card .box-header.with-border {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.counter-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 253, 0.28);
  background: rgba(243, 247, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  color: #29335e;
}

.counter-progress-wrap {
  margin: 16px auto 4px;
  max-width: 520px;
}

.counter-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.12);
  overflow: hidden;
}

.counter-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0dcaf0, #0d6efd, #6610f2);
  transition: width 0.36s ease;
}

.counter-progress-text {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #32407d;
}

.counter-hero-card {
  position: relative;
  overflow: hidden;
}

.counter-hero-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -90px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(102, 16, 242, 0.22) 0%, rgba(102, 16, 242, 0) 65%);
}

.counter-live-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.counter-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 202, 240, 0.42);
  background: rgba(13, 202, 240, 0.14);
  color: #1e5270;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.counter-live-chip .fa-circle {
  font-size: 8px;
  color: #11be7a;
  animation: counterPulseLive 1.5s ease-in-out infinite;
}

.counter-kpi-card {
  position: relative;
  overflow: hidden;
  border-width: 1px !important;
}

.counter-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0dcaf0, #0d6efd, #6610f2);
}

.counter-kpi-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(13, 110, 253, 0.26);
  background: rgba(13, 110, 253, 0.1);
  color: #2c3b77;
  font-size: 13px;
}

.counter-meta-item {
  position: relative;
  padding-left: 16px;
}

.counter-meta-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0dcaf0, #6610f2);
}

.counter-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: center;
}

.counter-stage-left {
  border-radius: 16px;
  border: 1px solid rgba(13, 110, 253, 0.2);
  background:
    linear-gradient(135deg, rgba(102, 16, 242, 0.06), rgba(13, 202, 240, 0.06)),
    rgba(251, 252, 255, 0.85);
  padding: 10px 10px 8px;
}

.counter-digit-stage {
  min-height: 130px;
  align-items: center;
  justify-content: center;
}

.live-counter-card .counter-digit-stage .digit-box {
  width: clamp(78px, 12vw, 104px);
  height: clamp(96px, 14vw, 118px);
  line-height: clamp(96px, 14vw, 118px);
  font-size: clamp(2.2rem, 4vw, 3rem);
  border-radius: 18px;
  border-color: rgba(102, 16, 242, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 244, 255, 0.92));
  box-shadow: 0 14px 24px rgba(20, 14, 54, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.counter-digit-stage.is-fresh .digit-box {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(20, 14, 54, 0.24);
}

.counter-stage-note {
  margin-top: 6px;
  color: #4a5a92;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.counter-stage-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.counter-turnout-ring {
  --turnout: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, rgba(247, 249, 255, 0.96) 72%, transparent 73% 100%),
    conic-gradient(#0dcaf0 calc(var(--turnout) * 1%), #0d6efd calc(var(--turnout) * 1% + 12%), #6610f2 calc(var(--turnout) * 1% + 28%), rgba(13, 110, 253, 0.16) 0);
  box-shadow: 0 18px 30px rgba(21, 16, 56, 0.16), inset 0 0 0 8px rgba(255, 255, 255, 0.5);
  transition: background 0.42s ease;
}

.counter-turnout-ring-core {
  text-align: center;
}

.counter-turnout-ring-core span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #22306a;
  line-height: 1.05;
}

.counter-turnout-ring-core small {
  color: #55639a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
}

@keyframes counterPulseLive {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.verification-modern-card .box-header.with-border {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.verification-state-tag {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 253, 0.3);
  background: rgba(13, 110, 253, 0.1);
  color: #334184;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.verification-state-tag.is-success {
  border-color: rgba(13, 202, 240, 0.5);
  background: rgba(13, 202, 240, 0.16);
  color: #12526d;
}

.verification-state-tag.is-danger {
  border-color: rgba(102, 16, 242, 0.42);
  background: rgba(102, 16, 242, 0.16);
  color: #4f2d8d;
}

.verification-modern-body {
  padding-top: 10px;
}

.verification-result-mount {
  position: relative;
  min-height: 96px;
}

.verification-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.verification-search-form.is-loading {
  opacity: 0.86;
}

.verification-search-form.is-loading .form-control {
  cursor: wait;
}

.verification-search-form.is-loading .btn {
  pointer-events: none;
}

.verification-modern-card.is-loading .verification-result-mount::after {
  content: "Verifying voter record...";
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(13, 110, 253, 0.34);
  background: rgba(246, 249, 255, 0.76);
  color: #2f3b77;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 10px 12px;
  z-index: 2;
}

.verification-input-wrap {
  position: relative;
  flex: 1 1 260px;
}

.verification-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #3e5395;
}

.verification-input-wrap .form-control {
  padding-left: 38px;
  min-height: 44px;
}

.verification-inline-note {
  margin: 8px 0 0;
  color: #4c5d99;
  font-size: 12px;
  font-weight: 700;
}

.verification-inline-note i {
  margin-right: 6px;
}

.verification-result-card {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(246, 249, 255, 0.84);
  box-shadow: 0 12px 24px rgba(28, 23, 66, 0.1);
  padding: 14px 14px 12px;
  animation: verificationResultReveal 0.24s ease;
}

.verification-result-card h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 800;
  color: #25306b;
}

.verification-result-tools {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.verification-copy-btn i {
  margin-right: 6px;
}

.verification-result-card.is-success h4 {
  color: #0f5f80;
}

.verification-result-card.is-danger h4 {
  color: #6a2f9b;
}

.verification-result-grid > [class*='col-'] {
  margin-bottom: 10px;
}

.verification-result-item {
  border-radius: 12px;
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(252, 253, 255, 0.88);
  padding: 10px 12px;
  min-height: 84px;
}

.verification-result-item span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6290;
}

.verification-result-item strong {
  display: block;
  margin-top: 5px;
  color: #212a63;
  font-size: 1.05rem;
  line-height: 1.3;
  word-break: break-word;
}

.verification-result-help {
  margin: 0;
  color: #5d4e91;
  font-weight: 600;
}

.verification-result-time {
  margin-top: 8px;
  color: #55608a;
  font-size: 12px;
  font-weight: 600;
}

.verification-action-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.verification-empty-state {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(13, 110, 253, 0.3);
  background: rgba(244, 248, 255, 0.76);
  padding: 16px;
  text-align: center;
  color: #495792;
  animation: verificationResultReveal 0.24s ease;
}

.verification-empty-state i {
  font-size: 20px;
  margin-bottom: 8px;
  color: #0d6efd;
}

.verification-empty-state p {
  margin: 0;
  font-weight: 600;
}

.verification-footer-note {
  margin-top: 12px;
  color: #4a5c95;
  font-size: 12px;
  font-weight: 700;
}

.verification-shell .content {
  padding-left: 8px;
  padding-right: 8px;
}

.verification-hero-card .title {
  line-height: 1.16;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.verification-modern-card .box-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.28;
}

.verification-result-tools .btn,
.verification-action-row .btn {
  min-height: 36px;
}

@keyframes verificationResultReveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.dark-mode .public-hero-card,
body.dark-mode .public-hero-card {
  border-color: rgba(13, 202, 240, 0.24);
  background: rgba(13, 25, 58, 0.86);
  box-shadow: 0 18px 30px rgba(4, 9, 22, 0.42);
}

html.dark-mode .public-hero-badge,
body.dark-mode .public-hero-badge {
  border-color: rgba(13, 202, 240, 0.42);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.24), rgba(13, 110, 253, 0.26));
  color: #d6e7ff;
}

html.dark-mode .public-hero-updated,
body.dark-mode .public-hero-updated {
  border-color: rgba(13, 202, 240, 0.28);
  background: rgba(13, 202, 240, 0.12);
  color: #b8d3fb;
}

html.dark-mode .public-hero-updated strong,
html.dark-mode .public-hero-subtext,
html.dark-mode .counter-progress-text,
html.dark-mode .verification-footer-note,
body.dark-mode .public-hero-updated strong,
body.dark-mode .public-hero-subtext,
body.dark-mode .counter-progress-text,
body.dark-mode .verification-footer-note {
  color: #b7cbef;
}

html.dark-mode .public-hero-card .page-header,
html.dark-mode .public-hero-card .title,
body.dark-mode .public-hero-card .page-header,
body.dark-mode .public-hero-card .title {
  color: #edf4ff !important;
  text-shadow: 0 10px 24px rgba(13, 202, 240, 0.22);
}

html.dark-mode .counter-hero-card .title,
body.dark-mode .counter-hero-card .title {
  background: linear-gradient(90deg, #edf4ff 0%, #a8d6ff 48%, #d5c4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

html.dark-mode .counter-inline-label,
body.dark-mode .counter-inline-label {
  border-color: rgba(13, 202, 240, 0.28);
  background: rgba(11, 24, 56, 0.9);
  color: #dce9ff;
}

html.dark-mode .counter-live-chip,
body.dark-mode .counter-live-chip {
  border-color: rgba(13, 202, 240, 0.44);
  background: rgba(13, 202, 240, 0.16);
  color: #b8e5ff;
}

html.dark-mode .counter-kpi-icon,
body.dark-mode .counter-kpi-icon {
  border-color: rgba(13, 202, 240, 0.34);
  background: rgba(13, 202, 240, 0.14);
  color: #bee0ff;
}

html.dark-mode .counter-meta-item::before,
body.dark-mode .counter-meta-item::before {
  background: linear-gradient(180deg, #0dcaf0, #6f42c1);
}

html.dark-mode .counter-stage-left,
body.dark-mode .counter-stage-left {
  border-color: rgba(13, 202, 240, 0.22);
  background:
    linear-gradient(135deg, rgba(102, 16, 242, 0.16), rgba(13, 202, 240, 0.14)),
    rgba(11, 24, 56, 0.86);
}

html.dark-mode .live-counter-card .counter-digit-stage .digit-box,
body.dark-mode .live-counter-card .counter-digit-stage .digit-box {
  border-color: rgba(13, 202, 240, 0.28);
  background: linear-gradient(180deg, rgba(14, 27, 62, 0.92), rgba(9, 19, 45, 0.92));
  color: #e8f1ff;
  box-shadow: 0 14px 24px rgba(3, 8, 20, 0.44);
}

html.dark-mode .counter-stage-note,
body.dark-mode .counter-stage-note {
  color: #9cb5dd;
}

html.dark-mode .counter-turnout-ring,
body.dark-mode .counter-turnout-ring {
  background:
    radial-gradient(closest-side, rgba(10, 22, 52, 0.96) 72%, transparent 73% 100%),
    conic-gradient(#0dcaf0 calc(var(--turnout) * 1%), #0d6efd calc(var(--turnout) * 1% + 12%), #6610f2 calc(var(--turnout) * 1% + 28%), rgba(13, 202, 240, 0.18) 0);
  box-shadow: 0 20px 30px rgba(4, 9, 22, 0.46), inset 0 0 0 8px rgba(14, 27, 62, 0.5);
}

html.dark-mode .counter-turnout-ring-core span,
body.dark-mode .counter-turnout-ring-core span {
  color: #e5efff;
}

html.dark-mode .counter-turnout-ring-core small,
body.dark-mode .counter-turnout-ring-core small {
  color: #a3b8de;
}

html.dark-mode .counter-progress-track,
body.dark-mode .counter-progress-track {
  background: rgba(13, 202, 240, 0.16);
}

html.dark-mode .verification-state-tag,
body.dark-mode .verification-state-tag {
  border-color: rgba(13, 202, 240, 0.32);
  background: rgba(13, 202, 240, 0.14);
  color: #c6ddff;
}

html.dark-mode .verification-state-tag.is-success,
body.dark-mode .verification-state-tag.is-success {
  border-color: rgba(13, 202, 240, 0.5);
  background: rgba(13, 202, 240, 0.2);
  color: #8fe1ff;
}

html.dark-mode .verification-state-tag.is-danger,
body.dark-mode .verification-state-tag.is-danger {
  border-color: rgba(102, 16, 242, 0.44);
  background: rgba(102, 16, 242, 0.2);
  color: #d3bcff;
}

html.dark-mode .verification-input-wrap i,
body.dark-mode .verification-input-wrap i {
  color: #9ebae5;
}

html.dark-mode .verification-inline-note,
body.dark-mode .verification-inline-note {
  color: #9fb6df;
}

html.dark-mode .verification-result-card,
html.dark-mode .verification-result-item,
html.dark-mode .verification-empty-state,
body.dark-mode .verification-result-card,
body.dark-mode .verification-result-item,
body.dark-mode .verification-empty-state {
  border-color: rgba(13, 202, 240, 0.24);
  background: rgba(11, 24, 56, 0.88);
  box-shadow: 0 14px 24px rgba(4, 9, 22, 0.42);
}

html.dark-mode .verification-result-card h4,
html.dark-mode .verification-result-item strong,
body.dark-mode .verification-result-card h4,
body.dark-mode .verification-result-item strong {
  color: #e3ecff;
}

html.dark-mode .verification-result-item span,
html.dark-mode .verification-result-time,
html.dark-mode .verification-empty-state,
html.dark-mode .verification-result-help,
body.dark-mode .verification-result-item span,
body.dark-mode .verification-result-time,
body.dark-mode .verification-empty-state,
body.dark-mode .verification-result-help {
  color: #a6bbdf;
}

html.dark-mode .verification-copy-btn,
body.dark-mode .verification-copy-btn {
  border-color: rgba(13, 202, 240, 0.3) !important;
  background: rgba(13, 202, 240, 0.12) !important;
  color: #c9e1ff !important;
}

html.dark-mode .verification-modern-card.is-loading .verification-result-mount::after,
body.dark-mode .verification-modern-card.is-loading .verification-result-mount::after {
  border-color: rgba(13, 202, 240, 0.34);
  background: rgba(11, 24, 56, 0.86);
  color: #bad4fa;
}

@media (max-width: 767px) {
  .public-hero-card {
    padding: 16px 12px 14px;
  }

  .verification-shell .content {
    padding-left: 0;
    padding-right: 0;
  }

  .public-hero-top {
    justify-content: center;
  }

  .public-hero-actions .btn {
    width: 100%;
  }

  .counter-inline-label {
    width: 100%;
    justify-content: center;
  }

  .counter-live-chip-wrap {
    justify-content: center;
  }

  .counter-stage-grid {
    grid-template-columns: 1fr;
  }

  .counter-turnout-ring {
    width: 152px;
    height: 152px;
  }

  .counter-turnout-ring-core span {
    font-size: 1.7rem;
  }

  .verification-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .verification-search-form .btn {
    width: 100%;
  }

  .verification-modern-card .box-header.with-border {
    flex-direction: column;
    align-items: flex-start;
  }

  .verification-state-tag {
    margin-top: 2px;
  }

  .verification-result-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verification-result-tools .btn {
    width: 100%;
  }

  .verification-result-item {
    min-height: 0;
  }

  .verification-result-time {
    font-size: 11px;
    line-height: 1.45;
  }

  .verification-modern-card.is-loading .verification-result-mount::after {
    top: 12px;
    font-size: 11px;
    padding: 9px 10px;
  }

  .verification-action-row .btn {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .verification-shell .content {
    padding-left: 4px;
    padding-right: 4px;
  }

  .verification-hero-card {
    padding: 18px 14px 14px;
  }

  .verification-result-card {
    padding: 12px 12px 10px;
  }

  .verification-result-item strong {
    font-size: 1rem;
  }
}

@media (max-width: 575px) {
  .verification-shell .content {
    padding-left: 0;
    padding-right: 0;
  }

  .verification-hero-card {
    border-radius: 16px;
  }

  .verification-shell .title {
    font-size: clamp(1.34rem, 7vw, 1.95rem) !important;
    letter-spacing: 0.01em;
  }

  .verification-hero-card .public-hero-top {
    justify-content: center;
  }

  .verification-hero-card .public-hero-badge,
  .verification-hero-card .public-hero-updated {
    width: 100%;
    justify-content: center;
  }

  .verification-result-tools {
    grid-template-columns: 1fr;
  }

  .verification-inline-note {
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .verification-shell .title {
    font-size: clamp(1.2rem, 7.6vw, 1.6rem) !important;
  }

  .verification-hero-card .public-hero-subtext {
    font-size: 13px;
  }

  .verification-state-tag {
    font-size: 10px;
    padding: 4px 10px;
  }
}

/* Auth Entry (Admin + EC) */
.login-page.auth-entry {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(18px, 4vh, 38px) 14px;
  margin: 0 !important;
  display: grid !important;
  place-items: center;
  overflow-x: hidden;
}

.auth-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto !important;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
  gap: 16px;
}

.auth-brand-card,
.auth-login-card.login-box {
  border-radius: 20px !important;
  border: 1px solid rgba(13, 110, 253, 0.24) !important;
  background: rgba(248, 251, 255, 0.9) !important;
  box-shadow: 0 16px 30px rgba(22, 16, 51, 0.12);
}

.auth-brand-card {
  padding: 22px 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(13, 202, 240, 0.14) 0%, rgba(13, 202, 240, 0) 48%),
    rgba(248, 251, 255, 0.9) !important;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(13, 202, 240, 0.42);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.22), rgba(13, 110, 253, 0.18));
  color: #23306d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-brand-card h1 {
  margin: 12px 0 4px;
  color: #251f54 !important;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-brand-subtitle {
  margin: 0;
  color: #3c4e8f;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-brand-text {
  margin-top: 10px;
  margin-bottom: 0;
  color: #4e5c95;
  font-weight: 600;
  line-height: 1.58;
}

.auth-highlight-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auth-highlight-grid span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(13, 110, 253, 0.2);
  background: rgba(243, 248, 255, 0.88);
  color: #29407d;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.auth-brand-links {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-brand-links .btn {
  min-height: 38px;
  min-width: 152px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-login-card.login-box {
  margin: 0;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.auth-login-head {
  padding: 16px 18px 0;
}

.auth-login-head .login-logo {
  margin-bottom: 8px;
  text-align: left;
}

.auth-login-head .login-logo b {
  font-size: clamp(1.28rem, 2.5vw, 1.75rem);
  letter-spacing: 0.03em;
  color: #392f72;
}

.auth-entry .login-box-msg {
  margin-bottom: 12px;
  text-align: left;
  color: #566090;
  font-weight: 600;
}

.auth-login-body {
  padding: 8px 18px 20px;
}

.auth-form .form-group {
  margin-bottom: 12px;
}

.auth-form .form-control {
  min-height: 44px;
}

.auth-password-field {
  position: relative;
}

.auth-password-field .form-control {
  padding-right: 44px;
}

.auth-password-field .form-control-feedback {
  right: 44px;
}

.auth-password-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(13, 110, 253, 0.12);
  color: #314785;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  background: rgba(13, 110, 253, 0.2);
  color: #1f2f67;
}

.auth-password-toggle:focus {
  outline: 0;
}

.auth-error-callout {
  margin-top: 12px;
  padding: 10px 12px;
}

html.dark-mode .auth-brand-card,
html.dark-mode .auth-login-card.login-box,
body.dark-mode .auth-brand-card,
body.dark-mode .auth-login-card.login-box {
  border-color: rgba(13, 202, 240, 0.24) !important;
  background: rgba(11, 24, 56, 0.88) !important;
  box-shadow: 0 20px 34px rgba(4, 9, 22, 0.42);
}

html.dark-mode .auth-brand-card,
body.dark-mode .auth-brand-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(13, 202, 240, 0.16) 0%, rgba(13, 202, 240, 0) 48%),
    rgba(11, 24, 56, 0.88) !important;
}

html.dark-mode .auth-brand-badge,
body.dark-mode .auth-brand-badge {
  border-color: rgba(13, 202, 240, 0.44);
  background: linear-gradient(130deg, rgba(13, 202, 240, 0.24), rgba(13, 110, 253, 0.22));
  color: #d0e6ff;
}

html.dark-mode .auth-brand-card h1,
body.dark-mode .auth-brand-card h1 {
  color: #e9f2ff !important;
}

html.dark-mode .auth-brand-subtitle,
html.dark-mode .auth-brand-text,
html.dark-mode .auth-entry .login-box-msg,
body.dark-mode .auth-brand-subtitle,
body.dark-mode .auth-brand-text,
body.dark-mode .auth-entry .login-box-msg {
  color: #afc2e6;
}

html.dark-mode .auth-highlight-grid span,
body.dark-mode .auth-highlight-grid span {
  border-color: rgba(13, 202, 240, 0.24);
  background: rgba(13, 26, 58, 0.86);
  color: #d3e7ff;
}

html.dark-mode .auth-password-toggle,
body.dark-mode .auth-password-toggle {
  background: rgba(13, 202, 240, 0.16);
  color: #cce2ff;
}

html.dark-mode .auth-password-toggle:hover,
html.dark-mode .auth-password-toggle:focus,
body.dark-mode .auth-password-toggle:hover,
body.dark-mode .auth-password-toggle:focus {
  background: rgba(13, 202, 240, 0.26);
  color: #f0f6ff;
}

@media (max-width: 991px) {
  .auth-shell {
    margin-top: 0;
    grid-template-columns: 1fr;
  }

  .auth-brand-card,
  .auth-login-card.login-box {
    border-radius: 18px !important;
  }

  .auth-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .login-page.auth-entry {
    padding: 12px 10px 16px;
    display: block !important;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-brand-card {
    padding: 16px 14px;
  }

  .auth-shell {
    margin-top: 0;
  }

  .auth-login-head {
    padding: 16px 14px 0;
  }

  .auth-login-body {
    padding: 8px 14px 14px;
  }

  .auth-brand-links .btn {
    min-width: 0;
    width: 100%;
  }
}

@media (max-height: 760px) and (min-width: 768px) {
  .login-page.auth-entry {
    display: block !important;
    height: auto;
  }

  .auth-shell {
    margin-top: 14px;
  }
}

@media (max-width: 575px) {
  .auth-highlight-grid {
    grid-template-columns: 1fr;
  }

  .auth-brand-card h1 {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .auth-brand-text {
    font-size: 13px;
  }
}
