/* NetData Style Live Dashboard Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #1a1a2e 100%);
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.brand-logo-img {
    width: auto;
    height: 45px;
    object-fit: cover;
    
    }


/* Header with live status */
.header {
    align-items: center;
    background: #2F4852;
    padding: 20px 10px;
    position: relative;
    display: flex;
    justify-content: space-between;
    gap:10px;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    margin-bottom: 25px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #ffffff 0%, #4facfe 50%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 10px rgba(79, 172, 254, 0.3)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(79, 172, 254, 0.6)); }
}

/* Live status bar */
.live-status {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.2) 0%, rgba(79, 172, 254, 0.2) 100%);
    padding: 8px 20px;
    border-radius: 20px;
    margin: 10px auto;
    width: fit-content;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(10px);
}

/* Enhanced Menu Styling */
ul.menu {
    display: flex;
    list-style: none;
    background: linear-gradient(90deg, rgba(15, 52, 96, 0.9) 0%, rgba(22, 33, 62, 0.9) 100%);
    padding: 0;
    padding: 10px 0px;
    width: 100%;
    margin: 0;
    align-items: center;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
}

li.tabmenu {
    flex: 1;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

li.tabmenu > a {
    display: block;
    padding: 10px 18px;
    color: #a8b2d1;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

li.tabmenu > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

li.tabmenu > a:hover::before {
    left: 100%;
}

li.tabmenu > a:hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

li.tabmenu_on > a {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.4);
    transform: translateY(-1px);
}

.menubottom {
    background: linear-gradient(90deg, rgba(15, 52, 96, 0.9) 0%, rgba(22, 33, 62, 0.9) 100%);
    color: #4facfe;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border-bottom: 2px solid #4facfe;
    backdrop-filter: blur(15px);
    position: relative;
}

.menubottom::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #4facfe, #00f2fe, #4facfe);
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Live Dashboard Grid Layout */
.pagebody {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    max-width: 1800px;
    margin: 0 auto;
    position: relative;
}

/* Live Data Panels */
.dashboard-panel {
    background: linear-gradient(145deg, rgba(30, 42, 58, 0.9) 0%, rgba(42, 63, 95, 0.9) 100%);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.4),
        0 8px 32px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 172, 254, 0.5), transparent);
    animation: topGlow 4s ease-in-out infinite;
}

@keyframes topGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.dashboard-panel:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 80px rgba(0,0,0,0.5),
        0 15px 40px rgba(79, 172, 254, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Live data update animation */
@keyframes dataUpdate {
    0% { background-color: rgba(0, 255, 136, 0.1); }
    50% { background-color: rgba(0, 255, 136, 0.3); }
    100% { background-color: transparent; }
}

.data-updating {
    animation: dataUpdate 0.5s ease-in-out;
}

.panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.panel-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 1px;
}

.panel-icon {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.panel-icon:hover::before {
    left: 100%;
}

.panel-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.sectiontitle {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #ffffff 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Live Data Table */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 20px;
    position: relative;
}

.table th {
    color: #a8b2d1;
    text-align: left;
    padding: 15px 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    position: relative;
}

.table th::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    transition: width 0.3s ease;
}

.table th:hover::after {
    width: 100%;
}

.table td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #ffffff;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
}

.table tr {
    transition: all 0.3s ease;
    position: relative;
}

.table tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #4facfe, #00f2fe);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.table tr:hover::before {
    opacity: 1;
}

.table tr:hover {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.05) 100%);
    transform: translateX(5px);
}

/* Live Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    box-shadow: 0 0 10px currentColor;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    transform: translate(-50%, -50%);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.status-green {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    box-shadow: 0 0 15px rgba(0,255,136,0.6);
    animation: pulse 2s infinite;
}

.status-orange {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    box-shadow: 0 0 15px rgba(255,167,38,0.6);
    animation: pulse 1.5s infinite;
}

.status-red {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    box-shadow: 0 0 15px rgba(255,82,82,0.6);
    animation: pulse 1s infinite;
}

/* Live Data Values */
.live-value {
    font-weight: 600;
    color: #4facfe;
    text-shadow: 0 0 5px rgba(79, 172, 254, 0.5);
    transition: all 0.3s ease;
}

.live-value.updating {
    animation: valueUpdate 0.5s ease-in-out;
}

@keyframes valueUpdate {
    0% { color: #00ff88; transform: scale(1.1); }
    100% { color: #4facfe; transform: scale(1); }
}

/* Enhanced Input Fields */
input[type="text"], select {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 10px 15px;
    color: #ffffff;
    font-size: 13px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79,172,254,0.3);
    background: rgba(255,255,255,0.12);
    transform: scale(1.02);
}

/* Enhanced Icons */
.icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.icon:hover {
    transform: scale(1.2) rotate(5deg);
}

.icon-power { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.4);
}
.icon-temp { 
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}
.icon-fan { 
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8c0 100%);
    box-shadow: 0 2px 8px rgba(168, 230, 207, 0.4);
}
.icon-water { 
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.4);
}
.icon-power-status { 
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.4);
}

/* Data refresh indicator */
.refresh-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-top: 2px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.refresh-indicator.active {
    opacity: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .pagebody {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .dashboard-panel {
        padding: 20px;
        border-radius: 15px;
    }
    
    ul.menu {
        flex-wrap: wrap;
        border-radius: 10px;
    }
    
    li.tabmenu > a {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .title {
        font-size: 24px;
    }
}

/* Enhanced Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.5);
}

/* Enhanced Animation for status indicators */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Logo positioning and styling is now handled automatically in evo.js */

/* Floating animation for panels */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.dashboard-panel:nth-child(odd) {
    animation: float 6s ease-in-out infinite;
}

.dashboard-panel:nth-child(even) {
    animation: float 6s ease-in-out infinite reverse;
}

/* Glow effect for active elements */
.dashboard-panel:focus-within {
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.4),
        0 8px 32px rgba(0,0,0,0.2),
        0 0 0 2px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Live data streaming effect */
@keyframes dataStream {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 172, 254, 0.2), transparent);
    animation: dataStream 2s ease-in-out infinite;
}

/* Beautiful Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    margin: 10px 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-container:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
    border-color: rgba(79, 172, 254, 0.3);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.2);
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    transition: all 0.3s ease;
}

.toggle-icon.off {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.toggle-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-address {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-family: 'Courier New', monospace;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch.on {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 20px rgba(79, 172, 254, 0.6);
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.toggle-switch.on::before {
    transform: translateX(30px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 15px rgba(255,255,255,0.8);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toggle-switch.on::after {
    opacity: 1;
    animation: toggleGlow 2s ease-in-out infinite;
}

@keyframes toggleGlow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

.toggle-status {
    width: 10px; 
    height: 10px;
    margin: 0;
    padding: 6px;
    background: #00ff88;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: inline-block;
    vertical-align: middle;
    animation: livePulse 1s infinite;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
  }
    
.toggle-status.off {
    background: #ff4757;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.6);
}

/* Toggle container animations */
.toggle-container {
    animation: toggleSlideIn 0.5s ease-out;
}

@keyframes toggleSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive toggle */
@media (max-width: 768px) {
    .toggle-container {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .toggle-info {
        justify-content: center;
    }

    .toggle-switch {
        align-self: center;
    }
}

/* Hide Logged Files (files.cgi) menu items */
li.tabmenu:has(> a[data-tooltip="Logged Files"]),
li.tabmenu:has(> a[href="files.cgi"]),
li.tabmenu:has(> a[href="files-new.cgi"]) {
    display: none !important;
}


