.auth-page .card {
    border-radius: 8px;
  }
  
  .auth-page .btn-primary {
    background-color: #009933; /* Example county accent green */
    border-color: #009933;
  }

/* Fixed footer: pin to bottom and reserve body padding to avoid overlap */
.auth-footer,
.page-footer,
footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--impact-surface);
  border-top: 1px solid var(--impact-border);
  z-index: 1050;
  padding: 0 1rem;
  box-shadow: 0 -6px 16px rgba(10, 79, 138, 0.04);
}

.auth-footer p,
.page-footer p,
footer p {
  margin: 0;
}
  
  .auth-page .btn-primary:hover {
    background-color: #007a29;
    border-color: #007a29;
  }

  .custom-login-width {
    max-width: 500px; /* or whatever you want */
    margin: 0 auto;   /* center it */
  }

/* Remove excess whitespace after footer */
.page-footer {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

:root {
  --footer-height: 3.75rem; /* space reserved for fixed footer */
}

body {
  padding-bottom: 1.25rem !important;
}

.esr-form-actions {
  position: sticky;
  bottom: calc(var(--footer-height) + 0.5rem);
  z-index: 1040;
  min-height: 3.25rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0;
  background: var(--impact-surface);
  border-top: 1px solid var(--impact-border);
}

.esr-form-actions .btn {
  min-width: 8rem;
}

.esr-cases-table-scroll {
  overflow: visible;
}

.esr-case-actions {
  position: relative;
}

.esr-case-actions.show {
  z-index: 1060;
}

.esr-case-actions .dropdown-menu {
  z-index: 1061;
  min-width: 11rem;
}

@media (max-width: 767.98px) {
  .esr-cases-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
  }
}

/* Sidebar width variable */
:root {
  --sidebar-width: 224px;
}

/* Keep the primary app shell pinned and aligned without the old mobile collapse offset */
.page-sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: var(--sidebar-width);
  transform: translateX(0) !important;
  z-index: 1045;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--impact-surface);
  border-right: 1px solid var(--impact-border);
  padding-bottom: calc(var(--footer-height) + 1rem);
  scrollbar-width: auto;
  scrollbar-color: rgba(77, 93, 116, 0.55) transparent;
}

.page-sidebar::-webkit-scrollbar {
  width: 16px;
}

.page-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.page-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(77, 93, 116, 0.55);
  border-radius: 999px;
  border: 4px solid transparent;
  background-clip: padding-box;
}

/* Offset the actual content wrapper so the fixed sidebar does not cover the main panel */
.page-content-wrapper {
  margin-left: var(--sidebar-width) !important;
  min-width: 0 !important;
  flex: 1 1 auto;
}

