* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #f5f5f5;
	color: #333;
	line-height: 1.5;
}

header {
	background: #1a1a2e;
	color: #fff;
	padding: 1rem 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

header h1 { font-size: 1.4rem; font-weight: 600; }

.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.btn {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.btn-primary { background: #4361ee; color: #fff; }
.btn-primary:hover { background: #3a56d4; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; }

.card {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.card-header h2 { font-size: 1.1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid #eee; }
th { font-weight: 600; font-size: 0.85rem; color: #666; text-transform: uppercase; }
td { font-size: 0.9rem; }

.badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.badge-healthy { background: #d4edda; color: #155724; }
.badge-unhealthy { background: #f8d7da; color: #721c24; }
.badge-unknown { background: #e2e3e5; color: #383d41; }

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

.cluster-card {
	background: #fff;
	border-radius: 8px;
	padding: 1.2rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	cursor: pointer;
	transition: box-shadow 0.2s;
}

.cluster-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.cluster-card h3 { margin-bottom: 0.5rem; }

.cluster-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }

.cluster-stats { display: flex; gap: 1.5rem; margin-top: 0.8rem; }
.stat { text-align: center; }
.stat-value { font-size: 1.3rem; font-weight: 700; color: #4361ee; }
.stat-label { font-size: 0.75rem; color: #888; }

/* Modal */
.modal-overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 100;
	align-items: center;
	justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	min-width: 400px;
	max-width: 500px;
	width: 90%;
}

.modal h2 { margin-bottom: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.form-group input, .form-group select {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
}

.form-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: #4361ee;
	text-decoration: none;
	font-size: 0.9rem;
	margin-bottom: 1rem;
	cursor: pointer;
}

.back-link:hover { text-decoration: underline; }

.section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 1.5rem 0 0.8rem;
}

.section-title h3 { font-size: 1rem; }

.empty { text-align: center; padding: 2rem; color: #999; }

.actions { display: flex; gap: 0.3rem; }

.code-block {
	background: #1a1a2e;
	color: #e0e0e0;
	padding: 1rem;
	border-radius: 6px;
	font-size: 0.85rem;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-all;
}
