/* CSS Variables for Theme System */
:root {
    /* Dark Theme (Default) */
    --bg-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
    --bg-secondary: rgba(0, 0, 0, 0.3);
    --bg-tertiary: rgba(0, 0, 0, 0.2);
    --bg-hover: rgba(0, 0, 0, 0.15);
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    --text-primary: #ecf0f1;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.6);
    
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.15);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --accent-primary: #1d8b45;
    --accent-secondary: #60a5fa;
    --accent-warning: #fbbf24;
    --accent-error: #f87171;
    --accent-success: #4caf50;
    
    --shadow-primary: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-secondary: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.6);
    
    --backdrop-blur: blur(10px);
}

/* Cool & Minimal Light Theme with Glass-Morphism */
[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --bg-secondary: rgba(255, 255, 255, 0.1);
    --bg-tertiary: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.15);
    --bg-overlay: rgba(0, 0, 0, 0.3);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    
    --border-primary: rgba(148, 163, 184, 0.2);
    --border-secondary: rgba(148, 163, 184, 0.3);
    --border-hover: rgba(148, 163, 184, 0.4);
    
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --accent-warning: #f59e0b;
    --accent-error: #dc2626;
    --accent-success: #059669;
    
    --shadow-primary: 0 8px 32px rgba(148, 163, 184, 0.1);
    --shadow-secondary: 0 4px 16px rgba(148, 163, 184, 0.05);
    --shadow-hover: 0 12px 40px rgba(148, 163, 184, 0.15);
    
    --backdrop-blur: blur(20px);
}

/* Theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Theme Switcher Styles */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.theme-toggle:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-right: 0.25rem;
}

/* Mobile responsive theme switcher */
@media (max-width: 768px) {
    .theme-switcher {
        padding: 0.4rem;
        gap: 0.4rem;
    }
    
    .theme-toggle {
        padding: 0.4rem;
    }
    
    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    .theme-label {
        font-size: 0.8rem;
    }
}

/* Cool & Minimal Glass-Morphism Effects */
[data-theme="light"] .main-navigation {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.1);
}

[data-theme="light"] .nav-tab {
    background: transparent;
    border: 1px solid transparent;
    backdrop-filter: none;
    color: var(--text-secondary);
}

[data-theme="light"] .nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid transparent;
    color: var(--text-primary);
}

[data-theme="light"] .nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--accent-secondary);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* Cluster Status with WebSocket Indicator */
.cluster-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
    min-width: fit-content;
}

.cluster-status-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.websocket-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* WebSocket connection status classes */
.ws-connected .websocket-status {
    color: var(--accent-success);
}

.ws-disconnected .websocket-status {
    color: var(--accent-error);
}

.ws-reconnecting .websocket-status {
    color: var(--accent-warning);
}

[data-theme="light"] .cluster-status {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(5, 150, 105, 0.25);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.1);
    color: #059669;
}

[data-theme="light"] .ws-connected .websocket-status {
    color: #059669;
}

[data-theme="light"] .ws-disconnected .websocket-status {
    color: #dc2626;
}

[data-theme="light"] .ws-reconnecting .websocket-status {
    color: #d97706;
}

[data-theme="light"] .theme-switcher {
}

[data-theme="light"] .theme-switcher:hover {
}

[data-theme="light"] .view-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.1);
}

[data-theme="light"] .cluster-section,
[data-theme="light"] .firmware-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);
}

/* Member Cards - No Hover Effects */
[data-theme="light"] .member-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
    transition: none;
}

[data-theme="light"] .member-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
    transform: none;
}

[data-theme="light"] .member-card::before {
    display: none;
}

[data-theme="light"] .member-card:hover::before {
    display: none;
}

/* Selected member card styling for light theme */
[data-theme="light"] .member-card.selected {
    border-color: #3b82f6 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 8px 25px rgba(148, 163, 184, 0.15) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(255, 255, 255, 0.15) 100%) !important;
}

