:root {
  --brand-primary: #3692cf;
  --brand-primary-strong: #2677ad;
  --brand-accent: #ed2624;
  --brand-accent-strong: #cb1f1d;
  --surface-page: #f7f9fc;
  --surface-card: #ffffff;
  --surface-muted: #f0f3f9;
  --border-soft: #dbe3ef;
  --text-main: #1f2937;
  --text-muted: #4f6177;
  --danger: #ed2624;
  --warning: #f9a825;
  --success: #2e7d32;
  --success-strong: #246628;
  --shadow-sm: 0 4px 12px rgba(31, 41, 55, 0.08);
  --shadow-md: 0 10px 24px rgba(31, 41, 55, 0.1);
  --radius-md: 12px;
  --radius-lg: 16px;
}

body.app-theme {
  background: var(--surface-page);
  color: var(--text-main);
  font-size: 0.94rem;
  line-height: 1.45;
}

.app-theme .content-wrapper {
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.app-theme p,
.app-theme li,
.app-theme td,
.app-theme th,
.app-theme label,
.app-theme span,
.app-theme a,
.app-theme input,
.app-theme select,
.app-theme textarea,
.app-theme button {
  font-size: 0.92rem;
  line-height: 1.4;
}

.app-theme .card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.app-theme .card .card-title,
.app-theme h1,
.app-theme h2,
.app-theme h3,
.app-theme h4,
.app-theme h5,
.app-theme h6 {
  color: var(--text-main);
  font-weight: 600;
}

.app-theme h1 { font-size: 1.5rem; }
.app-theme h2 { font-size: 1.35rem; }
.app-theme h3 { font-size: 1.2rem; }
.app-theme h4 { font-size: 1.08rem; }
.app-theme h5 { font-size: 1rem; }
.app-theme h6 { font-size: 0.94rem; }

.app-theme .card .card-title {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.app-theme .text-muted {
  color: var(--text-muted) !important;
}

/* Accessibility micro-pass: contrast + keyboard focus visibility */
.app-theme :focus {
  outline: none;
}

.app-theme :focus-visible {
  outline: 3px solid rgba(54, 146, 207, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.app-theme a:focus-visible,
.app-theme button:focus-visible,
.app-theme .btn:focus-visible,
.app-theme input:focus-visible,
.app-theme select:focus-visible,
.app-theme textarea:focus-visible,
.app-theme [tabindex]:focus-visible {
  box-shadow: 0 0 0 3px rgba(54, 146, 207, 0.28);
}

.app-theme .navbar {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 2px 10px rgba(31, 41, 55, 0.05);
}

.app-theme .navbar .navbar-brand-wrapper {
  background: #fff;
}

.app-theme .navbar .nav-link {
  color: var(--text-main);
}

.app-theme .sidebar {
  background: linear-gradient(180deg, #2f86be 0%, #1c5f8b 100%);
}

.app-theme .sidebar .nav .nav-item .nav-link {
  border-radius: 10px;
  margin: 2px 8px;
  color: #d5e0ec;
  transition: all 0.2s ease;
}

.app-theme .sidebar .nav .nav-item .nav-link i {
  color: #b7c8db;
}

.app-theme .sidebar .nav .nav-item .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.app-theme .sidebar .nav .nav-item .nav-link:focus-visible {
  background: rgba(54, 146, 207, 0.28);
  color: #fff;
}

.app-theme .sidebar .nav .nav-item.active > .nav-link,
.app-theme .sidebar .nav .nav-item .nav-link.active {
  background: rgba(237, 38, 36, 0.22);
  color: #fff;
  border-left: 3px solid var(--brand-accent);
}

.app-theme .sidebar .nav .nav-item.active > .nav-link i,
.app-theme .sidebar .nav .nav-item .nav-link.active i {
  color: #fff;
}

.app-theme .sidebar .nav.sub-menu .nav-item .nav-link {
  color: #d5e0ec;
  opacity: 0.95;
}

.app-theme .sidebar .nav.sub-menu .nav-item .nav-link:hover {
  color: #fff;
}

.app-theme .btn {
  border-radius: 10px;
  font-weight: 600;
  box-shadow: none;
  min-height: 38px;
  padding: 0.42rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.25;
}

.app-theme .btn-sm {
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  font-size: 0.84rem;
}

.app-theme .btn-lg {
  min-height: 46px;
  padding: 0.52rem 1.15rem;
  font-size: 0.96rem;
}

.app-theme .btn-primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.app-theme .btn-primary:hover,
.app-theme .btn-primary:focus {
  background: var(--brand-primary-strong);
  border-color: var(--brand-primary-strong);
}

.app-theme .btn-success {
  background: var(--success);
  border-color: var(--success);
}

.app-theme .btn-success:hover,
.app-theme .btn-success:focus {
  background: var(--success-strong);
  border-color: var(--success-strong);
}

.app-theme .btn-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.app-theme .form-control,
.app-theme .typeahead,
.app-theme .custom-select {
  border-radius: 10px;
  border-color: var(--border-soft);
  min-height: 38px;
  padding: 0.38rem 0.75rem;
  font-size: 0.9rem;
}

.app-theme .form-control:focus,
.app-theme .custom-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(31, 78, 121, 0.15);
}

.app-theme .form-control:focus-visible,
.app-theme .custom-select:focus-visible,
.app-theme .bootstrap-select .dropdown-toggle:focus-visible {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.22rem rgba(54, 146, 207, 0.22);
}

.app-theme .table {
  border-color: var(--border-soft);
  margin-bottom: 0.8rem;
}

.app-theme .table th,
.app-theme .table td {
  padding: 0.48rem 0.58rem;
  vertical-align: middle;
  line-height: 1.3;
  font-size: 0.88rem;
}

.app-theme .table thead th {
  background: var(--surface-muted);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-soft);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.app-theme .table tbody tr:hover {
  background: #f7fafe;
}

.app-theme .table a:focus-visible,
.app-theme .dropdown-item:focus-visible {
  background: rgba(54, 146, 207, 0.14);
  color: #0f3552;
}

.app-theme .table.table-sm th,
.app-theme .table.table-sm td {
  padding: 0.38rem 0.5rem;
}

.app-theme .row {
  margin-bottom: 0.25rem;
}

.app-theme .form-group {
  margin-bottom: 0.85rem;
}

.app-theme label {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.86rem;
}

.app-theme .footer {
  background: #fff;
  border-top: 1px solid var(--border-soft);
}

/* Sticky admin shell: sidebar + footer */
@media (min-width: 992px) {
  .app-theme .container-fluid.page-body-wrapper {
    align-items: stretch;
  }

  .app-theme .sidebar.sidebar-offcanvas {
    position: sticky;
    top: 60px;
    align-self: flex-start;
    height: calc(100vh - 60px);
    overflow-y: auto;
  }
}

.app-theme .main-panel {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

.app-theme .main-panel .content-wrapper {
  flex: 1 0 auto;
}

.app-theme .main-panel .footer {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 3;
}

/* Strong admin-only sticky shell */
@media (min-width: 992px) {
  .app-theme.admin-shell .container-fluid.page-body-wrapper {
    position: relative;
  }

  .app-theme.admin-shell .sidebar.sidebar-offcanvas {
    position: fixed !important;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 235px;
    height: auto;
    overflow-y: auto;
    z-index: 1030;
  }

  .app-theme.admin-shell .main-panel {
    margin-left: 235px;
    width: calc(100% - 235px);
    min-height: calc(100vh - 60px);
    padding-bottom: 58px !important;
  }

  .app-theme.admin-shell .main-panel .footer {
    position: fixed !important;
    left: 235px;
    right: 0;
    bottom: 0;
    margin-top: 0 !important;
    z-index: 1025;
    width: calc(100% - 235px);
  }
}

@media (max-width: 991.98px) {
  .app-theme.admin-shell .main-panel {
    margin-left: 0;
    width: 100%;
    padding-bottom: 0;
  }

  .app-theme.admin-shell .main-panel .footer {
    position: static;
  }
}

/* Login redesign */
body.app-theme.auth-redesign {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(237, 38, 36, 0.12), transparent 35%),
    radial-gradient(circle at bottom left, rgba(54, 146, 207, 0.16), transparent 40%),
    var(--surface-page);
}

.auth-redesign .container-scroller {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.auth-redesign .full-page-wrapper {
  flex: 1 1 auto;
  min-height: 0;
}

.auth-redesign .content-wrapper.auth {
  min-height: 0;
  padding-top: 0.75rem !important;
  padding-bottom: 0.5rem !important;
}

.auth-redesign .auth-form-light {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding-top: 1.25rem !important;
  padding-bottom: 1.1rem !important;
}

.auth-redesign .brand-logo {
  margin-bottom: 0.45rem;
}

.auth-redesign .auth-brand-title {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.auth-redesign .auth-brand-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.7rem;
}

.auth-redesign .auth-form-btn {
  border-radius: 10px !important;
  min-height: 48px;
}

.auth-redesign .form-control {
  min-height: 44px;
  border-radius: 10px !important;
}

.auth-redesign .footer {
  background: transparent;
  border-top: 0;
  padding: 0.4rem 0 0.55rem;
  text-align: center;
}

.auth-redesign .footer .text-muted {
  font-size: 0.86rem;
}

/* Phase 2: high-traffic module redesign */
.app-theme.page-nwbdgt .card,
.app-theme.page-mngobjectives .card,
.app-theme.page-targets .card,
.app-theme.page-activity .card,
.app-theme.page-mgt-mtef .card,
.app-theme.page-groupsubvotes .card,
.app-theme.page-printingactpln .card,
.app-theme.page-printacfl .card,
.app-theme.page-printsubs .card,
.app-theme.page-printest .card,
.app-theme.page-mgbgt .card,
.app-theme.page-mgbgtt .card {
  border-top: 3px solid var(--brand-primary);
}

.app-theme.page-nwbdgt .card .card-body > .row:first-child,
.app-theme.page-mngobjectives .card .card-body > .row:first-child,
.app-theme.page-targets .card .card-body > .row:first-child,
.app-theme.page-activity .card .card-body > .row:first-child,
.app-theme.page-mgt-mtef .card .card-body > .row:first-child,
.app-theme.page-groupsubvotes .card .card-body > .row:first-child,
.app-theme.page-printingactpln .card .card-body > .row:first-child,
.app-theme.page-printacfl .card .card-body > .row:first-child {
  background: linear-gradient(90deg, rgba(54, 146, 207, 0.1), rgba(255, 255, 255, 0));
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

.app-theme.page-nwbdgt .table-responsive,
.app-theme.page-mngobjectives .table-responsive,
.app-theme.page-targets .table-responsive,
.app-theme.page-activity .table-responsive,
.app-theme.page-mgt-mtef .table-responsive,
.app-theme.page-groupsubvotes .table-responsive,
.app-theme.page-printingactpln .table-responsive,
.app-theme.page-printacfl .table-responsive,
.app-theme.page-printsubs .table-responsive,
.app-theme.page-printest .table-responsive,
.app-theme.page-mgbgt .table-responsive,
.app-theme.page-mgbgtt .table-responsive {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}

.app-theme.page-nwbdgt .table thead th,
.app-theme.page-mngobjectives .table thead th,
.app-theme.page-targets .table thead th,
.app-theme.page-activity .table thead th,
.app-theme.page-mgt-mtef .table thead th,
.app-theme.page-groupsubvotes .table thead th,
.app-theme.page-printingactpln .table thead th,
.app-theme.page-printacfl .table thead th,
.app-theme.page-printsubs .table thead th,
.app-theme.page-printest .table thead th,
.app-theme.page-mgbgt .table thead th,
.app-theme.page-mgbgtt .table thead th {
  background: var(--brand-primary);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.app-theme.page-nwbdgt .table tbody tr:nth-child(even),
.app-theme.page-mngobjectives .table tbody tr:nth-child(even),
.app-theme.page-targets .table tbody tr:nth-child(even),
.app-theme.page-activity .table tbody tr:nth-child(even),
.app-theme.page-mgt-mtef .table tbody tr:nth-child(even),
.app-theme.page-groupsubvotes .table tbody tr:nth-child(even),
.app-theme.page-printingactpln .table tbody tr:nth-child(even),
.app-theme.page-printacfl .table tbody tr:nth-child(even),
.app-theme.page-printsubs .table tbody tr:nth-child(even),
.app-theme.page-printest .table tbody tr:nth-child(even),
.app-theme.page-mgbgt .table tbody tr:nth-child(even),
.app-theme.page-mgbgtt .table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.app-theme.page-nwbdgt .btn-outline-success,
.app-theme.page-mngobjectives .btn-outline-success,
.app-theme.page-targets .btn-outline-success,
.app-theme.page-activity .btn-outline-success,
.app-theme.page-nwbdgt .btn-outline-primary,
.app-theme.page-mngobjectives .btn-outline-primary,
.app-theme.page-targets .btn-outline-primary,
.app-theme.page-activity .btn-outline-primary {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.app-theme.page-nwbdgt .btn-outline-success:hover,
.app-theme.page-mngobjectives .btn-outline-success:hover,
.app-theme.page-targets .btn-outline-success:hover,
.app-theme.page-activity .btn-outline-success:hover,
.app-theme.page-nwbdgt .btn-outline-primary:hover,
.app-theme.page-mngobjectives .btn-outline-primary:hover,
.app-theme.page-targets .btn-outline-primary:hover,
.app-theme.page-activity .btn-outline-primary:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.app-theme.page-nwbdgt .btn-outline-danger,
.app-theme.page-mngobjectives .btn-outline-danger,
.app-theme.page-targets .btn-outline-danger,
.app-theme.page-activity .btn-outline-danger {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

.app-theme.page-nwbdgt .btn-outline-danger:hover,
.app-theme.page-mngobjectives .btn-outline-danger:hover,
.app-theme.page-targets .btn-outline-danger:hover,
.app-theme.page-activity .btn-outline-danger:hover {
  background: var(--brand-accent);
  color: #fff;
  border-color: var(--brand-accent);
}

.app-theme.page-nwbdgt .bootstrap-select .dropdown-toggle,
.app-theme.page-mngobjectives .bootstrap-select .dropdown-toggle,
.app-theme.page-targets .bootstrap-select .dropdown-toggle,
.app-theme.page-activity .bootstrap-select .dropdown-toggle {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  min-height: 38px;
}

.app-theme.page-mgt-mtef .btn-primary,
.app-theme.page-groupsubvotes .btn-primary,
.app-theme.page-printingactpln .btn-primary,
.app-theme.page-printacfl .btn-primary,
.app-theme.page-printsubs .btn-primary,
.app-theme.page-printest .btn-primary,
.app-theme.page-mgbgt .btn-primary,
.app-theme.page-mgbgtt .btn-primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.app-theme.page-mgt-mtef .btn-danger,
.app-theme.page-groupsubvotes .btn-danger,
.app-theme.page-printingactpln .btn-danger,
.app-theme.page-printacfl .btn-danger,
.app-theme.page-printsubs .btn-danger,
.app-theme.page-printest .btn-danger,
.app-theme.page-mgbgt .btn-danger,
.app-theme.page-mgbgtt .btn-danger {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

/* actpn-page cards */
.app-theme.page-actpn-page .ap-subvote-card {
  background: linear-gradient(180deg, #f2f8fd 0%, #e9f3fb 100%);
  border: 1px solid #b8d4e9;
  border-left: 4px solid var(--brand-primary);
  border-radius: 12px;
  padding: 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-main);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-theme.page-actpn-page .ap-subvote-card:hover,
.app-theme.page-actpn-page .ap-subvote-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: #8fbede;
}

.app-theme.page-actpn-page .ap-subvote-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.app-theme.page-actpn-page .ap-subvote-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #113a58;
}

.app-theme.page-actpn-page .ap-subvote-action {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-accent);
}

/* Dashboard stat cards visibility (home) */
.app-theme.page-home .transparent .card.card-tale,
.app-theme.page-home .transparent .card.card-dark-blue,
.app-theme.page-home .transparent .card.card-light-blue,
.app-theme.page-home .transparent .card.card-light-danger {
  border: 0;
  box-shadow: var(--shadow-md);
}

.app-theme.page-home .transparent .card.card-tale {
  background: linear-gradient(135deg, #3692cf 0%, #2a79ad 100%);
}

.app-theme.page-home .transparent .card.card-dark-blue {
  background: linear-gradient(135deg, #2a79ad 0%, #1f5f88 100%);
}

.app-theme.page-home .transparent .card.card-light-blue {
  background: linear-gradient(135deg, #5ca9da 0%, #3692cf 100%);
}

.app-theme.page-home .transparent .card.card-light-danger {
  background: linear-gradient(135deg, #ed2624 0%, #c91f1d 100%);
}

.app-theme.page-home .transparent .card.card-tale .card-body,
.app-theme.page-home .transparent .card.card-dark-blue .card-body,
.app-theme.page-home .transparent .card.card-light-blue .card-body,
.app-theme.page-home .transparent .card.card-light-danger .card-body,
.app-theme.page-home .transparent .card.card-tale .card-body p,
.app-theme.page-home .transparent .card.card-dark-blue .card-body p,
.app-theme.page-home .transparent .card.card-light-blue .card-body p,
.app-theme.page-home .transparent .card.card-light-danger .card-body p {
  color: #ffffff !important;
}

.app-theme.page-home .transparent .card .fs-30 {
  font-size: 2rem !important;
  font-weight: 700;
  line-height: 1.1;
}

/* Normal user subvote cards redesign (keeps green/red status colors) */
.app-theme.page-home .subvote-grid-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.app-theme.page-home .subvote-status-btn {
  min-height: 138px;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.18rem;
  border: 0;
}

.app-theme.page-home .subvote-status-btn .subvote-title {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 0.22rem;
  line-height: 1.3;
}

.app-theme.page-home .subvote-status-btn .subvote-meta {
  display: block;
  font-size: 0.84rem;
  line-height: 1.28;
}

.app-theme.page-home .subvote-status-btn:hover,
.app-theme.page-home .subvote-status-btn:focus-visible {
  filter: brightness(0.98);
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.04);
}

/* sbcedt page redesign */
.app-theme.page-sbcedt .sbcedt-shell {
  border-top: 3px solid var(--brand-primary);
}

.app-theme.page-sbcedt .sbcedt-form .form-control,
.app-theme.page-sbcedt .sbcedt-form .bootstrap-select .dropdown-toggle {
  min-height: 40px;
}

.app-theme.page-sbcedt .sbcedt-form label {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #214562;
}

.jbms-command-palette {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.jbms-command-box {
  width: min(760px, 94vw);
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.jbms-command-box input {
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  min-height: 44px;
}

.jbms-command-results {
  max-height: 52vh;
  overflow-y: auto;
}

.jbms-command-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
  color: var(--text-main);
  text-decoration: none;
}

.jbms-command-item:last-child {
  border-bottom: 0;
}

.jbms-command-item small {
  color: var(--text-muted);
}

.jbms-command-item:hover {
  background: #f5f9ff;
}

/* Global responsive hardening */
@media (max-width: 991.98px) {
  .app-theme .content-wrapper {
    padding: 0.9rem 0.75rem;
  }

  .app-theme .card .card-body {
    padding: 0.9rem 0.8rem;
  }

  .app-theme .navbar .navbar-brand-wrapper {
    width: auto;
    max-width: 72%;
    padding: 0 0.6rem;
  }

  .app-theme .navbar .navbar-brand-wrapper .nav-link {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-theme .navbar .nav-link {
    font-size: 0.84rem;
  }

  .app-theme .table {
    font-size: 0.84rem;
  }

  .app-theme .table th,
  .app-theme .table td {
    padding: 0.42rem 0.46rem;
  }

  .app-theme .btn {
    min-height: 40px;
  }
}

@media (max-width: 767.98px) {
  .app-theme {
    font-size: 0.9rem;
  }

  .app-theme .container-fluid,
  .app-theme .content-wrapper {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .app-theme .row {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
  }

  .app-theme .row > [class*="col-"] {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    margin-bottom: 0.55rem;
  }

  .app-theme h1 { font-size: 1.25rem; }
  .app-theme h2 { font-size: 1.12rem; }
  .app-theme h3 { font-size: 1.04rem; }
  .app-theme h4 { font-size: 0.98rem; }

  .app-theme .card {
    border-radius: 10px;
  }

  .app-theme .card .card-title {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
  }

  .app-theme .btn,
  .app-theme .form-control,
  .app-theme .custom-select,
  .app-theme .bootstrap-select .dropdown-toggle {
    min-height: 42px;
    font-size: 0.9rem;
  }

  .app-theme .btn-block {
    width: 100%;
  }

  .app-theme .navbar .navbar-brand-wrapper .brand-logo img {
    max-height: 58px !important;
  }

  .app-theme .mobile-sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-right: 0.45rem;
    background: #fff;
    color: var(--brand-primary-strong);
  }

  .app-theme .mobile-sidebar-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(54, 146, 207, 0.25);
  }

  .app-theme .navbar .navbar-nav-right {
    display: flex;
    align-items: center;
    gap: 0.15rem;
  }

  .app-theme .navbar .navbar-nav-right .nav-item {
    max-width: 52vw;
  }

  .app-theme .navbar .navbar-nav-right .nav-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .app-theme .sidebar .nav .nav-item .nav-link {
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
  }

  .app-theme .sidebar-offcanvas {
    z-index: 1040;
  }

  .app-theme body.sidebar-mobile-open::before,
  body.app-theme.sidebar-mobile-open::before {
    content: "";
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.38);
    z-index: 1035;
  }

  .app-theme .table,
  .app-theme table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .app-theme .table th,
  .app-theme .table td {
    white-space: nowrap;
  }

  .app-theme .pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .app-theme .pagination .page-link {
    min-width: 34px;
    padding: 0.3rem 0.5rem;
  }

  .auth-redesign .auth-form-light {
    padding: 0.95rem 0.85rem !important;
  }

  .auth-redesign .brand-logo img {
    max-width: 170px !important;
  }

  .auth-redesign .auth-brand-title {
    font-size: 1.02rem;
  }

  .auth-redesign .auth-brand-subtitle {
    font-size: 0.84rem;
  }

  .app-theme.page-home .transparent .card .fs-30 {
    font-size: 1.45rem !important;
  }

  .app-theme.page-home .transparent .card .mb-4 {
    margin-bottom: 0.45rem !important;
  }

  .app-theme.page-nwbdgt .bootstrap-select,
  .app-theme.page-nwbdgt .bootstrap-select > .dropdown-toggle,
  .app-theme.page-mgbgt .bootstrap-select,
  .app-theme.page-mgbgt .bootstrap-select > .dropdown-toggle {
    width: 100% !important;
    max-width: 100% !important;
  }

  .app-theme.page-nwbdgt td[style*="min-width: 200px"],
  .app-theme.page-mgbgt td[style*="min-width: 200px"] {
    min-width: 150px !important;
    max-width: 220px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .app-theme.page-nwbdgt .col-lg-2 .btn,
  .app-theme.page-nwbdgt .col-lg-3 .btn,
  .app-theme.page-mgbgt .col-lg-2 .btn,
  .app-theme.page-mgbgt .col-lg-3 .btn {
    width: 100%;
    margin-top: 0.35rem;
  }
}

@media (max-width: 575.98px) {
  .app-theme .content-wrapper {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  .app-theme .navbar .navbar-brand-wrapper {
    max-width: 66%;
  }

  .app-theme .navbar .navbar-brand-wrapper .brand-logo img {
    max-height: 50px !important;
  }

  .app-theme .navbar .navbar-nav-right .nav-item {
    max-width: 44vw;
  }

  .app-theme .navbar .navbar-nav-right .nav-link {
    font-size: 0.78rem;
  }

  .app-theme .table th,
  .app-theme .table td {
    font-size: 0.8rem;
    padding: 0.38rem 0.4rem;
  }

  .app-theme .card .card-body {
    padding: 0.72rem;
  }

  .app-theme .footer .text-muted {
    font-size: 0.78rem;
  }
}

/* Final sticky-footer override for admin shells */
.app-theme.admin-shell .main-panel {
  padding-bottom: 72px !important;
}

.app-theme.admin-shell .main-panel > .footer {
  position: fixed !important;
  bottom: 0 !important;
  z-index: 1040 !important;
}

@media (min-width: 992px) {
  .app-theme.admin-shell .main-panel > .footer {
    left: 235px !important;
    width: calc(100% - 235px) !important;
    right: 0 !important;
  }
}

@media (max-width: 991.98px) {
  .app-theme.admin-shell .main-panel > .footer {
    left: 0 !important;
    width: 100% !important;
    right: 0 !important;
  }
}

/* Hard lock sticky footer for admin templates */
.app-theme.admin-shell .admin-sticky-footer {
  position: fixed !important;
  bottom: 0 !important;
  right: 0 !important;
  z-index: 1060 !important;
}

@media (min-width: 992px) {
  .app-theme.admin-shell .admin-sticky-footer {
    left: 235px !important;
    width: calc(100% - 235px) !important;
  }
}

@media (max-width: 991.98px) {
  .app-theme.admin-shell .admin-sticky-footer {
    left: 0 !important;
    width: 100% !important;
  }
}
