.ffw-panel-root .ld-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  display: grid;
}

.ffw-panel-root .ld-map-panel,
.ffw-panel-root .ld-sidebar {
  min-width: 0;
}

.ffw-panel-root .ld-toolbar {
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  display: flex;
}

.ffw-panel-root .ld-search {
  flex: 1 1 260px;
  display: flex;
  gap: 8px;
}

.ffw-panel-root .ld-search input {
  min-width: 0;
  width: 100%;
}

.ffw-panel-root #ld-map {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: #dce5ea;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ffw-panel-root .ld-map-hint {
  color: var(--ui-muted) !important;
  margin: 10px 0 0;
  font-size: .88rem;
}

.ffw-panel-root .ld-sidebar {
  align-content: start;
  gap: 14px;
  display: grid;
}

.ffw-panel-root .ld-tool-list {
  gap: 9px;
  display: grid;
}

.ffw-panel-root .ld-tool {
  cursor: grab;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
}

.ffw-panel-root .ld-tool:hover,
.ffw-panel-root .ld-tool:focus-visible {
  border-color: var(--ui-red);
  background: #fff7f7;
}

.ffw-panel-root .ld-tool-symbol,
.ffw-panel-root .ld-marker-symbol {
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 50%;
  place-items: center;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 900;
  display: grid;
  box-shadow: 0 5px 14px rgba(24, 38, 49, .28);
}

.ffw-panel-root .ld-symbol-water { background: #1479b8; }
.ffw-panel-root .ld-symbol-hydrant { background: #c1121f; }
.ffw-panel-root .ld-symbol-tank { background: #15866f; border-radius: 8px; }
.ffw-panel-root .ld-symbol-pump { background: #db7b14; }
.ffw-panel-root .ld-symbol-object { background: #323f4a; border-radius: 8px; }

.ffw-panel-root .ld-leaflet-icon {
  background: transparent !important;
  border: 0 !important;
}

.ffw-panel-root .ld-tool strong,
.ffw-panel-root .ld-tool span,
.ffw-panel-root .ld-summary strong,
.ffw-panel-root .ld-summary span {
  color: var(--ui-text) !important;
  -webkit-text-fill-color: var(--ui-text) !important;
}

.ffw-panel-root .ld-tool small {
  color: var(--ui-muted) !important;
  display: block;
}

.ffw-panel-root .ld-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  display: grid;
}

.ffw-panel-root .ld-vehicle-exclude select {
  min-height: 94px;
  padding: 8px;
}

.ffw-panel-root .ld-summary {
  gap: 8px;
  display: grid;
}

.ffw-panel-root .ld-summary-row {
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ui-border);
  padding: 8px 0;
  display: flex;
}

.ffw-panel-root .ld-summary-row:last-child {
  border-bottom: 0;
}

.ffw-panel-root .ld-warning {
  border: 1px solid #e3bd77;
  border-radius: 10px;
  background: #fff7e8;
  color: #774d08 !important;
  padding: 10px 12px;
  font-size: .86rem;
}

.ffw-panel-root .ld-pump-list {
  gap: 8px;
  display: grid;
}

.ffw-panel-root .ld-pump-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ui-border);
  border-radius: 9px;
  padding: 8px 10px;
}

.ffw-panel-root .ld-pump-row button {
  min-height: 34px !important;
  padding: 6px 9px !important;
}

.ffw-panel-root .leaflet-popup-content input {
  width: 210px;
  margin: 5px 0 8px;
}

.ffw-panel-root .leaflet-popup-content button {
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  background: var(--ui-red);
  color: #fff;
  padding: 7px 10px;
  font-weight: 800;
}

.ffw-panel-root .ld-marker-label {
  border: 1px solid #aeb9c2;
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  color: #182631 !important;
  -webkit-text-fill-color: #182631 !important;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 3px 9px rgba(24, 38, 49, .18);
}

@media (width <= 980px) {
  .ffw-panel-root .ld-layout {
    grid-template-columns: 1fr;
  }

  .ffw-panel-root .ld-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 720px) {
  .ffw-panel-root #ld-map {
    min-height: 480px;
  }

  .ffw-panel-root .ld-sidebar,
  .ffw-panel-root .ld-settings {
    grid-template-columns: 1fr;
  }
}

body.ffw-ld-capturing .ffw-panel-root .hero-card,
body.ffw-ld-capturing .ffw-panel-root .top-nav,
body.ffw-ld-capturing .ffw-panel-root .ld-map-panel > .panel-header,
body.ffw-ld-capturing .ffw-panel-root .ld-toolbar,
body.ffw-ld-capturing .ffw-panel-root .ld-sidebar,
body.ffw-ld-capturing .ffw-panel-root .ld-map-hint {
  display: none !important;
}

body.ffw-ld-capturing .ffw-panel-root .shell,
body.ffw-ld-capturing .ffw-panel-root .single-view,
body.ffw-ld-capturing .ffw-panel-root .ld-print-area,
body.ffw-ld-capturing .ffw-panel-root .ld-map-panel,
body.ffw-ld-capturing .ffw-panel-root .ld-layout,
body.ffw-ld-capturing .ffw-panel-root .ld-layout > div {
  width: 1120px !important;
  max-width: 1120px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  display: block !important;
}

body.ffw-ld-capturing .ffw-panel-root #ld-map {
  width: 1120px !important;
  height: 720px !important;
  min-height: 720px !important;
}

.ffw-panel-root .ld-label-icon {
  width: auto !important;
  height: auto !important;
  background: transparent;
  border: 0;
}

.ffw-panel-root .ld-label-icon .ld-marker-label {
  display: block;
  width: max-content;
  max-width: 220px;
  padding: 5px 8px;
  color: #243746;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #b9c6d0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(20, 40, 59, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: move;
  user-select: none;
}

.ffw-panel-root .ld-road-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  color: #243746;
  font-size: 14px;
  font-weight: 700;
}

.ffw-panel-root .ld-road-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #c1121f;
}

.ffw-panel-root #ld-map.is-routing {
  cursor: progress;
}

.ffw-panel-root .ld-hose-map-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  color: #173044;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #b9c6d0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(20, 40, 59, 0.18);
  font-size: 11px;
  font-weight: 800;
}

.ffw-panel-root .ld-hose-map-legend span {
  width: 28px;
  height: 5px;
  background: #087cc1;
  border-radius: 3px;
}

.ffw-panel-root .ld-pump-inventory {
  margin: 12px 0 16px;
  padding-top: 10px;
  border-top: 1px solid #d7e0e7;
}

.ffw-panel-root .ld-available-pump-list {
  display: grid;
  gap: 8px;
}

.ffw-panel-root .ld-available-pump-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 118px 38px;
  gap: 7px;
  align-items: center;
}

.ffw-panel-root .ld-available-pump-row > input,
.ffw-panel-root .ld-available-pump-row label {
  min-width: 0;
  height: 40px;
  border: 1px solid #cbd6df;
  border-radius: 5px;
  background: #fff;
}

.ffw-panel-root .ld-available-pump-row > input {
  width: 100%;
  padding: 0 10px;
}

.ffw-panel-root .ld-available-pump-row label {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ffw-panel-root .ld-available-pump-row label input {
  width: 72px;
  min-width: 0;
  height: 100%;
  padding: 0 6px;
  border: 0;
  background: transparent;
}

.ffw-panel-root .ld-available-pump-row label span {
  color: #536577;
  font-size: 12px;
}

.ffw-panel-root .ld-available-pump-row > button {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
}

@media (width <= 720px) {
  .ffw-panel-root .ld-available-pump-row {
    grid-template-columns: 1fr 112px 38px;
  }
}
