﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
	--bg-main: #1e1e2f;
	--bg-accent: #171725;
	--header-bg: #27293d;
	--header-border: #2f3248;
	--header-hover: #3a3e5b;
	--menu-panel: #2b2d42;
	--text-main: #ffffff;
	--text-soft: #bfc7d5;
	--surface: #27293d;
	--surface-border: #35395a;
	--action: #e14eca;
	--action-hover: #c221a9;
	--focus: #1d8cf8;
}

body[data-theme="light"] {
	--bg-main: #eef1f8;
	--bg-accent: #dde3ef;
	--header-bg: #ffffff;
	--header-border: #cfd9ea;
	--header-hover: #f3f7ff;
	--menu-panel: #ffffff;
	--text-main: #1d2433;
	--text-soft: #4d5a70;
	--surface: #ffffff;
	--surface-border: #d4deee;
	--action: #d14580;
	--action-hover: #b2376c;
	--focus: #1874d2;
}

* {
	box-sizing: border-box;
}

body {
	font-family: 'Poppins', Arial, Helvetica, sans-serif;
	line-height: 1.5;
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background: radial-gradient(circle at 20% 0%, #2a2d46 0%, var(--bg-main) 42%);
	color: var(--text-main);
}

body[data-theme="light"] {
	background: radial-gradient(circle at 12% 0%, #ffffff 0%, var(--bg-main) 48%);
}

body[data-theme="light"] .main-header h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3 {
	color: var(--text-main);
}

body[data-theme="light"] .menu-toggle span,
body[data-theme="light"] .menu-toggle::before,
body[data-theme="light"] .menu-toggle::after {
	background: var(--text-main);
}

body[data-theme="light"] .nav-links > a,
body[data-theme="light"] .nav-links .dropbtn,
body[data-theme="light"] .dropdown-content a {
	color: var(--text-main);
}

body[data-theme="light"] .dropdown-content,
body[data-theme="light"] .sub-dropdown-content {
	background: #ffffff;
	border-color: #cfd9ea;
	box-shadow: 0 12px 20px rgba(13, 26, 52, 0.14);
}

body[data-theme="light"] .nav-placeholder-item {
	color: #7b8798;
}

body[data-theme="light"] .dropdown-content a:hover,
body[data-theme="light"] .dropdown-content a.active {
	background: #eef4ff;
}

body[data-theme="light"] .nav-links > a.active,
body[data-theme="light"] .nav-links .dropbtn.active {
	background: rgba(209, 69, 128, 0.16);
	color: #7f1d53;
}

body[data-theme="light"] section {
	box-shadow: 0 10px 24px rgba(21, 36, 66, 0.08);
}

body[data-theme="light"] label {
	color: #344865;
}

body[data-theme="light"] input[type=number],
body[data-theme="light"] input[type=text],
body[data-theme="light"] input[type=file],
body[data-theme="light"] select,
body[data-theme="light"] textarea {
	border-color: #c4d2e7;
	background: #fbfdff;
	color: #18243a;
}

body[data-theme="light"] #results,
body[data-theme="light"] #uploadResults,
body[data-theme="light"] #adminResults,
body[data-theme="light"] #scanItemsResults,
body[data-theme="light"] #hyperCalcResults {
	background: #f8fbff;
	color: #1e2a40;
	border-color: #cddaf0;
}

body[data-theme="light"] .scope-banner {
	background: #eaf2ff;
	border-bottom-color: #c6d7f5;
	color: #20304b;
}

body[data-theme="light"] .galaxy-map-filter-row {
	background: #eef4ff;
	border-color: #c7d6ee;
}

body[data-theme="light"] .assets-view-btn {
	background: #f2f6ff;
	color: #2d3f5e;
	border-color: #c7d6ee;
}

body[data-theme="light"] .assets-view-btn.is-active {
	background: #dcecff;
	color: #184476;
	border-color: #8fb4e6;
}

body[data-theme="light"] .assets-cache-btn {
	background: #eff4ff;
	color: #304767;
	border-color: #c2d2ea;
}

body[data-theme="light"] .assets-filter-btn {
	background: #f4f8ff;
	color: #2d4060;
	border-color: #c7d5ea;
}

body[data-theme="light"] .assets-filter-btn.is-active {
	color: #ffffff;
}

body[data-theme="light"] .assets-map-drilldown,
body[data-theme="light"] .assets-map-sidebar,
body[data-theme="light"] .assets-drilldown-panel,
body[data-theme="light"] .assets-map-item-card {
	background: #eef4ff;
	border-color: #c8d6ec;
	box-shadow: none;
}

body[data-theme="light"] .assets-map-item-card p {
	color: #395170;
}

body[data-theme="light"] .movement-summary-table-wrap {
	background: #f3f8ff;
	border-color: #c5d5ed;
}

body[data-theme="light"] .movement-summary-table th {
	background: #dfeafd;
	color: #1c3558;
}

body[data-theme="light"] .movement-summary-table tbody tr:hover {
	background: #e9f2ff;
}

body[data-theme="light"] .sector-drilldown-map,
body[data-theme="light"] .sector-drilldown-list,
body[data-theme="light"] .sector-system-row {
	background: #eef4ff;
	color: #223752;
	border-color: #c8d6ec;
}

body[data-theme="light"] .sector-system-row:hover {
	background: #dfefff;
	border-color: #9abce8;
}

.main-header {
	width: 100%;
	min-height: 66px;
	background: var(--header-bg);
	border-bottom: 1px solid var(--header-border);
	padding: 0.45rem 1.25rem;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	flex-direction: row;
	gap: 1rem;
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
	position: sticky;
	top: 0;
	z-index: 1500;
}

.main-header h1 {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 600;
	color: #ffffff;
}

.menu-toggle {
	display: none;
	position: relative;
	width: 40px;
	height: 34px;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
	content: '';
	position: absolute;
	left: 0;
	width: 100%;
	height: 3px;
	background: #ffffff;
	border-radius: 999px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span {
	top: 50%;
	transform: translateY(-50%);
}

.menu-toggle::before {
	top: 6px;
}

.menu-toggle::after {
	bottom: 6px;
}

.main-header.menu-open .menu-toggle span {
	opacity: 0;
}

.main-header.menu-open .menu-toggle::before {
	transform: translateY(9px) rotate(45deg);
}

.main-header.menu-open .menu-toggle::after {
	transform: translateY(-9px) rotate(-45deg);
}

.nav-links {
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	gap: 0.2rem;
	width: auto;
	flex-wrap: wrap;
}

.nav-links > a,
.nav-links .dropbtn {
	color: #ffffff;
	font-size: 0.95rem;
	padding: 1.2rem 1rem;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
}

.nav-links > a:hover,
.nav-links .dropbtn:hover {
	background: var(--header-hover);
}

.nav-links > a.active,
.nav-links .dropbtn.active {
	background: rgba(225, 78, 202, 0.2);
	color: #f0a7e3;
	font-weight: 600;
}

.dropdown {
	position: relative;
	display: inline-flex;
	padding-bottom: 0.1rem;
}

.dropdown-content {
	display: none;
	position: absolute;
	left: 0;
	top: calc(100% - 1px);
	width: 220px;
	background: var(--menu-panel);

.nav-placeholder-item {
	color: rgba(191, 199, 213, 0.68);
	padding: 0.7rem 1rem;
	display: block;
	white-space: nowrap;
	cursor: default;
	user-select: none;
}
	border: 1px solid #3b3e5f;
	border-radius: 0.35rem;
	box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
	z-index: 1600;
}

.dropdown-content a {
	color: #ffffff;
	padding: 0.8rem 1rem;
	display: block;
	text-decoration: none;
}

.sub-dropdown {
	position: relative;
}

.sub-dropbtn {
	position: relative;
}

.sub-dropbtn::after {
	content: '›';
	float: right;
	opacity: 0.85;
}

.sub-dropdown-content {
	display: none;
	position: absolute;
	left: calc(100% - 4px);
	top: -1px;
	width: 210px;
	background: var(--menu-panel);
	border: 1px solid #3b3e5f;
	border-radius: 0.35rem;
	box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
	z-index: 1700;
}

.sub-dropdown-content a {
	padding: 0.75rem 1rem;
}

.sub-dropdown:hover .sub-dropdown-content,
.sub-dropdown:focus-within .sub-dropdown-content {
	display: block;
}

.dropdown-content a:hover,
.dropdown-content a.active {
	background: #3a3e5b;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown-content:hover {
	display: block;
}

main {
	padding: 2rem 1rem;
	max-width: 1100px;
	margin: 0 auto;
}

body.personal-assets-page main,
body.faction-assets-page main {
	max-width: min(1880px, calc(100vw - 22px));
	padding-left: clamp(0.8rem, 1.8vw, 1.6rem);
	padding-right: clamp(0.8rem, 1.8vw, 1.6rem);
}

section {
	background: var(--surface);
	color: var(--text-main);
	border-radius: 0.45rem;
	border: 1px solid var(--surface-border);
	padding: 1.5rem;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

h2, h3 {
	margin-top: 0;
	color: #ffffff;
}

form {
	margin-top: 1rem;
	display: grid;
	gap: 0.75rem;
}

.admin-section {
	margin-bottom: 1rem;
}

.admin-card {
	margin-top: 1rem;
	padding: 1rem;
	background: #1f2135;
	border: 1px solid #3f4363;
	border-radius: 0.35rem;
}

.admin-form {
	margin-top: 0;
}

.admin-card-note {
	margin: 0 0 0.5rem;
	color: #d9e1ef;
}

.admin-action-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.inline-status {
	margin-left: 10px;
	font-size: 0.9em;
	color: var(--text-soft);
}

.cache-progress-wrap {
	margin-top: 0.9rem;
	padding: 0.7rem;
	border: 1px solid #3f4363;
	border-radius: 0.35rem;
	background: #191b2c;
}

.cache-progress-meta {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.9rem;
	color: var(--text-soft);
	margin-bottom: 0.45rem;
}

.cache-progress-bar {
	width: 100%;
	height: 12px;
	border-radius: 999px;
	background: #2a2e47;
	border: 1px solid #3f4363;
	overflow: hidden;
}

.cache-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
	transition: width 180ms ease;
}

.cache-progress-scale {
	display: flex;
	justify-content: space-between;
	font-size: 0.78rem;
	color: var(--text-soft);
	margin-top: 0.35rem;
}

label {
	font-weight: 600;
	color: #d9e1ef;
}

input[type=number],
input[type=text],
input[type=file],
select,
textarea {
	padding: 0.6rem 0.8rem;
	border: 1px solid #434863;
	border-radius: 0.3rem;
	width: 100%;
	max-width: 560px;
	font-family: inherit;
	background: #1f2135;
	color: #eef3fb;
}

input::placeholder {
	color: #9ca5b7;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
	outline: 2px solid var(--focus);
	outline-offset: 1px;
}

button {
	background: var(--action);
	color: #ffffff;
	border: none;
	padding: 0.6rem 1rem;
	border-radius: 0.3rem;
	cursor: pointer;
	font-family: inherit;
	font-weight: 500;
}

button:hover {
	background: var(--action-hover);
}

footer {
	text-align: center;
	padding: 1rem;
	color: var(--text-soft);
}

#results,
#uploadResults,
#adminResults,
#scanItemsResults,
#hyperCalcResults {
	margin-top: 1rem;
	white-space: pre-wrap;
	background: #1f2135;
	color: #f2f4fa;
	border: 1px solid #3f4363;
	border-radius: 0.35rem;
	padding: 0.75rem;
}

/* ── Upload results table ──────────────────────────────────────────── */
.upload-results-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	white-space: normal;
}
.upload-results-table th,
.upload-results-table td {
	padding: 0.35rem 0.6rem;
	border: 1px solid #3f4363;
	text-align: left;
	vertical-align: top;
}
.upload-results-table th {
	background: #2a2d4a;
	color: var(--text-soft);
	font-weight: 600;
	white-space: nowrap;
}
.upload-results-table td.upload-file-col {
	word-break: break-all;
	max-width: 14rem;
}
.upload-results-table td.upload-detail-col {
	color: var(--text-soft);
	font-size: 0.78rem;
	word-break: break-all;
}
.upload-results-table .status-success { color: #6ee7b7; font-weight: 600; }
.upload-results-table .status-skipped { color: #fbbf24; font-weight: 600; }
.upload-results-table .status-error   { color: #f87171; font-weight: 600; }

.hyper-calc-subtitle {
	margin-top: -0.4rem;
	color: var(--text-soft);
}

.hyper-calc-form {
	margin-top: 1rem;
}

.hyper-calc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
}

.hyper-calc-actions {
	margin-top: 0.25rem;
}

.hyper-calc-warning {
	margin-bottom: 0.75rem;
	padding: 0.6rem 0.7rem;
	border: 1px solid #f59e0b;
	background: rgba(245, 158, 11, 0.12);
	border-radius: 0.35rem;
	color: #fde68a;
}

.hyper-calc-error {
	margin: 0;
	color: #fecaca;
}

.hyper-calc-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.25rem 1rem;
	margin-bottom: 0.6rem;
}

.hyper-calc-summary p {
	margin: 0;
}

.hyper-route-options {
	margin-bottom: 0.75rem;
	display: grid;
	gap: 0.35rem;
	max-width: 760px;
}

.hyper-refresh-note {
	margin: 0.25rem 0 0.6rem;
	color: var(--text-soft);
	font-size: 0.9rem;
}

.hyper-calc-table-wrap {
	overflow-x: auto;
	margin-top: 0.6rem;
}

.hyper-calc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.hyper-calc-table th,
.hyper-calc-table td {
	border: 1px solid #3f4363;
	padding: 0.45rem 0.55rem;
	text-align: left;
}

.hyper-calc-table th {
	background: #2a2e4a;
	font-weight: 600;
}

.hyper-cache-section {
	margin-top: 1.25rem;
}

.hyper-cache-stats {
	margin-bottom: 0.6rem;
	color: var(--text-soft);
}

.hyper-cache-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.btn-secondary {
	background: #3a3e5b;
}
.btn-secondary:hover {
	background: #4a4f6e;
}
.btn-danger {
	background: #b91c1c;
}
.btn-danger:hover {
	background: #991b1b;
}

.hyper-prefetch-progress {
	margin-top: 0.75rem;
}

.prefetch-bar-track {
	width: 100%;
	max-width: 560px;
	height: 18px;
	background: #1f2135;
	border: 1px solid #3f4363;
	border-radius: 999px;
	overflow: hidden;
}

.prefetch-bar-fill {
	height: 100%;
	width: 0;
	background: var(--action);
	transition: width 0.15s ease;
	border-radius: 999px;
}

.hyper-prefetch-progress p {
	margin: 0.35rem 0 0;
	font-size: 0.88rem;
	color: var(--text-soft);
}

@media (max-width: 900px) {
	.main-header {
		flex-wrap: wrap;
		padding: 0.75rem 1rem;
		align-items: center;
	}

	.menu-toggle {
		display: block;
		margin-left: auto;
	}

	.nav-links {
		width: 100%;
		display: none;
		flex-direction: column;
		background: var(--menu-panel);
		margin-top: 0.5rem;
		border: 1px solid #3b3e5f;
		border-radius: 0.35rem;
	}

	.nav-links {
		order: 3;
	}

	.main-header.menu-open .nav-links {
		display: flex;
	}

	.nav-links > a,
	.nav-links .dropbtn {
		width: 100%;
		justify-content: flex-start;
		padding: 0.95rem 1rem;
	}

	.dropdown {
		width: 100%;
	}

	.dropdown-content {
		position: static;
		width: 100%;
		border-left: none;
		border-right: none;
		border-bottom: none;
		border-top: 1px solid #3b3e5f;
		box-shadow: none;
		border-radius: 0;
	}

	.dropdown-content a {
		padding-left: 1.5rem;
	}

	.sub-dropbtn::after {
		content: '';
	}

	.sub-dropdown-content {
		position: static;
		width: 100%;
		border: none;
		border-top: 1px solid #3b3e5f;
		box-shadow: none;
		border-radius: 0;
	}

	.sub-dropdown-content a {
		padding-left: 2.25rem;
	}

	main {
		padding: 1.25rem 0.75rem;
	}

	.hyper-calc-grid,
	.hyper-calc-summary {
		grid-template-columns: 1fr;
	}
}

.latency-map {border-collapse: collapse; width: 100%; max-width: 480px; table-layout: fixed; border: 1px solid #cbd5e1;}
.latency-map td {width: 5%; height: 22px; border: 1px solid #e2e8f0; text-align: center; font-size: 0.65rem; color: #1f2937; padding: 0;}
.latency-map td:hover {outline: 2px solid #2563eb;}

.galaxy-map-controls {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
	margin-top: 0.55rem;
}

.galaxy-map-filter-row {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex-wrap: wrap;
	margin-top: 0.55rem;
	padding: 0.5rem 0.65rem;
	border: 1px solid rgba(148, 163, 184, 0.36);
	border-radius: 8px;
	background: rgba(10, 14, 22, 0.5);
}

.galaxy-map-filter-row label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--text-soft);
	margin: 0;
}

.galaxy-map-filter-row select,
.galaxy-map-filter-row input[type=range] {
	max-width: 220px;
	min-width: 150px;
	padding: 0.35rem 0.45rem;
	font-size: 0.82rem;
	margin: 0;
}

.galaxy-map-filter-row input[type=range] {
	padding: 0;
	height: 22px;
}

.galaxy-map-filter-row button {
	padding: 0.42rem 0.78rem;
	font-size: 0.82rem;
}

.assets-damage-stack {
	display: grid;
	grid-template-columns: repeat(3, minmax(170px, 1fr));
	gap: 0.5rem;
	width: 100%;
	margin-top: 0.1rem;
}

.assets-damage-filter {
	margin: 0;
	padding: 0.45rem 0.55rem 0.5rem;
	border: 1px solid rgba(148, 163, 184, 0.36);
	border-radius: 8px;
	background: rgba(15, 23, 42, 0.45);
	display: grid;
	gap: 0.28rem;
}

.assets-damage-filter legend {
	padding: 0 0.22rem;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text-soft);
}

.assets-damage-filter label {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-main);
	margin: 0;
	width: auto;
}

