@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

*,
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.kanban-scroll::-webkit-scrollbar {
  height: 8px;
}

.kanban-scroll::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

/* Sidebar Styles */
#sidebar {
  background: #0f172a;
  width: 220px;
  flex-shrink: 0;
  transition: width 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Desktop Collapsed Sidebar Styles */
@media (min-width: 1024px) {
  #sidebar.collapsed {
    width: 64px !important;
    min-width: 64px !important;
  }

  #sidebar.collapsed .nav-label,
  #sidebar.collapsed .logo-title,
  #sidebar.collapsed .logo-subtitle,
  #sidebar.collapsed .user-info {
    display: none !important;
  }

  #sidebar.collapsed .nav-item {
    justify-content: center !important;
    padding: 9px 0 !important;
  }

  #sidebar.collapsed .nav-item i {
    margin: 0 auto !important;
  }
}

/* Mobile Off-canvas Drawer Styles */
@media (max-width: 1023px) {
  #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: translateX(-100%) !important;
    height: 100vh !important;
    z-index: 50 !important;
    width: 250px !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35) !important;
  }

  #sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  #sidebar.collapsed {
    width: 250px !important;
  }

  #sidebar.collapsed .nav-label,
  #sidebar.collapsed .logo-title,
  #sidebar.collapsed .logo-subtitle,
  #sidebar.collapsed .user-info {
    display: block !important;
  }
}

#mobile-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  transition: opacity 0.25s ease;
}

#mobile-sidebar-backdrop.active {
  display: block !important;
}

#sidebar nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

#sidebar.collapsed .nav-item {
  justify-content: center !important;
  padding: 9px !important;
}

.nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  font-size: 13.5px;
  text-decoration: none;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.active {
  background: #2563eb !important;
  color: #fff !important;
}

.nav-item i {
  font-size: 18px;
  width: 22px !important;
  min-width: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.nav-item .nav-label {
  text-align: left !important;
  flex: 1 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User Menu */
.user-menu-wrap {
  position: relative;
  padding-bottom: 6px;
  margin-bottom: -6px;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.user-menu-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.user-menu-wrap:hover .user-menu-dropdown,
.user-menu-dropdown:hover {
  display: block !important;
}

/* Card */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Tables */
table thead {
  background: #f8fafc;
}

table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
}

table tbody td {
  padding: 10px 16px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}

table tbody tr:hover {
  background: #f0f7ff;
}

table tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}

/* Slide Panel */
.slide-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: 520px;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.slide-panel.open {
  right: 0;
}

#panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 99;
}

#panel-overlay.show {
  display: block;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.3s;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Modal Transitions */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

.compliance-bar-wrap {
  background: #f1f5f9;
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  min-width: 80px;
}

.compliance-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 20px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  transition: all 0.15s;
}

.filter-pill.active,
.filter-pill:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.checklist-section-pill {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  gap: 6px;
}

.checklist-section-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.checklist-section-pill.active {
  background: #0f172a;
  border-color: #0f172a;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.hospital-row-panel {
  cursor: pointer;
}

.hospital-row-panel:hover td:first-child {
  color: #2563eb;
}

.obs-card {
  border-left: 3px solid;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  margin-bottom: 8px;
}

input[type="text"],
input[type="date"],
select,
textarea {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

/* Ensure search icon never overlaps with placeholder text */
.relative i.ti-search + input,
.relative i.ti-search ~ input {
  padding-left: 2.5rem !important;
}

.relative i.ti-search {
  pointer-events: none;
  z-10: 10;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

#h-search:focus,
#h-status:focus,
#h-priority:focus {
  border-color: transparent;
  box-shadow: none;
}

.edit-row-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 8px;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Select2 Custom Modern Styling */
.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #1e293b !important;
  padding-left: 0.875rem !important;
  padding-right: 2rem !important;
  line-height: 38px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
  right: 8px !important;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.select2-dropdown {
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
  font-family: 'Outfit', sans-serif !important;
  overflow: hidden !important;
  z-index: 9999 !important;
}

.select2-search--dropdown {
  padding: 8px !important;
}

.select2-search--dropdown .select2-search__field {
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  padding: 6px 10px !important;
  font-size: 0.75rem !important;
  font-family: 'Outfit', sans-serif !important;
  outline: none !important;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: #2563eb !important;
}

.select2-results__option {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}

/* DataTables Modern Custom Theme */
.dataTables_wrapper {
  font-family: 'Outfit', sans-serif;
  width: 100%;
  position: relative;
  padding: 0 !important;
  box-sizing: border-box;
}

/* Fixed Top Toolbar (Search, Length, Export Buttons) */
.dataTables_wrapper .dt-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 10;
}

.dt-buttons,
.dataTables_wrapper .dt-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: wrap;
}

.dt-button,
.dataTables_wrapper .dt-buttons .dt-button {
  border-radius: 0.75rem !important;
  padding: 0.45rem 0.9rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  text-transform: none !important;
  margin-right: 0 !important;
}

