:root {
    --ems-blue: #1e0ca5;
    --ems-red: #ee071e;
    --ems-light: #f8f9fa;
    --ems-dark: #343a40;
    --toggle-width: 60px;
    --toggle-height: 30px;
    --knob-size: 24px;
    --light-bg: #87CEEB; /* Sky Blue */
    --dark-bg: #1a1a2e;  /* Midnight Blue */
    --knob-light-color: #ffffff; /* White knob for light mode */
    --knob-dark-color: #2c3e50;  /* Dark slate blue for dark mode */
    --transition-speed: 0.4s;
}
.cc-ems-blue {
    color: var(--ems-blue) !important;
}
.cc-bg-ems-blue {
    background-color: var(--ems-blue) !important;
}
.cc-bg-ems-blue-opacity {
    background-color: var(--ems-blue);
    opacity: 0.85;
}
.cc-ems-red {
    color: var(--ems-red) !important;
}
.cc-bg-ems-red {
    background-color: var(--ems-red) !important;
}
.cc-bg-ems-red-opacity {
    background-color: var(--ems-red);
    opacity: 0.85;
}
.cc-ems-light {
    color: var(--ems-light) !important;
}
.cc-bg-ems-light {
    background-color: var(--ems-light) !important;
}
.cc-ems-dark {
    color: var(--ems-dark) !important;
}
.cc-bg-ems-dark {
    background-color: var(--ems-dark) !important;
}
.cc-bg-ems-dark-opacity {
    background-color: var(--ems-dark);
    opacity: 0.85;
}

body {
    background-image: var
}


.carousel-item img {
    min-height: 300px;
    max-height: 500px;
    object-fit: cover;
    width: 100%;
}
.header-icon i {
    display: inline-block !important;
    transition: transform 0.3s, color 0.3s !important;
}
.header-icon i:hover {
    transform: scale(1.5) !important;
    color: var(--ems-red) !important;
}
/* =========================================
   Spinner Styles
   ========================================= */

.vital-loader-overlay {
    /* Absolute Positioning */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Centering logic */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Visuals */
    background-color: rgba(33, 37, 41, 0.85); /* Dark semi-transparent background */
    backdrop-filter: blur(2px); /* Optional: Blurs the content behind it */
    z-index: 10000; /* Sit on top of form inputs/tables */
    border-radius: inherit; /* Inherit rounded corners from parent */
}

/* Container for the monitor */
.vital-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 200px; /* Adjust based on where you place it */
    background-color: #1a1a1a; /* Dark Monitor Background */
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}

/* Optional: The Monitor Grid Background */
.vital-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
}

/* The EKG Line */
.ekg-svg {
    width: 200px; /* Size of the heartbeat */
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 0 4px rgba(57, 255, 20, 0.8)); /* Glow effect */
}

.ekg-path {
    fill: none;
    stroke: #39ff14; /* Neon Green */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* The Magic: Create a dash that is the length of the line, followed by a huge gap */
    stroke-dasharray: 450; 
    stroke-dashoffset: 450; /* Start hidden */
    animation: heartbeat 2s linear infinite;
}

/* The Animation Loop */
@keyframes heartbeat {
    0% {
        stroke-dashoffset: 450; /* Line is hidden to the left */
    }
    40% {
        stroke-dashoffset: 0; /* Line is fully drawn */
    }
    100% {
        stroke-dashoffset: -450; /* Line disappears to the right (gap) */
    }
}

.theme-toggler {
    cursor: pointer;

}

.theme-switch {
  display: inline-block;
  height: var(--toggle-height);
  position: relative;
  width: var(--toggle-width);
}

/* Hide default HTML checkbox */
.theme-switch input {
  display: none;
}

/* 3. The Track (Background) */
.slider {
  background-color: var(--light-bg);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: background-color var(--transition-speed) ease;
  border-radius: 34px;
  border: 1px solid rgba(0,0,0,0.1); /* Subtle border */
}

/* 4. The Knob (Moving Circle) */
.slider-knob {
  background-color: var(--knob-light-color);
  bottom: 2px; /* (30px height - 24px knob) / 2 */
  height: var(--knob-size);
  width: var(--knob-size);
  left: 2px;
  position: absolute;
  border-radius: 50%;
  transition: transform var(--transition-speed) cubic-bezier(0.4, 0.0, 0.2, 1),
    background-color var(--transition-speed) ease;        
  
  /* Center icons inside the knob */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 5. The Icons (Sun & Moon) */
.slider-knob .bi {
  font-size: 14px;
  position: absolute;
  transition: all var(--transition-speed) ease;
}

/* Sun Style (Active by default) */
.icon-sun {
  color: #f39c12; /* Sun Orange */
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Moon Style (Hidden by default) */
.icon-moon {
  color: #f1c40f; /* Moon Yellow */
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

/* --- CHECKED STATE (Dark Mode) --- */

/* Change Track Background */
input:checked + .slider {
  background-color: var(--dark-bg);
}

/* Move Knob to right */
input:checked + .slider .slider-knob {
  transform: translateX(30px); /* Width (60) - Knob(24) - Margins(6) */
  background-color: var(--knob-dark-color);
}

/* Hide Sun */
input:checked + .slider .slider-knob .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

/* Show Moon */
input:checked + .slider .slider-knob .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}