/* Paint html background immediately per theme so no white gap shows */
html[data-bs-theme="dark"] {
  background-color: #18181b;
}

html[data-bs-theme="light"] {
  background-color: #f5f6fa;
}

/* Hide body until theme is confirmed */
html:not(.theme-loaded) body {
  opacity: 0;
}

/* Show body with smooth fade-in */
html.theme-loaded body {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

.page-item .page-link {
  border: 1px solid #3B71CA;
  /* Example: light grey border */
  border-radius: 4px;
  /* Example: slightly rounded corners */
  /* Add other styling as needed */
}

.dt-search>input {
  border: 1px solid #3B71CA;
  /* Example: light grey border */
  border-radius: 4px;
  /* Example: slightly rounded corners */
  /* Add other styling as needed */
}

.form-control {
  border: 1px solid #c5c5c5ff !important;
  border-radius: 4px;
}

.col-2-4 {
  width: 19%;
  /* 100% / 5 = 20% */
  float: left;
  /* For older Bootstrap versions or if not using flexbox */
  box-sizing: border-box;
  /* Include padding in the width calculation */
}

.text-vertical {
  writing-mode: sideways-lr;
  text-orientation: mixed;
}

.table-border {
  border: 1px solid black;
}

/* Select2 Base Styling - Match form-control */
.select2-container--default .select2-selection--single {
  border: 1px solid #c5c5c5ff !important;
  border-radius: 4px;
}

.select2-selection {
  padding-top: 4px;
  height: 38px !important;
  border: 1px solid #c5c5c5ff !important;
  border-radius: 4px;
}

.select2-selection:focus {
  border: 2px solid blue !important;
}

/* Hide Select2 Arrow */
.select2-selection__arrow {
  display: none !important;
}

/* Fix Select2 dropdown visibility and alignment in modal */
.select2-container {
  width: 100% !important;
}

/* Select2 non-modal (class .select2) - z-index dibawah 1000 */
select.select2~.select2-container {
  z-index: 1001 !important;
}

select.select2~.select2-container .select2-dropdown {
  z-index: 1001 !important;
}

/* Select2 modal (class .select2-modal, .select2-modal-xl) - z-index diatas 1055 */
select.select2-modal~.select2-container,
select.select2-modal-xl~.select2-container {
  z-index: 1070 !important;
}

select.select2-modal~.select2-container .select2-dropdown,
select.select2-modal-xl~.select2-container .select2-dropdown {
  z-index: 1071 !important;
}

.select2-dropdown {
  z-index: 1001 !important;
  min-width: auto !important;
  width: auto !important;
}

/* Ensure modal-content doesn't clip select2 dropdown */
.modal-content .select2-container--open {
  z-index: 1072 !important;
}

.modal-content {
  overflow: visible !important;
}

.modal-body {
  overflow: visible !important;
}

.modal-dialog {
  overflow: visible !important;
}

/* Modal backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
}

.modal-backdrop.show {
  opacity: 1 !important;
}

.loader-overlay {
  /* Position and size */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* Centering the spinner with Flexbox */
  display: flex;
  justify-content: center;
  align-items: center;

  /* Stacking order and background */
  z-index: 1050;
  /* Higher than Bootstrap modals (z-index 1040) */
  background-color: rgba(255, 255, 255, 0.5);
  /* Semi-transparent background */

  /* The blur effect */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  /* Safari support */
}

/* Theme-aware loader background to avoid white flash in dark mode */
[data-bs-theme="dark"] .loader-overlay {
  background-color: rgba(24, 24, 27, 0.5);
}

[data-bs-theme="light"] .loader-overlay {
  background-color: rgba(255, 255, 255, 0.5);
}

/* Hide the overlay by default */
.loader-overlay.hidden {
  display: none;
}

.cursor-pointer {
  cursor: pointer;
}

/* Force Theme Application - Ensure immediate visual update */
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] {
  color-scheme: dark;
}

[data-bs-theme="light"] body,
[data-bs-theme="light"] {
  color-scheme: light;
}

