    /* Gauge container - Use Bootstrap grid instead of flex */
.gauge-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 5px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Individual gauge card - Larger size */
.soil-gauge, .battery-indicator {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
    font-family: 'Poppins', system-ui, sans-serif;
    position: relative;
    transition: all 0.3s ease;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Make sensors take 2/3 and battery 1/3 on large screens */
@media (min-width: 992px) {
    .gauge-container {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .soil-gauge {
        grid-column: span 1;
    }
    
    .battery-indicator {
        grid-column: span 1;
    }
}

/* Title and value - Larger */
.gauge-title { 
    font-size: 16px; 
    font-weight: 600; 
    margin-bottom: 20px; 
    color: #2c3e50;
    padding-top: 10px; /* Add space for LED indicator */
}

.gauge-value { 
    font-weight: 700; 
    margin-top: 15px; 
    color: #2c3e50;
    font-size: 18px;
}

/* Semicircular gauge - Larger */
.gauge {
    width: 220px;
    height: 110px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background arc (track) - Larger */
.gauge .arc {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 14px solid #e9ecef;
    border-top-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
    transform: translateY(-110px);
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
}

/* Colored progress arc - Larger */
.gauge .arc-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 220px;
    height: 110px;
    transform-origin: 110px 110px;
    pointer-events: none;
    background: conic-gradient(
        #28a745 0% 50%,
        #ffc107 50% 75%,
        #dc3545 75% 100%
    );
    mask: radial-gradient(circle at center, transparent 90px, black 91px);
    -webkit-mask: radial-gradient(circle at center, transparent 90px, black 91px);
}

/* Needle - Larger */
.gauge-needle {
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 4px;
    height: 95px;
    background: #2c3e50;
    transform-origin: 50% 95%;
    transform: translateX(-50%) rotate(-90deg);
    border-radius: 2px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: transform 800ms cubic-bezier(0.2, 0.9, 0.2, 1);
    z-index: 10;
}

/* Needle hub - Larger */
.gauge::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid #2c3e50;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 15;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Labels under gauge - Larger */
.gauge-labels { 
    display: flex; 
    justify-content: space-between; 
    font-size: 12px; 
    color: #6c757d; 
    margin-top: 12px; 
    padding: 0 15px; 
    font-weight: 500;
}

/* Sensor LED Indicator Styles - Fixed positioning */
.sensor-status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(0,0,0,0.05);
    z-index: 20;
}

.sensor-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.sensor-led::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    animation: none;
}

/* Online Sensor - Green Blinking LED */
.sensor-online .sensor-led {
    background: #28a745;
}

.sensor-online .sensor-led::before {
    background: #28a745;
    animation: led-pulse-green 2s infinite;
}

.sensor-online .sensor-status-text {
    color: #28a745;
}

/* Offline Sensor - Red Static LED */
.sensor-offline .sensor-led {
    background: #dc3545;
}

.sensor-offline .sensor-status-text {
    color: #dc3545;
}

/* LED Animation */
@keyframes led-pulse-green {
    0% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Optional: Add subtle glow to online sensors */
.sensor-online {
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.15);
}

.sensor-offline {
    opacity: 0.8;
    filter: grayscale(0.3);
}

/* Enhanced status for offline sensors */
.sensor-offline .gauge-title {
    color: #6c757d !important;
}

.sensor-offline .gauge-value {
    color: #6c757d !important;
}

.sensor-offline .arc {
    border-color: #e9ecef !important;
}