.page-content,
.page-inner,
.page-wrapper,
.page-main,
.page-header {
  margin-left: 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.page-content {
  padding: 1rem 1rem 0.75rem;
  min-height: 0 !important;
}

.page-content .row:last-of-type,
.page-content .row:last-child {
  margin-bottom: 0.5rem !important;
}

.page-content .card:last-of-type,
.page-content .card:last-child {
  margin-bottom: 0 !important;
}

:root {
  --impact-primary: #0f6cbd;
  --impact-primary-strong: #0a4f8a;
  --impact-primary-soft: #e8f2fb;
  --impact-accent: #118d57;
  --impact-accent-strong: #0b6a41;
  --impact-ink: #16324f;
  --impact-surface: #f7f9fc;
  --impact-border: #d7e1ec;
  --impact-highlight: #f4b400;
}

body {
  background-color: var(--impact-surface);
  color: #1f2a37;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 3000;
  background: #0b1f33;
  color: #ffffff !important;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0.75rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.btn:focus-visible {
  outline: 3px solid #f4b400 !important;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.page-header,
.navbar.bg-primary,
.dropdown-header.bg-trans-gradient,
.offcanvas-header.bg-primary {
  background: linear-gradient(135deg, var(--impact-primary-strong) 0%, var(--impact-primary) 55%, #2997d8 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.page-header {
  min-height: 4.75rem;
  align-items: center;
  padding: 0 1.15rem;
  gap: 0.85rem;
  box-shadow: 0 12px 32px rgba(10, 79, 138, 0.16);
}

.page-header .page-logo-link {
  padding: 0.72rem 0.95rem;
  border-radius: 0.95rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.page-header .page-logo-link:hover,
.page-header .page-logo-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.page-logo,
.page-sidebar {
  background-color: #0f1f36 !important;
}

.page-logo .page-logo-text {
  color: #eef5fb !important;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.page-logo-link {
  padding: 0.85rem 1rem;
}

.page-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.page-sidebar .nav-link-text,
.page-sidebar .primary-nav .info-card,
.page-sidebar .primary-nav .nav-menu li a {
  color: rgba(238, 245, 251, 0.92) !important;
}

.page-sidebar .primary-nav .nav-menu li a {
  border-radius: 0.9rem;
  margin: 0.18rem 0;
  padding: 0.85rem 1rem;
}

.page-sidebar .nav-menu li a:hover,
.page-sidebar .nav-menu li.open > a,
.page-sidebar .nav-menu li.active > a,
.page-sidebar .primary-nav .nav-menu li a:hover {
  background: rgba(15, 108, 189, 0.24) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.page-sidebar .nav-menu li.active > a::before,
.page-sidebar .nav-menu li.open > a::before {
  background-color: var(--impact-highlight) !important;
}

.page-sidebar .nav-menu li a i {
  color: rgba(255, 255, 255, 0.8);
  width: 1.4rem;
}

.page-sidebar .nav-menu li.active > a i,
.page-sidebar .nav-menu li.open > a i {
  color: #ffffff;
}

.hidden-md-down .header-btn,
.header-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: #eef5fb !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.18s ease;
}

.hidden-md-down .header-btn:hover,
.hidden-md-down .header-btn:focus,
.header-icon:hover,
.header-icon:focus {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18);
}

.page-header .header-btn,
.page-header .header-icon {
  min-width: 2.8rem;
  height: 2.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.page-header .badge.badge-icon {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  font-size: 0.72rem;
  line-height: 1.15rem;
  border-radius: 999px;
  background: var(--impact-highlight) !important;
  color: #14253b !important;
  box-shadow: 0 6px 12px rgba(16, 24, 40, 0.2);
}

.header-actions {
  gap: 0.75rem;
}

.search .form-control {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);
  color: #eef5fb;
}

.search .form-control::placeholder {
  color: rgba(238, 245, 251, 0.72);
}

.search .form-control:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 0 0 0.2rem rgba(15, 108, 189, 0.16) !important;
}

.dropdown-menu.dropdown-menu-animated {
  border: 1px solid rgba(17, 40, 63, 0.08) !important;
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(17, 40, 63, 0.12);
}

.dropdown-header.bg-trans-gradient,
.dropdown-header.bg-trans-gradient.text-center {
  background: linear-gradient(135deg, var(--impact-primary-strong) 0%, var(--impact-primary) 70%, #2997d8 100%) !important;
  border-radius: 1rem 1rem 0 0 !important;
}

.dropdown-menu .dropdown-item {
  color: #15233f !important;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: rgba(15, 108, 189, 0.08) !important;
  color: #0f1f36 !important;
}

.profile-image {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.28);
}

.nav-filter .form-control {
  height: 2.7rem;
  padding: 0.65rem 2.7rem 0.65rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.08);
  color: #eef5fb;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04);
}

.nav-filter .form-control::placeholder {
  color: rgba(238, 245, 251, 0.72);
}

.nav-filter .btn-search-close {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-sidebar .nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.85rem;
  padding: 0.78rem 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-sidebar .nav-menu li ul {
  list-style: none;
  padding-left: 0 !important;
  margin: 0.2rem 0 0.35rem 2.4rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 0.45rem 0 0.45rem 1.7rem;
}

.page-sidebar .nav-menu li ul li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-sidebar .nav-menu li ul > li > a {
  padding: 0.6rem 0.95rem 0.6rem 1.2rem;
  border-radius: 0.75rem;
  margin: 0.12rem 0;
  position: relative;
}

.page-sidebar .nav-menu li ul > li > a:before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.2s ease;
}

.page-sidebar .nav-menu li ul > li > a:hover:before,
.page-sidebar .nav-menu li ul > li.active > a:before,
.page-sidebar .nav-menu li ul > li.open > a:before {
  background-color: rgba(255, 255, 255, 0.9);
}

.page-sidebar .nav-menu li ul > li > a:hover,
.page-sidebar .nav-menu li ul > li.active > a,
.page-sidebar .nav-menu li ul > li.open > a {
  background: rgba(255, 255, 255, 0.12) !important;
}

.mod-nav-link:not(.nav-function-top):not(.nav-function-minify):not(.mod-hide-nav-icons) .page-sidebar .nav-menu:not(.nav-menu-compact) > li > ul:before,
.mod-nav-link:not(.nav-function-top):not(.nav-function-minify):not(.mod-hide-nav-icons) .page-sidebar .nav-menu:not(.nav-menu-compact) > li > ul > li a:after,
.mod-nav-link:not(.nav-function-top):not(.nav-function-minify):not(.mod-hide-nav-icons) .page-sidebar .nav-menu:not(.nav-menu-compact) > li > ul > li li > a:after {
  display: none !important;
  content: none !important;
}

.btn-primary,
.btn-success,
.btn-info,
.bg-primary,
.badge-primary,
.nav-pills .nav-link.active,
.pagination .page-item.active .page-link {
  background-color: var(--impact-primary) !important;
  border-color: var(--impact-primary) !important;
}

.btn-primary,
.btn-primary:visited,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-success,
.btn-success:visited,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-info,
.btn-info:visited,
.btn-info:hover,
.btn-info:focus,
.btn-info:active {
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-primary:focus,
.btn-success:focus,
.btn-info:focus,
.pagination .page-link:hover {
  background-color: var(--impact-primary-strong) !important;
  border-color: var(--impact-primary-strong) !important;
}

.text-primary,
.nav-link.active,
.page-link,
a {
  color: var(--impact-primary);
}

a:hover,
.text-primary:hover {
  color: var(--impact-primary-strong);
}

.card,
.panel,
.modal-content,
.dropdown-menu,
.list-group-item,
.table,
.jarviswidget,
.jarviswidget > div {
  border-color: var(--impact-border) !important;
}

.card,
.panel,
.jarviswidget,
.modal-content {
  box-shadow: 0 14px 32px rgba(17, 40, 63, 0.08);
}

.table thead th,
.table-light,
.bg-faded,
.list-group-item.active {
  background-color: var(--impact-primary-soft) !important;
  color: var(--impact-ink) !important;
}

.badge.badge-icon,
.badge.bg-danger,
.badge-danger {
  background-color: var(--impact-accent) !important;
  border-color: var(--impact-accent) !important;
}

.form-control:focus,
.form-select:focus,
.custom-select:focus {
  border-color: rgba(15, 108, 189, 0.45) !important;
  box-shadow: 0 0 0 0.2rem rgba(15, 108, 189, 0.14) !important;
}

.auth-page .btn-primary {
  background-color: var(--impact-primary) !important;
  border-color: var(--impact-primary) !important;
}

.auth-page .btn-primary:hover {
  background-color: var(--impact-primary-strong) !important;
  border-color: var(--impact-primary-strong) !important;
}

.settings-panel .expanded.theme-colors #myapp-impact {
  background: linear-gradient(135deg, #0a4f8a 0%, #0f6cbd 60%, #118d57 100%);
}

.mobile-bottom-nav,
.desktop-sidebar,
.d-lg-flex.flex-column.flex-shrink-0.p-3.bg-white.border-end.vh-100.position-fixed {
  border-color: var(--impact-border) !important;
}

.mobile-bottom-nav .mobile-nav-item.active,
.desktop-sidebar .nav-link.active,
.d-lg-flex.flex-column.flex-shrink-0.p-3.bg-white.border-end.vh-100.position-fixed .nav-link.active {
  background-color: var(--impact-primary-soft) !important;
  color: var(--impact-primary-strong) !important;
}

[data-bs-theme="dark"] {
  --impact-surface: #0f1722;
  --impact-border: #243447;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .main-content,
[data-bs-theme="dark"] .page-content {
  background-color: #0f1722 !important;
  color: #dbe7f3;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .panel,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .jarviswidget,
[data-bs-theme="dark"] .jarviswidget > div {
  background-color: #162231 !important;
  color: #dbe7f3 !important;
  border-color: #243447 !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .bg-faded,
[data-bs-theme="dark"] .list-group-item.active {
  background-color: rgba(15, 108, 189, 0.18) !important;
  color: #f1f6fb !important;
}

#copilotBtn {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  z-index: 2147483000 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  pointer-events: auto !important;
}

#copilotBox {
  display: none;
  position: fixed !important;
  right: 24px !important;
  bottom: 84px !important;
  width: 380px !important;
  max-width: calc(100vw - 24px);
  height: 520px !important;
  max-height: 72vh;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
  overflow: hidden;
}

#copilotMessages {
  height: 380px;
  overflow-y: auto;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
}

.copilot-message {
  margin-bottom: 12px;
}

.user-message {
  text-align: right;
}

.user-bubble {
  background: #007bff;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 15px;
  display: inline-block;
  max-width: 80%;
  white-space: pre-wrap;
}

.ai-bubble {
  background: #e9ecef;
  padding: 8px 12px;
  border-radius: 15px;
  display: inline-block;
  max-width: 80%;
  white-space: pre-wrap;
}

@media (max-width: 576px) {
  #copilotBtn {
    right: 12px !important;
    bottom: 16px !important;
  }

  #copilotBox {
    right: 12px !important;
    bottom: 76px !important;
    width: calc(100vw - 24px) !important;
    height: min(68vh, 500px) !important;
  }
}