[data-theme="light"] .member-card.selected::before {
    display: block !important;
    opacity: 0.6 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%) !important;
}

[data-theme="light"] .member-card.selected .member-header {
    background: rgba(59, 130, 246, 0.03) !important;
}

[data-theme="light"] .member-card.selected .member-hostname {
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

[data-theme="light"] .member-card.selected .member-ip {
    color: #3b82f6 !important;
}

[data-theme="light"] .tabs-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.06);
}

[data-theme="light"] .tabs-header {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

[data-theme="light"] .tab-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .tab-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-primary);
}

[data-theme="light"] .tab-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-primary);
}

[data-theme="light"] .tab-button.active {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--accent-secondary);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .tasks-summary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .tasks-summary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.12) 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .summary-stat {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.06);
}

[data-theme="light"] .summary-stat:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.1);
}

[data-theme="light"] .action-group {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .action-group:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .progress-item,
[data-theme="light"] .result-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .progress-item:hover,
[data-theme="light"] .result-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15);
}

[data-theme="light"] .capability-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .capability-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.12);
}

/* Text Color Fixes for Cool & Minimal Theme */
[data-theme="light"] .member-hostname,
[data-theme="light"] .member-ip,
[data-theme="light"] .latency-label,
[data-theme="light"] .latency-value,
[data-theme="light"] .detail-label,
[data-theme="light"] .detail-value,
[data-theme="light"] .primary-node-label,
[data-theme="light"] .primary-node-ip,
[data-theme="light"] .cluster-status,
[data-theme="light"] .nav-tab,
[data-theme="light"] .summary-title,
[data-theme="light"] .summary-subtitle,
[data-theme="light"] .task-name,
[data-theme="light"] .tab-content p,
[data-theme="light"] .tab-content h1,
[data-theme="light"] .tab-content h2,
[data-theme="light"] .tab-content h3,
[data-theme="light"] .tab-content h4,
[data-theme="light"] .tab-content h5,
[data-theme="light"] .tab-content h6 {
    color: var(--text-primary) !important;
}

[data-theme="light"] .member-ip,
[data-theme="light"] .latency-label,
[data-theme="light"] .text-tertiary {
    color: var(--text-tertiary) !important;
}

[data-theme="light"] .text-muted,
[data-theme="light"] .member-latency {
    color: var(--text-muted) !important;
}

