/* styles.css - Separate stylesheet for the admin panel */

/* Theme Variables */
:root {
  /* Light Theme (Default) */
  --primary-color: #4f46e5;
  --secondary-color: #10b981;
  --bg-color: #f9fafb;
  --text-color: #1f2937;
  --card-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-text: #1f2937;
  --sidebar-border: #e5e7eb;
  --sidebar-hover: #f3f4f6;
  --sidebar-active: #e5e7eb;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition-speed: 0.3s;
}

/* Dark Theme (data-theme or Tailwind .dark class) */
[data-theme="dark"],
.dark:not([data-theme="light"]) {
  --primary-color: #6366f1;
  --secondary-color: #34d399;
  --bg-color: #111827;
  --text-color: #f9fafb;
  --card-bg: #1f2937;
  --sidebar-bg: #0f172a;
  --sidebar-text: #f3f4f6;
  --sidebar-border: #374151;
  --sidebar-hover: #1e293b;
  --sidebar-active: #334155;
  --border-color: #374151;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5),
    0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  font-family: "Inter", sans-serif;
}

/* Legacy pages that were authored as dark-first.
   In light mode, map their gray utility classes to light equivalents. */
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-gray-900 {
  background-color: #f9fafb !important;
}

:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-gray-800 {
  background-color: #ffffff !important;
}

:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-gray-700 {
  background-color: #f3f4f6 !important;
}

:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .border-gray-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .border-gray-600 {
  border-color: #e5e7eb !important;
}

:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .divide-gray-700 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e5e7eb !important;
}

:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .text-gray-200,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .text-gray-300,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .text-gray-400,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .text-white {
  color: #111827 !important;
}

/* Keep readable contrast for colored buttons/cards/alerts in light mode. */
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page [class*="from-"][class*="to-"],
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-primary-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-primary-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-blue-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-blue-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-indigo-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-indigo-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-purple-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-purple-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-green-500,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-green-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-green-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-red-500,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-red-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-red-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-yellow-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-yellow-700,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-amber-500,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-amber-600,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-amber-700 {
  color: #ffffff !important;
}

:is([data-theme="light"], html:not(.dark)) .legacy-dark-page [class*="from-"][class*="to-"] *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-primary-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-primary-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-blue-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-blue-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-indigo-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-indigo-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-purple-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-purple-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-green-500 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-green-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-green-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-red-500 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-red-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-red-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-yellow-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-yellow-700 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-amber-500 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-amber-600 *,
:is([data-theme="light"], html:not(.dark)) .legacy-dark-page .bg-amber-700 * {
  color: inherit !important;
}

/* Universal compatibility: apply the same mapping globally in light mode
   so dark-first utility classes render correctly without per-page CSS. */
:is([data-theme="light"], html:not(.dark)) .bg-gray-900 {
  background-color: #f9fafb !important;
}

:is([data-theme="light"], html:not(.dark)) .bg-gray-800 {
  background-color: #ffffff !important;
}

:is([data-theme="light"], html:not(.dark)) .bg-gray-700 {
  background-color: #f3f4f6 !important;
}

/* Handle slash-opacity gray utilities used by dark-first pages (e.g. bg-gray-900/70). */
:is([data-theme="light"], html:not(.dark)) [class^="bg-gray-900/"],
:is([data-theme="light"], html:not(.dark)) [class*=" bg-gray-900/"] {
  background-color: #f3f4f6 !important;
}

:is([data-theme="light"], html:not(.dark)) [class^="bg-gray-800/"],
:is([data-theme="light"], html:not(.dark)) [class*=" bg-gray-800/"] {
  background-color: #ffffff !important;
}

:is([data-theme="light"], html:not(.dark)) [class^="bg-gray-700/"],
:is([data-theme="light"], html:not(.dark)) [class*=" bg-gray-700/"] {
  background-color: #f3f4f6 !important;
}

:is([data-theme="light"], html:not(.dark)) .border-gray-700,
:is([data-theme="light"], html:not(.dark)) .border-gray-600 {
  border-color: #e5e7eb !important;
}

:is([data-theme="light"], html:not(.dark)) [class^="border-gray-700/"],
:is([data-theme="light"], html:not(.dark)) [class*=" border-gray-700/"],
:is([data-theme="light"], html:not(.dark)) [class^="border-gray-600/"],
:is([data-theme="light"], html:not(.dark)) [class*=" border-gray-600/"] {
  border-color: #e5e7eb !important;
}

