:root {
  color-scheme: dark;
  --bg: #020711;
  --panel: rgba(7, 15, 29, .88);
  --panel-solid: #07101e;
  --border: rgba(132, 160, 197, .22);
  --border-bright: rgba(55, 135, 255, .34);
  --text: #f3f7fd;
  --muted: #8d9db3;
  --dim: #64758d;
  --blue: #2377ff;
  --cyan: #15e6ff;
  --teal: #2ee6cb;
  --green: #4de59b;
  --purple: #8f50ff;
  --pink: #d946ef;
  --amber: #ffb52f;
  --red: #ff526f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell { width: 100%; height: 100%; background: #020711; }

.topbar {
  height: 78px;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1500;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) auto minmax(520px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 28px 0 30px;
  border-bottom: 1px solid rgba(112, 147, 194, .14);
  background: linear-gradient(180deg, rgba(2,7,17,.99), rgba(2,7,17,.93));
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 45px rgba(0,0,0,.14);
}

.brand { display: inline-flex; align-items: center; gap: 13px; width: max-content; text-decoration: none; color: #f7fbff; font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.brand-mark { display: inline-flex; width: 36px; height: 36px; filter: drop-shadow(0 0 15px rgba(24, 132, 255, .3)); }
.brand-mark svg { width: 100%; height: 100%; }

.nav { display: flex; align-self: stretch; align-items: center; gap: 20px; }
.nav-link { height: 100%; padding: 0 8px; border: 0; background: transparent; position: relative; color: #aab5c6; font-size: 13px; cursor: pointer; transition: color .2s ease; }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link.active::after { content: ""; position: absolute; height: 2px; left: 8px; right: 8px; bottom: -1px; background: linear-gradient(90deg, #6a76ff, #b04aff); box-shadow: 0 0 12px rgba(127, 79, 255, .72); }

.top-actions { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.global-search { position: relative; width: min(320px, 42vw); }
.global-search > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: #8292a9; stroke-width: 1.8; pointer-events: none; }
.global-search input { width: 100%; height: 42px; border: 1px solid rgba(126,153,189,.23); border-radius: 10px; background: rgba(4,10,21,.78); padding: 0 42px 0 41px; color: #f8fbff; outline: none; font-size: 12px; }
.global-search input::placeholder { color: #66758b; }
.global-search input:focus { border-color: rgba(70, 121, 255, .65); box-shadow: 0 0 0 3px rgba(54, 111, 255, .08), 0 0 24px rgba(47,91,255,.08); }
.search-button { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; border-radius: 8px; }
.search-button:hover { background: rgba(255,255,255,.04); }
.search-button svg { width: 17px; fill: none; stroke: #9cabc0; stroke-width: 1.8; }
.search-results { position: absolute; z-index: 1900; top: 48px; left: 0; right: 0; max-height: 420px; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: rgba(4,10,20,.985); box-shadow: 0 26px 80px rgba(0,0,0,.55); }
.search-result { display: block; width: 100%; border: 0; border-radius: 8px; background: transparent; color: white; text-align: left; padding: 10px 11px; cursor: pointer; }
.search-result:hover { background: rgba(49, 101, 205, .14); }
.search-result strong { display: block; font-size: 12px; }
.search-result small { display: block; color: #7e90a8; margin-top: 3px; line-height: 1.35; }

.square-button, .outline-button, .gradient-button { border-radius: 10px; cursor: pointer; transition: .18s ease; }
.square-button { width: 42px; height: 42px; border: 1px solid rgba(126,153,189,.22); background: rgba(5,12,24,.72); display: grid; place-items: center; }
.square-button svg { width: 18px; fill: none; stroke: #dbe5f2; stroke-width: 1.7; }
.square-button:hover { border-color: rgba(115, 145, 255, .5); background: rgba(11, 22, 43, .82); }
.outline-button { min-height: 42px; padding: 0 16px; border: 1px solid rgba(126,153,189,.25); background: rgba(4,10,20,.58); color: #f3f7fd; }
.outline-button:hover { border-color: rgba(100,140,255,.55); background: rgba(10,20,38,.84); }
.gradient-button { min-height: 42px; padding: 0 17px; border: 1px solid rgba(148, 91, 255, .48); background: linear-gradient(135deg, #2e75ff 0%, #674dff 50%, #9a32e9 100%); color: white; font-weight: 600; box-shadow: inset 0 1px rgba(255,255,255,.17), 0 9px 30px rgba(91,53,255,.22); }
.gradient-button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: inset 0 1px rgba(255,255,255,.21), 0 12px 36px rgba(91,53,255,.3); }
.gradient-button:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.account-button { white-space: nowrap; }

.map-stage { position: fixed; inset: 78px 0 0; overflow: hidden; background: #020711; }
#map { position: absolute; inset: 0; background: radial-gradient(ellipse at 52% 46%, #071a33 0%, #031024 38%, #020711 76%); }
.leaflet-container { background: #020711; font-family: inherit; }
.leaflet-tile-pane { filter: saturate(.88) brightness(.72) contrast(1.08) hue-rotate(3deg); opacity: .86; }
.leaflet-control-attribution { background: rgba(2,7,17,.72) !important; color: rgba(132,151,177,.55) !important; font-size: 9px !important; border-radius: 5px 0 0 0; }
.leaflet-control-attribution a { color: rgba(148,167,196,.72) !important; }

.ocean-glow { pointer-events: none; position: absolute; z-index: 380; inset: 0; background:
  radial-gradient(ellipse at 54% 49%, rgba(17, 92, 186, .11), transparent 35%),
  radial-gradient(ellipse at 38% 50%, rgba(14, 80, 162, .06), transparent 29%); mix-blend-mode: screen; }
.edge-vignette { pointer-events: none; position: absolute; z-index: 610; inset: 0; background: radial-gradient(ellipse at 52% 49%, transparent 40%, rgba(2,7,17,.08) 65%, rgba(2,7,17,.56) 100%); }

.glass-card { position: absolute; z-index: 900; border: 1px solid rgba(132,160,197,.22); background: linear-gradient(180deg, rgba(8,17,32,.87), rgba(5,12,24,.82)); backdrop-filter: blur(19px); box-shadow: 0 22px 70px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.025); border-radius: 14px; }

.density-card { top: 44px; right: 31px; width: 172px; padding: 18px 20px 19px; }
.density-title { font-size: 13px; font-weight: 650; letter-spacing: -.015em; margin-bottom: 13px; }
.density-scale { height: 126px; display: flex; gap: 13px; align-items: stretch; }
.density-gradient { width: 14px; border-radius: 999px; background: linear-gradient(180deg, #e34cf8 0%, #7c4dff 24%, #2777ff 48%, #17d8e8 73%, #5ae99d 100%); box-shadow: 0 0 16px rgba(79, 99, 255, .22); }
.density-labels { display: flex; flex-direction: column; justify-content: space-between; color: #b3bfd0; font-size: 11px; padding: 1px 0; }

.layers-card { left: 31px; bottom: 28px; width: 268px; overflow: hidden; }
.card-heading { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 17px; border-bottom: 1px solid rgba(132,160,197,.14); font-size: 13px; font-weight: 650; }
.heading-icon { display: inline-flex; width: 18px; height: 18px; }
.heading-icon svg, .coverage-icon svg { width: 100%; height: 100%; fill: none; stroke: #dbe8f6; stroke-width: 1.7; stroke-linejoin: round; }
.chevron-button { margin-left: auto; display: grid; place-items: center; width: 29px; height: 29px; border: 0; background: transparent; color: #92a3b9; border-radius: 7px; cursor: pointer; }
.chevron-button:hover { background: rgba(255,255,255,.04); color: white; }
.chevron-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s ease; }
.layers-card.collapsed .chevron-button svg { transform: rotate(180deg); }
.layers-card.collapsed .layer-rows { display: none; }
.layer-rows { padding: 6px 0 9px; }
.layer-row { position: relative; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; color: #a8b5c6; font-size: 11px; cursor: pointer; }
.layer-row:hover { color: #dfe8f4; background: rgba(255,255,255,.018); }
.layer-name { display: inline-flex; align-items: center; gap: 10px; }
.layer-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.layer-swatch.density { background: #23e6ff; box-shadow: 0 0 7px #16e0ff, 0 0 15px rgba(22,224,255,.8); }
.mini-icon { display: inline-grid; place-items: center; width: 13px; color: #8998ac; font-size: 11px; }
.layer-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { width: 31px; height: 18px; border-radius: 999px; background: #121a2d; border: 1px solid rgba(139,155,182,.12); position: relative; transition: .18s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,.22); }
.toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: #58677c; transition: .18s ease; }
.layer-row input:checked + .toggle { background: linear-gradient(90deg, rgba(28,204,249,.95), rgba(99,77,255,.95)); border-color: rgba(65,150,255,.5); box-shadow: 0 0 10px rgba(42, 124, 255, .2); }
.layer-row input:checked + .toggle::after { transform: translateX(13px); background: #eaf6ff; box-shadow: 0 0 8px rgba(255,255,255,.55); }

.coverage-card { right: 31px; bottom: 28px; width: 285px; padding: 18px 18px 13px; }
.coverage-title { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 650; color: #f2f7ff; }
.coverage-icon { width: 18px; height: 18px; display: inline-flex; color: #327aff; }
.coverage-icon svg { stroke: #327aff; }
.coverage-card p { margin: 13px 0 14px; color: #899ab1; font-size: 10.5px; line-height: 1.6; }
.coverage-card strong { color: #25dfff; }
.coverage-action { width: 100%; height: 39px; border: 1px solid rgba(45,105,204,.38); border-radius: 9px; background: rgba(3,13,28,.35); display: flex; align-items: center; justify-content: space-between; padding: 0 13px; color: #25dfff; font-size: 11px; cursor: pointer; }
.coverage-action:hover { border-color: rgba(46, 157, 255, .55); background: rgba(9,27,53,.52); }
.coverage-action span { font-size: 19px; line-height: 1; }

.boundary-status { position: absolute; z-index: 950; left: 50%; top: 25px; transform: translateX(-50%); border: 1px solid rgba(92,133,192,.24); border-radius: 999px; padding: 7px 12px; background: rgba(5,12,25,.82); backdrop-filter: blur(12px); color: #a9bad0; font-size: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.28); }
.preview-badge { position: absolute; z-index: 850; bottom: 13px; left: 50%; transform: translateX(-50%); color: rgba(121, 144, 174, .62); font-size: 8px; font-weight: 700; letter-spacing: .16em; pointer-events: none; }

/* Leaflet controls */
.leaflet-control-container .leaflet-top.leaflet-left { top: 24px; left: 24px; }
.leaflet-control-zoom { border: 1px solid rgba(132,160,197,.22) !important; border-radius: 11px !important; overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,.32) !important; }
.leaflet-control-zoom a { width: 42px !important; height: 43px !important; line-height: 42px !important; background: rgba(5,12,24,.88) !important; color: #eef6ff !important; border-bottom: 1px solid rgba(132,160,197,.14) !important; font-size: 21px !important; }
.leaflet-control-zoom a:hover { background: rgba(12,26,48,.94) !important; }
.locate-control { margin-top: 8px !important; }
.locate-control button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(132,160,197,.22); border-radius: 11px; background: rgba(5,12,24,.88); color: #eef6ff; box-shadow: 0 18px 45px rgba(0,0,0,.22); cursor: pointer; }
.locate-control button:hover { background: rgba(12,26,48,.94); }
.locate-control svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; }

/* map labels */
.sea-label { color: rgba(47, 124, 235, .62); font-size: 11px; font-weight: 520; letter-spacing: .27em; font-style: italic; text-transform: none; text-shadow: 0 2px 10px #020711; white-space: nowrap; pointer-events: none; }

/* luminous evidence nodes */
.evidence-icon { background: transparent !important; border: 0 !important; }
.glow-node { --node: #25dfff; width: 38px; height: 38px; position: relative; transform: translate(-3px, -3px); }
.glow-node::before, .glow-node::after { content: ""; position: absolute; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.glow-node::before { width: 30px; height: 30px; background: radial-gradient(circle, color-mix(in srgb, var(--node) 42%, transparent) 0%, color-mix(in srgb, var(--node) 16%, transparent) 35%, transparent 72%); filter: blur(2px); animation: nodePulse 3.4s ease-in-out infinite; }
.glow-node::after { width: 6px; height: 6px; background: #f5fdff; border: 1px solid color-mix(in srgb, var(--node) 76%, white); box-shadow: 0 0 5px #fff, 0 0 10px var(--node), 0 0 19px var(--node), 0 0 30px color-mix(in srgb, var(--node) 67%, transparent); }
.glow-node.size-2::before { width: 40px; height: 40px; }
.glow-node.size-2::after { width: 8px; height: 8px; }
.glow-node.size-3::before { width: 54px; height: 54px; }
.glow-node.size-3::after { width: 10px; height: 10px; box-shadow: 0 0 6px #fff, 0 0 14px var(--node), 0 0 28px var(--node), 0 0 48px color-mix(in srgb, var(--node) 74%, transparent); }
.glow-node.preview { opacity: .86; }
.glow-node.preview::after { width: 5px; height: 5px; }
.glow-node.sourced::after { box-shadow: 0 0 7px #fff, 0 0 16px var(--node), 0 0 31px var(--node), 0 0 54px color-mix(in srgb, var(--node) 80%, transparent); }
@keyframes nodePulse { 0%,100% { opacity: .68; transform: translate(-50%,-50%) scale(.82); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.12); } }

.leaflet-tooltip.preview-tooltip, .leaflet-tooltip.evidence-tooltip { background: rgba(5,12,24,.96); color: #dceaff; border: 1px solid rgba(93,137,201,.26); border-radius: 9px; box-shadow: 0 12px 34px rgba(0,0,0,.38); padding: 7px 9px; font-size: 10px; }
.leaflet-tooltip-top.preview-tooltip::before, .leaflet-tooltip-top.evidence-tooltip::before { border-top-color: rgba(5,12,24,.96); }

/* side drawers */
.side-drawer { position: absolute; z-index: 1250; top: 20px; right: 20px; width: 375px; max-height: calc(100% - 40px); overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(132,160,197,.23); border-radius: 16px; background: rgba(5,12,24,.96); backdrop-filter: blur(23px); box-shadow: 0 26px 90px rgba(0,0,0,.52); transform: translateX(calc(100% + 35px)); opacity: 0; transition: transform .24s ease, opacity .2s ease; pointer-events: none; }
.side-drawer.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 20px 13px; }
.drawer-head h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.035em; }
.eyebrow { color: #3ce6ff; text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: 750; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(132,160,197,.18); background: rgba(255,255,255,.025); color: #9eafc4; border-radius: 9px; cursor: pointer; font-size: 20px; }
.icon-button:hover { color: #fff; border-color: rgba(77,130,255,.5); }
.drawer-primary { margin: 0 20px 12px; min-height: 43px; border: 1px solid rgba(95,86,255,.5); border-radius: 10px; background: linear-gradient(135deg, rgba(38,118,255,.95), rgba(142,56,239,.95)); color: white; font-size: 12px; font-weight: 650; cursor: pointer; }
.drawer-search { padding: 0 20px 12px; }
.drawer-search input { width: 100%; height: 38px; border: 1px solid rgba(132,160,197,.18); border-radius: 9px; padding: 0 12px; outline: 0; background: rgba(2,8,17,.7); color: white; font-size: 11px; }
.drawer-list { flex: 1; overflow: auto; border-top: 1px solid rgba(132,160,197,.12); padding: 7px; }
.evidence-row { width: 100%; display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: center; border: 0; border-radius: 10px; padding: 11px 10px; background: transparent; color: white; text-align: left; cursor: pointer; }
.evidence-row:hover { background: rgba(42,88,166,.12); }
.evidence-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--row-color); box-shadow: 0 0 10px var(--row-color); }
.evidence-row h3 { margin: 0; font-size: 11.5px; font-weight: 620; }
.evidence-row p { margin: 4px 0 0; color: #718399; font-size: 9.5px; }
.evidence-row .value { color: #b7c7da; font-size: 10px; text-align: right; max-width: 85px; overflow-wrap: anywhere; }
.empty-state { margin: 18px 12px; padding: 18px; border: 1px dashed rgba(132,160,197,.18); border-radius: 12px; color: #8091a8; font-size: 11px; line-height: 1.55; }
.info-content { overflow: auto; padding: 0 20px 22px; color: #a6b5c7; font-size: 11px; line-height: 1.65; }
.info-content h3 { color: #eef6ff; font-size: 13px; margin: 18px 0 5px; }
.info-content p { margin: 0 0 9px; }
.info-content ul { margin: 8px 0 0; padding-left: 18px; }
.info-content li { margin: 7px 0; }
.status-key { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start; margin: 11px 0; }
.status-key i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--key); box-shadow: 0 0 9px var(--key); }
.status-key strong { color: #eef6ff; }

/* selected record */
.record-card { top: 20px; right: 20px; width: 350px; padding: 20px; z-index: 1200; }
.record-close { position: absolute; right: 12px; top: 12px; width: 31px; height: 31px; border-radius: 8px; border: 1px solid rgba(132,160,197,.16); background: rgba(255,255,255,.02); color: #8fa1b8; font-size: 18px; cursor: pointer; }
.record-card h2 { margin: 6px 32px 2px 0; font-size: 20px; line-height: 1.23; letter-spacing: -.03em; }
.record-place { margin: 0; color: #778ba4; font-size: 10.5px; }
.record-value { margin: 14px 0 11px; font-size: 27px; font-weight: 780; letter-spacing: -.04em; background: linear-gradient(90deg,#fff,#70e8ff 52%,#a584ff); -webkit-background-clip: text; color: transparent; }
.record-meta { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 0; padding: 11px 0; border-top: 1px solid rgba(132,160,197,.13); border-bottom: 1px solid rgba(132,160,197,.13); font-size: 9.5px; }
.record-meta dt { color: #677b94; }
.record-meta dd { margin: 0; color: #cbd8e7; text-align: right; overflow-wrap: anywhere; }
.record-notes { color: #8fa0b5; font-size: 10px; line-height: 1.55; margin: 11px 0; }
.record-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-action { min-height: 34px; display: inline-flex; align-items: center; border: 1px solid rgba(38,153,231,.35); border-radius: 8px; padding: 0 10px; color: #34dfff; background: rgba(8,31,51,.25); text-decoration: none; font-size: 9.5px; }
.mini-action.secondary { border-color: rgba(132,160,197,.18); color: #a8bbd0; }

/* modal */
.modal { width: min(820px, calc(100vw - 32px)); max-height: min(880px, calc(100vh - 32px)); overflow: auto; border: 1px solid rgba(132,160,197,.24); border-radius: 18px; padding: 0; color: var(--text); background: rgba(5,12,24,.985); box-shadow: 0 35px 120px rgba(0,0,0,.68); backdrop-filter: blur(24px); }
.modal::backdrop { background: rgba(0,4,12,.73); backdrop-filter: blur(8px); }
.modal-form { margin: 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 24px 17px; border-bottom: 1px solid rgba(132,160,197,.13); }
.modal-head h2 { margin: 6px 0 4px; font-size: 22px; letter-spacing: -.035em; }
.modal-head p { margin: 0; color: #8092a9; font-size: 10.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px 24px; }
.field { min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #a9b7c8; font-size: 10px; font-weight: 600; }
.field label span { color: #61738c; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid rgba(132,160,197,.19); border-radius: 9px; background: rgba(2,8,17,.78); color: #eaf1f9; outline: none; padding: 0 11px; font-size: 11px; }
.field input, .field select { height: 40px; }
.field textarea { padding-top: 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(57,137,255,.62); box-shadow: 0 0 0 3px rgba(50,102,224,.08); }
.resolve-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.resolved-place { margin-top: 9px; padding: 10px 11px; border: 1px solid rgba(35,210,236,.23); background: rgba(20,129,157,.08); border-radius: 9px; color: #c2eefa; font-size: 10px; line-height: 1.5; }
.resolved-place strong { color: #fff; }
.resolved-place a { color: #35e5ff; text-decoration: none; }
.place-candidates { margin-top: 8px; padding: 5px; border: 1px solid rgba(132,160,197,.17); border-radius: 10px; background: rgba(2,8,17,.62); max-height: 210px; overflow: auto; }
.place-candidate { display: block; width: 100%; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: white; text-align: left; cursor: pointer; }
.place-candidate:hover { background: rgba(42,88,166,.13); }
.place-candidate strong { display: block; font-size: 10.5px; }
.place-candidate small { display: block; color: #71849b; margin-top: 2px; font-size: 9px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 24px 21px; border-top: 1px solid rgba(132,160,197,.13); }
.modal-actions > span { margin-right: auto; color: #71849b; font-size: 9.5px; }

.toast { position: absolute; z-index: 2200; left: 50%; top: 20px; transform: translateX(-50%); padding: 9px 13px; border: 1px solid rgba(95,139,203,.28); background: rgba(5,12,24,.94); border-radius: 9px; box-shadow: 0 16px 45px rgba(0,0,0,.42); color: #cad8e8; font-size: 10px; backdrop-filter: blur(15px); }

@media (max-width: 1160px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .nav { justify-content: center; gap: 7px; }
  .global-search { width: 250px; }
  .account-button { display: none; }
}

@media (max-width: 820px) {
  .topbar { height: 68px; padding: 0 14px; display: flex; gap: 8px; }
  .brand { font-size: 16px; margin-right: auto; }
  .brand-mark { width: 30px; height: 30px; }
  .nav { display: none; }
  .global-search { width: min(230px, 48vw); }
  .square-button { display: none; }
  .map-stage { inset-top: 68px; inset: 68px 0 0; }
  .density-card { right: 12px; top: 12px; transform: scale(.88); transform-origin: top right; }
  .layers-card { left: 12px; bottom: 12px; width: 235px; }
  .coverage-card { right: 12px; bottom: 12px; width: 250px; }
  .preview-badge { display: none; }
  .side-drawer { inset: 10px; width: auto; max-height: calc(100% - 20px); }
  .record-card { left: 12px; right: 12px; top: 12px; width: auto; }
}

@media (max-width: 610px) {
  .global-search { width: 46px; }
  .global-search input { cursor: pointer; padding-left: 40px; color: transparent; }
  .global-search:focus-within { position: fixed; top: 11px; left: 12px; right: 12px; z-index: 2200; width: auto; }
  .global-search:focus-within input { color: white; }
  .layers-card { bottom: 10px; width: 220px; }
  .coverage-card { display: none; }
  .density-card { width: 145px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .modal-actions > span { display: none; }
}
