:root { color-scheme: dark; font-family: Inter, system-ui, sans-serif; background: #071312; color: #e5f2f0; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #123d39, #071312 45%); }
header { display: flex; align-items: center; justify-content: space-between; padding: 24px 32px; border-bottom: 1px solid #22423f; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; }
header p, .login p { margin-top: 6px; color: #91aaa7; }
main { max-width: 1500px; margin: 0 auto; padding: 24px; }
.card { background: rgba(13, 31, 29, .94); border: 1px solid #254542; border-radius: 18px; box-shadow: 0 14px 38px #0005; }
.login { max-width: 620px; margin: 12vh auto 0; padding: 24px; }
.login-row { display: flex; gap: 10px; margin-top: 20px; }
input, button { min-height: 46px; border-radius: 12px; border: 1px solid #345d59; font: inherit; }
input { flex: 1; padding: 0 14px; background: #081b19; color: #fff; }
button { padding: 0 20px; background: #26b9ab; color: #031210; font-weight: 700; cursor: pointer; }
.error { min-height: 24px; margin-top: 12px !important; color: #ff8c87 !important; }
.status { padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.status.online { color: #6ff0c1; background: #123c31; }
.status.offline { color: #ff9994; background: #431f1d; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.metric { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; }
.metric span { color: #9eb4b1; }
.metric strong { font-size: 28px; color: #61ded1; }
.map-card { overflow: hidden; }
#map { height: 58vh; min-height: 420px; background: #10211f; }
/* Critical Leaflet layout is kept locally: the map remains correct even when
   a browser extension, proxy or CDN failure blocks the external stylesheet. */
.leaflet-container { overflow: hidden; position: relative; outline-offset: 1px; font: 12px/1.5 system-ui, sans-serif; }
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container,
.leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box { position: absolute; left: 0; top: 0; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-tile { visibility: hidden; user-select: none; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; } .leaflet-right { right: 0; } .leaflet-bottom { bottom: 0; } .leaflet-left { left: 0; }
.leaflet-control { margin: 10px; }
.leaflet-bar { border: 1px solid #345d59; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px #0007; }
.leaflet-bar a { display: block; width: 34px; height: 34px; background: #102522; color: #e5f2f0; text-align: center; text-decoration: none; font: bold 22px/34px system-ui; border-bottom: 1px solid #345d59; }
.leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-control-attribution { padding: 2px 6px; background: #071312cc; color: #b8cbc8; }
.leaflet-control-attribution a { color: #66ded1; }
.leaflet-interactive { cursor: pointer; }
.leaflet-popup { position: absolute; text-align: center; margin-bottom: 20px; }
.leaflet-popup-content-wrapper { padding: 1px; border-radius: 10px; box-shadow: 0 3px 14px #0008; }
.leaflet-popup-content { margin: 13px 18px; line-height: 1.4; }
.leaflet-popup-tip-container { width: 40px; height: 20px; position: absolute; left: 50%; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip { width: 17px; height: 17px; margin: -10px auto 0; transform: rotate(45deg); box-shadow: 3px 3px 8px #0006; }
.table-card { margin-top: 14px; padding: 20px; }
.table-scroll { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #24413e; white-space: nowrap; }
tbody tr.selectable { cursor: pointer; transition: background .15s ease; }
tbody tr.selectable:hover, tbody tr.selectable:focus { background: #173a36; outline: none; }
th { color: #8da6a3; font-size: 13px; text-transform: uppercase; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: #687b79; }
.dot.online { background: #3ee8a6; box-shadow: 0 0 10px #3ee8a6; }
.mono { font-family: ui-monospace, monospace; color: #91aaa7; font-size: 12px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #102522; color: #e8f3f2; }
.detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.detail-list { margin:0; padding-left:22px; }
.detail-list li { padding:5px 0; white-space:normal; }
.muted { color:#91aaa7; }
@media (max-width: 760px) { header { padding: 18px; } main { padding: 12px; } .summary { grid-template-columns: 1fr; } .login-row { flex-direction: column; } #map { height: 52vh; } }
