:root {
	--bg: #0f1115;
	--panel: #151823;
	--text: #e8e8e8;
	--muted: #9aa0aa;
}

html, body, #app {
	height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
}

.toolbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: rgba(21,24,35,0.9);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid #22283a;
	z-index: 10;
}

.tool-row {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 10px 16px;
}

label {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--muted);
}

select, input[type="text"], input[type="color"], button {
	background: #0f1320;
	color: var(--text);
	border: 1px solid #23283a;
	border-radius: 6px;
	padding: 6px 10px;
}

button {
	cursor: pointer;
	background: #1a2033;
	transition: background .15s ease;
}
button:hover { background: #222a42; }

.hint { color: var(--muted); font-size: 12px; }

.map-wrapper {
	position: absolute;
	top: 52px; /* below toolbar */
	left: 0;
	right: 0;
	bottom: 0;
	overflow: hidden;
}

.side-panel {
	position: fixed;
	top: 52px;
	right: 0;
	width: 320px;
	bottom: 0;
	background: #0f1320;
	border-left: 1px solid #23283a;
	box-shadow: -6px 0 20px rgba(0,0,0,0.25);
	z-index: 20;
	transform: translateX(0);
	transition: transform .18s ease;
}
.side-panel.hidden { transform: translateX(100%); }
.side-panel.left { left: 0; right: auto; border-left: none; border-right: 1px solid #23283a; box-shadow: 6px 0 20px rgba(0,0,0,0.25); }
.side-panel.left.hidden { transform: translateX(-100%); }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border-bottom:1px solid #23283a; }
.panel-title { font-weight:600; }
.panel-body { padding: 12px; display:flex; flex-direction:column; gap:12px; }
.field { display:flex; flex-direction:column; gap:6px; }
.field > label { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size:12px; color: #9aa0aa; }
.actions { display:flex; gap:8px; justify-content:flex-end; border-top:1px solid #23283a; padding-top:12px; }
.filter-list { display:flex; flex-direction:column; gap:8px; }
.filter-item { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px; border:1px solid #23283a; border-radius:6px; background:#0b0f1a; }
.filter-item label { display:flex; align-items:center; gap:8px; cursor:pointer; }
.filter-count { color: var(--muted); font-size: 12px; }

/* Inputs inside panel */
.side-panel input[type="text"], .side-panel textarea, .side-panel select {
	background: #0b0f1a;
	border: 1px solid #23283a;
	border-radius: 6px;
	color: var(--text);
	padding: 6px 8px;
}

.image-list { display:flex; flex-direction:column; gap:8px; }
.image-row { display:flex; gap:8px; align-items:center; }
.image-row input { flex: 1; }
.thumbs { display:flex; gap:6px; flex-wrap:wrap; }
.thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid #23283a; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; }
.lightbox.hidden { display: none; }
.lightbox-backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.7); }
.lightbox-content { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding: 40px; }
.lightbox-content img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.lightbox-close { position:absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border:1px solid #23283a; background:#151823; color:#fff; font-size: 20px; line-height: 20px; cursor:pointer; }

.map {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(0, 0) scale(1);
	transform-origin: 0 0;
	width: 2048px; /* 2 columns x 1024 */
	height: 3072px; /* 3 rows x 1024 */
	background: #0b0d14;
}

.tile {
	position: absolute;
	width: 1024px;
	height: 1024px;
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.markers { position: absolute; inset: 0; z-index: 1; }

.marker {
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	border: 2px solid rgba(0,0,0,0.5);
	box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
	cursor: pointer;
	z-index: 1;
}

.marker:hover { z-index: 999; }

.marker:hover::after {
	content: attr(data-label);
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 20px;
	background: rgba(0,0,0,0.7);
	color: #fff;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	z-index: 1000;
}

.dragging { cursor: grabbing !important; }

.move-mode { cursor: crosshair !important; }


