/* Slight rotation for the Topology icon in the main navigation only */
.main-navigation .nav-left .nav-tab[data-view="topology"] > svg {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   STANDARDIZED BUTTON AND INPUT STYLES
   ========================================
   Explicit button classes for better maintainability.
   Apply .btn class to buttons that need standard styling.
*/

/* === Standard Button Style === */
.btn,
.refresh-btn,
.config-btn,
.deploy-btn,
.upload-btn,
.upload-btn-compact,
.save-labels-btn,
.add-label-btn,
.add-btn,
.clear-filters-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    height: fit-content;
    min-height: 2rem;
}

.btn:hover:not(:disabled),
.refresh-btn:hover:not(:disabled),
.config-btn:hover:not(:disabled),
.deploy-btn:hover:not(:disabled),
.upload-btn:hover:not(:disabled),
.upload-btn-compact:hover:not(:disabled),
.save-labels-btn:hover:not(:disabled),
.add-label-btn:hover:not(:disabled),
.add-btn:hover:not(:disabled),
.clear-filters-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

.btn:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Icon-Only Button Style (Minimal) === */
.btn-icon,
.theme-toggle,
.burger-btn,
.primary-node-refresh,
.filter-pill-remove,
.chip-remove,
.remove-label-btn,
.tab-close-btn,
.member-terminal-btn,
.tab-refresh-btn,
.drawer-terminal-btn,
.drawer-close,
.terminal-close-btn,
.terminal-minimize-btn,
.member-overlay-close,
.overlay-dialog-close {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.btn-icon:hover,
.theme-toggle:hover,
.burger-btn:hover,
.primary-node-refresh:hover,
.filter-pill-remove:hover,
.chip-remove:hover,
.remove-label-btn:hover,
.tab-close-btn:hover,
.member-terminal-btn:hover,
.tab-refresh-btn:hover,
.drawer-terminal-btn:hover,
.drawer-close:hover,
.terminal-close-btn:hover,
.terminal-minimize-btn:hover,
.member-overlay-close:hover,
.overlay-dialog-close:hover {
    opacity: 1;
}

/* === Navigation Button Style (No background/border) === */
.nav-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

/* === Base Form Input Style (Compact) === */
.form-input,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    min-height: 2rem;
}

.form-input:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

/* === SVG icon alignment and sizing tweaks === */
/* Align inline SVGs vertically with adjacent text */
.nav-tab > svg,
.theme-toggle > svg,
.burger-btn > svg,
h2 > svg,
h3 > svg,
.stat-icon > svg,
.resource-label > svg,
.flash-label > svg,
.uptime-label > svg,
.latency-label > svg,
.member-status > svg,
.tab-refresh-btn > svg,
.primary-node-info svg,
.upload-btn-compact > svg,
.deploy-btn > svg,
.upload-btn > svg,
.terminal-actions svg,
.terminal-dock-icon > svg {
    vertical-align: middle;
}

/* Navigation icons slightly larger for readability */
.nav-tab > svg {
    width: 18px;
    height: 18px;
}

/* Monitoring view: slightly larger summary stat icons */
.summary-stats .stat-icon > svg {
    width: 22px;
    height: 22px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    height: 100vh;  /* Fixed height instead of min-height */
    padding: 1rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;  /* Keep this to prevent body scrolling */
}

.container {
    max-width: none;  /* Remove width constraint for full screen coverage */
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 2rem;  /* Increase horizontal padding for better spacing */
    max-height: calc(100vh - 2rem);  /* Constrain to viewport height minus body padding */
    overflow: hidden;  /* Keep this to maintain layout constraints */
}

/* Header styles removed - integrated into navigation */

p {
    font-size: 1.2rem;
    opacity: 1;
    margin-bottom: 2rem;
}

.cluster-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-primary);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.cluster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cluster-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-node-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
}

.primary-node-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.primary-node-ip {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 0.25rem 0.5rem;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.primary-node-ip.discovering {
    color: var(--accent-warning);
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.primary-node-ip.error {
    color: var(--accent-error);
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
    margin: 0;
    padding: 0.25rem 0.5rem;
}

.primary-node-ip.selecting {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

.primary-node-refresh {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-node-refresh:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
}

/* Cluster Filters */
.cluster-filters {
    display: flex;
    align-items: center;
}

.filter-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    min-height: 1.5rem;
    margin: 0 0.5rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    background: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #dbeafe;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background: rgba(30, 58, 138, 0.45);
    border-color: rgba(59, 130, 246, 0.5);
}

.filter-pill-text {
    white-space: nowrap;
}

.filter-pill-remove {
    background: none;
    border: none;
    color: #dbeafe;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-pill-remove:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.filter-pill-remove svg {
    width: 10px;
    height: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-select {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.3rem 2rem 0.3rem 0.75rem !important;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
}

.filter-select:hover {
    background-color: rgba(255, 255, 255, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.2);
}

.filter-select option {
    background: #1a202c;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
}

.filter-select option:hover {
    background: #2d3748;
}

.filter-select option:checked {
    background: #667eea;
    color: var(--text-primary);
    font-weight: 600;
}

/* Clear-filters-btn styling moved to standard button section */
/* Hide clear filters button when disabled (no filters active) */
.clear-filters-btn:disabled {
    display: none;
}

.primary-node-refresh:active {
    transform: scale(0.95);
}

.firmware-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Harmonized toolbar buttons - all inherit from base with consistent styling */
.refresh-btn,
.config-btn,
.deploy-btn,
.add-btn,
.upload-btn-compact,
.clear-filters-btn {
    backdrop-filter: var(--backdrop-blur);
}

.refresh-btn:hover,
.config-btn:hover,
.deploy-btn:hover:not(:disabled),
.add-btn:hover:not(:disabled),
.upload-btn-compact:hover:not(:disabled),
.clear-filters-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.refresh-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

.refresh-icon.spinning {
    animation: spin 1s linear infinite;
}

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

.config-btn.loading,
.deploy-btn.loading {
    opacity: 0.8;
}

/* WiFi Configuration Styles */
.wifi-config-drawer {
    padding: 0;
}

.wifi-config-section {
    padding: 1rem;
}

.wifi-config-section h3 {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.wifi-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.wifi-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 1.5rem 0;
    opacity: 0.6;
}

.affected-nodes-info {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

.nodes-count {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.nodes-count span {
    color: var(--text-primary);
    font-weight: 600;
}

.wifi-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* WiFi actions buttons use deploy-btn styling (green) */
.wifi-actions .config-btn {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2) 0%, rgba(74, 222, 128, 0.1) 100%);
    border-color: rgba(74, 222, 128, 0.3);
    color: var(--accent-primary);
}

.wifi-actions .config-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.3) 0%, rgba(74, 222, 128, 0.15) 100%);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.2);
}

/* Firmware Form Styles - inherits from base form input styles */
.firmware-form {
    margin-bottom: 2rem;
}

.firmware-form .form-group {
    margin-bottom: 1rem;
}

.firmware-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.firmware-form .form-group input {
    width: 100%;
}

.firmware-form .form-group input[readonly] {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
    border-color: var(--border-primary);
}

.firmware-form .form-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 0.25rem;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-input-label:hover {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.labels-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-label-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Label inputs inherit from base form-input styles */
.label-key-input,
.label-value-input {
    flex: 1;
}

.label-separator {
    color: var(--text-secondary);
    font-weight: 600;
}

/* General labels container - flex layout for chips */
.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Firmware form labels container - block layout for full-width items */
.firmware-form .labels-container {
    display: block;
}

/* Firmware form label items - match node details drawer styling */
.firmware-form .label-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.firmware-form .label-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.firmware-form .label-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.firmware-form .label-key {
    font-weight: 600;
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.firmware-form .label-separator {
    color: var(--text-tertiary);
    font-weight: 500;
}

.firmware-form .label-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.firmware-form .label-remove-btn,
.firmware-form .remove-label-btn {
    background: transparent;
    border: 1px solid var(--border-secondary);
    color: var(--text-tertiary);
    border-radius: 6px;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.firmware-form .label-remove-btn:hover,
.firmware-form .remove-label-btn:hover {
    background: var(--accent-error);
    border-color: var(--accent-error);
    color: white;
}

.firmware-form .label-remove-btn svg,
.firmware-form .remove-label-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
}

.firmware-form .firmware-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
}

/* Firmware actions buttons inherit from base with slight customizations */
.firmware-actions .config-btn {
    backdrop-filter: var(--backdrop-blur);
}

.firmware-actions .config-btn:hover {
    transform: translateY(-1px);
}

.firmware-actions .config-btn:disabled {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    border-color: var(--border-primary);
}

/* Results Section */
.results-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.results-section h3 {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.result-item.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.result-item.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.result-node {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-node .node-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.result-node .node-ip {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.result-status .status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.result-status .status-indicator.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.result-status .status-indicator.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.result-error {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    color: #ef4444;
    font-size: 0.8rem;
    font-family: monospace;
}

/* Cluster Header Right */
.cluster-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .members-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.member-card {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	border-radius: 10px;
	padding: 1rem;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
	position: relative;
	margin-bottom: 0.5rem;
	opacity: 1;
	z-index: 1;
	-webkit-tap-highlight-color: transparent;
}

/* Labels */
.member-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    background: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #dbeafe;
    white-space: nowrap;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-hover);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.member-card:hover::before {
    opacity: 1;
}

.member-card:hover {
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
	z-index: 2;
}

/* Disable hover effects on touch devices to prevent flicker */
@media (hover: none) {
	.member-card:hover::before {
		opacity: 0 !important;
	}
	.member-card:hover {
		box-shadow: none !important;
		z-index: 1 !important;
	}
}

.member-card.expanded {
	border-color: rgba(255, 255, 255, 0.2);
	box-shadow: var(--shadow-hover);
	z-index: 5;
    overflow: visible;  /* Allow content to expand */
}

.expand-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.2);
}

.member-card.expanded .expand-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-secondary);
}

