html, body {
	height: 100%;
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	background: #f8fafc;
	color: #1e293b;
	font-size: 14px;
	line-height: 1.5;
}

/* Compact Professional Header */
.page-header {
	background: #ffffff;
	border-bottom: 1px solid #e2e8f0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	max-width: 1400px;
	margin: 0 auto;
}

.header-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.header-icon {
	font-size: 1.5rem;
	color: #3b82f6;
}

.header-text h1 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1e293b;
	letter-spacing: -0.01em;
}

.header-subtitle {
	margin: 0.125rem 0 0;
	font-size: 0.8rem;
	color: #64748b;
	font-weight: 400;
}

.header-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.dataset-info {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(59, 130, 246, 0.1);
	padding: 0.5rem 1rem;
	border-radius: 20px;
	border: 1px solid rgba(59, 130, 246, 0.3);
}

.dataset-label {
	font-size: 0.85rem;
	color: #94a3b8;
	font-weight: 500;
}

.dataset-status {
	font-size: 0.85rem;
	color: #10b981;
	font-weight: 600;
	background: rgba(16, 185, 129, 0.15);
	padding: 0.15rem 0.5rem;
	border-radius: 10px;
}

#app {
	display: grid;
	grid-template-columns: 280px 1fr;
	background: #f8fafc;
	color: #1e293b;
	min-height: calc(100vh - 60px);
}

.sidebar {
	border-right: 1px solid #e2e8f0;
	padding: 0;
	overflow: auto;
	background: #ffffff;
	box-shadow: 1px 0 3px rgba(0,0,0,0.05);
}

.sidebar-section {
	padding: 0.75rem 0.75rem;
}

.sidebar-section:first-child {
	padding-top: 1rem;
}

.sidebar h2 {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
	display: flex;
	align-items: center;
	gap: 0.375rem;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	font-size: 0.75rem;
}

.controls {
	display: grid;
	gap: 0.5rem;
}

.legend-note {
	font-size: 0.75rem;
	color: #6b7280;
	background: #f3f4f6;
	padding: 0.5rem;
	border-radius: 4px;
	border-left: 2px solid #3b82f6;
	margin-top: 0.75rem;
	line-height: 1.4;
}

.legend-icon {
	margin-right: 0.375rem;
	font-size: 0.75rem;
}

.group-title {
	font-weight: 600;
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	color: #1e293b;
	padding: 0.5rem;
	background: #f1f5f9;
	border-radius: 4px;
	border: 1px solid #e2e8f0;
}

.group-meta {
	font-size: 0.75rem;
	color: #4b5563;
	white-space: pre-wrap;
	background: #f9fafb;
	padding: 0.5rem;
	border-radius: 4px;
	border: 1px solid #e5e7eb;
	font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
	line-height: 1.4;
}

.main {
	display: grid;
	grid-template-rows: 60% 40%;
	background: #f8fafc;
}

#map {
	height: 100%;
	border-bottom: 1px solid #e2e8f0;
}

.viewers {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
	padding: 1rem;
	background: #ffffff;
	overflow: auto;
}

.viewer {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	display: grid;
	grid-template-rows: auto 1fr;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: box-shadow 0.2s ease;
	overflow: hidden;
}

.viewer:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.viewer header {
	padding: 0.5rem 0.75rem;
	font-size: 0.75rem;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #374151;
	font-weight: 500;
}

.viewer .content {
	position: relative;
	background: #ffffff;
}

.viewer img {
	max-width: 100%;
	height: auto;
	display: block;
	cursor: zoom-in;
}

.badge {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
	background: #e0f2fe;
	border: 1px solid #b3e5fc;
	color: #0277bd;
	margin-right: 0.375rem;
	transition: all 0.2s ease;
}

.badge:hover {
	background: #b3e5fc;
	border-color: #81d4fa;
}

.toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	cursor: pointer;
}

.toggle:hover {
	background: #f1f5f9;
}

.toggle input {
	transform: scale(1.1);
	accent-color: #3b82f6;
}

.color-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1px solid #ffffff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.1);
	flex-shrink: 0;
}

hr {
	border: none;
	border-top: 1px solid #e2e8f0;
	margin: 0;
}

/* Lightbox */
.lightbox.hidden {
	display: none;
}
.lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.9);
	z-index: 9999;
	display: grid;
	grid-template-rows: auto 1fr auto;
}
.lightbox-toolbar {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	background: rgba(255,255,255,0.95);
	border-bottom: 1px solid #e2e8f0;
	backdrop-filter: blur(8px);
}
.lb-btn {
	background: #ffffff;
	color: #374151;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 0.375rem 0.75rem;
	cursor: pointer;
	font-weight: 500;
	font-size: 0.8rem;
	transition: all 0.2s ease;
}
.lb-btn:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}
.lightbox-stage {
	position: relative;
	overflow: hidden;
	background: #000;
}
.lightbox-stage img {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(1);
	transform-origin: center center;
	max-width: none;
	max-height: none;
	user-select: none;
	-webkit-user-drag: none;
}
.lightbox-caption {
	padding: 0.75rem 1rem;
	font-size: 0.8rem;
	color: #4b5563;
	background: rgba(255,255,255,0.95);
	border-top: 1px solid #e2e8f0;
	backdrop-filter: blur(8px);
	font-weight: 500;
}

/* Responsive design */
@media (max-width: 1200px) {
	.viewers { grid-template-columns: repeat(2, 1fr); }
	#app { grid-template-columns: 260px 1fr; }
}

@media (max-width: 900px) {
	.header-content {
		flex-direction: column;
		gap: 0.5rem;
		text-align: center;
	}
	
	.header-branding {
		flex-direction: column;
		gap: 0.375rem;
	}
	
	.header-text h1 {
		font-size: 1.125rem;
	}
	
	.header-subtitle {
		font-size: 0.75rem;
	}
}

@media (max-width: 800px) {
	#app { 
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}
	
	.sidebar { 
		position: sticky; 
		top: 60px; 
		z-index: 5;
		max-height: 50vh;
		overflow-y: auto;
	}
	
	.viewers { 
		grid-template-columns: 1fr;
		padding: 0.75rem;
	}
	
	.main {
		grid-template-rows: 1fr;
	}
	
	#map {
		min-height: 50vh;
	}
}

@media (max-width: 600px) {
	.header-content {
		padding: 0.5rem 0.75rem;
	}
	
	.header-icon {
		font-size: 1.25rem;
	}
	
	.header-text h1 {
		font-size: 1rem;
	}
	
	.dataset-info {
		flex-direction: column;
		gap: 0.25rem;
		padding: 0.375rem 0.75rem;
	}
	
	.sidebar-section {
		padding: 0.75rem 0.5rem;
	}
	
	.lightbox-toolbar {
		padding: 0.5rem 0.75rem;
		gap: 0.375rem;
	}
	
	.lb-btn {
		padding: 0.25rem 0.5rem;
		font-size: 0.75rem;
	}
}