.assets-damage-filter input[type=checkbox] {
	width: 14px;
	height: 14px;
	margin: 0;
}

.galaxy-map-filter-row input[type=checkbox] {
	width: 16px;
	height: 16px;
	margin-right: 0.35rem;
}

@media (max-width: 1024px) {
	.galaxy-map-filter-row {
		align-items: stretch;
	}

	.assets-damage-stack {
		grid-template-columns: 1fr;
	}

	.galaxy-map-filter-row label {
		width: 100%;
		margin-top: 0.15rem;
	}

	.galaxy-map-filter-row select,
	.galaxy-map-filter-row button {
		width: 100%;
		max-width: none;
	}
}

.galaxy-map-filter-row.disabled {
	opacity: 0.56;
}

.galaxy-map-container {position: relative; width: 100%; max-width: 920px; border: 1px solid #cbd5e1; background: #000; margin-top: 0.75rem;}
.galaxy-map-container img {width: 100%; height: auto; display: block;}
.galaxy-map-overlay {position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;}
.galaxy-map-point {position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(220,76,76,0.85); border: 2px solid #ffffff; transform: translate(-50%, -50%); cursor: pointer; pointer-events: auto;}
.galaxy-map-point:hover {box-shadow: 0 0 0 3px rgba(255,255,255,0.65);}
.galaxy-map-tooltip {position: absolute; padding: 0.25rem 0.35rem; background: rgba(0,0,0,0.85); color: #fff; font-size: 0.75rem; border-radius: 3px; z-index: 500; pointer-events: none; white-space: nowrap;}

.galaxy-sector-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: auto;
}

.galaxy-sector-polygon {
	cursor: pointer;
	transition: fill 0.16s ease, stroke-width 0.16s ease, filter 0.16s ease;
}

.galaxy-sector-polygon.has-scans {
	animation: galaxy-sector-color-cycle 4.6s ease-in-out infinite;
}

@keyframes galaxy-sector-color-cycle {
	0% {
		filter: brightness(1) saturate(1) hue-rotate(0deg);
		opacity: 0.88;
	}
	50% {
		filter: brightness(1.22) saturate(1.28) hue-rotate(-26deg);
		opacity: 1;
	}
	100% {
		filter: brightness(1) saturate(1) hue-rotate(0deg);
		opacity: 0.88;
	}
}

.galaxy-sector-polygon.has-scans:hover,
.galaxy-sector-polygon.selected {
	filter: brightness(1.15);
	stroke-width: 0.42;
}

@media (prefers-reduced-motion: reduce) {
	.galaxy-sector-polygon.has-scans {
		animation: none;
		opacity: 1;
	}
}

.galaxy-sector-tooltip {
	position: absolute;
	z-index: 580;
	max-width: 340px;
	padding: 0.5rem 0.6rem;
	border-radius: 8px;
	background: rgba(7, 11, 20, 0.93);
	border: 1px solid rgba(148, 163, 184, 0.42);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
	color: #f8fbff;
	font-size: 0.78rem;
	line-height: 1.28;
	pointer-events: none;
}

.galaxy-movement-line {
	pointer-events: auto;
	stroke: rgba(56, 189, 248, 0.9);
	stroke-width: 0.22;
	fill: none;
	marker-end: url(#galaxyMovementArrowHead);
}

.galaxy-movement-line.local {
	stroke: rgba(250, 204, 21, 0.9);
}

.galaxy-movement-to {
	pointer-events: auto;
	fill: rgba(56, 189, 248, 0.92);
	stroke: rgba(255, 255, 255, 0.95);
	stroke-width: 0.12;
	cursor: pointer;
}

.galaxy-movement-from {
	pointer-events: none;
	fill: rgba(244, 63, 94, 0.9);
	stroke: rgba(255, 255, 255, 0.85);
	stroke-width: 0.1;
}

.galaxy-movement-pulse {
	pointer-events: auto;
	fill: rgba(250, 204, 21, 0.45);
	stroke: rgba(250, 204, 21, 0.95);
	stroke-width: 0.12;
	cursor: pointer;
}

.movement-summary-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	background: rgba(11, 15, 24, 0.9);
}

.movement-summary-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 780px;
}

.movement-summary-table th,
.movement-summary-table td {
	padding: 0.52rem 0.6rem;
	border-bottom: 1px solid rgba(148, 163, 184, 0.2);
	font-size: 0.84rem;
	text-align: left;
	vertical-align: top;
}

.movement-summary-table th {
	position: sticky;
	top: 0;
	background: rgba(30, 41, 59, 0.95);
	color: #e5edf7;
	font-weight: 700;
	z-index: 1;
}

.movement-summary-table tbody tr:hover {
	background: rgba(56, 189, 248, 0.08);
}

.movement-summary-table .entity-id-link {
	color: #9ad8ff;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.movement-summary-table .entity-id-link:hover {
	color: #c4eaff;
}

.sector-drilldown-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
	gap: 1rem;
	align-items: start;
}