.member-card.expanded .expand-icon svg {
    transform: rotate(180deg);
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.member-info {
    flex: 1;
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.member-terminal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.member-terminal-btn:hover,
.member-terminal-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.2);
}

.member-terminal-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.expand-icon {
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
    padding: 0.2rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-details {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
	opacity: 0;
}

.member-card.expanded .member-details {
	max-height: none; /* Remove fixed limit to allow dynamic height */
	opacity: 1;
	overflow: visible;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.detail-label {
    opacity: 1;
    font-weight: 500;
}

.detail-value {
    font-family: 'Courier New', monospace;
    opacity: 1;
}

/* Monitoring Section Styles */
.monitoring-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.monitoring-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Resource Gauges Styles */
.resource-gauges {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 130px;
    min-width: 80px;
    box-sizing: border-box;
}

.gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 0.3rem;
}

/* Mobile responsive gauges */
@media (max-width: 768px) {
    .resource-gauges {
        justify-content: center;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .gauge-container {
        flex: 0 0 auto;
        max-width: 90px;
        min-width: 70px;
    }
    
    .gauge {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .resource-gauges {
        justify-content: center;
        gap: 0.75rem;
        padding: 0.5rem;
    }
    
    .gauge-container {
        flex: 0 0 calc(50% - 0.375rem);
        max-width: calc(50% - 0.375rem);
        min-width: 0;
    }
    
    .gauge {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 360px) {
    .resource-gauges {
        justify-content: center;
        gap: 0.5rem;
        padding: 0.25rem;
    }
    
    .gauge-container {
        flex: 0 0 calc(50% - 0.25rem);
        max-width: calc(50% - 0.25rem);
        min-width: 0;
    }
    
    .gauge {
        width: 80px;
        height: 80px;
        max-width: 100%;
        max-height: 100%;
    }
}

.gauge-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    padding: 6px;
}

.gauge-circle::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    background: var(--bg-primary);
    z-index: 1;
}

.gauge-circle::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    background: conic-gradient(
        from -90deg,
        transparent 0deg,
        transparent calc(var(--percentage) * 3.6deg),
        var(--bg-primary) calc(var(--percentage) * 3.6deg),
        var(--bg-primary) 360deg
    );
    z-index: 2;
}

.gauge-text {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--text-primary);
}

.gauge-value {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0.1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gauge-label {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.1rem;
}

.gauge-detail {
    font-size: 0.65rem;
    opacity: 0.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

/* Responsive gauge text sizes */
@media (max-width: 768px) {
    .gauge-value {
        font-size: 1rem;
    }
    
    .gauge-label {
        font-size: 0.7rem;
    }
    
    .gauge-detail {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .gauge-value {
        font-size: 0.9rem;
    }
    
    .gauge-label {
        font-size: 0.65rem;
    }
    
    .gauge-detail {
        font-size: 0.55rem;
    }
}

@media (max-width: 360px) {
    .gauge-value {
        font-size: 0.8rem;
    }
    
    .gauge-label {
        font-size: 0.6rem;
    }
    
    .gauge-detail {
        font-size: 0.5rem;
    }
}

/* Dynamic gauge colors based on percentage */
.gauge-empty .gauge-circle {
    background: rgba(255, 255, 255, 0.1);
}

.gauge-green .gauge-circle {
    background: conic-gradient(
        from -90deg,
        var(--accent-success) 0deg,
        var(--accent-success) calc(var(--percentage) * 3.6deg),
        rgba(255, 255, 255, 0.1) calc(var(--percentage) * 3.6deg),
        rgba(255, 255, 255, 0.1) 360deg
    );
}

.gauge-yellow .gauge-circle {
    background: conic-gradient(
        from -90deg,
        var(--accent-warning) 0deg,
        var(--accent-warning) calc(var(--percentage) * 3.6deg),
        rgba(255, 255, 255, 0.1) calc(var(--percentage) * 3.6deg),
        rgba(255, 255, 255, 0.1) 360deg
    );
}

.gauge-red .gauge-circle {
    background: conic-gradient(
        from -90deg,
        var(--accent-error) 0deg,
        var(--accent-error) calc(var(--percentage) * 3.6deg),
        rgba(255, 255, 255, 0.1) calc(var(--percentage) * 3.6deg),
        rgba(255, 255, 255, 0.1) 360deg
    );
}

/* Gauge value color based on usage level */
.gauge[data-percentage] .gauge-value {
    color: var(--text-primary);
}

/* Hover effects */
.gauge:hover .gauge-circle {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gauge:hover .gauge-value {
    color: var(--accent-primary);
}

.api-endpoints {
    margin-top: 1rem;
}

.api-endpoints h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 1;
}

.endpoint-item {
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
}

.endpoint-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.loading-details {
    text-align: center;
    padding: 1rem;
    opacity: 1;
    font-size: 0.9rem;
}

/* Compact member card layout */
.member-row-1 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.status-hostname-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.member-row-2 {
    margin-top: 0.5rem;
}

.member-hostname {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.member-ip {
    font-size: 0.85rem;
    opacity: 1;
    flex-shrink: 0;
}

.member-status,
.node-status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border-radius: 50%;
    font-size: 0; /* prevent line-height affecting size */
    flex-shrink: 0;
}

.status-online {
    background: rgba(76, 175, 80, 0.3);
    color: var(--accent-success);
    border: 1px solid rgba(76, 175, 80, 0.5);
    border-radius: 50%;
}

.status-offline {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.5);
    border-radius: 50%;
}

.status-inactive {
    background: rgba(255, 152, 0, 0.3);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.5);
    border-radius: 50%;
}

/* Ensure the inner dot SVG fits nicely */
.member-status > svg,
.node-status-indicator > svg {
    width: 8px;
    height: 8px;
    display: block;
}

.member-latency {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
}

.latency-label {
    color: var(--text-tertiary);
    font-weight: 500;
}

.latency-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tab Styles */
.tabs-container {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.5rem;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.tab-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-bottom: none;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Task Styles */
.task-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

/* Modern Tasks Summary Styles */
.tasks-summary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--shadow-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tasks-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.tasks-summary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.tasks-summary-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.tasks-summary-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
    min-width: 80px;
}

.summary-stat:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.summary-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.summary-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat.total .summary-stat-value {
    color: var(--accent-primary);
}

.summary-stat.active .summary-stat-value {
    color: var(--accent-primary);
}

.summary-stat.stopped .summary-stat-value {
    color: var(--accent-error);
}

.summary-stat.disabled .summary-stat-value {
    color: var(--accent-warning);
}

.summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
    margin-right: 1rem;
    font-size: 1.5rem;
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.summary-subtitle {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Responsive design for tasks summary */
@media (max-width: 768px) {
    .tasks-summary {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
        text-align: center;
    }
    
    .tasks-summary-left {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
    }
    
    .tasks-summary-right {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .summary-stat {
        min-width: 60px;
        padding: 0.4rem 0.6rem;
        flex: 0 0 auto;
    }
    
    .summary-stat-value {
        font-size: 1.1rem;
    }
    
    .summary-stat-label {
        font-size: 0.65rem;
    }
    
    .summary-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        margin-right: 0.5rem;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .tasks-summary {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .tasks-summary-left,
    .tasks-summary-right {
        gap: 0.25rem;
    }
    
    .summary-stat {
        min-width: 50px;
        padding: 0.3rem 0.4rem;
        flex: 0 0 auto;
    }
    
    .summary-stat-value {
        font-size: 1rem;
    }
    
    .summary-stat-label {
        font-size: 0.6rem;
    }
    
    .summary-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.25rem;
    }
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-name {
    font-weight: 600;
    color: var(--text-primary);
}

.task-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.task-status.running {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.task-status.stopped {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.task-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    opacity: 1;
}

.task-interval, .task-enabled {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Firmware Upload Styles */
.firmware-upload h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.upload-area {
    text-align: center;
    padding: 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: var(--bg-tertiary);
}

/* Upload button inherits from base button styles */
.upload-btn {
    backdrop-filter: var(--backdrop-blur);
    margin-bottom: 1rem;
}

.upload-btn:hover {
    transform: translateY(-1px);
}

.upload-info {
    font-size: 0.9rem;
    opacity: 1;
    color: var(--text-secondary);
}

/* Upload Status Styles */
#upload-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.upload-progress {
    text-align: center;
    color: #ffa726;
}

.upload-success {
    text-align: center;
    color: var(--accent-success);
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
}

.upload-error {
    text-align: center;
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
}

.upload-btn:disabled {
    transform: none !important;
}

.no-tasks {
    text-align: center;
    padding: 2rem;
    opacity: 1;
}

.loading-tasks {
    text-align: center;
    padding: 1rem;
    opacity: 1;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 2rem;
    opacity: 1;
}

.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ffcdd2;
    /*padding: 1rem;*/
    border-radius: 8px;
    margin-top: 1rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    opacity: 1;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Main Navigation Styles */
.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 0.5rem;
    border: 1px solid var(--border-primary);
    backdrop-filter: var(--backdrop-blur);
}

.nav-left {
    display: flex;
    gap: 0.25rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Navigation tabs use base nav-tab style defined at top of file */

/* Cluster Status */
.cluster-status {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.15) 0%, rgba(0, 255, 0, 0.08) 100%);
    border: 1px solid rgba(0, 255, 0, 0.25);
    color: #00ff88;
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.1);
    transition: all 0.3s ease;
}

/* Compact Cluster Status Layout */
.cluster-status-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.cluster-status-compact .websocket-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cluster Status States */
.cluster-status-online {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.15) 0%, rgba(0, 255, 0, 0.08) 100%);
    border: 1px solid rgba(0, 255, 0, 0.25);
    color: #00ff88;
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.1);
}