/* Remove excessive blank space on short pages by overriding SmartAdmin viewport min-height. */
.page-wrapper .page-content {
  min-height: auto !important;
}

/* Prevent global bottom whitespace when SmartAdmin fixed-footer mode is enabled. */
.footer-function-fixed .page-content {
  padding-bottom: 2.8125rem !important;
}

:root {
  --corp-surface: #f4f7fb;
  --corp-surface-soft: #eef4fb;
  --corp-card: #ffffff;
  --corp-border: #d7e1ec;
  --corp-border-strong: #c4d1de;
  --corp-text: #15233f;
  --corp-muted: #6b7280;
  --corp-accent: #0f6cbd;
  --corp-accent-strong: #0a4f8a;
  --corp-shadow: 0 18px 40px rgba(16, 24, 40, 0.06);
  --corp-shadow-hover: 0 22px 46px rgba(16, 24, 40, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--corp-text);
  background-color: var(--corp-surface);
}

.page-content,
.main-content,
.page-inner,
.page-wrapper {
  background-color: var(--corp-surface);
}

.page-header,
.page-title,
.panel-header,
.card-header,
.modal-header,
.dropdown-header {
  color: var(--corp-text);
}

h1, h2, h3, h4, h5, h6 {
  color: #142a46;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card,
.panel,
.jarviswidget,
.modal-content,
.dropdown-menu,
.list-group-item,
.table {
  border-radius: 1rem;
  border: 1px solid var(--corp-border);
  background-color: var(--corp-card);
}

.card {
  box-shadow: var(--corp-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--corp-shadow-hover);
}

.page-content {
  padding: 1rem 1.25rem 0.25rem !important;
  min-height: 0 !important;
}

.page-content > *:last-child,
.page-content .row:last-child,
.page-content .card:last-child,
.page-content .panel:last-child,
.page-content .table-responsive:last-child {
  margin-bottom: 0 !important;
}

.page-content > *:last-child .card:last-child,
.page-content .row:last-child .card:last-child {
  margin-bottom: 0 !important;
}

.dashboard-page .alert-info .badge {
  color: #ffffff !important;
  background-color: #198754 !important;
  border-color: #198754 !important;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
}

.btn {
  border-radius: 0.85rem;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 108, 189, 0.12);
}

