/* Basic CSS Reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: system-ui, -apple-system, sans-serif;
	background-color: #0a0a0a;
	color: #ffffff;
}

.container {
	max-width: 1600px;
	margin: 0 auto;
	padding: 1rem;
}

.header-controls {
	background: #0d0d0d;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	border: 1px solid #1a1a1a;
}

/* Main content with four column layout */
.main-content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.primary-columns {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.column {
	flex: 1;
	min-width: 350px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Card styles */
.card {
	background: #0d0d0d;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
	overflow: visible;
	border: 1px solid #1a1a1a;
}

.card-header {
	padding: 0.75rem;
	border-bottom: 1px solid #1a1a1a;
	font-weight: 600;
	font-size: 0.875rem;
	color: #ffffff;
}

.card-content {
	padding: 0.75rem;
	font-family: monospace;
	font-size: 0.75rem;
	color: #f0f0f0;
	overflow: visible;
}

/* Input styles */
input[type="text"], input[type="password"] {
	padding: 0.375rem 0.75rem;
	border: 1px solid #1a1a1a;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	background-color: #000000;
	color: #ffffff;
}

input[type="text"]:focus, input[type="password"]:focus {
	outline: none;
	border-color: #58a6ff;
}

input[type="checkbox"] {
	cursor: pointer;
}

label {
	cursor: pointer;
	font-size: 0.875rem;
	color: #ffffff;
}

/* Service view containers */
.service-view {
	border: 1px solid #1a1a1a;
	border-radius: 0.5rem;
	padding: 0.5rem;
	margin-bottom: 0.5rem;
	background: #000000;
}

/* Node status styles */
.node-status {
	border-bottom: 1px solid #1a1a1a;
	padding: 0.5rem 0;
	font-size: 0.75rem;
	color: #f0f0f0;
}

.node-status.fault {
	color: #ff6b6b;
}

/* Collapsible config cards */
.w-\[350px\] {
	width: 350px;
}

/* JSON content for config cards */
.json-content {
	font-family: monospace;
	font-size: 0.75rem;
	overflow-x: auto;
	white-space: pre;
	background: #000000;
	padding: 0.5rem;
	border-radius: 0.375rem;
}

/* Toast notifications */
.toast {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	background: #238636;
	color: white;
	padding: 0.75rem 1rem;
	border-radius: 0.375rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* Loading spinner */
.loading {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	border: 2px solid #30363d;
	border-top-color: #58a6ff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

/* Dropdown menu styles */
.dropdown {
	position: relative;
	display: inline-block;
	z-index: 1000;  /* ensure it appears on top */
}
 
.dropdown-content {
	display: none;
	position: absolute;
	background-color: #0d0d0d;
	min-width: 160px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.8);
	border-radius: 0.375rem;
	z-index: 1;
	right: 0;
	top: 100%;
	margin-top: 0.25rem;
	border: 1px solid #1a1a1a;
}

.dropdown-content.show {
	display: block;
}

.dropdown-label {
	padding: 0.5rem 1rem;
	font-weight: 600;
	font-size: 0.875rem;
	color: #8b949e;
}

.dropdown-item {
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-size: 0.875rem;
	color: #ffffff;
}

.dropdown-item:hover {
	background-color: #1a1a1a;
}

.dropdown-separator {
	height: 1px;
	background-color: #1a1a1a;
	margin: 0.25rem 0;
}

/* Buttons */
.button-ghost {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 0.375rem;
	color: #f0f0f0;
}

.button-ghost:hover {
	background-color: #1a1a1a;
}

/* Utility classes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-red { color: #ff6b6b; }
.italic { font-style: italic; }

.space-x-1 > * + * { margin-left: 0.25rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.rounded-md { border-radius: 0.375rem; }
.border { border: 1px solid #1a1a1a; }
.border-t-2 { border-top: 2px solid #1a1a1a; }
.border-b-2 { border-bottom: 2px solid #1a1a1a; }
.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.px-0 { padding-left: 0; padding-right: 0; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.hidden { display: none; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.align-middle { vertical-align: middle; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.cursor-pointer { cursor: pointer; }

/* Password container */
.password-container {
	position: relative;
	display: inline-block;
}

.password-container input {
	padding-right: 2.5rem;
}

.toggle-password {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	padding: 0.25rem;
	color: #f0f0f0;
}

.toggle-password:hover {
	color: #ffffff;
}

/* .stateful-button */
.stateful-button {
	padding: 0.5rem 1rem;
	background-color: #238636;  /* Green for "turn ON" actions */
	color: white;
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background-color 0.2s;
}

.stateful-button:hover {
	background-color: #2ea043;
}

.stateful-button.off {  /* Use for any "turn OFF" action */
	background-color: #da3633;
}

.stateful-button.off:hover {
	background-color: #f85149;
}