.cluster-status-offline {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.15) 0%, rgba(255, 0, 0, 0.08) 100%);
    border: 1px solid rgba(255, 0, 0, 0.25);
    color: #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.1);
}

.cluster-status-connecting {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.08) 100%);
    border: 1px solid rgba(255, 193, 7, 0.25);
    color: #ffd54f;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.1);
}

.cluster-status-discovering {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0.08) 100%);
    border: 1px solid rgba(33, 150, 243, 0.25);
    color: #64b5f6;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.cluster-status-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.08) 100%);
    border: 1px solid rgba(244, 67, 54, 0.25);
    color: #ff8a80;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.1);
}

/* View Content Styles */
.view-content {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    overflow-y: auto;  /* Allow vertical scrolling on content */
    max-height: 100%;  /* Allow content to use available height */
    flex: 1;  /* Take up available space */
    flex-direction: column;  /* Stack content vertically */
}

.view-content.active {
    display: flex;
    opacity: 1;
}

/* Special handling for cluster and firmware views to ensure proper width */
#cluster-view.active, #firmware-view.active, #monitoring-view.active {
    display: flex;  /* Use flex display for proper layout */
    flex-direction: column;  /* Stack content vertically */
    overflow-y: auto;  /* Allow vertical scrolling */
}

/* Firmware Section Styles */
.firmware-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-primary);
    padding: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: visible;  /* Allow content to expand and scroll */
}

/* Firmware Header */
.firmware-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-secondary);
    gap: 1rem;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.registry-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.connected {
    color: #4ade80;
}

.status-indicator.disconnected {
    color: #f87171;
}

/* Add-btn styling moved to standard button section */

/* Firmware Content */
.firmware-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.firmware-search {
    display: flex;
    justify-content: flex-start;
    flex: 1;
    max-width: 400px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

#firmware-search {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

#firmware-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.firmware-list-container {
    min-height: 200px;
}

/* Firmware Groups */
.firmware-groups {
    display: flex;
    flex-direction: column;
}

.firmware-group {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    position: relative;
    margin-bottom: 0.5rem;
    opacity: 1;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.firmware-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-hover);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.firmware-group:hover::before {
    opacity: 1;
}

.firmware-group:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.firmware-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    user-select: none;
}

.firmware-group.expanded .firmware-group-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

.firmware-group-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.firmware-group-name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.firmware-group-count {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.firmware-group-chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.firmware-group.expanded .firmware-group-chevron {
    transform: rotate(180deg);
}

.firmware-versions {
    display: none;
    flex-direction: column;
}

.firmware-group.expanded .firmware-versions {
    display: flex;
}

.firmware-version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    position: relative;
    margin-bottom: 0.5rem;
    opacity: 1;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.firmware-version-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-hover);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.firmware-version-item.clickable {
    cursor: pointer;
}

.firmware-version-item:hover::before {
    opacity: 1;
}

.firmware-version-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.firmware-version-item.clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Disable hover effects on touch devices to prevent flicker */
@media (hover: none) {
    .firmware-group:hover::before {
        opacity: 0 !important;
    }
    .firmware-group:hover {
        box-shadow: none !important;
        z-index: 1 !important;
    }
    .firmware-version-item:hover::before {
        opacity: 0 !important;
    }
    .firmware-version-item:hover {
        box-shadow: none !important;
        z-index: 1 !important;
    }
    .firmware-version-item.clickable:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

.firmware-version-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.firmware-version-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.firmware-version-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 80px;
}

.firmware-version-info .firmware-size {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 60px;
}

.firmware-version-labels {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.firmware-version-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 1rem;
}

/* Firmware List */
.firmware-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.firmware-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.firmware-list-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.firmware-item-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.firmware-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.firmware-item-info .firmware-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

.firmware-item-info .firmware-version {
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 60px;
}

.firmware-item-info .firmware-size {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    min-width: 60px;
}

.firmware-item-labels {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.firmware-item-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 1rem;
}

.firmware-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.firmware-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.firmware-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.firmware-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.firmware-version {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.firmware-actions {
    display: flex;
    gap: 0.25rem;
}

/* Firmware action buttons - harmonized to match rollout button */
.action-btn,
.edit-btn,
.download-btn,
.delete-btn,
.rollout-btn {
    background: transparent;
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
}

.action-btn:hover,
.edit-btn:hover,
.download-btn:hover,
.delete-btn:hover,
.rollout-btn:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.action-btn:active,
.edit-btn:active,
.download-btn:active,
.delete-btn:active,
.rollout-btn:active {
    transform: translateY(0);
}

.firmware-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.firmware-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
}

.firmware-labels {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.labels-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.label-chip {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-description {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-secondary);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Notifications */
.form-notification {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.notification-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.notification-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Global Notifications */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.notification-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.notification-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Overlay Dialog */
.overlay-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-primary);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.dialog-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
}

.dialog-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dialog-body {
    padding: 1.5rem;
}

.dialog-body p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.dialog-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.firmware-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Firmware header styles moved to general header section above */

/* Firmware Actions */
.firmware-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.action-group {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.action-group:hover {
    background: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.action-group h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Compact Firmware Upload Interface */
.firmware-upload-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compact-upload-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.compact-upload-row::before {
    content: none;
}

.compact-upload-row:hover::before {
    opacity: 0;
}

.compact-upload-row:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transform: none;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    margin-top: 0.25rem;
}

/* Upload button compact - inherits from standard button section */
.upload-btn-compact {
    white-space: nowrap;
}

.file-info {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-style: italic;
    transition: all 0.2s ease;
    padding: 0.75rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-info:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.file-info.has-file {
    color: var(--accent-primary);
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.2);
    font-weight: 500;
    font-style: normal;
}

.file-info.has-file:hover {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.2);
}

.target-options {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: center;
    min-height: 36px;
}

.target-option {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.target-option:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.target-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    background: var(--bg-tertiary);
}

.target-option input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background: #667eea;
    box-shadow: none;
    transform: none;
}

.target-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
}

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

.target-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.node-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 120px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.node-select:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.node-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: var(--bg-secondary);
}

/* Style the dropdown options */
.node-select option {
    background: #1a202c;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
}

.node-select option:hover {
    background: #2d3748;
}

.node-select option:checked {
    background: #667eea;
    color: var(--text-primary);
    font-weight: 600;
}

/* Ensure the select field text is always visible */
.node-select:invalid {
    color: var(--text-secondary);
}

.node-select:valid {
    color: var(--text-primary);
}

/* Style for no-nodes message */
.no-nodes-message {
    color: #fbbf24 !important;
    font-size: 0.8rem !important;
    margin-top: 0.25rem !important;
    font-style: italic !important;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(251, 191, 36, 0.3);
    transition: all 0.2s ease;
}

