html,
body {
  min-height: 100%;
}

html {
  font-size: 16px;
}

:root {
  --tracking-modal-gap-x: clamp(4px, 0.75vw, 10px);
  --tracking-modal-gap-y: clamp(4px, 0.75vh, 10px);
  --tracking-modal-min-width: 720px;
  --tracking-modal-min-height: 560px;
  --tracking-modal-max-width: 1680px;
}

body {
  background: #dedede;
  border-top: 5px solid #202020;
  color: #171717;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

body.has-tracking-modal {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.logout-form {
  margin: 0;
}

.logout-form .menu-button {
  width: 100%;
}

.telemetry-shell {
  display: grid;
  grid-template-columns: 376px minmax(0, 1fr);
  min-height: calc(100vh - 5px);
}

.side-menu {
  background: linear-gradient(#35c8c9 0 38px, #e7f4f4 38px 100%);
  color: #ffffff;
  padding: 10px 19px;
}

.brand-link {
  align-items: center;
  color: #014fbb;
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 48px;
  text-decoration: underline;
}

.brand-link img {
  height: 18px;
  width: 18px;
}

.side-menu h2 {
  font-size: 25px;
  font-weight: 700;
  margin: 0 0 22px;
  text-align: center;
}

.imei-filter,
.take-filter {
  align-items: center;
  color: #ffffff;
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.imei-filter input,
.take-filter select {
  border: 1px solid #7c8c8c;
  border-radius: 0;
  height: 22px;
}

.imei-filter input {
  flex: 1;
  min-width: 0;
  padding: 1px 5px;
}

.take-filter select {
  width: 92px;
}

.menu-actions {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.menu-button {
  background: #afdfe0;
  border: 0;
  border-radius: 5px;
  color: #ffffff;
  cursor: pointer;
  display: block;
  min-height: 40px;
  padding: 8px 11px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.menu-button:hover,
.menu-button:focus,
.menu-button.is-active {
  background: #8ecfd0;
  color: #ffffff;
  outline: none;
}

.content-area {
  min-width: 0;
  padding: 34px 13px 18px 19px;
}

.page-instruction {
  font-size: 19px;
  margin: 0 0 16px;
}

.content-panel {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgb(0 0 0 / 22%);
  min-height: 320px;
  padding: 34px 15px 15px;
}

.telemetry-shell.is-map-view .content-area {
  padding: 0;
}

.telemetry-shell.is-map-view .page-instruction {
  display: none;
}

.telemetry-shell.is-map-view .content-panel {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  min-height: calc(100vh - 5px);
  padding: 0;
  position: relative;
}

.telemetry-shell.is-map-view .panel-heading {
  color: #111111;
  left: 64px;
  margin-bottom: 0;
  pointer-events: none;
  position: absolute;
  right: 16px;
  text-shadow: 0 1px 2px rgb(255 255 255 / 95%),
    0 -1px 2px rgb(255 255 255 / 95%);
  top: 14px;
  z-index: 1000;
}

.telemetry-shell.is-map-view .status-message {
  color: #202020;
}

.panel-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading h1 {
  font-size: 25px;
  font-weight: 700;
  margin: 0;
}

.status-message {
  color: #4b4b4b;
  font-size: 14px;
  margin: 0;
}

.status-message.is-error {
  color: #b00020;
  font-weight: 700;
}

.telemetry-shell.is-map-view .status-message.is-error {
  color: #b00020;
}

.view-pane {
  min-width: 0;
}

.telemetry-shell.is-map-view .view-pane {
  height: 100%;
}

.fleet-map {
  height: min(66vh, 600px);
  min-height: 430px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.telemetry-shell.is-map-view .fleet-map {
  height: calc(100vh - 5px);
  min-height: 0;
}

.fleet-map.leaflet-container,
.tracking-map.leaflet-container {
  background: #d7d7d7;
  font-family: Arial, Helvetica, sans-serif;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.fleet-map .leaflet-pane,
.fleet-map .leaflet-tile,
.fleet-map .leaflet-marker-icon,
.fleet-map .leaflet-marker-shadow,
.fleet-map .leaflet-tile-container,
.fleet-map .leaflet-pane > svg,
.fleet-map .leaflet-pane > canvas,
.fleet-map .leaflet-zoom-box,
.fleet-map .leaflet-image-layer,
.fleet-map .leaflet-layer,
.tracking-map .leaflet-pane,
.tracking-map .leaflet-tile,
.tracking-map .leaflet-marker-icon,
.tracking-map .leaflet-marker-shadow,
.tracking-map .leaflet-tile-container,
.tracking-map .leaflet-pane > svg,
.tracking-map .leaflet-pane > canvas,
.tracking-map .leaflet-zoom-box,
.tracking-map .leaflet-image-layer,
.tracking-map .leaflet-layer {
  left: 0;
  position: absolute;
  top: 0;
}

.fleet-map .leaflet-pane,
.tracking-map .leaflet-pane {
  z-index: 400;
}

.fleet-map .leaflet-tile-pane,
.tracking-map .leaflet-tile-pane {
  z-index: 200;
}

.fleet-map .leaflet-overlay-pane,
.tracking-map .leaflet-overlay-pane {
  z-index: 400;
}

.fleet-map .leaflet-shadow-pane,
.tracking-map .leaflet-shadow-pane {
  z-index: 500;
}

.fleet-map .leaflet-marker-pane,
.tracking-map .leaflet-marker-pane {
  z-index: 600;
}

.fleet-map .leaflet-tooltip-pane,
.tracking-map .leaflet-tooltip-pane {
  z-index: 650;
}

.fleet-map .leaflet-popup-pane,
.tracking-map .leaflet-popup-pane {
  z-index: 700;
}

.fleet-map .leaflet-control-container,
.tracking-map .leaflet-control-container {
  position: relative;
  z-index: 800;
}

.fleet-map .leaflet-tile,
.fleet-map .leaflet-marker-icon,
.fleet-map .leaflet-marker-shadow,
.tracking-map .leaflet-tile,
.tracking-map .leaflet-marker-icon,
.tracking-map .leaflet-marker-shadow {
  border: 0;
  height: auto;
  max-height: none !important;
  max-width: none !important;
  width: auto;
}

.fleet-map .leaflet-tile,
.tracking-map .leaflet-tile {
  filter: inherit;
  visibility: inherit;
}

.fleet-map .leaflet-marker-icon,
.fleet-map .leaflet-marker-shadow,
.tracking-map .leaflet-marker-icon,
.tracking-map .leaflet-marker-shadow {
  display: block;
}

.fleet-map .fleet-cluster-marker {
  align-items: center;
  background: #f37720;
  border: 2px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 35%);
  color: #ffffff;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  height: 42px !important;
  justify-content: center;
  line-height: 1;
  width: 42px !important;
}

.fleet-map .fleet-cluster-marker span {
  pointer-events: none;
}

.fleet-map .leaflet-control-container .leaflet-top,
.fleet-map .leaflet-control-container .leaflet-bottom {
  position: absolute;
  z-index: 1000;
}

.fleet-map .leaflet-control-container .leaflet-top {
  top: 0;
}

.fleet-map .leaflet-control-container .leaflet-bottom {
  bottom: 0;
}

.fleet-map .leaflet-control-container .leaflet-left {
  left: 0;
}

.fleet-map .leaflet-control-container .leaflet-right {
  right: 0;
}

.fleet-map .leaflet-control {
  clear: both;
  float: left;
}

.fleet-map .leaflet-right .leaflet-control {
  float: right;
}

.fleet-map .leaflet-top .leaflet-control {
  margin-top: 10px;
}

.fleet-map .leaflet-bottom .leaflet-control {
  margin-bottom: 10px;
}

.fleet-map .leaflet-left .leaflet-control {
  margin-left: 10px;
}

.fleet-map .leaflet-right .leaflet-control {
  margin-right: 10px;
}

.table-toolbar {
  color: #4b4b4b;
  font-size: 14px;
  margin-bottom: 8px;
}

.table-wrap {
  max-height: 63vh;
  overflow: auto;
}

.telemetry-table {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 1320px;
  width: 100%;
}

.telemetry-table th,
.telemetry-table td {
  border: 1px solid #cfd6d6;
  padding: 7px 9px;
  text-align: left;
  white-space: nowrap;
}

.telemetry-table td[data-field="deviceStatus"] {
  max-width: 520px;
  min-width: 360px;
  white-space: normal;
}

.telemetry-table th {
  background: #35c8c9;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.telemetry-table tbody tr:nth-child(even) {
  background: #f4f8f8;
}

@media (max-width: 900px) {
  .telemetry-shell {
    grid-template-columns: 1fr;
  }

  .side-menu {
    background: #35c8c9;
  }

  .brand-link {
    margin-bottom: 24px;
  }

  .content-area {
    padding: 18px 12px;
  }

  .fleet-map {
    height: 62vh;
    min-height: 320px;
  }
}

:root {
  --accent: #ff6421;
  --accent-deep: #d94b12;
  --panel-dark: rgb(16 15 14 / 92%);
  --soil: #33231f;
  --line: rgb(255 255 255 / 34%);
  --text-soft: #f3eee9;
}

body {
  background:
    radial-gradient(circle at 24% 18%, rgb(255 255 255 / 8%) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 40%, rgb(0 0 0 / 24%) 0 2px, transparent 5px),
    linear-gradient(145deg, #432b23 0%, #2a1d1a 46%, #3a2922 100%);
  border-top: 0;
  color: var(--text-soft);
  font-family: "Trebuchet MS", "Gill Sans MT", "Segoe UI", sans-serif;
}

.telemetry-shell {
  background:
    linear-gradient(90deg, rgb(0 0 0 / 20%) 0 199px, rgb(255 255 255 / 24%) 199px 201px, transparent 201px),
    radial-gradient(circle at 12% 22%, rgb(255 255 255 / 9%) 0 1px, transparent 2px),
    radial-gradient(circle at 7% 74%, rgb(0 0 0 / 26%) 0 2px, transparent 6px),
    linear-gradient(138deg, #3e2a23 0%, #251a17 49%, #3a2a22 100%);
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
}

.side-menu {
  background:
    radial-gradient(circle at 26% 14%, rgb(255 255 255 / 10%) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 68%, rgb(0 0 0 / 26%) 0 2px, transparent 6px),
    linear-gradient(155deg, #432b23 0%, #2a1d1a 100%);
  color: #ffffff;
  padding: 0 13px 18px;
}

.brand-link {
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 24%);
  display: flex;
  min-height: 64px;
  margin: 0 auto 95px;
  padding: 8px 12px;
  width: 146px;
}

.brand-link img {
  display: block;
  height: auto;
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.side-menu h2 {
  color: #ffffff;
  font-size: 23px;
  letter-spacing: 0.01em;
  margin: 0 0 17px;
  text-shadow: 0 1px 2px rgb(0 0 0 / 60%);
}

.imei-filter,
.take-filter {
  color: #ffffff;
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.imei-filter span,
.take-filter span {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.imei-filter input,
.take-filter select {
  background: var(--accent);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 7px;
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 20%);
  color: #ffffff;
  height: 29px;
}

.imei-filter input {
  flex: 0 0 168px;
  font-size: 16px;
  min-width: 0;
  padding: 3px 9px;
}

.imei-filter input::placeholder {
  color: rgb(255 255 255 / 82%);
}

.take-filter select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #ffffff 50%) calc(100% - 17px) 11px / 9px 9px no-repeat,
    linear-gradient(135deg, #ffffff 50%, transparent 50%) calc(100% - 8px) 11px / 9px 9px no-repeat,
    var(--accent);
  cursor: pointer;
  font-size: 18px;
  padding: 2px 34px 2px 9px;
  width: 91px;
}

.menu-actions {
  gap: 12px;
  margin-top: 17px;
}

.menu-button {
  background: rgb(15 12 11 / 72%);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: #f7f2ef;
  font-size: 17px;
  min-height: 27px;
  padding: 1px 9px 2px;
  text-align: center;
  text-shadow: 0 1px 2px rgb(0 0 0 / 60%);
}

.menu-button:hover,
.menu-button:focus,
.menu-button.is-active {
  background: rgb(255 100 33 / 24%);
  border-color: rgb(255 255 255 / 56%);
  color: #ffffff;
}

.content-area {
  min-width: 0;
  padding: 24px 18px 18px;
}

.page-instruction {
  color: var(--text-soft);
}

.content-panel {
  background: rgb(255 255 255 / 94%);
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 2px;
  box-shadow: 0 14px 28px rgb(0 0 0 / 32%);
  color: #211915;
}

.content-panel .panel-heading h1 {
  color: #33231f;
}

.content-panel .status-message {
  color: #2d2622;
}

.telemetry-shell.is-map-view .content-area {
  padding: 10px 12px 12px 18px;
}

.telemetry-shell.is-map-view .content-panel {
  background: var(--panel-dark);
  border: 2px solid rgb(255 255 255 / 28%);
  border-radius: 2px;
  box-shadow: 0 14px 30px rgb(0 0 0 / 40%);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 22px);
  min-height: 360px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.telemetry-shell.is-map-view .panel-heading {
  align-items: center;
  background: rgb(17 16 15 / 90%);
  color: #ffffff;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  left: auto;
  min-height: 64px;
  padding: 10px 14px 9px;
  pointer-events: auto;
  position: static;
  right: auto;
  text-align: center;
  text-shadow: none;
  top: auto;
  z-index: 2;
}

.telemetry-shell.is-map-view .panel-heading h1 {
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.telemetry-shell.is-map-view .status-message {
  color: #eee8e2;
  font-size: 17px;
  line-height: 1.25;
}

.telemetry-shell.is-map-view .status-message.is-error {
  color: #ffb39b;
}

.view-pane {
  position: relative;
}

.telemetry-shell.is-map-view .view-pane {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.telemetry-shell.is-map-view .fleet-map {
  height: 100%;
  min-height: 0;
}

.fleet-map.leaflet-container {
  background: #1b211e;
  font-family: "Trebuchet MS", "Gill Sans MT", "Segoe UI", sans-serif;
}

.map-overlay-controls {
  display: grid;
  gap: 8px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1000;
}

.map-style-switch,
.map-status-filters {
  align-items: center;
  background: rgb(17 16 15 / 84%);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 28%);
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 9px;
  padding: 7px 11px;
}

.map-style-switch {
  justify-content: flex-end;
}

.map-style-button {
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  min-width: 78px;
  padding: 6px 10px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.map-style-button:hover,
.map-style-button:focus {
  background: rgb(255 255 255 / 18%);
  border-color: rgb(255 255 255 / 38%);
  outline: none;
}

.map-style-button.is-active {
  background: var(--accent);
  border-color: rgb(255 255 255 / 42%);
  color: #ffffff;
}

.map-status-filters label {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  margin: 0;
}

.map-status-filters input {
  accent-color: var(--accent);
  height: 14px;
  width: 14px;
}

.fleet-map .fleet-location-marker.is-active {
  filter: drop-shadow(0 0 7px rgb(255 100 33 / 85%));
}

.fleet-map .fleet-location-marker.is-inactive {
  filter: grayscale(1) saturate(0.2) brightness(0.72);
  opacity: 0.68;
}

.fleet-map .fleet-cluster-marker {
  border-radius: 50%;
  font-size: 12px;
  height: 30px !important;
  width: 30px !important;
}

.fleet-map .fleet-cluster-marker.is-active {
  background: var(--accent);
}

.fleet-map .fleet-cluster-marker.is-inactive {
  background: #707070;
}

.fleet-map .fleet-cluster-marker.is-mixed {
  background: linear-gradient(135deg, var(--accent) 0 52%, #707070 52% 100%);
}

.fleet-map .leaflet-control-attribution {
  background: rgb(17 16 15 / 64%);
  color: #ffffff;
}

.fleet-map .leaflet-control-attribution a {
  color: #ffd6c5;
}

.fleet-map .leaflet-control-zoom {
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgb(0 0 0 / 24%);
  display: flex;
  flex-direction: column;
  margin-left: 14px !important;
  margin-top: 14px !important;
  overflow: hidden;
  width: 30px;
}

.fleet-map .leaflet-control-zoom a {
  align-items: center;
  background: #ffffff;
  box-sizing: border-box;
  border: 0;
  color: #7f8d96;
  display: flex !important;
  font-size: 23px;
  font-weight: 700;
  height: 32px !important;
  justify-content: center;
  line-height: 1 !important;
  margin: 0;
  padding: 0;
  position: relative;
  text-align: center;
  text-shadow: none;
  text-decoration: none;
  width: 30px !important;
}

.fleet-map .leaflet-control-zoom a:first-child {
  border-bottom: 1px solid #e3ebef;
}

.fleet-map .leaflet-control-zoom a:hover,
.fleet-map .leaflet-control-zoom a:focus {
  background: #f4fbfd;
  color: #4f626d;
}

.fleet-map .leaflet-popup-content-wrapper {
  background: rgb(255 252 247 / 97%);
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 45%);
  color: #1f1712;
}

.fleet-map .leaflet-popup-tip {
  background: var(--accent);
  box-shadow: 0 4px 10px rgb(0 0 0 / 32%);
}

.fleet-map .leaflet-popup-content {
  margin: 9px 11px;
  min-width: 230px;
}

.fleet-popup {
  display: grid;
  gap: 7px;
  line-height: 1.2;
}

.fleet-popup-row {
  display: grid;
  gap: 2px;
}

.fleet-popup-row span {
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fleet-popup-row strong {
  color: #1f1712;
  font-size: 14px;
  font-weight: 800;
}

.fleet-popup-status {
  border-radius: 999px;
  display: inline-block;
  justify-self: start;
  padding: 3px 8px;
}

.fleet-popup-status.is-active {
  background: #dff7e8;
  color: #0b6a31;
}

.fleet-popup-status.is-inactive {
  background: #ececec;
  color: #595959;
}

.fleet-popup-action {
  background: linear-gradient(180deg, #ff7f42 0%, var(--accent) 100%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
  min-height: 34px;
  padding: 8px 12px;
  width: 100%;
}

.fleet-popup-action:hover,
.fleet-popup-action:focus {
  background: linear-gradient(180deg, #ff935e 0%, #ff6f31 100%);
  outline: none;
}

.login-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 28px 16px;
}

.login-card {
  background: rgb(19 16 15 / 92%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgb(0 0 0 / 36%);
  margin: 0 auto;
  max-width: 430px;
  overflow: hidden;
  padding: 0 0 28px;
  width: min(100%, 430px);
}

.login-brand {
  background: #ffffff;
  display: flex;
  justify-content: center;
  margin: 0 auto 26px;
  padding: 18px 22px 14px;
  width: 100%;
}

.login-brand img {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  width: min(100%, 300px);
}

.login-header {
  color: #f7f2ef;
  padding: 0 28px;
  text-align: center;
}

.login-header h1 {
  color: var(--accent);
  font-size: 29px;
  font-weight: 800;
  margin: 0 0 10px;
}

.login-header p {
  color: rgb(255 255 255 / 78%);
  font-size: 15px;
  margin: 0;
}

.login-form {
  display: grid;
  gap: 16px;
  padding: 26px 28px 0;
}

.login-validation {
  background: rgb(176 0 32 / 18%);
  border: 1px solid rgb(255 137 162 / 24%);
  border-radius: 12px;
  color: #ffd5df;
  font-size: 14px;
  margin: 0;
  padding: 10px 12px;
}

.login-validation:empty {
  display: none;
}

.login-validation ul {
  margin: 0;
  padding-left: 18px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field > span:first-child {
  color: #f7f2ef;
  font-size: 14px;
  font-weight: 700;
}

.login-field input {
  background: rgb(255 255 255 / 96%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 12px;
  color: #211915;
  min-height: 44px;
  padding: 10px 12px;
}

.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(255 100 33 / 16%);
  outline: none;
}

.field-validation {
  color: #ffc3d0;
  font-size: 13px;
  min-height: 18px;
}

.login-submit {
  background: linear-gradient(180deg, #ff7f42 0%, var(--accent) 100%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  min-height: 46px;
  padding: 10px 16px;
}

.login-submit:hover,
.login-submit:focus {
  background: linear-gradient(180deg, #ff935e 0%, #ff6f31 100%);
  outline: none;
}

.table-toolbar {
  color: #211915;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.machine-toolbar-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.machine-info-chip {
  background: #fff3ea;
  border: 1px solid rgb(217 75 18 / 24%);
  border-radius: 6px;
  color: #211915;
  display: grid;
  gap: 2px;
  min-height: 34px;
  min-width: 132px;
  padding: 6px 10px;
}

.machine-info-chip span {
  font-size: 12px;
  font-weight: 700;
}

.machine-info-chip strong {
  font-size: 14px;
  line-height: 1.1;
}

.machine-filter {
  color: #211915;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
}

.machine-filter select,
.machine-filter input {
  background: #fffaf6;
  border: 1px solid rgb(51 35 31 / 28%);
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 10%);
  color: #211915;
  font-size: 14px;
  height: 34px;
  padding: 6px 10px;
}

.machine-filter select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #d94b12 50%) calc(100% - 16px) 13px / 8px 8px no-repeat,
    linear-gradient(135deg, #d94b12 50%, transparent 50%) calc(100% - 8px) 13px / 8px 8px no-repeat,
    #fffaf6;
  cursor: pointer;
  min-width: 96px;
  padding-right: 30px;
}

.machine-filter input {
  min-width: 158px;
}

.machine-action-button {
  align-self: end;
  background: var(--accent-deep);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  height: 34px;
  padding: 6px 14px;
}

.machine-action-button:hover,
.machine-action-button:focus {
  background: var(--accent);
  outline: none;
}

.machine-toolbar-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.machine-pagination {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.machine-pagination-button {
  background: #fffaf6;
  border: 1px solid rgb(51 35 31 / 24%);
  border-radius: 6px;
  color: #211915;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  height: 32px;
  padding: 6px 12px;
}

.machine-pagination-button:hover,
.machine-pagination-button:focus {
  background: #fff3ea;
  border-color: rgb(217 75 18 / 36%);
  outline: none;
}

.machine-pagination-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.tracking-modal {
  align-items: center;
  background: rgb(10 16 21 / 66%);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding:
    var(--tracking-modal-gap-y)
    var(--tracking-modal-gap-x)
    var(--tracking-modal-gap-y);
  position: fixed;
  z-index: 2200;
}

.tracking-modal[hidden] {
  display: none;
}

.tracking-modal-dialog {
  background: #fffaf6;
  border: 1px solid rgb(51 35 31 / 14%);
  border-radius: 18px;
  box-sizing: border-box;
  box-shadow: 0 24px 52px rgb(0 0 0 / 30%);
  color: #211915;
  display: grid;
  gap: clamp(6px, 0.9vh, 10px);
  grid-template-rows: auto auto minmax(320px, 1fr);
  height: max(var(--tracking-modal-min-height), calc(100vh - (var(--tracking-modal-gap-y) * 2)));
  height: max(var(--tracking-modal-min-height), calc(100dvh - (var(--tracking-modal-gap-y) * 2)));
  margin: 0;
  min-height: var(--tracking-modal-min-height);
  overflow: hidden;
  padding: clamp(8px, 1vw, 12px);
  width: clamp(
    var(--tracking-modal-min-width),
    calc(100vw - (var(--tracking-modal-gap-x) * 2)),
    var(--tracking-modal-max-width)
  );
  width: clamp(
    var(--tracking-modal-min-width),
    calc(100dvw - (var(--tracking-modal-gap-x) * 2)),
    var(--tracking-modal-max-width)
  );
  min-width: var(--tracking-modal-min-width);
}

.tracking-modal-header {
  align-items: center;
  background: linear-gradient(180deg, rgb(255 255 255 / 88%) 0%, rgb(255 244 236 / 96%) 100%);
  border: 1px solid rgb(217 75 18 / 10%);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 78%);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 62px;
  padding: clamp(9px, 1.1vh, 12px) clamp(12px, 1.4vw, 16px);
}

.tracking-modal-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tracking-modal-heading h2 {
  color: #211915;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-modal-subtitle {
  color: #5d514b;
  font-size: 13px;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-close-button {
  align-self: start;
  background: #fff7f1;
  border: 1px solid rgb(217 75 18 / 20%);
  border-radius: 999px;
  color: var(--accent-deep);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 16px;
  white-space: nowrap;
}

.tracking-close-button:hover,
.tracking-close-button:focus {
  background: #ffe7d8;
  outline: none;
}

.tracking-toolbar {
  display: grid;
  align-self: stretch;
  gap: 6px;
  min-width: 0;
}

.tracking-control-strip {
  align-items: stretch;
  display: grid;
  gap: clamp(6px, 0.8vw, 10px);
  grid-template-columns: minmax(430px, 0.78fr) minmax(360px, 1.22fr);
  min-height: 0;
}

.tracking-toolbar-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tracking-toolbar-controls .machine-filter {
  flex: 1 1 190px;
  min-width: 0;
}

.tracking-toolbar-controls .machine-filter input {
  min-width: 0;
  width: 100%;
}

.tracking-toolbar-controls .machine-action-button {
  flex: 0 0 auto;
  min-width: 126px;
}

.tracking-toolbar .status-message {
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
  min-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-progress-panel {
  background: #ffffff;
  border: 1px solid rgb(51 35 31 / 10%);
  border-radius: 12px;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 9px 12px;
}

.tracking-progress-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.tracking-progress-header span {
  color: #5d514b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tracking-progress-header strong {
  color: #211915;
  font-size: 15px;
  font-weight: 800;
}

.tracking-range-slider {
  height: 22px;
  position: relative;
}

.tracking-range-track,
.tracking-range-fill {
  border-radius: 999px;
  height: 6px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.tracking-range-track {
  background: #d7dce0;
  right: 0;
}

.tracking-range-fill {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.tracking-progress-input {
  appearance: none;
  background: transparent;
  inset: 0;
  margin: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.tracking-progress-input::-webkit-slider-runnable-track {
  appearance: none;
  background: transparent;
  height: 22px;
}

.tracking-progress-input::-webkit-slider-thumb {
  appearance: none;
  background: var(--accent-deep);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgb(0 0 0 / 28%);
  cursor: pointer;
  height: 17px;
  margin-top: 2px;
  pointer-events: auto;
  position: relative;
  width: 17px;
}

.tracking-progress-input::-moz-range-track {
  background: transparent;
  border: 0;
  height: 22px;
}

.tracking-progress-input::-moz-range-thumb {
  background: var(--accent-deep);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgb(0 0 0 / 28%);
  cursor: pointer;
  height: 17px;
  pointer-events: auto;
  width: 17px;
}

.tracking-progress-input:focus {
  outline: none;
}

.tracking-progress-input.is-start {
  z-index: 2;
}

.tracking-progress-input.is-end {
  z-index: 3;
}

.tracking-summary {
  color: #5d514b;
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-map {
  background: #d7d7d7;
  border-radius: 14px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.tracking-map.leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}

.telemetry-table th {
  background: var(--accent-deep);
}

.telemetry-table td {
  color: #211915;
}

.telemetry-table tbody tr {
  background: #fffaf6;
}

.telemetry-table tbody tr:nth-child(even) {
  background: #f2f6f6;
}

@media (max-width: 900px) {
  .telemetry-shell {
    background:
      radial-gradient(circle at 24% 18%, rgb(255 255 255 / 8%) 0 1px, transparent 2px),
      linear-gradient(145deg, #432b23 0%, #2a1d1a 100%);
    grid-template-columns: 1fr;
  }

  .side-menu {
    padding: 0 14px 16px;
  }

  .brand-link {
    margin-bottom: 28px;
  }

  .telemetry-shell.is-map-view .content-area {
    padding: 10px;
  }

  .telemetry-shell.is-map-view .content-panel {
    height: 68vh;
    min-height: 420px;
  }

  .telemetry-shell.is-map-view .status-message {
    font-size: 14px;
  }

  .map-status-filters {
    border-radius: 12px;
  }

  .map-overlay-controls {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .map-style-switch,
  .map-status-filters {
    border-radius: 12px;
    justify-content: flex-start;
  }

  .map-style-button {
    min-width: 0;
  }

  .machine-toolbar-controls {
    align-items: stretch;
  }

  .machine-info-chip,
  .machine-filter,
  .machine-action-button {
    width: 100%;
  }

  .machine-filter input,
  .machine-filter select,
  .machine-action-button {
    min-width: 0;
    width: 100%;
  }

  .machine-toolbar-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .machine-pagination {
    justify-content: flex-start;
  }

  .tracking-modal {
    --tracking-modal-gap-x: 4px;
    --tracking-modal-gap-y: 4px;
    --tracking-modal-min-width: 340px;
    --tracking-modal-min-height: 520px;
  }

  .tracking-modal-dialog {
    border-radius: 14px;
    gap: 7px;
    grid-template-rows: auto auto minmax(280px, 1fr);
    min-width: 0;
    padding: 8px;
  }

  .tracking-modal-header {
    align-items: center;
    border-radius: 12px;
    flex-direction: row;
    min-height: 52px;
    padding: 8px 10px;
  }

  .tracking-modal-heading h2 {
    font-size: 19px;
  }

  .tracking-modal-subtitle {
    font-size: 12px;
  }

  .tracking-control-strip {
    gap: 7px;
    grid-template-columns: 1fr;
  }

  .tracking-close-button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 12px;
    width: auto;
  }

  .tracking-toolbar-controls .machine-filter,
  .tracking-toolbar-controls .machine-action-button {
    width: 100%;
  }

  .tracking-toolbar-controls {
    align-items: stretch;
    gap: 7px;
  }

  .tracking-progress-panel {
    padding: 8px 10px;
  }

  .tracking-map {
    height: 100%;
    min-height: 280px;
  }
}

@media (max-width: 1180px) {
  .tracking-control-strip {
    grid-template-columns: 1fr;
  }

  .tracking-toolbar-controls .machine-filter,
  .tracking-toolbar-controls .machine-action-button {
    flex: 1 1 180px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .tracking-modal-dialog {
    grid-template-rows: auto auto minmax(300px, 1fr);
  }

  .tracking-modal-header {
    min-height: 52px;
    padding: 8px 12px;
  }

  .tracking-modal-heading h2 {
    font-size: 20px;
  }

  .tracking-modal-subtitle,
  .tracking-toolbar .status-message,
  .tracking-summary {
    font-size: 12px;
  }

  .tracking-progress-panel {
    gap: 5px;
    padding: 7px 10px;
  }

  .tracking-range-slider {
    height: 18px;
  }
}

@media (min-width: 1181px) and (max-height: 700px) {
  .tracking-control-strip {
    grid-template-columns: minmax(400px, 0.9fr) minmax(340px, 1.1fr);
  }
}