.sector-drilldown-map {
	background: rgba(17, 21, 33, 0.92);
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	padding: 0.75rem;
	min-height: 320px;
}

.sector-drilldown-list {
	background: rgba(17, 21, 33, 0.92);
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	padding: 0.75rem;
	max-height: 560px;
	overflow: auto;
}

.sector-drilldown-list h4 {
	margin: 0 0 0.55rem;
}

.sector-system-list {
	display: grid;
	gap: 0.45rem;
}

.sector-system-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	padding: 0.48rem 0.58rem;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.34);
	background: rgba(30, 34, 51, 0.9);
	color: var(--text-main);
	cursor: pointer;
	text-align: left;
}

.sector-system-row:hover {
	background: rgba(56, 189, 248, 0.14);
	border-color: rgba(56, 189, 248, 0.5);
}

.sector-system-row.is-unscanned {
	background: rgba(15, 23, 42, 0.72);
	border-style: dashed;
	border-color: rgba(148, 163, 184, 0.34);
	color: #d7deea;
	cursor: default;
}

.sector-system-row.is-unscanned:hover {
	background: rgba(15, 23, 42, 0.86);
	border-color: rgba(148, 163, 184, 0.5);
}

.sector-system-row .name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

.sector-system-row .count {
	padding: 0.15rem 0.48rem;
	border-radius: 999px;
	background: rgba(56, 189, 248, 0.16);
	border: 1px solid rgba(56, 189, 248, 0.5);
	font-size: 0.78rem;
	min-width: 2.1rem;
	text-align: center;
}

.sector-system-row.is-unscanned .count {
	background: rgba(148, 163, 184, 0.12);
	border-color: rgba(148, 163, 184, 0.35);
	color: #d7deea;
}

.sector-drilldown-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.sector-system-point {
	position: absolute;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background: rgba(239, 68, 68, 0.92);
	border: 2px solid #ffffff;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
	cursor: pointer;
	pointer-events: auto;
}

.sector-system-point:hover {
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.28);
}

.sector-system-point.is-unscanned {
	background: rgba(248, 250, 252, 0.06);
	border-color: rgba(226, 232, 240, 0.55);
	box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2);
	cursor: help;
}

.sector-system-point.is-unscanned:hover {
	background: rgba(248, 250, 252, 0.18);
	box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.16);
}

.sector-fallback-map {
	position: relative;
	width: min(100%, 640px);
	aspect-ratio: 1 / 1;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	overflow: hidden;
	background: #070b11;
}

@media (max-width: 900px) {
	.sector-drilldown-grid {
		grid-template-columns: 1fr;
	}

	.sector-drilldown-list {
		max-height: 360px;
	}
}

.data-cell-link {
	color: #8ec5ff;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.data-cell-link:hover {
	color: #b7dbff;
}

.timeline-legend {
	display: grid;
	gap: 0.3rem;
	padding: 0.8rem 0.95rem;
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 10px;
	background: rgba(17, 24, 39, 0.48);
	color: var(--text-soft);
	font-size: 0.88rem;
	line-height: 1.35;
}

.timeline-legend strong {
	color: var(--text-main);
}

.search-layout main {max-width: min(1180px, calc(100vw - 32px));}

.system-map-workspace {display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 1.25rem; align-items: start;}
.system-workspace-controls {display: grid; gap: 0.85rem; align-content: start;}
.system-mode-controls {display: grid; gap: 0.85rem; grid-template-columns: 1fr; align-items: end;}
.system-mode-control-group {display: grid; gap: 0.35rem;}
.system-mode-select {width: 100%; max-width: 500px;}

.latency-map-section {display: grid; gap: 0.75rem; min-width: 0;}
.system-map-grid {
	display: grid;
	gap: 1rem;
	width: min(100%, 950px);
	max-width: 950px;
	grid-template-columns: minmax(0, 1fr) clamp(260px, 31%, 300px);
	grid-template-areas:
		"layout details"
		"layout sector";
	justify-content: start;
	align-items: start;
}
.system-map-card {
	background: rgba(39, 41, 61, 0.88);
	border: 1px solid var(--surface-border);
	border-radius: 12px;
	padding: 1rem;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
	min-width: 0;
}
.system-layout-card {grid-area: layout; align-self: stretch; width: 100%;}
.system-details-card {grid-area: details;}
.system-sector-card {grid-area: sector;}

.system-map-card h4 {margin: 0 0 0.85rem; text-align: center; font-size: 1.05rem;}

.system-layout-toolbar {display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.65rem;}
.density-visibility-toggle {display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; color: var(--text-main);}

.density-iff-filters {display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.6rem;}
.density-iff-filter {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.35rem 0.65rem;
	border: 1px solid rgba(148, 163, 184, 0.55);
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.28);
	color: var(--text-soft);
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.density-iff-filter:hover {transform: translateY(-1px);}
.density-iff-filter img {width: 14px; height: 14px; object-fit: contain;}
.density-iff-filter[data-iff="friend"] {border-color: rgba(34, 197, 94, 0.65); color: #a7f3d0;}
.density-iff-filter[data-iff="neutral"] {border-color: rgba(168, 85, 247, 0.65); color: #d8b4fe;}
.density-iff-filter[data-iff="wreck"] {border-color: rgba(96, 165, 250, 0.65); color: #bfdbfe;}
.density-iff-filter[data-iff="enemy"] {border-color: rgba(248, 113, 113, 0.65); color: #fecaca;}
.density-iff-filter.is-active[data-iff="friend"] {background: rgba(34, 197, 94, 0.16);}
.density-iff-filter.is-active[data-iff="neutral"] {background: rgba(168, 85, 247, 0.16);}
.density-iff-filter.is-active[data-iff="wreck"] {background: rgba(96, 165, 250, 0.16);}
.density-iff-filter.is-active[data-iff="enemy"] {background: rgba(248, 113, 113, 0.16);}

.density-overlay-summary {font-size: 0.9rem; color: var(--text-soft); margin-bottom: 0.55rem;}
.system-layout-container {width: 100%;}

.system-layout-canvas {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	overflow: hidden;
	background: #070b11;
	max-height: min(74vh, 800px);
}
.system-layout-background {position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.95;}
.system-layout-grid {position: absolute; inset: 0; display: grid; grid-template-columns: repeat(20, 1fr); grid-template-rows: repeat(20, 1fr); pointer-events: none;}

.system-density-overlay {position: absolute; inset: 0; display: grid; grid-template-columns: repeat(20, 1fr); grid-template-rows: repeat(20, 1fr); pointer-events: none; z-index: 20;}
.system-density-overlay.is-hidden {display: none;}
.system-density-cell {border: 1px solid rgba(255, 255, 255, 0.08);}

.system-layout-marker {position: absolute; z-index: 30; pointer-events: none;}
.system-layout-marker.planet {object-fit: contain;}
.system-layout-marker.station {background-size: contain; background-repeat: no-repeat; background-position: center;}

.system-iff-icon-overlay {position: absolute; inset: 0; z-index: 35; pointer-events: none;}
.system-iff-icon-cell {position: absolute; width: 0; height: 0; pointer-events: auto;}
.system-iff-icon-marker {position: absolute; width: 12px; height: 12px; image-rendering: -webkit-optimize-contrast;}

.grid-cell-tooltip {position: absolute; z-index: 60; max-width: 320px; padding: 0.45rem 0.55rem; border-radius: 8px; background: rgba(12, 17, 28, 0.95); color: #fff; font-size: 0.78rem; line-height: 1.25; pointer-events: none;}
.grid-tooltip-divider {border: none; border-top: 1px solid rgba(255, 255, 255, 0.18); margin: 0.35rem 0;}
.tooltip-station-icon {width: 12px; height: 12px; margin-right: 0.3rem; vertical-align: -2px;}

.cell-detail-overlay {
	position: fixed;
	inset: 0;
	z-index: 2200;
	background: rgba(8, 12, 20, 0.18);
}

.cell-detail-panel {
	position: fixed;
	min-width: min(420px, calc(100vw - 28px));
	max-width: min(680px, calc(100vw - 28px));
	max-height: min(70vh, calc(100vh - 28px));
	overflow: hidden;
	border: 1px solid var(--surface-border);
	border-radius: 12px;
	background: rgba(23, 27, 41, 0.97);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48);
	backdrop-filter: blur(10px);
}

/* ── Auth Controls ── */
.auth-controls {
	margin-left: auto;
	display: flex;
	align-items: flex-start;
}

.auth-status-stack {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.3rem;
}

.auth-menu {
	position: relative;
}

.auth-user {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.auth-menu-trigger {
	background: rgba(17, 24, 39, 0.3);
	border: 1px solid var(--surface-border);
	padding: 0.35rem 0.5rem;
	border-radius: 999px;
	color: var(--text-main);
}

.auth-menu-trigger:hover {
	background: rgba(56, 189, 248, 0.12);
}

.auth-menu-caret {
	font-size: 0.7rem;
	color: var(--text-soft);
}

.auth-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid var(--action);
	object-fit: cover;
}

.auth-avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	font-weight: 700;
	background: rgba(225, 78, 202, 0.2);
}

.auth-name {
	font-size: 0.85rem;
	color: var(--text-soft);
	white-space: nowrap;
}

.auth-btn {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	border: none;
	border-radius: 6px;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.auth-menu-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 0.45rem);
	width: min(360px, calc(100vw - 1.4rem));
	max-height: min(72vh, 680px);
	overflow: auto;
	border: 1px solid var(--surface-border);
	border-radius: 12px;
	background: var(--menu-panel);
	box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
	padding: 0.25rem;
	z-index: 2100;
}

.auth-menu-section {
	padding: 0.65rem 0.75rem;
	border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.auth-menu-section:last-child {
	border-bottom: none;
}

.auth-user-summary-name {
	font-weight: 700;
	font-size: 0.95rem;
}

.auth-user-summary-meta {
	font-size: 0.8rem;
	color: var(--text-soft);
}

.auth-menu-label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
	color: var(--text-soft);
	margin-bottom: 0.32rem;
}

.auth-menu-label-row {
	display: flex;
	align-items: center;
	gap: 0.38rem;
	margin-bottom: 0.2rem;
}

.auth-help-icon {
	position: relative;
	width: 18px;
	height: 18px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(148, 163, 184, 0.6);
	background: rgba(30, 41, 59, 0.72);
	color: var(--text-soft);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: help;
}

.auth-help-icon:hover,
.auth-help-icon:focus-visible {
	color: var(--text-main);
	border-color: var(--focus);
	background: rgba(56, 189, 248, 0.18);
}

.auth-tooltip-float {
	position: fixed;
	max-width: 250px;
	padding: 0.45rem 0.55rem;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.45);
	background: rgba(6, 10, 18, 0.95);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	color: #f6fbff;
	font-size: 0.74rem;
	font-weight: 500;
	line-height: 1.32;
	white-space: pre-line;
	overflow-wrap: anywhere;
	text-transform: none;
	letter-spacing: 0;
	z-index: 9999;
	pointer-events: none;
}

.auth-rate-limit-indicator {
	display: inline-flex;
	align-items: center;
	gap: 0.38rem;
	padding: 0.18rem 0.42rem;
	border-radius: 999px;
	border: 1px solid var(--surface-border);
	background: rgba(17, 24, 39, 0.34);
	color: var(--text-soft);
	cursor: help;
	font-size: 0.7rem;
	line-height: 1.2;
}

.auth-rate-limit-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: #64748b;
	box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.45);
	flex-shrink: 0;
}

