/* ==========================
   Theme variables / palette
   ========================== */

:root {
	/* Modern Dark Palette */
	--body-bg-1: #0a0b0f;
	--body-bg-2: #1a1d29;
	--body-bg-3: #12141c;
	
	/* Navbar - Glassmorphism */
	--navbar-bg: rgba(15, 17, 25, 0.85);
	--navbar-border: rgba(99, 102, 241, 0.15);
	--navbar-shadow-1: rgba(0, 0, 0, 0.3);
	--navbar-shadow-2: rgba(99, 102, 241, 0.05);
	
	/* Brand Colors - Modern Indigo/Purple Accent */
	--primary: #6366f1;
	--primary-hover: #818cf8;
	--primary-strong: #4f46e5;
	--accent: #8b5cf6;
	--accent-hover: #a78bfa;
	
	/* Logo & Navigation */
	--logo: #6366f1;
	--logo-shadow: rgba(99, 102, 241, 0.4);
	--nav: #cbd5e1;
	--nav-hover: #f1f5f9;
	--nav-hover-bg: rgba(99, 102, 241, 0.1);
	--nav-bg-highlight: rgba(99, 102, 241, 0.15);
	
	/* Headers */
	--header: #f1f5f9;
	--header-bg-1: rgba(99, 102, 241, 0.05);
	--header-bg-2: rgba(15, 17, 25, 0.95);
	--header-shadow: rgba(99, 102, 241, 0.3);
	--header-content: #94a3b8;
	
	/* Content Areas - Glassmorphism */
	--content: #cbd5e1;
	--content-hover: #f1f5f9;
	--content-bg: rgba(15, 17, 25, 0.75);
	--content-hover-bg: rgba(30, 33, 46, 0.85);
	--content-border: rgba(121, 123, 243, 0.4);
	--content-hover-border: rgba(99, 102, 241, 0.4);
	--content-shadow: rgba(155, 155, 155, 0.6);
	--card-bg: rgba(30, 41, 59, 0.6);
	
	/* Terminal */
	--terminal: #51cf66; /* green */
	--terminal-debug: #0096ff; /* blue */
	--terminal-in: #4defff; /* bright cyan */
	--terminal-warning: #ffd93d; /* yellow */
	--terminal-error: #ff6b6b; /* red */
	--terminal-bg: rgba(0, 0, 0, 0.95);
	--terminal-border: rgba(99, 102, 241, 0.2);

	/* Standard colors (0-7) */
	--term-black: #0a0e27;
	--term-red: #ff6b6b;
	--term-green: #51cf66;
	--term-yellow: #ffd93d;
	--term-blue: #0096ff;
	--term-magenta: #da70d6;
	--term-cyan: #00d9ff;
	--term-white: #e8e8e8;

	/* Bright colors (8-15) */
	--term-bright-black: #3a4555;
	--term-bright-red: #ff8787;
	--term-bright-green: #69e896;
	--term-bright-yellow: #ffe066;
	--term-bright-blue: #4db8ff;
	--term-bright-magenta: #f087f0;
	--term-bright-cyan: #4defff;
	--term-bright-white: #ffffff;
	
	/* Buttons - Modern Flat Design */
	--button-active-shadow: rgba(99, 102, 241, 0.3);
	--button: #ffffff;
	--button-bg-1: #181d42; /* muted, darker */
	--button-bg-2: #41469a; /* muted, slightly lighter for hover */
	--button-shadow: rgba(0, 0, 0, 0.1);
	--button-border: #4f46e5; /* vibrant indigo border */

	/* Action Buttons */
	--button-config: #ffffff;
	--button-config-bg-1: #07263f; /* muted blue */
	--button-config-bg-2: #103a5a;
	--button-config-shadow: rgba(59, 130, 246, 0.3);
	--button-config-border: #3b82f6; /* vibrant blue border */

	--button-create: #ffffff;
	--button-create-bg-1: #062b20; /* muted green */
	--button-create-bg-2: #0b4b39;
	--button-create-shadow: rgba(16, 185, 129, 0.3);
	--button-create-border: #10b981; /* vibrant green border */

	--button-start: #ffffff;
	--button-start-bg-1: #062b20; /* same muted green as create */
	--button-start-bg-2: #0b4b39;
	--button-start-shadow: rgba(16, 185, 129, 0.3);
	--button-start-border: #10b981; /* vibrant green border */

	--button-stop: #ffffff;
	--button-stop-bg-1: #3a1515; /* muted red */
	--button-stop-bg-2: #5a1a1a;
	--button-stop-shadow: rgba(239, 68, 68, 0.3);
	--button-stop-border: #ef4444; /* vibrant red border */

	--button-browse: #ffffff;
	--button-browse-bg-1: #2f2548; /* muted purple */
	--button-browse-bg-2: #3f2f69;
	--button-browse-shadow: rgba(139, 92, 246, 0.3);
	--button-browse-border: #8b5cf6; /* vibrant purple border */

	--button-remove: #ffffff;
	--button-remove-bg-1: #3a1515; /* same muted red as stop */
	--button-remove-bg-2: #5a1a1a;
	--button-remove-shadow: rgba(239, 68, 68, 0.3);
	--button-remove-border: #ef4444; /* vibrant red border */

	--button-save: #ffffff;
	--button-save-bg-1: #062b20; /* same muted green as create/start */
	--button-save-bg-2: #0b4b39;
	--button-save-shadow: rgba(16, 185, 129, 0.3);
	--button-save-border: #10b981; /* vibrant green border */

	--button-cancel: #ffffff;
	--button-cancel-bg-1: #20252b; /* muted gray */
	--button-cancel-bg-2: #2f353b;
	--button-cancel-shadow: rgba(100, 116, 139, 0.3);
	--button-cancel-border: #64748b; /* vibrant gray border */

	--button-update: #ffffff;
	--button-update-bg-1: #3b2b09; /* muted orange */
	--button-update-bg-2: #6a4a07;
	--button-update-shadow: rgba(245, 158, 11, 0.3);
	--button-update-border: #f59e0b; /* vibrant orange border */

	--button-backup: #ffffff;
	--button-backup-bg-1: #06343a; /* muted teal */
	--button-backup-bg-2: #0b5a66;
	--button-backup-shadow: rgba(6, 182, 212, 0.3);
	--button-backup-border: #06b6d4; /* vibrant teal border */

	--button-edit: #ffffff;
	--button-edit-bg-1: #0f1228; /* same as primary muted */
	--button-edit-bg-2: #262842;
	--button-edit-shadow: rgba(99, 102, 241, 0.3);
	--button-edit-border: #4f46e5; /* vibrant indigo border */

	/* Tables - Modern Design */
	--table-header: #f8fafc;
	--table-header-bg-1: rgba(99, 102, 241, 0.8);
	--table-header-bg-2: rgba(79, 70, 229, 0.9);
	--table: #e2e8f0;
	--table-row-bg-1: rgba(30, 41, 59, 0.4);
	--table-row-bg-2: rgba(15, 23, 42, 0.4);
	--table-border: rgba(99, 102, 241, 0.3);
	--table-row-hover: rgba(14, 28, 62, 0.6);

	/* Input Fields */
	--input: #cbd5e1;
	--input-placeholder: #64748b;
	--input-bg: rgba(15, 23, 42, 0.8);
	--input-border: rgba(99, 102, 241, 0.4);
	--input-focus: #e2e8f0;
	--input-focus-bg: rgba(30, 41, 59, 0.95);
	--input-focus-border: #6366f1;
	--input-focus-shadow: rgba(99, 102, 241, 0.3);
	
	/* Status Colors */
	--status-running: #10b981;
	--status-starting: #f59e0b;
	--status-stopped: #bc9498;
	--status-stopping: #f97316;
	
	--status-neutral: #60a5fa;
	--status-neutral-bg-1: rgba(59, 130, 246, 0.1);
	--status-neutral-bg-2: rgba(37, 99, 235, 0.15);
	
	--status-good: #10b981;
	--status-good-bg-1: rgba(16, 185, 129, 0.1);
	--status-good-bg-2: rgba(5, 150, 105, 0.15);
	
	--status-warning: #f59e0b;
	--status-warning-bg-1: rgba(245, 158, 11, 0.1);
	--status-warning-bg-2: rgba(217, 119, 6, 0.15);
	
	--status-critical: #ef4444;
	--status-critical-bg-1: rgba(239, 68, 68, 0.1);
	--status-critical-bg-2: rgba(220, 38, 38, 0.15);
	
	/* Graph */
	--graph-bg: #0f172a;
	
	/* Text Colors */
	--muted: #64748b;
	--text-primary: #f1f5f9;
	--text-secondary: #94a3b8;
	--text-color: #cbd5e1;
	--border-color: rgba(99, 102, 241, 0.2);
	--accent-color: #6366f1;
	--success-color: #10b981;
}



/* ==========================
   Keyframes
   ========================== */
@keyframes blinker {
	20% {
		opacity: 1;
	}
	50% {
		opacity: .3;
	}
	80% {
		opacity: 1;
	}
}

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

@keyframes pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(2);
	}
	100% {
		transform: scale(1);
	}
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

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


/* ==========================
   Base / Reset
   ========================== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
	background: linear-gradient(135deg, var(--body-bg-1) 0%, var(--body-bg-2) 50%, var(--body-bg-3) 100%);
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	color: var(--text-color);
	line-height: 1.6;
}

/* Add subtle pattern overlay */
body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
		radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
	pointer-events: none;
	z-index: 0;
}

