/* Energy Manager - Design System & Theme
   Two-Tier UX: Operational vs. Administrative Pages
   Light Mode & Dark Mode Support
   
   Based on Landing Page Color Palette (Modern & Energiebezogen)
*/

/* ========================================
   ROOT - COLOR PALETTE (Light Mode Default)
   ======================================== */

:root {
  color-scheme: light;

  /* Primary Colors - Waldgrün (Energiebezogen)
     Der Markenton bleibt bewusst eine eigene Konstante: er soll in beiden Modi derselbe sein
     (--em-primary dient auch als Textfarbe auf dunklem Grund), während die MudBlazor-Palette im
     Dunkelmodus einen helleren Grünton braucht. Der passende Palettenwert steht in
     Theming/AppTheme.cs. */
  --em-primary: #183b34;           /* Dark forest green */
  --em-primary-light: #31574b;     /* Softer green */
  --em-primary-lighter: #edf2e8;   /* Very light green-beige */
  --em-primary-dark: #132821;      /* Darkest green */
  
  /* Accent Colors */
  --em-accent: #f2c65d;            /* Warm gold/sun (Solar production) */
  --em-accent-warm: #a66a1e;       /* Warmer brown-gold (Secondary accent) */
  
  /* Status Colors */
  --em-success: #15583e;           /* Green for successful states */
  --em-error: #a42b26;             /* Red for errors */
  --em-warning: #d97706;           /* Amber for warnings */
  --em-info: #0ea5e9;              /* Light blue for info */
  
  /* Background & Text
     Fläche, Schrift und Rahmen werden aus der MudBlazor-Palette abgeleitet (einzige Quelle:
     Theming/AppTheme.cs). Dadurch können eigene Styles und MudBlazor-Komponenten nicht mehr in
     unterschiedlichen Modi hängen - genau daraus entstand der helle Block auf der dunklen
     Wallbox-Seite. Marken- und Fachfarben (Primärton, Statusfarben, Solar/Batterie) bleiben
     eigene Konstanten, weil sie Markenentscheidungen sind und nicht aus der Palette folgen
     sollen. */
  --em-bg-light: var(--mud-palette-background);
  --em-bg-white: var(--mud-palette-surface);
  --em-text-primary: var(--mud-palette-text-primary);
  --em-text-secondary: var(--mud-palette-text-secondary);
  --em-text-light: #c2d6c9;        /* eigener Ton für hellen Text auf dunklem Grund */
  --em-border: var(--mud-palette-divider);
  
  /* Specific Domain Colors */
  --em-solar: #f2c65d;             /* Solar production (Gold) */
  --em-consumption: #183b34;       /* Grid consumption (Primary green) */
  --em-heating: #d97706;           /* Heat/Heating (Amber) */
  --em-water: #0ea5e9;             /* Water (Blue) */
  --em-battery: #8b5cf6;           /* Battery charging (Purple) */
  
  /* Typography */
  --em-font-body: "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --em-font-display: "Iowan Old Style", "Baskerville", Georgia, serif;
  
  /* Sizing & Spacing */
  --em-spacing-xs: 0.25rem;
  --em-spacing-sm: 0.5rem;
  --em-spacing-md: 1rem;
  --em-spacing-lg: 1.5rem;
  --em-spacing-xl: 2rem;
  --em-spacing-2xl: 3rem;
  --em-spacing-3xl: 4rem;
  
  /* Border Radius */
  --em-radius-sm: 0.25rem;
  --em-radius-md: 0.5rem;
  --em-radius-lg: 1rem;
  
  /* Shadows */
  --em-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --em-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --em-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --em-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Z-index Scale */
  --em-z-dropdown: 1000;
  --em-z-modal: 1050;
  --em-z-popover: 1060;
  --em-z-notification: 1070;
}

/* ========================================
   DARK MODE - Color Overrides
   ======================================== */