.auth-rate-limit-text {
	white-space: nowrap;
	font-weight: 600;
	font-size: 0.68rem;
}

.auth-rate-limit-indicator.auth-rate-limit-good .auth-rate-limit-dot {
	background: #22c55e;
}

.auth-rate-limit-indicator.auth-rate-limit-warn .auth-rate-limit-dot {
	background: #facc15;
}

.auth-rate-limit-indicator.auth-rate-limit-caution .auth-rate-limit-dot {
	background: #f97316;
}

.auth-rate-limit-indicator.auth-rate-limit-danger .auth-rate-limit-dot {
	background: #ef4444;
}

.auth-rate-limit-indicator.auth-rate-limit-unknown .auth-rate-limit-dot {
	background: #64748b;
}

body[data-theme="light"] .auth-rate-limit-indicator {
	background: rgba(255, 255, 255, 0.85);
	border-color: #c7d6ee;
	color: #415978;
}

body[data-theme="light"] .auth-rate-limit-dot {
	box-shadow: 0 0 0 2px rgba(226, 238, 255, 0.9);
	border-color: rgba(30, 41, 59, 0.22);
}

.auth-tooltip-float[hidden] {
	display: none;
}

body[data-theme="light"] .auth-help-icon {
	background: #eef4ff;
	border-color: #b6c8e2;
	color: #38506f;
}

body[data-theme="light"] .auth-tooltip-float {
	background: #ffffff;
	border-color: #c7d6ee;
	color: #233a57;
	box-shadow: 0 10px 24px rgba(21, 36, 66, 0.16);
}

.auth-inline-field {
	display: block;
	font-size: 0.78rem;
	color: var(--text-soft);
	margin-bottom: 0.2rem;
}

.auth-select {
	width: 100%;
	max-width: none;
	margin-bottom: 0.45rem;
	font-size: 0.82rem;
	padding: 0.42rem 0.55rem;
	background: rgba(15, 23, 42, 0.65);
	border: 1px solid var(--surface-border);
	color: var(--text-main);
	border-radius: 8px;
}

body[data-theme="light"] .auth-select {
	background: #f6f9ff;
}

.auth-cache-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
}

.auth-menu-action {
	padding: 0.38rem 0.45rem;
	font-size: 0.76rem;
	text-align: center;
	border: 1px solid var(--surface-border);
	background: rgba(30, 41, 59, 0.72);
	color: var(--text-soft);
}

.auth-menu-action:hover {
	color: var(--text-main);
	background: rgba(56, 189, 248, 0.16);
	border-color: var(--focus);
}

.auth-menu-warn {
	border-color: rgba(248, 113, 113, 0.45);
}

.auth-menu-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 0.75rem;
	background: rgba(225, 78, 202, 0.2);
	border: 1px solid rgba(225, 78, 202, 0.35);
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	color: #f6d8f0;
}

.auth-menu-link-row {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	flex-wrap: wrap;
}

.auth-menu-link-logout {
	padding: 0.4rem 0.75rem;
	font-size: 0.8rem;
	border-radius: 8px;
}

.auth-menu-link:hover {
	background: rgba(225, 78, 202, 0.32);
}

body[data-theme="light"] .auth-menu-link {
	color: #7e1d49;
	background: rgba(209, 69, 128, 0.12);
}

.auth-token-list {
	margin: 0;
	padding-left: 1rem;
	font-size: 0.78rem;
	color: var(--text-main);
	display: grid;
	gap: 0.2rem;
}

.profile-page-section {
	max-width: 1080px;
	margin: 1rem auto;
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.profile-card {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: 12px;
	padding: 1rem;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

.profile-card h3 {
	margin-top: 0;
	margin-bottom: 0.45rem;
}

.profile-list {
	margin: 0;
	padding-left: 1rem;
	display: grid;
	gap: 0.2rem;
	font-size: 0.9rem;
}

.profile-mode {
	margin-bottom: 0.65rem;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--text-soft);
}

.auth-login-btn {
	background: var(--action);
	color: #fff;
}
.auth-login-btn:hover {
	background: var(--action-hover);
}

.auth-logout-btn {
	background: var(--surface);
	color: var(--text-soft);
	border: 1px solid var(--surface-border);
}
.auth-logout-btn:hover {
	background: var(--header-hover);
	color: var(--text-main);
}

@media (max-width: 900px) {
	.auth-controls {
		width: 100%;
		justify-content: flex-end;
	}

	.auth-status-stack {
		align-items: flex-end;
	}

	.auth-rate-limit-text {
		display: none;
	}

	.auth-rate-limit-indicator {
		padding: 0.14rem 0.24rem;
	}

	.auth-menu-panel {
		position: fixed;
		right: 0.75rem;
		top: 78px;
		max-height: calc(100vh - 96px);
	}
}

.cell-detail-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.8rem 1rem;
	border-bottom: 1px solid rgba(148, 163, 184, 0.22);
	font-weight: 600;
}

.cell-detail-close {
	border: none;
	background: transparent;
	color: var(--text-main);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.cell-detail-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	padding: 0.8rem 1rem 0;
}

.cell-detail-iff-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	color: var(--text-soft);
	cursor: pointer;
}

.cell-detail-iff-btn img {width: 14px; height: 14px; object-fit: contain;}
.cell-detail-iff-btn.active {background: rgba(59, 130, 246, 0.18); border-color: rgba(96, 165, 250, 0.6); color: var(--text-main);}

.cell-detail-body {
	padding: 0.8rem 1rem 1rem;
	overflow: auto;
	max-height: calc(min(70vh, calc(100vh - 28px)) - 112px);
}

.cell-detail-table {width: 100%; border-collapse: collapse;}
.cell-detail-table th,
.cell-detail-table td {padding: 0.55rem 0.65rem; border-bottom: 1px solid rgba(148, 163, 184, 0.16); text-align: left;}
.cell-detail-table th {position: sticky; top: 0; background: rgba(23, 27, 41, 0.98); z-index: 2;}
.cell-detail-table tbody tr:hover {background: rgba(255, 255, 255, 0.04);}

/* IFF color accent bar on the first column of each popup row */
.cell-detail-table tbody tr.iff-friend td:first-child {box-shadow: inset 4px 0 0 rgba(34, 197, 94, 0.95);}
.cell-detail-table tbody tr.iff-neutral td:first-child {box-shadow: inset 4px 0 0 rgba(168, 85, 247, 0.95);}
.cell-detail-table tbody tr.iff-wreck td:first-child {box-shadow: inset 4px 0 0 rgba(96, 165, 250, 0.95);}
.cell-detail-table tbody tr.iff-enemy td:first-child {box-shadow: inset 4px 0 0 rgba(248, 113, 113, 0.95);}

.system-rules-details {font-size: 0.92rem; color: var(--text-main);}
.system-detail-list {display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.55rem; margin: 0;}
.system-detail-list dt {font-weight: 700;}
.system-detail-list dd {margin: 0;}

.system-rules-meta a {color: #6da8ff;}

.system-sector-map {display: flex; justify-content: center;}
.system-sector-map .system-sector-map-wrap,
.system-sector-map .sector-context-canvas {max-width: 100%;}

.system-details-card,
.system-sector-card {width: 100%;}

@media (max-width: 920px) {
	.system-map-workspace {grid-template-columns: 1fr;}
	.system-map-grid {
		grid-template-columns: 1fr;
		justify-content: stretch;
		grid-template-areas:
			"layout"
			"details"
			"sector";
	}
}

@media (orientation: portrait) and (min-width: 921px) {
	.system-map-workspace {
		grid-template-columns: 1fr;
	}

	.system-workspace-controls {
		width: min(100%, 950px);
	}

	.system-mode-controls {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.system-map-grid {
		width: min(100%, 950px);
	}
}

@media (max-width: 720px) {
	.system-layout-toolbar {flex-direction: column; align-items: flex-start;}
	.search-layout main {max-width: 100%;}
	.system-mode-controls {grid-template-columns: 1fr;}
}

.system-sector-map-wrap {position: relative; display: inline-block; max-width: 100%;}
.system-sector-map-image {display: block; max-width: 100%; height: auto; border: 1px solid #cbd5e1; border-radius: 6px;}
.sector-map-scan-marker {position: absolute; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: #ef4444; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);}

/* ── Debug Page ── */
.debug-section {
	max-width: 960px;
	margin: 1.5rem auto;
	padding: 0 1rem;
}
.debug-section h2 {
	margin-bottom: 0.5rem;
}
.debug-status {
	padding: 1rem;
	color: var(--text-soft);
	font-size: 0.95rem;
}
.debug-status a {
	color: var(--action);
}
.debug-card {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}
.debug-card h3 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}
.debug-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

/* ── Scope permission banner ───────────────────────────────────────────────── */
#scope-permission-banner {
	width: 100%;
}

.scope-banner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1.25rem;
	background: #2b1f3a;
	border-bottom: 2px solid var(--action);
	font-size: 0.85rem;
	color: var(--text-main);
	flex-wrap: wrap;
}

.scope-banner-icon {
	font-size: 1rem;
	flex-shrink: 0;
}

.scope-banner-text {
	flex: 1;
	min-width: 0;
}

.scope-banner-btn {
	display: inline-block;
	padding: 0.3rem 0.85rem;
	background: var(--action);
	color: #fff;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s;
	flex-shrink: 0;
}

.scope-banner-btn:hover {
	background: var(--action-hover);
}

.scope-banner-dismiss {
	background: transparent;
	border: none;
	color: var(--text-soft);
	font-size: 1rem;
	cursor: pointer;
	padding: 0 0.25rem;
	line-height: 1;
	flex-shrink: 0;
	transition: color 0.15s;
}

.scope-banner-dismiss:hover {
	color: var(--text-main);
}

.scope-locked-hidden {
	display: none !important;
}

.assets-page-locked .assets-panel.assets-panel-locked {
	display: block;
	padding: 1rem;
}

.assets-page-gate .scope-banner {
	border: 1px solid rgba(56, 189, 248, 0.35);
	border-radius: 10px;
	border-bottom-width: 1px;
	background: linear-gradient(135deg, rgba(43, 31, 58, 0.96), rgba(26, 32, 51, 0.96));
	padding: 0.85rem 1rem;
}

/* Assets pages */
.assets-section {
	max-width: 1100px;
	margin: 1.25rem auto;
	padding: 0 1rem;
}

.personal-assets-section {
	max-width: min(1560px, calc(100vw - 18px));
}

.assets-filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0.75rem 0 1rem;
}

.assets-view-toggle {
	display: flex;
	gap: 0.55rem;
	margin: 0 0 0.85rem;
}

.assets-cache-section {
	margin: 0 0 1rem;
	padding: 0.9rem;
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	background: linear-gradient(145deg, rgba(15, 23, 42, 0.52), rgba(30, 41, 59, 0.34));
	display: grid;
	gap: 0.6rem;
}

.assets-view-btn {
	border: 1px solid var(--surface-border);
	background: rgba(15, 23, 42, 0.72);
	color: var(--text-soft);
	border-radius: 8px;
	padding: 0.45rem 0.85rem;
	font-size: 0.82rem;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.assets-view-btn:hover {
	color: var(--text-main);
	border-color: var(--focus);
}

.assets-view-btn.is-active {
	background: rgba(56, 189, 248, 0.16);
	border-color: rgba(56, 189, 248, 0.5);
	color: #e6f7ff;
}

.assets-cache-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
}

.assets-filter-row .assets-cache-controls {
	margin: 0;
}

.assets-cache-info {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.35;
}

