:root {
  --bg: #05080e;
  --bg-2: #0a1018;
  --panel: #0d1520;
  --panel-2: #111b28;
  --line: rgba(56, 189, 248, 0.18);
  --line-strong: rgba(56, 189, 248, 0.4);
  --text: #e8eef6;
  --muted: #8b9bb0;
  --cyan: #38bdf8;
  --cyan-2: #7dd3fc;
  --red: #ef4444;
  --red-2: #f87171;
  --green: #22c55e;
  --amber: #f59e0b;
  --silver: #cfd7e3;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: Inter, "Segoe UI", system-ui, sans-serif;
  --cond: "Barlow Condensed", "Rajdhani", Inter, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--cyan); }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0);
}

.local-banner {
  width: 100%;
  background: #12324d;
  color: #dbeafe;
  text-align: center;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-strong);
  letter-spacing: 0.02em;
}
.home .local-banner {
  position: absolute;
  top: 0;
  left: 0;
}
.app-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56,189,248,0.12), transparent 55%),
    radial-gradient(ellipse 40% 40% at 100% 100%, rgba(239,68,68,0.08), transparent 50%),
    linear-gradient(180deg, #05080e, #070c14 40%, #05080e);
}
.app-bg::after {
  content: "";
  position: absolute; inset: 0; opacity: 0.07;
  background-image: linear-gradient(rgba(56,189,248,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.35) 1px, transparent 1px);
  background-size: 42px 42px;
}