.no-nodes-message:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Deploy button styling moved to harmonized toolbar buttons section at top of file */

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .firmware-actions {
        gap: 0.75rem;
    }
    
    .action-group {
        padding: 0.75rem;
    }
    
    .compact-upload-row {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .file-upload-area {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .file-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .upload-btn-compact {
        width: 100%;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .target-options {
        justify-content: flex-start;
        gap: 0.75rem;
        flex-wrap: wrap;
        align-items: center;
        min-height: 40px;
    }
    
    .target-option {
        padding: 0.2rem 0.4rem;
        border-radius: 6px;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }
    
    .target-label {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .specific-node-option {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .specific-node-option .node-select {
        margin-left: 0;
        min-width: auto;
        width: auto;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: 120px;
        max-width: 200px;
    }
    
    .deploy-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
    }
    
    .file-info {
        text-align: center;
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .radio-custom {
        width: 16px;
        height: 16px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .action-group {
        padding: 0.5rem;
    }
    
    .compact-upload-row {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .upload-btn-compact {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .deploy-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .file-info {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    .target-label {
        font-size: 0.8rem;
    }
    
    .radio-custom {
        width: 14px;
        height: 14px;
    }
    
    .node-select {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .target-options {
        gap: 0.75rem;
    }
    
    .target-option {
        padding: 0.2rem 0.4rem;
    }
} 

/* Firmware upload progress and results styling */
.firmware-upload-progress,
.firmware-upload-results {
    background: var(--bg-tertiary);
    border-radius: 16px;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--shadow-primary);
    border: 1px solid var(--border-primary);
    padding: 1.5rem;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.firmware-upload-progress:hover,
.firmware-upload-results:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.progress-header,
.results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-header h3,
.results-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.progress-header {
    position: relative;
}

.progress-refresh-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--backdrop-blur);
}

.progress-refresh-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.progress-refresh-btn:active {
    transform: translateY(0);
}

.progress-info,
.results-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.progress-info span,
.results-summary span {
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
}

.progress-info span:hover,
.results-summary span:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.overall-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #fbbf24;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.progress-summary {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
}

.progress-summary:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.progress-summary span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.success-count {
    color: #4ade80 !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
}

.failure-count {
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
}

.total-count {
    color: #60a5fa !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
}

.progress-list,
.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-item,
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.progress-item::before,
.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-hover);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.progress-item:hover::before,
.result-item:hover::before {
    opacity: 1;
}

.progress-item:hover,
.result-item:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.progress-node-info,
.result-node-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.node-name {
    font-weight: 600;
    color: var(--text-primary);
}

.node-ip {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.progress-status,
.result-status {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: center;
}

.progress-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    min-width: 120px;
    text-align: right;
}

.progress-status.success,
.result-status.success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.progress-status.error,
.result-status.error {
    background: rgba(248, 113, 113, 0.1);
    color: var(--accent-error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.progress-status.uploading {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.result-details {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    max-width: 300px;
    text-align: right;
}

.results-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.clear-btn,
/* Refresh button styling moved to harmonized toolbar buttons section at top of file */

.clear-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.clear-btn:active {
    transform: translateY(0);
}

/* Responsive design for progress and results */
@media (max-width: 768px) {
    .progress-item,
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .progress-status,
    .result-status {
        align-self: flex-end;
    }
    
    .result-details {
        text-align: left;
        max-width: none;
    }
    
    .progress-info,
    .results-summary {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-actions {
        flex-direction: column;
    }
} 

/* Loading and state transitions */
.loading, .error, .empty-state {
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

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

/* Smooth expand/collapse animations */
.member-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 0;
}

.member-card.expanded .member-details {
    opacity: 1;
}

/* Expand icon rotation */
.expand-icon svg {
    transition: transform 0.2s ease-in-out;
}

.member-card.expanded .expand-icon svg {
    transform: rotate(180deg);
}

/* Navigation tab transitions */
/* Navigation tabs use base nav-tab style defined at top of file */ 

.specific-node-option {
    gap: 0.5rem;
    align-items: center;
}

.specific-node-option .node-select {
    margin-left: 0.5rem;
    display: none;
}


/* Capabilities Styles */
.endpoints-list {
	margin-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Custom dropdown wrapper and arrow for endpoint selector */
.endpoint-selector {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

#endpoint-select {
	padding-right: 2rem;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ecf0f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	background-size: 12px 12px;
}

.endpoint-item {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	padding: 0.75rem;
}

.endpoint-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.endpoint-method {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	border: 1px solid var(--border-hover);
	background: rgba(255, 255, 255, 0.08);
	color: var(--text-secondary);
}

.endpoint-uri {
	font-family: 'Courier New', monospace;
	font-size: 0.85rem;
	opacity: 1;
	flex: 1;
}

.endpoint-call-btn {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
	border: 1px solid var(--border-secondary);
	color: var(--text-secondary);
	padding: 0.4rem 0.8rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 500;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: var(--backdrop-blur);
}

.endpoint-call-btn:hover {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
	border-color: rgba(255, 255, 255, 0.25);
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.endpoint-form {
	gap: 0.5rem 0.75rem;
	margin-top: 0.5rem;
}

.endpoint-param {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	background: var(--bg-hover);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	padding: 0.5rem;
}

.param-name {
	font-size: 0.8rem;
	color: var(--text-secondary);
	font-weight: 500;
}

/* Adjust param-input to support <select> as well */
.param-input {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--border-primary);
	color: var(--text-primary);
	padding: 0.45rem 0.6rem;
	border-radius: 6px;
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
	font-size: 0.9rem;
	appearance: none;
}

/* Add dropdown arrow for select elements in param-input */
.param-input[type="select"],
select.param-input {
	padding-right: 2rem;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ecf0f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	background-size: 12px 12px;
}

.param-input option {
	background: #1f2937;
	color: var(--text-primary);
}

.param-input:focus {
	border-color: rgba(139, 92, 246, 0.5);
	background: rgba(139, 92, 246, 0.08);
	box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

/* Ensure arrow stays visible on focus for select elements */
.param-input[type="select"]:focus,
select.param-input:focus {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ecf0f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	background-size: 12px 12px;
}

/* Boolean checkbox styling */
.boolean-input-container {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.param-input.boolean-checkbox {
	width: auto;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 1px solid var(--border-primary);
	border-radius: 4px;
	width: 16px;
	height: 16px;
	appearance: none;
	cursor: pointer;
	position: relative;
	transition: all 0.2s ease;
}

.param-input.boolean-checkbox:checked {
	background: var(--accent-primary);
	border-color: var(--accent-primary);
}

.param-input.boolean-checkbox:checked::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 10px;
	font-weight: bold;
}

.param-input.boolean-checkbox:focus {
	border-color: rgba(139, 92, 246, 0.5);
	box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.boolean-label {
	font-size: 0.9rem;
	color: var(--text-primary);
	cursor: pointer;
	user-select: none;
}

.endpoint-params.none {
	opacity: 1;
	font-size: 0.85rem;
	padding: 0.25rem 0.25rem 0 0.25rem;
}

.endpoint-result {
	margin-top: 0.5rem;
	border-radius: 8px;
	border: 1px solid var(--border-primary);
	background: var(--bg-tertiary);
	padding: 0.75rem;
}

.endpoint-call-success {
	color: var(--accent-success);
	background: rgba(76, 175, 80, 0.1);
	border: 1px solid rgba(76, 175, 80, 0.2);
	padding: 0.5rem;
	border-radius: 6px;
}

.endpoint-call-error {
	color: #f44336;
	background: rgba(244, 67, 54, 0.1);
	border: 1px solid rgba(244, 67, 54, 0.2);
	padding: 0.5rem;
	border-radius: 6px;
}

.endpoint-result-pre {
	margin-top: 0.5rem;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: 'Courier New', monospace;
	font-size: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 0.5rem;
	border-radius: 6px;
} 

/* Modernized Tab Styles (overrides) */
.tabs-container {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	padding: 0.75rem;
}

.tabs-header {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: var(--backdrop-blur);
	border-bottom: none;
}

/* Refresh button aligned to the right of tabs, blends with tab header */
.tabs-header .tab-refresh-btn {
	margin-left: auto;
	background: transparent;
	border: 1px solid transparent;
	color: var(--text-secondary);
	padding: 0.4rem;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.tabs-header .tab-refresh-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.12);
	color: var(--text-primary);
}
.tabs-header .tab-refresh-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.tab-button {
	background: transparent;
	border: 1px solid transparent;
	color: rgba(255, 255, 255, 0.75);
	padding: 0.5rem 1rem;
	border-radius: 10px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.2px;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
	position: relative;
}

.tab-button:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.95);
	transform: translateY(-1px);
}

.tab-button.active {
	background: rgba(255, 255, 255, 0.16);
	color: var(--text-primary);
	border-color: rgba(255, 255, 255, 0.24);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Animated underline indicator */
.tab-button::after {
	content: '';
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: -6px;
	height: 3px;
	border-radius: 2px;
	background: linear-gradient(90deg, #8b5cf6, #60a5fa);
	opacity: 0;
	transform: scaleX(0.4);
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.tab-button.active::after {
	opacity: 1;
	transform: scaleX(1);
}

.tab-button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

/* Content panel polish */
.tab-content {
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 0.75rem;
	backdrop-filter: var(--backdrop-blur);
}

.tab-content.active {
	animation: tabFadeIn 0.2s ease-out;
}

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

/* Small screens: allow horizontal scroll of tabs */
@media (max-width: 640px) {
	.tabs-header {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.tab-button {
		white-space: nowrap;
	}
} 

/* Lighter Tab Theme (final overrides) */
.tabs-container {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--border-primary);
}

.tabs-header {
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.tab-button {
	color: rgba(255, 255, 255, 0.85);
}

.tab-button:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.18);
}

.tab-button.active {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.32);
}

.tab-button::after {
	background: linear-gradient(90deg, #a78bfa, #93c5fd);
	bottom: -4px;
}

.tab-content {
	border: 1px solid var(--border-primary);
} 

/* Active tab: no background or border (keep underline) */
.tab-button.active {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
}

.tab-button.active:hover {
	background: transparent;
	border-color: transparent;
} 

/* Preserve focus ring on active tab */
.tab-button.active:focus-visible {
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
} 

/* Responsive Capability Selector */
@media (max-width: 768px) {
	.endpoint-selector {
		flex-wrap: wrap;
		align-items: stretch;
	}
	#endpoint-select {
		flex: 1 1 100%;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}
}

@media (max-width: 480px) {
	#endpoint-select {
		padding-right: 1.75rem;
		background-position: right 0.5rem center;
		background-size: 10px 10px;
	}
	
	/* Responsive styles for param-input select elements */
	.param-input[type="select"],
	select.param-input {
		padding-right: 1.75rem;
		background-position: right 0.5rem center;
		background-size: 10px 10px;
	}
	
	/* Ensure arrow stays visible on focus for mobile */
	.param-input[type="select"]:focus,
	select.param-input:focus {
		background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ecf0f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
		background-repeat: no-repeat;
		background-position: right 0.5rem center;
		background-size: 10px 10px;
	}
} 

/* Endpoint header mobile wrapping */
@media (max-width: 768px) {
	.endpoint-header {
		flex-wrap: wrap;
	}
	.endpoint-uri {
		flex: 1 1 100%;
		min-width: 0;
	}
	.endpoint-call-btn {
		flex: 1 1 100%;
		width: 100%;
		justify-content: center;
		margin-top: 0.5rem;
	}
}

@media (max-width: 480px) {
	.endpoint-call-btn {
		padding: 0.35rem 0.75rem;
	}
} 

.label-select {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	color: var(--text-primary);
	padding: 0.3rem 2rem 0.3rem 0.5rem;
	border-radius: 6px;
	font-size: 0.8rem;
	transition: all 0.2s ease;
	cursor: pointer;
	min-width: 160px;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	appearance: none;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ecf0f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
	background-size: 12px 12px;
}

.label-select:hover {
	background-color: rgba(0, 0, 0, 0.25);
	border-color: rgba(255, 255, 255, 0.15);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transform: translateY(-1px);
}

.label-select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
	background-color: rgba(0, 0, 0, 0.3);
}

.label-select option {
	background: #1a202c;
	color: var(--text-primary);
}

.label-select option:hover {
	background: #2d3748;
}

.label-select option:checked {
	background: #667eea;
	color: var(--text-primary);
	font-weight: 600;
}

.label-select:invalid {
	color: var(--text-secondary);
}

.label-select:valid {
	color: var(--text-primary);
}

.selected-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-left: 0.5rem;
	max-width: 100%;
}

.label-chip.removable {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding-right: 0.35rem;
	background: rgba(30, 58, 138, 0.35);
	border: 1px solid rgba(59, 130, 246, 0.55);
}

/* Label chip remove button inherits from icon-only button base style */
.label-chip .chip-remove {
	font-size: 0.85rem;
	line-height: 1;
	padding: 0 0.25rem;
	border-radius: 9999px;
}

.label-chip .chip-remove svg,
.remove-label-btn svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	stroke-width: 2;
}

@media (max-width: 768px) {
	.by-label-option {
		display: inline-flex;
		flex-direction: row;
		align-items: center;
		gap: 0.5rem;
		width: 100%;
		flex-wrap: wrap;
	}
	.by-label-option .target-label {
		white-space: nowrap;
	}
	.by-label-option .label-select {
		flex: 0 1 55%;
		min-width: 120px;
		max-width: 60%;
	}
	#selected-labels-container.selected-labels {
		flex: 1 1 100%;
		min-width: 0;
		margin-left: 0;
	}
}

@media (max-width: 480px) {
	.label-select {
		padding: 0.3rem 1.5rem 0.3rem 0.5rem;
		background-position: right 0.4rem center;
		background-size: 10px 10px;
	}
} 

.compact-upload-row,
.file-upload-area,
.file-input-wrapper {
	max-width: 100%;
}

.label-select {
	max-width: 100%;
}

/* Keep By Label on a single line for the label + select, but allow chips to wrap below */
@media (max-width: 768px) {
	.by-label-option {
		display: inline-flex;
		flex-direction: row;
		align-items: center;
		gap: 0.5rem;
		width: 100%;
		flex-wrap: wrap;
	}
	.by-label-option .target-label {
		white-space: nowrap;
	}
	.by-label-option .label-select {
		flex: 0 1 55%;
		min-width: 120px;
		max-width: 60%;
	}
	#selected-labels-container.selected-labels {
		flex: 1 1 100%;
		min-width: 0;
		margin-left: 0;
	}
}

/* Burger menu */
.burger-btn {
	display: none;
	background: transparent;
	border: 1px solid var(--border-secondary);
	color: var(--text-secondary);
	padding: 0.5rem;
	border-radius: 10px;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}

.burger-btn svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2;
}

@media (max-width: 768px) {
	.main-navigation {
		position: relative;
		z-index: 1000;
	}
	.burger-btn {
		display: inline-flex;
		margin-right: 0.5rem;
	}
	.nav-left {
		display: none;
	}
	.main-navigation.mobile-open .nav-left {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--bg-primary);
		border: 1px solid var(--border-primary);
		border-radius: 12px;
		padding: 0.5rem;
		gap: 0.25rem;
		z-index: 1100;
	}
	.main-navigation.mobile-open .nav-left .nav-tab {
		width: 100%;
		text-align: left;
	}
}

/* Topology View Styles */
#topology-view {
    flex: 1;  /* Take up remaining space */
    padding: 0;
    margin: 0;
    position: relative;
    width: 100%;  /* Use full container width */
    min-height: 0;  /* Allow flex item to shrink */
    max-height: 100vh;  /* Never exceed viewport height */
    overflow: hidden;  /* Keep this for topology view since it has its own scrolling */
}

/* Ensure other views work properly with flexbox */
#cluster-view, #firmware-view {
    flex: 0 0 auto;  /* Don't grow or shrink, use natural size */
    width: 100%;  /* Use full container width */
}