.assets-cache-section #personalAssetsMeta,
.assets-cache-section #factionAssetsMeta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
}

.assets-cache-section #personalAssetsStatus:empty,
.assets-cache-section #factionAssetsStatus:empty {
	display: none;
}

.assets-meta-pill {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3rem;
	padding: 0.24rem 0.5rem;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(15, 23, 42, 0.52);
	font-size: 0.76rem;
	line-height: 1.2;
}

.assets-meta-pill-label {
	color: var(--text-soft);
	opacity: 0.9;
}

.assets-meta-pill-value {
	color: var(--text-main);
	font-weight: 600;
}

.assets-refresh-progress {
	display: grid;
	gap: 0.35rem;
	margin: 0;
}

.assets-refresh-progress-bar {
	position: relative;
	width: 100%;
	height: 24px;
	border-radius: 11px;
	border: 1px solid rgba(148, 163, 184, 0.38);
	overflow: hidden;
	background:
		radial-gradient(circle at 14% 30%, rgba(226, 232, 240, 0.35) 0 1px, transparent 1.5px),
		radial-gradient(circle at 26% 70%, rgba(226, 232, 240, 0.28) 0 1px, transparent 1.5px),
		radial-gradient(circle at 44% 44%, rgba(226, 232, 240, 0.22) 0 1px, transparent 1.5px),
		radial-gradient(circle at 62% 72%, rgba(226, 232, 240, 0.2) 0 1px, transparent 1.5px),
		radial-gradient(circle at 80% 28%, rgba(226, 232, 240, 0.24) 0 1px, transparent 1.5px),
		linear-gradient(180deg, rgba(9, 14, 26, 0.96), rgba(5, 9, 18, 0.95));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 -4px 9px rgba(2, 6, 23, 0.55);
}

.assets-refresh-progress-bar::before {
	content: '';
	position: absolute;
	left: 8px;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	background: center / contain no-repeat url('/images/death_star_small.svg');
	filter: drop-shadow(0 0 5px rgba(148, 163, 184, 0.65));
	pointer-events: none;
	z-index: 4;
}

.assets-refresh-progress-bar::after {
	content: '';
	position: absolute;
	right: 8px;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	background: center / contain no-repeat url('/images/alderaan_small.svg');
	filter: drop-shadow(0 0 5px rgba(125, 211, 252, 0.55));
	pointer-events: none;
	z-index: 4;
}

.assets-refresh-progress-bar.assets-impact::after {
	animation: assets-alderaan-blast 0.95s ease-out 1;
}

.assets-refresh-progress-fill {
	position: relative;
	margin-left: 0;
	max-width: calc(100% - 44px);
	height: 3px;
	top: 50%;
	left: 24px;
	transform: translateY(-50%);
	border-radius: 999px;
	background:
		linear-gradient(90deg, rgba(34, 197, 94, 0.95), rgba(134, 239, 172, 0.85));
	box-shadow: 0 0 6px rgba(34, 197, 94, 0.72), 0 0 14px rgba(34, 197, 94, 0.36);
	transition: width 0.18s ease;
	overflow: visible;
	z-index: 3;
	animation: assets-laser-flicker 0.42s steps(2, end) infinite;
}

.assets-refresh-progress-fill::after {
	content: '';
	position: absolute;
	right: -2px;
	top: 50%;
	width: 6px;
	height: 6px;
	transform: translate(50%, -50%);
	border-radius: 50%;
	background: rgba(187, 247, 208, 0.95);
	box-shadow: 0 0 6px rgba(34, 197, 94, 0.95), 0 0 12px rgba(74, 222, 128, 0.65);
	animation: assets-laser-tip-pulse 0.8s ease-in-out infinite;
}

.assets-refresh-progress-fill::before {
	content: '';
	position: absolute;
	left: -2px;
	top: 50%;
	width: 12px;
	height: 12px;
	transform: translate(-50%, -50%);
	clip-path: polygon(0 50%, 30% 24%, 42% 40%, 60% 30%, 84% 30%, 68% 50%, 84% 70%, 60% 70%, 42% 60%, 30% 76%);
	background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
	filter: drop-shadow(0 0 4px rgba(125, 211, 252, 0.8));
}

@keyframes assets-laser-flicker {
	0% {
		opacity: 0.86;
		filter: brightness(0.92) saturate(0.95);
	}
	34% {
		opacity: 1;
		filter: brightness(1.15) saturate(1.15);
	}
	67% {
		opacity: 0.82;
		filter: brightness(0.88) saturate(0.9);
	}
	100% {
		opacity: 0.98;
		filter: brightness(1.08) saturate(1.08);
	}
}

@keyframes assets-laser-tip-pulse {
	0%,
	100% {
		transform: translate(50%, -50%) scale(1);
		box-shadow: 0 0 6px rgba(34, 197, 94, 0.9), 0 0 12px rgba(74, 222, 128, 0.6);
	}
	50% {
		transform: translate(50%, -50%) scale(1.18);
		box-shadow: 0 0 10px rgba(34, 197, 94, 1), 0 0 18px rgba(74, 222, 128, 0.9);
	}
}

@keyframes assets-alderaan-blast {
	0% {
		transform: translateY(-50%) scale(1);
		opacity: 1;
		filter: drop-shadow(0 0 5px rgba(125, 211, 252, 0.55));
	}
	26% {
		transform: translateY(-50%) scale(1.4);
		opacity: 1;
		filter: drop-shadow(0 0 14px rgba(74, 222, 128, 0.95)) drop-shadow(0 0 26px rgba(250, 204, 21, 0.85));
	}
	58% {
		transform: translateY(-50%) scale(1.9);
		opacity: 0.94;
		filter: drop-shadow(0 0 22px rgba(250, 204, 21, 0.95)) drop-shadow(0 0 38px rgba(248, 113, 113, 0.75));
	}
	100% {
		transform: translateY(-50%) scale(2.35);
		opacity: 0;
		filter: drop-shadow(0 0 30px rgba(250, 204, 21, 0.5)) drop-shadow(0 0 42px rgba(248, 113, 113, 0.35));
	}
}

@media (prefers-reduced-motion: reduce) {
	.assets-refresh-progress-fill,
	.assets-refresh-progress-fill::after,
	.assets-refresh-progress-bar.assets-impact::after {
		animation: none;
	}
}

.assets-refresh-progress-text {
	font-size: 0.8rem;
	line-height: 1.3;
}

.assets-privacy-note {
	margin: 0;
	font-size: 0.83rem;
	line-height: 1.35;
}

.assets-cache-controls label {
	font-size: 0.82rem;
	color: var(--text-soft);
	font-weight: 600;
}

.assets-cache-controls select {
	min-width: 280px;
	max-width: 100%;
	padding: 0.4rem 0.55rem;
	font-size: 0.82rem;
	border-radius: 8px;
	border: 1px solid var(--surface-border);
	background: rgba(15, 23, 42, 0.7);
	color: var(--text-main);
}

.assets-cache-btn {
	padding: 0.42rem 0.7rem;
	font-size: 0.78rem;
	border-radius: 8px;
	border: 1px solid var(--surface-border);
	background: rgba(30, 41, 59, 0.72);
	color: var(--text-soft);
	cursor: pointer;
	transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.assets-cache-btn:hover {
	color: var(--text-main);
	border-color: var(--focus);
	background: rgba(56, 189, 248, 0.16);
}

.assets-filter-btn {
	border: 1px solid var(--surface-border);
	background: var(--surface);
	color: var(--text-soft);
	border-radius: 999px;
	padding: 0.35rem 0.8rem;
	font-size: 0.8rem;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.assets-filter-btn:hover {
	transform: translateY(-1px);
	color: var(--text-main);
	border-color: var(--focus);
}

.assets-filter-btn.is-active {
	background: var(--action);
	border-color: var(--action);
	color: #fff;
}

.assets-panel {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	padding: 1rem;
}

.assets-modal-open {
	overflow: hidden;
}

.assets-moved-ships-btn {
	border-color: rgba(245, 158, 11, 0.6);
	background: linear-gradient(120deg, rgba(71, 35, 10, 0.9), rgba(29, 20, 56, 0.8));
	color: #f8d58a;
}

.assets-moved-ships-btn:hover {
	border-color: rgba(245, 158, 11, 0.95);
	background: linear-gradient(120deg, rgba(109, 52, 12, 0.95), rgba(47, 26, 87, 0.9));
	color: #ffe6aa;
}

.assets-moved-modal {
	position: fixed;
	inset: 0;
	z-index: 1800;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.assets-moved-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.78);
	backdrop-filter: blur(2px);
}

.assets-moved-modal-card {
	position: relative;
	z-index: 1;
	width: min(920px, 100%);
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	overflow: hidden;
	padding: 0.9rem 1rem 1rem;
	border-radius: 12px;
	border: 1px solid rgba(148, 163, 184, 0.45);
	background:
		radial-gradient(120% 90% at 15% 10%, rgba(51, 65, 85, 0.72), rgba(8, 47, 73, 0.26) 44%, rgba(3, 7, 18, 0.95) 90%),
		linear-gradient(140deg, rgba(12, 16, 31, 0.97), rgba(26, 20, 46, 0.95));
	box-shadow: 0 28px 80px rgba(2, 6, 23, 0.72);
}

.assets-moved-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.assets-moved-modal-head h3 {
	margin: 0;
	font-size: 1rem;
	letter-spacing: 0.02em;
	color: #ffd18c;
}

.assets-moved-modal-close {
	border: 1px solid rgba(148, 163, 184, 0.45);
	background: rgba(15, 23, 42, 0.52);
	color: #dbeafe;
	border-radius: 8px;
	padding: 0.2rem 0.45rem;
	font-size: 0.8rem;
	cursor: pointer;
}

.assets-moved-modal-close:hover {
	border-color: rgba(248, 213, 138, 0.8);
	color: #ffe6aa;
}

.assets-moved-modal-copy,
.assets-moved-modal-summary {
	margin: 0;
	font-size: 0.84rem;
}

.assets-moved-modal-list {
	overflow: auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 0.7rem;
	padding-right: 0.3rem;
}

.assets-moved-row {
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 9px;
	padding: 0.62rem 0.7rem;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(8, 47, 73, 0.28));
}

.assets-moved-row h4 {
	margin: 0 0 0.35rem;
	font-size: 0.82rem;
	color: #e2e8f0;
	line-height: 1.35;
}

.assets-moved-row p {
	margin: 0.2rem 0;
	font-size: 0.76rem;
	line-height: 1.35;
	color: #d4dde8;
}

.assets-moved-row span {
	color: #f8d58a;
	font-weight: 600;
}

.assets-moved-row .assets-moved-uid {
	font-size: 0.72rem;
	color: #a5b4cf;
}

.assets-moved-modal-foot {
	display: flex;
	justify-content: flex-end;
	padding-top: 0.2rem;
}

.is-hidden {
	display: none !important;
}

.assets-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	table-layout: fixed;
}

.assets-table th,
.assets-table td {
	border-bottom: 1px solid var(--surface-border);
	padding: 0.4rem 0.55rem;
	vertical-align: top;
	word-break: break-word;
}

.assets-table th {
	text-align: left;
	color: var(--text-soft);
	font-weight: 600;
}

.assets-pagination-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.assets-pagination-row button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.assets-map-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
	grid-template-areas:
		"map sidebar"
		"drilldown drilldown";
	gap: 1rem;
	align-items: start;
}

.assets-map-primary {
	grid-area: map;
}

.assets-map-drilldown {
	grid-area: drilldown;
	padding: 0.95rem;
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.42);
}