/* Select2 Dark Mode Styling - Match Bootstrap Form Control */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
  background-color: var(--bs-secondary-bg, #2a2a2e);
  border: 1px solid #d4d4d8 !important;
  color: var(--bs-body-color, #d4d4d8);
}

/* More specific selector for dark mode border - white/light color like form-control */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-selection {
  border: 1px solid #d4d4d8 !important;
  border-radius: 4px;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--bs-body-color, #d4d4d8);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--bs-secondary-color, #71717a);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--bs-body-color, #d4d4d8) transparent transparent transparent;
}

[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--bs-body-color, #d4d4d8) transparent;
}

[data-bs-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--single {
  border: 1px solid var(--bs-primary, #0d6efd) !important;
}

[data-bs-theme="dark"] .select2-dropdown {
  background-color: var(--bs-secondary-bg, #2a2a2e);
  border: 1px solid #d4d4d8 !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option {
  background-color: var(--bs-secondary-bg, #2a2a2e);
  color: var(--bs-body-color, #d4d4d8);
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--bs-primary, #0d6efd);
  color: #ffffff;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] {
  background-color: var(--bs-tertiary-bg, #2e2e32);
  color: var(--bs-body-color, #d4d4d8);
}

[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: var(--bs-tertiary-bg, #2e2e32);
  border: 1px solid #d4d4d8 !important;
  color: var(--bs-body-color, #d4d4d8);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
  background-color: var(--bs-secondary-bg, #2a2a2e);
  border: 1px solid #d4d4d8 !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--bs-tertiary-bg, #2e2e32);
  border: 1px solid #d4d4d8 !important;
  color: var(--bs-body-color, #d4d4d8);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--bs-body-color, #d4d4d8);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: var(--bs-danger, #dc3545);
}

/* ============================================================ */
/* Select2 Modern Theme Overrides - Light */
/* ============================================================ */

/* Selection Container - Light */
[data-bs-theme="light"] .select2-container--default .select2-selection--single,
[data-bs-theme="light"] .select2-container--default .select2-selection--multiple {
  border: 1px solid #d6dae1 !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}

/* Rendered Text - Light */
[data-bs-theme="light"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #1e293b !important;
  font-weight: 400;
}

/* Placeholder - Light */
[data-bs-theme="light"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8 !important;
}

/* Focus Border - Light */
[data-bs-theme="light"] .select2-container--default.select2-container--focus .select2-selection--single,
[data-bs-theme="light"] .select2-container--default.select2-container--open .select2-selection--single,
[data-bs-theme="light"] .select2-container--default.select2-container--focus .select2-selection--multiple,
[data-bs-theme="light"] .select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

/* Dropdown - Light */
[data-bs-theme="light"] .select2-dropdown {
  background-color: #fff !important;
  border: 1px solid #eef0f4 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden !important;
}

/* Options - Light */
[data-bs-theme="light"] .select2-container--default .select2-results__option {
  background-color: #fff !important;
  color: #475569 !important;
  padding: 0.65rem 0.85rem !important;
}

/* Highlighted Option - Light (primary gradient) */
[data-bs-theme="light"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #fff !important;
}

/* Selected Option - Light */
[data-bs-theme="light"] .select2-container--default .select2-results__option[aria-selected=true] {
  background-color: rgba(59, 130, 246, 0.08) !important;
  color: #3b82f6 !important;
}

/* Search Field - Light */
[data-bs-theme="light"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #fff !important;
  border: 1px solid #d6dae1 !important;
  border-radius: 8px !important;
  color: #475569 !important;
  padding: 0.5rem 0.75rem !important;
}

/* Selection Choices (Multiple) - Light */
[data-bs-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1)) !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
  border-radius: 8px !important;
  color: #3b82f6 !important;
}

[data-bs-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #3b82f6 !important;
}

[data-bs-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: #ef4444 !important;
}

/* ============================================================ */
/* Select2 Modern Theme Overrides - Dark */
/* ============================================================ */

/* Selection Container - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
  border: 1px solid #3f3f46 !important;
  border-radius: 10px !important;
  background-color: #18181b !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}

/* Rendered Text - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #e4e4e7 !important;
  font-weight: 400;
}

/* Placeholder - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #71717a !important;
}

/* Focus Border - Dark */
[data-bs-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--multiple,
[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

/* Dropdown - Dark */
[data-bs-theme="dark"] .select2-dropdown {
  background-color: #27272a !important;
  border: 1px solid #3f3f46 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden !important;
}

/* Options - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-results__option {
  background-color: #27272a !important;
  color: #d4d4d8 !important;
  padding: 0.65rem 0.85rem !important;
}

/* Highlighted Option - Dark (primary gradient) */
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #fff !important;
}

/* Selected Option - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] {
  background-color: rgba(59, 130, 246, 0.12) !important;
  color: #93c5fd !important;
}

/* Search Field - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #18181b !important;
  border: 1px solid #3f3f46 !important;
  border-radius: 8px !important;
  color: #e4e4e7 !important;
  padding: 0.5rem 0.75rem !important;
}

/* Selection Choices (Multiple) - Dark */
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.12)) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  border-radius: 8px !important;
  color: #93c5fd !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #93c5fd !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: #f87171 !important;
}

/* Logo Text Styling */
.logo-text {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: #000;
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
}

[data-bs-theme="dark"] .logo-text {
  color: #fff;
}

/* Sidebar Dark Mode Styling */
[data-bs-theme="light"] .sidenav-menu {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

[data-bs-theme="dark"] .sidenav-menu {
  background-color: #1c1c20 !important;
  color: #e4e4e7 !important;
}

[data-bs-theme="light"] .side-nav-link {
  color: #4a5568 !important;
  transition: all 0.2s ease;
}

[data-bs-theme="dark"] .side-nav-link {
  color: #c4c4cc !important;
  transition: all 0.2s ease;
}

[data-bs-theme="light"] .side-nav-link:hover {
  background-color: #e9ecef !important;
  color: #212529 !important;
}

[data-bs-theme="dark"] .side-nav-link:hover {
  background-color: #3a3a40 !important;
  color: #fff !important;
}

[data-bs-theme="light"] .side-nav-title {
  color: #6c757d !important;
}

[data-bs-theme="dark"] .side-nav-title {
  color: #8b8b93 !important;
}

[data-bs-theme="light"] .logo {
  background-color: #ffffff !important;
}

[data-bs-theme="dark"] .logo {
  background-color: #18181b !important;
}

[data-bs-theme="dark"] .sub-menu {
  background-color: #2e2e33 !important;
}

/* Select2 Mobile Fixes */
.select2-container {
  width: 100% !important;
}

.select2-container--open .select2-dropdown {
  overflow-y: auto;
}

.select2-dropdown {
  z-index: 1060 !important;
}

.select2-search__field {
  width: 100% !important;
  padding: 0.5rem;
}

.select2-results__option {
  padding: 0.75rem;
}

@media (max-width: 768px) {
  .select2-container {
    width: 100% !important;
  }

  .select2-container--open .select2-dropdown {
    max-height: 200px;
    position: absolute !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
    margin-top: 0 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
  }

  .select2-results__options {
    max-height: 180px;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Drag & Drop Sortable Styles */
  .sortable-ghost {
    opacity: 0.4;
    background-color: #f8f9fa;
  }

  body.dark-mode .sortable-ghost {
    background-color: #2e2e33;
  }

  .sortable-drag {
    opacity: 1;
  }

  .drag-handle {
    cursor: move;
    padding: 0.5rem;
    width: 3rem;
    min-width: 3rem;
    max-width: 3rem;
    transition: background-color 0.2s ease;
  }

  .drag-handle:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
  }
}

/* Stable Mode Banner */
.stable-mode-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
  box-sizing: border-box;
  animation: stableBannerSlideUp 0.4s ease-out;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: #1f2937;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

[data-bs-theme="dark"] .stable-mode-banner {
  backdrop-filter: blur(12px);
  background: rgba(24, 24, 27, 0.75);
  -webkit-backdrop-filter: blur(12px);
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
}

.stable-mode-banner__icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  color: #3b82f6;
}

[data-bs-theme="dark"] .stable-mode-banner__icon {
  color: #60a5fa;
}

.stable-mode-banner__text {
  flex-grow: 1;
  color: #1f2937;
}

[data-bs-theme="dark"] .stable-mode-banner__text {
  color: #e4e4e7;
}

.stable-mode-banner__btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.stable-mode-banner__btn:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

[data-bs-theme="dark"] .stable-mode-banner__btn {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

[data-bs-theme="dark"] .stable-mode-banner__btn:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.stable-mode-banner__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stable-mode-banner__close:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

[data-bs-theme="dark"] .stable-mode-banner__close {
  color: #9ca3af;
}

[data-bs-theme="dark"] .stable-mode-banner__close:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}

@keyframes stableBannerSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

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

@media print {
  .stable-mode-banner {
    display: none !important;
  }
}

/* ============================================================
     MODERN THEME OVERRIDES (do not edit imported template css)
     ============================================================ */

/* Global Body - Light */
body[data-bs-theme="light"] {
  background-color: #f5f6fa !important;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
  background-position: center !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Body - Dark */
body[data-bs-theme="dark"] {
  background-color: #18181b !important;
  background-image:
    linear-gradient(rgba(82, 82, 91, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 82, 91, 0.6) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
  background-position: center !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Let the body grid show through the content area */
body[data-bs-theme="light"] .page-content,
body[data-bs-theme="dark"] .page-content {
  background: transparent !important;
}

/* Cards - Light */
[data-bs-theme="light"] .card {
  background: #ffffff !important;
  border: 1px solid #eef0f4 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05) !important;
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Cards - Dark */
[data-bs-theme="dark"] .card {
  background: #27272a !important;
  border-color: #3f3f46 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Cards Hover - Light */
[data-bs-theme="light"] .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Cards Hover - Dark */
[data-bs-theme="dark"] .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Card top margin */
.card {
  margin-top: 1rem !important;
}

/* Card Title & Body - Transparent in light, darker in dark mode */
[data-bs-theme="light"] .card-header,
[data-bs-theme="light"] .card-body {
  background: transparent !important;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-body {
  background: rgba(24, 24, 27, 0.6) !important;
}

/* Stat Tiles (.tilebox-one) - Light */
[data-bs-theme="light"] .tilebox-one {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
  border-radius: 14px !important;
  border: 1px solid #eef0f4 !important;
}

/* Stat Tiles (.tilebox-one) - Dark */
[data-bs-theme="dark"] .tilebox-one {
  background: linear-gradient(135deg, #27272a 0%, #1f1f23 100%) !important;
  border-color: #3f3f46 !important;
}

/* Stat Tiles Icon Color - Light */
[data-bs-theme="light"] .tilebox-one i.ti {
  color: #3b82f6 !important;
}

/* Stat Tiles Icon Color - Dark */
[data-bs-theme="dark"] .tilebox-one i.ti {
  color: #60a5fa !important;
}

/* Buttons - Global */
[data-bs-theme="light"] .btn,
[data-bs-theme="dark"] .btn {
  border-radius: 10px !important;
  font-weight: 500 !important;
  transition: all .2s ease !important;
}

/* Primary Button - Light */
[data-bs-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35) !important;
}

/* Primary Button Hover - Light */
[data-bs-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
}

/* Primary Button Focus - Light */
[data-bs-theme="light"] .btn-primary:focus {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.5) !important;
}

/* Primary Button - Dark */
[data-bs-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35) !important;
}

/* Primary Button Hover - Dark */
[data-bs-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
}

/* Success Button - Light */
[data-bs-theme="light"] .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

/* Success Button Hover - Light */
[data-bs-theme="light"] .btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

/* Success Button - Dark */
[data-bs-theme="dark"] .btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}

/* Success Button Hover - Dark */
[data-bs-theme="dark"] .btn-success:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

/* Danger Button - Light */
[data-bs-theme="light"] .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

/* Danger Button Hover - Light */
[data-bs-theme="light"] .btn-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, #fca5a5 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45) !important;
}

/* Danger Button - Dark */
[data-bs-theme="dark"] .btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
}

/* Danger Button Hover - Dark */
[data-bs-theme="dark"] .btn-danger:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45) !important;
}

/* Warning Button - Light */
[data-bs-theme="light"] .btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}

/* Warning Button Hover - Light */
[data-bs-theme="light"] .btn-warning:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #fcd34d 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

/* Warning Button - Dark */
[data-bs-theme="dark"] .btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
}

/* Warning Button Hover - Dark */
[data-bs-theme="dark"] .btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

/* Info Button - Light */
[data-bs-theme="light"] .btn-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
}

/* Info Button Hover - Light */
[data-bs-theme="light"] .btn-info:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45) !important;
}

/* Info Button - Dark */
[data-bs-theme="dark"] .btn-info {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

/* Info Button Hover - Dark */
[data-bs-theme="dark"] .btn-info:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45) !important;
}

/* ============================================================ */
/* btn-outline-* Modern Theme Overrides */
/* ============================================================ */

/* Outline Primary - Light */
[data-bs-theme="light"] .btn-outline-primary {
  background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.08)) !important;
  border: 1px solid #3b82f6 !important;
  color: #3b82f6 !important;
  border-radius: 10px !important;
}