[data-theme="dark"],
.dark-mode {
  color-scheme: dark;

  /* Strukturfarben folgen der MudBlazor-Palette - gleiche Herleitung wie im Hellmodus oben.
     Eine eigene Definition von --mud-palette-* wäre an dieser Stelle wirkungslos: der
     :root-Block, den MudThemeProvider ausgibt, steht im Body und gewinnt damit gegen dieses im
     Head geladene Stylesheet. */
  --em-bg-light: var(--mud-palette-background);
  --em-bg-white: var(--mud-palette-surface);
  --em-text-primary: var(--mud-palette-text-primary);
  --em-text-secondary: var(--mud-palette-text-secondary);
  --em-text-light: var(--mud-palette-text-disabled);
  --em-border: var(--mud-palette-divider);
  --em-primary-lighter: #2a3c33;   /* Marken-Tint ohne Paletten-Pendant */
  --em-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --em-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
  --em-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.35);
  --em-shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body,
[data-theme="dark"] .app-shell,
[data-theme="dark"] .app-shell main,
[data-theme="dark"] .app-shell article.content {
  background-color: var(--em-bg-light);
  color: var(--em-text-primary);
}

[data-theme="dark"] a:not(.nav-item):not(.dropdown-item):not(.top-bar-profile):not(.btn) {
  color: #a9d8bd;
}

[data-theme="dark"] a:not(.nav-item):not(.dropdown-item):not(.top-bar-profile):not(.btn):hover {
  color: var(--em-accent);
}

[data-theme="dark"] .mud-paper,
[data-theme="dark"] .mud-card,
[data-theme="dark"] .mud-table-container,
[data-theme="dark"] .mud-popover,
[data-theme="dark"] .mud-dialog,
[data-theme="dark"] .mud-menu,
[data-theme="dark"] .mud-picker-container {
  background-color: var(--em-bg-white);
  color: var(--em-text-primary);
}

[data-theme="dark"] .mud-table,
[data-theme="dark"] .mud-table-toolbar,
[data-theme="dark"] .mud-table-pagination,
[data-theme="dark"] .mud-table-cell,
[data-theme="dark"] .mud-table-head .mud-table-cell,
[data-theme="dark"] .mud-table tfoot .mud-table-cell {
  background-color: var(--em-bg-white);
  color: var(--mud-palette-text-primary);
  border-color: var(--em-border);
}

[data-theme="dark"] .mud-table-root .mud-table-head .mud-table-cell,
[data-theme="dark"] .mud-table-root .mud-table-body .mud-table-cell,
[data-theme="dark"] .mud-table-root .mud-table-foot .mud-table-cell {
  color: #f1f5f2 !important;
}

[data-theme="dark"] .mud-table-root .mud-table-head .mud-table-cell *,
[data-theme="dark"] .mud-table-root .mud-table-body .mud-table-cell *,
[data-theme="dark"] .mud-table-root .mud-table-foot .mud-table-cell * {
  color: #f1f5f2 !important;
}

[data-theme="dark"] .mud-input-control,
[data-theme="dark"] .mud-input,
[data-theme="dark"] .mud-input-slot,
[data-theme="dark"] .mud-select,
[data-theme="dark"] .mud-select-input,
[data-theme="dark"] .mud-input-label,
[data-theme="dark"] .mud-typography,
[data-theme="dark"] .mud-icon-root {
  color: var(--em-text-primary);
}

[data-theme="dark"] .mud-input-outlined-border,
[data-theme="dark"] .mud-input-underline::before,
[data-theme="dark"] .mud-divider {
  border-color: var(--em-border);
}

[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .mud-input > input,
[data-theme="dark"] .mud-input > textarea {
  background-color: var(--em-bg-white);
  color: var(--em-text-primary);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--em-text-light);
  opacity: 1;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--em-bg-light);
  color: var(--em-text-primary);
  font-family: var(--em-font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--em-font-display);
  font-weight: 500;
  line-height: 1.08;
  margin-top: 0;
  color: var(--em-text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 0.9rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.75rem); margin-bottom: 0.7rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.6rem; }
h5 { font-size: 1.1rem; margin-bottom: 0.5rem; }
h6 { font-size: 0.95rem; margin-bottom: 0.5rem; }

