:root {
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Hiragino Sans GB",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203331;
  background: #f2f5f4;
  font-size: 14px;
  --green: #125e4d;
  --ink: #203331;
  --muted: #60716c;
  --line: #d9e2de;
  --card: #fff;
  --pale: #edf5ef;
  --danger: #9f322c;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #60a58d;
  outline-offset: 1px;
}
button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  font-weight: 600;
  padding: 8px 13px;
  min-height: 36px;
}
button:hover:enabled {
  background: #eef5f1;
  border-color: #a9c8ba;
}
a {
  color: var(--green);
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover:enabled {
  background: #0c4c3e;
  color: #fff;
}
.full {
  width: 100%;
}
.text-btn,
.icon-btn {
  background: transparent;
  border: 0;
  padding: 5px 8px;
}
.icon-btn {
  font-size: 22px;
  line-height: 1;
}
.muted,
small {
  color: var(--muted);
}
.muted {
  line-height: 1.65;
  margin: 4px 0;
}
.mast {
  height: 68px;
  background: #fbfdfc;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 15px;
}
.brand,
.session,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1.4px;
}
.brand b {
  font-size: 16px;
  font-weight: 650;
}
.brand > span {
  height: 19px;
  width: 1px;
  background: #bccbc4;
  margin: 0 3px;
}
.session {
  font-size: 13px;
}
.session > span {
  color: #465b54;
}
.session > .text-btn {
  font-size: 13px;
}
.startup {
  padding: 50px;
  font-size: 17px;
}
.auth {
  max-width: 1080px;
  margin: clamp(38px, 9vh, 110px) auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 48px #132b2010;
}
.auth-card {
  padding: clamp(30px, 5vw, 68px);
}
.auth-card h1 {
  font-size: 34px;
}
.eyebrow {
  color: var(--green);
  font-weight: 750;
  font-size: 13px;
  margin: 4px 0 13px;
}
.auth-card form {
  margin-top: 26px;
  display: grid;
  gap: 16px;
}
.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background: #e4ece7;
}
.auth-map-label {
  position: absolute;
  bottom: 24px;
  left: 22px;
  background: #fffffff2;
  border: 1px solid #d9e2de;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 2px 9px #20383112;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 410;
  font-weight: 650;
}
.auth-map-label small {
  font-weight: 400;
}
.pin-dot,
.health-light {
  display: inline-block;
  background: #508b67;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}
.workspace {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}
.sidebar {
  background: #fcfdfc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 23px 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-btn {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  color: #53655e;
  font-weight: 600;
}
.nav-btn[aria-current="page"] {
  color: #12573f;
  background: #e4f0e6;
}
.ico {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}
.side-foot {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  padding: 14px 4px;
}
.content {
  min-width: 0;
  padding: 24px clamp(15px, 2.2vw, 32px) 26px;
  max-width: 2000px;
  width: 100%;
  margin: auto;
  align-self: start;
}
.page-title,
.panel-title,
.item-top,
.toolbar,
.filters,
.dialog-top,
.spread {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.page-title {
  margin-bottom: 17px;
  min-height: 60px;
}
.page-title .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-title .muted {
  font-size: 13px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(24px, 2.2vw, 33px);
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin: 0;
}
h2 {
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
}
.card,
.metric,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.metric {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.metric small {
  font-size: 12px;
}
.metric b {
  font-size: 23px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.metric .ico {
  width: 19px;
  color: #649786;
}
.metric .metric-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-shell {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  min-height: 420px;
  overflow: hidden;
  position: relative;
}
.map-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 1;
  background: white;
}
.panel-title {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}
.list-filters {
  padding: 12px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.list-filters input,
.list-filters select {
  width: 100%;
}
.list {
  overflow: auto;
  max-height: 65vh;
  min-height: 40px;
}
.vehicle {
  display: block;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid #e6ece9;
  border-radius: 0;
  width: 100%;
  text-align: left;
  font-weight: normal;
}
.vehicle.active {
  background: #eaf4ed;
  box-shadow: inset 3px 0 var(--green);
}
.vehicle strong {
  font-size: 15px;
}
.vehicle .sub {
  display: block;
  margin-top: 4px;
}
.sub,
.meta,
.fine {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.mono {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f0f3f2;
  color: #62726b;
  white-space: nowrap;
}
.tag.online,
.tag.success {
  background: #dff1df;
  color: #246747;
}
.tag.wait {
  background: #f6eedc;
  color: #835e28;
}
.tag.bad {
  background: #fae7e3;
  color: #9c4435;
}
.tag.info {
  background: #e6eff5;
  color: #3c677e;
}
.map-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.map-stage {
  position: relative;
  min-height: 380px;
  flex: 1;
  height: clamp(400px, 55vh, 660px);
  overflow: hidden;
}
.map-view,
#authMap {
  position: absolute;
  inset: 0;
  z-index: 0;
  isolation: isolate;
}
.leaflet-container,
.geo-fallback {
  background-color: #e5ece7;
  background-image:
    linear-gradient(#77978f17 1px, transparent 1px),
    linear-gradient(90deg, #77978f17 1px, transparent 1px);
  background-size: 36px 36px;
  font:
    12px Arial,
    "PingFang SC",
    sans-serif;
}
.leaflet-control-attribution {
  font-size: 9px !important;
}
.leaflet-control-zoom a {
  color: #345948 !important;
}
.basemap-control {
  position: absolute;
  right: 11px;
  top: 11px;
  z-index: 402;
  display: flex;
  max-width: 70%;
  align-items: center;
  gap: 6px;
  padding: 2px 5px 2px 8px;
  border-radius: 6px;
  color: var(--ink);
}
.basemap-control select {
  color: inherit;
  font: inherit;
  border: 0;
  min-height: 31px;
  padding: 4px 2px;
  background: transparent;
  cursor: pointer;
}
.basemap-control,
.map-caption {
  box-shadow: 0 1px 5px #24483118;
  background: #fffffff5;
  font-size: 12px;
  min-height: 31px;
  border: 1px solid #cedbd3;
}
.map-caption {
  position: absolute;
  z-index: 401;
  left: 12px;
  bottom: 16px;
  border-radius: 6px;
  color: #536a5d;
  padding: 5px 9px;
  max-width: calc(100% - 30px);
  line-height: 1.5;
}
.map-caption button {
  padding: 2px 7px;
  min-height: 25px;
  font-size: 12px;
  margin-left: 6px;
}
.fleet-map-hint {
  position: absolute;
  z-index: 401;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 85%;
  width: max-content;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffffff5;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.gsi-credits { display: inline-block; position: relative; }
.gsi-credits summary { cursor: pointer; }
.gsi-credits > div {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 100%;
  background: white;
  color: #33433b;
  border: 1px solid #c9d6cd;
  border-radius: 4px;
  width: min(245px, 62vw);
  padding: 6px;
  white-space: normal;
}
.map-details {
  border-top: 1px solid var(--line);
  padding: 14px 17px;
  min-height: 65px;
}
.map-details .fine {
  margin-top: 6px;
  margin-bottom: 0;
}
.detail-grid {
  display: flex;
  gap: 15px 25px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.detail-grid > div {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.detail-grid small {
  font-size: 11px;
}
.speed-readout {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 36px;
  padding: 12px 14px;
  background: #fcf4e9;
  border-radius: 6px;
}
.speed-readout small { display: block; color: #71583c; }
.speed-readout strong { font-size: 26px; color: #82490d; }
.speed-readout strong span { font-size: 14px; }
.alert-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  gap: 12px;
  overflow-wrap: anywhere;
}
.empty {
  padding: 27px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.65;
}
.empty strong {
  display: block;
  color: var(--ink);
  margin: 0 0 4px;
}
.empty button {
  margin-top: 12px;
}
.map-label,
.station-label {
  font:
    600 11px "PingFang SC",
    "Microsoft YaHei",
    sans-serif !important;
  white-space: nowrap;
}
.station-label {
  color: #667d74;
  letter-spacing: 0.04em;
  text-shadow:
    1px 1px #f7faf5,
    -1px -1px #f7faf5;
  pointer-events: none;
}
.map-label {
  background: #fff;
  border: 1px solid #86a99a;
  border-radius: 4px;
  padding: 2px 6px;
  color: #184d3d;
  line-height: 16px;
}
.vehicle-marker {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #17674f;
  background: #17674f;
}
.map-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.auth-visual .leaflet-control-container {
  pointer-events: none;
}
.toolbar,
.filters {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.toolbar {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.filters label {
  font-size: 12px;
  font-weight: 550;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.stack {
  display: grid;
  gap: 14px;
}
.pad {
  padding: 16px;
}
.panel .pad + .pad {
  border-top: 1px solid var(--line);
}
.stat-num {
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow-x: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table-wrap th {
  background: #f4f7f5;
  font-weight: 600;
  font-size: 12px;
  color: #586e62;
}
.table-wrap td,
.table-wrap th {
  padding: 11px 13px;
  border-bottom: 1px solid #e4ebe7;
  vertical-align: middle;
}
.table-wrap td {
  font-size: 13px;
  line-height: 1.5;
}
.table-wrap tr:last-child td {
  border-bottom: 0;
}
.table-wrap button {
  font-size: 12px;
  padding: 4px 9px;
  min-height: 28px;
}
.table-wrap .wrap-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.connection {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr);
  gap: 14px;
}
.connect-flow {
  padding-left: 18px;
  line-height: 1.7;
  font-size: 13px;
  color: #52665d;
}
.connect-flow li + li {
  margin-top: 6px;
}
.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.entry:last-child {
  border: 0;
}
.entry strong {
  word-break: break-word;
}
.entry > span {
  color: var(--muted);
}
.notice {
  border-radius: 7px;
  background: #eef3ed;
  border: 1px solid #d6e3d8;
  padding: 10px 12px;
  font-size: 13px;
  color: #3b5f4c;
  line-height: 1.55;
}
.notice.warn {
  background: #fcf6e8;
  border-color: #eadebd;
  color: #7d642d;
}
.error {
  background: #fff0ec;
  color: #8c3730;
  border: 1px solid #efc7be;
  border-radius: 7px;
  padding: 9px 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.badge-count {
  color: #446051;
  background: #e8efea;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 12px;
}
.track-controls {
  padding: 11px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.track-controls input {
  flex: 1;
  min-width: 80px;
  width: auto;
}
.track-controls span {
  font-size: 12px;
}
.track-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(255px, 325px);
}
.track-left { min-width: 0; }
.track-left .map-stage { height: clamp(380px, 52vh, 650px); }
.track-left .track-controls { gap: 7px; flex-wrap: wrap; }
.track-left .track-controls select { width: auto; }
.track-map-caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px; padding: 7px 14px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.track-map-caption button, #backToTrackMap { display: none; }
.track-inspector {
  padding: 14px; border-left: 1px solid var(--line); min-width: 0;
  max-height: clamp(490px, 67vh, 785px); overflow: auto; scrollbar-gutter: stable;
}
.track-inspector h2 { margin: 0; font-size: 16px; }
.track-inspector > strong { display: block; margin: 10px 0; font-variant-numeric: tabular-nums; }
.track-inspector .fine { margin: 4px 0; }
.track-inspector:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.track-fields { display: grid; gap: 0; margin: 9px 0; font-size: 13px; }
.track-fields > div { display: grid; grid-template-columns: minmax(70px, 2fr) minmax(0, 3fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.track-fields dt { color: var(--muted); }
.track-fields dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-variant-numeric: tabular-nums; }
.track-nearby { padding: 8px; background: #eef4f0; border-radius: 6px; }
.track-nearby p { margin: 0 0 5px; font-size: 12px; }
.track-nearby button + button { margin-left: 5px; }
.track-peak-note { margin: 6px 12px; }
@media (max-width: 850px) {
  .track-workspace { grid-template-columns: minmax(0, 1fr); }
  .track-left .map-stage { height: clamp(300px, 45vh, 490px); min-height: 300px; }
  .track-map-caption button, #backToTrackMap { display: inline-block; }
  .track-inspector { max-height: none; overflow: visible; border-left: none; border-top: 1px solid var(--line); }
  .track-nearby button, .track-controls button, .track-map-caption button { min-height: 40px; }
}
.map-mini {
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}
.map-mini .map-caption {
  font-size: 10px;
  bottom: 19px;
}
.fence-shell {
  display: grid;
  grid-template-columns: minmax(235px, 310px) minmax(0, 1fr);
  min-height: 445px;
}
.fence-shell .map-stage {
  height: 100%;
  min-height: 420px;
}
.list-item {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.list-item.selected {
  background: #edf6ee;
}
.list-item > div {
  margin: 5px 0 0;
}
.sys-grid {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 15px;
}
.sys-grid > .panel { min-width: 0; }
.sys-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 13px;
}
.sys-tabs button[data-current="true"] {
  background: #e4efe7;
  border-color: #abc8b5;
  color: #155f43;
}
label {
  display: grid;
  gap: 6px;
  color: #3c5348;
  font-weight: 600;
  font-size: 13px;
}
input,
select,
textarea {
  min-height: 37px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d6cd;
  padding: 7px 10px;
  border-radius: 6px;
  max-width: 100%;
  min-width: 0;
}
input::placeholder {
  color: #87988f;
}
textarea {
  resize: vertical;
}
.fence-vehicles {
  max-height: 123px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 6px;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}
.checkline input {
  width: 15px;
  min-height: 15px;
  height: 15px;
  margin: 0;
}
.field-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
dialog {
  width: min(92vw, 495px);
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 15px 65px #16352c26;
  overflow: auto;
  max-height: 92dvh;
}
dialog::backdrop {
  background: #122c2390;
}
dialog:has(#diagnosticView) {
  width: min(94vw, 760px);
}
#diagnosticView [data-detail] {
  display: grid;
  gap: 8px;
}
#diagnosticView [data-detail][hidden] { display: none; }
#diagnosticView code {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.dialog-top {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
#modalBody {
  padding: 18px 20px;
}
.dialog-form {
  display: grid;
  gap: 13px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 3px;
}
.toast {
  position: fixed;
  z-index: 10000;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #426955;
  border-radius: 8px;
  padding: 11px 18px;
  background: #244d3e;
  color: #fff;
  max-width: 94vw;
  text-align: center;
  box-shadow: 0 2px 10px #1833272b;
  font-size: 13px;
}
.empty-title {
  line-height: 1.5;
}
.readout {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}
.table-note {
  padding: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}
.mono-field {
  font-family: ui-monospace, monospace;
}
.danger-text {
  color: #9f4335;
}
.panel-action {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 29px;
}
.gap-top {
  margin-top: 12px;
}
.nowrap {
  white-space: nowrap;
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 139px minmax(0, 1fr);
  }
  .sidebar {
    padding: 15px 7px;
  }
  .metric {
    padding: 8px 11px;
  }
  .metric .ico {
    display: none;
  }
  .map-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .content {
    padding: 18px 14px;
  }
  .nav-btn {
    padding: 10px;
  }
  .brand b {
    font-size: 14px;
  }
}
@media (max-width: 760px) {
  .mast {
    height: 56px;
    padding: 0 13px;
  }
  .brand {
    gap: 6px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .brand strong {
    font-size: 21px;
  }
  .brand > b {
    font-size: 13px;
  }
  .session {
    gap: 1px;
    font-size: 11px;
  }
  .session > span {
    max-width: 117px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .workspace {
    display: block;
    min-height: calc(100vh - 56px);
  }
  .sidebar {
    padding: 4px 6px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: auto;
  }
  .sidebar nav {
    flex-direction: row;
    gap: 2px;
    justify-content: space-around;
  }
  .nav-btn {
    white-space: nowrap;
    gap: 5px;
    padding: 7px 6px;
    font-size: 12px;
  }
  .nav-btn .ico {
    width: 15px;
    height: 15px;
  }
  .side-foot {
    display: none;
  }
  .content {
    padding: 13px 10px 22px;
  }
  .page-title {
    min-height: 0;
    gap: 6px;
    margin-bottom: 11px;
  }
  .page-title h1 {
    font-size: 23px;
  }
  .page-title .muted {
    font-size: 12px;
  }
  .actions {
    gap: 5px;
  }
  .actions button {
    font-size: 12px;
    min-height: 31px;
    padding: 5px 8px;
  }
  .metrics {
    gap: 5px;
    margin-bottom: 8px;
  }
  .metric {
    display: block;
    padding: 7px 8px;
  }
  .metric b {
    font-size: 17px;
  }
  .metric small {
    font-size: 10px;
  }
  .map-shell,
  .fence-shell {
    display: flex;
    flex-direction: column;
  }
  .map-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .map-list .panel-title {
    padding: 7px 10px;
  }
  .list-filters {
    display: flex;
    padding: 7px;
    gap: 4px;
  }
  .list-filters input,
  .list-filters select {
    width: 50%;
    font-size: 12px;
  }
  .list {
    max-height: 156px;
  }
  .vehicle,
  .list-item {
    padding: 8px 10px;
  }
  .map-list .empty {
    padding: 9px;
  }
  .map-stage {
    min-height: 310px;
    height: 43vh;
  }
  .fence-shell .map-stage {
    height: 44vh;
    min-height: 320px;
  }
  .map-details {
    padding: 10px 12px;
  }
  .panel-title {
    padding: 11px;
  }
  .grid2,
  .connection {
    grid-template-columns: 1fr;
  }
  .toolbar {
    padding: 9px;
    gap: 6px;
  }
  .toolbar select,
  .toolbar input {
    font-size: 12px;
  }
  .table-wrap td,
  .table-wrap th {
    padding: 8px;
  }
  .auth {
    margin: 24px 12px;
    grid-template-columns: 1fr;
  }
  .auth-visual {
    min-height: 190px;
    order: -1;
  }
  .auth-card {
    padding: 24px;
  }
  .auth-card h1 {
    font-size: 27px;
  }
  .auth-map-label {
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    padding: 6px 9px;
  }
  .mobile-hide {
    display: none;
  }
  .track-controls {
    flex-wrap: wrap;
    gap: 6px;
  }
  .track-controls span {
    font-size: 11px;
  }
  .map-mini {
    height: 185px;
  }
  .session > .text-btn {
    font-size: 11px;
  }
  .page-title .actions {
    max-width: 53%;
  }
}
@media (max-width: 380px) {
  .nav-btn .ico {
    display: none;
  }
  .brand > span,
  .brand > b {
    display: none;
  }
}
.content {
  margin: 0 auto;
}
.leaflet-container a.leaflet-control-zoom-in,
.leaflet-container a.leaflet-control-zoom-out {
  color: #234e3e;
}
.leaflet-control-attribution a {
  color: #486357;
}
.rule-options {
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.rule-options summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
}
.rule-options[open] summary {
  margin-bottom: 9px;
}
.rule-options[open] .field-row {
  margin-bottom: 7px;
}
.sys-tabs {
  flex-wrap: wrap;
}
.vehicle-marker.past-position {
  background: #6c7773;
  box-shadow: 0 0 0 2px #6c7773;
}
.map-label.radio-label { color: #69430f; border-color: #c59959; text-align: center; }
.radio-estimate-marker::before {
  content: ""; position: absolute; inset: 2px; transform: rotate(45deg);
  background: #f3c36b; border: 2px dashed #74531d; box-sizing: border-box;
}
.radio-estimate-marker.past-position::before { background: #d0c4af; border-color: #79694d; }
.leaflet-overlay-pane path.past-position { stroke: #79694d; fill: #c3b69e; }
.radio-details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.radio-details h3 { margin: 0 0 8px; color: #69430f; font-size: .95rem; }
.radio-details .meta { margin: 8px 0 0; }
.fix-note { margin: 10px 0; }
.device-info { margin-top: 12px; font-size: .85rem; }
.device-info summary { color: #375b50; cursor: pointer; }
.device-info[open] summary { margin-bottom: 8px; }
#alertCenter .filters, #trackRange { align-items: end; }
#alertCenter label, #trackRange label { display: grid; gap: 4px; font-size: .85rem; }
.device-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.device-actions .device-remove { color: #963e33; }