/* Outline Primary Hover - Light */
[data-bs-theme="light"] .btn-outline-primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
}

/* Outline Primary - Dark */
[data-bs-theme="dark"] .btn-outline-primary {
  background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.15)) !important;
  border: 1px solid #60a5fa !important;
  color: #93c5fd !important;
  border-radius: 10px !important;
}

/* Outline Primary Hover - Dark */
[data-bs-theme="dark"] .btn-outline-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
}

/* Outline Success - Light */
[data-bs-theme="light"] .btn-outline-success {
  background: linear-gradient(135deg, transparent, rgba(16, 185, 129, 0.08)) !important;
  border: 1px solid #10b981 !important;
  color: #10b981 !important;
  border-radius: 10px !important;
}

/* Outline Success Hover - Light */
[data-bs-theme="light"] .btn-outline-success:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

/* Outline Success - Dark */
[data-bs-theme="dark"] .btn-outline-success {
  background: linear-gradient(135deg, transparent, rgba(16, 185, 129, 0.15)) !important;
  border: 1px solid #34d399 !important;
  color: #6ee7b7 !important;
  border-radius: 10px !important;
}

/* Outline Success Hover - Dark */
[data-bs-theme="dark"] .btn-outline-success:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45) !important;
}

/* Outline Danger - Light */
[data-bs-theme="light"] .btn-outline-danger {
  background: linear-gradient(135deg, transparent, rgba(239, 68, 68, 0.08)) !important;
  border: 1px solid #ef4444 !important;
  color: #ef4444 !important;
  border-radius: 10px !important;
}