.modal,
.modal-dialog,
.modal-content,
.modal-backdrop,
.modal-header,
.modal-body,
.modal-footer,
.modal .btn,
.modal .btn:hover,
.modal .btn:focus,
.modal .btn:active,
.modal a,
.modal button,
.modal input,
.modal select,
.modal textarea,
.modal .form-control,
.modal .dropdown-toggle,
.modal .nav-link,
.modal .card,
.modal .card:hover,
.modal .list-group-item,
.modal .list-group-item:hover,
.modal .dropdown-item,
.modal .dropdown-item:hover {
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

.modal * {
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

.modal *:hover,
.modal *:focus,
.modal *:active,
.modal *:focus-visible {
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

.modal *::before,
.modal *::after {
  transition: none !important;
  animation: none !important;
}

.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
}

.modal.show {
  z-index: 2147483001 !important;
  pointer-events: auto !important;
}

body.modal-open .page-wrapper,
body.modal-open .page-sidebar,
body.modal-open .page-header,
body.modal-open .page-content,
body.modal-open .page-footer,
body.modal-open #copilotBtn,
body.modal-open #copilotBox {
  pointer-events: none !important;
}

body.modal-open .modal,
body.modal-open .modal *,
body.modal-open .modal-backdrop {
  pointer-events: auto !important;
}

body.modal-open #copilotBtn,
body.modal-open #copilotBox {
  opacity: 0 !important;
  visibility: hidden !important;
}

