@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Light Theme (Plain Text) */
:root {
    --primary-color: #0f766e;
    /* Modern royal blue */
    --text-dark: #0f172a;
    /* Deep slate */
    --text-light: #64748b;
    /* Cool grey */
    --background: #f8fafc;
    /* Off-white */
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-color: rgba(15, 23, 42, 0.04);
    --error-red: #ef4444;
    --toggle-off: #ef4444;
    --toggle-on: #10b981;
    --card-title-color: #1e293b;
    --green-text: #10b981;
    --label-size: 15px;
    --label-weight: 600;
}

body {
    font-family: 'Outfit', 'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
}

body.light-theme .page-title,
body.light-theme .sectiontitle,
body.light-theme .section-title {
    color: var(--text-dark);
}

body.light-theme .card-title,
body.light-theme .panel-title {
    color: #1e293b;
}

body.light-theme .card-header {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.04) 0%, rgba(15, 118, 110, 0) 100%) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

body.light-theme {
    background: var(--background);
    color: var(--text-dark);
}

body.light-theme .brand-bar {
    background: var(--primary-color);
}

body.light-theme .nav-tabs {
    background: rgba(47, 72, 82, 0.1);
}

body.light-theme .tab {
    color: var(--text-dark);
}

body.light-theme .tab.active {
    background: rgba(47, 72, 82, 0.2);
    color: var(--text-dark);
}

body.light-theme .page-title {
    color: var(--text-dark);
}

body.light-theme .status-indicator {
    color: var(--text-dark);
}