/* Outline Danger Hover - Light */
[data-bs-theme="light"] .btn-outline-danger:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45) !important;
}

/* Outline Danger - Dark */
[data-bs-theme="dark"] .btn-outline-danger {
  background: linear-gradient(135deg, transparent, rgba(239, 68, 68, 0.15)) !important;
  border: 1px solid #f87171 !important;
  color: #fecaca !important;
  border-radius: 10px !important;
}

/* Outline Danger Hover - Dark */
[data-bs-theme="dark"] .btn-outline-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45) !important;
}

/* Outline Warning - Light */
[data-bs-theme="light"] .btn-outline-warning {
  background: linear-gradient(135deg, transparent, rgba(245, 158, 11, 0.08)) !important;
  border: 1px solid #f59e0b !important;
  color: #f59e0b !important;
  border-radius: 10px !important;
}

/* Outline Warning Hover - Light */
[data-bs-theme="light"] .btn-outline-warning:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

/* Outline Warning - Dark */
[data-bs-theme="dark"] .btn-outline-warning {
  background: linear-gradient(135deg, transparent, rgba(245, 158, 11, 0.15)) !important;
  border: 1px solid #fbbf24 !important;
  color: #fde047 !important;
  border-radius: 10px !important;
}

/* Outline Warning Hover - Dark */
[data-bs-theme="dark"] .btn-outline-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45) !important;
}

/* Outline Info - Light */
[data-bs-theme="light"] .btn-outline-info {
  background: linear-gradient(135deg, transparent, rgba(14, 165, 233, 0.08)) !important;
  border: 1px solid #0ea5e9 !important;
  color: #0ea5e9 !important;
  border-radius: 10px !important;
}

/* Outline Info Hover - Light */
[data-bs-theme="light"] .btn-outline-info:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45) !important;
}

/* Outline Info - Dark */
[data-bs-theme="dark"] .btn-outline-info {
  background: linear-gradient(135deg, transparent, rgba(14, 165, 233, 0.15)) !important;
  border: 1px solid #38bdf8 !important;
  color: #7dd3fc !important;
  border-radius: 10px !important;
}

/* Outline Info Hover - Dark */
[data-bs-theme="dark"] .btn-outline-info:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45) !important;
}

/* Outline Secondary - Light */
[data-bs-theme="light"] .btn-outline-secondary {
  background: linear-gradient(135deg, transparent, rgba(108, 117, 125, 0.08)) !important;
  border: 1px solid #6c757d !important;
  color: #6c757d !important;
  border-radius: 10px !important;
}

/* Outline Secondary Hover - Light */
[data-bs-theme="light"] .btn-outline-secondary:hover {
  background: linear-gradient(135deg, #8c959e 0%, #6c757d 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.45) !important;
}

/* Outline Secondary - Dark */
[data-bs-theme="dark"] .btn-outline-secondary {
  background: linear-gradient(135deg, transparent, rgba(108, 117, 125, 0.15)) !important;
  border: 1px solid #8c959e !important;
  color: #adb5bd !important;
  border-radius: 10px !important;
}

/* Outline Secondary Hover - Dark */
[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.45) !important;
}

/* Outline Dark - Light */
[data-bs-theme="light"] .btn-outline-dark {
  background: linear-gradient(135deg, transparent, rgba(33, 37, 41, 0.08)) !important;
  border: 1px solid #212529 !important;
  color: #212529 !important;
  border-radius: 10px !important;
}

/* Outline Dark Hover - Light */
[data-bs-theme="light"] .btn-outline-dark:hover {
  background: linear-gradient(135deg, #343a40 0%, #212529 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(33, 37, 41, 0.45) !important;
}

/* Outline Dark - Dark */
[data-bs-theme="dark"] .btn-outline-dark {
  background: linear-gradient(135deg, transparent, rgba(108, 117, 125, 0.15)) !important;
  border: 1px solid #6c757d !important;
  color: #ced4da !important;
  border-radius: 10px !important;
}

/* Outline Dark Hover - Dark */
[data-bs-theme="dark"] .btn-outline-dark:hover {
  background: linear-gradient(135deg, #495057 0%, #212529 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(33, 37, 41, 0.45) !important;
}

/* Outline Light - Light */
[data-bs-theme="light"] .btn-outline-light {
  background: linear-gradient(135deg, transparent, rgba(206, 212, 218, 0.15)) !important;
  border: 1px solid #ced4da !important;
  color: #6c757d !important;
  border-radius: 10px !important;
}

/* Outline Light Hover - Light */
[data-bs-theme="light"] .btn-outline-light:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
  border-color: transparent !important;
  color: #212529 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(206, 212, 218, 0.45) !important;
}

/* Outline Light - Dark */
[data-bs-theme="dark"] .btn-outline-light {
  background: linear-gradient(135deg, transparent, rgba(248, 249, 250, 0.08)) !important;
  border: 1px solid #f8f9fa !important;
  color: #f8f9fa !important;
  border-radius: 10px !important;
}

/* Outline Light Hover - Dark */
[data-bs-theme="dark"] .btn-outline-light:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%) !important;
  border-color: transparent !important;
  color: #212529 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(248, 249, 250, 0.45) !important;
}

/* ============================================================ */
/* Background Utilities Modern Theme Overrides */
/* ============================================================ */

/* bg-primary / text-bg-primary */
[data-bs-theme="light"] .bg-primary,
[data-bs-theme="light"] .text-bg-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-primary,
[data-bs-theme="dark"] .text-bg-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #fff !important;
}