#topology-graph-container {
    background: var(--bg-tertiary);
    border-radius: 12px;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-sizing: border-box;
    max-height: 100%;  /* Ensure it doesn't exceed parent height */
}

#topology-graph-container svg {
    width: 100%;
    height: 100%;
}

#topology-graph-container .loading,
#topology-graph-container .error,
#topology-graph-container .no-data {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 1.1rem;
}

#topology-graph-container .error {
    color: var(--accent-error);
}

#topology-graph-container .no-data {
    color: rgba(255, 255, 255, 0.5);
}

/* Node and link styles for the graph */
.node circle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.node text {
    pointer-events: none;
    user-select: none;
}

.node:hover circle {
    stroke-width: 3;
    stroke: #60a5fa;
}

/* Legend styles */
.legend text {
    pointer-events: none;
    user-select: none;
}

.legend line {
    pointer-events: none;
}

/* Graph container enhancements */
#members-graph-container {
    position: relative;
}

#members-graph-container svg {
    width: 100%;
    height: 100%;
}

/* Member Card Overlay Styles */
.member-card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.member-card-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.member-overlay-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.member-card-overlay.visible .member-overlay-content {
    transform: scale(1) translateY(0);
}

.member-overlay-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.member-overlay-header .member-info {
    flex: 1;
    margin-right: 16px;
}

.member-overlay-header .member-info .member-row-1 {
    margin-bottom: 8px;
}

.member-overlay-header .member-info .member-hostname {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.member-overlay-header .member-info .member-ip {
    font-size: 1rem;
    color: var(--text-secondary);
}

.member-overlay-header .member-info .member-latency {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.member-overlay-header .member-info .member-status {
    font-size: 1.2rem;
    margin-right: 8px;
}

.member-overlay-header .member-info .member-labels {
    margin-top: 12px;
}

.member-overlay-header .member-info .member-labels .label-chip {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 4px;
    background: rgba(30, 58, 138, 0.35);
    color: #dbeafe;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    border: 1px solid rgba(59, 130, 246, 0.4);
    font-family: inherit;
    white-space: nowrap;
}

.member-overlay-subtitle {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-family: 'Courier New', monospace;
}

/* Member overlay close uses base icon-only style */
.member-overlay-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}


.member-overlay-section {
    margin-bottom: 24px;
}

/* Member card container within overlay */
.member-overlay-body {
    padding: 0;
    overflow: auto;
    max-height: calc(90vh - 120px); /* Account for header */
}

/* Ensure member cards render properly in overlay */
.member-overlay-body .member-card {
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.member-overlay-body .member-card .member-header {
    padding: 20px 24px 0px;
    border-bottom: none;
}

/* Hide expand icon in overlay since card is always expanded */
.member-overlay-body .member-card .expand-icon {
    display: none;
}

/* Hide expand icon on desktop screens */
@media (min-width: 1025px) {
    .expand-icon {
        display: none;
    }
}

/* Ensure expanded state is visually clear */
.member-overlay-body .member-card.expanded .member-details {
    display: block;
}

/* Disable hover effects on topology dialog member cards */
.member-overlay-body .member-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.member-overlay-body .member-card::before {
    display: none !important;
}

.member-overlay-body .member-card .member-header:hover {
    background: none !important;
}

/* Label chips styling for overlay */
.member-overlay-body .member-labels {
    margin-top: 16px;
}

/* unified with .label-chip */
.member-overlay-body .label-chip {
    margin-right: 10px;
    background: rgba(30, 58, 138, 0.35);
    color: #dbeafe;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.4);
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
}

/* Desktop slide-in details drawer */
.details-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: clamp(33.333vw, 650px, 90vw);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-left: 1px solid var(--border-primary);
    box-shadow: var(--shadow-primary);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
.details-drawer.open { transform: translateX(0); }

.details-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-secondary);
    background: var(--bg-secondary);
}
.details-drawer-header .drawer-title {
    font-weight: 600;
}
.details-drawer-header .drawer-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* Drawer buttons use base icon-only style */
.drawer-terminal-btn svg,
.drawer-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.details-drawer-content {
    padding: 1rem;
    overflow: auto;
}

/* Firmware Upload Drawer Styles */
.firmware-upload-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.firmware-upload-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.firmware-upload-header h3 {
    display: flex;
    align-items: center;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.firmware-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-input-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Compact Deploy Button - green accent for important action */
.deploy-btn-compact {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    height: fit-content;
    min-height: 2rem;
}

.deploy-btn-compact:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
    color: #22c55e;
    transform: translateY(-1px);
}

.deploy-btn-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.deploy-btn-compact.loading {
    opacity: 0.8;
}

/* File info styling consolidated at line 2830 */

.file-info.has-file {
    color: var(--text-secondary);
    font-style: normal;
    font-weight: 500;
}

.target-nodes-section {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
}

.target-nodes-section h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.target-nodes-list {
    overflow-y: auto;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.target-node-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border-radius: 0;
    gap: 0;
}

.target-node-item:last-child {
    border-bottom: none;
}

.target-node-item .node-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.target-node-item .node-info .node-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.2;
}

.target-node-item .node-info .node-ip {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.2;
}

.target-node-item .node-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 140px;
    text-align: right;
}