p {
  margin: 0;
  line-height: 1.6;
}

a {
  color: var(--em-primary);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  color: var(--em-primary-light);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ========================================
   OPERATIONAL PAGE STYLES (Beautiful & Engaging)
   ======================================== */

.operational-page {
  background-color: var(--em-bg-light);
  color: var(--em-text-primary);
}

.operational-header {
  background: linear-gradient(135deg, var(--em-primary) 0%, var(--em-primary-light) 100%);
  color: var(--em-bg-white);
  padding: var(--em-spacing-2xl) var(--em-spacing-lg);
  margin-bottom: var(--em-spacing-2xl);
  border-radius: 0;
  box-shadow: var(--em-shadow-md);
}

.operational-header h1 {
  color: var(--em-bg-white);
  margin-bottom: var(--em-spacing-md);
  font-size: clamp(2rem, 5vw, 3rem);
}

.operational-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 50rem;
}

.operational-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--em-spacing-lg);
}

.operational-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--em-spacing-lg);
  margin-bottom: var(--em-spacing-2xl);
}

@media (max-width: 1024px) {
  .operational-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--em-spacing-md);
  }
}

@media (max-width: 640px) {
  .operational-grid {
    grid-template-columns: 1fr;
    gap: var(--em-spacing-md);
  }
}

/* ========================================
   OPERATIONAL CARDS
   ======================================== */

.operational-card {
  background: var(--em-bg-white);
  border: none;
  border-radius: var(--em-radius-lg);
  padding: var(--em-spacing-xl);
  box-shadow: var(--em-shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: var(--em-spacing-md);
}

.operational-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--em-shadow-lg);
}

.operational-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--em-spacing-md);
}

.operational-card-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--em-radius-lg);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.operational-card-icon.solar {
  background-color: rgba(242, 198, 93, 0.15);
  color: var(--em-solar);
}

.operational-card-icon.consumption {
  background-color: rgba(24, 59, 52, 0.15);
  color: var(--em-consumption);
}

.operational-card-icon.heating {
  background-color: rgba(217, 119, 6, 0.15);
  color: var(--em-heating);
}

.operational-card-icon.battery {
  background-color: rgba(139, 92, 246, 0.15);
  color: var(--em-battery);
}

.operational-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--em-text-secondary);
  letter-spacing: 0.05em;
}

.operational-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--em-text-primary);
  font-family: var(--em-font-body);
}

.operational-card-unit {
  font-size: 0.9rem;
  color: var(--em-text-secondary);
  margin-left: 0.25rem;
}

.operational-card-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.operational-card-trend.positive {
  color: var(--em-success);
}

.operational-card-trend.negative {
  color: var(--em-error);
}

.operational-card-trend.neutral {
  color: var(--em-text-secondary);
}

/* ========================================
   ADMINISTRATIVE PAGE STYLES (Efficient & Functional)
   ======================================== */

.admin-page {
  background-color: var(--em-bg-light);
  color: var(--em-text-primary);
}

.admin-header {
  background-color: var(--em-bg-white);
  padding: var(--em-spacing-lg);
  margin-bottom: var(--em-spacing-lg);
  border-bottom: 2px solid var(--em-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--em-spacing-lg);
}

.admin-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--em-spacing-lg);
}

.admin-toolbar {
  display: flex;
  gap: var(--em-spacing-md);
  margin-bottom: var(--em-spacing-lg);
  flex-wrap: wrap;
  align-items: center;
}

.admin-toolbar button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--em-radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.admin-toolbar button.btn-primary {
  background-color: var(--em-primary);
  color: var(--em-bg-white);
}

.admin-toolbar button.btn-primary:hover {
  background-color: var(--em-primary-light);
}

/* ========================================
   ADMINISTRATIVE CARDS (Data-Focused)
   ======================================== */

.admin-card {
  background: var(--em-bg-white);
  border: 1px solid var(--em-border);
  border-radius: var(--em-radius-md);
  padding: var(--em-spacing-lg);
  margin-bottom: var(--em-spacing-lg);
}