/* bg-success / text-bg-success */
[data-bs-theme="light"] .bg-success,
[data-bs-theme="light"] .text-bg-success {
  background-color: #10b981 !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-success,
[data-bs-theme="dark"] .text-bg-success {
  background-color: #059669 !important;
  color: #fff !important;
}

/* bg-danger / text-bg-danger */
[data-bs-theme="light"] .bg-danger,
[data-bs-theme="light"] .text-bg-danger {
  background-color: #ef4444 !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-danger,
[data-bs-theme="dark"] .text-bg-danger {
  background-color: #dc2626 !important;
  color: #fff !important;
}

/* bg-warning / text-bg-warning */
[data-bs-theme="light"] .bg-warning,
[data-bs-theme="light"] .text-bg-warning {
  background-color: #f59e0b !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-warning,
[data-bs-theme="dark"] .text-bg-warning {
  background-color: #d97706 !important;
  color: #fff !important;
}

/* bg-info / text-bg-info */
[data-bs-theme="light"] .bg-info,
[data-bs-theme="light"] .text-bg-info {
  background-color: #0ea5e9 !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-info,
[data-bs-theme="dark"] .text-bg-info {
  background-color: #0284c7 !important;
  color: #fff !important;
}

/* bg-secondary / text-bg-secondary */
[data-bs-theme="light"] .bg-secondary,
[data-bs-theme="light"] .text-bg-secondary {
  background-color: #64748b !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-secondary,
[data-bs-theme="dark"] .text-bg-secondary {
  background-color: #3f3f46 !important;
  color: #e4e4e7 !important;
}

/* bg-light */
[data-bs-theme="light"] .bg-light {
  background-color: #f8fafc !important;
  color: #475569 !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #27272a !important;
  color: #d4d4d8 !important;
}

/* bg-dark */
[data-bs-theme="light"] .bg-dark {
  background-color: #1e293b !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .bg-dark {
  background-color: #18181b !important;
  color: #e4e4e7 !important;
}

/* bg-white */
[data-bs-theme="light"] .bg-white {
  background-color: #fff !important;
  color: #1e293b !important;
}

[data-bs-theme="dark"] .bg-white {
  background-color: #27272a !important;
  color: #e4e4e7 !important;
}

/* Inputs - Light */
[data-bs-theme="light"] .form-control {
  border-radius: 10px !important;
  border: 1px solid #d6dae1 !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Inputs Focus - Light */
[data-bs-theme="light"] .form-control:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

/* Inputs - Dark */
[data-bs-theme="dark"] .form-control {
  background: #18181b !important;
  border-color: #3f3f46 !important;
  color: #e4e4e7 !important;
  border-radius: 10px !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Inputs Focus - Dark */
[data-bs-theme="dark"] .form-control:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

/* Form Select - Light */
[data-bs-theme="light"] .form-select {
  border-radius: 10px !important;
  border: 1px solid #d6dae1 !important;
  background-color: #fff !important;
  color: #1e293b !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}

[data-bs-theme="light"] .form-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

/* Form Select - Dark */
[data-bs-theme="dark"] .form-select {
  background-color: #18181b !important;
  border-color: #3f3f46 !important;
  color: #e4e4e7 !important;
  border-radius: 10px !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}

[data-bs-theme="dark"] .form-select:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

/* Input Group Text - Light */
[data-bs-theme="light"] .input-group-text {
  background-color: #f8fafc !important;
  border: 1px solid #d6dae1 !important;
  color: #475569 !important;
  border-radius: 10px !important;
}

/* Input Group Text - Dark */
[data-bs-theme="dark"] .input-group-text {
  background-color: #27272a !important;
  border-color: #3f3f46 !important;
  color: #a1a1aa !important;
  border-radius: 10px !important;
}

/* Tables - Light */
[data-bs-theme="light"] .table {
  background: #fff !important;
  --bs-table-bg: #fff !important;
}

/* Tables - Dark */
[data-bs-theme="dark"] .table {
  background: #27272a !important;
  --bs-table-bg: #27272a !important;
  color: #e4e4e7 !important;
}

/* Table Headers - Light */
[data-bs-theme="light"] .table thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #eef0f4 !important;
}

/* Table Headers - Dark */
[data-bs-theme="dark"] .table thead th {
  background: #1f1f23 !important;
  color: #d4d4d8 !important;
  border-color: #3f3f46 !important;
}

/* Table Cells - Dark */
[data-bs-theme="dark"] .table td {
  border-color: #3f3f46 !important;
}

/* Table Rows Hover - Light */
[data-bs-theme="light"] .table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06) !important;
}

/* Table Rows Hover - Dark */
[data-bs-theme="dark"] .table tbody tr:hover {
  background: rgba(59, 130, 246, 0.12) !important;
}

/* Sidenav - Light */
[data-bs-theme="light"] .sidenav-menu {
  background: #ffffff !important;
  border-right: 1px solid #eef0f4 !important;
}

/* Sidenav - Dark */
[data-bs-theme="dark"] .sidenav-menu {
  background: #18181b !important;
  border-right-color: #27272a !important;
}

/* Side Nav Links - Light */
[data-bs-theme="light"] .side-nav-link {
  border-radius: 10px !important;
  margin: 2px 8px !important;
  color: #475569 !important;
  transition: all .2s ease;
}

/* Side Nav Links Hover - Light */
[data-bs-theme="light"] .side-nav-link:hover,
[data-bs-theme="light"] .side-nav-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.12)) !important;
  color: #3b82f6 !important;
}

/* Side Nav Links - Dark */
[data-bs-theme="dark"] .side-nav-link {
  color: #a1a1aa !important;
  transition: all .2s ease;
}

/* Side Nav Links Hover - Dark */
[data-bs-theme="dark"] .side-nav-link:hover,
[data-bs-theme="dark"] .side-nav-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.12)) !important;
  color: #93c5fd !important;
}

/* Menu Icons */
.side-nav-link .menu-icon {
  color: inherit !important;
}

/* Submenu Links */
.sub-menu .side-nav-link {
  border-radius: 8px !important;
  margin: 2px 12px !important;
}

/* Topbar - Light */
[data-bs-theme="light"] .app-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #eef0f4 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Topbar - Dark */
[data-bs-theme="dark"] .app-topbar {
  background: #18181b !important;
  border-bottom-color: #27272a !important;
}

/* Topbar Links - Light */
[data-bs-theme="light"] .topbar-link {
  border-radius: 10px !important;
  transition: all .2s ease;
}

/* Topbar Links Hover - Light */
[data-bs-theme="light"] .topbar-link:hover {
  background: rgba(59, 130, 246, 0.1) !important;
}

/* Topbar Links - Dark */
[data-bs-theme="dark"] .topbar-link {
  color: #a1a1aa !important;
  transition: all .2s ease;
}

/* Topbar Links Hover - Dark */
[data-bs-theme="dark"] .topbar-link:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #e4e4e7 !important;
}

