body { 
    /* Soft three-stop gradient background */
    background: linear-gradient(135deg, #2d3748, #4a5568 50%, #031947);
    color: #eaeaea; 
    background-attachment: fixed;
}
.navbar { position: relative; z-index: 1030; opacity: 0.98; border-bottom: 1px solid rgba(124, 91, 148, 0.1); }
.navbar .dropdown-menu { z-index: 1050; }
.card { color: #eaeaea; background: #15171d; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.form-control, .form-select { background: #aaaaaa; color: #eaeaea; border-color: rgba(255,255,255,0.15); }
.form-control:focus, .form-select:focus { box-shadow: none; border-color: #6ea8fe; }
.form-label, label { color: rgb(220, 220, 220); }
h1, h2, h3, h4, h5, h6 { color: rgb(220, 220, 220); }
.btn { border-radius: 10px; }
.table { --bs-table-bg: transparent; color: rgb(203, 200, 200) !important; }
.table thead th { border-color: rgba(255,255,255,0.08); color: rgb(220, 220, 220); font-weight: 600; }
.table td { border-color: rgba(255,255,255,0.06); color: white !important; }
.table tbody tr { color: #eaeaea !important; }

/* Navbar SIM search: compact input, dropdown may grow wider than input so the results table fits without horizontal scroll */
.nav-sim-search-wrap {
  max-width: min(100%, 26rem);
  overflow: visible;
}
#navSimSearchDropdown {
  left: 0;
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(calc(100vw - 1.5rem), 72rem);
}

/* Navbar SIM search: light grey panel + black text (wins over global .table !important rules) */
.nav-sim-search-dropdown {
  background-color: #e5e7eb !important;
  color: #111827 !important;
}
.nav-sim-search-dropdown .table-responsive {
  background-color: #e5e7eb !important;
  max-height: min(60vh, 18rem);
  overflow-x: visible !important;
  overflow-y: auto;
}
.nav-sim-search-dropdown table.table {
  width: max-content;
  min-width: 100%;
  --bs-table-bg: #e5e7eb !important;
  --bs-table-hover-bg: #d1d5db !important;
  color: #111827 !important;
}
.nav-sim-search-dropdown .table thead th {
  background-color: #d1d5db !important;
  color: #111827 !important;
  border-color: #9ca3af !important;
}
.nav-sim-search-dropdown .table td {
  color: #111827 !important;
  border-color: #bfc4ca !important;
  background-color: #e5e7eb !important;
}
.nav-sim-search-dropdown .table tbody tr {
  color: #111827 !important;
  background-color: #e5e7eb !important;
}
.nav-sim-search-dropdown .table.table-hover > tbody > tr:hover > td {
  background-color: #d1d5db !important;
  color: #111827 !important;
}
#navSimSearchMeta {
  background-color: #d1d5db !important;
  color: #111827 !important;
}
.stat-card .stat-label { color: #9aa0a6; font-size: 0.9rem; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; }
.toast { opacity: 0.98; }

/* Make muted text usable on dark background */
.text-muted, .form-text {
    color: #9ca3af !important;
}


/* Hide caret outside actual inputs/textareas/contenteditable */
*:not(input, textarea, [contenteditable="true"]) {
    caret-color: transparent;
}
/* caret-color inherits; ancestors above would otherwise hide the caret inside inputs */
input, textarea, [contenteditable="true"] {
    caret-color: auto;
}