.status-indicator {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-indicator.ready {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-indicator.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.status-indicator.uploading {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.status-indicator.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-indicator.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 0.5rem 0.75rem !important;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    margin: 0;
}

/* Ultra-compact layout for upload progress */
.upload-progress-info ~ .target-nodes-section .target-node-item {
    padding: 0.375rem 0.5rem;
    gap: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.125rem;
}

.upload-progress-info ~ .target-nodes-section .target-node-item .node-info {
    gap: 0.0625rem;
}

.upload-progress-info ~ .target-nodes-section .target-node-item .node-info .node-name {
    font-size: 0.8rem;
    line-height: 1.0;
}

.upload-progress-info ~ .target-nodes-section .target-node-item .node-info .node-ip {
    font-size: 0.7rem;
    line-height: 1.0;
}

.upload-progress-info ~ .target-nodes-section .target-node-item .node-status {
    min-width: 70px;
    justify-content: flex-end;
    align-items: center;
}

.upload-progress-info ~ .target-nodes-section .status-indicator {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    min-width: 70px;
    border-radius: 3px;
}

.upload-progress-info ~ .target-nodes-section .target-nodes-list {
    gap: 0.125rem;
}

.target-node-item .progress-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-style: italic;
    line-height: 1.2;
    margin-top: 0.25rem;
}

/* Responsive design for target nodes */
@media (max-width: 768px) {
    .target-node-item {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }
    
    .target-node-item .node-status {
        min-width: 120px;
    }
    
    .status-indicator {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
    
    .target-node-item .node-info .node-name {
        font-size: 0.9rem;
    }
    
    .target-node-item .node-info .node-ip {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .target-node-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .target-node-item .node-status {
        align-items: flex-start;
        min-width: auto;
        text-align: left;
    }
    
    .status-indicator {
        min-width: auto;
        width: fit-content;
    }
}

/* Upload progress info styles */
.upload-progress-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
}

.upload-progress-info .overall-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.upload-progress-info .progress-bar-container {
    flex: 1;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
}

.upload-progress-info .progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.upload-progress-info .progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
    text-align: right;
}

.upload-progress-info .progress-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.target-node-item .node-ip {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

#firmware-progress-container {
    flex: 1;
    min-height: 200px;
}

/* Firmware Upload Progress Styles */
.firmware-upload-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-header {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
}

.progress-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.overall-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.progress-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-secondary);
}

.progress-node-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.progress-node-info .node-name {
    font-weight: 500;
    color: var(--text-primary);
}

.progress-node-info .node-ip {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.progress-status {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.progress-status.success {
    background: rgba(74, 222, 128, 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

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

.progress-status.uploading {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.progress-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Firmware Upload Progress Overlay */
.firmware-upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9998; /* Lower than drawer (1000) but higher than main content */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease; /* Smooth transition when drawer opens/closes */
}

/* When drawer is open, adjust overlay to only cover left side */
.firmware-upload-overlay.drawer-open {
    width: calc(100% - clamp(33.333vw, 650px, 90vw));
    justify-content: center;
    align-items: center;
    padding-left: 0;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    text-align: center;
}

.overlay-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-spinner .spinner {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
}

.overlay-spinner .spinner circle {
    animation: pulse 1.5s ease-in-out infinite;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transform-origin: center;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.0);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.6);
    }
}

.overlay-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.overlay-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.8;
}

/* Only enable drawer on wider screens; on small keep inline cards */
@media (max-width: 1023px) {
    .details-drawer { display: none; }
    
    /* On mobile, overlay covers full screen since drawer is not used */
    .firmware-upload-overlay.drawer-open {
        width: 100%;
        justify-content: center;
        padding-left: 0;
    }
}

/* Responsive adjustments for firmware upload controls */
@media (max-width: 768px) {
    .file-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .file-input-left {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .upload-btn-compact,
    .deploy-btn-compact {
        width: 100%;
        justify-content: center;
    }
    
    .file-info {
        text-align: center;
        order: -1; /* Show file info first on mobile */
    }
}

/* Terminal Panel - bottom-centered modal style */
.terminal-panel-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center; /* bottom-centered by default */
    z-index: 1001;
    pointer-events: none;
}

/* When the right drawer is open, dock the terminal to the right and offset by drawer width */
.terminal-panel-container.drawer-open {
    /* Bottom-aligned; keep panel centered while reserving space for drawer */
    align-items: flex-end;
    justify-content: center;
    /* reserve space equal to drawer width */
    margin-right: clamp(33.333vw, 650px, 90vw);
}

.terminal-panel {
    position: fixed; /* lock to viewport to avoid container reflow */
    left: 50%;
    bottom: 1.5rem;
    width: 33.333vw; /* 1/3 of the screen by default */
    height: min(45vh, 520px);
    max-height: 65vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    transform: translateX(-50%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    border-radius: 12px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    z-index: 1002;
}

/* Desktop layout: terminal takes 1/3 of the screen and fills height when docked */
@media (min-width: 1024px) {
    .terminal-panel-container.drawer-open .terminal-panel {
        /* Keep terminal width EXACTLY the same as non-drawer state */
        width: 33.333vw;
        max-width: none;
        /* Keep terminal height consistent with non-docked state */
        height: min(45vh, 520px);
        max-height: 65vh;
        border-radius: 12px;
        /* Keep same centering transform to avoid jump */
    }
}

/* Mobile layout: terminal spans full width */
@media (max-width: 1023px) {
    .terminal-panel-container {
        margin-right: 0;
        justify-content: center;
        align-items: flex-end;
    }
    .terminal-panel {
        width: 100vw;
        max-width: 100vw;
    }
}

.terminal-panel.minimized {
    display: none;
}

.terminal-panel.visible {
    transform: translateX(-50%);
    opacity: 1;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-secondary);
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
}
.terminal-title {
    font-weight: 600;
    font-size: 0.95rem;
}
.terminal-actions {
    display: flex;
    gap: 0.5rem;
}
/* Terminal action buttons use base icon-only style */
.terminal-actions .terminal-minimize-btn {
    font-size: 1rem;
    line-height: 1;
    font-weight: 400;
}

.terminal-body {
    flex: 1;
    overflow: auto;
    padding: 0.5rem 0.75rem;
}
.terminal-log {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.terminal-input-row {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-secondary);
    padding: 0.5rem;
    background: var(--bg-secondary);
}
.terminal-input {
    flex: 1;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
}
.terminal-input-row .terminal-clear-btn {
    background: transparent;
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}
.terminal-input-row .terminal-clear-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.terminal-send-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}
.terminal-send-btn:hover {
    filter: brightness(1.05);
}

.terminal-dock {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: none;
    pointer-events: none;
}

.terminal-dock.visible {
    display: flex;
}

.terminal-dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(21, 31, 46, 0.85);
    backdrop-filter: blur(14px);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    pointer-events: auto;
}

.terminal-dock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(0,0,0,0.35);
    background: rgba(35, 49, 68, 0.95);
}

.terminal-dock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.terminal-dock-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.terminal-dock-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Topology hover tooltip for labels */
.topology-tooltip {
    position: fixed;
    z-index: 1001;
    pointer-events: none;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-secondary);
    border-radius: 10px;
    padding: 0.5rem 0.6rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.topology-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.topology-tooltip .member-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.topology-tooltip .label-chip {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
}

/* Labels section styling in node details */
.detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-section-title {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: capitalize;
}

/* Resource and API chips styling */
.member-resources, .member-api {
    margin-top: 16px;
}

.resources-title, .api-title {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.resources-container, .api-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-chip, .api-chip {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}



.api-chip {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Highlight animation for member cards */
.member-card.highlighted {
    animation: highlight-pulse 2s ease-in-out;
}

/* Selected member card styling */
.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(0, 0, 0, 0.2) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-tertiary) 100%) !important;
    z-index: 10 !important;
}

.member-card.selected::before {
    opacity: 0.8 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%) !important;
}

.member-card.selected .member-header {
    background: rgba(59, 130, 246, 0.05) !important;
}

.member-card.selected .member-status {
    filter: brightness(1.2) !important;
}

.member-card.selected .member-hostname {
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

.member-card.selected .member-ip {
    color: #60a5fa !important;
}

@keyframes highlight-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    }
}

/* Responsive design for overlay */
@media (max-width: 768px) {
	.member-overlay-content {
		width: 95%;
		max-width: none;
		margin: 20px;
	}
	
	.member-overlay-header {
		padding: 20px 20px 12px;
	}
	
	.member-overlay-header .member-info .member-hostname {
		font-size: 1.3rem;
	}
	
	.member-overlay-body {
		padding: 0px;
	}
	
	.member-overlay-actions {
		flex-direction: column;
	}
	
	/* Compact layout adjustments for mobile */
	.member-overlay-header .member-info .member-row-1 {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	
	.member-overlay-header .status-hostname-group {
		display: flex;
		align-items: center;
		gap: 0.5rem;
	}
	
	.member-overlay-header .member-status,
	.member-overlay-header .member-hostname,
	.member-overlay-header .member-ip,
	.member-overlay-header .member-latency {
		flex-shrink: 1;
	}
	
	/* Keep status and hostname together on mobile */
	.member-overlay-header .member-status {
		min-width: 1.3rem;
		min-height: 1.3rem;
	}
	
	.member-overlay-header .member-info .member-labels {
		margin-top: 8px;
	}
	
	.member-overlay-header .member-info .member-labels .label-chip {
		font-size: 0.7rem;
		padding: 0.2rem 0.5rem;
		margin-right: 6px;
		margin-bottom: 3px;
	}
}

/* Compact mobile layout for overlay */
@media (max-width: 480px) {
	.member-overlay-content {
		width: calc(100% - 16px);
		margin: 8px;
		border-radius: 12px;
	}

	.member-overlay-header {
		padding: 12px 14px 8px;
	}

	.member-overlay-body {
		padding: 0px;
		max-height: calc(90vh - 80px);
	}

	/* Further compact layout for very small screens */
	.member-overlay-header .member-info .member-row-1 {
		gap: 0.25rem;
	}
	
	.member-overlay-header .member-info .member-hostname {
		font-size: 1rem;
	}
	
	.member-overlay-header .member-info .member-ip {
		font-size: 0.8rem;
	}
	
	.member-overlay-header .member-info .member-status {
		font-size: 0.8rem;
		padding: 0.15rem;
		min-width: 1.1rem;
		min-height: 1.1rem;
	}
	
	.member-overlay-header .member-info .member-labels {
		margin-top: 6px;
	}
	
	.member-overlay-header .member-info .member-labels .label-chip {
		font-size: 0.65rem;
		padding: 0.15rem 0.4rem;
		margin-right: 4px;
		margin-bottom: 2px;
	}
}

/* Test page styles */
.test-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.test-section h2 {
    color: var(--text-primary);
    margin-top: 0;
}

#test-overlay-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#test-overlay-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
}