/* Dropdown Menus - Light */
[data-bs-theme="light"] .dropdown-menu {
  border-radius: 12px !important;
  border: 1px solid #eef0f4 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  padding: 0.4rem !important;
}

/* Dropdown Menus - Dark */
[data-bs-theme="dark"] .dropdown-menu {
  background: #27272a !important;
  border-color: #3f3f46 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Dropdown Items - Light */
[data-bs-theme="light"] .dropdown-item {
  border-radius: 8px !important;
  transition: all .2s ease !important;
}

/* Dropdown Items Hover - Light */
[data-bs-theme="light"] .dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
}

/* Dropdown Items - Dark */
[data-bs-theme="dark"] .dropdown-item {
  color: #d4d4d8 !important;
  transition: all .2s ease !important;
}

/* Dropdown Items Hover - Dark */
[data-bs-theme="dark"] .dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #93c5fd !important;
}

/* Dropdown Header - Light */
[data-bs-theme="light"] .dropdown-header.bg-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-radius: 10px 10px 0 0 !important;
}

/* Dropdown Header - Dark */
[data-bs-theme="dark"] .dropdown-header.bg-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-radius: 10px 10px 0 0 !important;
}

/* Modals - Light */
[data-bs-theme="light"] .modal-content {
  border-radius: 16px !important;
  border: 1px solid #eef0f4 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
}

/* Modals - Dark */
[data-bs-theme="dark"] .modal-content {
  background: #27272a !important;
  border-color: #3f3f46 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Modal Headers/Footers - Dark */
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
  border-color: #3f3f46 !important;
}

/* Offcanvas - Dark */
[data-bs-theme="dark"] .offcanvas {
  background: #27272a !important;
}

/* Offcanvas Header - Dark */
[data-bs-theme="dark"] .offcanvas-header.bg-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
}

/* Footer - Light */
[data-bs-theme="light"] .footer {
  background: transparent !important;
  color: #64748b !important;
  border-top: 1px solid #eef0f4 !important;
}

/* Footer - Dark */
[data-bs-theme="dark"] .footer {
  background: transparent !important;
  color: #18181b !important;
  border-top-color: #27272a !important;
}

/* Page Title Box */
[data-bs-theme="light"] .page-title-box {
  margin-bottom: 1.25rem !important;
  background: #fff !important;
  border: 1px solid #eef0f4 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05) !important;
  padding: 1rem 1.25rem !important;
}

[data-bs-theme="dark"] .page-title-box {
  margin-bottom: 1.25rem !important;
  background: #27272a !important;
  border: 1px solid #3f3f46 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  padding: 1rem 1.25rem !important;
}

/* Smooth Transitions for Standard Components */
[data-bs-theme="light"] .card,
[data-bs-theme="light"] .btn,
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .side-nav-link,
[data-bs-theme="light"] .dropdown-item,
[data-bs-theme="light"] .topbar-link {
  transition: all .2s ease !important;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .btn,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .side-nav-link,
[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .topbar-link {
  transition: all .2s ease !important;
}

/* ============================================================ */
/* C3 Chart Modern Theme Overrides */
/* ============================================================ */

/* Generic chart text sizing */
.c3 svg {
  font-size: 12px;
}

/* Light theme charts */
[data-bs-theme="light"] .c3 svg {
  fill: #475569;
}

[data-bs-theme="light"] .c3-axis path,
[data-bs-theme="light"] .c3-axis line {
  stroke: #e2e8f0;
}

[data-bs-theme="light"] .c3-grid line {
  stroke: #eef2f7;
}

[data-bs-theme="light"] .c3-line {
  stroke-width: 2.5px;
}

[data-bs-theme="light"] .c3-area {
  opacity: 0.15;
}

[data-bs-theme="light"] .c3-legend-item text {
  fill: #475569;
}

[data-bs-theme="light"] .c3-tooltip {
  background: #fff !important;
  border: 1px solid #eef0f4 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  opacity: 1 !important;
  overflow: hidden !important;
  color: #1e293b !important;
}

[data-bs-theme="light"] .c3-tooltip th {
  background: #f8fafc !important;
  color: #475569 !important;
}

[data-bs-theme="light"] .c3-tooltip td {
  background: #fff !important;
  border-top: 1px solid #eef0f4 !important;
  border-left: 1px solid #eef0f4 !important;
  color: #1e293b !important;
}

[data-bs-theme="light"] .c3-tooltip td.name {
  background-color: transparent !important;
}

[data-bs-theme="light"] .c3-tooltip td.value {
  color: #1e293b !important;
}

[data-bs-theme="light"] .c3-tooltip-container {
  opacity: 1 !important;
}

[data-bs-theme="light"] .c3-chart-arc .c3-chart-arcs-title {
  fill: #1e293b !important;
}

[data-bs-theme="light"] .c3-chart-arc path {
  stroke: #fff;
}

/* Dark theme charts */
[data-bs-theme="dark"] .c3 svg {
  fill: #d4d4d8;
}

[data-bs-theme="dark"] .c3-axis path,
[data-bs-theme="dark"] .c3-axis line {
  stroke: #3f3f46;
}

[data-bs-theme="dark"] .c3-grid line {
  stroke: #27272a;
}

[data-bs-theme="dark"] .c3-line {
  stroke-width: 2.5px;
}

[data-bs-theme="dark"] .c3-area {
  opacity: 0.2;
}

[data-bs-theme="dark"] .c3-legend-item text {
  fill: #d4d4d8;
}

[data-bs-theme="dark"] .c3-tooltip {
  background: #27272a !important;
  border: 1px solid #3f3f46 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  opacity: 1 !important;
  overflow: hidden !important;
  color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .c3-tooltip th {
  background: #1f1f23 !important;
  color: #d4d4d8 !important;
}

[data-bs-theme="dark"] .c3-tooltip td {
  background: #27272a !important;
  border-top: 1px solid #3f3f46 !important;
  border-left: 1px solid #3f3f46 !important;
  color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .c3-tooltip td.name {
  background-color: transparent !important;
}

[data-bs-theme="dark"] .c3-tooltip td.value {
  color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .c3-tooltip-container {
  opacity: 1 !important;
}

[data-bs-theme="dark"] .c3-chart-arc .c3-chart-arcs-title {
  fill: #e4e4e7 !important;
}

[data-bs-theme="dark"] .c3-chart-arc path {
  stroke: #27272a;
}

/* ============================================================ */
/* MODERN TOASTR OVERRIDES */
/* ============================================================ */

/* Toastr container base */
#toast-container>.toast {
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1 !important;
  border: 1px solid transparent !important;
  padding: 12px 16px 12px 50px !important;
  background-image: none !important;
}

#toast-container>.toast:before {
  content: "" !important;
  display: none !important;
}

#toast-container>.toast .toast-title {
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

#toast-container>.toast .toast-message {
  font-size: 0.875rem !important;
  line-height: 1.4 !important;
}

/* Light theme toasts */
[data-bs-theme="light"] #toast-container>.toast {
  background-color: rgba(255, 255, 255, 0.92) !important;
  color: #1e293b !important;
  border-color: #eef0f4 !important;
}

[data-bs-theme="light"] #toast-container>.toast .toast-title {
  color: #1e293b !important;
}

