* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: #e2e8f0;
  padding: 0.75rem 0.85rem 1.25rem;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.sub {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0 0 1.75rem;
  line-height: 1.45;
}

.sub code {
  font-size: 0.85em;
  color: #cbd5e1;
}

.field {
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 1;
}

.field.field--open {
  z-index: 1000;
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.3rem;
}

input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  outline: none;
}

input[type="text"]:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.input-wrap {
  position: relative;
}

.input-wrap input[type="text"] {
  padding-right: 2.75rem;
}

.add-stop-inline {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.add-stop-inline:hover:not(:disabled) {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

.add-stop-inline:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.suggestions {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
  background: #1e293b;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1001;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.suggestions.open {
  display: block;
}

.suggestions li {
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  cursor: pointer;
  border-bottom: 1px solid #334155;
  line-height: 1.35;
}

.suggestions li:last-child {
  border-bottom: none;
}

.suggestions li:hover,
.suggestions li.active {
  background: #334155;
}

.coords {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}

.coords.empty {
  color: #64748b;
}

.coords.error {
  color: #fca5a5;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  border: 1px solid #334155;
}

.toolbar label.inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  color: #cbd5e1;
}

select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  outline: none;
}

select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.vehicle-field {
  margin-bottom: 0.75rem;
}

.panel {
  margin-top: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
}

.panel h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin: 0 0 0.75rem;
}

.copy-panel {
  margin-top: 0.5rem;
}

.copy-box {
  position: relative;
  padding: 0.65rem 2.5rem 0.65rem 0.75rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
}

.copy-btn-corner {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.copy-btn-corner:hover,
.copy-btn-corner:focus {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  outline: none;
}

.copy-btn-corner:active {
  transform: scale(0.96);
}

.copy-btn-corner.copied {
  color: #86efac;
}

.copy-message {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-feedback {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: #86efac;
  text-align: right;
}

.map-section {
  padding: 0;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.map-tip {
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
  border-bottom: 1px solid #334155;
}

.stops-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stop-field .stop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.stop-field .stop-header label {
  margin-bottom: 0;
}

.remove-stop {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
  border-radius: 6px;
}

.remove-stop:hover {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.35);
}

#map {
  height: 200px;
  width: 100%;
  background: #0f172a;
}

.leaflet-container {
  font-family: inherit;
}

.map-pin {
  background: transparent;
  border: none;
}

.map-pin span {
  display: block;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.map-pin.pickup span {
  background: #22c55e;
}

.map-pin.stop span {
  background: #f59e0b;
}

.map-pin.drop span {
  background: #ef4444;
}