/* Status Indicators for Cool & Minimal Theme */
[data-theme="light"] .status-online {
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

[data-theme="light"] .status-offline {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Status classes for dark theme (default) */
.status-online {
    background: rgba(74, 222, 128, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-offline {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-error);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-dead {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

[data-theme="light"] .status-dead {
    background: rgba(139, 69, 19, 0.15);
    color: #8b4513;
    border: 1px solid rgba(139, 69, 19, 0.3);
}

[data-theme="light"] .status-inactive {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Label Chips for Cool & Minimal Theme */
[data-theme="light"] .label-chip {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6 !important;
}

[data-theme="light"] .label-chip.removable {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .label-chip .chip-remove {
    color: var(--text-primary) !important;
}

[data-theme="light"] .label-chip .chip-remove:hover {
    background: rgba(59, 130, 246, 0.25);
}

/* Form Elements for Cool & Minimal Theme */
[data-theme="light"] .param-input,
[data-theme="light"] .node-select,
[data-theme="light"] .label-select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .param-input:focus,
[data-theme="light"] .node-select:focus,
[data-theme="light"] .label-select:focus {
    border-color: var(--accent-secondary);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .param-input option,
[data-theme="light"] .node-select option,
[data-theme="light"] .label-select option {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
}

/* Buttons for Cool & Minimal Theme */
[data-theme="light"] .refresh-btn,
[data-theme="light"] .upload-btn,
[data-theme="light"] .upload-btn-compact,
[data-theme="light"] .deploy-btn,
[data-theme="light"] .cap-call-btn,
[data-theme="light"] .clear-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
    backdrop-filter: blur(15px);
}

[data-theme="light"] .refresh-btn:hover,
[data-theme="light"] .upload-btn:hover,
[data-theme="light"] .upload-btn-compact:hover,
[data-theme="light"] .deploy-btn:hover,
[data-theme="light"] .cap-call-btn:hover,
[data-theme="light"] .clear-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.12);
    color: var(--text-primary);
}

/* Member Overlay Styling with Cool & Minimal */
[data-theme="light"] .member-overlay-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 20px 40px rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .member-overlay-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .member-overlay-header .member-info .member-hostname {
    color: var(--text-primary) !important;
    font-weight: 600;
}

[data-theme="light"] .member-overlay-header .member-info .member-ip {
    color: var(--text-tertiary) !important;
    font-weight: 500;
}

[data-theme="light"] .member-overlay-header .member-info .member-latency {
    color: var(--text-muted) !important;
}

[data-theme="light"] .member-overlay-header .member-info .member-status {
    color: var(--text-primary) !important;
}

[data-theme="light"] .member-overlay-header .member-info .member-labels .label-chip {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6 !important;
}

[data-theme="light"] .member-overlay-subtitle {
    color: var(--text-tertiary) !important;
}

[data-theme="light"] .member-overlay-close {
    color: var(--text-tertiary) !important;
}

[data-theme="light"] .member-overlay-close:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary) !important;
}

[data-theme="light"] .member-overlay-body .member-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

[data-theme="light"] .member-overlay-body .member-card .member-header {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .member-overlay-body .member-card .member-details {
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.06);
}

[data-theme="light"] .member-overlay-body .detail-section-title {
    color: var(--text-secondary) !important;
    font-weight: 600;
}

[data-theme="light"] .member-overlay-body .detail-row .detail-label {
    color: var(--text-tertiary) !important;
    font-weight: 500;
}

[data-theme="light"] .member-overlay-body .detail-row .detail-value {
    color: var(--text-primary) !important;
    font-weight: 500;
}

[data-theme="light"] .member-overlay-body .resources-title,
[data-theme="light"] .member-overlay-body .api-title {
    color: var(--text-tertiary) !important;
    font-weight: 500;
}

[data-theme="light"] .member-overlay-body .resource-chip {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .member-overlay-body .api-chip {
    background: rgba(5, 150, 105, 0.15);
    color: #059669 !important;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

/* Dark theme overlay improvements */
[data-theme="dark"] .member-overlay-content {
    background: linear-gradient(135deg, #1c2a38 0%, #283746 50%, #1a252f 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .member-overlay-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .member-overlay-header .member-info .member-hostname {
    color: #ffffff !important;
    font-weight: 600;
}

[data-theme="dark"] .member-overlay-header .member-info .member-ip {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
}

[data-theme="dark"] .member-overlay-header .member-info .member-latency {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .member-overlay-header .member-info .member-status {
    color: #ecf0f1 !important;
}

[data-theme="dark"] .member-overlay-header .member-info .member-labels .label-chip {
    background: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #dbeafe !important;
}

[data-theme="dark"] .member-overlay-subtitle {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .member-overlay-close {
    color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] .member-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .member-overlay-body .member-card .member-header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .member-overlay-body .member-card .member-details {
}

[data-theme="dark"] .member-overlay-body .detail-section-title {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
}

[data-theme="dark"] .member-overlay-body .detail-row .detail-label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
}

[data-theme="dark"] .member-overlay-body .detail-row .detail-value {
    color: #ecf0f1 !important;
    font-weight: 500;
}

[data-theme="dark"] .member-overlay-body .resources-title,
[data-theme="dark"] .member-overlay-body .api-title {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
}

[data-theme="dark"] .member-overlay-body .resource-chip {
    background: rgba(30, 58, 138, 0.35);
    color: #dbeafe !important;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .member-overlay-body .api-chip {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    [data-theme="light"] .main-navigation {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(30px);
    }
    
    [data-theme="light"] .view-content {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(25px);
    }
}

@media (max-width: 480px) {
    [data-theme="light"] .main-navigation {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(35px);
    }
}

/* Enhanced Mobile Responsive Adjustments for Light Theme */
@media (max-width: 768px) {
    [data-theme="light"] .main-navigation {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);
    }
    
    [data-theme="light"] .nav-tab {
        background: transparent;
        border: 1px solid transparent;
        backdrop-filter: none;
        color: var(--text-secondary);
        padding: 0.75rem 1rem;
    }
    
    [data-theme="light"] .nav-tab:hover {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid transparent;
        color: var(--text-primary);
    }
    
    [data-theme="light"] .nav-tab.active {
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid var(--accent-secondary);
        color: var(--text-primary);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    }
    
    [data-theme="light"] .cluster-status {
        background: linear-gradient(135deg, rgba(5, 150, 105, 0.18) 0%, rgba(5, 150, 105, 0.12) 100%);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(5, 150, 105, 0.3);
        box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
        color: #059669;
    }
    
    [data-theme="light"] .theme-switcher {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(148, 163, 184, 0.3);
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.1);
    }
    
    [data-theme="light"] .theme-switcher:hover {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(148, 163, 184, 0.4);
        box-shadow: 0 6px 20px rgba(148, 163, 184, 0.15);
    }
    
    [data-theme="light"] .view-content {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);

/* Enhanced Mobile Responsive Adjustments for Light Theme */
@media (max-width: 768px) {
    [data-theme="light"] .main-navigation {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);
    }
    
    [data-theme="light"] .nav-tab {
        background: transparent;
        border: 1px solid transparent;
        backdrop-filter: none;
        color: var(--text-secondary);
        padding: 0.75rem 1rem;
    }
    
    [data-theme="light"] .nav-tab:hover {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid transparent;
        color: var(--text-primary);
    }
    
    [data-theme="light"] .nav-tab.active {
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid var(--accent-secondary);
        color: var(--text-primary);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    }
    
    [data-theme="light"] .cluster-status {
        background: linear-gradient(135deg, rgba(5, 150, 105, 0.18) 0%, rgba(5, 150, 105, 0.12) 100%);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(5, 150, 105, 0.3);
        box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
        color: #059669;
    }
    
    [data-theme="light"] .theme-switcher {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(148, 163, 184, 0.3);
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.1);
    }
    
    [data-theme="light"] .theme-switcher:hover {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(148, 163, 184, 0.4);
        box-shadow: 0 6px 20px rgba(148, 163, 184, 0.15);
    }
    
    [data-theme="light"] .view-content {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);
    }
    
    [data-theme="light"] .cluster-section,
    [data-theme="light"] .firmware-section {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(148, 163, 184, 0.3);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15);
    }
}

@media (max-width: 480px) {
    [data-theme="light"] .main-navigation {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(35px);
        border: 1px solid rgba(148, 163, 184, 0.3);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15);
    }
    
    [data-theme="light"] .nav-tab {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    [data-theme="light"] .nav-tab.active {
        background: rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    }
    
    [data-theme="light"] .cluster-status {
        background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(5, 150, 105, 0.35);
        box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15);
    }
    
    [data-theme="light"] .theme-switcher {
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(148, 163, 184, 0.35);
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.12);
    }
    
    [data-theme="light"] .view-content {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(148, 163, 184, 0.3);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15);
    }
}

