/* /css/style.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

:root {
  /* Brand Colors - Enterprise Palette */
  --euclid-primary: #0f172a; /* Slate 900 */
  --euclid-primary-dark: #020617;
  --euclid-accent: #3b82f6; /* Blue 500 */
  --euclid-secondary: #64748b;
  --euclid-success: #10b981;
  --euclid-info: #0ea5e9;
  --euclid-warning: #f59e0b;
  --euclid-danger: #ef4444;
  --euclid-dark: #0f172a;
  --euclid-light: #f8fafc;

  /* Gradients - Rich & Subtle */
  --grad-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --grad-accent: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --grad-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-info: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --grad-glass: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.5) 100%
  );

  /* Shadows - Softer & Modern */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Base */
body {
  background-color: #f8fafc; /* Slate 50 */
  color: #334155; /* Slate 700 */
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  font-size: 0.925rem; /* Slightly smaller for density */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.text-light-muted {
  color: #94a3b8 !important;
}

/* Card Styling - Enterprise */
.card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem; /* Consistent spacing */
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
  color: #1e293b;
  padding: 0.75rem 1rem;
  border-top-left-radius: var(--radius-md) !important;
  border-top-right-radius: var(--radius-md) !important;
}

.card-body {
  padding: 1rem;
}

.card-title {
  color: #64748b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* KPI Cards */
.kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--grad-accent);
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.kpi-sub {
  font-size: 0.8rem;
  color: #64748b;
}

.kpi-icon {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.25rem;
  opacity: 0.1;
  color: var(--euclid-primary);
}

/* Navbar */
.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a !important;
  letter-spacing: -0.02em;
}

.nav-link {
  color: #64748b !important;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: #0f172a !important;
  background-color: #f1f5f9;
}

.nav-link.active {
  color: #2563eb !important;
  background-color: #eff6ff;
  font-weight: 600;
}

.dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link i,
.dropdown-item i {
  font-size: 0.95rem;
  line-height: 1;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--grad-accent);
  border: none;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border-color: #e2e8f0;
  color: #475569;
  background-color: #ffffff;
}

.btn-outline-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Forms */
.form-control,
.form-select {
  border-color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #1e293b;
  background-color: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.6rem 0.75rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover td {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 9999px;
  font-size: 0.75rem;
}

/* Custom Gradients for Cards */
.bg-grad-primary {
  background: var(--grad-primary);
  color: white;
}
.bg-grad-accent {
  background: var(--grad-accent);
  color: white;
}
.bg-grad-success {
  background: var(--grad-success);
  color: white;
}
.bg-grad-info {
  background: var(--grad-info);
  color: white;
}
.bg-grad-warning {
  background: var(--grad-warning);
  color: white;
}
.bg-grad-danger {
  background: var(--grad-danger);
  color: white;
}
.bg-grad-dark {
  background: var(--grad-dark);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Utilities */
.shadow-glass {
  box-shadow: var(--shadow-glass);
}
.border-soft {
  border-color: #e2e8f0 !important;
}

/* Kanban Specifics */
.kanban-column .card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

.pipeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.pipeline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

/* Avatar */
.ea-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.ea-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

/* Remove underline from navbar user dropdown */
.navbar .btn-link,
.navbar .btn-link:hover,
.navbar .btn-link:focus {
  text-decoration: none;
}

/* Responsiveness Helpers */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1rem;
  }
  .kpi-value {
    font-size: 1.4rem;
  }
  .card-body {
    padding: 0.75rem;
  }

  /* Ensure modals scroll on mobile */
  .modal-dialog {
    margin: 0.5rem;
  }
  .modal-content {
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
  }
}

/* Ensure tables scroll horizontally on small screens */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------
   GodView UI Utilities (consistency + accessibility)
---------------------------------------------------*/

/* Improve muted text contrast slightly (still muted, but readable) */
.text-muted,
.text-secondary {
  color: #64748b !important;
}

/* Focus styles for keyboard accessibility */
:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.dropdown-item:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.2) !important;
}

/* Compact page wrapper for smaller desktop screens */
@media (max-width: 1366px) {
  .container-fluid.py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}

/* Tables */
.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}
.table-hover tbody tr:hover {
  background-color: #f8fafc;
}
.table td,
.table th {
  vertical-align: middle;
}