.assets-map-note {
	margin: 0 0 0.55rem;
}

.assets-galaxy-map-container {
	max-width: none;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.assets-map-sidebar {
	grid-area: sidebar;
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.5);
	padding: 0.9rem;
	min-height: 320px;
}

.assets-drilldown-dual-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
	gap: 0.85rem;
}

.assets-drilldown-panel {
	min-width: 0;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.38);
	padding: 0.75rem;
}

.assets-drilldown-panel h4 {
	margin-top: 0;
}

.assets-map-sidebar h3 {
	margin: 0 0 0.55rem;
	font-size: 0.95rem;
}

.assets-map-summary {
	margin-bottom: 0.75rem;
	line-height: 1.45;
}

.assets-map-details {
	display: grid;
	gap: 0.6rem;
	max-height: 560px;
	overflow: auto;
	padding-right: 0.2rem;
}

.assets-map-item-card {
	padding: 0.7rem 0.78rem;
	border-radius: 10px;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(30, 41, 59, 0.68);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.assets-map-item-card h4 {
	margin: 0 0 0.35rem;
	font-size: 0.88rem;
	color: var(--text-main);
}

.assets-map-item-card p {
	margin: 0.18rem 0;
	font-size: 0.8rem;
	color: var(--text-soft);
	word-break: break-word;
}

.assets-map-point {
	background: rgba(56, 189, 248, 0.88);
	border: 2px solid rgba(255, 255, 255, 0.96);
	box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.45);
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
	padding: 0;
	appearance: none;
}

.assets-map-point:hover,
.assets-map-point.is-selected {
	background: rgba(250, 204, 21, 0.96);
	box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.2);
	transform: translate(-50%, -50%) scale(1.08);
}

.assets-user-location-star {
	position: absolute;
	transform: translate(-50%, -50%);
	font-size: 1.28rem;
	line-height: 1;
	color: #ff3ea5;
	text-shadow: 0 0 4px rgba(255, 62, 165, 0.95), 0 0 11px rgba(0, 245, 255, 0.75);
	z-index: 18;
	pointer-events: auto;
	animation: assets-user-star-pulse 1.05s ease-in-out infinite;
}

@keyframes assets-user-star-pulse {
	0% {
		opacity: 0.45;
		transform: translate(-50%, -50%) scale(0.92);
	}
	50% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.2);
	}
	100% {
		opacity: 0.45;
		transform: translate(-50%, -50%) scale(0.92);
	}
}

.galaxy-sector-polygon.is-dimmed {
	opacity: 0.28;
	filter: grayscale(0.45);
}

.assets-sector-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.7rem;
	margin-bottom: 0.35rem;
}

.assets-sector-header-row h3 {
	margin: 0;
}

.assets-system-drilldown-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 0.8rem;
}

.assets-system-map,
.assets-system-list {
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.5);
	padding: 0.72rem;
	min-height: 260px;
}

.assets-system-map svg {
	width: 100%;
	height: 300px;
	display: block;
	background: radial-gradient(circle at center, rgba(30, 64, 100, 0.44), rgba(15, 23, 42, 0.9));
	border-radius: 8px;
}

.assets-system-layout-canvas {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border: 1px solid rgba(148, 163, 184, 0.36);
	border-radius: 8px;
	overflow: hidden;
	background: #05080f;
}

.assets-system-layout-background {
	position: absolute;
	inset: 0;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	background-position: top left;
	opacity: 0.95;
}

.assets-system-layout-grid {
	position: absolute;
	inset: 0;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	background-position: top left;
	z-index: 8;
	pointer-events: auto;
	opacity: 0.95;
}

.assets-system-layout-grid-lines {
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
	background-image:
		repeating-linear-gradient(to right, rgba(226, 232, 240, 0.15) 0 1px, transparent 1px calc(100% / 20)),
		repeating-linear-gradient(to bottom, rgba(226, 232, 240, 0.15) 0 1px, transparent 1px calc(100% / 20));
}

.assets-system-layout-marker {
	position: absolute;
	transform: translate(-50%, -50%);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	pointer-events: auto;
	z-index: 14;
}

.assets-system-layout-marker.planet {
	filter: drop-shadow(0 0 4px rgba(7, 10, 16, 0.9));
}

.assets-system-layout-marker.station {
	filter: drop-shadow(0 0 3px rgba(7, 10, 16, 0.85));
	z-index: 16;
}

.assets-system-asset-dot {
	position: absolute;
	transform: translate(-50%, -50%);
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: rgba(56, 189, 248, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.95);
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22);
	z-index: 20;
}

.assets-system-map-caption {
	margin: 0.55rem 0 0;
	font-size: 0.78rem;
}

@media (min-width: 1280px) {
	.assets-drilldown-dual-grid {
		grid-template-columns: repeat(auto-fit, minmax(620px, 1fr));
		align-items: start;
	}
}

@media (max-width: 1260px) {
	.assets-drilldown-dual-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 980px) {
	.assets-system-drilldown-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 980px) {
	.assets-map-layout {
		grid-template-columns: 1fr;
		grid-template-areas:
			"map"
			"sidebar"
			"drilldown";
	}

	.assets-map-sidebar {
		min-height: 0;
	}
}

.debug-table td {
	padding: 0.35rem 0.6rem;
	border-bottom: 1px solid var(--surface-border);
	vertical-align: top;
}
.debug-key {
	color: var(--focus);
	font-weight: 500;
	white-space: nowrap;
	width: 1%;
}
.debug-val {
	color: var(--text-soft);
	word-break: break-word;
}
.debug-nested {
	margin: 0.25rem 0;
	font-size: 0.82rem;
}
.debug-nested td {
	padding: 0.2rem 0.5rem;
}
.debug-group {
	margin-bottom: 1rem;
}
.debug-group h4 {
	margin: 0 0 0.4rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--action);
	border-bottom: 1px solid var(--surface-border);
	padding-bottom: 0.3rem;
}
.debug-raw {
	background: var(--bg-accent);
	border: 1px solid var(--surface-border);
	border-radius: 6px;
	padding: 0.75rem 1rem;
	overflow-x: auto;
	font-size: 0.78rem;
	line-height: 1.5;
	color: var(--text-soft);
	max-height: 500px;
	overflow-y: auto;
}
.debug-inline-json {
	margin: 0;
	font-size: 0.8rem;
	white-space: pre-wrap;
}
.debug-null {
	color: #888;
	font-style: italic;
}
.debug-img {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	vertical-align: middle;
	margin-right: 0.5rem;
}
.debug-url {
	font-size: 0.78rem;
	color: #888;
}
.perm-test-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.25rem;
	align-items: flex-end;
}
.perm-test-form .form-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}
.perm-test-form input[type=text] {
	background: var(--bg-accent);
	border: 1px solid var(--surface-border);
	border-radius: 6px;
	padding: 0.35rem 0.6rem;
	color: var(--text-main);
	font-family: inherit;
	font-size: 0.85rem;
	min-width: 220px;
}
.perm-test-form label {
	color: var(--text-soft);
	font-size: 0.85rem;
	white-space: nowrap;
}
.text-soft {
	color: var(--text-soft);
	font-size: 0.9rem;
}

.ws-explorer {
	display: grid;
	gap: 1rem;
}

.ws-section-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 0.8rem;
}

.ws-endpoint-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.42rem;
	margin: 0 0 0.85rem;
	padding-top: 0.1rem;
}

.ws-endpoint-tab {
	border: 1px solid var(--surface-border);
	background: var(--surface);
	color: var(--text-soft);
	padding: 0.28rem 0.58rem;
	border-radius: 999px;
	font-size: 0.74rem;
	cursor: pointer;
}

.ws-endpoint-tab.is-active {
	color: #fff;
	background: linear-gradient(135deg, rgba(14, 165, 233, 0.34), rgba(16, 185, 129, 0.28));
	border-color: rgba(125, 211, 252, 0.45);
}

.ws-scope-prompt {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.8rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--surface-border);
	border-radius: 8px;
	margin: 0 0 0.8rem;
	background: rgba(255, 255, 255, 0.02);
}

.ws-scope-prompt.is-warning {
	border-color: rgba(234, 179, 8, 0.5);
	background: rgba(234, 179, 8, 0.08);
}

.ws-scope-prompt.is-ok {
	border-color: rgba(34, 197, 94, 0.45);
	background: rgba(34, 197, 94, 0.08);
	color: #bbf7d0;
}

.ws-scope-prompt-text {
	margin-top: 0.3rem;
	font-size: 0.8rem;
	color: var(--text-soft);
}

.ws-section-tab {
	border: 1px solid var(--surface-border);
	background: var(--bg-accent);
	color: var(--text-soft);
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	font-size: 0.78rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.38rem;
}

.ws-section-tab span {
	font-size: 0.72rem;
	opacity: 0.85;
}

.ws-section-tab.is-active {
	color: #fff;
	background: linear-gradient(135deg, rgba(30, 144, 255, 0.36), rgba(34, 197, 94, 0.32));
	border-color: rgba(125, 211, 252, 0.45);
}

.ws-section {
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	padding: 0.9rem;
	background: rgba(255, 255, 255, 0.02);
}

.ws-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.75rem;
}

.ws-section-head h4 {
	margin: 0;
	font-size: 0.95rem;
	color: var(--action);
}

.ws-section-count {
	font-size: 0.78rem;
	color: var(--text-soft);
}

.ws-endpoints-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 0.85rem;
}

.ws-endpoint-card {
	border: 1px solid var(--surface-border);
	border-radius: 8px;
	padding: 0.75rem;
	background: var(--bg-accent);
	max-width: 100%;
}

.ws-endpoint-head {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	align-items: flex-start;
	margin-bottom: 0.5rem;
}

.ws-endpoint-head h5 {
	margin: 0;
	font-size: 0.9rem;
}

.ws-endpoint-sub {
	margin: 0.2rem 0 0;
	font-size: 0.74rem;
	color: var(--text-soft);
	line-height: 1.35;
	word-break: break-word;
}

.ws-method-pill {
	font-size: 0.72rem;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	background: rgba(56, 189, 248, 0.18);
	color: #7dd3fc;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.ws-scope-line,
.ws-scope-missing {
	margin: 0.2rem 0 0.45rem;
	font-size: 0.75rem;
	line-height: 1.3;
}

.ws-scope-line {
	color: var(--text-soft);
}

.ws-scope-missing {
	color: #f87171;
	font-weight: 600;
}

.ws-param-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.45rem;
	margin-bottom: 0.65rem;
}

.ws-preset-row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.6rem;
}

.ws-preset-row label {
	font-size: 0.74rem;
	color: var(--text-soft);
	font-weight: 600;
}

.ws-preset-select {
	min-width: 0;
	width: 100%;
	padding: 0.32rem 0.42rem;
	border: 1px solid var(--surface-border);
	border-radius: 6px;
	background: var(--surface);
	color: var(--text-main);
	font-size: 0.78rem;
}

.ws-preset-apply {
	padding: 0.3rem 0.55rem;
	border: 1px solid var(--surface-border);
	border-radius: 6px;
	background: var(--bg-accent);
	color: var(--text-main);
	font-size: 0.75rem;
	cursor: pointer;
}

.ws-field {
	display: grid;
	gap: 0.22rem;
}