.dt-button:hover,
.dataTables_wrapper .dt-buttons .dt-button:hover {
  transform: translateY(-1.5px) !important;
}

/* Pastel Styling & Focus/Active States for Export Buttons */
.dt-button.buttons-copy,
.dataTables_wrapper .dt-buttons .dt-button.buttons-copy {
  background-color: #eef2ff !important;
  color: #4338ca !important;
  border: 1px solid #c7d2fe !important;
}
.dt-button.buttons-copy:hover {
  background-color: #e0e7ff !important;
  border-color: #a5b4fc !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.18) !important;
}
.dt-button.buttons-copy:focus,
.dt-button.buttons-copy:focus-visible,
.dt-button.buttons-copy:active,
.dataTables_wrapper .dt-buttons .dt-button.buttons-copy:focus,
.dataTables_wrapper .dt-buttons .dt-button.buttons-copy:focus-visible,
.dataTables_wrapper .dt-buttons .dt-button.buttons-copy:active {
  outline: none !important;
  background-color: #e0e7ff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 12px rgba(99, 102, 241, 0.18) !important;
}

.dt-button.buttons-excel,
.dataTables_wrapper .dt-buttons .dt-button.buttons-excel {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}
.dt-button.buttons-excel:hover {
  background-color: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18) !important;
}
.dt-button.buttons-excel:focus,
.dt-button.buttons-excel:focus-visible,
.dt-button.buttons-excel:active,
.dataTables_wrapper .dt-buttons .dt-button.buttons-excel:focus,
.dataTables_wrapper .dt-buttons .dt-button.buttons-excel:focus-visible,
.dataTables_wrapper .dt-buttons .dt-button.buttons-excel:active {
  outline: none !important;
  background-color: #d1fae5 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 4px 12px rgba(16, 185, 129, 0.18) !important;
}

.dt-button.buttons-pdf,
.dataTables_wrapper .dt-buttons .dt-button.buttons-pdf {
  background-color: #fff1f2 !important;
  color: #be123c !important;
  border: 1px solid #fecdd3 !important;
}
.dt-button.buttons-pdf:hover {
  background-color: #ffe4e6 !important;
  border-color: #fda4af !important;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.18) !important;
}
.dt-button.buttons-pdf:focus,
.dt-button.buttons-pdf:focus-visible,
.dt-button.buttons-pdf:active,
.dataTables_wrapper .dt-buttons .dt-button.buttons-pdf:focus,
.dataTables_wrapper .dt-buttons .dt-button.buttons-pdf:focus-visible,
.dataTables_wrapper .dt-buttons .dt-button.buttons-pdf:active {
  outline: none !important;
  background-color: #ffe4e6 !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25), 0 4px 12px rgba(244, 63, 94, 0.18) !important;
}

.dt-button.buttons-print,
.dataTables_wrapper .dt-buttons .dt-button.buttons-print {
  background-color: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}
.dt-button.buttons-print:hover {
  background-color: #e0f2fe !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.18) !important;
}
.dt-button.buttons-print:focus,
.dt-button.buttons-print:focus-visible,
.dt-button.buttons-print:active,
.dataTables_wrapper .dt-buttons .dt-button.buttons-print:focus,
.dataTables_wrapper .dt-buttons .dt-button.buttons-print:focus-visible,
.dataTables_wrapper .dt-buttons .dt-button.buttons-print:active {
  outline: none !important;
  background-color: #e0f2fe !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25), 0 4px 12px rgba(14, 165, 233, 0.18) !important;
}

/* Clean Table Container with Sticky Header */
.dt-table-container {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  position: relative;
  width: 100%;
}

.dt-table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.dt-table-container::-webkit-scrollbar-track {
  background: #f8fafc;
}
.dt-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.dt-table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dataTables_filter {
  float: none !important;
  text-align: left !important;
  margin: 0 !important;
}