.form-control,
.form-select,
.form-control:disabled,
.form-select:disabled,
.form-control.is-valid,
.form-control.is-invalid,
.form-select.is-valid,
.form-select.is-invalid {
  border-radius: 0.8rem;
  border: 1px solid var(--corp-border);
  background-color: #ffffff;
  box-shadow: none !important;
  padding: 0.85rem 1rem;
  min-height: 2.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(15, 108, 189, 0.55) !important;
  box-shadow: 0 0 0 0.18rem rgba(15, 108, 189, 0.16) !important;
}

/* Compact table and in-cell form control overrides to reduce row height */
.table.table-sm th,
.table.table-sm td,
.table-sm th,
.table-sm td {
  padding: 0.45rem 0.6rem;
  vertical-align: middle;
}

.table td .form-control,
.table-sm td .form-control,
.table td .form-select,
.table-sm td .form-select {
  padding: 0.32rem 0.5rem;
  min-height: 1.9rem;
  height: auto;
  line-height: 1.15;
  font-size: 0.92rem;
}

/* Fix for select clipping in forms: ensure consistent line-height and sizes for small controls */
.form-control-sm,
.form-select.form-control-sm,
.form-select.form-select-sm,
.form-select-sm,
select.form-control-sm,
select.form-select-sm {
  padding: 0.4rem 0.7rem;
  min-height: 2.2rem;
  height: auto;
  font-size: 0.92rem;
  line-height: 1.35;
  box-sizing: border-box;
}

/* Ensure native select text rendering doesn't get clipped */
select.form-control,
select.form-control-sm,
select.form-select-sm,
.form-select,
.form-select.form-control-sm,
.form-select.form-select-sm,
.form-select-sm {
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  appearance: menulist;
  line-height: 1.35;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* Target DataTables length/filter inputs */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  padding: 0.32rem 0.5rem;
  height: auto;
}

/* Reduce default table row spacing where .card contains data tables */
.card .table.table-sm tbody tr {
  height: auto;
}

/* Auth page shell */
body.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a4f8a 0%, #0f6cbd 52%, #1a7ec4 100%) fixed no-repeat;
  background-color: #0a4f8a;
}

.auth-page .page-wrapper,
.auth-page .page-wrapper.alt,
.auth-page .page-inner,
.auth-page .page-content-wrapper,
.auth-page .flex-1 {
  min-height: 100vh !important;
}

.auth-page .page-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.auth-shell {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.15fr);
  background: #ffffff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(10, 79, 138, 0.25);
  border: 2px solid rgba(255, 215, 0, 0.9);
}