body.light-theme .card {
    background: var(--card-bg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.03), 0 8px 16px -6px rgba(15, 23, 42, 0.03), 0 0 1px 0 rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .card:hover {
    border-color: rgba(15, 118, 110, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(15, 118, 110, 0.08), 0 10px 20px -10px rgba(15, 118, 110, 0.04);
}

body.light-theme .card-title,
body.light-theme .panel-title {
    color: #1e293b !important;
}

body.light-theme table {
    color: var(--text-dark);
}

body.light-theme tr:hover {
    background-color: rgba(15, 118, 110, 0.04) !important;
}

body.light-theme input[type="text"],
body.light-theme input[type="number"],
body.light-theme input[type="password"],
body.light-theme select,
body.light-theme .status-value,
body.light-theme input.status-value,
body.light-theme .value-input {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 12px;
    height: 38px;
    color: var(--text-dark, #0f172a);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

body.light-theme input[type="text"]:focus,
body.light-theme input[type="number"]:focus,
body.light-theme input[type="password"]:focus,
body.light-theme select:focus,
body.light-theme .status-value:focus,
body.light-theme .value-input:focus {
    border-color: var(--primary-color, #0f766e);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
    background: #ffffff;
    color: var(--text-dark, #0f172a);
    outline: none;
}

/* Hide spin buttons for numbers */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

body.light-theme .address,
body.light-theme td.address,
.address,
td.address,
.address-tag,
.param-symbol,
.fan-table td.addr-col {
    background: rgba(15, 118, 110, 0.08) !important;
    color: #0f766e !important;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    user-select: all !important;
}

body.light-theme .footer {
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

body.light-theme .indicator-dot.normal {
    background: #2F4852;
    box-shadow: 0 0 6px #2F4852;
}

body.light-theme .indicator-dot.warning {
    background: #FF9800;
    box-shadow: 0 0 6px #FF9800;
}

body.light-theme .indicator-dot.critical {
    background: #F44336;
    box-shadow: 0 0 6px #F44336;
}

body.light-theme .theme-label {
    color: var(--text-dark);
}

body.light-theme .theme-slider {
    background: #ccc;
}

body.light-theme input:checked+.theme-slider {
    background: #2196F3;
}

.name-cell {
    font-size: 16px;
    font-weight: 600;
}

body.light-theme .apply-section {
    background: rgba(47, 72, 82, 0.1);
    border: 1px solid rgba(47, 72, 82, 0.2);
}

body.light-theme .apply-button {
    background: var(--primary-color);
    color: white;
}

body.light-theme .apply-button:hover {
    background: var(--text-dark);
}

body.light-theme .address-tag {
    background: rgba(47, 72, 82, 0.1);
    color: var(--text-dark);
}

body.light-theme .input-group label {
    font-size: var(--label-size);
    font-weight: var(--label-weight);
    color: var(--text-dark);
}

body.light-theme .section-title {
    color: var(--text-dark);
    border-bottom: 1px solid rgba(47, 72, 82, 0.2);
}

body.light-theme .custom-toggle-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
}

body.light-theme .slider-large {
    background: var(--toggle-off) !important;
}

body.light-theme input:checked+.slider-large {
    background-color: var(--green-text) !important;
}

body.light-theme .toggle-text-status.status-on {
    color: var(--green-text);
}

body.light-theme .toggle-text-status.status-off {
    color: var(--toggle-off);
}

body.light-theme .slider-large:before {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Light Theme Menu Header Styles */
body.light-theme .menu {
    background: #0f172a !important;
}

body.light-theme .tabmenu a {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.light-theme .tabmenu_on a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.01) 100%) !important;
    color: white !important;
    font-weight: 600;
}

body.light-theme .menubottom {
    background: #0f172a !important;
    color: white !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .fan-table th,
body.light-theme .fan-table thead th {
    /* background-color: rgba(47, 72, 82, 0.1) !important; */
    color: #2F4852 !important;
}

body.light-theme .name-cell,
body.light-theme .fan-name,
body.light-theme .fan-icon-bg i,
body.light-theme .fa-faucet {
    color: var(--card-title-color);
}

body.light-theme .section-title i {
    color: #2F4852 !important;
}


body.light-theme .section {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(47, 72, 82, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme table,
body.light-theme .table,
body.light-theme .fan-table,
body.light-theme #alarmTable,
body.light-theme .data-table,
body.light-theme .log-table {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    color: var(--text-dark, #0f172a) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

body.light-theme th,
body.light-theme table th,
body.light-theme .table th {
    background-color: #f8fafc !important;
    color: #334155 !important;
    border-bottom: 2px solid var(--border-color, #e2e8f0) !important;
    font-size: 12.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 700 !important;
    padding: 13px 18px !important;
    text-align: left !important;
}

body.light-theme td,
body.light-theme table td,
body.light-theme .table td {
    border-bottom: 1px solid var(--border-color, #f1f5f9) !important;
    color: var(--text-dark, #0f172a) !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    vertical-align: middle !important;
    background: #ffffff !important;
}

body.light-theme table tr:last-child td,
body.light-theme .table tr:last-child td {
    border-bottom: none !important;
}

body.light-theme tr:hover td,
body.light-theme .table tr:hover td {
    background-color: rgba(15, 118, 110, 0.04) !important;
}

body.light-theme .real-display,
.real-display {
    display: none !important;
}

.real-wrapper {
    display: inline-block !important;
}

.real-wrapper input {
    display: inline-block !important;
}

body.light-theme td.temperature-unit,
body.light-theme td.pressure-unit,
body.light-theme td.flow-unit,
body.light-theme .temperature-unit,
body.light-theme .pressure-unit,
body.light-theme .flow-unit,
body.light-theme .gauge-unit {
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

body.light-theme .status-value input,
body.light-theme input.status-value,
body.light-theme table input[type="text"],
body.light-theme table input[type="number"],
body.light-theme table input[type="password"],
body.light-theme table select,
body.light-theme .table input[type="text"],
body.light-theme .table input[type="number"],
body.light-theme .table select,
body.light-theme .value-input {
    width: 110px !important;
    min-width: 100px !important;
    max-width: 130px !important;
    height: 38px !important;
    padding: 7px 12px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: var(--text-dark, #0f172a) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    text-align: center !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transition: all 0.2s ease !important;
}

body.light-theme table select,
body.light-theme .table select {
    text-align-last: center !important;
    cursor: pointer !important;
}

/* Removed conflicting green-themed menu overrides (kept blue palette) */

body.light-theme .icon-wrapper {
    background: rgba(47, 72, 82, 0.1) !important;
}

body.light-theme .icon-wrapper i {
    color: #2F4852 !important;
}

body.light-theme .section-header {
    border-bottom: 2px solid rgba(47, 72, 82, 0.2) !important;
}

body.light-theme .section-icon {
    background: rgba(47, 72, 82, 0.1) !important;
    color: #2F4852 !important;
}

body.light-theme .section-title {
    color: #2F4852 !important;
}

/* Removed duplicated menu styling (already defined earlier with !important) */

body.light-theme .fan-table td,
body.light-theme .fan-table td.addr-col {
    color: var(--text-dark) !important;
}

body.light-theme .card-title i.fa-gamepad,
body.light-theme .card-title i.fa-faucet {
    color: #115e59 !important;
}

body.light-theme .toggle-label {
    color: var(--text-dark) !important;
}

body.light-theme .toggle-text {
    color: var(--primary-color) !important;
}

body.light-theme .toggle-text.off {
    color: var(--error-red) !important;
}

body.light-theme .value-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
}

body.light-theme .box-container {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

body.light-theme .fan-table {
    border: 1px solid rgba(47, 72, 82, 0.2) !important;
}


body.light-theme .mode-label {
    color: var(--text-dark) !important;
}

body.light-theme .mode-toggle label {
    color: var(--text-dark) !important;
}

/* Alert Status Styling */
.alert-active {
    color: #e74c3c !important;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.alert-warning {
    color: #f39c12 !important;
    font-weight: 600;
    background: rgba(243, 156, 18, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.priority-high {
    color: #e74c3c !important;
    font-weight: 700;
}

.priority-medium {
    color: #f39c12 !important;
    font-weight: 600;
}

.priority-low {
    color: #3498db !important;
    font-weight: 500;
}

/* Light theme alert styling */
body.light-theme .alert-active {
    color: #d32f2f !important;
    background: rgba(211, 47, 47, 0.1);
    border: 1px solid rgba(211, 47, 47, 0.3);
}

body.light-theme .alert-warning {
    color: #f57c00 !important;
    background: rgba(245, 124, 0, 0.1);
    border: 1px solid rgba(245, 124, 0, 0.3);
}

body.light-theme .priority-high {
    color: #d32f2f !important;
}

body.light-theme .priority-medium {
    color: #f57c00 !important;
}

body.light-theme .priority-low {
    color: #1976d2 !important;
}


body.light-theme .progress-label {
    color: var(--text-dark) !important;
}

body.light-theme .icon-bg i {
    color: #2F4852 !important;
}

/* Global reset already present later; removed duplicate */
/* Full width card for the last row */
/* .dashboard > .card:last-child {
    grid-column: 1 / -1;
} */
/* Background defined on html, body below; removed duplicate body background */
/* 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;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.slider-large {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ff3c3c;
    transition: .4s;
    border-radius: 30px;
}

input:checked+.slider-large {
    background-color: #2ecc71;
}

input:checked+.slider-large:before {
    transform: translateX(30px);
}

.toggle-text-status {
    font-weight: 500;
    min-width: 40px;
    font-size: 14px;
    flex-shrink: 0;
}


.status-off {
    color: #ff3c3c;
}

.toggle-switch-large {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch-large input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-large:before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.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);
}

/* navigation */
.brand-logo-img {
    width: auto;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.header {
    align-items: center;
    background: #2F4852;
    padding: 20px 10px;
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 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);
    border-radius: 15px;
}

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);
    border-radius: 15px;
}

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

.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 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: separate;
    border-spacing: 0;
    font-size: 14px;
    margin-top: 0px;
    position: relative;
    background: var(--card-bg, #ffffff);
    color: var(--text-dark, #0f172a);
}

.table th {
    color: var(--text-light, #334155);
    background-color: #f8fafc;
    text-align: left;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    position: relative;
}

.table th::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    transition: width 0.3s ease;
}

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

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    color: var(--text-dark, #0f172a);
    font-size: 14.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    vertical-align: middle;
}

.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"],
input[type="number"],
input[type="password"],
select {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-dark, #0f172a);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color, #0f766e);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
    background: #ffffff;
    color: var(--text-dark, #0f172a);
}

/* 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;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 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;
}

/* .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;
    }
}

.indicator-on {
    background: #2ecc71;
    box-shadow: 0 0 6px #2ecc71;
}

.indicator-off {
    background: #ff3c3c;
    box-shadow: 0 0 6px #ff3c3c;
}

.toggle-status {
    font-weight: 500;
    min-width: 40px;
    font-size: 14px;
    flex-shrink: 0;
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    animation: none !important;
    box-shadow: none !important;
}

.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-info {
        justify-content: center;
    }

    .toggle-switch {
        width: 50px;
        height: 26px;
    }
}

/* Schneider Brand Bar */
.brand-bar {
    background: #00a3e0;
    padding: 5px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 101;
    position: relative;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.system-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .name,
.user-info .role {
    font-size: 14px;
}

.user-info .role {
    background: rgba(41, 128, 185, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: rgba(15, 30, 50, 0.7);
    border-top: 1px solid rgba(41, 128, 185, 0.2);
    overflow-x: auto;
    font-size: 13px;
}

.tab {
    padding: 10px 15px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.tab.active {
    background: rgba(0, 163, 224, 0.3);
    color: #00a3e0;
    font-weight: 500;
}

/* Main Content */
.container {
    max-width: 100%;
    margin: 15px auto;
    padding: 0 15px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 163, 224, 0.3);
}

.page-title {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}


.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 6px #2ecc71;
}

/* UPDATED: Dashboard grid with 2 columns */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns */
    gap: 20px;
    margin-bottom: 15px;
    width: 100%;
}

body.light-theme .gauge-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

body.light-theme .gauge-inner {
    background: var(--card-bg);
}

body.light-theme .gauge-title {
    color: var(--card-title-color);
}

body.light-theme .gauge-value {
    color: var(--text-dark);
}

body.light-theme .gauge-unit {
    color: var(--text-light);
}

body.light-theme .gauge-range {
    color: var(--text-light);
}

body.light-theme .gauge-address {
    color: var(--primary-color);
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.15);
}

body.light-theme .gauge {
    background: conic-gradient(rgba(0, 0, 0, 0.08) 0% 100%);
}

body.light-theme .gauge-needle {
    background: #0f172a;
    box-shadow: 0 0 4px rgba(15, 23, 42, 0.3);
}



.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 13px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.03), 0 8px 16px -6px rgba(15, 23, 42, 0.03), 0 0 1px 0 rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    min-height: 300px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    /* Full width cards */
}

.card-betweeen {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(15, 118, 110, 0.08), 0 10px 20px -10px rgba(15, 118, 110, 0.04);
    border-color: rgba(15, 118, 110, 0.25);
}

.card-header {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.04) 0%, rgba(15, 118, 110, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}


.card-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.card-title i {
    color: var(--primary-color) !important;
    background: rgba(15, 118, 110, 0.08);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-title i {
    transform: scale(1.1) rotate(5deg);
    background: rgba(15, 118, 110, 0.15);
}

/* Enhanced Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    background: var(--card-bg, #ffffff);
    color: var(--text-dark, #0f172a);
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    color: var(--text-dark, #0f172a);
    font-size: 14.5px;
    vertical-align: middle;
}

th {
    background-color: #f8fafc;
    color: var(--text-light, #334155);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(15, 118, 110, 0.04);
}

input[type="text"],
select {
    width: 100%;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    color: var(--text-dark, #0f172a);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color, #0f766e);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
    background: #ffffff;
    color: var(--text-dark, #0f172a);
}

/* Enhanced Status Indicators */
.indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.normal {
    background: #2ecc71;
    box-shadow: 0 0 6px #2ecc71;
}

.warning {
    background: #f39c12;
    box-shadow: 0 0 6px #f39c12;
}

.critical {
    background: #e74c3c;
    box-shadow: 0 0 6px #e74c3c;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mini Trend Sparkline */
.sparkline-container {
    width: 80px;
    height: 40px;
    margin-top: 5px;
}

/* Scrollable table container */
.scrollable {
    overflow-y: auto;
    flex: 1;
    max-height: 250px;
}

/* Toggle Switch for Unit On */
.custom-toggle-container-unit {
    display: flex;
    padding: 10px;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-text-status-unit {
    font-weight: 500;
    min-width: 40px;
    font-size: 14px;
    flex-shrink: 0;
}

.status-on-unit {
    color: #2ecc71;
}

.status-off-unit {
    color: #ff3c3c;
}


.status-off {
    color: #ff3c3c;
}

.toggle-switch-unit {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    flex-shrink: 0;
}

.toggle-switch-unit input,
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-unit {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ff3c3c;
    transition: .4s;
    border-radius: 25px;
}

.slider-unit:before {
    content: "";
    position: absolute;
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-unit {
    background-color: #2ecc71;
}

input:checked+.slider-unit:before {
    transform: translateX(25px);
}

/* Unit Toggle */
.unit-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

/* Duplicate basic toggle-container removed (enhanced version exists above) */

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}



.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e74c3c;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2ecc71;
}

input:checked+.slider:before {
    transform: translateX(25px);
}


.power-button-container {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

.power-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    width: 70px;
}

.power-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.power-button.off .power-icon {
    background: #f0f0f0;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

.power-button.on .power-icon {
    background: #2ecc71;
    color: white;
    border: 2px solid #27ae60;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.power-text {
    font-weight: bold;
    font-size: 14px;
    transition: color 0.3s ease;
}

.power-button.off .power-text {
    color: #e74c3c;
}

.power-button.on .power-text {
    color: #2ecc71;
}


/* Enhanced Address column styling */
.address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #3498db;
    background: rgba(52, 152, 219, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Enhanced Parameter symbols */
.param-symbol {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 163, 224, 0.2);
    text-align: center;
    line-height: 24px;
    margin-right: 8px;
    font-size: 12px;
    border: 1px solid rgba(0, 163, 224, 0.3);
}

.temp-symbol {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
}

.fan-symbol {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.3);
}

.water-symbol {
    background: rgba(41, 128, 185, 0.2);
    color: #2980b9;
    border-color: rgba(41, 128, 185, 0.3);
}

.flow-symbol {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.3);
}

.power-symbol {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.3);
}

.press-symbol {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.3);
}

.valve-symbol {
    background: rgba(230, 126, 34, 0.2);
    color: #e67e22;
    border-color: rgba(230, 126, 34, 0.3);
}

.capacity-symbol {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
    border-color: rgba(149, 165, 166, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        padding: 15px;
        min-height: 250px;
    }

    .card-title {
        font-size: 16px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .nav-tabs {
        font-size: 12px;
    }

    .tab {
        padding: 8px 12px;
    }

    .address {
        font-size: 11px;
        padding: 3px 6px;
    }

    .param-symbol {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 10px;
    }

    .indicator {
        gap: 6px;
    }

    .indicator-dot {
        width: 8px;
        height: 8px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .toggle-switch {
        width: 45px;
        height: 24px;
    }

    .container {
        padding: 0 10px;
    }

    .card {
        padding: 12px;
        min-height: 200px;
    }

    .card-title {
        font-size: 14px;
    }

    th,
    td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .scrollable {
        max-height: 200px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
    }

    input:checked+.slider:before {
        transform: translateX(21px);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .card {
        min-height: 200px;
    }

    .scrollable {
        max-height: 150px;
    }
}

.panel-title {
    font-size: 18px;
    color: var(--card-title-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.panel-title i {
    color: var(--primary-color) !important;
    background: rgba(15, 118, 110, 0.08);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .panel-title i {
    transform: scale(1.1) rotate(5deg);
    background: rgba(15, 118, 110, 0.15);
}

.gauge-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Fixed 3 columns for first row */
    gap: 12px;
    /* Reduced gap */
    margin-top: 12px;
}

.gauge-container-second-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Fixed 3 columns for second row */
    gap: 12px;
    margin-top: 12px;
}

.gauge-card {
    background: rgba(30, 42, 58, 0.9);
    border-radius: 10px;
    /* Slightly smaller radius */
    padding: 12px;
    /* Reduced padding */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 163, 224, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.gauge-card:hover {
    transform: translateY(-3px);
    /* Reduced hover effect */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 163, 224, 0.5);
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
    /* Reduced margin */
}

.gauge-title {
    font-size: 14px;
    /* Smaller font */
    font-weight: 600;
    color: #00a3e0;
    display: flex;
    align-items: center;
    gap: 6px;
    /* Reduced gap */
}

.gauge-address {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    /* Smaller font */
    color: #3498db;
    background: rgba(52, 152, 219, 0.15);
    padding: 2px 5px;
    /* Adjusted padding */
    border-radius: 3px;
}

.gauge {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(rgba(255, 255, 255, 0.1) 0% 100%);
    margin: 6px 0;
    /* Reduced margin */
    transition: background 0.3s ease;
}

.gauge-inner {
    position: absolute;
    width: 85px;
    /* Slightly smaller to allow more space */
    height: 85px;
    background: rgba(20, 30, 48, 0.9);
    border-radius: 50%;
    top: 17.5px;
    /* Adjusted position */
    left: 17.5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 5px;
    /* Added padding for better spacing */
}

.gauge-value {
    font-size: 16px;
    font-weight: bold;
    color: #e0e1dd;
    line-height: 1.1;
    margin-bottom: 2px;
}

.gauge-unit,
.temperature-unit,
.flow-unit,
.pressure-unit {
    font-size: 10px;
    /* Reduced from 12px */
    color: #7f8c8d;
    line-height: 1;
}

.gauge-needle {
    display: none !important;
}

.gauge-range {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 10px;
    /* Smaller font */
    color: #7f8c8d;
    margin-top: 8px;
    /* Reduced margin */
}

/* Light theme adjustments for smaller gauges */
body.light-theme .gauge-card {
    background: var(--card-bg) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.03), 0 8px 16px -6px rgba(15, 23, 42, 0.03) !important;
}

body.light-theme .gauge-card:hover {
    border-color: rgba(15, 118, 110, 0.25) !important;
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -10px rgba(15, 118, 110, 0.08), 0 10px 20px -10px rgba(15, 118, 110, 0.04) !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1300px) {

    .gauge-container,
    .gauge-container-second-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .gauge-container,
    .gauge-container-second-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gauge-card {
        padding: 10px;
    }

    .gauge-title {
        font-size: 12px;
    }

    .gauge {
        width: 90px;
        height: 90px;
    }

    .gauge-inner {
        width: 60px;
        height: 60px;
        top: 15px;
        left: 15px;
        padding: 3px;
    }

    .gauge-value {
        font-size: 14px;
    }

    .gauge-unit {
        font-size: 9px;
    }

    .gauge-needle {
        height: 45px;
    }

}

/* Strict hiding of inputs inside all gauge cards (index.html, inov_page7.html) */
.gauge-card input,
.gauge input,
.gauge-value input,
.gauge-inner input,
.dashboard .gauge-card input {
    display: none !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    visibility: hidden !important;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ff3c3c;
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* NEW: Hide text input fields but keep functionality */
.evo-text-container {
    position: relative;
    display: inline-block;
}

.products-logo {
    width: auto;
    height: 50vh;
    object-fit: cover;
    border-radius: 6px;
}

.product-info-card {
    display: flex;
    flex-direction: column;
    grid-gap: 20px;
}

.evo-text-value {
    font-size: 16px;
    font-weight: bold;
    color: #e0e1dd;
}

/* .evo-text-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
} */
/* input[type="text"][id^="t0"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
} */
input[type="text"] {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-dark, #0f172a);
    padding: 6px 10px;
    border-radius: 6px;
    width: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.two-column-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.two-column-layout .column {
    flex: 1;
}

@media (max-width: 768px) {
    .two-column-layout {
        flex-direction: column;
    }
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 120px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}


.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 8px 12px;
    background: rgba(19, 33, 53, 0.8);
    border: 1px solid rgba(0, 163, 224, 0.5);
    border-radius: 6px;
    color: #e0e1dd;
    font-size: 14px;
}

.filter-controls button {
    padding: 8px 16px;
    background: var(--green-text);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-controls button:hover {
    background: rgba(0, 163, 224, 1);
}

.section-title {
    font-size: 14px;
    color: #00a3e0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 163, 224, 0.2);
}

/* 
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: flex;
    justify-content:space-between;
    margin-bottom: 10px;
    font-size: var(--label-size);
} */

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-column {
    flex: 1;
}

.input-row .input-column label {
    margin-bottom: 5px;
    font-size: var(--label-size);
    font-weight: var(--label-weight);
    color: #b0c4de;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    color: var(--text-dark, #0f172a);
    font-size: 14px;
    font-weight: 600;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: var(--primary-color, #0f766e);
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
    background: #ffffff;
    color: var(--text-dark, #0f172a);
}

/* Address label styling */
.address-label {
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    margin-bottom: 20px;
}

.address-label label {
    font-size: var(--label-size);
    font-weight: var(--label-weight);
}

.address-tag {
    background: rgba(15, 118, 110, 0.08);
    color: #0f766e;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13.5px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-weight: 700;
}

.apply-section {
    /* background: rgba(0, 163, 224, 0.1); */
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid rgba(0, 163, 224, 0.3);
}

.apply-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    /* background: #00a3e0; */
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    margin-top: 10px;
    font-size: 14px;
}

.apply-button:hover {
    background: #0085b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.apply-button:active {
    transform: translateY(0);
}

/* Notification Bell Blinking Animation */
.notification-bell {
    display: none !important;
}

.notification-count {
    position: absolute !important;
    top: 6px;
    left: 36px;
    background: #ff4757;
    color: white;
    border-radius: 8px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    z-index: 10;
}


.hidden {
    display: none !important;
}

@keyframes notificationBlink {

    0%,
    50% {
        opacity: 1;
        transform: scale(1);
    }

    25%,
    75% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

@keyframes notificationPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(255, 71, 87, 0);
    }
}

/* Light theme notification styling */
body.light-theme .notification-bell {
    color: #d32f2f;
}

body.light-theme .notification-count {
    background: #d32f2f;
    color: white;
}

/* Diagonal Warning Message Styles */
.sensor-warning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: 10;
    pointer-events: none;
}

.sensor-warning-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(50deg);
    color: #ff3c3c;
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;

}

#s09135 {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    float: none !important;
}

/* COLLAPSIBLE LEFT SIDEBAR LAYOUT STYLES */

.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.mobile-header {
    display: none;
    flex-shrink: 0;
    z-index: 101;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px !important;
    height: 60px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 70px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #090d16;
}

.sidebar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.2s, width 0.2s;
    opacity: 1;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #00f2fe;
    transform: scale(1.05);
}

/* Collapsed desktop state overrides */
.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 15px 0;
}

.sidebar-collapsed .sidebar-logo {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin: 0;
    pointer-events: none;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.sidebar {
    width: 260px;
    height: 100%;
    background: linear-gradient(180deg, #090d16 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 100;
}

/* Collapsed desktop state */
.sidebar-collapsed .sidebar {
    width: 70px;
}

.content-area {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--background);
    transition: all 0.3s ease;
    min-width: 0;
}

/* Sidebar Menu List Overrides & Independent Scroll */
.sidebar ul.menu {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px 0 24px 0 !important;
    margin: 0;
    gap: 5px;
    align-items: stretch !important;
    width: 100% !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom sleek scrollbar for sidebar menu */
.sidebar ul.menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar ul.menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar ul.menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar ul.menu::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

.sidebar li.tabmenu {
    flex: none !important;
    flex-shrink: 0 !important;
    width: 100%;
}

.sidebar li.tabmenu>a {
    position: relative !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 11px 16px !important;
    border-right: none !important;
    border-left: 4px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    border-radius: 0 !important;
    gap: 14px;
    font-size: 14.5px !important;
    width: 100%;
}

.sidebar li.tabmenu>a i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.55);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar li.tabmenu>a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.sidebar li.tabmenu>a:hover i {
    color: #0d9488 !important;
    transform: scale(1.12);
}

/* Active Highlight Style matching current brand theme */
.sidebar li.tabmenu_on>a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.01) 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-left: 4px solid #0d9488 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar li.tabmenu_on>a i {
    color: #0d9488 !important;
    transform: scale(1.05);
}

/* Sidebar item content structure when collapsed */
.sidebar .menu-text {
    opacity: 1;
    transition: opacity 0.2s ease, width 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.sidebar-collapsed .sidebar .menu-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar-collapsed .sidebar li.tabmenu>a {
    padding: 12px 0 !important;
    justify-content: center !important;
    border-left: 4px solid transparent !important;
}

.sidebar-collapsed .sidebar li.tabmenu_on>a {
    border-left: 4px solid #0d9488 !important;
}

.sidebar-collapsed .sidebar li.tabmenu>a i {
    margin: 0 !important;
}

/* Tooltip styles when sidebar is collapsed */
.sidebar-collapsed .sidebar li.tabmenu>a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #1F3037;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-collapsed .sidebar li.tabmenu>a:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0px);
}

/* Position Notification badges correctly in collapsed state */
.sidebar-collapsed .sidebar li.tabmenu>a #notificationCount {
    position: absolute !important;
    top: 6px;
    left: 40px;
    right: auto;
    margin-left: 0;
}

/* Responsive mobile layout */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 60px;
        /* height of header on mobile */
        left: 0;
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        width: 260px !important;
        z-index: 9999;
    }

    .mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar .sidebar-header {
        display: none;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    .content-area {
        width: 100vw;
    }

    /* Override collapsed state behavior on mobile screens */
    .sidebar-collapsed .sidebar {
        transform: translateX(-100%);
        width: 260px !important;
    }

    .sidebar-collapsed .mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar .menu-text {
        opacity: 1 !important;
        width: auto !important;
        display: inline-block !important;
    }

    .sidebar li.tabmenu>a {
        padding: 13px 20px !important;
        justify-content: flex-start !important;
    }
}

/* Tabs styling matching page 9 */
.tabs-container {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0px;
    margin-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    padding: 10px 5px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: #115e59 !important;
    border-bottom-color: #115e59 !important;
}

/* 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;
}

/* Notifications toast style matching target theme */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #ffffff;
    border-left: 4px solid #115e59;
    border-radius: 6px;
    padding: 12px 18px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    min-width: 280px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-info {
    border-left-color: #0d9488;
}

.toast-success {
    border-left-color: #10b981;
}

/* Animated Fan styling */
.fan-icon-animated {
    font-size: 28px;
    color: #3498db;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.3s ease;
}

body.light-theme .fan-icon-animated {
    color: #78bd4f;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Beaker instrument styling for water cards */
.gauge.beaker-gauge {
    background: rgba(20, 30, 48, 0.6) !important;
    border: 2px solid #475569;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
    width: 90px;
    height: 100px;
    margin: 16px auto;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

body.light-theme .gauge.beaker-gauge {
    background: rgba(241, 245, 249, 0.6) !important;
    border-color: #94a3b8;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.gauge.beaker-gauge .gauge-inner {
    background: transparent !important;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    box-sizing: border-box;
    padding: 10px;
    z-index: 10;
}

.beaker-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    transition: height 0.5s ease, background-color 0.5s ease;
    opacity: 0.7;
    z-index: 2;
}

.beaker-wave {
    position: absolute;
    top: -6px;
    left: 0;
    width: 200%;
    height: 12px;
    background: inherit;
    opacity: 0.6;
    border-radius: 40%;
    animation: beaker-wave-move 4s linear infinite;
}

@keyframes beaker-wave-move {
    0% {
        transform: translateX(0) rotate(0deg);
    }

    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

.beaker-ticks {
    position: absolute;
    right: 8px;
    top: 15px;
    bottom: 15px;
    width: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 3;
    pointer-events: none;
}

.beaker-tick {
    height: 1px;
    width: 6px;
    background: rgba(255, 255, 255, 0.35);
}

body.light-theme .beaker-tick {
    background: rgba(0, 0, 0, 0.25);
}

.beaker-tick:nth-child(3) {
    width: 10px;
}

/* 1. Glassmorphic Card Styling & Hover Effects */
.gauge-card {
    background: rgba(30, 41, 59, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.gauge-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(0, 191, 255, 0.3) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 191, 255, 0.15),
        inset 0 1px 2px 0 rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .gauge-card {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.8) !important;
}

body.light-theme .gauge-card:hover {
    border-color: rgba(15, 118, 110, 0.25) !important;
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.08) !important;
}

/* 2. Bezel and Glow for Doughnuts */
.gauge {
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.gauge-inner {
    background: radial-gradient(circle, rgba(20, 30, 48, 1) 0%, rgba(10, 17, 30, 1) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.5);
}

body.light-theme .gauge-inner {
    background: radial-gradient(circle, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* 3. Fan Airflow Vortex Animation */
.fan-vortex-ring {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1.5px dashed rgba(52, 152, 219, 0.15);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    display: none;
}

.gauge-card:has(.fan-symbol) .fan-vortex-ring {
    display: block;
}

@keyframes rotate-vortex {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 4. Beaker Glass Glare and Bubble Effects */
.gauge.beaker-gauge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 25%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    z-index: 8;
    pointer-events: none;
}

.beaker-bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
    pointer-events: none;
}

.beaker-bubble {
    position: absolute;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: float-bubbles linear infinite;
}

@keyframes float-bubbles {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-110px) scale(1.2);
        opacity: 0;
    }
}

/* Thermometer Gauge styles */
.gauge.thermometer-gauge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 120px;
    height: 120px;
    margin: 6px auto;
    position: relative;
}

.thermometer-tube {
    position: absolute;
    top: 5px;
    left: 20px;
    width: 10px;
    height: 90px;
    background: rgba(20, 30, 48, 0.6);
    border: 2px solid #475569;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    z-index: 2;
}

body.light-theme .thermometer-tube {
    background: rgba(241, 245, 249, 0.6);
    border-color: #94a3b8;
}

.thermometer-mercury {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #3498db, #ef4444);
    transition: height 0.5s ease;
}

.thermometer-bulb {
    position: absolute;
    bottom: 12px;
    left: 13px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border: 2px solid #475569;
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.light-theme .thermometer-bulb {
    border-color: #94a3b8;
}

.gauge.thermometer-gauge .gauge-inner {
    position: absolute;
    left: 50px;
    top: 0;
    width: 70px;
    height: 100%;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Pressure Dial styles */
.gauge.pressure-dial {
    background: conic-gradient(from 225deg, var(--dial-color, #2ecc71) 0%, var(--dial-track, rgba(255, 255, 255, 0.1)) 0%, transparent 75% 100%) !important;
    border-radius: 50%;
}

body.light-theme .gauge.pressure-dial {
    background: conic-gradient(from 225deg, var(--dial-color, #2ecc71) 0%, var(--dial-track, rgba(0, 0, 0, 0.08)) 0%, transparent 75% 100%) !important;
}

.gauge.pressure-dial .gauge-inner {
    /* Slightly smaller to expose the outer dial ring path */
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
}

/* Power Status Lightning Bolt Indicators */
#t09110_dot,
#t09111_dot {
    background-color: transparent !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

#t09110_dot::before,
#t09111_dot::before {
    content: "\f0e7";
    /* FontAwesome bolt icon code */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
    transition: all 0.3s ease;
}

/* Power On - Glowing neon-yellow bolt */
#t09110_dot.indicator-on::before,
#t09111_dot.indicator-on::before {
    color: #f1c40f;
    text-shadow: 0 0 8px #f1c40f, 0 0 16px #f39c12;
    animation: bolt-glowing 1.5s ease-in-out infinite alternate;
}

/* Power Off/Fault - Flashing warning red bolt */
#t09110_dot.indicator-off::before,
#t09111_dot.indicator-off::before {
    color: #e74c3c;
    text-shadow: 0 0 8px #e74c3c;
    animation: bolt-flashing 1s infinite;
}

@keyframes bolt-glowing {
    from {
        transform: scale(0.95);
        opacity: 0.85;
    }

    to {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes bolt-flashing {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

/* ==========================================================================
   UNIVERSAL MODERN TOPBAR STYLING (MATCHING SPECIFICATION)
   ========================================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
    position: sticky;
    top: 0;
    z-index: 95;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    margin-bottom: 0px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12) 0%, rgba(15, 118, 110, 0.04) 100%);
    color: #0f766e;
    font-size: 18px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    box-shadow: 0 2px 5px rgba(15, 118, 110, 0.08);
    flex-shrink: 0;
}

.topbar-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.topbar-breadcrumb i {
    font-size: 10px;
    color: #94a3b8;
}

.topbar-breadcrumb .active {
    color: #0f766e;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.topbar-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.topbar-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}

.topbar-clock i {
    color: #0f766e;
    font-size: 14px;
}

.topbar-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
}

.topbar-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    text-decoration: none;
}

.topbar-action-btn:hover {
    background: rgba(15, 118, 110, 0.08);
    border-color: #0f766e;
    color: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.12);
}

.topbar-notif-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

.topbar-notif-count.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .topbar {
        height: 60px;
        padding: 0 15px;
    }

    .topbar-title {
        font-size: 15px;
    }

    .topbar-clock,
    .topbar-badge span:not(.status-dot) {
        display: none;
    }
}