h2 {
	color: var(--header);
	margin-bottom: 0.75rem;
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: -0.025em;
	text-shadow: none;
}

h3 {
	color: var(--header);
	margin-bottom: 1rem;
	font-size: 1.25rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	letter-spacing: -0.015em;
}

h4 {
	color: var(--header);
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: all 0.2s ease;
}
a:hover {
	color: var(--primary-hover);
}

/* ==========================
   Header / Navigation / Logo
   ========================== */
.logo {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--logo);
	display: flex;
	align-items: center;
	gap: 0.625rem;
	font-family: 'Inter', sans-serif;
	letter-spacing: -0.025em;
	text-shadow: none;
	text-decoration: none;
	transition: all 0.3s ease;
	line-height: 1.2rem;
}

.logo:hover {
	color: var(--primary-hover);
}
.logo .sub-title {
	font-size: 0.75rem;
	letter-spacing: -0.01em;
	opacity: 0.8;
}

.logo i {
	font-size: 1.375rem;
	color: var(--logo);
	filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
	transition: all 0.3s ease;
}

.logo:hover i {
	filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6));
	transform: rotate(90deg);
}

.navbar {
	background: var(--navbar-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding: 0.875rem 0;
	box-shadow: 0 1px 3px var(--navbar-shadow-1), inset 0 1px 0 var(--navbar-shadow-2);
	border-bottom: 1px solid var(--navbar-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.navbar-content {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 2rem;
}

.nav-links {
	display: flex;
	gap: 0.5rem;
	list-style: none;
}

.nav-links a {
	text-decoration: none;
	color: var(--nav);
	font-weight: 500;
	font-size: 0.9375rem;
	letter-spacing: -0.01em;
	transition: all 0.25s ease;
	position: relative;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	border: 1px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
	color: var(--nav-hover);
	background: var(--nav-hover-bg);
	border-color: var(--nav-bg-highlight);
}

.nav-links a.active::after {
	content: '';
	position: absolute;
	bottom: -0.875rem;
	left: 50%;
	transform: translateX(-50%);
	width: 60%;
	height: 2px;
	background: var(--primary);
	border-radius: 2px;
}

/* ==========================
   Layout: main container / sidebar / content
   ========================== */
.main-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem;
	display: grid;
	grid-template-columns: 350px 1fr;
	gap: 2rem;
	position: relative;
	z-index: 2;
}

.main-container.wide {
	grid-template-columns: 1fr;
	max-width: 1600px;
}

.content-area {
	background: var(--content-bg);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--content-border);
	border-radius: 16px;
	box-shadow: 
		0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06),
		0 0 0 1px rgba(99, 102, 241, 0.1);
	overflow: hidden;
	position: relative;
	transition: all 0.3s ease;
}

.content-area:hover {
	box-shadow: 
		0 10px 15px -3px rgba(0, 0, 0, 0.1),
		0 4px 6px -2px rgba(0, 0, 0, 0.05),
		0 0 0 1px rgba(99, 102, 241, 0.15);
}

.content-header {
	border-bottom: 1px solid var(--content-border);
	background: var(--header-bg-1);
	position: relative;
	z-index: 1;
}

.content-header-inner {
	padding: 1.5rem;
	background-color: var(--header-bg-2);
	display: flex;
	flex-wrap: wrap;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.content-header-inner h2 {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex: 2;
	margin: 0;
}

.content-header-inner h2 i {
	opacity: 0.8;
}

.content-header-inner .content-header-buttons {
	flex: 1;
	text-align: right;
}

.content-header-inner p {
	color: var(--header-content);
	font-size: 0.9375rem;
	font-weight: 400;
	letter-spacing: -0.01em;
	flex: 3 100%;
	margin-top: 0.5rem;
	margin-bottom: 0;
}

.content-body {
	padding: 2rem;
	position: relative;
	z-index: 1;
	color: var(--content);
}

.content-body ul {
	margin-left: 1rem;
}

#qrcode img {
	padding: 1rem;
	background-color: white;
	margin: 0 auto;
	border-radius: 8px;
}




/* =========================
   Tables
   ========================== */
