/* =========================================================
   Эрэн хайх, авран туслах систем — үндсэн загвар
   ========================================================= */
:root {
  --bg: #050d22;
  --bg-2: #081634;
  --panel: #0a1736;
  --panel-2: #0e1f47;
  --border: #1b3570;
  --border-strong: #2a54b0;
  --primary: #1d4ed8;
  --primary-hover: #2563eb;
  --cyan: #22d3ee;
  --green: #22c55e;
  --green-soft: #4ade80;
  --red: #ef4444;
  --amber: #f59e0b;
  --yellow: #facc15;
  --text: #e8eefb;
  --muted: #8ea3c8;
  --radius: 8px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); }

/* ---------- Дээд мөр (header) ---------- */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 58px;
  padding: 0 20px;
  background: linear-gradient(180deg, #071533 0%, #050f27 100%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand-logo { width: 38px; height: 38px; flex: none; }
.brand-name { display: flex; align-items: baseline; gap: 6px; font-size: 22px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.brand-name small { font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: #fb923c; }
.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.status-list { display: flex; gap: 14px; font-size: 13px; color: var(--text); }
.status-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 6px var(--red); }

.topbar-spacer { flex: 1; }

.clocks { display: flex; height: 100%; }
.clock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid var(--border);
  min-width: 110px;
}
.clock-label { font-size: 12px; color: var(--text); }
.clock-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-value.utc { color: var(--green-soft); }
.clock-value.loc { color: var(--cyan); }

.user-chip { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.btn-ghost {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--panel-2); }

.btn-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
}
.btn-new:hover { background: var(--primary-hover); }
a.btn-new { text-decoration: none; }
.btn-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
}
.btn-list:hover { background: #142a5e; }
.btn-list:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-list svg { width: 15px; height: 15px; }

/* Жагсаалт */
.list-body { display: flex; flex-direction: column; gap: 12px; }
.list-search { position: relative; }
.list-search svg {
  position: absolute; top: 50%; left: 12px; width: 16px; height: 16px;
  color: var(--muted); transform: translateY(-50%); pointer-events: none;
}
.list-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}
.list-search input::placeholder { color: #5f76a3; }
.list-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
.table-wrap {
  max-height: min(55vh, 520px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  position: sticky;
  top: 0;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--border-strong);
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.data-table td.num { width: 40px; color: var(--muted); font-variant-numeric: tabular-nums; }
.data-table td.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table td.muted { color: #5f76a3; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: rgba(34, 211, 238, .07); }
.data-table tbody tr:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.data-table tbody tr.current { background: rgba(29, 78, 216, .3); }
.data-table tbody tr.current td:nth-child(2) { color: var(--cyan); font-weight: 700; }
.list-status { margin: 0; font-size: 13px; color: var(--muted); }
.btn-new:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-new svg { width: 14px; height: 14px; }

/* ---------- Модал цонх ---------- */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.modal::backdrop { background: rgba(2, 6, 18, .65); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); background: var(--panel-2); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 18px; overflow: auto; }
.modal-empty { margin: 0; color: var(--muted); }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.modal-lg { width: min(980px, calc(100vw - 32px)); }

/* ---------- Нислэгийн маягт ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.flight-form { display: flex; flex-direction: column; max-height: inherit; }
.flight-form .modal-body { flex: 1; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  align-items: start;
}
.fld-group { min-width: 0; }
.fld-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.flight-form input,
.flight-form textarea {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  color-scheme: dark;              /* огнооны сонгогч бараан өнгөтэй */
  transition: border-color .15s, box-shadow .15s;
}
.flight-form textarea { height: auto; min-height: 120px; padding: 8px 10px; resize: vertical; }
.flight-form input::placeholder,
.flight-form textarea::placeholder { color: #5f76a3; }
.flight-form input:focus,
.flight-form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
.flight-form .has-error input,
.flight-form .has-error textarea,
.flight-form input[aria-invalid="true"] { border-color: var(--red); }
/* Тоон талбарын сум-товчийг нуух (DMS талбар нарийн) */
.flight-form input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.flight-form input[type=number]::-webkit-inner-spin-button,
.flight-form input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.form-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.fld-point { flex: 1 1 100%; }   /* координат бүтэн мөрөнд */
.dir-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
  flex: 1 1 100%;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.dir-row[hidden] { display: none; }
.dir-remove { flex: 0 0 auto; }
.btn-add-point {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  background: transparent;
  border: 1px dashed var(--cyan);
  border-radius: 6px;
  cursor: pointer;
}
.btn-add-point[hidden] { display: none; }
.btn-add-point:hover { background: rgba(34, 211, 238, .08); }
.btn-add-point svg { width: 15px; height: 15px; }
.btn-add-point small { font-weight: 400; color: var(--muted); }
.btn-link-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fca5a5;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, .5);
  border-radius: 6px;
  cursor: pointer;
}
.btn-link-danger:hover { background: rgba(239, 68, 68, .12); }
.btn-link-danger svg { width: 14px; height: 14px; }
.btn-add-point:focus-visible, .btn-link-danger:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.fld-num { flex: 0 0 140px; }
.dms-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; }
.dms { display: flex; align-items: center; gap: 4px; }
.dms-axis {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}
.dms-part { position: relative; display: block; }
.dms-part input { width: 64px; padding: 0 16px 0 6px; text-align: center; font-variant-numeric: tabular-nums; }
.dms-part.dms-sec input { width: 80px; }
.dms-part i {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}
/* Нэг мөрөөр оруулах */