[data-bs-theme="light"] #toast-container>.toast .toast-message {
  color: #475569 !important;
}

[data-bs-theme="light"] #toast-container>.toast .toast-close-button {
  color: #94a3b8 !important;
  text-shadow: none !important;
  opacity: 0.8 !important;
}

[data-bs-theme="light"] #toast-container>.toast .toast-close-button:hover {
  color: #475569 !important;
  opacity: 1 !important;
}

/* Dark theme toasts */
[data-bs-theme="dark"] #toast-container>.toast {
  background-color: rgba(39, 41, 42, 0.92) !important;
  color: #e4e4e7 !important;
  border-color: #3f3f46 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] #toast-container>.toast .toast-title {
  color: #f4f4f5 !important;
}

[data-bs-theme="dark"] #toast-container>.toast .toast-message {
  color: #d4d4d8 !important;
}

[data-bs-theme="dark"] #toast-container>.toast .toast-close-button {
  color: #a1a1aa !important;
  text-shadow: none !important;
  opacity: 0.8 !important;
}

[data-bs-theme="dark"] #toast-container>.toast .toast-close-button:hover {
  color: #e4e4e7 !important;
  opacity: 1 !important;
}

/* Toast accent left border by type */
#toast-container>.toast.toast-success {
  border-left: 4px solid #10b981 !important;
}

#toast-container>.toast.toast-error {
  border-left: 4px solid #ef4444 !important;
}

#toast-container>.toast.toast-info {
  border-left: 4px solid #3b82f6 !important;
}

#toast-container>.toast.toast-warning {
  border-left: 4px solid #f59e0b !important;
}

/* Progress bar */
#toast-container>.toast .toast-progress {
  opacity: 0.5 !important;
  height: 3px !important;
}

#toast-container>.toast.toast-success .toast-progress {
  background-color: #10b981 !important;
}

#toast-container>.toast.toast-error .toast-progress {
  background-color: #ef4444 !important;
}

#toast-container>.toast.toast-info .toast-progress {
  background-color: #3b82f6 !important;
}

#toast-container>.toast.toast-warning .toast-progress {
  background-color: #f59e0b !important;
}

@media print {
  .row-print-horizontal {
    display: flex !important;
    flex-wrap: nowrap !important;
    /* Prevents columns from wrapping to a new line */
  }
}

.stat-slider {
  position: relative;
  overflow: hidden;
}

.stat-slider-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
  gap: 1rem;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.stat-slider-track:active {
  cursor: grabbing;
}

.stat-slider-track .stat-card {
  flex: 0 0 calc(25% - 0.75rem);
  min-width: 0;
}

.stat-slider-track .card {
  width: 100%;
}

@media (max-width: 1200px) and (min-width: 769px) {
  .stat-slider-track .stat-card {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

@media (max-width: 768px) {
  .stat-slider-track .stat-card {
    flex: 0 0 100%;
  }
}

.stat-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5rem;
  transition: background 0.2s;
}

.stat-slider-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.stat-slider-prev {
  left: 10px;
}

.stat-slider-next {
  right: 10px;
}

/* Debit row highlight — light mode */
.journal-debit-row>td {
  background-color: #bfff9d !important;
}

/* Debit row highlight — dark mode (soft tint, readable text) */
[data-bs-theme="dark"] .journal-debit-row>td {
  background-color: rgba(191, 255, 157, 0.18) !important;
}

/* Keep the highlight when printing (print forces light mode) */
@media print {
  .journal-debit-row>td {
    background-color: #bfff9d !important;
  }
}

#datatables_buttons_info {
  color: black !important;
}

#datatables_buttons_info>h2 {
  color: black !important;
}

@media print {
  @page {
    size: A4;
  }

  .btn {
    display: none;
  }

  .card-title {
    display: none;
  }

  body {
    margin: 0;
    padding: 0;
  }
}

/* Thead styling untuk light mode */
thead th {
  background-color: #f8f9fa !important;
  color: #000 !important;
  border-color: #dee2e6 !important;
  padding: 8px;
  font-weight: 600;
}

/* Thead styling untuk dark mode */
[data-bs-theme="dark"] thead th {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: #6c757d !important;
}