table {
	width: 100%;
	border-collapse: collapse;
	border-radius: 12px;
	border: 0 none;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
table thead {
	border: 0 none;
}
table thead tr {
	background: linear-gradient(135deg, var(--table-header-bg-1) 0%, var(--table-header-bg-2) 100%);
	border-bottom: 1px solid var(--table-border);
	color: var(--table-header);
}
table th {
	padding: 1rem;
	text-align: left;
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: -0.01em;
}
table tbody tr {
	background-color: var(--table-row-bg-1);
	transition: all 0.2s ease;
	border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}
table tbody tr:nth-child(even) {
	background-color: var(--table-row-bg-2);
}
table tbody tr:hover {
	background-color: var(--table-row-hover);
}
table td {
	padding: 0.875rem 1rem;
	color: var(--table);
	font-size: 0.9375rem;
}

/* <editor-fold desc="Terminal and Console"> */

.terminal {
	color: var(--terminal);
	background: var(--terminal-bg);
	border: 1px solid var(--terminal-border);
	border-radius: 8px;
	padding: 1.25rem;
	overflow: auto;
	max-height: 40vh;
	font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	white-space: pre-wrap;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.terminal .line-stdin {
	color: var(--terminal-in);
}
.terminal .line-debug {
	color: var(--terminal-debug);
}
.terminal .line-warning {
	color: var(--terminal-warning);
}
.terminal .line-stderr,
.terminal .line-error {
	color: var(--terminal-error);
}

/* Foreground color classes */
.term-fg-black { color: var(--term-black); }
.term-fg-red { color: var(--term-red); }
.term-fg-green { color: var(--term-green); }
.term-fg-yellow { color: var(--term-yellow); }
.term-fg-blue { color: var(--term-blue); }
.term-fg-magenta { color: var(--term-magenta); }
.term-fg-cyan { color: var(--term-cyan); }
.term-fg-white { color: var(--term-white); }

.term-fg-bright-black { color: var(--term-bright-black); }
.term-fg-bright-red { color: var(--term-bright-red); }
.term-fg-bright-green { color: var(--term-bright-green); }
.term-fg-bright-yellow { color: var(--term-bright-yellow); }
.term-fg-bright-blue { color: var(--term-bright-blue); }
.term-fg-bright-magenta { color: var(--term-bright-magenta); }
.term-fg-bright-cyan { color: var(--term-bright-cyan); }
.term-fg-bright-white { color: var(--term-bright-white); }

/* Background color classes */
.term-bg-black { background-color: var(--term-black); }
.term-bg-red { background-color: var(--term-red); }
.term-bg-green { background-color: var(--term-green); }
.term-bg-yellow { background-color: var(--term-yellow); }
.term-bg-blue { background-color: var(--term-blue); }
.term-bg-magenta { background-color: var(--term-magenta); }
.term-bg-cyan { background-color: var(--term-cyan); }
.term-bg-white { background-color: var(--term-white); }

.term-bg-bright-black { background-color: var(--term-bright-black); }
.term-bg-bright-red { background-color: var(--term-bright-red); }
.term-bg-bright-green { background-color: var(--term-bright-green); }
.term-bg-bright-yellow { background-color: var(--term-bright-yellow); }
.term-bg-bright-blue { background-color: var(--term-bright-blue); }
.term-bg-bright-magenta { background-color: var(--term-bright-magenta); }
.term-bg-bright-cyan { background-color: var(--term-bright-cyan); }
.term-bg-bright-white { background-color: var(--term-bright-white); }

/* Terminal styles */
.term-bold { font-weight: bold; }
.term-dim { opacity: 0.7; }
.term-italic { font-style: italic; }
.term-underline { text-decoration: underline; }
.term-blink { animation: blink 1s step-start infinite; }
.term-hidden { visibility: hidden; }
.term-strike { text-decoration: line-through; }

.command-input-wrapper {
	position: relative;
	margin-top: -0.5em;
}
.command-input-wrapper .command-input {
	color: var(--terminal-in);
	background: var(--terminal-bg);
	border: 1px solid var(--terminal-border);
	padding: 0.75em 8em 0.75em 5.5em;
	width: 100%;
	border-radius: 0 0 8px 8px;
}
.command-input-wrapper .command-prefix-label {
	position: absolute;
	color: var(--terminal-in);
	left: 0.5em;
	top: 0.35em;
}
.command-input-wrapper .command-send-btn {
	position: absolute;
	right: 0;
	top: 0;
}
.autocomplete-dropdown {
	position: absolute;
	bottom: 100%;
	left: 0;
	right: 0;
	background: var(--terminal-bg);
	border: 1px solid var(--terminal-border);
	border-top: none;
	border-radius: 0 0 8px 8px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: 0 -8px 8px rgba(0, 0, 0, 0.6);
	font-size: 0.75rem;
}
.autocomplete-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.autocomplete-list li {
	padding: 0.5em 0.75em;
	color: var(--terminal-in);
	cursor: pointer;
	transition: background-color 0.15s ease;
	border-left: 3px solid transparent;
	margin-left: 5.5em;
	padding-left: calc(0.75em - 3px);
}
.autocomplete-list li:hover,
.autocomplete-list li.active {
	background-color: rgba(0, 150, 255, 0.15);
	border-left-color: #0096ff;
}
.autocomplete-list li.active {
	background-color: rgba(0, 150, 255, 0.25);
}

.autocomplete-list li .command {
	font-weight: bold;
}
.autocomplete-list li .help {
	opacity: 0.8;
}

/* </editor-fold> */



/* ==========================
   Forms / Buttons / Controls
   ========================== */
.form-group {
	margin-bottom: 1.5rem;
	display: flex;
	flex-wrap: wrap;
}

.form-group label {
	flex: 19;
	order: 2;
	margin: 0 0 0.5rem 0;
	font-weight: 500;
	color: var(--text-primary);
	font-size: 0.9375rem;
	letter-spacing: -0.01em;
}

.form-group .form-values label {
	color: var(--input);
	line-height: 2rem;
}

.form-group input[type=text],
.form-group input[type=password],
.form-group input[type=date],
.form-group input[type=datetime],
.form-group input[type=time],
.form-group input[type=email],
.form-group input[type=number],
.form-group input[type=search],
.form-group select,
.form-group textarea,
.form-group .form-values {
	flex: 20 100%;
	order: 3;
	padding: 0.75rem 1rem;
	border: 1px solid var(--input-border);
	border-radius: 8px;
	font-size: 0.9375rem;
	background: var(--input-bg);
	color: var(--input);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: all 0.2s ease;
	font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
	outline: none;
	background: var(--input-focus-bg);
	border-color: var(--input-focus-border);
	box-shadow: 0 0 0 3px var(--input-focus-shadow);
	color: var(--input-focus);
}

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

/* Style for select dropdown options */
.form-group select option {
	background: #1e293b;
	color: #cbd5e1;
}

.form-group select option:checked {
	background: linear-gradient(#6366f1, #6366f1);
	color: #ffffff;
}

.form-group input[type=checkbox] {
	flex: 1 1rem;
	order: 1;
	margin-right: 0.5rem;
	cursor: pointer;
	width: 1.125rem;
	height: 1.125rem;
	accent-color: var(--primary);
}

.form-group p {
	flex: 5 100%;
	margin-top: 0.5rem;
	color: var(--muted);
	font-size: 0.875rem;
	order: 4;
}

.btn-primary {
	background: var(--primary);
	color: white;
	border: none;
	font-weight: 600;
	letter-spacing: -0.01em;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	position: relative;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
	background: var(--primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}


button, a.button {
	border: 1px solid var(--button-border);
	padding: 0.5rem 0.875rem;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	font-size: 0.875rem;
	transition: all 0.2s ease;
	color: var(--button);
	background: var(--button-bg-1);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
}
a.button {
	text-decoration: none;
}
button:hover, a.button:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	background: var(--button-bg-2);
}
button:active, a.button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
button.disabled, a.button.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}
button.active, a.button.active {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	background: var(--button-bg-2);
}


.button-group {
	display: flex;
}
.button-group button {
	margin: 0;
	border-radius: 0;
	flex: 1;
	border-width: 1px 0;
}
.button-group button:first-of-type {
	border-radius: 5px 0 0 5px;
	border-width: 1px 0 1px 1px;
}
.button-group button:last-of-type {
	border-radius: 0 5px 5px 0;
	border-width: 1px 1px 1px 0;
}

button.action-configure, a.button.action-configure,
button.action-edit, a.button.action-edit {
	background: var(--button-config-bg-1);
	color: var(--button-config);
	border-color: var(--button-config-border);
}
button.action-configure:hover, a.button.action-configure:hover,
button.action-edit:hover, a.button.action-edit:hover {
	background: var(--button-config-bg-2);
	box-shadow: 0 2px 8px var(--button-config-shadow);
	border-color: var(--button-config-border);
}

button.action-configure i, button.action-configure span,
button.action-edit i, button.action-edit span {
	color: inherit;
}

button.action-create, a.button.action-create {
	background: var(--button-create-bg-1);
	color: var(--button-create);
	border-color: var(--button-create-border);
}
button.action-create:hover, a.button.action-create:hover {
	background: var(--button-create-bg-2);
	box-shadow: 0 2px 8px var(--button-create-shadow);
	border-color: var(--button-create-border);
}

button.action-create i, button.action-create span {
	color: inherit;
}

button.action-start, a.button.action-start {
	background: var(--button-start-bg-1);
	color: var(--button-start);
	border-color: var(--button-start-border);
}
button.action-start:hover, a.button.action-start:hover {
	background: var(--button-start-bg-2);
	box-shadow: 0 2px 8px var(--button-start-shadow);
	border-color: var(--button-start-border);
}

button.action-start i, button.action-start span {
	color: inherit;
}

button.action-stop, a.button.action-stop {
	background: var(--button-stop-bg-1);
	color: var(--button-stop);
	border-color: var(--button-stop-border);
}
button.action-stop:hover, a.button.action-stop:hover {
	background: var(--button-stop-bg-2);
	box-shadow: 0 2px 8px var(--button-stop-shadow);
	border-color: var(--button-stop-border);
}

button.action-stop i, button.action-stop span {
	color: inherit;
}

button.action-browse, a.button.action-browse {
	background: var(--button-browse-bg-1);
	color: var(--button-browse);
	border-color: var(--button-browse-border);
}
button.action-browse:hover, a.button.action-browse:hover {
	background: var(--button-browse-bg-2);
	box-shadow: 0 2px 8px var(--button-browse-shadow);
	border-color: var(--button-browse-border);
}

button.action-browse i, button.action-browse span {
	color: inherit;
}

button.action-remove, a.button.action-remove {
	background: var(--button-remove-bg-1);
	color: var(--button-remove);
	border-color: var(--button-remove-border);
}
button.action-remove:hover, a.button.action-remove:hover {
	background: var(--button-remove-bg-2);
	box-shadow: 0 2px 8px var(--button-remove-shadow);
	border-color: var(--button-remove-border);
}

button.action-remove i, button.action-remove span {
	color: inherit;
}

button.action-save, a.button.action-save {
	background: var(--button-save-bg-1);
	color: var(--button-save);
	border-color: var(--button-save-border);
}
button.action-save:hover, a.button.action-save:hover {
	background: var(--button-save-bg-2);
	box-shadow: 0 2px 8px var(--button-save-shadow);
	border-color: var(--button-save-border);
}

button.action-save i, button.action-save span {
	color: inherit;
}

button.action-cancel, a.button.action-cancel {
	background: var(--button-cancel-bg-1);
	color: var(--button-cancel);
	border-color: var(--button-cancel-border);
}
button.action-cancel:hover, a.button.action-cancel:hover {
	background: var(--button-cancel-bg-2);
	box-shadow: 0 2px 8px var(--button-cancel-shadow);
	border-color: var(--button-cancel-border);
}

button.action-cancel i, button.action-cancel span {
	color: inherit;
}

button.action-update, a.button.action-update {
	background: var(--button-update-bg-1);
	color: var(--button-update);
	border-color: var(--button-update-border);
}
button.action-update:hover, a.button.action-update:hover {
	background: var(--button-update-bg-2);
	box-shadow: 0 2px 8px var(--button-update-shadow);
	border-color: var(--button-update-border);
}

button.action-update i, button.action-update span {
	color: inherit;
}

button.action-backup, a.button.action-backup {
	background: var(--button-backup-bg-1);
	color: var(--button-backup);
	border-color: var(--button-backup-border);
}
button.action-backup:hover, a.button.action-backup:hover {
	background: var(--button-backup-bg-2);
	box-shadow: 0 2px 8px var(--button-backup-shadow);
	border-color: var(--button-backup-border);
}

button.action-restore, a.button.action-restore {
	background: var(--button-backup-bg-1);
	color: var(--button-backup);
	border-color: var(--button-backup-border);
}
button.action-restore:hover, a.button.action-restore:hover {
	background: var(--button-backup-bg-2);
	box-shadow: 0 2px 8px var(--button-backup-shadow);
	border-color: var(--button-backup-border);
}

/* Ensure icon visibility in link-control buttons */
button.link-control i,
button.link-control span {
	color: inherit;
}

/** <editor-fold desc="Option / Configuration Forms"> **/
.options-group {
	padding-bottom: 0.5rem;
	margin-bottom: 0.5rem;
	border-bottom: 1px solid var(--border-color);
}
.options-group .info-message {
	flex-wrap: wrap;
}
.options-group .info-message p {
	flex:1 100%;
}
.options-group .form-group {
	flex:1 100%;
}
.options-group .save-indicator {
	margin-left: 1rem;
	opacity: 0;
	transition: opacity 0.3s;
}
.options-group .saving .save-indicator {
	opacity: 1;
}
.options-group .saving .form-label {
	animation: blinker 1.5s infinite;
}
/** </editor-fold> **/


/* Loading spinner (general) */
.loading-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(0, 212, 255, 0.3);
	border-radius: 50%;
	border-top-color: var(--primary-strong);
	animation: spin 1s linear infinite;
}

.loading-spinner.small {
	width: 16px;
	height: 16px;
	border-top-color: #667eea;
	animation: spin 1s ease-in-out infinite;
}


/* ==========================
   Services and ports table
   ========================== */

#services-table .service.updating {
	animation: blinker 4s infinite;
}

.ports-table .active .port a,
.ports-table .active .port span,
.ports-table .active .proto {
	color: var(--status-running);
}
.ports-table .inactive .port a,
.ports-table .inactive .port span,
.ports-table .inactive .proto {
	color: var(--status-stopped);
}