/* Mobile Navigation Expanded State - Light Theme */
@media (max-width: 768px) {
    [data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 50%, rgba(241, 245, 249, 0.95) 100%);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(148, 163, 184, 0.3);
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15);
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        background: transparent;
        border: 1px solid transparent;
        color: var(--text-secondary);
        backdrop-filter: none;
        margin-bottom: 0.25rem;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab:hover {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid transparent;
        color: var(--text-primary);
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid var(--accent-secondary);
        color: var(--text-primary);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    }
    
    [data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(148, 163, 184, 0.25);
        color: var(--text-secondary);
        backdrop-filter: blur(15px);
    }
    
    [data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(148, 163, 184, 0.35);
        color: var(--text-primary);
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.1);
    }
}

@media (max-width: 480px) {
    [data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 50%, rgba(241, 245, 249, 0.98) 100%);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(148, 163, 184, 0.35);
        box-shadow: 0 12px 40px rgba(148, 163, 184, 0.2);
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    }
    
    [data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(148, 163, 184, 0.3);
        backdrop-filter: blur(20px);
    }
    
    [data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(148, 163, 184, 0.4);
        box-shadow: 0 6px 20px rgba(148, 163, 184, 0.15);
    }
}

/* Mobile Navigation Expanded State - Light Theme (Higher Specificity) */
@media (max-width: 768px) {
    [data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 50%, rgba(241, 245, 249, 0.95) 100%) !important;
        backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(148, 163, 184, 0.3) !important;
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15) !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        background: transparent !important;
        border: 1px solid transparent !important;
        color: var(--text-secondary) !important;
        backdrop-filter: none !important;
        margin-bottom: 0.25rem !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid transparent !important;
        color: var(--text-primary) !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.25) !important;
        border: 1px solid var(--accent-secondary) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15) !important;
    }
    
    [data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(148, 163, 184, 0.25) !important;
        color: var(--text-secondary) !important;
        backdrop-filter: blur(15px) !important;
    }
    
    [data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(148, 163, 184, 0.35) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.1) !important;
    }
}

