* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

.st-header {
	position: absolute; top: 0; left: 0; right: 0; z-index: 1000;
	display: flex; align-items: center; gap: 16px;
	background: rgba(13, 34, 53, 0.92); color: #fff; padding: 10px 16px;
}
.st-header h1 { font-size: 18px; margin: 0; font-weight: 600; }
.st-header a { color: #9fd3ff; text-decoration: none; font-size: 14px; }
.st-header .st-count { margin-left: auto; font-size: 13px; opacity: 0.85; }

#map { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }

.st-marker {
	display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.st-marker .st-dot {
	width: 14px; height: 14px; border-radius: 50%;
	border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.st-marker .st-label {
	background: rgba(255,255,255,0.9); border-radius: 3px; padding: 1px 5px;
	font-size: 11px; font-weight: 600; color: #123;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.st-marker.st-stale { opacity: 0.55; }
.st-marker.st-closed { opacity: 0.7; filter: grayscale(1); }

.st-tooltip { font-size: 12px; line-height: 1.5; }
.st-tooltip .st-warn { color: #b00; font-weight: 600; }

.st-panel {
	position: absolute; top: 56px; right: 10px; z-index: 1000; width: 280px;
	background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.35);
	padding: 14px 16px; font-size: 13px; display: none;
}
.st-panel h2 { margin: 0 0 8px; font-size: 16px; }
.st-panel table { width: 100%; border-collapse: collapse; }
.st-panel td { padding: 3px 0; }
.st-panel td:first-child { color: #667; }
.st-panel .st-close { float: right; cursor: pointer; border: none; background: none; font-size: 16px; }
.st-panel a { color: #06c; }

.st-page { max-width: 900px; margin: 0 auto; padding: 70px 16px 40px; }
.st-page table.st-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-page table.st-list th, .st-page table.st-list td {
	text-align: left; padding: 8px 10px; border-bottom: 1px solid #dde;
}
.st-page .st-header { position: fixed; }

#trackMap { height: 420px; border-radius: 8px; margin-bottom: 16px; }
/* !important: Leaflet puts position:relative inline on its container */
#trackMap.st-fullscreen {
	position: fixed !important; top: 0; left: 0; right: 0; bottom: 0;
	height: auto; z-index: 2000; border-radius: 0; margin: 0;
}
.st-logo { max-height: 64px; max-width: 220px; display: block; margin-bottom: 8px; }

/* Certificate page - landscape layout: text left, map right */
.st-cert { max-width: 1100px; margin: 0 auto; padding: 40px 30px; text-align: center;
	font-family: Georgia, "Times New Roman", serif; color: #16283a; }
.st-cert-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; }
@media (max-width: 800px) { .st-cert-grid { grid-template-columns: 1fr; } }
.st-cert .st-logo { margin: 0 auto 14px; display: block; }
.st-cert h1 { font-size: 26px; letter-spacing: 3px; text-transform: uppercase; margin: 0 0 4px;
	color: #0d2235; }
.st-cert .st-cert-rule { width: 120px; border: 0; border-top: 2px solid #b7c6d4; margin: 14px auto; }
.st-cert .st-cert-name { font-size: 40px; margin: 10px 0 2px; }
.st-cert .st-cert-tag { font-size: 20px; font-style: italic; margin: 0 0 12px; }
.st-cert .st-cert-meta { font-size: 15px; margin: 4px 0; }
.st-cert .st-stats { justify-content: center; margin: 18px 0; }
.st-cert #certMap { height: 420px; border: 1px solid #cdd9e4; }
.st-cert .st-cert-footer { font-size: 12px; color: #667; margin-top: 14px; }
@media print {
	@page { size: A4 landscape; margin: 10mm; }
	.st-header, .st-noprint { display: none !important; }
	body { margin: 0; }
	.st-cert { padding: 0 !important; max-width: none; }
	.st-cert-grid { grid-template-columns: 1fr 1.1fr !important; gap: 8mm; }
	.st-cert #certMap { height: 160mm; border-radius: 0; }
	.st-cert .st-cert-footer { margin-top: 6mm; }
}
.st-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.st-stats .st-stat { background: #f2f6fa; border-radius: 8px; padding: 10px 18px; }
.st-stats .st-stat b { display: block; font-size: 20px; }
.st-stats .st-stat span { font-size: 12px; color: #667; }
.st-btn {
	display: inline-block; background: #0d2235; color: #fff; border-radius: 6px;
	padding: 8px 14px; text-decoration: none; font-size: 14px; border: none; cursor: pointer;
}