.ports-table .port a {
	cursor: pointer;
}
.ports-table .port a i {
	opacity: 0;
	margin-left: 1rem;
}
.ports-table .port a:hover i {
	opacity: 1;
}
.ports-table .port input {
	display: none;
}
.ports-table .port.edit a {
	display: none;
}
.ports-table .port.edit input {
	display: inline-block;
}

.ports-table .form-group {
	margin: 0;
}
.ports-table .form-group input {
	max-width: 8rem;
}

.ports-table .actions span {
	margin-right: 1rem;
}

/** <editor-fold desc="Services Table - Modern Design"> **/

/* Table view */
#services-table .header {
	background: linear-gradient(135deg, var(--table-header-bg-1) 0%, var(--table-header-bg-2) 100%);
	border-bottom: 1px solid var(--table-border);
	color: var(--table-header);
	border-radius: 1rem 1rem 0 0;
}
#services-table.table-view .header,
#services-table.table-view .service-entry {
	display: grid;
	align-items: center;
	grid-template-areas: 'host icon name enabled status port players memory cpu actions';
	grid-template-columns: 12rem 3rem 1fr 4rem 9rem 5rem 5rem 5rem 3rem 13rem;
	gap: 2rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--table-border);
}
#services-table.table-view .service-entry {
	background-color: var(--table-row-bg-1);
}
#services-table.table-view .service-entry:nth-child(even) {
	background-color: var(--table-row-bg-2);
}
#services-table.table-view .service-entry:hover {
	background-color: var(--table-row-hover);
}
#services-table.table-view .no-services-available {
	display: flex;
}
#services-table.table-view .no-services-available .warning-message {
	flex: 1 100%;
}
#services-table.table-view .thumbnail {
	display: none;
}
#services-table.table-view .host {
	grid-area: host;
	padding-left: 1rem;
	overflow: hidden;
}
#services-table.table-view .icon {
	grid-area: icon;
	text-align: center;
}
#services-table.table-view .name {
	grid-area: name;
	overflow: hidden;
}
#services-table.table-view .enabled {
	grid-area: enabled;
	text-align: center;
}
#services-table.table-view .status {
	grid-area: status;
	text-align: center;
}
#services-table.table-view .port {
	grid-area: port;
	text-align: center;
}
#services-table.table-view .players {
	grid-area: players;
	text-align: center;
}
#services-table.table-view .memory {
	grid-area: memory;
	text-align: right;
}
#services-table.table-view .cpu {
	grid-area: cpu;
	text-align: right;
}
#services-table.table-view .actions {
	grid-area: actions;
	text-align: center;
	padding-right: 1rem;
}

/* Card view */
#services-table.card-view .header {
	display: none;
}
#services-table.card-view .body {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
	gap: 2rem;
}
#services-table.card-view .no-services-available .warning-message {
	flex: 1 100%;
}
#services-table.card-view .icon {
	display: none;
}
#services-table.card-view .enabled {
	display: none;
}
#services-table.card-view .status:before {
	content: 'STATUS';
	opacity: 0.5;
	display: block;
	color: var(--content);
}
#services-table.card-view .port:before {
	content: 'PORT';
	opacity: 0.5;
	display: block;
}
#services-table.card-view .players:before {
	content: 'PLAYERS';
	display: block;
	opacity: 0.5;
}
#services-table.card-view .memory:before {
	content: 'MEM';
	opacity: 0.5;
	display: block;
}
#services-table.card-view .cpu:before {
	content: 'CPU';
	opacity: 0.5;
	display: block;
}

/** </editor-fold> **/

/** <editor-fold desc="Hosts Table - Modern Design"> **/

/* Table View */
#hosts-table .header {
	background: linear-gradient(135deg, var(--table-header-bg-1) 0%, var(--table-header-bg-2) 100%);
	border-bottom: 1px solid var(--table-border);
	color: var(--table-header);
	border-radius: 1rem 1rem 0 0;
}
#hosts-table.table-view .header,
#hosts-table.table-view .host-entry {
	display: grid;
	align-items: center;
	grid-template-areas: 'hostname ip os cpu memory disk net actions';
	grid-template-columns: 1fr 8rem 19rem 8rem 8rem 8rem 8rem 7rem;
	gap: 1rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--table-border);
}
#hosts-table.table-view .host-entry {
	background-color: var(--table-row-bg-1);
}
#hosts-table.table-view .host-entry:nth-child(even) {
	background-color: var(--table-row-bg-2);
}
#hosts-table.table-view .host-entry:hover {
	background-color: rgba(99, 102, 241, 0.15);
}
#hosts-table.table-view .no-hosts-available {
	display: flex;
}
#hosts-table.table-view .no-hosts-available .warning-message {
	flex: 1 100%;
}
#hosts-table.table-view .thumbnail {
	display: none;
}
#hosts-table.table-view .header .hostname {
	padding-left: 2.2rem;
}
#hosts-table.table-view .hostname {
	grid-area: hostname;
	font-weight: 600;
}
#hosts-table.table-view .hostname img {
	width: 1.5rem;
	height: 1.5rem;
	margin-right: 0.5rem;
	vertical-align: middle;
}
#hosts-table.table-view .ip {
	grid-area: ip;
}
#hosts-table.table-view .os {
	grid-area: os;
	font-size: 0.9rem;
}
#hosts-table.table-view .cpu {
	grid-area: cpu;
	text-align: center;
}
#hosts-table.table-view .cpu .cpu-details {
	display: none;
}
#hosts-table.table-view .memory {
	grid-area: memory;
	text-align: center;
}
#hosts-table.table-view .memory .mem-bar {
	display: none;
}
#hosts-table.table-view .disk {
	grid-area: disk;
	text-align: center;
}
#hosts-table.table-view host-disks-metric .percentage {
	display: none;
}
#hosts-table.table-view .net {
	grid-area: net;
	text-align: center;
}
#hosts-table.table-view host-network-metric .net-tx {
	display: block;
}
#hosts-table.table-view .actions {
	grid-area: actions;
	text-align: center;
}
#hosts-table.table-view .advanced-disk {
	display: none;
}

/* Card View */
#hosts-table.card-view .header {
	display: none;
}
#hosts-table.card-view .body {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
	gap: 1.5rem;
}
#hosts-table.card-view .no-hosts-available {
	grid-column: 1 / -1;
}
#hosts-table.card-view .no-hosts-available .warning-message {
	flex: 1 100%;
}
#hosts-table.card-view .disk {
	display: none;
}

/** </editor-fold> **/

/** <editor-fold desc="Service/Host Status Colors"> **/

#services-table .status.status-running,
.service-details-overview .service-status .status-running,
.service-details-overview .service-port .status-good,
host-nexus-status .good,
host-connected-metric .good {
	color: var(--status-running);
}
#services-table .status.status-starting,
.service-details-overview .service-status .status-starting{
	color: var(--status-starting);
	animation: blinker 4s infinite;
}
#services-table .status.status-stopped,
.service-details-overview .service-status .status-stopped,
.service-details-overview .service-port .status-critical,
host-nexus-status .bad,
host-connected-metric .critical {
	color: var(--status-stopped);
}
#services-table .status.status-stopping,
.service-details-overview .service-status .status-stopping{
	color: var(--status-stopped);
	animation: blinker 4s infinite;
}

/** </editor-fold> **/

#services-table td.icon,
.ports-table td.icon {
	padding: 0.15rem 0.75rem;
}
#services-table .icon img,
.ports-table td.icon img {
	max-width: 2.5rem;
	max-height: 2.5rem;
	border-radius: 0.5rem;
}

#services-table th.age,
#services-table td.age {
	min-width: 4rem;
	text-align: right;
	transition: all 0.3s ease;
}

#services-table th.actions {
	text-align: center;
}

#services-table td.actions button {
	position: relative;
}
#services-table td.actions button i {
	transition: all 0.4s ease;
	position: absolute;
	display: block;
	width: 100%;
	margin-left: -0.8rem;
	margin-top: 2px;
}
#services-table td.actions button span {
	transition: all 0.4s ease;
	display: block;
	opacity: 0;
}
#services-table td.actions button:hover i {
	opacity: 0;
}
#services-table td.actions button:hover span {
	opacity: 1;
}

#services-table td.status.status-running,
#rulesContainer td.status-allow,
.ports-table .status-allowed,
#services-table td.age.status-fresh {
	color: var(--status-running);
}

#services-table td.status.status-starting {
	color: var(--status-starting);
	animation: blinker 4s infinite;
}

#services-table td.age.status-idle {
	color: var(--status-starting);
}

#services-table td.status.status-stopped,
#services-table td.age.status-disconnected,
#rulesContainer td.status-deny,
#rulesContainer td.status-reject {
	color: var(--status-stopped);
}

#services-table td.age.status-disconnected {
	color: var(--status-stopping);
	animation: blinker 4s infinite;
}

#services-table td.status.status-error {
	color: var(--status-critical);
}

#installAppHostList {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}
#installAppHostList .host-entry.compatible-host {
	cursor: pointer;
}

/** <editor-fold desc="Cards"> **/

/* ==========================
   Application/Host/Service/Mod cards

   .card-view .service-entry - Service cards listed on /dashboard when on card view
   .card-view .host-entry    - Host cards listed on /hosts when on card view
                             - Also used on /application/install when selecting the host
   .card-view .mod-entry     - Mods installed in services and for searching new mods
   ========================== */