@media (max-width: 480px) {
    [data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 50%, rgba(241, 245, 249, 0.98) 100%) !important;
        backdrop-filter: blur(30px) !important;
        border: 1px solid rgba(148, 163, 184, 0.35) !important;
        box-shadow: 0 12px 40px rgba(148, 163, 184, 0.2) !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2) !important;
    }
    
    [data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(148, 163, 184, 0.3) !important;
        backdrop-filter: blur(20px) !important;
    }
    
    [data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.18) !important;
        border: 1px solid rgba(148, 163, 184, 0.4) !important;
        box-shadow: 0 6px 20px rgba(148, 163, 184, 0.15) !important;
    }
}

/* Overlay Dialog Light Theme Styles */
[data-theme="light"] .overlay-dialog-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 20px 40px rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .overlay-dialog-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .overlay-dialog-title {
    color: var(--text-primary) !important;
    font-weight: 600;
}

[data-theme="light"] .overlay-dialog-close {
    color: var(--text-tertiary) !important;
}

[data-theme="light"] .overlay-dialog-close:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary) !important;
}

[data-theme="light"] .overlay-dialog-message {
    color: var(--text-secondary) !important;
    white-space: normal;
}

[data-theme="light"] .overlay-dialog-btn-cancel {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(148, 163, 184, 0.05) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-secondary) !important;
}

[data-theme="light"] .overlay-dialog-btn-cancel:hover {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(148, 163, 184, 0.08) 100%);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-primary) !important;
}

[data-theme="light"] .overlay-dialog-btn-confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: 1px solid #3b82f6;
    color: white;
}

[data-theme="light"] .overlay-dialog-btn-confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Ultra-specific mobile navigation override for light theme */
@media (max-width: 768px) {
    html[data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 50%, rgba(241, 245, 249, 0.95) 100%) !important;
        backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(148, 163, 184, 0.3) !important;
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15) !important;
    }
    
    html[data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        background: transparent !important;
        border: 1px solid transparent !important;
        color: var(--text-secondary) !important;
        backdrop-filter: none !important;
        margin-bottom: 0.25rem !important;
    }
    
    html[data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid transparent !important;
        color: var(--text-primary) !important;
    }
    
    html[data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.25) !important;
        border: 1px solid var(--accent-secondary) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15) !important;
    }
    
    html[data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(148, 163, 184, 0.25) !important;
        color: var(--text-secondary) !important;
        backdrop-filter: blur(15px) !important;
    }
    
    html[data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(148, 163, 184, 0.35) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.1) !important;
    }
}