/* Loading and error states */
.loading, .error, .no-data {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.1rem;
    color: var(--text-tertiary);
}

.loading div {
    text-align: center;
}

.error div {
    color: var(--accent-error);
    text-align: center;
}

.no-data div {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Responsive design for progress and results */
@media (max-width: 768px) {
	.progress-info,
	.results-summary {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.progress-info span,
	.results-summary span {
		text-align: center;
	}
	
	.overall-progress {
		flex-direction: column;
		gap: 0.75rem;
	}
	
	.progress-text {
		text-align: center;
		min-width: auto;
	}
	
	.results-actions {
		flex-direction: column;
		gap: 0.75rem;
	}
	
	.clear-btn,
	.refresh-btn {
		width: 100%;
		justify-content: center;
	}
}

/* Mobile-responsive cluster header toolbar */
@media (max-width: 480px) {
	.cluster-header {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
		padding: 0.75rem 0.5rem;
	}
	
	.cluster-header-left {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
		align-items: stretch;
	}
	
	.cluster-filters {
		justify-content: center;
	}
	
	.filter-group {
		flex-direction: column;
		gap: 0.5rem;
		padding: 0.75rem;
		width: 100%;
	}
	
	.filter-label {
		text-align: center;
		font-size: 0.9rem;
	}
	
	.filter-select {
		width: 100%;
		min-width: auto;
		padding: 0.5rem 2rem 0.5rem 0.75rem !important;
		font-size: 0.9rem;
		appearance: none;
		-webkit-appearance: none;
		-moz-appearance: none;
		background-color: rgba(255, 255, 255, 0.08);
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 0.5rem center;
		background-size: 12px;
	}
	
	.clear-filters-btn {
		display: none;
	}
	
	.primary-node-info {
		flex-direction: row;
		align-items: center;
		gap: 0.5rem;
		padding: 0.75rem;
		text-align: center;
	}
	
	.primary-node-label {
		font-size: 0.95rem;
	}
	
	.primary-node-ip {
		font-size: 0.95rem;
		padding: 0.4rem 0.6rem;
	}
	
	.primary-node-refresh {
		padding: 0.4rem;
		margin-top: 0;
	}
	
	.refresh-btn {
		width: 100%;
		justify-content: center;
		padding: 0.75rem;
		font-size: 0.95rem;
	}
	
	.config-btn,
	.deploy-btn {
		width: 100%;
		justify-content: center;
		padding: 0.75rem;
		font-size: 0.95rem;
	}
}

#cluster-members-container {
    overflow-y: auto;  /* Allow vertical scrolling */
    max-height: calc(100vh - 200px);  /* Leave space for header and navigation */
    padding-right: 0.5rem;  /* Add some padding for scrollbar */
}

#firmware-container {
    overflow-y: auto;  /* Allow vertical scrolling */
    max-height: calc(100vh - 200px);  /* Leave space for header and navigation */
    padding-right: 0.5rem;  /* Add some padding for scrollbar */
}

/* Ensure proper scrolling for expanded member cards */
.member-card.expanded {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-hover);
    z-index: 5;
    overflow: visible;  /* Allow content to expand */
}

/* Custom scrollbar styling for better UX */
.view-content::-webkit-scrollbar,
#cluster-members-container::-webkit-scrollbar,
#firmware-container::-webkit-scrollbar {
    width: 8px;
}

.view-content::-webkit-scrollbar-track,
#cluster-members-container::-webkit-scrollbar-track,
#firmware-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.view-content::-webkit-scrollbar-thumb,
#cluster-members-container::-webkit-scrollbar-thumb,
#firmware-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.view-content::-webkit-scrollbar-thumb:hover,
#cluster-members-container::-webkit-scrollbar-thumb:hover,
#firmware-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.firmware-nodes-list {
    overflow-y: auto;  /* Allow vertical scrolling */
    max-height: calc(100vh - 300px);  /* Leave space for header, navigation, and upload area */
    padding-right: 0.5rem;  /* Add some padding for scrollbar */
}

.firmware-nodes-list::-webkit-scrollbar {
    width: 8px;
}

.firmware-nodes-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.firmware-nodes-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.firmware-nodes-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive scrolling adjustments */
@media (max-width: 768px) {
    #cluster-members-container,
    #firmware-container,
    .firmware-nodes-list {
        max-height: calc(100vh - 180px);  /* Adjust for mobile layout */
        padding-right: 0.25rem;  /* Reduce padding on mobile */
    }
    
    .view-content {
        max-height: calc(100vh - 180px);  /* Adjust for mobile layout */
    }
}

@media (max-width: 480px) {
    #cluster-members-container,
    #firmware-container,
    .firmware-nodes-list {
        max-height: calc(100vh - 160px);  /* Further adjust for small screens */
        padding-right: 0.25rem;
    }
    
    .view-content {
        max-height: calc(100vh - 160px);  /* Further adjust for small screens */
    }
}

/* Ensure smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Improve touch scrolling on mobile devices */
.view-content,
#cluster-members-container,
#firmware-container,
.firmware-nodes-list {
    -webkit-overflow-scrolling: touch;  /* Smooth scrolling on iOS */
    scrollbar-width: thin;  /* Thin scrollbar on Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);  /* Firefox scrollbar colors */
}

/* Mobile width optimization: maximize horizontal space */
@media (max-width: 768px) {
	body {
		padding: 0.5rem;
	}
	.container {
		padding: 0 0.5rem;
		max-height: calc(100vh - 1rem);
	}
	.cluster-section,
	.firmware-section {
		padding: 0.5rem;
	}
	.main-navigation {
		padding: 0.25rem;
	}
	.nav-tab {
		padding: 0.6rem 0.8rem;
	}
	.members-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 0.5rem;
	}
}

@media (max-width: 480px) {
	body {
		padding: 0.25rem;
	}
	.container {
		padding: 0 0.25rem;
		max-height: calc(100vh - 0.5rem);
	}
	.member-card {
		padding: 0.75rem;
	}
	.main-navigation {
		padding: 0.25rem;
	}
}

@media (max-width: 768px) {
	/* Use single scroll on mobile: let the page/body scroll */
	body {
		height: auto;
		min-height: 100vh;
		overflow-y: auto;
	}
	.container {
		max-height: none;
		overflow: visible;
	}
	.view-content,
	#cluster-view.active {
		max-height: none;
		overflow: visible;
	}
	#cluster-members-container,
	#firmware-container,
	.firmware-nodes-list {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}
}

@media (max-width: 480px) {
	/* Make primary node section more compact */
	.cluster-header {
		gap: 0.5rem;
		padding: 0.5rem 0;
	}
	.primary-node-info {
		gap: 0.35rem;
		padding: 0.35rem 0.5rem;
	}
	.primary-node-label {
		font-size: 0.8rem;
	}
	.primary-node-ip {
		font-size: 0.85rem;
		padding: 0.2rem 0.4rem;
	}
	.primary-node-refresh {
		padding: 0.3rem;
	}
}

/* Reduce tap highlight and flicker in firmware view */
#firmware-view,
.upload-btn,
.upload-btn-compact,
.deploy-btn,
.config-btn,
.cap-call-btn,
.progress-refresh-btn,
.clear-btn,
.refresh-btn,
.progress-item,
.result-item,
/* File info styling consolidated at line 2830 */
.file-info {
	-webkit-tap-highlight-color: transparent;
}

/* Disable hover-driven animations/effects on touch devices in firmware view */
@media (hover: none) {
	#firmware-view .upload-btn:hover,
	#firmware-view .upload-btn-compact:hover,
	#firmware-view .deploy-btn:hover:not(:disabled),
	#firmware-view .progress-refresh-btn:hover,
	#firmware-view .cap-call-btn:hover,
	#firmware-view .clear-btn:hover,
	#firmware-view .refresh-btn:hover,
	#firmware-view .progress-item:hover,
	#firmware-view .result-item:hover,
	#firmware-view .firmware-upload-progress:hover,
	#firmware-view .firmware-upload-results:hover,
	#firmware-view .file-info:hover {
		transform: none !important;
		box-shadow: none !important;
	}

	#firmware-view .progress-item:hover::before,
	#firmware-view .result-item:hover::before {
		opacity: 0 !important;
	}

	/* Prevent shimmer animation on deploy button hover */
	#firmware-view .deploy-btn:hover:not(:disabled)::before {
		left: -100% !important;
	}
	
	/* Disable hover effects for cluster view buttons on touch devices */
	.config-btn:hover,
	.deploy-btn:hover:not(:disabled),
	.refresh-btn:hover {
		transform: none !important;
		box-shadow: none !important;
	}
}