#backupsList {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border-radius: 12px;
	background: var(--card-bg);
	border: 1px solid var(--content-border);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.backup-file-item {
	border-radius: 12px;
	display: flex;
	flex-wrap: wrap;
	padding: 0.5rem 1.5rem;
}
.backup-file-item .action-rename {
	opacity: 0;
	transition: opacity 0.3s ease;
	cursor: pointer;
}
.backup-file-item:hover {
	border-color: var(--content-hover-border);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
	background: var(--content-hover-bg);
}
.backup-file-item:hover .action-rename {
	opacity: 1;
}

.backup-file-item .file-name {
	flex: 3;
}

.backup-file-item .file-modified {
	flex: 2;
}
.backup-file-item .file-size {
	flex: 1;
}
.backup-file-item .file-actions {
	flex: 3;
}

/* Card container */
.card-view .service-entry,
.card-view .host-entry,
.card-view .application-entry,
.card-view .mod-entry {
	display: flex;
	flex-wrap: wrap;
	border-radius: 12px;
	padding: 0 1.5rem 1rem;
	transition: all 0.25s ease;
	position: relative;
	overflow: hidden;
	color: var(--content);
	background: var(--card-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--content-border);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	margin-bottom: 1rem;
	min-width: 0;
}
.card-view .host-entry:hover,
.card-view .service-entry:hover,
.card-view .application-entry:hover,
.card-view .mod-entry:hover {
	border-color: var(--content-hover-border);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
	background: var(--content-hover-bg);
}

/* Thumbnail container, fixed to the top of the container and full width */
.card-view .host-entry .thumbnail,
.card-view .service-entry .thumbnail,
.card-view .application-entry .thumbnail {
	position: absolute;
	width: 100%;
	height: 7rem;
	margin: 0 -1.5rem;
	overflow: hidden;
	z-index: 1;
	border-radius: 12px 12px 0 0;
}
.card-view .host-entry .thumbnail img,
.card-view .service-entry .thumbnail img,
.card-view .application-entry .thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.4);
}

/* Card primary name, displayed at the top over the thumbnail */
.card-view .service-entry .name,
.card-view .host-entry .hostname,
.card-view .application-entry .name,
.card-view .mod-entry .mod-header {
	order: 1;
	z-index: 2;
	flex: 4 100%;
	height: 4.5rem;
	font-weight: bold;
	font-size: 1.25rem;
	text-align: center;
	/* Use flexbox for alignment */
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 0;
	overflow: hidden;
}


/* Some cards have a small image in their primary name */
.card-view .host-entry .hostname img {
	width: 1.5rem;
	height: 1.5rem;
	margin-right: 0.5rem;
}

/* Some cards have a medium image in their primary name */
.card-view .mod-entry .mod-header img {
	width: 3rem;
	height: 3rem;
	margin-right: 0.5rem;
}

/* Card descriptor, displayed over the thumbnail below the title in smaller text */
.card-view .host-entry .ip,
.card-view .service-entry .host,
.card-view .application-entry .description {
	order: 2;
	z-index: 2;
	flex: 4 100%;
	height: 4rem;
	text-align: center;
}

/* Body elements that are 4-columns wide */
.card-view .host-entry .os,
.card-view .host-entry .cpu,
.card-view .host-entry .memory,
.card-view .host-entry .net,
.card-view .host-entry .disks,
.card-view .host-entry .advanced-disk,
.card-view .host-entry .status,
.card-view .host-entry .nexus,
.card-view .host-entry p,
.card-view .application-entry ul {
	order: 10;
	z-index: 2;
	flex: 1 100%;
	margin-bottom: 1.25rem;
}


/* Body elements that are 2-columns wide */
.card-view .service-entry .status,
.card-view .service-entry .port,
.card-view .service-entry .players {
	order: 10;
	z-index: 2;
	flex: 2 40%;
	margin-bottom: 1.25rem;
}

/* Body elements that are 1-column wide */
.card-view .service-entry .memory,
.card-view .service-entry .cpu {
	order: 10;
	z-index: 2;
	flex: 1 20%;
	margin-bottom: 1rem;
}

/* Content-specific styles for common elements */
.card-view .host-entry host-memory-metric::before,
.card-view .host-entry host-cpu-metric::before,
.card-view .host-entry host-network-metric::before,
.card-view .host-entry host-disk-metric::before,
.card-view .host-entry host-disks-metric::before,
.card-view .host-entry host-connected-metric::before,
.card-view .host-entry host-nexus-status::before {
	content: attr(data-title);
	font-weight: bold;
	color: var(--muted);
}
.card-view .host-entry host-cpu-metric .cpu-details {
	font-size: 0.85rem;
	color: var(--muted);
	margin-top: 0.25rem;
}
#hosts-table.card-view host-network-metric {
	display: inline-block;
}
.card-view .host-entry host-disk-metric .percentage,
.card-view .host-entry host-disks-metric .percentage {
	padding-left: 0.5em;
}

.card-view .mod-entry .mod-meta {
	order: 3;
	z-index: 2;
	flex: 4 100%;
	text-align: center;
}
.card-view .mod-entry .mod-description {
	order: 4;
	z-index: 2;
	flex: 4 100%;
	padding: 0.5rem 0;
}
.card-view .mod-entry .mod-author {
	order: 5;
	z-index: 2;
	flex: 4 100%;
	opacity: 0.8;
}
.card-view .mod-entry .mod-message {
	order: 6;
	z-index: 2;
	flex: 4 100%;
}

/* Action buttons at the bottom of the card */
.card-view .host-entry .actions,
.card-view .service-entry .actions,
.card-view .application-entry .actions,
.card-view .mod-entry .actions {
	order: 99;
	z-index: 2;
	margin-left: auto;
	border-top: 1px solid var(--table-border);
	flex: 2 100%;
	padding: 1rem;
}
.card-view .host-entry .actions button,
.card-view .service-entry .actions button,
.card-view .application-entry .actions button,
.card-view .mod-entry .actions button {
	margin: 0.25rem;
}

/** </editor-fold> **/



/* ==========================
   File browser / viewer / editor
   ========================== */
.files-container {
	max-width: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	height: calc(100vh - 80px);
	overflow: hidden;
}

.file-browser {
	color: var(--content);
	background: var(--content-bg);
}
.files-layout {
	display: flex;
	height: 100%;
	overflow: hidden;
	position: relative;
}

.files-layout .card-header {
	padding: 1rem;
}

.path-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--content-border);
	padding-bottom: 1rem;
}
.path-controls .current-path {
	flex: 1;
	font-size: 0.9rem;
	padding: 0.5rem 1rem;
	border-radius: .5rem;
	color: var(--input);
	background: var(--input-bg);
	border: 1px solid var(--input-border);
}
.path-controls .action-buttons {
	flex: 1;
	text-align: right;
	margin-right: 1rem;
}

.file-viewer-card {
	display: flex;
	flex: 1;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
}

.file-viewer-card .card-header {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	flex-shrink: 0;
	min-height: fit-content;
	border-bottom: 1px solid rgba(0, 150, 255, 0.1);
}

.file-viewer-card .card-header h2 {
	flex-shrink: 0;
	margin: 0;
	font-size: 1.25rem;
	white-space: nowrap;
}

.file-viewer-card .card-header > div:last-child {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	flex: 1;
	justify-content: flex-end;
}

.file-viewer-card .search-bar {
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	flex-wrap: nowrap;
}

.file-viewer-card .search-bar .search-input {
	min-width: 150px;
	flex-shrink: 0;
	background: var(--input-bg) !important;
	color: var(--input) !important;
	border: 1px solid var(--input-border) !important;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.file-viewer-card .search-bar .search-input:focus {
	background: var(--input-focus-bg) !important;
	color: var(--input-focus) !important;
	border-color: var(--input-focus-border) !important;
	box-shadow: 0 0 0 3px var(--input-focus-shadow) !important;
	outline: none !important;
}

.file-viewer-card .search-bar .search-input::placeholder {
	color: var(--input-placeholder) !important;
}

.file-viewer-card #viewerActions {
	display: flex !important;
	gap: 0.5rem;
	flex-shrink: 0;
	flex-wrap: nowrap;
}

.file-viewer-card #viewerActions button {
	white-space: nowrap;
	flex-shrink: 0;
}
.file-viewer-card .file-preview {
	display: none;
	flex: 1;
	overflow: auto;
	padding: 1.5rem;
	background: var(--content-bg);
	color: var(--content);
}
.file-viewer-card .file-preview .file-icon {
	font-size: 4rem;
	margin-bottom: 1rem;
}
.file-viewer-card .file-preview .file-content {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
}
.file-viewer-card .file-preview .file-content img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.file-viewer-card .file-preview .file-content video {
	max-width: 100%; max-height: calc(100vh - 300px); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.file-viewer-card .file-preview .file-info {
	margin: 1rem 0;
}
.file-viewer-card .file-preview .file-info ul {
	list-style: none;
}

.file-browser {
	display: grid;
	grid-template-columns: 300px 1fr;
	height: 600px;
}

.sidebar-browser {
	border-right: 1px solid var(--content-border);
	padding: 1rem;
	overflow-y: auto;
}

.quick-paths {
	margin-bottom: 1.5rem;
}

.quick-paths h4 {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.quick-path-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem;
	margin-bottom: 0.25rem;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
	border: 1px solid transparent;
	font-weight: 500;
}

.quick-path-item:hover {
	background: var(--content-hover-bg);
	border: 1px solid var(--content-hover-border);
	color: var(--content-hover);
	text-shadow: 0 0 8px rgba(0, 150, 255, 0.3);
}

.main-browser {
	padding: 1rem;
	overflow-y: auto;
	height: calc(100vh - (117px + 2rem));
}

#service-details-files {
	position: relative;
}