.auth-shell::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 1.5rem;
  background: radial-gradient(circle at top left, rgba(255, 215, 0, 0.35), transparent 45%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.auth-branding,
.auth-form-section {
  min-height: 0;
  display: flex;
  align-items: center;
}

.auth-branding {
  background: linear-gradient(135deg, #0a4f8a 0%, #0f6cbd 100%);
  padding: 2rem 2rem;
  color: #ffffff;
  justify-content: center;
}

.auth-branding-content {
  width: 100%;
  max-width: 360px;
  text-align: center;
  position: relative;
}

.login-logo {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.login-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.login-branding h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.login-branding-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.login-branding-features {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 2rem;
}

.branding-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
}

.branding-feature i {
  color: #f4b400;
  font-size: 1.2rem;
}

.auth-form-section {
  background: #f8fafc;
  justify-content: center;
  padding: 2rem 2.25rem;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0f1f36;
}

.auth-subtitle {
  color: #6b7280;
  margin-bottom: 1.75rem;
  line-height: 1.75;
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
}

.auth-footer-links a {
  color: #0f6cbd;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-links a:hover {
  color: #0a4f8a;
}

.auth-card-form .form-group {
  margin-bottom: 1.4rem;
}

.auth-card-form .form-control {
  min-height: 2.7rem;
}

.auth-card-form .btn-login {
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #0f6cbd 0%, #0a4f8a 100%);
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: 0.85rem;
  box-shadow: 0 8px 24px rgba(15, 108, 189, 0.22);
}

.auth-card-form .btn-login:hover {
  background: linear-gradient(135deg, #0a4f8a 0%, #053d6f 100%);
}

.auth-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.auth-page .page-wrapper.auth-page {
  padding: 1rem;
}

.auth-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 1rem;
  font-size: 0.82rem;
}

@media (max-width: 992px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-branding,
  .auth-form-section {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .auth-branding {
    padding-bottom: 1.5rem;
  }

  .auth-form-section {
    padding-top: 0;
  }
}

@media (max-height: 820px) {
  .auth-shell {
    max-height: calc(100vh - 1.5rem);
  }

  .auth-branding,
  .auth-form-section {
    padding: 1.25rem 1rem;
  }

  .auth-branding {
    padding-bottom: 1rem;
  }

  .auth-panel {
    padding: 1.25rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }

  .login-branding h2 {
    font-size: 1.7rem;
  }

  .auth-title {
    font-size: 1.4rem;
  }
}

.form-label,
label {
  color: #344054;
  font-weight: 600;
}

.form-text,
.help-block,
.invalid-feedback,
.valid-feedback {
  color: var(--corp-muted);
}

.input-group-text,
.form-control-feedback {
  border-radius: 0.8rem;
  border: 1px solid var(--corp-border);
  background-color: #f8fafc;
  color: #4b5563;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.4rem;
  border: 1px solid var(--corp-border);
}

.form-check-input:checked {
  background-color: var(--impact-primary) !important;
  border-color: var(--impact-primary) !important;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}

.table thead th {
  background-color: #eef4fb !important;
  color: var(--corp-text) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.table tbody tr:hover {
  background-color: #f4f7fb;
}

.table th,
.table td {
  border-top: 1px solid #e8eff6;
}

.table-sm th,
.table-sm td {
  padding: 0.72rem 0.75rem;
}

.table thead th:first-child,
.table tbody td:first-child {
  padding-left: 1rem;
}

.table thead th:last-child,
.table tbody td:last-child {
  padding-right: 1rem;
}

.card .card-header,
.panel .panel-heading {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e7edf5 !important;
}

.dropdown-menu {
  border: 1px solid var(--corp-border) !important;
}

.badge,
.badge-pill,
.btn-badge {
  border-radius: 999px;
}

.page-footer {
  border-top: 1px solid #e7edf5;
}

@media (max-width: 768px) {
  .page-content {
    padding: 1rem 0.85rem 1.5rem;
  }

  .form-control,
  .form-select {
    padding: 0.75rem 0.9rem;
  }
}