:is([data-theme="light"], html:not(.dark)) .divide-gray-700 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e5e7eb !important;
}

:is([data-theme="light"], html:not(.dark)) .text-gray-200,
:is([data-theme="light"], html:not(.dark)) .text-gray-300,
:is([data-theme="light"], html:not(.dark)) .text-gray-400,
:is([data-theme="light"], html:not(.dark)) .text-white {
  color: #111827 !important;
}

/* Preserve contrast on colored UI surfaces after universal text overrides. */
:is([data-theme="light"], html:not(.dark)) [class*="from-"][class*="to-"],
:is([data-theme="light"], html:not(.dark)) .bg-primary-600,
:is([data-theme="light"], html:not(.dark)) .bg-primary-700,
:is([data-theme="light"], html:not(.dark)) .bg-blue-600,
:is([data-theme="light"], html:not(.dark)) .bg-blue-700,
:is([data-theme="light"], html:not(.dark)) .bg-indigo-600,
:is([data-theme="light"], html:not(.dark)) .bg-indigo-700,
:is([data-theme="light"], html:not(.dark)) .bg-purple-600,
:is([data-theme="light"], html:not(.dark)) .bg-purple-700,
:is([data-theme="light"], html:not(.dark)) .bg-green-500,
:is([data-theme="light"], html:not(.dark)) .bg-green-600,
:is([data-theme="light"], html:not(.dark)) .bg-green-700,
:is([data-theme="light"], html:not(.dark)) .bg-red-500,
:is([data-theme="light"], html:not(.dark)) .bg-red-600,
:is([data-theme="light"], html:not(.dark)) .bg-red-700,
:is([data-theme="light"], html:not(.dark)) .bg-yellow-600,
:is([data-theme="light"], html:not(.dark)) .bg-yellow-700,
:is([data-theme="light"], html:not(.dark)) .bg-amber-500,
:is([data-theme="light"], html:not(.dark)) .bg-amber-600,
:is([data-theme="light"], html:not(.dark)) .bg-amber-700 {
  color: #ffffff !important;
}

:is([data-theme="light"], html:not(.dark)) [class*="from-"][class*="to-"] *,
:is([data-theme="light"], html:not(.dark)) .bg-primary-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-primary-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-blue-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-blue-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-indigo-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-indigo-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-purple-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-purple-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-green-500 *,
:is([data-theme="light"], html:not(.dark)) .bg-green-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-green-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-red-500 *,
:is([data-theme="light"], html:not(.dark)) .bg-red-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-red-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-yellow-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-yellow-700 *,
:is([data-theme="light"], html:not(.dark)) .bg-amber-500 *,
:is([data-theme="light"], html:not(.dark)) .bg-amber-600 *,
:is([data-theme="light"], html:not(.dark)) .bg-amber-700 * {
  color: inherit !important;
}