.file-list {
	display: grid;
	gap: 0.5rem;
	position: relative;
	min-height: 15rem;
}

.file-list .loading-spinner {
	margin: 0 auto;
	width: 6rem;
	height: 6rem;
	border-width: 1rem;
}

.file-item {
	display: grid;
	grid-template-areas: 'icon name owner permissions size modified actions'
		'symlink symlink symlink symlink symlink symlink symlink';
	grid-template-columns: 20px 1fr 10rem 4rem 6rem 11rem 1rem;
	gap: 0.5rem;
	padding: 0.15rem 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	align-items: center;
	border: 1px solid transparent;
	color: var(--content);
}
.file-item:hover,
.file-item.active {
	background: var(--content-hover-bg);
	border-color: var(--content-hover-border);
}

/* Show/hide hidden files based on if "show-hidden" is present on the parent container */
.file-list .file-item[data-hidden="1"] {
	display: none;
}
.file-list.show-hidden .file-item[data-hidden="1"] {
	display: grid;
}

.file-item .file-icon {
	grid-area: icon;
}
.file-item .file-name {
	grid-area: name;
	font-size: 1rem;
}
.file-item:hover .file-name {
	color: var(--content-hover);
}
.file-item .file-size {
	grid-area: size;
	text-align: right;
	font-size: 0.85rem;
	margin-right: 0.5rem;
}
.file-item .file-owner {
	grid-area: owner;
	font-size: 0.85rem;
}
.file-item .file-permissions {
	grid-area: permissions;
	font-size: 0.85rem;
}
.file-item .file-modified {
	grid-area: modified;
	font-size: 0.85rem;
}
.file-item .three-dot-btn {
	grid-area: actions;
	text-align: right;
}
.file-item:hover .three-dot-btn {
	color: var(--content-hover);
}
.file-item .file-symlink-note {
	grid-area: symlink;
	font-size: 0.85rem;
}
.file-item .file-symlink-note:before {
	content: '→ ';
}

.file-icon {
	width: 20px;
	text-align: center;
	color: #666;
}

.file-browser .quick-path-item img {
	max-width: 36px;
	max-height: 36px;
	border-radius: 6px;
}

.file-preview, .file-editor {
	margin-top: 2rem;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 150, 255, 0.2);
	overflow: hidden;
}

.file-preview {
	background: rgba(22, 33, 62, 0.95);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(0, 150, 255, 0.3);
}

.preview-header, .editor-header {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid rgba(0, 150, 255, 0.2);
	background: rgba(0, 150, 255, 0.05);
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--primary);
	font-family: 'Orbitron', monospace;
	font-weight: 600;
	text-shadow: 0 0 8px rgba(0, 150, 255, 0.3);
}

.preview-content {
	padding: 1rem;
	max-height: 400px;
	overflow-y: auto;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 0.9rem;
	line-height: 1.5;
	background: rgba(15, 23, 42, 0.8);
	color: #e2e8f0;
	white-space: pre-wrap;
	word-wrap: break-word;
	border: 1px solid rgba(0, 150, 255, 0.1);
}

.editor-textarea {
	width: 100%;
	height: 400px;
	padding: 1rem;
	border: 1px solid rgba(0, 150, 255, 0.1);
	resize: vertical;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 0.9rem;
	line-height: 1.5;
	background: rgba(15, 23, 42, 0.8);
	color: #e2e8f0;
	outline: none;
	border-radius: 0;
}

.editor-textarea:focus {
	border-color: rgba(0, 150, 255, 0.5);
	box-shadow: 0 0 15px rgba(0, 150, 255, 0.2);
}

.editor-info {
	padding: 0.75rem 1.5rem;
	background: rgba(0, 150, 255, 0.05);
	border-top: 1px solid rgba(0, 150, 255, 0.2);
	font-size: 0.8rem;
	color: var(--muted);
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: 'Rajdhani', sans-serif;
}

/* ==========================
   Context menu / three-dot menu / action buttons
   ========================== */
.context-menu {
	position: absolute;
	background: var(--content-bg);
	backdrop-filter: blur(20px);
	border: 1px solid var(--content-border);
	border-radius: 0;
	padding: 0;
	box-shadow: 2px 2px 6px var(--content-shadow);
	z-index: 10000;
	display: none;
	min-width: 200px;
}

.context-menu.show {
	display: block;
}

.context-menu button {
	border: none;
	width: 100%;
	border-radius: 0;
	display: flex;
	padding: 0.75rem;
}
.context-menu button:hover {
	transform: scale(1.05);
}
.context-menu button i {
	flex: 1;
}
.context-menu button span {
	flex: 3;
	text-align: left;
}

.three-dot-btn {
	background: none;
	border: none;
	color: var(--muted);
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-size: 1.1rem;
}

.three-dot-btn:hover {
	background: rgba(0, 150, 255, 0.2);
	color: var(--primary);
}

/* ==========================
   Utilities / messages / uploads
   ========================== */
.info-message {
	color: var(--status-neutral);
	padding: 1rem 1.25rem;
	background: var(--status-neutral-bg-1);
	border: 1px solid var(--status-neutral-bg-2);
	border-left: 4px solid var(--status-neutral);
	border-radius: 8px;
	margin: 1rem 0;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.info-message a {
	color: var(--status-neutral);
	text-decoration: underline;
}

.success-message {
	color: var(--status-good);
	padding: 1rem 1.25rem;
	background: var(--status-good-bg-1);
	border: 1px solid var(--status-good-bg-2);
	border-left: 4px solid var(--status-good);
	border-radius: 8px;
	margin: 1rem 0;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.success-message a {
	color: var(--status-good);
	text-decoration: underline;
}

.error-message {
	color: var(--status-critical);
	padding: 1rem 1.25rem;
	background: var(--status-critical-bg-1);
	border: 1px solid var(--status-critical-bg-2);
	border-left: 4px solid var(--status-critical);
	border-radius: 8px;
	margin: 1rem 0;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.error-message a {
	color: var(--status-critical);
	text-decoration: underline;
}

.warning-message {
	color: var(--status-warning);
	padding: 1rem 1.25rem;
	background: var(--status-warning-bg-1);
	border: 1px solid var(--status-warning-bg-2);
	border-left: 4px solid var(--status-warning);
	border-radius: 8px;
	margin: 1rem 0;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.warning-message a {
	color: var(--status-warning);
	text-decoration: underline;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--primary);
	text-decoration: none;
	margin-bottom: 1rem;
	font-weight: 500;
	transition: all 0.2s ease;
	padding: 0.5rem 0.875rem;
	border-radius: 6px;
}

.back-link:hover {
	color: var(--primary-hover);
	background: rgba(99, 102, 241, 0.1);
}

.link-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	text-decoration: none;
	transition: all 0.2s ease;
}

.link-control button {
	color: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.upload-progress {
	text-align: center;
}

.upload-status {
	color: var(--muted);
	margin-bottom: 1rem;
	font-weight: 500;
}

.progress-bar {
	width: 100%;
	height: 8px;
	background: rgba(0, 0, 0, 0.4);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--primary), var(--primary-strong));
	width: 0%;
	transition: width 0.3s ease;
}

.upload-file-list {
	text-align: left;
	max-height: 200px;
	overflow-y: auto;
}

.upload-file-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem;
	margin-bottom: 0.5rem;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	border-left: 3px solid rgba(0, 150, 255, 0.3);
	position: relative;
}

.upload-file-item .upload-file-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--primary-strong));
	width: 0;
	transition: width 0.3s ease;
	border-radius: 0 0 6px 6px;
}

.upload-file-name {
	color: #e2e8f0;
	font-weight: 500;
}

.upload-file-size {
	color: var(--muted);
	font-size: 0.9rem;
}

.action-btn {
	background: none;
	border: none;
	color: var(--primary);
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 4px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8rem;
	font-family: 'Rajdhani', sans-serif;
	text-shadow: 0 0 8px rgba(0, 150, 255, 0.3);
}

.action-btn:hover {
	background: rgba(0, 150, 255, 0.15);
	color: var(--primary-strong);
	text-shadow: 0 0 12px rgba(0, 150, 255, 0.6);
}

.logs-controls {
	display: flex;
	gap: 3rem;
	margin-bottom: 0.5rem;
}
.logs-controls button {
	white-space: nowrap;
}

/* ==========================
   Host List
   ========================== */

#hostsList .host-row {
	display: grid;
	grid-template-columns: 1fr 320px 160px;
	gap: 16px;
	align-items: center;
	padding: 12px;
	border-radius: 8px;
}
#hostsList .host-meta {
	position: relative;
	display:flex;
	flex-direction: column;
	gap:6px;
	height: 100%;
}
#hostsList .host-meta .host-title {
	display:flex;
	gap:8px;
	align-items:baseline;
	z-index: 2;
}
#hostsList .host-meta .host-os {
	z-index: 2;
}

/** <editor-fold desc="Service Details"> **/

.service-details-overview {
	display: flex;
	gap: 3rem;
	margin: 2rem 3rem;
	flex-wrap: wrap;
}

.service-details-overview .metric-label {
	opacity: 0.7;
	font-variant: small-caps;
	margin-bottom: 0.5rem;
	min-width: 7rem;
	text-align: center;
}
.service-details-overview .metric-value {
	font-size: 1.25rem;
	min-width: 7rem;
	text-align: center;
	display: block;
}