.coord-smart { display: flex; gap: 8px; align-items: stretch; }
.coord-smart-input { position: relative; flex: 1; min-width: 0; }
.coord-smart-input svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.coord-smart-input input { width: 100%; padding-left: 34px; }
.fld-point.is-ok .coord-paste { border-color: rgba(34, 197, 94, .7); }
.fld-point.is-error .coord-paste { border-color: rgba(239, 68, 68, .8); }
.pin-btn.pin-btn-wide { width: auto; height: auto; min-height: 34px; gap: 6px; padding: 0 12px; display: inline-flex; align-items: center;
  font: inherit; font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.pin-btn.pin-btn-wide svg { color: #fecaca; }
.coord-preview { display: flex; flex-wrap: wrap; gap: 4px 12px; min-height: 18px; margin-top: 5px; font-size: 12px; }
.coord-preview:empty { min-height: 0; margin-top: 0; }
.cp-ok { font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.cp-mgrs { color: #fdba74; font-variant-numeric: tabular-nums; }
.cp-kind { color: var(--muted); }
.cp-warn { color: var(--amber); }
.cp-err { color: #fca5a5; }
@media (max-width: 560px) {
  .coord-smart { flex-direction: column; }
  .pin-btn.pin-btn-wide { justify-content: center; }
}
.pin-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--red);
  background: #16a34a;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.pin-btn:hover { background: var(--green); }
.pin-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.pin-btn svg { width: 17px; height: 17px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 40px; }
.input-suffix span {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.btn-save {
  height: 34px;
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #16a34a;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.btn-save:hover { background: var(--green); }
.btn-save:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.mayday-icon { background: none; border: 0; }
.leaflet-tooltip.grid-label {
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 6px #000;
}
.leaflet-tooltip.grid-label::before { display: none; }
.leaflet-tooltip.grid-ghost-label {
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000;
}
.leaflet-tooltip.grid-ghost-label::before { display: none; }
/* Нисэх буудлын лавлах цэг (ARP) */
.leaflet-tooltip.arp-label {
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000;
}
.leaflet-tooltip.arp-label::before { display: none; }
.leaflet-tooltip.arp-label small { font-weight: 500; opacity: .85; }
/* Замын цэг (waypoint) ба цэргийн бүс */
.wp-icon { background: none; border: 0; }
.wp-icon svg { display: block; filter: drop-shadow(0 0 1px rgba(0,0,0,.8)); }
.leaflet-tooltip.wp-label,
.leaflet-tooltip.zone-label {
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
}
.leaflet-tooltip.zone-label { font-size: 11px; color: #f3e8ff; }
.leaflet-tooltip.wp-label::before,
.leaflet-tooltip.zone-label::before { display: none; }
.hide-wp-labels .leaflet-tooltip.wp-label { display: none; }
.mayday-icon.draggable { cursor: move; }
.mayday-icon.draggable svg { filter: drop-shadow(0 0 4px #fff); }

/* ---------- Нислэгийн мэдээллийн самбар (зүүн тал) ---------- */
.map-wrap { --fp-w: 270px; --fp-gap: 12px; }
.flight-panel {
  position: absolute;
  top: var(--fp-gap);
  bottom: var(--fp-gap);
  left: var(--fp-gap);
  z-index: 550;
  display: flex;
  flex-direction: column;
  width: var(--fp-w);
  background: rgba(7, 17, 42, .97);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.map-wrap.panel-closed .flight-panel { display: none; }

.fp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--border);
}
.fp-head-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
}
.fp-head-icon svg { width: 18px; height: 18px; }
.fp-head h2 {
  flex: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .2px;
  white-space: nowrap;
}
.fp-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.fp-close:hover { color: var(--text); background: var(--panel-2); }
.fp-close svg { width: 16px; height: 16px; }

.fp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
}
.fp-hero {
  padding: 12px 14px;
  background: linear-gradient(180deg, #1d4ed8, #1740b8);
  border: 1px solid #3b6ef0;
  border-radius: 8px;
}
.fp-callsign {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .3px;
  overflow-wrap: anywhere;
}
.fp-type {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  overflow-wrap: anywhere;
}
.fp-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #bbf7d0;
}
.fp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fp-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.fp-label { font-size: 12px; color: var(--text); }
.fp-value {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.fp-value.accent { color: var(--green); white-space: nowrap; }
.fp-value small { font-size: 12px; font-weight: 700; }
.fp-value.fp-text { font-size: 15px; font-weight: 700; }
.fp-coord { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fp-coord small { font-size: 12px; color: var(--muted); }
.fp-sub { color: var(--muted); }
.fp-coord b { font-size: 14px; color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }

.fp-section { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.fp-section-head { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--cyan); }
.fp-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.fp-empty { margin: 8px 0; font-size: 13px; color: var(--muted); text-align: center; }
.fp-foot {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.fp-reopen {
  position: absolute;
  top: var(--fp-gap);
  left: var(--fp-gap);
  z-index: 550;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
  cursor: pointer;
}
.fp-reopen[hidden] { display: none; }
.fp-reopen svg { width: 20px; height: 20px; }
.fp-reopen:focus-visible, .fp-close:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Самбар нээлттэй үед бусад давхаргыг баруун тийш шилжүүлэх */
.map-wrap.has-panel:not(.panel-closed) .map-toolbar,
.map-wrap.has-panel:not(.panel-closed) .coord-box { left: calc(var(--fp-w) + var(--fp-gap) * 2); }
.map-wrap.has-panel.panel-closed .map-toolbar { top: calc(var(--fp-gap) + 54px); }

@media (max-width: 700px) {
  .map-wrap { --fp-w: min(270px, calc(100vw - 24px)); }
  .map-wrap.has-panel:not(.panel-closed) .coord-box { display: none; }
}

/* Газрын зургийн хэрэгслийн самбар */
.map-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 500;
  display: grid;
  gap: 8px;
  padding: 8px;
  background: rgba(10, 23, 54, .92);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}
.map-toolbar[hidden] { display: none; }
.tool-btn {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 58px;
  padding: 8px 4px 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #052e16;
  background: var(--green);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.tool-btn svg { width: 20px; height: 20px; }
.tool-btn:hover { background: var(--green-soft); }
.tool-btn.active { color: #fff; background: var(--primary); box-shadow: 0 0 0 2px var(--cyan); }
.tool-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.edit-bar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: calc(100% - 32px);
  padding: 10px 12px 10px 16px;
  font-size: 13px;
  background: rgba(10, 23, 54, .96);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  transform: translateX(-50%);
}
.edit-bar[hidden] { display: none; }
.edit-bar-text { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.edit-bar-text b { color: var(--text); }
.edit-bar-text > b:first-child { color: var(--cyan); }
.edit-bar-actions { display: flex; gap: 8px; flex: none; }
.btn-save[disabled] { opacity: .6; cursor: progress; }

/* Газрын зурагаас цэг сонгох */
.pick-banner {
  position: fixed;
  top: 72px;
  left: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  font-size: 14px;
  background: rgba(10, 23, 54, .96);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  transform: translateX(-50%);
}
.pick-banner[hidden] { display: none; }
.map-picking .leaflet-container { cursor: crosshair; }

/* Мэдэгдэл (toast) */
.toast-stack {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 1100;
  display: grid;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  background: rgba(10, 23, 54, .96);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  animation: toast-out .4s ease-in 5s forwards;
}
.toast.error { border-left-color: var(--red); }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

@media (max-width: 700px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .fld-num { flex: 1 1 140px; }
}

/* ---------- Газрын зургийн мэт арын дэвсгэр ---------- */
.radar-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 65% 55%, rgba(34, 197, 94, .16), transparent 55%),
    radial-gradient(ellipse at 30% 30%, rgba(29, 78, 216, .22), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.radar-bg::before {          /* 20 км-ийн торыг санагдуулах шугам */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .07) 1px, transparent 1px);
  background-size: 64px 64px;
}
.radar-bg svg { position: absolute; width: 100%; height: 100%; }
.sweep {
  transform-box: view-box;
  transform-origin: 1088px 504px;   /* radar_bg.html доторх тойргийн төв */
  animation: sweep 6s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sweep { animation: none; opacity: 0; } }

/* ---------- Нэвтрэх хуудас ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }

.login-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.hero h1 span { color: var(--cyan); }
.hero h1 + .hero-features { margin-top: 28px; }

.hero-features { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; max-width: 480px; }
.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(10, 23, 54, .72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}
.feat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 6px;
  background: var(--green);
  color: #052e16;
}
.feat-icon.red { background: var(--red); color: #fff; }
.feat-icon.amber { background: var(--amber); color: #3b2300; }
.feat-icon svg { width: 18px; height: 18px; }

/* Нэвтрэх карт */
.login-card {
  background: rgba(10, 23, 54, .94);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(34, 211, 238, .05);
  overflow: hidden;
}
.login-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.head-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
}
.head-icon svg { width: 20px; height: 20px; color: #fff; }
.login-card-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.login-card-body { padding: 22px; }

.secure-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #1440b8, #0f35a0);
  font-size: 13px;
  color: #d6f5df;
}

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap input::placeholder { color: #5f76a3; }
.input-wrap input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
.field.has-error input { border-color: var(--red); }

.toggle-pass {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.toggle-pass:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.toggle-pass svg { width: 18px; height: 18px; }
.toggle-pass .is-hidden { display: none; }

.field-error { margin-top: 6px; font-size: 13px; color: #fca5a5; }
.caps-warning { display: none; margin-top: 6px; font-size: 13px; color: var(--amber); }
.caps-warning.show { display: block; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(239, 68, 68, .55);
  background: rgba(127, 29, 29, .45);
  color: #fecaca;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--red); }
.alert.info { border-color: rgba(34, 211, 238, .45); background: rgba(8, 51, 68, .5); color: #cffafe; }
.alert.info svg { color: var(--cyan); }

.form-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin: 4px 0 20px;
  font-size: 14px;
}
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--green); }
.form-row .hint { color: var(--muted); font-size: 13px; }

.btn-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-primary[disabled] { opacity: .7; cursor: progress; }

.login-card-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Газрын зургийн хуудас ---------- */
.map-page { overflow: hidden; }
.map-page .radar-bg { display: none; }
.map-wrap {
  position: relative;
  z-index: 1;
  height: calc(100vh - 58px);
  height: calc(100dvh - 58px);
}
#map { width: 100%; height: 100%; background: var(--bg-2); }

.coord-box {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: rgba(10, 23, 54, .9);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  pointer-events: none;
}
.coord-box > div { display: flex; gap: 10px; }
.coord-label { min-width: 62px; color: var(--muted); }

/* Leaflet удирдлагыг бараан загварт тааруулах */
.leaflet-container { font-family: var(--font); }
.leaflet-bar a,
.leaflet-bar a:hover {
  color: var(--text);
  background: rgba(10, 23, 54, .92);
  border-bottom-color: var(--border);
}
.leaflet-bar a:hover { background: var(--panel-2); }
.leaflet-bar,
.leaflet-control-layers {
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4) !important;
  overflow: hidden;
}
.leaflet-control-layers {
  color: var(--text);
  background: rgba(10, 23, 54, .92);
}
.leaflet-control-layers-expanded { padding: 8px 12px; }
.leaflet-control-layers label { margin: 3px 0; cursor: pointer; }
.leaflet-control-layers input { accent-color: var(--cyan); }
/* ---------- Давхаргын самбар (static/js/layer_panel.js) ---------- */
.sar-layers {
  width: 268px;
  color: var(--text);
  background: rgba(7, 17, 42, .95);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .45);
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.sar-layers.is-min { width: auto; }
.sar-layers button { font: inherit; color: inherit; cursor: pointer; }
.sar-layers button:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

.sl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  text-align: left;
}
.sl-head:hover { background: rgba(34, 211, 238, .06); }
.sl-head-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff;
  background: var(--primary);
  border-radius: 7px;
}
.sl-head-icon svg { width: 16px; height: 16px; }
.sl-head-title { flex: 1; font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.sl-chev { display: grid; color: var(--muted); transition: transform .15s; }
.sl-chev svg { width: 16px; height: 16px; }
.is-min .sl-head .sl-chev,
.sl-group.is-closed .sl-chev { transform: rotate(-90deg); }
.sl-badge {
  min-width: 20px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 999px;
}

.sl-body {
  max-height: calc(100vh - 235px);   /* JS (_fitHeight) бодит зайгаар дарж тохируулна */
  overflow-y: auto;
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sl-section { padding: 10px 12px 12px; }
.sl-section-title {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sl-bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; }
.sl-base {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
}
.sl-base img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: border-color .15s, transform .15s;
}
.sl-base span { font-size: 10.5px; line-height: 1.2; text-align: center; color: var(--muted); }
.sl-base:hover img { border-color: var(--border-strong); transform: translateY(-1px); }
.sl-base.is-active img { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34, 211, 238, .25); }
.sl-base.is-active span { color: var(--text); font-weight: 700; }

.sl-group { border-top: 1px solid var(--border); }
.sl-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  text-align: left;
}
.sl-group-head:hover { background: rgba(34, 211, 238, .06); }
.sl-group-name {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cyan);
}
.sl-list { margin: 0; padding: 0 6px 8px; list-style: none; }
.sl-item { border-radius: 7px; }
.sl-item.is-on { background: rgba(34, 211, 238, .07); }
.sl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px;
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
}
.sl-row:hover { background: rgba(255, 255, 255, .04); }
.sl-name { flex: 1; min-width: 0; color: var(--muted); }
.sl-item.is-on .sl-name { color: var(--text); font-weight: 600; }
.sl-hint { display: block; font-size: 11px; font-weight: 500; color: var(--amber); }

/* Тайлбар тэмдэг */
.sl-swatch { display: grid; place-items: center; flex: none; width: 22px; height: 16px; }
.sl-swatch img { width: 16px; height: 16px; }
.sl-swatch svg { width: 13px; height: 12px; }
.sw-line { display: block; width: 20px; height: 3px; border-radius: 2px; }
.sw-fill { display: block; width: 18px; height: 13px; border: 1.5px solid; border-radius: 3px; }
.sw-grad { display: block; width: 20px; height: 12px; border-radius: 3px; border: 1px solid rgba(255,255,255,.15); }
.sw-ir { background: linear-gradient(90deg, #333 0%, #ddd 45%, #3cf 70%, #2c2 85%, #f33 100%); }
.sw-vis { background: linear-gradient(90deg, #222, #888, #fff); }
.sw-airmass { background: linear-gradient(90deg, #a02, #c6c, #36c, #2a4, #fd6); }
.sw-clouds { background: linear-gradient(90deg, rgba(255,255,255,.1), #fff); }
.sw-precipitation { background: linear-gradient(90deg, #8cf, #36f, #93f); }
.sw-wind { background: linear-gradient(90deg, #eef, #a6f, #50a); }
.sw-temp { background: linear-gradient(90deg, #82f, #29f, #2d6, #fd2, #f42); }
.sw-pressure { background: linear-gradient(90deg, #06c, #6cf, #fc6, #e44); }

/* Switch */
.sl-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  margin: 0;
  background: #24345c;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
}
.sl-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #c3cee6;
  border-radius: 50%;
  transition: transform .15s, background .15s;
}
.sl-switch:checked { background: var(--cyan); }
.sl-switch:checked::after { background: #fff; transform: translateX(14px); }
.sl-switch:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.sl-opacity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 7px 38px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sl-opacity input { flex: 1; min-width: 0; accent-color: var(--cyan); }
.sl-opacity span { width: 32px; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .sl-chev, .sl-switch, .sl-switch::after, .sl-base img { transition: none; }
}

.coord-hint { margin-top: 4px; font-size: 11px; color: var(--muted); }

/* ---------- Цаг агаар ---------- */
.fp-weather-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.fp-tabs { display: flex; gap: 4px; }
.fp-tab {
  padding: 3px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.fp-tab:hover { color: var(--text); }
.fp-tab.is-active { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }
.fp-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.wx-now { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wx-icon { font-size: 30px; line-height: 1; }
.wx-temp { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wx-temp small { font-size: 14px; font-weight: 700; }
.wx-desc { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; }
.wx-desc small { font-size: 12px; font-weight: 500; opacity: .75; }
.wx-now.compact .wx-icon, .wx-now.compact .wx-temp { font-size: 24px; }

.wx-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 0;
  font-size: 13px;
}
.wx-rows dt { opacity: .7; }
.wx-rows dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.wx-rows small, .wx-hourly small { font-weight: 500; opacity: .7; }
.wx-arrow { display: inline-block; font-weight: 800; line-height: 1; }

.fp-wx .wx-rows dd { color: var(--green); }
.wx-hourly {
  width: 100%;
  margin-top: 10px;
  font-size: 12px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.wx-hourly th { padding: 3px 2px; font-weight: 600; color: var(--muted); text-align: left; border-bottom: 1px solid var(--border); }
.wx-hourly td { padding: 4px 2px; border-bottom: 1px solid rgba(27, 53, 112, .5); white-space: nowrap; }
.wx-src { margin-top: 8px; font-size: 11px; color: var(--muted); }
.btn-link {
  padding: 0;
  font: inherit;
  color: var(--cyan);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.wx-popup .leaflet-popup-content { min-width: 220px; }
.wx-popup .wx-popup-head { margin-bottom: 8px; font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; }
.wx-popup .wx-src { color: #64748b; }
.wx-popup .wx-loading { margin: 0; }
.leaflet-control-scale-line {
  color: var(--text);
  background: rgba(10, 23, 54, .8);
  border-color: var(--text);
}
.leaflet-control-attribution {
  font-size: 10px;
  color: var(--muted) !important;
  background: rgba(5, 13, 34, .6) !important;
}
.leaflet-control-attribution a { color: var(--muted); }

/* ---------- Дасан зохицох ---------- */
@media (max-width: 1100px) {
  .status-list, .sys-status { display: none; }
}
@media (max-width: 900px) {
  .login-main { grid-template-columns: minmax(0, 1fr); max-width: 460px; gap: 0; }
  .hero { display: none; }
  .brand-title { display: none; }
  .clock.loc-only { display: none; }
}
@media (max-width: 520px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .clock { min-width: 0; padding: 0 10px; }
  .clock-value { font-size: 15px; }
  .login-main { padding: 24px 16px; }
}

/* Попап: урт үг (GIS тайлбар г.м.) хүрээнээс халихгүй */
.leaflet-popup-content { overflow-wrap: anywhere; }
.leaflet-popup-content .pp-title { margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #0e7490; }
.gis-popup .leaflet-popup-content { margin: 12px 14px; line-height: 1.5; }
.leaflet-popup-content .pp-head { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: #0f172a; }
.leaflet-popup-content .pp-sec { margin-top: 8px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.leaflet-popup-content .pp-sec-title { margin-bottom: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.leaflet-popup-content .pp-zones { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.leaflet-popup-content .pp-chip { padding: 1px 8px; font-size: 12px; font-weight: 600; color: #94a3b8; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; }
.leaflet-popup-content .pp-chip.is-on { color: #92400e; background: #fef3c7; border-color: #f59e0b; }
.leaflet-popup-content .pp-note { margin-top: 6px; font-size: 11px; color: #64748b; }

/* ---------- Засаг захиргааны хил ---------- */
.admin-label {
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 6px #000;
}
.aimag-label { font-size: 13px; font-weight: 800; letter-spacing: .03em; color: #FDE68A; text-transform: uppercase; }
.sum-label { font-size: 11px; font-weight: 600; color: #FEF3C7; }
.hide-sum-labels .sum-label,
.hide-aimag-labels .aimag-label { display: none; }
.fp-admin b { white-space: normal !important; text-align: right; }

/* ---------- Координатын тор ---------- */
.grat-label {
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
  pointer-events: none;
}
.grat-lat { transform: translate(0, -50%); }
.grat-lng { transform: translate(-50%, 0); }
.sw-grid {
  display: block;
  width: 18px;
  height: 14px;
  border: 1px solid #cbd5e1;
  background:
    linear-gradient(90deg, transparent 8px, #cbd5e1 8px 9px, transparent 9px),
    linear-gradient(0deg, transparent 6px, #cbd5e1 6px 7px, transparent 7px);
}
.sw-dot { display: block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(239,68,68,.3); }

/* ---------- Агаарын хөлөг (ADS-B) ---------- */
.ac-icon { background: none; border: 0; }
.ac-icon svg { display: block; filter: drop-shadow(0 0 2px rgba(0,0,0,.9)); }
.ac-icon path { fill: #facc15; stroke: #1f2937; stroke-width: 1; }
.ac-icon.is-ground path { fill: #9ca3af; }
.ac-icon.is-emergency path { fill: #ef4444; stroke: #fff; }
.ac-icon.is-emergency { animation: ac-pulse 1s ease-in-out infinite alternate; }
@keyframes ac-pulse { from { transform-origin: center; opacity: 1; } to { opacity: .45; } }
.leaflet-tooltip.ac-label {
  padding: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: #fef9c3;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
}
.leaflet-tooltip.ac-label::before { display: none; }
.leaflet-popup-content .pp-alert {
  margin: 2px 0 6px;
  padding: 4px 8px;
  font-weight: 800;
  color: #fff;
  background: #dc2626;
  border-radius: 6px;
}

/* ---------- Зай хэмжих ---------- */
.measure-bar { clear: both; }
.measure-bar a.measure-btn { display: grid; place-items: center; }
.measure-bar a.measure-btn svg { width: 17px; height: 17px; }
.measure-bar a.measure-btn.is-active { color: var(--bg); background: #f97316; }
.measure-label {
  transform: translate(10px, -50%);
  display: inline-flex;
  flex-direction: column;
  padding: 3px 7px;
  white-space: nowrap;
  font-size: 12px;
  color: #fff;
  background: rgba(15, 23, 42, .88);
  border: 1px solid #f97316;
  border-radius: 6px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.measure-label small { font-size: 10.5px; opacity: .8; }
.measure-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 800;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 7px 14px;
  font-size: 13px;
  color: #fff;
  background: rgba(15, 23, 42, .92);
  border: 1px solid #f97316;
  border-radius: 999px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.measure-hint[hidden] { display: none; }
/* Хэмжих үед дүрс, нүд дээр дарахад газрын зураг руу дамжина */
.map-measuring .leaflet-overlay-pane path,
.map-measuring .leaflet-ncacZones-pane path { pointer-events: none !important; }
.map-measuring .leaflet-container { cursor: crosshair; }

.wx-popup .wx-admin { display: block; margin-top: 2px; font-weight: 700; color: #0f172a; }
.wx-popup .wx-admin:empty { display: none; }

/* ---------- Газар зүйн нэрс ---------- */
.nm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  transform: translate(-6px, -50%);       /* тэмдэг нь яг цэг дээр */
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000;
  cursor: pointer;
}
.nm.nm-nosym { transform: translate(-50%, -50%); }
.nm .nm-sym { width: 12px; text-align: center; font-size: 10px; }
.nm small { font-size: 9.5px; font-weight: 500; opacity: .85; }
.nm:hover .nm-txt { text-decoration: underline; }
.nm-city { font-size: 14px; font-weight: 800; }
.nm-city .nm-sym { font-size: 12px; color: #f87171; }
.nm-town { font-size: 12px; font-weight: 700; }
.nm-town .nm-sym { color: #fca5a5; }
.nm-village .nm-sym, .nm-locality .nm-sym { color: #e5e7eb; }
.nm-peak { color: #fde68a; }
.nm-peak .nm-sym { color: #f59e0b; }
.nm-pass { color: #fcd34d; }
.nm-lake, .nm-river { font-style: italic; font-weight: 600; color: #93c5fd; }
.nm-spring, .nm-well { color: #a5f3fc; font-size: 10.5px; }
.nm-spring .nm-sym, .nm-well .nm-sym { color: #22d3ee; }
.nm-cave { color: #d6d3d1; }
.sw-names { font-style: normal; font-size: 12px; font-weight: 800; color: #fde68a; text-shadow: 0 0 2px #000; }

/* ---------- Цэгэн обьект (дэд бүтэц, нисэх) ---------- */
.poi {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  cursor: pointer;
}
.poi span { display: block; }
.poi-hospital { background: #dc2626; }
.poi-clinic { background: #fff; color: #dc2626; border-color: #dc2626; }
.poi-fire { background: #ea580c; font-size: 11px; }
.poi-police { background: #1d4ed8; font-size: 11px; }
.poi-heli { background: #15803d; font-family: Arial, sans-serif; }
.poi-fuel { background: #374151; font-size: 11px; }
.poi-border { background: #7c3aed; font-size: 11px; }
.poi-ap-marker { font-size: 11px; }
.poi-ap { background: #0369a1; }
.poi-ap-small { background: #475569; }
.poi-ap-closed { background: #991b1b; }
.poi-ndb { background: #6b21a8; font-size: 13px; }
.poi-vor { background: #0e7490; font-size: 13px; }
.poi-swatch { width: 16px; height: 16px; font-size: 9px; border-width: 1.5px; font-style: normal; }
.leaflet-tooltip.poi-label {
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: #e0f2fe;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
}
.leaflet-tooltip.poi-label::before { display: none; }
.leaflet-tooltip.poi-label-nav { color: #f5d0fe; font-weight: 600; }

/* Нислэгийн самбар: ойрын дэд бүтэц */
.fp-nearby { display: grid; gap: 6px; }
.fp-near {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  padding: 7px 10px;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}
.fp-near:hover { border-color: var(--cyan); }
.fp-near:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.fp-near small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.fp-near b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fp-near span { font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- MGRS ---------- */
.mgrs-label {
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  color: #fed7aa;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000;
  pointer-events: none;
}
.sw-grid-mgrs { border-color: #fb923c; background:
  linear-gradient(90deg, transparent 8px, #fb923c 8px 9px, transparent 9px),
  linear-gradient(0deg, transparent 6px, #fb923c 6px 7px, transparent 7px); }
.wx-popup .wx-elev { display: block; margin-top: 2px; color: #0f172a; }
.wx-popup .wx-elev:empty { display: none; }

/* ---------- Торлогийн нүдний мэдээлэл ---------- */
.leaflet-interactive.grid-cell { cursor: pointer; }
.cell-popup .leaflet-popup-content { font-size: 12.5px; }
.ci-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ci-head b { font-size: 22px; font-weight: 900; color: #0f172a; }
.ci-head span { font-size: 12px; color: #475569; white-space: nowrap; }
.ci-admin { margin-top: 1px; font-weight: 700; color: #0e7490; }
.ci-admin:empty { display: none; }
.ci-sec { margin-top: 8px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.ci-sec-title { margin-bottom: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.ci-sec-title small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ci-row { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.ci-row > span { flex: none; color: #64748b; }
.ci-row > b { font-weight: 600; text-align: right; color: #0f172a; font-variant-numeric: tabular-nums; }
.ci-row small { font-weight: 500; color: #64748b; }
.ci-muted { color: #94a3b8; }
.ci-corners { margin-top: 4px; }
.ci-corners summary { cursor: pointer; color: #0e7490; font-weight: 600; }
.ci-corners table { width: 100%; margin-top: 4px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ci-corners td { padding: 3px 4px; border-top: 1px solid #f1f5f9; vertical-align: top; }
.ci-corners td:first-child { color: #64748b; white-space: nowrap; }
.ci-summary { margin-bottom: 4px; color: #334155; }
.ci-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ci-chip { padding: 1px 7px; font-size: 11.5px; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; }
.ci-chip small { color: #64748b; }
.ci-chip.ci-city, .ci-chip.ci-town, .ci-chip.ci-village { background: #fee2e2; border-color: #fecaca; }
.ci-chip.ci-peak, .ci-chip.ci-pass { background: #fef3c7; border-color: #fde68a; }
.ci-chip.ci-lake, .ci-chip.ci-river, .ci-chip.ci-spring, .ci-chip.ci-well { background: #e0f2fe; border-color: #bae6fd; }
.ci-more { font-size: 11.5px; color: #64748b; align-self: center; }
.ci-wx { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.ci-wx-icon { font-size: 20px; }
.ci-wx b { font-size: 16px; color: #0f172a; }
.ci-wx span:last-child { color: #334155; }
.ci-gis .pp-title { display: none; }
.ci-actions { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.cell-popup .btn-link { color: #0e7490; font-weight: 600; }

/* ---------- Хайлтын төлөв ---------- */
:root {
  --st-none: #94a3b8;
  --st-in_progress: #f59e0b;
  --st-searched: #22c55e;
  --st-found: #ef4444;
  --st-blocked: #64748b;
}
.grid-mark { margin-left: 2px; font-size: 12px; }
.grid-mark-found { color: #fecaca; }
.grid-mark-searched { color: #bbf7d0; }

/* Самбарын явц */
.pg-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.pg-top b { font-size: 22px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.pg-top span { font-size: 12px; color: var(--muted); }
.pg-bar { display: flex; height: 8px; overflow: hidden; background: var(--panel-2); border-radius: 999px; }
.pg-bar i { display: block; height: 100%; }
.pg-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.pg-legend span { display: flex; align-items: center; gap: 6px; }
.pg-legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.pg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.pg-none { background: var(--st-none); }
.pg-in_progress { background: var(--st-in_progress); }
.pg-searched { background: var(--st-searched); }
.pg-found { background: var(--st-found); }
.pg-blocked { background: var(--st-blocked); }
.pg-alert { margin-top: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(239, 68, 68, .85); border-radius: 6px; }

/* Нүдний попап — төлөв */
.st-badge { display: inline-block; padding: 1px 8px; font-size: 11.5px; font-weight: 700; color: #fff; border-radius: 999px; background: var(--st-none); }
.st-badge.st-in_progress { background: var(--st-in_progress); }
.st-badge.st-searched { background: #16a34a; }
.st-badge.st-found { background: var(--st-found); }
.st-badge.st-blocked { background: var(--st-blocked); }
.ci-status { border-top-color: #cbd5e1; }
.ci-st-current { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.ci-st-current small { color: #64748b; }
.ci-st-note { margin: 2px 0 4px; padding: 4px 8px; color: #334155; background: #f8fafc; border-left: 3px solid #cbd5e1; border-radius: 4px; white-space: pre-wrap; }

/* ---------- Газрын зургийн попап → төлөвийн хуудас руу ---------- */
.ci-st-link {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: #0e7490;
  border-radius: 6px;
}
.leaflet-popup-content a.ci-st-link { color: #fff; }
.ci-st-link:hover { background: #0891b2; }
.fp-status-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; text-decoration: none; }
.fp-status-link:hover { text-decoration: underline; }

/* ---------- Хайлтын төлөвийн хуудас ---------- */
.status-page .radar-bg { display: none; }
.ss-page { max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; display: grid; gap: 16px; }
.ss-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ss-back {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px 7px 8px;
  font-size: 13px; font-weight: 700; text-decoration: none; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
}
.ss-back:hover { border-color: var(--cyan); }
.ss-back svg { width: 18px; height: 18px; }
.ss-title { flex: 1; min-width: 220px; }
.ss-title h1 { margin: 0; font-size: 22px; letter-spacing: .02em; }
.ss-title p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.ss-title p b { color: var(--text); }
.ss-progress { width: min(360px, 100%); }
.ss-pg-num { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.ss-pg-num b { font-size: 26px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.ss-pg-num span { color: var(--muted); font-size: 13px; }

.ss-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ss-layout { grid-template-columns: 1fr; } }
.ss-card { padding: 16px; background: rgba(10, 23, 54, .92); border: 1px solid var(--border-strong); border-radius: 10px; }
.ss-card h2 { margin: 0; font-size: 15px; letter-spacing: .03em; color: var(--cyan); }
.ss-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.ss-select-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.ss-link { padding: 0; font: inherit; font-weight: 700; color: var(--cyan); background: none; border: 0; cursor: pointer; }
.ss-link:hover { text-decoration: underline; }
.ss-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.ss-board-scroll { overflow: auto; padding: 4px; }
.ss-board { display: grid; gap: 4px; min-width: min-content; }
.ss-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 128, 128, .35);
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.ss-cell:hover { filter: brightness(1.15); }
.ss-cell:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ss-cell.st-in_progress { background: rgba(245, 158, 11, .75); }
.ss-cell.st-searched { background: rgba(34, 197, 94, .65); }
.ss-cell.st-found { background: rgba(239, 68, 68, .85); }
.ss-cell.st-blocked { background: repeating-linear-gradient(45deg, #475569 0 6px, #334155 6px 12px); }
.ss-cell.is-selected { border-color: #fff; box-shadow: 0 0 0 3px var(--cyan); }
.ss-cell-mark { position: absolute; top: 2px; right: 5px; font-size: 11px; }
.ss-hint { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ss-hint kbd { padding: 0 4px; font: inherit; font-size: 11px; border: 1px solid var(--border-strong); border-radius: 3px; }
.ss-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ss-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ss-legend b { color: var(--text); }
.ss-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

.ss-form-card { position: sticky; top: 12px; }
.ss-form-card h2 { margin-bottom: 10px; }
.ss-selected { padding: 8px 10px; font-size: 13px; line-height: 1.5; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.ss-selected b { color: var(--text); }
.ss-choices { margin: 12px 0 0; padding: 0; border: 0; }
.ss-choices legend { margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.ss-choices > div { display: grid; gap: 6px; }
.ss-choice {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  font-size: 13.5px; font-weight: 600; background: var(--panel-2);
  border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px; cursor: pointer;
}
.ss-choice input { accent-color: var(--cyan); }
.ss-choice:has(input:checked) { border-color: var(--cyan); background: rgba(34, 211, 238, .1); }
.ss-choice.st-none { border-left-color: var(--st-none); }
.ss-choice.st-in_progress { border-left-color: var(--st-in_progress); }
.ss-choice.st-searched { border-left-color: var(--st-searched); }
.ss-choice.st-found { border-left-color: var(--st-found); }
.ss-choice.st-blocked { border-left-color: var(--st-blocked); }
.ss-field { display: grid; gap: 4px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.ss-field input, .ss-field textarea, .ss-filters input, .ss-filters select {
  width: 100%; padding: 8px 10px; font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; resize: vertical;
}
.ss-field input:focus, .ss-field textarea:focus, .ss-filters input:focus, .ss-filters select:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34, 211, 238, .2);
}
.ss-save { width: 100%; margin-top: 14px; height: 38px; }
.ss-save:disabled { opacity: .5; cursor: not-allowed; }
.ss-msg { min-height: 18px; margin: 8px 0 0; font-size: 13px; color: var(--green); }
.ss-msg.is-error { color: #fca5a5; }
.ss-cell-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ss-cell-history h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }

.ss-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ss-filters select { width: auto; }
.ss-filters input { width: 240px; max-width: 100%; }
.ss-table-scroll { overflow-x: auto; }
.ss-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.ss-table th { padding: 8px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.ss-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ss-table tr.is-selected td { background: rgba(34, 211, 238, .08); }
.ss-row-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.ss-row-check input { accent-color: var(--cyan); }
.ss-note { max-width: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ss-meta { white-space: nowrap; }
.ss-meta small, .ss-activity small { color: var(--muted); }
.ss-muted { color: var(--muted); }
.ss-activity { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ss-activity li { padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.ss-activity li.ss-muted { background: none; border: 0; padding: 0; }
.ss-act-cell { margin-right: 4px; }
.ss-act-note { margin-top: 3px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.ss-card #ss-activity { max-height: 420px; overflow-y: auto; }

/* ---------- B торлого (нарийвчилсан хайлт) ---------- */
/* Газрын зураг: B шошго зөвхөн ойртуулахад; тэр үед A шошгыг нууна (давхцахгүй) */
.leaflet-tooltip.grid-sublabel {
  display: none;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
}
.leaflet-tooltip.grid-sublabel::before { display: none; }
.show-sub-labels .leaflet-tooltip.grid-sublabel { display: block; }
.show-sub-labels .leaflet-tooltip.grid-label-parent { display: none; }
.leaflet-tooltip.grid-label small { font-size: 10px; font-weight: 700; opacity: .85; }

/* Нүдний попап: хуваах хэсэг */
.ci-sub-info { margin-bottom: 6px; color: #334155; }
.ci-sub-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ci-sub-row select {
  flex: 1;
  min-width: 0;
  padding: 5px 6px;
  font: inherit;
  font-size: 12.5px;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.ci-sub-btn {
  padding: 5px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: #7c3aed;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.ci-sub-btn:hover { background: #6d28d9; }
.ci-sub-btn.ci-sub-off { color: #7c3aed; background: #fff; border: 1px solid #c4b5fd; }
.ci-sub-msg { min-height: 0; margin-top: 4px; font-size: 12px; color: #b91c1c; }
.ci-sub-msg:empty { display: none; }

/* Төлөвийн хуудас: хуваасан A нүд */
.ss-parent {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  background: rgba(15, 23, 42, .6);
  border: 2px solid var(--border-strong);
  border-radius: 7px;
}
.ss-parent.st-found { border-color: var(--st-found); }
.ss-parent.st-searched { border-color: var(--st-searched); }
.ss-parent.st-in_progress { border-color: var(--st-in_progress); }
.ss-parent-head {
  padding: 2px 4px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.ss-parent-head:hover { background: rgba(34, 211, 238, .12); }
.ss-parent-head:focus-visible { outline: 2px solid var(--cyan); }
.ss-subgrid { display: grid; gap: 2px; }
.ss-cell.ss-sub { min-height: 26px; padding: 1px; font-size: 10.5px; border-width: 1.5px; border-radius: 4px; }
.ss-cell.ss-sub .ss-cell-mark { top: 0; right: 2px; font-size: 9px; }

/* Төлөвийн хуудас: B торлогод хуваах */
.ss-subdiv { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ss-subdiv h3 { margin: 0 0 6px; font-size: 13px; color: #c4b5fd; }
.ss-subdiv-info { margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ss-subdiv-info b { color: var(--text); }
.ss-subdiv-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-subdiv-row select {
  flex: 1 1 100%; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
}
.ss-subdiv-btn {
  flex: 1; height: 34px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 700;
  color: #fff; background: #7c3aed; border: 0; border-radius: 6px; cursor: pointer;
}
.ss-subdiv-btn:hover:not(:disabled) { background: #6d28d9; }
.ss-subdiv-btn.ss-subdiv-off { color: #c4b5fd; background: transparent; border: 1px solid #7c3aed; }
.ss-subdiv-btn:disabled { opacity: .45; cursor: not-allowed; }
.ss-subdiv-btn:focus-visible, .ss-subdiv-row select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Нүдний попап: эх нүд ↔ B нүд, B нүднүүдийн явц */
.ci-jump {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  color: #5b21b6;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 6px;
  cursor: pointer;
}
.ci-jump:hover { background: #ede9fe; }
.ci-jump:focus-visible { outline: 2px solid #7c3aed; outline-offset: 1px; }
.ci-subsum-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.ci-subsum-top b { font-size: 18px; color: #15803d; }
.ci-subsum-top span { color: #475569; }
.ci-subsum-bar { display: flex; height: 7px; margin-bottom: 6px; overflow: hidden; background: #e2e8f0; border-radius: 999px; }
.ci-subsum-bar i { display: block; height: 100%; }

/* ---------- 3D гадарга (static/js/grid_3d.js) ---------- */
.cell-popup .btn-link.ci-3d { font-weight: 800; color: #7c3aed; }
.t3d {
  width: min(1200px, calc(100vw - 32px));
  height: min(820px, calc(100vh - 32px));
  padding: 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.t3d[open] { display: flex; flex-direction: column; }
.t3d::backdrop { background: rgba(2, 6, 23, .7); }
.t3d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.t3d-head h2 { margin: 0; font-size: 17px; color: var(--cyan); }
.t3d-stats { margin-top: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.t3d-close { display: grid; place-items: center; width: 34px; height: 34px; color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.t3d-close:hover { color: var(--text); background: var(--panel-2); }
.t3d-close svg { width: 18px; height: 18px; }
.t3d-map { position: relative; flex: 1; min-height: 0; background: #0b1220; }
.t3d-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }
.t3d-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; font-size: 13px; border-top: 1px solid var(--border); }
.t3d-ctl { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.t3d-ctl input[type="range"] { width: 120px; accent-color: var(--cyan); }
.t3d-ctl b { min-width: 34px; color: var(--text); font-variant-numeric: tabular-nums; }
.t3d-chip {
  padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.t3d-chip:hover { color: var(--text); border-color: var(--border-strong); }
.t3d-chip.is-on { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }
.t3d-chip:focus-visible, .t3d-close:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.t3d-hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.t3d-label {
  padding: 1px 6px; font-size: 11.5px; font-weight: 700; color: #fff; white-space: nowrap;
  background: rgba(15, 23, 42, .7); border-radius: 4px; text-shadow: 0 0 2px #000; pointer-events: none;
}
.t3d-label small { font-weight: 500; opacity: .85; }
.t3d-label-sub {
  font: inherit; font-size: 12px; font-weight: 800; color: #fff; background: transparent; border: 0;
  pointer-events: auto; cursor: pointer;
}
.t3d-label-sub:hover { background: rgba(15, 23, 42, .75); }
.t3d-label-sub:focus-visible { outline: 2px solid #22d3ee; }
.t3d-label-sub.is-picked { color: #67e8f9; background: rgba(15, 23, 42, .8); }
.t3d-mark { font-size: 10px; opacity: .9; }

/* 3D: B нүдний попап */
.t3d-popup .maplibregl-popup-content { padding: 10px 12px; color: #0f172a; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.t3d-popup .maplibregl-popup-close-button { font-size: 18px; padding: 0 6px; }
.t3d-pop { min-width: 220px; font-size: 12.5px; }
.t3d-pop-title { margin-bottom: 6px; padding-right: 16px; font-size: 14px; font-weight: 800; color: #0e7490; }
.t3d-pop-st { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.t3d-pop-st small { color: #64748b; }
.t3d-pop-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-top: 1px solid #e2e8f0; }
.t3d-pop-row span { color: #64748b; }
.t3d-pop-row b { text-align: right; font-variant-numeric: tabular-nums; }
.t3d-pop-note { margin: 4px 0 6px; padding: 5px 7px; white-space: pre-wrap; background: #fef9c3; border-radius: 6px; }
.t3d-pop-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.t3d-pop-acts .t3d-chip { padding: 4px 10px; font-size: 12px; color: #0f172a; background: #f1f5f9; border-color: #cbd5e1; text-decoration: none; }
.t3d-pop-acts .t3d-chip:hover { background: #e0f2fe; border-color: #22d3ee; }
.t3d-label-peak { color: #fde68a; }
.t3d-label-lake, .t3d-label-river, .t3d-label-spring, .t3d-label-well { color: #93c5fd; }
@media (max-width: 640px) { .t3d-hint { display: none; } }

/* OSM шороон зам: canvas-ийн шугамыг хиймэл дагуулын зураг дээр тодруулах хар хүрээ */
.leaflet-tracksPane-pane canvas { filter: drop-shadow(0 0 1px rgba(0, 0, 0, .95)) drop-shadow(0 0 1px rgba(0, 0, 0, .6)); }


/* ---------- Шинэ нислэг: газрын зургийн зүүн талын самбар (new_flight.js) ---------- */
.map-wrap.np-open { --fp-w: 350px; }
.new-panel[hidden] { display: none; }
.new-panel .np-form { flex: 1; min-height: 0; display: flex; flex-direction: column; max-height: none; }
.np-head-icon { background: var(--green, #16a34a); }
.new-panel .fp-body { gap: 10px; }
.np-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.np-sec .fp-section-head { margin: 0; }
.new-panel .fld-label { margin-bottom: 4px; font-size: 13px; }
.new-panel .form-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
.new-panel .form-grid > .fld-group:nth-last-child(-n+2) { grid-column: 1 / -1; }   /* огноо, тайлбар бүтэн мөрөнд */
.new-panel .flight-form textarea, .new-panel textarea { min-height: 70px; }
.new-panel .flight-form input, .new-panel input { height: 34px; }
.np-row { display: flex; gap: 10px; align-items: flex-start; }
.new-panel .fld-num { flex: 1 1 0; }
.new-panel .dir-row { flex-direction: column; gap: 10px; padding-top: 0; border-top: 0; }
.new-panel .dir-remove { flex: 0 0 auto; }
.new-panel .pin-btn-wide span { display: none; }        /* нарийн самбарт зөвхөн дүрс */
.new-panel .dms-row { gap: 6px 12px; }
.new-panel .dms-part input { width: 54px; }
.new-panel .dms-part.dms-sec input { width: 70px; }
.new-panel .btn-add-point { align-self: flex-start; }
.np-meta { display: flex; flex-direction: column; gap: 3px; padding: 6px 9px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.np-meta b { white-space: normal; text-align: right; }
.np-warn { margin: 0; padding: 7px 10px; font-size: 12.5px; color: #fecaca; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .45); border-radius: 6px; }
.np-warn[hidden], .np-alert[hidden] { display: none; }
.np-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.np-foot .btn-save { min-width: 120px; }
.pick-banner span { white-space: nowrap; }
@media (max-width: 700px) {
  .map-wrap.np-open { --fp-w: calc(100vw - 24px); }
  .pick-banner { flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); }
  .pick-banner span { white-space: normal; }
}
.new-panel .fp-body { overflow-x: hidden; }
.new-panel .fp-body > *, .new-panel .np-sec > * { min-width: 0; max-width: 100%; }
.new-panel .fld-point > .fld-label { display: none; }     /* хэсгийн гарчигтай давхардахгүй */
.new-panel .dms-row { justify-content: space-between; }
.new-panel .dir-row { display: flex; flex-direction: column; flex-wrap: nowrap; }
.new-panel .dir-row[hidden] { display: none; }
.new-panel .fld-point, .new-panel .dir-row { flex: none; }
.new-panel .np-meta, .new-panel .dir-row > .fld-point { align-self: stretch; }


/* ---------- Нислэгийн самбар: "Засах" горимд мэдээллийг засах маягт (flight_area.js) ---------- */
.map-wrap.fp-editing { --fp-w: 340px; }
.fp-edit[hidden] { display: none; }
.flight-panel.is-editing .fp-body > :not(.fp-edit):not(.fp-grid) { display: none; }
.flight-panel.is-editing .fp-grid { order: -1; }
.flight-panel.is-editing .fp-head { background: rgba(250, 204, 21, .08); }
.fp-edit { display: flex; flex-direction: column; gap: 12px; }
.fp-edit-note { margin: 0; padding: 7px 10px; font-size: 12.5px; color: var(--muted); background: rgba(34, 211, 238, .07); border: 1px solid rgba(34, 211, 238, .3); border-radius: 6px; }
.fp-edit-note b { color: var(--text); }
.fp-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fp-edit-grid .fe-wide { grid-column: 1 / -1; }
.fp-edit .fld-label { margin-bottom: 4px; font-size: 13px; }
.fp-edit input, .fp-edit textarea { height: 34px; }
.fp-edit textarea { min-height: 80px; }
.fp-edit .input-suffix { display: block; }
.fe-sec { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.fe-sec .fp-edit-grid { margin-top: 4px; }
.fp-edit input.is-bad { border-color: var(--red); }
.fe-preview { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: #86efac; font-variant-numeric: tabular-nums; }
.fe-preview span + span { color: #fcd34d; }
.fe-alert[hidden] { display: none; }
@media (max-width: 700px) { .map-wrap.fp-editing { --fp-w: calc(100vw - 24px); } }

/* ---------- Нүд рүү очих маршрут (route.js) ---------- */
.route-card {
  position: absolute; top: 12px; left: 50%; z-index: 560; transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px)); padding: 10px 12px; color: var(--text);
  background: rgba(7, 17, 42, .97); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5);
}
.route-card[hidden] { display: none; }
.route-card.is-picking { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34, 211, 238, .35), 0 10px 34px rgba(0, 0, 0, .5); }
.rc-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rc-head b { flex: 1; color: var(--cyan); }
.rc-close { width: 28px; height: 28px; font-size: 20px; line-height: 1; color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.rc-close:hover { color: var(--text); background: var(--panel-2); }
.rc-body { margin: 8px 0; font-size: 13px; }
.rc-body p { margin: 4px 0; }
.rc-muted { color: var(--muted); }
.rc-muted b { color: var(--text); }
.rc-warn { color: #fcd34d; }
.rc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rc-stats div { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.rc-stats small { font-size: 11.5px; color: var(--muted); }
.rc-stats b { font-size: 15px; color: var(--green); font-variant-numeric: tabular-nums; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-btn {
  padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text); text-decoration: none;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.rc-btn:hover { border-color: var(--cyan); }
.rc-gmaps { margin-left: auto; color: #93c5fd; }
.is-picking [data-rc-act="pick"] { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }
.rc-foot { margin-top: 6px; font-size: 11px; color: var(--muted); }
.route-dest span { display: block; font-size: 24px; line-height: 1; color: #ef4444; text-shadow: 0 0 3px #fff, 0 0 2px #fff; }
.ci-route { font-weight: 700; }

/* Мэдээллийн самбар: цэг рүү очих маршрут */
.fp-route-btn {
  align-self: flex-start; margin-top: 4px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--cyan); background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .45); border-radius: 999px; cursor: pointer;
}
.fp-route-btn:hover { background: rgba(34, 211, 238, .18); }
.fp-route-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Нүдний попап: эрлийн баг (хайлтын төлөвийн "Баг" талбар) */
.ci-team-btn { font-weight: 700; }
.ci-team-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; }
.ci-team-name { font-size: 14px; font-weight: 800; color: #0c4a6e; }
.ci-team-form { display: flex; flex-direction: column; gap: 7px; }
.ci-team-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: #334155; }
.ci-team-form input, .ci-team-form select, .ci-team-form textarea {
  padding: 5px 7px; font: inherit; font-size: 12.5px; font-weight: 400; color: #0f172a; background: #fff;
  border: 1px solid #cbd5e1; border-radius: 6px;
}
.ci-team-form input:focus, .ci-team-form select:focus, .ci-team-form textarea:focus { outline: 2px solid #22d3ee; outline-offset: 0; border-color: #22d3ee; }
.ci-team-form textarea { resize: vertical; }
.ci-team-acts { display: flex; gap: 6px; margin-top: 6px; }
.ci-team-list { margin: 0 0 6px; padding-left: 18px; font-size: 12.5px; }
.ci-team-list li { margin: 2px 0; }
.ci-muted { color: #64748b; }

/* ---------- Дээд мөр: системийн бодит төлөв (system_status.js) ---------- */
.sys-status { position: relative; }
button.status-list { padding: 6px 8px; font: inherit; font-size: 13px; color: var(--text); background: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
button.status-list:hover, button.status-list[aria-expanded="true"] { background: rgba(255, 255, 255, .05); border-color: var(--border); }
button.status-list:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sys-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #64748b; transition: background .3s, box-shadow .3s; }
.sys-ok .sys-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.sys-warn .sys-dot { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.sys-err .sys-dot { background: var(--red); box-shadow: 0 0 6px var(--red); animation: sys-blink 1.2s ease-in-out infinite; }
.sys-unknown .sys-dot { background: #64748b; box-shadow: none; }
@keyframes sys-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sys-err .sys-dot { animation: none; } }
.sys-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1200; width: 400px; padding: 10px 12px;
  background: rgba(7, 17, 42, .98); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 36px rgba(0, 0, 0, .55);
}
.sys-pop[hidden] { display: none; }
.sys-pop-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.sys-pop-head b { color: var(--cyan); }
.sys-pop-head span { font-size: 11.5px; color: var(--muted); }
.sys-pop-list { margin: 0; padding: 0; list-style: none; }
.sys-pop-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border); }
.sys-pop-list li .sys-dot { margin-top: 5px; }
.sys-pop-list b { display: block; font-size: 13px; }
.sys-pop-list em { margin-left: 6px; font-size: 11.5px; font-style: normal; font-weight: 700; color: var(--muted); }
.sys-pop-list .sys-ok em { color: var(--green); }
.sys-pop-list .sys-warn em { color: #fbbf24; }
.sys-pop-list .sys-err em { color: #f87171; }
.sys-pop-list small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.sys-refresh { margin-top: 6px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.sys-refresh:hover { border-color: var(--cyan); }
button.status-list { gap: 11px; padding: 4px 6px; }
/* Дээд мөр: миний байршил */
.sys-off .sys-dot { background: #475569; box-shadow: none; }
.sys-loc { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.sys-loc-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sys-loc-msg { margin: 6px 0 4px 18px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.sys-loc-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 6px 0 4px 18px; font-size: 12.5px; }
.sys-loc-grid dt { color: var(--muted); }
.sys-loc-grid dd { margin: 0; color: var(--green); font-variant-numeric: tabular-nums; }
.sys-loc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 18px; }
.sys-loc-acts .sys-refresh { margin-top: 4px; }
.my-loc span {
  display: block; width: 18px; height: 18px; background: #3b82f6; border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, .6); animation: my-loc-pulse 2s ease-out infinite;
}
@keyframes my-loc-pulse { 70% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } }
@media (prefers-reduced-motion: reduce) { .my-loc span { animation: none; } }
.brand-title, .clock-label { white-space: nowrap; }
@media (max-width: 1600px) {
  button.status-list { gap: 9px; padding: 4px 5px; font-size: 12.5px; }
  .status-item { gap: 5px; }
  .clock { padding: 0 12px; min-width: 96px; }
}
@media (max-width: 1440px) and (min-width: 1101px) { .brand-title { display: none; } }

/* Нислэгийн жагсаалт: устгах товч */
.data-table td.list-act { width: 1%; padding-top: 4px; padding-bottom: 4px; text-align: right; }
.list-del {
  display: inline-grid; place-items: center; width: 30px; height: 30px; color: #fca5a5; background: transparent;
  border: 1px solid transparent; border-radius: 6px; cursor: pointer;
}
.list-del svg { width: 16px; height: 16px; }
.list-del:hover { color: #fff; background: rgba(239, 68, 68, .85); border-color: #ef4444; }
.list-del:focus-visible { outline: 2px solid #ef4444; outline-offset: 1px; }
.list-del[disabled] { opacity: .5; cursor: progress; }

/* PDF тайлан татах */
.fp-report-link {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; padding: 7px 10px;
  font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; background: #1d4ed8; border: 1px solid #3b6ef0; border-radius: 6px;
}
.fp-report-link:hover { background: #2563eb; }
.fp-report-link svg { width: 16px; height: 16px; }
.ss-report {
  align-self: center; padding: 7px 14px; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap;
  background: #1d4ed8; border: 1px solid #3b6ef0; border-radius: 6px;
}
.ss-report:hover { background: #2563eb; }

/* Shift + чирэх: хэсэг сонгох (box_select.js) */
.leaflet-zoom-box { border: 2px dashed #22d3ee; background: rgba(34, 211, 238, .12); }
.bs-pop { min-width: 200px; }
.bs-size { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.bs-size b { font-size: 15px; color: #0f172a; }
.bs-size span { font-size: 12px; color: #64748b; }
.bs-acts { display: flex; gap: 6px; }
.bs-btn { padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 700; color: #0f172a; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; }
.bs-btn:hover { border-color: #22d3ee; background: #e0f2fe; }
.bs-btn.bs-3d { color: #fff; background: #0e7490; border-color: #0e7490; }
.bs-btn.bs-3d:hover { background: #0891b2; }
.bs-btn.bs-x { margin-left: auto; padding: 5px 8px; }

/* Тохиолдлын төрөл (Монгол Улсын хэмжээний эрэн хайх, авран туслах) */
.flight-form select {
  width: 100%; height: 38px; padding: 0 8px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; outline: none; color-scheme: dark;
}
.flight-form select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
.new-panel .flight-form select, .fp-edit select { height: 34px; }
.np-incident { padding-top: 0; border-top: 0; }
.fp-incident {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 2px 9px; font-size: 12px; font-weight: 700;
  color: #fff; background: rgba(249, 115, 22, .9); border-radius: 999px;
}
.data-table td.list-type { white-space: nowrap; font-size: 12.5px; }
/* Нэвтрэх хуудас: Монгол Улсын хэмжээний систем */
.hero-eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: #fb923c; }
.hero-lead { max-width: 480px; margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.hero h1 + .hero-lead + .hero-features { margin-top: 24px; }
.head-mark { width: 40px; height: 40px; flex: none; }
.sys-credit { margin-top: 8px; padding-top: 7px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); }