@media (max-width: 480px) {
    html[data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 50%, rgba(241, 245, 249, 0.98) 100%) !important;
        backdrop-filter: blur(30px) !important;
        border: 1px solid rgba(148, 163, 184, 0.35) !important;
        box-shadow: 0 12px 40px rgba(148, 163, 184, 0.2) !important;
    }
    
    html[data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    html[data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2) !important;
    }
    
    html[data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(148, 163, 184, 0.3) !important;
        backdrop-filter: blur(20px) !important;
    }
    
    html[data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.18) !important;
        border: 1px solid rgba(148, 163, 184, 0.4) !important;
        box-shadow: 0 6px 20px rgba(148, 163, 184, 0.15) !important;
    }
}

/* Mobile Navigation Override - Light Theme */
@media (max-width: 768px) {
    [data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 50%, rgba(241, 245, 249, 0.95) 100%) !important;
        backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(148, 163, 184, 0.3) !important;
        box-shadow: 0 8px 32px rgba(148, 163, 184, 0.15) !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        background: transparent !important;
        border: 1px solid transparent !important;
        color: var(--text-secondary) !important;
        backdrop-filter: none !important;
        margin-bottom: 0.25rem !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid transparent !important;
        color: var(--text-primary) !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.25) !important;
        border: 1px solid var(--accent-secondary) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15) !important;
    }
    
    [data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(148, 163, 184, 0.25) !important;
        color: var(--text-secondary) !important;
        backdrop-filter: blur(15px) !important;
    }
    
    [data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(148, 163, 184, 0.35) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 4px 16px rgba(148, 163, 184, 0.1) !important;
    }
}

@media (max-width: 480px) {
    [data-theme="light"] .main-navigation.mobile-open .nav-left {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 50%, rgba(241, 245, 249, 0.98) 100%) !important;
        backdrop-filter: blur(30px) !important;
        border: 1px solid rgba(148, 163, 184, 0.35) !important;
        box-shadow: 0 12px 40px rgba(148, 163, 184, 0.2) !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    [data-theme="light"] .main-navigation.mobile-open .nav-left .nav-tab.active {
        background: rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2) !important;
    }
    
    [data-theme="light"] .burger-btn {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(148, 163, 184, 0.3) !important;
        backdrop-filter: blur(20px) !important;
    }
    
    [data-theme="light"] .burger-btn:hover {
        background: rgba(255, 255, 255, 0.18) !important;
        border: 1px solid rgba(148, 163, 184, 0.4) !important;
        box-shadow: 0 6px 20px rgba(148, 163, 184, 0.15) !important;
    }
}

/* Overlay Dialog Light Theme Styles */
[data-theme="light"] .overlay-dialog-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 20px 40px rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .overlay-dialog-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .overlay-dialog-title {
    color: var(--text-primary) !important;
    font-weight: 600;
}

[data-theme="light"] .overlay-dialog-close {
    color: var(--text-tertiary) !important;
}

[data-theme="light"] .overlay-dialog-close:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary) !important;
}

[data-theme="light"] .overlay-dialog-message {
    color: var(--text-secondary) !important;
    white-space: normal;
}

[data-theme="light"] .overlay-dialog-btn-cancel {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(148, 163, 184, 0.05) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-secondary) !important;
}

[data-theme="light"] .overlay-dialog-btn-cancel:hover {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(148, 163, 184, 0.08) 100%);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-primary) !important;
}

[data-theme="light"] .overlay-dialog-btn-confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: 1px solid #3b82f6;
    color: white;
}

[data-theme="light"] .overlay-dialog-btn-confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