#serviceModsCurrentMods .card-view,
#serviceModsSearchResults {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
	gap: 2rem;
}

/** </editor-fold> **/

/** <editor-fold desc="Host Details"> **/

.host-details-overview {
	display: flex;
	gap: 3rem;
	margin: 2rem 3rem;
	flex-wrap: wrap;
}

.host-details-overview .metric-label {
	opacity: 0.7;
	font-variant: small-caps;
	margin-bottom: 0.5rem;
	min-width: 7rem;
	text-align: center;
}

.host-details-overview .metric-value {
	font-size: 1.25rem;
	min-width: 7rem;
	text-align: center;
	display: block;
}
.host-details-overview host-disk-metric .percentage {
	padding-left: 0.5em;
	font-size: 1rem;
}

.host-details-info-grid {
	display: flex;
	gap: 3rem;
	margin: 2rem 3rem;
	flex-wrap: wrap;
}
.host-details-info-grid .label {
	opacity: 0.7;
	font-variant: small-caps;
	margin-bottom: 0.5rem;
}

.host-details-info-grid .value {
	font-size: 1.25rem;
}

#applicationsContainer {
	margin-bottom: 3rem;
}

#hostApplicationsList {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
	gap: 1rem;
	margin: 2rem 3rem;
}

/** </editor-fold> **/

/** <editor-fold desc="Details Shared"> **/

host-nexus-status .help-link {
	color: var(--primary);
	padding-left: 0.5em;
}
host-nexus-status .help-link:hover {
	color: var(--primary-hover);
}

#hostNexusStatusContainer host-nexus-status {
	display: flex;
	align-items: center;
}
#hostNexusStatusContainer host-nexus-status i.bad,
#hostNexusStatusContainer host-nexus-status i.good {
	font-size: 3rem;
	padding-right: 1rem;
}

/* Target the inner container of the auth settings */
#hostNexusAuthSettings .inner {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	/* Smooth transition for both height and opacity */
	transition: max-height 0.4s ease-out, opacity 0.3s ease;
}

/* When the 'active' class is added to the parent div */
#hostNexusAuthSettings.active .inner {
	/* Set this to a value larger than your expected content height */
	max-height: 1000px;
	opacity: 1;
}

/* Prepare the chevron icon for rotation */
#hostNexusAuthSettings i.fa-chevron-down {
	display: inline-block; /* Required for transform to work reliably */
	transition: transform 0.3s ease;
}

/* Rotate the icon when active */
#hostNexusAuthSettings.active i.fa-chevron-down {
	transform: rotate(180deg);
}


.tabs-header {
	display: flex;
	border-bottom: 1px solid var(--border-color);
	gap: 1rem;
	background-color: var(--navbar-bg);
	margin-bottom: 2rem;
	opacity: 0.7;
}

.tabs-header a {
	color: var(--nav);
	padding: 1rem 1rem;
	border-bottom: 3px solid transparent;
	display: flex;
	align-items: center;
	text-decoration: none;
}

.tabs-header a.active,
.tabs-header a:hover {
	border-bottom: 3px solid var(--nav-hover);
	color: var(--nav-hover);
}

.tabs-header a i {
	padding-right: 0.5rem;
}

.tab-target {
	min-height: 10rem;
}

.modal-body .CodeMirror {
	height: 100%;
}

#fileEditorStatus {
	flex: 1;
	opacity: 0.7;
	font-size: 0.875rem;
}

#firewallTableBody .icon img {
	width: 2rem;
	height: 2rem;
}
#firewallTableBody .port .configurable-port {
	cursor: pointer;
}
#firewallTableBody .configurable-port .edit-icon {
	margin-left: 1rem;
	opacity: 0;
}
#firewallTableBody .configurable-port:hover .edit-icon {
	opacity: 1;
}
#firewallTableBody .port .port-input {
	display: none;
}
#firewallTableBody .port.edit .configurable-port {
	display: none;
}
#firewallTableBody .port.edit .port-input {
	display: block;
}
#firewallTableBody .actions .status-allowed {
	color: var(--status-good);
	margin-right: 1rem;
}

/** </editor-fold> **/




/** <editor-fold desc="Modals"> **/

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1000;
	align-items: center;
	justify-content: center;
	display: none;
	background: rgba(10, 11, 15, 0.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.modal.show {
	display: flex;
}

.modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: transparent;
}

.modal-content {
	position: relative;
	background: var(--content-bg);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--content-border);
	border-radius: 16px;
	box-shadow: 
		0 20px 25px -5px rgba(0, 0, 0, 0.3),
		0 10px 10px -5px rgba(0, 0, 0, 0.2),
		0 0 0 1px rgba(99, 102, 241, 0.1);
	width: 90%;
	max-width: 500px;
	max-height: 80vh;
	overflow: auto;
	animation: modalSlideIn 0.2s ease-out;
}
.modal.wide .modal-content {
	max-width: 80vw;
}

.modal-header {
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--content-border);
	background: var(--header-bg-1);
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-radius: 16px 16px 0 0;
	max-height: 5rem;
}

.modal-header h3 {
	color: var(--header);
	font-weight: 600;
	font-size: 1.125rem;
	letter-spacing: -0.015em;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
}

.modal-header .modal-close {
	background: none;
	border: none;
	color: var(--muted);
	font-size: 1.25rem;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 6px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
}

.modal-header .modal-close:hover {
	color: var(--text-primary);
	background: rgba(99, 102, 241, 0.1);
}

.modal-body {
	padding: 1.5rem;
	color: var(--content);
	max-height: calc(80vh - 13rem);
	overflow: scroll;
}

.modal-footer {
	padding: 1.25rem 1.5rem;
	border-top: 1px solid var(--content-border);
	background: rgba(10, 11, 15, 0.3);
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	border-radius: 0 0 16px 16px;
	max-height: 5rem;
}

/* </editor-fold> */

/** <editor-fold desc="Simple Graphs"> **/

.bargraph-h {
	width: 100%;
	height: 0.5rem;
	background: var(--graph-bg);
	border-radius: 0.25rem;
	overflow: hidden;
	position: relative;
}
.bargraph-h .fill {
	height: 100%;
	transition: width 4s linear;
}
.bargraph-h .fill.good {
	background: linear-gradient(90deg, var(--status-good), var(--status-good-bg-2));
}
.bargraph-h .fill.warning {
	background: linear-gradient(90deg, var(--status-warning), var(--status-warning-bg-2));
}
.bargraph-h .fill.critical {
	background: linear-gradient(90deg, var(--status-critical), var(--status-critical-bg-2));
}

/** </editor-fold> **/

/* ==========================
   Theme selector (bottom-left floating)
   ========================== */
.theme-selector {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 10050;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.theme-selector-toggle {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--navbar-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	color: var(--nav);
	border: 1px solid var(--navbar-border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 
		0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06),
		0 0 0 1px rgba(99, 102, 241, 0.1);
	transition: all 0.2s ease;
	font-size: 1.125rem;
}
.theme-selector-toggle:hover {
	box-shadow: 
		0 10px 15px -3px rgba(0, 0, 0, 0.15),
		0 4px 6px -2px rgba(0, 0, 0, 0.1),
		0 0 0 1px rgba(99, 102, 241, 0.2);
	transform: translateY(-2px);
	border-color: var(--primary);
	color: var(--primary-hover);
}
.theme-selector-toggle:focus {
	outline: none;
	box-shadow: 
		0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06),
		0 0 0 3px rgba(99, 102, 241, 0.2);
}

.theme-panel {
	display: none;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.75rem;
	border-radius: 12px;
	background: var(--content-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--content-border);
	box-shadow: 
		0 10px 15px -3px rgba(0, 0, 0, 0.2),
		0 4px 6px -2px rgba(0, 0, 0, 0.1),
		0 0 0 1px rgba(99, 102, 241, 0.1);
	min-width: 140px;
}

.theme-panel.show {
	display: flex;
}

.theme-item {
	padding: 0.625rem 1rem;
	border-radius: 8px;
	background: transparent;
	color: var(--content);
	cursor: pointer;
	font-weight: 500;
	font-size: 0.9375rem;
	letter-spacing: -0.01em;
	transition: all 0.2s ease;
	border: 1px solid transparent;
	text-align: left;
}

.theme-item:hover, .theme-item:focus {
	background: var(--content-hover-bg);
	border: 1px solid var(--content-hover-border);
	color: var(--content-hover);
	outline: none;
}

/* ==========================
   UI / Toasts
   ========================== */
#toast-container {
	position: fixed;
	left: 50%;
	bottom: 2rem;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	z-index: 9999;
	pointer-events: none;
	width: calc(100% - 48px);
	max-width: 900px;
	padding: 0 12px;
}

.toast {
	pointer-events: auto;
	min-width: 280px;
	max-width: 768px;
	width: auto;
	color: #ffffff;
	background: rgba(15, 17, 25, 0.95);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	padding: 1rem 1.25rem;
	border-radius: 12px;
	border: 1px solid rgba(99, 102, 241, 0.2);
	box-shadow: 
		0 10px 15px -3px rgba(0, 0, 0, 0.3),
		0 4px 6px -2px rgba(0, 0, 0, 0.2),
		0 0 0 1px rgba(99, 102, 241, 0.1);
	transform: translateY(20px);
	opacity: 0;
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 250ms ease;
	align-items: center;
	gap: 0.875rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	cursor: pointer;
}