.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--em-text-primary);
  margin-bottom: var(--em-spacing-md);
}

/* ========================================
   FORM STYLES (Both Operational & Admin)
   ======================================== */

.form-group {
  margin-bottom: var(--em-spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--em-spacing-sm);
}

.form-label {
  font-weight: 600;
  color: var(--em-text-primary);
  font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--em-border);
  border-radius: var(--em-radius-md);
  background-color: var(--em-bg-white);
  color: var(--em-text-primary);
  font-family: var(--em-font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--em-primary);
  box-shadow: 0 0 0 3px rgba(24, 59, 52, 0.1);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--em-text-secondary);
  margin-top: 0.25rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--em-radius-md);
  font-family: var(--em-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--em-primary);
  /* Bewusst echtes Weiß: --em-bg-white ist im Dark Mode dunkel und machte die Schrift unlesbar. */
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--em-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--em-shadow-md);
}

/* Im Dark Mode liegt #183b34 zu nah am dunklen Flächenhintergrund: etwas heller, Text bleibt weiß. */
[data-theme="dark"] .btn-primary {
  background-color: var(--em-primary-light);
}

[data-theme="dark"] .btn-primary:hover {
  background-color: #3f6f5e;
}

.btn-secondary {
  background-color: var(--em-accent);
  color: var(--em-primary);
}

.btn-secondary:hover {
  background-color: var(--em-accent-warm);
  transform: translateY(-2px);
  box-shadow: var(--em-shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--em-primary);
  color: var(--em-primary);
}

.btn-outline:hover {
  background-color: var(--em-primary);
  color: var(--em-bg-white);
}

/* .btn-block wurde in Login, Registrierung und Erfolgsseite verwendet, war aber nirgends
   definiert - die Knöpfe standen dadurch nebeneinander statt untereinander. */
.btn-block {
  width: 100%;
}

/* Zwei Aktionen untereinander mit gleichem Abstand, statt Einzel-Margin je Knopf. */
.login-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-ghost {
  background-color: transparent;
  color: var(--em-text-primary);
  padding: 0.5rem 1rem;
  min-height: auto;
}

.btn-ghost:hover {
  background-color: var(--em-primary-lighter);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================================
   ALERTS & STATUS MESSAGES
   ======================================== */

.alert {
  padding: var(--em-spacing-lg);
  border-radius: var(--em-radius-md);
  margin-bottom: var(--em-spacing-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--em-spacing-md);
}

.alert-success {
  background-color: rgba(21, 88, 62, 0.1);
  border-left: 4px solid var(--em-success);
  color: var(--em-success);
}

.alert-error {
  background-color: rgba(164, 43, 38, 0.1);
  border-left: 4px solid var(--em-error);
  color: var(--em-error);
}

.alert-warning {
  background-color: rgba(217, 119, 6, 0.1);
  border-left: 4px solid var(--em-warning);
  color: var(--em-warning);
}

.alert-info {
  background-color: rgba(14, 165, 233, 0.1);
  border-left: 4px solid var(--em-info);
  color: var(--em-info);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--em-text-secondary); }
.text-error { color: var(--em-error); }
.text-success { color: var(--em-success); }
.text-warning { color: var(--em-warning); }

.mt-sm { margin-top: var(--em-spacing-sm); }
.mt-md { margin-top: var(--em-spacing-md); }
.mt-lg { margin-top: var(--em-spacing-lg); }
.mt-xl { margin-top: var(--em-spacing-xl); }

.mb-sm { margin-bottom: var(--em-spacing-sm); }
.mb-md { margin-bottom: var(--em-spacing-md); }
.mb-lg { margin-bottom: var(--em-spacing-lg); }
.mb-xl { margin-bottom: var(--em-spacing-xl); }

.p-sm { padding: var(--em-spacing-sm); }
.p-md { padding: var(--em-spacing-md); }
.p-lg { padding: var(--em-spacing-lg); }

