.gps-log-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.gps-log-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}

.gps-log-toolbar label {
  display: grid;
  gap: 7px;
}

.gps-log-toolbar label > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gps-log-toolbar input {
  width: 100%;
}

.gps-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  background: #f5f8fc;
  border-bottom: 1px solid var(--line);
}

.gps-log-summary span {
  color: var(--muted);
  font-size: 13px;
}

.gps-log-list {
  padding: 18px 22px 24px;
}

.gps-log-head,
.gps-log-row {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1.35fr 1.25fr;
  gap: 16px;
  align-items: center;
}

.gps-log-row.geofence-outside {
  border-color: #e59b93;
  background: #fff5f3;
  box-shadow: inset 4px 0 0 #b43b31;
}

.gps-log-row.geofence-missing_site_gps {
  border-color: #e5bd78;
  background: #fffaf0;
  box-shadow: inset 4px 0 0 #b87916;
}

.geofence-badge {
  display: block;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #e6f5eb;
  color: #17633b;
  font-size: 12px;
  font-weight: 800;
}

.geofence-outside .geofence-badge {
  background: #f8d9d5;
  color: #8e261e;
}

.geofence-missing_site_gps .geofence-badge {
  background: #f9e8c8;
  color: #79500f;
}

.gps-log-head {
  padding: 0 14px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.gps-log-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 9px;
  background: #fff;
}

.gps-log-row > div {
  min-width: 0;
}

.gps-log-row strong,
.gps-log-row small {
  display: block;
}

.gps-log-row strong {
  overflow-wrap: anywhere;
}

.gps-log-row small {
  margin-top: 4px;
  color: var(--muted);
}

.gps-map-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  margin-top: 9px;
  padding: 7px 10px;
  border: 1px solid #b8cee7;
  border-radius: 8px;
  background: #edf5ff;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.gps-map-link:hover {
  background: #dfeeff;
}

@media (max-width: 820px) {
  .gps-log-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .gps-log-toolbar {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
  }

  .gps-log-toolbar label:first-child,
  .gps-log-toolbar button {
    grid-column: 1 / -1;
  }

  .gps-log-summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }

  .gps-log-list {
    padding: 14px;
  }

  .gps-log-head {
    display: none;
  }

  .gps-log-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }
}