.toast .toast-title {
	font-weight: bold;
	text-align: center;
}
.toast .toast-message {
	white-space: pre-wrap;
}

.toast.show {
	transform: translateY(0);
	opacity: 1;
}

.toast--success {
	background: rgba(16, 185, 129, 0.15);
	border-color: var(--status-good);
	color: var(--status-good);
	box-shadow: 0 4px 20px 0 var(--status-good);
}

.toast--error {
	background: rgba(239, 68, 68, 0.15);
	border-color: var(--status-critical);
	color: var(--status-critical);
	box-shadow: 0 4px 20px 0 var(--status-critical);
}

.toast--warning {
	background: rgba(245, 158, 11, 0.15);
	border-color: var(--status-warning);
	color: var(--status-warning);
	box-shadow: 0 4px 20px 0 var(--status-warning);
}

.toast--info {
	background: rgba(59, 130, 246, 0.15);
	border-color: var(--status-neutral);
	color: var(--status-neutral);
	box-shadow: 0 4px 20px 0 var(--status-neutral);
}


/** Settings Page **/
.version-infos {
	display: flex;
	gap: 1.5rem;
	align-content: space-between;
}
.version-infos span {
	flex: 1;
	text-align: center;
}

/* Target the inner container of the auth settings */
#settingsNexusAuthSettings .inner {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	/* Smooth transition for both height and opacity */
	transition: max-height 0.4s ease-out, opacity 0.3s ease;
}

/* When the 'active' class is added to the parent div */
#settingsNexusAuthSettings.active .inner {
	/* Set this to a value larger than your expected content height */
	max-height: 1000px;
	opacity: 1;
}

/* Prepare the chevron icon for rotation */
#settingsNexusAuthSettings i.fa-chevron-down {
	display: inline-block; /* Required for transform to work reliably */
	transition: transform 0.3s ease;
}

/* Rotate the icon when active */
#settingsNexusAuthSettings.active i.fa-chevron-down {
	transform: rotate(180deg);
}

/* ==========================
   Metrics Modal
   ========================== */

#metricsCharts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	align-content: start;
}

.chart-container {
	background: var(--card-bg);
	padding: 15px;
	border-radius: 8px;
	border: 1px solid var(--content-border);
	display: flex;
	flex-direction: column;
	height: 350px;
}

.chart-container h4 {
	margin: 0 0 15px 0;
	color: var(--header);
	font-family: 'Orbitron', sans-serif;
	font-size: 1rem;
	text-align: center;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex-shrink: 0;
}

.chart-container > div {
	flex: 1;
	position: relative;
	min-height: 0;
}

.chart-container canvas {
	max-height: none !important;
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
}



/** <editor-fold desc="Responsive Design"> **/

@media (max-height: 500px) {
	.navbar {
		position: inherit;
	}
}

@media (max-width: 1550px) {
	#services-table.table-view .header,
	#services-table.table-view .service-entry {
		grid-template-areas: 'host icon name enabled status players memory cpu actions';
		grid-template-columns: 12rem 3rem 1fr 4rem 9rem 5rem 5rem 3rem 13rem;
	}
	#services-table.table-view .port {
		display: none;
	}

	#hosts-table.table-view .host,
	#hosts-table.table-view .header {
		grid-template-areas: 'hostname ip cpu memory disk net actions';
		grid-template-columns: 1fr 8rem 8rem 8rem 8rem 8rem 7rem;
	}

	#hosts-table.table-view .os {
		display: none;
	}
}

@media (max-width: 1400px) {
	#services-table.table-view .header,
	#services-table.table-view .service-entry {
		grid-template-areas: 'icon name enabled status players memory cpu actions';
		grid-template-columns: 3rem 1fr 4rem 9rem 5rem 5rem 3rem 13rem;
	}
	#services-table.table-view .host {
		display: none;
	}
	#services-table.table-view .icon {
		padding-left: 1rem;
	}
	.backup-file-item .file-modified {
		display: none;
	}
}

@media (max-width: 1200px) {
	.main-container {
		grid-template-columns: 300px 1fr;
		gap: 2rem;
	}

	.nav-links a {
		font-size: 0.95rem;
		padding: 0.4rem 0.8rem;
	}

	.logo {
		font-size: 1.5rem;
	}

	/* Hide the view-changer buttons on smaller screens */
	.view-changer {
		display: none;
	}
}

@media (max-width: 968px) {
	.main-container {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 0 1rem;
	}

	.sidebar {
		position: static;
		order: 2;
	}

	.content-area {
		order: 1;
	}

	.navbar-content {
		flex-direction: column;
		gap: 1rem;
		padding: 1rem;
	}

	.nav-links {
		gap: 1rem;
		flex-wrap: wrap;
		justify-content: center;
	}

	.nav-links a {
		font-size: 0.95rem;
		padding: 0.4rem 0.8rem;
	}

	#metricsCharts {
		grid-template-columns: 1fr;
	}

	.tabs-header {
		flex-direction: column;
	}

	.file-item {
		grid-template-areas:
			'icon    name    permissions size    modified actions'
			'symlink symlink symlink     symlink symlink  symlink';
		grid-template-columns: 20px 1fr 4rem 6rem 11rem 1rem;
	}
	.file-item .file-owner {
		display: none;
	}
}

@media (max-width: 900px) {
	/* Switch dashboard cards to single column */
	#services-table.card-view .service-entry {
		flex: 1 100%;
	}

	.path-controls {
		flex-wrap: wrap;
	}
	.path-controls .btn-nav {
		order: 2;
		flex: 1 2rem;
		text-align: center;
		display: inline-block;
	}
	.path-controls .current-path {
		order: 3;
		flex: 6 80%;
	}
	.path-controls .action-buttons {
		order: 1;
		flex: 7 100%;
	}

	#firewallRulesContainer .comment {
		display: none;
	}
	#firewallOtherRulesContainer .comment {
		display: none;
	}
}

@media (max-width: 768px) {
	.header-content {
		padding: 0 1rem;
		flex-direction: column;
		gap: 1rem;
	}

	.nav-menu {
		gap: 1.5rem;
		font-size: 1rem;
	}

	.nav-menu a {
		padding: 0.4rem 0.8rem;
	}

	.logo {
		font-size: 1.8rem;
	}

	.container {
		padding: 15px;
	}

	.file-browser {
		grid-template-columns: 1fr;
		height: auto;
	}

	.sidebar-browser {
		border-right: none;
		border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	}
}

@media (max-width: 700px) {
	/* General content header to kick buttons down to new line */
	.content-header-inner h2 {
		flex: 3 100%;
		order: 1;
	}
	.content-header-inner p {
		order: 2;
		margin-bottom: 1rem;
	}
	.content-header-inner .content-header-buttons {
		flex: 3 100%;
		order: 3;
	}

	/* Reorder service details to fit better */
	.service-details-overview {
		grid-template-areas: 'status status cpu cpu memory memory' 'status-v status-v cpu-v cpu-v memory-v memory-v' 'players players players port port port' 'players-v players-v players-v port-v port-v port-v';
	}
	.service-details-overview dt {
		text-align: center;
	}
	.service-details-overview dd {
		text-align: center;
	}

	/* Switch host details to single column */
	.host-details-overview {
		flex-direction: column;
		text-align: center;
	}

	.file-item {
		grid-template-areas:
			'icon    name    size    modified actions'
			'symlink symlink     symlink symlink  symlink';
		grid-template-columns: 20px 1fr 6rem 11rem 1rem;
	}
	.file-item .file-permissions {
		display: none;
	}
}

@media (max-width: 640px) {
	#applicationsList, #hostsList {
		grid-template-columns: 1fr;
	}

	.file-item {
		grid-template-areas:
			'icon    name    size    actions'
			'symlink symlink     symlink  symlink';
		grid-template-columns: 20px 1fr 6rem 1rem;
	}
	.file-item .file-modified {
		display: none;
	}
}

/* Small responsive tweaks */
@media (max-width: 520px) {
	#toast-container { bottom: 12px; padding: 0 8px; }
	.toast { min-width: 180px; font-size: 0.9rem; }
}

@media (max-width: 500px) {
	/* Display service details in single column */
	.service-details-overview {
		display: flex;
		flex-wrap: wrap;
	}
	.service-details-overview dt {
		flex: 1 40%;
		text-align: right;
	}
	.service-details-overview dd {
		flex: 1 40%;
		text-align: left;
	}
}

@media (max-width: 480px) {
	.header h1 {
		font-size: 1.5rem;
		letter-spacing: 1px;
	}

	.nav-menu {
		gap: 1rem;
		flex-wrap: wrap;
		justify-content: center;
	}

	.nav-menu a {
		font-size: 0.9rem;
	}

	.btn-primary {
		padding: 0.8rem 1.5rem;
		font-size: 0.9rem;
	}
}

@media (max-width: 445px) {
	/* Auto-expand actions on very small screens */
	#services-table tbody tr.service::after {
		display: none;
	}

	#services-table tbody tr.service-actions {
		display: table-row !important;
	}

	#services-table tbody tr.service {
		cursor: default;
	}

	.path-controls .action-buttons {
		justify-content: center;
		display: flex;
		flex-wrap: wrap;
		gap: 1rem;
	}
	.path-controls .action-buttons button {
		flex: 1 100%;
	}
}

@media (max-width: 420px) {
	.theme-selector {
		left: 0.5rem;
		bottom: 0.5rem;
	}
	.theme-panel {
		min-width: 100px;
	}
}

/** </editor-fold> **/