.dataTables_filter label {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

.dataTables_filter input {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  min-width: 220px;
}

.dataTables_filter input:focus {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.dataTables_length {
  float: none !important;
  margin: 0 !important;
}

.dataTables_length label {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

.dataTables_length select {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.5rem !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  outline: none !important;
  cursor: pointer;
}

table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

table.dataTable thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

table.dataTable thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  padding: 0.85rem 1rem !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #ffffff !important;
  background-color: #1e293b !important;
  border-bottom: 2px solid #0f172a !important;
  border-top: none !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
  color: #cbd5e1 !important;
}

table.dataTable tbody td,
table tbody td {
  display: table-cell !important;
  padding: 0.875rem 1rem !important;
  font-size: 0.8125rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  text-align: center !important;
}

table.dataTable tbody tr,
table tbody tr {
  border-bottom: 1px solid #f1f5f9 !important;
}

/* Ensure flexbox elements inside table cells do not break cell heights */
table.dataTable tbody td.flex,
table tbody td.flex {
  display: table-cell !important;
}

table.dataTable tbody td > .flex,
table tbody td > .flex,
table.dataTable thead th > .flex,
table thead th > .flex {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

table.dataTable tbody tr:hover {
  background-color: #f8fafc !important;
}

.dataTables_wrapper .dt-toolbar-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.25rem;
  border-top: none !important;
}

.dataTables_info {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  padding-top: 0 !important;
  float: none !important;
}

.dataTables_paginate {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding-top: 0 !important;
}

.dataTables_paginate .paginate_button {
  border-radius: 0.5rem !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
  margin-left: 0 !important;
  cursor: pointer !important;
}

.dataTables_paginate .paginate_button:hover {
  background: #eef2ff !important;
  color: #4338ca !important;
  border-color: #c7d2fe !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
  background-color: #e0e7ff !important;
  color: #3730a3 !important;
  border-color: #a5b4fc !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
}

.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

/* Custom Modern Select2 Searchable Dropdown Styling */
.select2-container {
  width: 100% !important;
  max-width: 100% !important;
}

.select2-container--default .select2-selection--single {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  height: 38px !important;
  padding: 0.2rem 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important;
}

.select2-container--default:hover .select2-selection--single {
  border-color: #93c5fd !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #1e293b !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  padding-left: 0.4rem !important;
  padding-right: 1.5rem !important;
  width: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 0.5rem !important;
  top: 1px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #64748b transparent transparent transparent !important;
  border-width: 5px 4px 0 4px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent #64748b transparent !important;
  border-width: 0 4px 5px 4px !important;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

/* Select2 Dropdown Popup */
.select2-dropdown {
  box-sizing: border-box !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
  z-index: 9999 !important;
}

.select2-search--dropdown {
  padding: 0.5rem !important;
  background-color: #ffffff !important;
}

.select2-search--dropdown .select2-search__field {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  outline: none !important;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

.select2-results__option {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 0.5rem 0.85rem !important;
  color: #334155 !important;
  transition: all 0.15s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #e0e7ff !important;
  color: #3730a3 !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Global Action Tooltips (Bento Enterprise Styling)
   ========================================================================== */
/* ==========================================================================
   Global Action Tooltips (Bento Enterprise Styling)
   ========================================================================== */
.tip,
[data-tip],
[data-tooltip] {
  position: relative !important;
}

.tip::before,
[data-tip]::before,
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease-in-out, transform 0.18s ease-in-out;
  z-index: 99999;
  letter-spacing: 0.01em;
}

.tip::after,
[data-tip]::after,
[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease-in-out, transform 0.18s ease-in-out;
  z-index: 99999;
}

[data-tip]::before {
  content: attr(data-tip);
}

.tip::before {
  content: attr(data-tip);
}

.tip:hover::before,
.tip:hover::after,
[data-tip]:hover::before,
[data-tip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
.tip:focus-visible::before,
.tip:focus-visible::after,
[data-tip]:focus-visible::before,
[data-tip]:focus-visible::after,
[data-tooltip]:focus-visible::before,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Right-Aligned Tooltips (Prevents Right-Edge Clipping) ── */
.tip-left::before,
[data-tooltip-pos="left"]::before,
[data-tip-pos="left"]::before {
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) !important;
}

.tip-left::after,
[data-tooltip-pos="left"]::after,
[data-tip-pos="left"]::after {
  left: auto !important;
  right: 10px !important;
  transform: translateY(4px) !important;
}

.tip-left:hover::before,
.tip-left:hover::after,
[data-tooltip-pos="left"]:hover::before,
[data-tooltip-pos="left"]:hover::after,
[data-tip-pos="left"]:hover::before,
[data-tip-pos="left"]:hover::after,
.tip-left:focus-visible::before,
.tip-left:focus-visible::after,
[data-tooltip-pos="left"]:focus-visible::before,
[data-tooltip-pos="left"]:focus-visible::after,
[data-tip-pos="left"]:focus-visible::after {
  transform: translateY(0) !important;
}

/* ── Drilldown Table: Override DataTables global td text-align ── */
#state-breakdown-table td,
#state-breakdown-table th {
  text-align: left !important;
}
#state-breakdown-table td:nth-child(2),
#state-breakdown-table th:nth-child(2) {
  text-align: right !important;
}
#state-breakdown-table td:nth-child(3),
#state-breakdown-table th:nth-child(3),
#state-breakdown-table td:nth-child(4),
#state-breakdown-table th:nth-child(4),
#state-breakdown-table td:nth-child(6),
#state-breakdown-table th:nth-child(6) {
  text-align: center !important;
}
#state-breakdown-table td:nth-child(5),
#state-breakdown-table th:nth-child(5) {
  text-align: right !important;
}
#state-breakdown-table td {
  vertical-align: middle !important;
}