.ws-field label {
	font-size: 0.72rem;
	color: var(--text-soft);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.ws-param-help {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	font-size: 0.62rem;
	font-weight: 700;
	background: rgba(56, 189, 248, 0.2);
	color: #7dd3fc;
	cursor: help;
	user-select: none;
}

.ws-param-help::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	min-width: 180px;
	max-width: 260px;
	padding: 0.45rem 0.55rem;
	border-radius: 6px;
	background: rgba(17, 24, 39, 0.96);
	border: 1px solid rgba(125, 211, 252, 0.34);
	color: #e5e7eb;
	font-size: 0.7rem;
	line-height: 1.35;
	white-space: normal;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s ease;
	z-index: 10;
}

.ws-param-help:hover::after {
	opacity: 1;
}

.ws-field input {
	width: 100%;
	padding: 0.35rem 0.45rem;
	border: 1px solid var(--surface-border);
	border-radius: 6px;
	background: var(--surface);
	color: var(--text-main);
	font-size: 0.78rem;
}

.ws-actions {
	display: grid;
	gap: 0.45rem;
}

.ws-run-btn {
	width: fit-content;
	font-size: 0.8rem;
	padding: 0.32rem 0.7rem;
}

.ws-path-preview {
	font-size: 0.72rem;
	padding: 0.36rem 0.5rem;
	border-radius: 6px;
	border: 1px solid var(--surface-border);
	background: rgba(0, 0, 0, 0.22);
	color: var(--text-soft);
	word-break: break-all;
	overflow-x: auto;
}

.ws-response {
	margin-top: 0.7rem;
	padding-top: 0.55rem;
	border-top: 1px solid var(--surface-border);
}

.ws-response-meta {
	font-size: 0.74rem;
	color: var(--text-soft);
	margin-bottom: 0.35rem;
	word-break: break-word;
}

.ws-response-body {
	max-height: 56vh;
	font-size: 0.73rem;
}

@media (max-width: 780px) {
	.ws-endpoints-grid {
		grid-template-columns: 1fr;
	}

	.ws-section {
		padding: 0.7rem;
	}
}

/* ── Access Control ── */
.access-rules-list {
	overflow-x: auto;
}
.access-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

/* Production page */
.production-section {
	max-width: min(1560px, calc(100vw - 18px));
	margin: 1.2rem auto;
	padding: 0 1rem;
}

.production-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.5rem 0.75rem;
	padding: 0.65rem 0.85rem;
	margin: 0 0 1rem;
	border: 1px solid var(--surface-border);
	border-radius: 10px;
	background: linear-gradient(145deg, rgba(15, 23, 42, 0.52), rgba(30, 41, 59, 0.34));
}

.production-source-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0.25rem 0 1rem;
}

.production-filter-toggle-stack {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.38rem;
	padding-right: 0.75rem;
	border-right: 1px solid rgba(148, 163, 184, 0.18);
	min-width: 180px;
}

.production-filter-fields {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	flex: 1 1 580px;
}

.production-filter-toggle-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	cursor: pointer;
	user-select: none;
}

.production-filter-toggle-wrap input[type="checkbox"] {
	accent-color: var(--focus);
	width: 1rem;
	height: 1rem;
	cursor: pointer;
}

.production-filter-toggle-label {
	font-size: 0.82rem;
	color: var(--text-soft);
}

.production-filter-toggle-wrap:hover .production-filter-toggle-label {
	color: var(--text-main);
}

.production-filter-field {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.production-filter-field-label {
	font-size: 0.78rem;
	color: var(--text-soft);
	white-space: nowrap;
}

.production-filter-select {
	background: var(--bg-accent, rgba(15, 23, 42, 0.72));
	border: 1px solid var(--surface-border);
	border-radius: 6px;
	color: var(--text-main);
	font-family: inherit;
	font-size: 0.8rem;
	padding: 0.28rem 0.55rem;
	cursor: pointer;
	transition: border-color 0.12s ease;
}

.production-filter-select:hover,
.production-filter-select:focus {
	border-color: var(--focus);
	outline: none;
}

.production-filter-facilities-only.is-hidden {
	display: none;
}

@media (max-width: 820px) {
	.production-filter-toggle-stack {
		border-right: 0;
		border-bottom: 1px solid rgba(148, 163, 184, 0.18);
		padding-right: 0;
		padding-bottom: 0.55rem;
		min-width: 100%;
	}

	.production-filter-fields {
		flex: 1 1 100%;
	}
}

.production-card-hidden {
	display: none !important;
}

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

.production-card {
	background: linear-gradient(145deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.42));
	border: 1px solid var(--surface-border);
	border-radius: 12px;
	padding: 0.9rem;
	display: grid;
	gap: 0.7rem;
}

.production-card h3 {
	margin: 0;
	font-size: 1rem;
}

.production-card-head-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.2rem;
}

.production-card-title-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
}

.production-entity-thumb {
	width: 30px;
	height: 30px;
	border-radius: 6px;
	object-fit: cover;
	border: 1px solid rgba(148, 163, 184, 0.34);
	background: rgba(15, 23, 42, 0.7);
	flex-shrink: 0;
}

.production-entity-thumb-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(148, 163, 184, 0.82);
	font-size: 0.8rem;
}

.production-filter-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.production-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.38rem;
	padding: 0.32rem 0.62rem;
	border-radius: 999px;
	border: 1px solid rgba(125, 146, 179, 0.28);
	background: rgba(15, 23, 42, 0.58);
	color: var(--text-main);
	font: inherit;
	font-size: 0.76rem;
	line-height: 1;
	cursor: default;
	transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.production-filter-chip:hover {
	border-color: rgba(125, 146, 179, 0.28);
	background: rgba(15, 23, 42, 0.58);
}

.production-filter-chip.is-copyable {
	cursor: pointer;
	border-color: rgba(56, 189, 248, 0.38);
	background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(14, 165, 233, 0.07));
}

.production-filter-chip.is-copyable:hover {
	border-color: rgba(56, 189, 248, 0.48);
	background: linear-gradient(90deg, rgba(56, 189, 248, 0.24), rgba(14, 165, 233, 0.1));
}

.production-filter-chip-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-soft);
}


.production-filter-chip.is-copyable .production-filter-chip-label {
	color: #bae6fd;
}

.production-filter-chip-value {
	font-weight: 700;
}

.production-refresh-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.6rem;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(15, 23, 42, 0.66);
	color: var(--text-soft);
	font-size: 0.76rem;
	font-weight: 600;
	line-height: 1;
}

.production-refresh-btn:hover {
	color: var(--text-main);
	border-color: rgba(56, 189, 248, 0.42);
	background: rgba(18, 46, 66, 0.82);
}

.production-refresh-btn:disabled {
	opacity: 0.72;
	cursor: wait;
}

.production-refresh-btn.is-refreshing .production-refresh-icon {
	display: inline-block;
	animation: production-refresh-spin 0.9s linear infinite;
}

.production-refresh-icon {
	font-size: 0.88rem;
	line-height: 1;
}

@keyframes production-refresh-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.production-card p {
	margin: 0;
}

.production-stat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.55rem;
	border: 1px solid rgba(125, 146, 179, 0.35);
	border-radius: 10px;
	padding: 0.65rem;
	background: rgba(16, 24, 39, 0.45);
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.production-stat-grid > * {
	position: relative;
	z-index: 1;
}

.production-stat-grid.has-progress::before {
	content: '';
	position: absolute;
	inset: 0;
	width: var(--production-progress, 0%);
	background: linear-gradient(90deg, rgba(56, 189, 248, 0.34), rgba(59, 130, 246, 0.22));
	pointer-events: none;
	transition: width 220ms ease-out;
	z-index: 0;
}

.production-stat-grid.is-idle {
	grid-template-columns: 1fr;
	padding: 0.85rem 0.95rem;
	background:
		radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 34%),
		linear-gradient(145deg, rgba(9, 14, 27, 0.88), rgba(20, 27, 45, 0.72));
	border-color: rgba(96, 165, 250, 0.24);
	box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.06);
}

.production-idle-panel {
	position: relative;
	padding-left: 0.95rem;
}

.production-idle-panel::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.15rem;
	bottom: 0.15rem;
	width: 3px;
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(96, 165, 250, 0.92), rgba(147, 197, 253, 0.2));
	box-shadow: 0 0 12px rgba(96, 165, 250, 0.28);
}

.production-idle-kicker {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #93c5fd;
	margin-bottom: 0.3rem;
}

.production-idle-title {
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	color: #f8fbff;
	margin-bottom: 0.3rem;
}

.production-idle-copy {
	font-size: 0.84rem;
	line-height: 1.45;
	color: #cbd5e1;
}

.production-stat-label {
	display: block;
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--text-soft);
	margin-bottom: 0.2rem;
}

.production-stat-value {
	font-weight: 600;
	font-size: 0.95rem;
}

.production-value-entity {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.production-inline-entity-thumb {
	width: 30px;
	height: 30px;
	border-radius: 4px;
	object-fit: cover;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(15, 23, 42, 0.7);
	flex-shrink: 0;
}

.production-subsection {
	border-top: 1px solid rgba(148, 163, 184, 0.24);
	padding-top: 0.55rem;
}

.production-subsection-toggle {
 border-top: none;
 padding-top: 0;
 border: 1px solid rgba(148, 163, 184, 0.24);
 border-radius: 10px;
 background: rgba(16, 24, 39, 0.34);
 overflow: hidden;
}

.production-subsection-toggle.has-data {
	border-color: rgba(56, 189, 248, 0.38);
	background: linear-gradient(145deg, rgba(14, 44, 63, 0.58), rgba(19, 54, 74, 0.34));
	box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.08);
}

.production-subsection-toggle summary {
 list-style: none;
 cursor: pointer;
 padding: 0.7rem 0.85rem;
 font-size: 0.87rem;
 font-weight: 600;
 color: var(--text-main);
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 0.75rem;
}

.production-subsection-toggle > summary::-webkit-details-marker {
 display: none;
}

.production-subsection-toggle > summary::after {
 content: '+';
 color: var(--text-soft);
 font-size: 1rem;
 line-height: 1;
}

.production-subsection-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.7rem;
	height: 1.45rem;
	padding: 0 0.42rem;
	margin-left: auto;
	border-radius: 999px;
	background: rgba(56, 189, 248, 0.18);
	border: 1px solid rgba(56, 189, 248, 0.34);
	color: #d7f2ff;
	font-size: 0.74rem;
	font-weight: 700;
	line-height: 1;
}

.production-subsection-count.is-zero {
	background: rgba(148, 163, 184, 0.12);
	border-color: rgba(148, 163, 184, 0.24);
	color: var(--text-soft);
}

.production-subsection-toggle.has-data > summary {
	color: #e6f7ff;
	background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.03));
}

.production-subsection-toggle.has-data > summary::after {
	color: #7dd3fc;
}