#app { position: relative; z-index: 1; min-height: 100%; }

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  text-align: center;
}
.home-logo {
  width: min(560px, 92vw);
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.55));
}
.home-kicker {
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  margin: 4px 0 28px;
}
.home-cards.access-only {
  grid-template-columns: repeat(2, minmax(0, 220px));
}
.kit-note {
  width: min(640px, 100%);
  margin: 0 auto 22px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(56,189,248,0.35);
  background: rgba(8,14,22,0.72);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.kit-note a { color: var(--cyan-2); font-weight: 700; }
.launch-card {
  background: linear-gradient(180deg, #121c2b, #0c141f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px 18px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.launch-card:hover, .launch-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px rgba(56,189,248,0.12);
  outline: none;
}
.launch-card .ic {
  width: 48px; height: 48px; margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(56,189,248,0.08);
  color: var(--cyan);
  font-size: 1.4rem;
}
.launch-card.admin .ic { color: var(--red-2); background: rgba(239,68,68,0.1); }
.launch-card.user .ic { color: var(--green); background: rgba(34,197,94,0.1); }
.launch-card h2 {
  font-family: var(--cond);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.launch-card p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.home-foot {
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 640px;
}
.brand-inline {
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-inline .map { color: var(--cyan); }
.brand-inline .bar-red { color: var(--red); margin: 0 4px; }
.brand-inline .bar-blue { color: var(--cyan); margin: 0 4px; }

/* GATE / FORMS */
.gate {
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}
.panel {
  width: min(920px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(239,68,68,0.12), transparent 28%, rgba(56,189,248,0.1));
}
.panel-head img { width: 92px; height: auto; }
.panel-head h1 {
  margin: 0;
  font-family: var(--cond);
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.panel-body { padding: 20px; }
.back-link {
  background: none; border: 0; color: var(--muted); padding: 0 0 12px; font-size: 0.85rem;
}
.back-link:hover { color: var(--cyan); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  background: #0a111a;
  border: 1px solid rgba(148,163,184,0.22);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}
#geo-q,
.map-search input#geo-q {
  font-size: 0.8rem !important;
  line-height: 1.2;
  min-height: 30px;
  padding: 4px 8px;
  color: #f8fafc !important;
  caret-color: #38bdf8;
  background: #071018 !important;
  border: 1px solid rgba(56, 189, 248, 0.45);
  -webkit-text-fill-color: #f8fafc;
}
textarea { min-height: 78px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}
.hint { color: var(--muted); font-size: 0.78rem; margin: 4px 0 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: linear-gradient(135deg, #38bdf8, #2563eb); color: #061018; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-green { background: linear-gradient(135deg, #22c55e, #15803d); color: #04120a; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.alert {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fecaca;
  font-size: 0.88rem;
  margin: 10px 0;
}
.ok {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.35);
  color: #bbf7d0;
}

.pin-wrap { max-width: 420px; margin: 0 auto; }
.pin-display {
  letter-spacing: 0.4em;
  font-size: 1.6rem;
  text-align: center;
  padding: 12px;
  margin-bottom: 12px;
  background: #070c12;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, Consolas, monospace;
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pin-pad button {
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #101826;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
}
.pin-pad button:hover { border-color: var(--cyan); }
.created-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
.code-box {
  background: #070c12;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.code-box strong {
  display: block;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--cyan-2);
  margin-top: 4px;
}
#share-qr { background: #fff; padding: 10px; border-radius: 10px; width: fit-content; margin: 0 auto; }

/* WORKSPACE */
.workspace { min-height: 100vh; height: 100vh; overflow: hidden; }
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: #080e16;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand img { width: 58px; }
.op-title {
  font-family: var(--cond);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}
.op-sub { color: var(--muted); font-size: 0.75rem; margin: 0; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #86efac;
  border: 1px solid rgba(34,197,94,0.4);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
}
.live-pill i {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 8px #22c55e; display: inline-block;
}
.role-pill {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.role-pill.admin { color: #fecaca; border-color: rgba(239,68,68,0.45); }
.topbar-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 140px;
}
.lock-caption {
  font-size: 0.68rem;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}
.btn-lock {
  background: #14532d;
  color: #ffffff;
  border: 2px solid #86efac;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
}
.btn-lock:hover,
.btn-lock:focus-visible {
  background: #166534;
  border-color: #bbf7d0;
  color: #ffffff;
}
.btn-lock.is-locked {
  background: #b45309;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.28);
}
.btn-lock.is-locked:hover,
.btn-lock.is-locked:focus-visible {
  background: #c2410c;
  border-color: #fde68a;
}
.admin-lock-banner {
  display: none;
  position: absolute;
  z-index: 1200;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: #b45309;
  color: #fff7ed;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #fbbf24;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.admin-lock-banner.show { display: block; }
.leaflet-container.ocm-admin-lock .leaflet-overlay-pane,
.leaflet-container.ocm-admin-lock .leaflet-marker-pane,
.leaflet-container.ocm-admin-lock .leaflet-shadow-pane,
.leaflet-container.ocm-admin-lock .leaflet-tooltip-pane,
.leaflet-container.ocm-admin-lock .leaflet-popup-pane,
.leaflet-container.ocm-admin-lock .leaflet-ocmShapes-pane {
  pointer-events: none !important;
}
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.save-state { color: var(--muted); font-size: 0.75rem; align-self: center; min-width: 90px; }

.workspace-body {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  height: calc(100vh - 64px);
  transition: grid-template-columns 0.18s ease;
}
.workspace-body.left-collapsed { grid-template-columns: 44px 1fr 280px; }
.workspace-body.right-collapsed { grid-template-columns: 280px 1fr 44px; }
.workspace-body.left-collapsed.right-collapsed { grid-template-columns: 44px 1fr 44px; }
.side {
  position: relative;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 12px 12px 12px 28px;
}
.side.right { border-right: 0; border-left: 1px solid var(--line); padding: 12px 28px 12px 12px; }
.side-toggle {
  position: absolute;
  top: 10px;
  z-index: 5;
  width: 22px;
  height: 44px;
  border: 1px solid var(--line);
  background: #0d1520;
  color: var(--cyan-2);
  font-size: 16px;
  line-height: 1;
  border-radius: 8px;
  padding: 0;
}
.side.left .side-toggle { right: 6px; }
.side.right .side-toggle { left: 6px; }
.side-rail { display: none; }
.side-body { min-height: 0; }
.side.collapsed {
  overflow: hidden;
  padding: 8px 4px;
}
.side.collapsed .side-toggle,
.side.collapsed .side-body { display: none; }
.side.collapsed .side-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}
.side-rail-btn {
  width: 28px;
  height: 36px;
  border: 1px solid var(--line);
  background: #0d1520;
  color: var(--cyan-2);
  border-radius: 8px;
  font-size: 16px;
}
.side-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}
.map-wrap { position: relative; background: #0b1220; }
#map { height: 100%; width: 100%; background: #0b1220; }
.map-search {
  position: absolute;
  z-index: 1500;
  top: 10px;
  left: 52px;
  width: min(520px, calc(100% - 64px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.map-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}
.map-search input,
.map-search input#geo-q,
#geo-q {
  background: rgba(8,14,22,0.92) !important;
  backdrop-filter: blur(8px);
  flex: 1;
  min-width: 0;
  font-size: 0.8rem !important;
  line-height: 1.2;
  min-height: 30px;
  height: 30px;
  padding: 4px 8px !important;
  color: #f8fafc !important;
  caret-color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  -webkit-text-fill-color: #f8fafc;
  border-radius: 8px;
}
.btn-compact {
  padding: 5px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  height: 30px;
  border-radius: 8px;
  line-height: 1;
}
.btn-solid {
  background: #0b1220;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.btn-solid:hover,
.btn-solid:focus-visible {
  background: #122033;
  color: #ffffff;
  border-color: #7dd3fc;
}
.btn-solid.is-on,
.btn.is-on.btn-solid {
  background: #0369a1;
  color: #ffffff;
  border-color: #7dd3fc;
}
.btn.is-on {
  border-color: var(--cyan);
  color: var(--cyan-2);
  background: rgba(56,189,248,0.12);
}
.ocm-marker-wrap.icon-only { width: 40px; }
.leaflet-marker-icon.ocm-marker-icon.icon-only {
  width: 40px !important;
  height: 36px !important;
}
#basemap {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  flex: 0 0 92px;
  height: 30px;
  padding: 3px 6px;
  font-size: 0.72rem;
  border-radius: 8px;
  background: #0b1220;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.ocm-area-label {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: max-content;
  max-width: 200px;
  min-width: 72px;
  height: 22px;
  margin: 0 auto;
  padding: 0 10px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #7dd3fc;
  color: #ffffff;
  font-family: Inter, Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.search-hits {
  pointer-events: auto;
  background: rgba(8,14,22,0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 280px;
  overflow: auto;
  box-shadow: var(--shadow);
}
.search-hits.hidden { display: none !important; }
.search-hit {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--line);
}
.search-hit .hit-type {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.search-hit.active, .search-hit:hover { background: rgba(56,189,248,0.12); }
.search-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.map-coords {
  position: absolute;
  z-index: 500;
  left: 12px;
  bottom: 12px;
  background: rgba(8,14,22,0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
}
.draw-hint {
  position: absolute;
  z-index: 1400;
  top: auto;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 24px));
  background: rgba(8,14,22,0.94);
  border: 1px solid var(--line-strong);
  color: #e8eef6;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  display: none;
  text-align: center;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.draw-hint.show { display: block; }

.ocm-divicon,
.ocm-arrow,
.leaflet-div-icon.ocm-divicon,
.leaflet-marker-icon.ocm-divicon {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}
.leaflet-marker-icon.ocm-marker-icon {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.ocm-marker-wrap {
  width: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  line-height: 1;
  pointer-events: none;
}
.ocm-marker-glyph {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 36px;
  width: 100%;
}
.ocm-marker-glyph svg { display: block; margin: 0 auto; }
.ocm-marker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: max-content;
  max-width: 156px;
  height: 18px;
  margin: 3px auto 0;
  padding: 0 9px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-family: Inter, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255,255,255,0.4);
  -webkit-font-smoothing: antialiased;
}
.ocm-marker-selected .ocm-marker-label {
  border-color: #38bdf8;
  color: #ffffff;
}

.ocm-grid-axis, .ocm-grid-cell {
  color: #e8eef6;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  white-space: nowrap;
  pointer-events: none;
}
.ocm-grid-axis { color: #7dd3fc; font-size: 12px; }
.ocm-grid-cell { color: #f8fafc; font-size: 10px; opacity: 0.92; }
.ocm-side-label {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: #0b1220;
  border: 2px solid #38bdf8;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.ocm-side-label.corner {
  height: 20px;
  font-size: 9px;
  letter-spacing: 0.02em;
  opacity: 0.95;
}
label.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.84rem;
  color: var(--text);
  margin: 8px 0;
}
label.chk input { width: auto; }

.leaflet-container.leaflet-crosshair { cursor: crosshair; }

.side h3 {
  margin: 4px 0 10px;
  font-family: var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--silver);
}
.accordion {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--panel-2);
}
.accordion > button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.accordion > button span { float: right; color: var(--muted); }
.accordion .body { display: none; padding: 0 10px 10px; }
.accordion.open .body { display: block; }
.sym-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.sym-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #0a121c;
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.8rem;
}
.sym-btn.active, .sym-btn:hover { border-color: var(--cyan); background: rgba(56,189,248,0.08); }
.ocm-sym { display: inline-flex; width: 36px; justify-content: center; flex: 0 0 36px; }
.ocm-sym svg { display: block; }
.inspector {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a121c;
}
.inspector h4 { margin: 0 0 8px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan-2); }
.layer-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  font-size: 0.8rem;
}
.layer-item button { background: none; border: 0; color: var(--red-2); font-size: 0.75rem; }
.leaflet-container { background: #0b1220; font-family: var(--font); }
.leaflet-control-zoom a {
  background: #0d1520 !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; }

.status-row { display: flex; gap: 8px; margin: 8px 0; }
.status-row label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.78rem; color: var(--text); display: flex; align-items: center; gap: 4px; }
.status-row input { width: auto; }

.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 8000; display: grid; place-items: center; padding: 16px;
}
.modal {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.help-modal {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
}
.pdf-preview-modal {
  width: min(960px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 18px;
  align-items: start;
  overflow: auto;
  background: #0c121c;
}
.pdf-preview-stage { display: flex; justify-content: center; }
.pdf-paper {
  width: min(420px, 46vw);
  height: calc(min(420px, 46vw) * 11 / 8.5);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  border: 1px solid #94a3b8;
}
.pdf-paper-head {
  flex: 0 0 12%;
  background: #080e16;
  color: #e8eef6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 3px solid #ef4444;
  box-shadow: 0 2px 0 #38bdf8;
}
.pdf-paper-head img { width: 34px; height: auto; }
.pdf-paper-head strong { display: block; font-size: 11px; letter-spacing: 0.04em; }
.pdf-paper-head span { font-size: 9px; color: #7dd3fc; }
.pdf-paper-meta {
  margin-left: auto;
  text-align: right;
  font-size: 8px;
  color: #94a3b8;
  line-height: 1.35;
}
.pdf-paper-map-wrap {
  flex: 1;
  min-height: 0;
  margin: 8px 14px 6px;
  background: #0b1220;
  border: 1px solid #cbd5e1;
  overflow: hidden;
}
#pdf-preview-map,
#pdf-preview-map.leaflet-container {
  width: 100%;
  height: 100%;
  background: #0b1220;
}
.pdf-paper-foot {
  flex: 0 0 5%;
  background: #080e16;
  color: #cbd5e1;
  font-size: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.ocm-marker-icon.compact .ocm-marker-wrap,
.ocm-marker-wrap.compact { width: 86px; }
.ocm-marker-icon.compact .ocm-marker-glyph { height: 20px; }
.ocm-marker-icon.compact .ocm-marker-glyph svg {
  transform: scale(0.7);
  transform-origin: bottom center;
}
.ocm-marker-icon.compact .ocm-marker-label {
  font-size: 8px;
  height: 13px;
  max-width: 82px;
  padding: 0 5px;
  margin-top: 1px;
}
.ocm-area-label.compact {
  height: 16px;
  min-width: 44px;
  max-width: 110px;
  font-size: 8px;
  padding: 0 6px;
}
#pdf-print-map,
#pdf-print-map.leaflet-container {
  background: #e8eef2;
}
#pdf-print-map .leaflet-control-container { display: none !important; }
.pdf-preview-copy h3 { margin: 0 0 8px; }
.pdf-preview-copy p { font-size: 0.86rem; line-height: 1.45; margin: 0 0 10px; }
@media (max-width: 820px) {
  .pdf-preview-modal { grid-template-columns: 1fr; }
  .pdf-paper {
    width: min(340px, 86vw);
    height: calc(min(340px, 86vw) * 11 / 8.5);
  }
}
.help-modal h3 { margin: 0 0 6px; }
.help-section { margin: 14px 0; }
.help-section h4 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan-2);
}
.help-section p, .help-section li {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}
.help-section ul { margin: 0 0 8px; padding-left: 18px; }
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9000;
  background: #101826;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .workspace-body,
  .workspace-body.left-collapsed,
  .workspace-body.right-collapsed,
  .workspace-body.left-collapsed.right-collapsed { grid-template-columns: 0 1fr 0; }
  .side { display: none; }
  .side.mobile-open {
    display: block;
    position: absolute;
    z-index: 700;
    top: 64px;
    bottom: 0;
    width: min(360px, 92vw);
    padding: 12px;
  }
  .side.mobile-open .side-toggle,
  .side.mobile-open .side-rail { display: none; }
  .side.left.mobile-open { left: 0; }
  .side.right.mobile-open { right: 0; left: auto; }
  .home-cards { grid-template-columns: 1fr; max-width: 360px; }
  .created-grid, .form-grid { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; }
}