/* Cluster view specific error styling */
#cluster-members-container .error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    margin-top: 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.08) 100%);
    border: 1px solid rgba(244, 67, 54, 0.35);
    color: #ffcdd2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    height: auto;              /* override global 100% height */
    justify-content: flex-start; /* override global centering */
    text-align: left;          /* ensure left alignment */
}

#cluster-members-container .error::before {
    content: '⚠️';
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

#cluster-members-container .error strong {
    color: #ffebee;
    font-weight: 700;
    margin-right: 0.25rem;
}

#cluster-members-container .error br {
    display: none; /* tighten layout by avoiding forced line-breaks */
}
/* Color picker styles */
.color-input-container {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.color-picker {
	width: 50px !important;
	height: 35px !important;
	padding: 0 !important;
	border-radius: 6px !important;
	cursor: pointer;
}

.color-rgb-display {
	background: rgba(0, 0, 0, 0.3) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	color: rgba(255, 255, 255, 0.9) !important;
	text-align: center;
	font-family: 'Courier New', monospace !important;
}

/* Number range slider styles */
.number-range-container {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.range-slider {
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	outline: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.range-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	background: var(--accent-primary);
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid var(--bg-secondary);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.range-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: var(--accent-primary);
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid var(--bg-secondary);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.range-slider::-webkit-slider-track {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	height: 6px;
}

.range-slider::-moz-range-track {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	height: 6px;
	border: none;
}

.range-display {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

.range-value {
	font-weight: 600;
	color: var(--accent-primary);
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.range-max {
	opacity: 0.7;
}

.color-rgb-display:focus {
	border-color: rgba(139, 92, 246, 0.5) !important;
	background: rgba(139, 92, 246, 0.08) !important;
}

/* Monitoring View Styles */
.monitoring-view-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-primary);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: visible;
}

.monitoring-view-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.monitoring-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.monitoring-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

/* Cluster Summary Styles */
.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.summary-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.875rem;
    opacity: 0.8;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-utilization {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.utilization-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.utilization-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Utilization bar colors based on percentage (same as gauges) */
.utilization-empty {
    background: rgba(255, 255, 255, 0.1) !important;
}

.utilization-green {
    background: linear-gradient(90deg, var(--accent-success), var(--accent-success)) !important;
}

.utilization-yellow {
    background: linear-gradient(90deg, var(--accent-warning), var(--accent-warning)) !important;
}

.utilization-red {
    background: linear-gradient(90deg, var(--accent-error), var(--accent-error)) !important;
}

.utilization-text {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 3rem;
}

/* Nodes Monitoring Styles */
.nodes-monitoring {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.nodes-monitoring-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.nodes-monitoring-content h3 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
}

.nodes-grid {
    display: grid;
    gap: 1rem;
    /* Responsive grid: fit as many cards as possible with min-width constraint */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Responsive grid handles all item counts automatically */

.node-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
    min-width: 280px;
    width: 100%;
}

.node-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.node-card[data-node-ip] {
    cursor: pointer;
    transition: all 0.2s ease;
}

.node-card[data-node-ip]:active {
    transform: translateY(0);
}

.node-card.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
}

.node-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.node-ip {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.ip-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
    margin-right: 0.25rem;
}





.node-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.labels-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 0.5rem 0;
    opacity: 0.3;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #dbeafe;
    white-space: nowrap;
    font-family: inherit;
}

.node-uptime {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.uptime-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.8;
}

.uptime-value {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    opacity: 0.9;
}

.node-latency {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.latency-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.8;
}

.latency-value {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    opacity: 0.9;
}

.latency-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 0.5rem 0;
    opacity: 0.3;
}

.node-flash {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.flash-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.flash-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.node-error {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

.node-resources {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resource-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.resource-value {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.value-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
}

.error-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.error-message {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-style: italic;
}

.resource-utilization {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Error and Loading States */
.error {
    text-align: center;
    padding: 2rem;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

/* Monitoring Section in Node Details Drawer */
.details-drawer .monitoring-section .monitoring-header {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-primary);
}

/* Themed Scrollbars (Global and Components) */
/* Firefox */
* {
    scrollbar-width: thin; /* auto | thin | none */
    scrollbar-color: var(--border-secondary) var(--bg-tertiary); /* thumb track */
}

/* WebKit (Chrome, Edge, Safari) */
/* Global default */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 8px;
    border: 2px solid var(--bg-tertiary); /* creates padding and rounded effect */
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Terminal panel body - slightly thinner */
.terminal-body {
    scrollbar-width: thin;
}
.terminal-body::-webkit-scrollbar {
    width: 8px;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
}

/* Drawer content area */
.details-drawer-content {
    scrollbar-width: thin;
}
.details-drawer-content::-webkit-scrollbar {
    width: 10px;
}
.details-drawer-content::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    /* Mobile grid layouts - use responsive grid with smaller min-width */
    .nodes-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    
    .node-card {
        min-width: 240px;
    }
    
    .monitoring-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
}

/* Labels Editor Styles */
.labels-section {
    padding: 1rem 0;
}

.labels-header {
    margin-bottom: 1.5rem;
}

.labels-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.labels-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Node labels section - add-label-controls positioned at top */
.labels-section .add-label-controls {
    margin-bottom: 1rem;
}

.labels-list {
    display: block;
    margin-bottom: 1.5rem;
}

.no-labels {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-secondary);
    border-radius: 8px;
}

.label-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.label-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.label-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.label-key {
    font-weight: 600;
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.label-separator {
    color: var(--text-tertiary);
    font-weight: 500;
}

.label-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.label-remove-btn {
    background: transparent;
    border: 1px solid var(--border-secondary);
    color: var(--text-tertiary);
    border-radius: 6px;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-remove-btn:hover {
    background: var(--accent-error);
    border-color: var(--accent-error);
    color: white;
}

.label-remove-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Old add-label-section and add-label-form styles removed - now using add-label-controls */
/* Node labels use the same compact add-label-controls as firmware form */

/* Add label button and save labels button inherit from base button styles */
.add-label-btn {
    align-self: flex-end;
}

.add-label-btn svg,
.save-labels-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

.labels-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    margin-bottom: 1rem;
    border-top: 1px solid var(--border-secondary);
}

.save-labels-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.labels-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.labels-message-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.labels-message-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #f59e0b;
}

.labels-message-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.labels-message-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for labels editor */
@media (max-width: 768px) {
    .add-label-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-label-controls .label-separator {
        display: none;
    }
    
    .labels-actions {
        justify-content: stretch;
    }
    
    .save-labels-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Overlay Dialog Styles */
.overlay-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay-dialog.visible {
    opacity: 1;
    visibility: visible;
}

.overlay-dialog-content {
    background: linear-gradient(135deg, #1c2a38 0%, #283746 50%, #1a252f 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.overlay-dialog.visible .overlay-dialog-content {
    transform: scale(1) translateY(0);
}

.overlay-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-dialog-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ecf0f1;
    margin: 0;
}

/* Overlay dialog close uses base icon-only style */

.overlay-dialog-body {
    padding: 16px 24px;
}

.overlay-dialog-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    white-space: normal;
}

.overlay-dialog-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

.overlay-dialog-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 80px;
}

.overlay-dialog-btn-cancel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.overlay-dialog-btn-cancel:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ecf0f1;
    transform: translateY(-1px);
}

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

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

.overlay-dialog-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid #ef4444;
    color: white;
}

.overlay-dialog-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* === Rollout Component Styles === */
/* Rollout button styling moved to harmonized firmware action buttons section */

.rollout-panel {
    padding: 1.5rem;
}

.rollout-header {
    margin-bottom: 1.5rem;
}

.rollout-header h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.rollout-header p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.rollout-firmware-info {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-primary);
}

.rollout-firmware-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.rollout-firmware-version {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.rollout-firmware-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rollout-matching-nodes {
    margin-bottom: 1.5rem;
}

.rollout-matching-nodes h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.rollout-nodes-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.rollout-node-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rollout-node-item:last-child {
    border-bottom: none;
}

.rollout-node-info {
    flex: 1;
}

.rollout-node-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 140px;
    text-align: right;
}

.rollout-node-ip {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rollout-node-version {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.rollout-node-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.label-chip.small {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.rollout-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-icon {
    color: var(--warning-color);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.warning-text {
    color: var(--accent-warning);
    line-height: 1.5;
}

.rollout-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
}

/* Rollout confirm button - important action with green accent */
.rollout-actions .deploy-btn {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.rollout-actions .deploy-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
    color: #22c55e;
    transform: translateY(-1px);
}

.rollout-actions .deploy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Rollout Progress Overlay */
.rollout-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rollout-progress-overlay {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-primary);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.rollout-progress-content {
    padding: 2rem;
}

.rollout-progress-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.rollout-progress-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.rollout-progress-body {
    text-align: center;
}

.rollout-progress-info {
    margin-bottom: 1.5rem;
}

.rollout-progress-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.rollout-progress-text {
    font-weight: 600;
    color: var(--text-primary);
}

.rollout-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.rollout-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.rollout-progress-details {
    text-align: left;
}

.rollout-node-list {
    overflow-y: auto;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.rollout-node-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.rollout-node-status.status-updating_labels {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.rollout-node-status.status-uploading {
    background: var(--info-bg);
    color: var(--info-color);
}

.rollout-node-status.status-completed {
    background: var(--success-bg);
    color: var(--success-color);
}

.rollout-node-status.status-failed {
    background: var(--error-bg);
    color: var(--error-color);
}