.production-subsection-toggle[open] > summary {
 border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.production-subsection-toggle.has-data[open] > summary {
	border-bottom-color: rgba(56, 189, 248, 0.24);
}

.production-subsection-toggle[open] > summary::after {
 content: '−';
}
/* Queue panel status colours — override has-data blue */
.production-subsection-toggle.queue-status-ready {
	border-color: rgba(34, 197, 94, 0.42);
	background: linear-gradient(145deg, rgba(10, 50, 28, 0.6), rgba(20, 83, 45, 0.34));
	box-shadow: inset 0 1px 0 rgba(74, 222, 128, 0.1);
}
.production-subsection-toggle.queue-status-ready summary,
.production-subsection-toggle.queue-status-ready > summary {
	color: #86efac;
	background: linear-gradient(90deg, rgba(34, 197, 94, 0.14), rgba(20, 83, 45, 0.04));
}
.production-subsection-toggle.queue-status-ready > summary::after {
	color: #4ade80;
}
.production-subsection-toggle.queue-status-ready[open] > summary {
	border-bottom-color: rgba(34, 197, 94, 0.28);
}

.production-subsection-toggle.queue-status-partial {
	border-color: rgba(234, 179, 8, 0.42);
	background: linear-gradient(145deg, rgba(66, 32, 6, 0.6), rgba(92, 45, 10, 0.34));
	box-shadow: inset 0 1px 0 rgba(250, 204, 21, 0.1);
}
.production-subsection-toggle.queue-status-partial summary,
.production-subsection-toggle.queue-status-partial > summary {
	color: #fde047;
	background: linear-gradient(90deg, rgba(234, 179, 8, 0.14), rgba(92, 45, 10, 0.04));
}
.production-subsection-toggle.queue-status-partial > summary::after {
	color: #facc15;
}
.production-subsection-toggle.queue-status-partial[open] > summary {
	border-bottom-color: rgba(234, 179, 8, 0.28);
}

.production-subsection-toggle.queue-status-missing {
	border-color: rgba(239, 68, 68, 0.42);
	background: linear-gradient(145deg, rgba(69, 10, 10, 0.6), rgba(127, 29, 29, 0.34));
	box-shadow: inset 0 1px 0 rgba(252, 165, 165, 0.1);
}
.production-subsection-toggle.queue-status-missing summary,
.production-subsection-toggle.queue-status-missing > summary {
	color: #fca5a5;
	background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), rgba(127, 29, 29, 0.04));
}
.production-subsection-toggle.queue-status-missing > summary::after {
	color: #f87171;
}
.production-subsection-toggle.queue-status-missing[open] > summary {
	border-bottom-color: rgba(239, 68, 68, 0.28);
}

.production-subsection-body {
 padding: 0.75rem 0.85rem 0.8rem;
}

.production-list {
	margin: 0;
	padding-left: 1rem;
	display: grid;
	gap: 0.18rem;
	font-size: 0.85rem;
}

.production-requirement-status-list {
	padding-left: 0;
	list-style: none;
	gap: 0.55rem;
}

.production-datacard-list {
	padding-left: 0;
	list-style: none;
	gap: 0.42rem;
}

.production-datacard-item {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.production-datacard-thumb {
	width: 30px;
	height: 30px;
	border-radius: 4px;
	object-fit: cover;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(15, 23, 42, 0.72);
	flex-shrink: 0;
}

.production-datacard-thumb-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(148, 163, 184, 0.78);
	font-size: 0.76rem;
}

.production-requirement-summary {
	margin: 0 0 0.6rem;
	padding: 0.42rem 0.55rem;
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(15, 23, 42, 0.32);
}

.production-requirement-summary.is-ready {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(20, 83, 45, 0.18);
	color: #bbf7d0;
}

.production-requirement-summary.is-missing {
	border-color: rgba(245, 158, 11, 0.3);
	background: rgba(120, 53, 15, 0.16);
	color: #fde68a;
}

.production-requirement-status {
	padding: 0.55rem 0.65rem;
	border-radius: 10px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	background: rgba(15, 23, 42, 0.34);
}

.production-requirement-status.is-ready {
	border-color: rgba(34, 197, 94, 0.28);
	background: rgba(20, 83, 45, 0.2);
}

.production-requirement-status.is-missing {
	border-color: rgba(245, 158, 11, 0.3);
	background: rgba(120, 53, 15, 0.18);
}

.production-requirement-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.22rem;
}

.production-requirement-meta {
	font-size: 0.78rem;
	color: var(--text-soft);
}

.production-requirement-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.16rem 0.45rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.1;
	border: 1px solid transparent;
}

.production-requirement-pill.is-ready {
	background: rgba(34, 197, 94, 0.16);
	border-color: rgba(34, 197, 94, 0.34);
	color: #bbf7d0;
}

.production-requirement-pill.is-missing {
	background: rgba(245, 158, 11, 0.16);
	border-color: rgba(245, 158, 11, 0.34);
	color: #fde68a;
}

.production-queue-item {
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 8px;
	margin-bottom: 6px;
	overflow: hidden;
}

.production-queue-item.is-ready {
	border-color: rgba(34, 197, 94, 0.38);
	background: rgba(20, 83, 45, 0.12);
}

.production-queue-item.is-missing {
	border-color: rgba(239, 68, 68, 0.38);
	background: rgba(127, 29, 29, 0.12);
}

.production-queue-item.is-unknown {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.18);
}

.production-queue-item-summary {
	cursor: pointer;
	padding: 0.55rem 0.75rem;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	user-select: none;
}

.production-queue-item-thumb {
	width: 30px;
	height: 30px;
	border-radius: 5px;
	object-fit: cover;
	border: 1px solid rgba(148, 163, 184, 0.32);
	background: rgba(15, 23, 42, 0.72);
	flex-shrink: 0;
}

.production-queue-item-title {
	display: inline-flex;
	align-items: baseline;
	gap: 0.34rem;
	flex-wrap: wrap;
	min-width: 0;
}

.production-queue-item-summary::-webkit-details-marker {
	display: none;
}

.production-queue-item-summary::after {
	content: '+';
	margin-left: auto;
	font-size: 1rem;
	opacity: 0.5;
	flex-shrink: 0;
}

.production-queue-item[open] > .production-queue-item-summary::after {
	content: '\2212';
}

.production-queue-item.is-ready > .production-queue-item-summary {
	color: #86efac;
}

.production-queue-item.is-missing > .production-queue-item-summary {
	color: #fca5a5;
}

.production-queue-item-meta {
	font-size: 0.78rem;
	color: var(--text-soft);
	font-weight: 400;
}

.production-queue-item-body {
	padding: 0.6rem 0.85rem 0.75rem;
	border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.production-detail-status {
	font-size: 0.78rem;
	margin-top: 0.1rem;
}

@media (max-width: 920px) {
	.production-stat-grid {
		grid-template-columns: 1fr;
	}

	.production-card-head-row {
		align-items: flex-start;
	}

	.production-refresh-label {
		display: none;
	}
}
.access-table th {
	text-align: left;
	padding: 0.5rem 0.75rem;
	border-bottom: 2px solid var(--surface-border);
	color: var(--text-soft);
	font-weight: 600;
}
.access-table td {
	padding: 0.45rem 0.75rem;
	border-bottom: 1px solid var(--surface-border);
	vertical-align: middle;
}
.access-table td em {
	color: #666;
}
.btn-edit-rule,
.btn-delete-rule {
	border: none;
	border-radius: 5px;
	padding: 0.25rem 0.6rem;
	font-size: 0.78rem;
	cursor: pointer;
	font-family: inherit;
	margin-right: 0.3rem;
}
.btn-edit-rule {
	background: var(--focus);
	color: #fff;
}
.btn-delete-rule {
	background: #c0392b;
	color: #fff;
}
.checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-top: 0.25rem;
}
.checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.88rem;
	cursor: pointer;
	color: var(--text-soft);
}
.checkbox-label input[type=checkbox] {
	accent-color: var(--action);
}
.form-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}
.form-col {
	align-items: flex-start;
	flex-direction: column;
}
.admin-msg {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	min-height: 1.2em;
}
.admin-msg.success { color: #2ecc71; }
.admin-msg.error   { color: #e74c3c; }

.mining-section {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

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

.mining-card {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: 12px;
	padding: 1rem;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.mining-card h3 {
	margin: 0.15rem 0 0.75rem;
	font-size: 1.08rem;
	line-height: 1.35;
}

.mining-card-kicker {
	margin: 0;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-soft);
	font-weight: 600;
}

.mining-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: 0.6rem;
}

.mining-card-asteroid {
	border-color: rgba(148, 163, 184, 0.35);
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.75));
}

.mining-card-cargo-full {
	border-color: rgba(248, 113, 113, 0.75);
	box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 12px 30px rgba(127, 29, 29, 0.35);
}

.mining-stat-grid {
	grid-template-columns: 1fr;
	gap: 0.6rem;
	padding: 0.6rem;
}

.mining-stat-top {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0.5rem;
	padding: 0.55rem;
	border-radius: 9px;
	overflow: hidden;
	background: rgba(9, 18, 34, 0.55);
	border: 1px solid rgba(125, 146, 179, 0.26);
	isolation: isolate;
}

.mining-stat-top::before {
	content: '';
	position: absolute;
	inset: 0;
	width: var(--mining-progress, 0%);
	background: linear-gradient(90deg, rgba(56, 189, 248, 0.34), rgba(59, 130, 246, 0.22));
	z-index: 0;
	pointer-events: none;
	transition: width 220ms ease-out;
}

.mining-stat-top > * {
	position: relative;
	z-index: 1;
}

.mining-stat-bottom {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0.5rem;
	padding: 0.55rem;
	border-radius: 9px;
	background: rgba(10, 16, 30, 0.44);
	border: 1px solid rgba(125, 146, 179, 0.22);
}

.mining-stat-top > div,
.mining-stat-bottom > div {
	min-width: 0;
}

.mining-stat-top .production-stat-label,
.mining-stat-bottom .production-stat-label {
	display: block;
	line-height: 1.2;
	word-break: break-word;
}

.mining-stat-top .production-stat-value,
.mining-stat-bottom .production-stat-value {
	line-height: 1.2;
	word-break: break-word;
}

.mining-cargo-block {
	grid-column: 1 / -1;
	display: grid;
	gap: 0.3rem;
	padding-top: 0.15rem;
}

.mining-cargo-block-asteroid {
	grid-column: auto;
}

.mining-asteroid-panel {
	gap: 0.5rem;
}

.mining-asteroid-metric {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: grid;
	gap: 0.35rem;
	padding: 0.55rem;
	border-radius: 9px;
	background: rgba(10, 16, 30, 0.48);
	border: 1px solid rgba(125, 146, 179, 0.22);
}

.mining-asteroid-metric::before {
	content: '';
	position: absolute;
	inset: 0;
	width: var(--cargo-fill, 0%);
	background: linear-gradient(90deg, rgba(34, 197, 94, 0.28), rgba(16, 185, 129, 0.22));
	transition: width 180ms ease;
	z-index: 0;
	pointer-events: none;
}

.mining-asteroid-metric > * {
	position: relative;
	z-index: 1;
}

.mining-asteroid-metric-full::before {
	background: linear-gradient(90deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.24));
}

.mining-asteroid-metric-head {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	align-items: baseline;
}

.mining-asteroid-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.85rem;
	margin: 0.5rem 0 0.75rem;
	padding: 0.7rem;
	border-radius: 10px;
	background: rgba(2, 6, 23, 0.35);
	border: 1px solid rgba(148, 163, 184, 0.18);
}

.mining-metric {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.2;
	margin-top: 0.2rem;
}

.mining-source-cats {
	font-size: 0.9rem;
	margin-top: 0.2rem;
	color: var(--text-soft);
}

.mining-squad-block {
	border-top: 1px solid var(--surface-border);
	padding-top: 0.7rem;
}

.mining-squad-block h4 {
	margin: 0 0 0.45rem;
	font-size: 0.93rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-soft);
}

.mining-squad-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.38rem;
}

.mining-squad-list li {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.34rem 0.45rem;
	border-radius: 7px;
	background: rgba(30, 41, 59, 0.35);
	font-size: 0.88rem;
}

.mining-squad-list li span {
	color: var(--text-soft);
	text-align: right;
	font-size: 0.82rem;
}

@media (max-width: 700px) {
	.mining-card-grid {
		grid-template-columns: 1fr;
	}

	.mining-squad-list li {
		flex-direction: column;
		align-items: flex-start;
	}

	.mining-squad-list li span {
		text-align: left;
	}
}