/* Battery indicator - Larger */
.battery-indicator {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.battery-container {
    width: 100px;
    height: 50px;
    border: 3px solid #2c3e50;
    border-radius: 8px;
    position: relative;
    margin: 20px auto;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    padding: 6px;
    gap: 4px;
}

.battery-tip {
    width: 12px;
    height: 20px;
    background: #2c3e50;
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    border-radius: 0 4px 4px 0;
}

.battery-bars {
    display: flex;
    gap: 4px;
    height: 100%;
    width: 100%;
}

.battery-bar {
    flex: 1;
    background: #e9ecef;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.battery-bar.active {
    background: #28a745;
}

/* Color coding for battery levels */
.battery-bar.active.low { background: #dc3545; }
.battery-bar.active.medium { background: #ffc107; }
.battery-bar.active.high { background: #28a745; }

/* Optional Gauge color coding */
.soil-gauge.gauge-low .gauge-value { color: #dc3545; }
.soil-gauge.gauge-medium .gauge-value { color: #ffc107; }
.soil-gauge.gauge-high .gauge-value { color: #28a745; }

.soil-gauge.gauge-low .gauge-title { color: #dc3545; }
.soil-gauge.gauge-medium .gauge-title { color: #ffc107; }
.soil-gauge.gauge-high .gauge-title { color: #28a745; }

/* Responsive design */
@media (max-width: 768px) {
    .gauge-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .soil-gauge, .battery-indicator {
        min-height: 280px;
        padding: 20px;
    }
    
    .gauge {
        width: 180px;
        height: 90px;
    }
    
    .gauge .arc {
        width: 180px;
        height: 180px;
        transform: translateY(-90px);
    }
    
    .gauge .arc-fill {
        width: 180px;
        height: 90px;
        transform-origin: 90px 90px;
        mask: radial-gradient(circle at center, transparent 75px, black 76px);
        -webkit-mask: radial-gradient(circle at center, transparent 75px, black 76px);
    }
    
    .gauge-needle {
        height: 80px;
    }
    
    .sensor-status-indicator {
        top: 12px;
        right: 12px;
        font-size: 0.75rem;
    }
    
    .battery-container {
        width: 80px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .soil-gauge, .battery-indicator {
        min-height: 250px;
        padding: 15px;
    }
    
    .gauge {
        width: 160px;
        height: 80px;
    }
    
    .gauge .arc {
        width: 160px;
        height: 160px;
        transform: translateY(-80px);
    }
    
    .gauge .arc-fill {
        width: 160px;
        height: 80px;
        transform-origin: 80px 80px;
        mask: radial-gradient(circle at center, transparent 65px, black 66px);
        -webkit-mask: radial-gradient(circle at center, transparent 65px, black 66px);
    }
    
    .gauge-needle {
        height: 70px;
    }
}


/* Optional Gauge color coding */
.soil-gauge.gauge-low .gauge-value { color: #dc3545; }
.soil-gauge.gauge-medium .gauge-value { color: #ffc107; }
.soil-gauge.gauge-high .gauge-value { color: #28a745; }

.soil-gauge.gauge-low .gauge-title { color: #dc3545; }
.soil-gauge.gauge-medium .gauge-title { color: #ffc107; }
.soil-gauge.gauge-high .gauge-title { color: #28a745; }

 
 .battery-indicator {
    text-align: center;
    width: 120px;
}

.battery-container {
    width: 60px;
    height: 30px;
    border: 2px solid #333;
    border-radius: 4px;
    position: relative;
    margin: 0 auto 10px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    padding: 3px;
}

.battery-tip {
    width: 8px;
    height: 12px;
    background: #333;
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border-radius: 0 2px 2px 0;
}

.battery-bars {
    display: flex;
    gap: 2px;
    height: 100%;
    width: 100%;
}

.battery-bar {
    flex: 1;
    background: #e9ecef;
    border-radius: 1px;
    transition: background-color 0.3s ease;
}

.battery-bar.active {
    background: #28a745;
}

/* Color coding for battery levels */
.battery-bar.active.low { background: #dc3545; }
.battery-bar.active.medium { background: #ffc107; }
.battery-bar.active.high { background: #28a745; }

   /* responsive */
        @media (max-width:640px) { .gauge-container{justify-content:center} .soil-gauge, .battery-indicator{width:100%;max-width:400px} }
            

/* Water Tank Indicator Styles */
.tank-indicator {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
    font-family: 'Poppins', system-ui, sans-serif;
    position: relative;
    transition: all 0.3s ease;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tank-container {
    width: 120px;
    height: 180px;
    margin: 0 auto 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 3px solid #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.tank-water {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #2196F3, #64b5f6);
    transition: height 1.5s ease-in-out;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.tank-water::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
}

.tank-water::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.tank-level-marker {
    position: absolute;
    left: -25px;
    width: 20px;
    height: 1px;
    background: #666;
}

.tank-level-marker::after {
    content: attr(data-level);
    position: absolute;
    left: -25px;
    top: -8px;
    font-size: 10px;
    color: #666;
    white-space: nowrap;
}

.tank-level-100 { top: 5%; }
.tank-level-75 { top: 25%; }
.tank-level-50 { top: 50%; }
.tank-level-25 { top: 75%; }
.tank-level-0 { top: 95%; }

.tank-capacity {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

.tank-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tank-status.online {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.tank-status.offline {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.tank-refill-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

.tank-refill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.tank-refill-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Water wave animation for full tanks */
@keyframes water-wave {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-5px) translateY(-2px); }
    100% { transform: translateX(0) translateY(0); }
}

.tank-water.wave {
    animation: water-wave 3s ease-in-out infinite;
}

/* Tank level color coding */
.tank-level-high .tank-water { background: linear-gradient(to top, #4caf50, #66bb6a); }
.tank-level-medium .tank-water { background: linear-gradient(to top, #ff9800, #ffb74d); }
.tank-level-low .tank-water { background: linear-gradient(to top, #f44336, #ef5350); }

/* Update grid for tank inclusion */
@media (min-width: 992px) {
    .gauge-container {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
    
    .soil-gauge {
        grid-column: span 1;
    }
    
    .battery-indicator,
    .tank-indicator {
        grid-column: span 1;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .gauge-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .gauge-container {
        grid-template-columns: 1fr;
    }
}

      /*
              /* Battery indicator 
        .battery-container {
          display:flex;
          align-items:center;
          justify-content:center;
          gap:12px;
          margin-top:6px;
        }
        .battery-bars { display:flex; gap:4px; align-items:flex-end; height:40px; }
        .battery-bar {
          width:10px;
          background:#e9ecef;
          border-radius:2px 2px 0 0;
          transition:background .5s ease,height .6s ease;
        }
        /* provide five bars differing heights when filled 
        .battery-tip {
          width:8px;
          height:12px;
          background:#333;
          border-radius:2px;
          transform:translateY(-6px);
        }

        /* fill colors 
        .batt-good { background:linear-gradient(#28a745,#1e7e34); }
        .batt-mid { background:linear-gradient(#ffc107,#e0a800); }
        .batt-low { background:linear-gradient(#dc3545,#b02a37); }

      */ 
      


        
        /* Irrigation Valve Icon Styles */
.irrigation-valve {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.valve-body {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4682B4, #5F9EA0);
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
    border: 3px solid #2c3e50;
}

.valve-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 8px;
    background: #2c3e50;
    border-radius: 4px;
    transform-origin: left center;
    transition: transform 0.5s ease;
}

.valve-handle.open {
    transform: translate(-50%, -50%) rotate(45deg);
}

.valve-handle.closed {
    transform: translate(-50%, -50%) rotate(0deg);
}

.valve-pipe {
    position: absolute;
    width: 40px;
    height: 12px;
    background: #7a7a7a;
    border-radius: 6px;
}

.valve-pipe-top {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.valve-pipe-bottom {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.valve-drops {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
}

.valve-drop {
    width: 6px;
    height: 8px;
    background: #4682B4;
    border-radius: 50% 50% 50% 0;
    position: absolute;
    animation: drip 2s infinite;
}

.valve-drop:nth-child(1) { left: -15px; animation-delay: 0s; }
.valve-drop:nth-child(2) { left: 0px; animation-delay: 0.3s; }
.valve-drop:nth-child(3) { left: 15px; animation-delay: 0.6s; }

@keyframes drip {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(10px) scale(0.8); opacity: 0.7; }
    100% { transform: translateY(20px) scale(0); opacity: 0; }
}

.irrigation-status {
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.irrigation-status.open {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.irrigation-status.closed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.irrigation-metrics {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    text-align: left;
}

.irrigation-metric {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 12px;
}

.irrigation-metric:last-child {
    margin-bottom: 0;
}

.metric-label {
    color: #6c757d;
    font-weight: 500;
}

.metric-value {
    color: #2c3e50;
    font-weight: 600;
}



/* Clock & Calendar Widget */
.last-updated-widget {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: white;
    position: relative;
    overflow: hidden;
}

.last-updated-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s linear infinite;
    z-index: 1;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(360deg); }
}

.clock-widget, .calendar-widget {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    min-width: 180px;
}

.clock-time {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

.clock-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-date {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.calendar-month-year {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.calendar-day {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.live-pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(0.8); opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .last-updated-widget {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .clock-time {
        font-size: 2rem;
    }
    
    .calendar-date {
        font-size: 2.5rem;
    }
    
    .clock-widget, .calendar-widget {
        min-width: 160px;
        padding: 15px;
    }
}

/* Compact Clock & Calendar Widget - Navbar Style */
.compact-time-widget {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: 'Courier New', monospace;
    height: 50px;
    min-width: 300px;
}

.compact-clock {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clock-icon {
    font-size: 14px;
    opacity: 0.8;
}

.compact-time {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.compact-calendar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.calendar-icon {
    font-size: 14px;
    opacity: 0.8;
}

.compact-date {
    font-size: 0.9rem;
    font-weight: 500;
}

.live-indicator-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(52, 152, 219, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: auto;
}

.live-pulse-compact {
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-compact 2s infinite;
}

@keyframes pulse-compact {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Ultra Compact Version */
.ultra-compact-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 15px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    font-family: 'Courier New', monospace;
    height: 40px;
    font-size: 0.85rem;
}

.ultra-compact-time {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ultra-compact-date {
    opacity: 0.9;
}

.ultra-live-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Inline Header Version */
.inline-header-widget {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-left: 10px;
    vertical-align: middle;
}

.inline-time {
    font-weight: 600;
}

.inline-date {
    opacity: 0.8;
}

.inline-pulse {
    width: 4px;
    height: 4px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-compact 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .compact-time-widget {
        min-width: 250px;
        gap: 10px;
        padding: 6px 15px;
    }
    
    .compact-time {
        font-size: 1rem;
    }
    
    .compact-date {
        font-size: 0.8rem;
    }
}


/* Dual Time Widget - Current Time vs Last Update */
.dual-time-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif;
    height: 55px;
    min-width: 400px;
}

.time-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-label {
    font-size: 0.7rem;
    opacity: 0.7;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-value {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.time-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.3);
}

.live-indicator-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(52, 152, 219, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: auto;
}

.live-pulse-compact {
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-compact 2s infinite;
}

@keyframes pulse-compact {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Compact Version */
.compact-dual-time {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    height: 45px;
    font-size: 0.85rem;
}

.compact-time-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-time-icon {
    font-size: 12px;
    opacity: 0.7;
}

.compact-time-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Ultra Compact for Navbar */
.navbar-time-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
}

.navbar-time-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.85rem;
}

.navbar-pulse {
    width: 4px;
    height: 4px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-compact 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .dual-time-widget {
        min-width: 350px;
        gap: 15px;
        padding: 8px 15px;
    }
    
    .compact-dual-time {
        gap: 10px;
        padding: 6px 12px;
    }
}

    
        /* FOR THE NAV BAR ETC*/
        /* Responsive Navigation System */
.dashboard-nav {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

/* Desktop - Tabs */
.nav-tabs-custom .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tabs-custom .nav-link:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
}

.nav-tabs-custom .nav-link.active {
    color: #2c3e50;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid #2E8B57;
}

/* Mobile - Underline */
.nav-underline-custom .nav-link {
    color: #6c757d;
    font-weight: 500;
    padding: 10px 15px;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-underline-custom .nav-link:hover {
    color: #2c3e50;
    border-bottom-color: #dee2e6;
}

.nav-underline-custom .nav-link.active {
    color: #2E8B57;
    border-bottom-color: #2E8B57;
    background-color: transparent;
}

/* Dropdown Styles */
.nav-dropdown-custom .dropdown-toggle {
    border: none;
    color: #6c757d;
    font-weight: 500;
}

.nav-dropdown-custom .dropdown-toggle:hover {
    color: #2c3e50;
}

.nav-dropdown-custom .dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.nav-dropdown-custom .dropdown-item {
    padding: 8px 16px;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.nav-dropdown-custom .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2E8B57;
}

/* Sensor Badge */
.sensor-badge {
    background: #2E8B57;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    margin-left: 5px;
    vertical-align: middle;
}

/* Tab Content */
.tab-content {
    padding: 20px 0;
}

.tab-pane {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .nav-tabs-custom {
        display: none;
    }
    
    .nav-underline-custom {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-underline-custom .nav-link {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

@media (min-width: 769px) {
    .nav-underline-custom {
        display: none;
    }
    
    .nav-tabs-custom {
        display: flex;
    }
}

/* Updated Dual Time Widget */
.dual-time-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif;
    margin: 15px 0;
}

.sensors-online {
    background: rgba(46, 139, 87, 0.3);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sensor-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

        /* FOR THE NAV BAR ETC*/
        /* Responsive Navigation System */
.dashboard-nav {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

/* Desktop - Tabs */
.nav-tabs-custom .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tabs-custom .nav-link:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
}

.nav-tabs-custom .nav-link.active {
    color: #2c3e50;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid #2E8B57;
}

/* Mobile - Underline */
.nav-underline-custom .nav-link {
    color: #6c757d;
    font-weight: 500;
    padding: 10px 15px;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-underline-custom .nav-link:hover {
    color: #2c3e50;
    border-bottom-color: #dee2e6;
}

.nav-underline-custom .nav-link.active {
    color: #2E8B57;
    border-bottom-color: #2E8B57;
    background-color: transparent;
}

/* Dropdown Styles */
.nav-dropdown-custom .dropdown-toggle {
    border: none;
    color: #6c757d;
    font-weight: 500;
}

.nav-dropdown-custom .dropdown-toggle:hover {
    color: #2c3e50;
}

.nav-dropdown-custom .dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.nav-dropdown-custom .dropdown-item {
    padding: 8px 16px;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.nav-dropdown-custom .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2E8B57;
}

/* Sensor Badge */
.sensor-badge {
    background: #2E8B57;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    margin-left: 5px;
    vertical-align: middle;
}

/* Tab Content */
.tab-content {
    padding: 20px 0;
}

.tab-pane {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .nav-tabs-custom {
        display: none;
    }
    
    .nav-underline-custom {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-underline-custom .nav-link {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

@media (min-width: 769px) {
    .nav-underline-custom {
        display: none;
    }
    
    .nav-tabs-custom {
        display: flex;
    }
}

/* Updated Dual Time Widget */
.dual-time-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif;
    margin: 15px 0;
}

.sensors-online {
    background: rgba(46, 139, 87, 0.3);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sensor-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.summary-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #0d6efd !important;
}

.summary-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.sensor-online {
    background-color: #d1edff;
    color: #0d6efd;
    border-left: 4px solid #0d6efd;
}

.sensor-offline {
    background-color: #f8d7da;
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.theme-card {
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.theme-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.table-theme th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}
/* Chart container styles */
.theme-card .card-body {
    padding: 1rem;
    position: relative;
}

.theme-card canvas {
    width: 100% !important;
    height: 150px !important;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Ensure proper chart sizing */
#sensor1DetailChart,
#sensor2DetailChart {
    width: 100% !important;
    height: 400px !important;
}

/* Mini chart containers */
.mini-chart-container {
    height: 150px;
    position: relative;
}
/* All Sensors Tab Specific Styles */
.sensor-status-badges .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.chart-legend {
    font-size: 0.9rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.125);
    background-color: rgba(0,0,0,0.02);
}

.table-borderless th {
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.border.rounded {
    transition: all 0.3s ease;
}

.border.rounded:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Ensure the comparison chart has proper dimensions */
#allSensorsComparisonChart {
    width: 100% !important;
    height: 400px !important;
}

/* Alerts Styling */
.alert-card {
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.alert-card:hover {
    transform: translateX(5px);
}

.alert-critical {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.alert-warning {
    border-left-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.05);
}

.alert-info {
    border-left-color: #0dcaf0;
    background-color: rgba(13, 202, 240, 0.05);
}

/* Alert badges */
.nav-tabs .badge {
    font-size: 0.7rem;
    position: relative;
    top: -1px;
}