/* Dark mode table improvements */
[data-bs-theme="dark"] table {
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .table-border {
  border-color: #6c757d !important;
}

/* Print override - force light mode for thead */
@media print {
  thead th {
    background-color: #f8f9fa !important;
    color: #000 !important;
    border-color: #000 !important;
  }
}

/* Account Type Colors - Light Mode */
.account-type-1 {
  background-color: #fff1a5ff !important;
}

.account-type-2 {
  background-color: #abcaffff !important;
}

.account-type-3 {
  background-color: #e0a1ffff !important;
}

.account-type-4 {
  background-color: #bfff9dff !important;
}

.account-type-5 {
  background-color: #ffdca4ff !important;
}

.account-type-6 {
  background-color: #ffccccff !important;
}

.account-type-7 {
  background-color: #d4f1d4ff !important;
}

.account-type-8 {
  background-color: #ffe4b3ff !important;
}

.account-type-9 {
  background-color: #e8e8e8ff !important;
}

/* Account Type Colors - Dark Mode with better contrast */
[data-bs-theme="dark"] .account-type-1 {
  background-color: #4a4420 !important;
  color: #f5e6a3 !important;
}

[data-bs-theme="dark"] .account-type-2 {
  background-color: #1e3a5f !important;
  color: #b8d4ff !important;
}

[data-bs-theme="dark"] .account-type-3 {
  background-color: #3d2a4d !important;
  color: #e8c4ff !important;
}

[data-bs-theme="dark"] .account-type-4 {
  background-color: #2d4020 !important;
  color: #c8ffaa !important;
}

[data-bs-theme="dark"] .account-type-5 {
  background-color: #4d3520 !important;
  color: #ffd8a8 !important;
}

[data-bs-theme="dark"] .account-type-6 {
  background-color: #4d2020 !important;
  color: #ffcccc !important;
}

[data-bs-theme="dark"] .account-type-7 {
  background-color: #2a402a !important;
  color: #d4f1d4 !important;
}

[data-bs-theme="dark"] .account-type-8 {
  background-color: #4d3a20 !important;
  color: #ffe4b3 !important;
}

[data-bs-theme="dark"] .account-type-9 {
  background-color: #3a3a3a !important;
  color: #e8e8e8 !important;
}

/* Dark mode table improvements */
[data-bs-theme="dark"] .table-border {
  border-color: #6c757d !important;
}

[data-bs-theme="dark"] table {
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] thead th {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: #6c757d !important;
}

[data-bs-theme="dark"] tfoot td {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
}

/* Improve card appearance in dark mode */
[data-bs-theme="dark"] .card {
  background-color: rgba(39, 41, 42, 0.85) !important;
  border-color: #6c757d !important;
}

[data-bs-theme="dark"] .card-header {
  background-color: rgba(24, 24, 27, 0.6) !important;
  border-color: #6c757d !important;
}

/* Better text contrast in dark mode */
[data-bs-theme="dark"] .fw-bold {
  color: #fff !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin-top: 10mm;
    margin-bottom: 10mm;
    margin-right: 10mm;
    margin-left: 10mm;
    padding: auto;
    font-size: 12pt;
  }

  .btn {
    display: none;
  }

  .card-title {
    display: none;
  }

  body {
    margin: 0;
    padding: 0;
    background-color: #fff !important;
    color: #000 !important;
  }

  table {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    color: #000 !important;
  }

  /* Force light mode colors on print - override dark mode */
  .account-type-1,
  [data-bs-theme="dark"] .account-type-1 {
    background-color: #fff1a5ff !important;
    color: #000 !important;
  }

  .account-type-2,
  [data-bs-theme="dark"] .account-type-2 {
    background-color: #abcaffff !important;
    color: #000 !important;
  }

  .account-type-3,
  [data-bs-theme="dark"] .account-type-3 {
    background-color: #e0a1ffff !important;
    color: #000 !important;
  }

  .account-type-4,
  [data-bs-theme="dark"] .account-type-4 {
    background-color: #bfff9dff !important;
    color: #000 !important;
  }

  .account-type-5,
  [data-bs-theme="dark"] .account-type-5 {
    background-color: #ffdca4ff !important;
    color: #000 !important;
  }

  .account-type-6,
  [data-bs-theme="dark"] .account-type-6 {
    background-color: #ffccccff !important;
    color: #000 !important;
  }

  .account-type-7,
  [data-bs-theme="dark"] .account-type-7 {
    background-color: #d4f1d4ff !important;
    color: #000 !important;
  }

  .account-type-8,
  [data-bs-theme="dark"] .account-type-8 {
    background-color: #ffe4b3ff !important;
    color: #000 !important;
  }

  .account-type-9,
  [data-bs-theme="dark"] .account-type-9 {
    background-color: #e8e8e8ff !important;
    color: #000 !important;
  }

  /* Force light mode for table elements */
  thead th,
  [data-bs-theme="dark"] thead th {
    background-color: #f8f9fa !important;
    color: #000 !important;
    border-color: #000 !important;
  }

  tfoot td,
  [data-bs-theme="dark"] tfoot td {
    background-color: #f8f9fa !important;
    color: #000 !important;
  }

  .table-border,
  [data-bs-theme="dark"] .table-border {
    border-color: #000 !important;
  }

  .fw-bold,
  [data-bs-theme="dark"] .fw-bold {
    color: #000 !important;
  }

  .card,
  [data-bs-theme="dark"] .card {
    background-color: #fff !important;
    border: none !important;
  }

  .card-body,
  [data-bs-theme="dark"] .card-body {
    background-color: #fff !important;
  }

  thead {
    display: table-row-group;
  }

  table {
    page-break-inside: auto
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto
  }

  /* tfoot removed - will only appear at the end of table, not repeated on each page */
}

/* ============================================================ */
/* AUTHENTICATION LAYOUT OVERRIDES */
/* ============================================================ */

/* Modern Dark Theme Overrides for Authentication */
html[data-bs-theme="dark"] body.authentication-bg,
body.authentication-bg {
  background-color: #18181b !important;
  color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .account-card-box {
  background-color: #27272a !important;
}

[data-bs-theme="dark"] .account-card-box .card {
  background-color: #27272a !important;
  border-color: #3f3f46 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .account-card-box .card .card-body {
  background-color: #27272a !important;
}

[data-bs-theme="dark"] .form-control {
  background-color: #18181b !important;
  border-color: #3f3f46 !important;
  color: #e4e4e7 !important;
  border-radius: 10px !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}

[data-bs-theme="dark"] .form-control:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #a1a1aa !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #a1a1aa !important;
}

[data-bs-theme="dark"] .card.border-primary {
  border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}

[data-bs-theme="dark"] .btn-success:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

[data-bs-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

[data-bs-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
}

[data-bs-theme="dark"] .form-check-input {
  background-color: #27272a !important;
  border-color: #3f3f46 !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .form-check-label {
  color: #e4e4e7 !important;
}

/* Auth wrapper centers the card above the blobs */
.auth-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Unified glassy card holding logo + form */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(39, 41, 42, 0.72);
  border: 1px solid rgba(63, 63, 70, 0.9);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-brand {
  margin-bottom: 1.5rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-logo img {
  height: 46px;
  width: auto;
}

.auth-title {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #a1a1aa;
  text-transform: uppercase;
}

.auth-form .form-label {
  color: #e4e4e7;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}