.gap-sm { gap: var(--em-spacing-sm); }
.gap-md { gap: var(--em-spacing-md); }
.gap-lg { gap: var(--em-spacing-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .operational-header {
    padding: var(--em-spacing-xl) var(--em-spacing-md);
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .operational-grid {
    grid-template-columns: 1fr;
  }
  
  .operational-container,
  .admin-container {
    padding: 0 var(--em-spacing-md);
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  
  .operational-card {
    padding: var(--em-spacing-lg) var(--em-spacing-md);
  }
  
  .operational-card-value {
    font-size: 1.5rem;
  }
  
  .operational-header h1 {
    font-size: 1.5rem;
  }
  
  .btn {
    width: 100%;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background-color: white;
  }
  
  .operational-card,
  .admin-card {
    page-break-inside: avoid;
  }
}

/* ============================================================================
   MudTabs im Dark Mode
   MudBlazor faerbt die Reiterleiste ueber --mud-palette-surface, das durch
   MudThemeProvider auf die helle Palette gesetzt wird. Da der Darkmode hier
   nur ueber data-theme + CSS-Variablen laeuft, muss die Reiterleiste - wie
   Karten, Tabellen und Dialoge - einzeln ueberschrieben werden.
   ============================================================================ */
[data-theme="dark"] .mud-tabs-tabbar {
  background-color: var(--em-bg-white);
  border-bottom: 1px solid var(--em-border);
}

[data-theme="dark"] .mud-tabs-panels {
  background-color: transparent;
}

[data-theme="dark"] .mud-tab {
  color: var(--em-text-secondary);
}

[data-theme="dark"] .mud-tab.mud-tab-active {
  color: var(--em-accent);
}

[data-theme="dark"] .mud-tab:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .mud-tab.mud-tab-active:hover {
  background-color: rgba(242, 198, 93, 0.12);
}

[data-theme="dark"] .mud-tab-slider {
  background-color: var(--em-accent);
}

/* Scroll-Pfeile der Reiterleiste */
[data-theme="dark"] .mud-tabs-scroll-button .mud-icon-root {
  color: var(--em-text-secondary);
}

/* ============================================================================
   ApexCharts im Dark Mode
   ApexCharts zeichnet Achsen- und Legendentexte mit eigenen Farben (SVG-fill
   bzw. Inline-Style) und kennt den App-Darkmode nicht. Ohne diese Regeln sind
   die Beschriftungen auf dunklem Grund nicht lesbar.
   ============================================================================ */
[data-theme="dark"] .apexcharts-text,
[data-theme="dark"] .apexcharts-xaxis-label,
[data-theme="dark"] .apexcharts-yaxis-label,
[data-theme="dark"] .apexcharts-title-text,
[data-theme="dark"] .apexcharts-subtitle-text,
[data-theme="dark"] .apexcharts-data-labels text,
[data-theme="dark"] .apexcharts-annotations text {
  fill: var(--em-text-secondary);
}

/* Legende ist HTML mit Inline-Farbe -> nur mit !important zu schlagen */
[data-theme="dark"] .apexcharts-legend-text {
  color: var(--em-text-secondary) !important;
}

[data-theme="dark"] .apexcharts-legend-marker {
  border-color: var(--em-border);
}

/* Gitterlinien und Achsen */
[data-theme="dark"] .apexcharts-gridline,
[data-theme="dark"] .apexcharts-xcrosshairs,
[data-theme="dark"] .apexcharts-ycrosshairs {
  stroke: var(--em-border);
}

[data-theme="dark"] .apexcharts-xaxis line,
[data-theme="dark"] .apexcharts-yaxis line {
  stroke: var(--em-border);
}

/* Tooltip */
[data-theme="dark"] .apexcharts-tooltip {
  background: var(--em-bg-white) !important;
  border-color: var(--em-border) !important;
  color: var(--em-text-primary) !important;
}

[data-theme="dark"] .apexcharts-tooltip-title {
  background: var(--em-bg-light) !important;
  border-color: var(--em-border) !important;
}

[data-theme="dark"] .apexcharts-tooltip-text,
[data-theme="dark"] .apexcharts-tooltip-series-group {
  color: var(--em-text-primary) !important;
}