/* Universal compatibility: apply the same mapping globally in dark mode
   so light-first utility classes render correctly without per-page CSS. */
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-gray-50,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-gray-100 {
  background-color: #111827 !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-white,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-gray-200 {
  background-color: #1f2937 !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) [class^="bg-white/"],
:is([data-theme="dark"], .dark:not([data-theme="light"])) [class*=" bg-white/"] {
  background-color: #1f2937 !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) .border-gray-200,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .border-gray-300 {
  border-color: #374151 !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #374151 !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) .text-gray-900,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .text-gray-800,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .text-gray-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .text-gray-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .text-black {
  color: #f9fafb !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) .text-gray-500 {
  color: #d1d5db !important;
}

/* Preserve contrast on colored UI surfaces after universal text overrides in dark mode. */
:is([data-theme="dark"], .dark:not([data-theme="light"])) [class*="from-"][class*="to-"],
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-primary-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-primary-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-blue-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-blue-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-indigo-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-indigo-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-purple-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-purple-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-green-500,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-green-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-green-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-red-500,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-red-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-red-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-yellow-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-yellow-700,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-amber-500,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-amber-600,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-amber-700 {
  color: #ffffff !important;
}

:is([data-theme="dark"], .dark:not([data-theme="light"])) [class*="from-"][class*="to-"] *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-primary-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-primary-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-blue-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-blue-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-indigo-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-indigo-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-purple-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-purple-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-green-500 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-green-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-green-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-red-500 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-red-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-red-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-yellow-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-yellow-700 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-amber-500 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-amber-600 *,
:is([data-theme="dark"], .dark:not([data-theme="light"])) .bg-amber-700 * {
  color: inherit !important;
}

/* Sidebar follows theme: light in light mode, dark in dark mode (works on buy-price-monitor and all pages) */
.sidebar {
  background-color: var(--sidebar-bg) !important;
  color: var(--sidebar-text) !important;
  border-right: 1px solid var(--sidebar-border);
  transition: background-color var(--transition-speed),
    color var(--transition-speed),
    border-color var(--transition-speed);
}

.sidebar a,
.sidebar h1,
.sidebar h2,
.sidebar button,
.sidebar .fa,
.sidebar i,
.sidebar span {
  color: var(--sidebar-text) !important;
}

.sidebar .border-b,
.sidebar .border-t,
.sidebar [class*="border-l-"] {
  border-color: var(--sidebar-border) !important;
}

.sidebar .sidebar-link,
.sidebar button[data-collapsible-toggle] {
  background-color: transparent !important;
}

.sidebar .sidebar-link:hover,
.sidebar button[data-collapsible-toggle]:hover {
  background-color: var(--sidebar-hover) !important;
}

.sidebar .sidebar-link.is-active {
  background-color: var(--sidebar-active) !important;
  color: var(--sidebar-text) !important;
  box-shadow: inset 3px 0 0 var(--secondary-color);
}

.sidebar .sidebar-link.is-active i,
.sidebar .sidebar-link.is-active span {
  color: var(--sidebar-text) !important;
  font-weight: 600;
}

.sidebar .bg-red-500 {
  background-color: #ef4444 !important;
  color: #fff !important;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

[data-theme="dark"] .sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .sidebar nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.card {
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: background-color var(--transition-speed),
    box-shadow var(--transition-speed);
}

/* Allow main content column to shrink so top bar doesn't overflow/cut off */
.flex-1.flex.flex-col.ml-0 {
  min-width: 0;
}

.header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

/* Button Styles */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

/* Table Styles */
table {
  color: var(--text-color);
}

table thead th {
  color: var(--text-color);
  opacity: 0.7;
}

table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Form Controls */
input,
select,
textarea {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

/* Animation Styles */
.stats-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Animation for sidebar links */
.sidebar-link {
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.sidebar-link:hover::after {
  width: 100%;
}

.sidebar-link:hover {
  transform: translateX(5px);
}

/* Pulse animation for notification dot */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

.pulse-dot {
  animation: pulse 2s infinite;
}

/* Theme Switch Animation */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(30px);
}

.slider .sun {
  position: absolute;
  left: 8px;
  top: 6px;
  color: #f39c12;
  transition: 0.4s;
  opacity: 1;
}

.slider .moon {
  position: absolute;
  right: 8px;
  top: 6px;
  color: #f1c40f;
  transition: 0.4s;
  opacity: 0;
}

input:checked + .slider .sun {
  opacity: 0;
}

input:checked + .slider .moon {
  opacity: 1;
}

/* Dashboard specific styles */
.chart-container {
  position: relative;
  margin: auto;
  height: 300px;
  width: 100%;
}

/* Media Queries */
@media (max-width: 768px) {
  .grid-cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-cols-6 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.select-option-with-image {
  display: flex;
  align-items: center;
  padding: 5px 0;
}

.option-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 4px;
}

.option-text {
  font-size: 14px;
}

/* Customize Select2 to match your theme */
.select2-container--classic .select2-selection--single {
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem !important;
}

.select2-container--classic
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--text-color) !important;
  line-height: normal !important;
  padding-left: 0 !important;
}

.select2-container--classic
  .select2-selection--single
  .select2-selection__arrow {
  height: 48px !important;
}

.select2-container--classic .select2-dropdown {
  border-color: var(--border-color) !important;
  background-color: var(--card-bg) !important;
}

.select2-container--classic .select2-results__option {
  color: var(--text-color) !important;
}

.select2-container--classic
  .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-color) !important;
  color: white !important;
}

/* Dark mode adjustment */
[data-theme="dark"] .select2-container--classic .select2-dropdown,
[data-theme="dark"] .select2-container--classic .select2-selection--single {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

/* Make placeholder text match theme */
.select2-container--classic
  .select2-selection--single
  .select2-selection__placeholder {
  color: var(--text-color) !important;
  opacity: 0.7;
}
.select2-selection.select2-selection--single.select2-selection-custom {
  background: var(--card-bg);
}