/* Filter bar */
.gv-filterbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.gv-filterbar .form-control,
.gv-filterbar .form-select {
  min-width: 170px;
}

/* Status chip */
.gv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
}

/* Alerts */
.gv-alert {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

/* Truncate helper */
.gv-truncate {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------
   GodView Funnel (Grain UI)
-------------------------------- */
.gv-funnel {
  display: flex;
  gap: 12px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 6px;
}
.gv-stage {
  min-width: 220px;
  flex: 0 0 220px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
}
.gv-stage-hd {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.gv-stage-count {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 2px;
}
.gv-stage-bd {
  padding: 10px 12px 12px;
}
.gv-grains {
  display: grid;
  grid-template-columns: repeat(12, 10px);
  gap: 6px;
  align-content: start;
  min-height: 260px;
}
.gv-grain {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.gv-grain:hover {
  transform: scale(1.25);
}

/* Make popovers readable */
.popover {
  max-width: 380px;
}

.gv-funnel-wrap {
  width: 100%;
  overflow: auto;
  padding: 8px 4px 2px;
}
.gv-funnel-svg {
  min-width: 900px;
  height: 240px;
  display: block;
}
.gv-funnel-label {
  font-size: 12px;
  font-weight: 600;
  fill: rgba(255, 255, 255, 0.95);
  text-transform: none;
}
.gv-funnel-big {
  font-size: 28px;
  font-weight: 800;
  fill: rgba(255, 255, 255, 0.98);
}
.gv-funnel-sub {
  font-size: 11px;
  fill: rgba(255, 255, 255, 0.9);
}
.gv-funnel-note {
  font-size: 11px;
  fill: rgba(0, 0, 0, 0.55);
}
.gv-funnel-dot {
  fill: rgba(255, 255, 255, 0.95);
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 2;
}
.gv-funnel-line {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 4;
  opacity: 0.85;
}
.gv-funnel {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
}

.table-responsive {
  max-height: 55vh;
  overflow-y: auto;
}

@media (max-width: 1366px) {
  .gv-funnel {
    max-height: 50vh;
  }
}

/* ========================================================
   DARK MODE - Comprehensive CSS Variable System
   ======================================================== */

[data-bs-theme="dark"] {
  /* Dark Mode Color Variables */
  --euclid-primary: #e2e8f0;
  --euclid-primary-dark: #f1f5f9;
  --euclid-accent: #60a5fa; /* Blue 400 */
  --euclid-secondary: #94a3b8;
  --euclid-success: #34d399;
  --euclid-info: #38bdf8;
  --euclid-warning: #fbbf24;
  --euclid-danger: #f87171;
  --euclid-dark: #e2e8f0;
  --euclid-light: #1e293b;

  /* Dark Gradients */
  --grad-primary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --grad-accent: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --grad-dark: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  --grad-success: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --grad-info: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  --grad-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --grad-danger: linear-gradient(135deg, #f87171 0%, #ef4444 100%);

  /* Shadows for Dark Mode */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] body {
  background-color: #0f172a;
  color: #cbd5e1;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #f1f5f9;
}

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

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

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

/* Dark Mode Cards */
[data-bs-theme="dark"] .card {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .card:hover {
  border-color: #475569;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.4);
}

[data-bs-theme="dark"] .card-header {
  background-color: #1e293b;
  border-bottom-color: #334155;
  color: #f1f5f9;
}

[data-bs-theme="dark"] .card-title {
  color: #94a3b8;
}

[data-bs-theme="dark"] .kpi-value {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .kpi-sub {
  color: #94a3b8;
}

/* Dark Mode Navbar */
[data-bs-theme="dark"] .navbar {
  background: #1e293b !important;
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .navbar-brand {
  color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .nav-link {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .nav-link:hover {
  color: #f1f5f9 !important;
  background-color: #334155;
}

[data-bs-theme="dark"] .nav-link.active {
  color: #60a5fa !important;
  background-color: #1e3a5f;
}

/* Dark Mode Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #1e293b;
  border-color: #60a5fa;
  color: #e2e8f0;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #64748b;
}

[data-bs-theme="dark"] .form-label {
  color: #94a3b8;
}

/* Dark Mode Tables */
[data-bs-theme="dark"] .table {
  color: #cbd5e1;
  border-color: #334155;
}

[data-bs-theme="dark"] .table thead th {
  background-color: #1e293b;
  color: #94a3b8;
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .table tbody td {
  color: #cbd5e1;
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover td {
  background-color: #334155;
}

[data-bs-theme="dark"] .table-light {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
}

/* Dark Mode Buttons */
[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: #475569;
  color: #cbd5e1;
  background-color: #1e293b;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #334155;
  border-color: #64748b;
  color: #f1f5f9;
}

[data-bs-theme="dark"] .btn-outline-primary {
  border-color: #3b82f6;
  color: #60a5fa;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
  background-color: #1e3a5f;
  border-color: #60a5fa;
  color: #ffffff;
}

/* Dark Mode Modals */
[data-bs-theme="dark"] .modal-content {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-bs-theme="dark"] .modal-header {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .modal-footer {
  border-top-color: #334155;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Dark Mode Dropdowns */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #cbd5e1;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: #334155;
  color: #f1f5f9;
}

[data-bs-theme="dark"] .dropdown-item.active {
  background-color: #1e3a5f;
  color: #60a5fa;
}

[data-bs-theme="dark"] .dropdown-divider {
  border-top-color: #334155;
}

[data-bs-theme="dark"] .dropdown-header {
  color: #94a3b8;
}

/* Dark Mode Alerts */
[data-bs-theme="dark"] .alert {
  border-color: #334155;
}

[data-bs-theme="dark"] .alert-danger {
  background-color: #431c1c;
  border-color: #5c2020;
  color: #f87171;
}

[data-bs-theme="dark"] .alert-success {
  background-color: #1a3d2e;
  border-color: #1f4d3a;
  color: #34d399;
}

[data-bs-theme="dark"] .alert-warning {
  background-color: #3d2e1a;
  border-color: #4d3a1f;
  color: #fbbf24;
}

[data-bs-theme="dark"] .alert-info {
  background-color: #1a2e3d;
  border-color: #1f3a4d;
  color: #38bdf8;
}

/* Dark Mode Badges */
[data-bs-theme="dark"] .badge.bg-light {
  background-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: #475569 !important;
}

/* Dark Mode Filter Bar */
[data-bs-theme="dark"] .gv-filterbar {
  background-color: #1e293b;
  border-color: #334155;
}

/* Dark Mode Chips */
[data-bs-theme="dark"] .gv-chip {
  background-color: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

/* Dark Mode Scrollbar */
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #475569;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Dark Mode Funnel */
[data-bs-theme="dark"] .gv-stage {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .gv-stage-hd {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .gv-stage-count {
  color: #94a3b8;
}

[data-bs-theme="dark"] .gv-funnel-note {
  fill: #94a3b8;
}

/* Dark Mode Kanban */
[data-bs-theme="dark"] .kanban-column .card {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .pipeline-card {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .pipeline-card:hover {
  border-color: #475569;
}

/* Dark Mode Chart.js Labels (requires JS config too) */
[data-bs-theme="dark"] canvas {
  filter: brightness(0.95);
}

/* Dark Mode Tooltips */
[data-bs-theme="dark"] .tooltip-inner {
  background-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #334155;
}

[data-bs-theme="dark"] .bs-tooltip-end .tooltip-arrow::before {
  border-right-color: #334155;
}

[data-bs-theme="dark"] .bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .bs-tooltip-start .tooltip-arrow::before {
  border-left-color: #334155;
}

/* Dark Mode Popovers */
[data-bs-theme="dark"] .popover {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .popover-header {
  background-color: #334155;
  border-bottom-color: #475569;
  color: #f1f5f9;
}

[data-bs-theme="dark"] .popover-body {
  color: #cbd5e1;
}

/* Dark Mode Border Utilities */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end {
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .border-soft {
  border-color: #334155 !important;
}

/* Dark Mode Text Utilities */
[data-bs-theme="dark"] .text-primary {
  color: #60a5fa !important;
}

[data-bs-theme="dark"] .text-success {
  color: #34d399 !important;
}

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

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

[data-bs-theme="dark"] .text-info {
  color: #38bdf8 !important;
}
