:root {
  --navy: #12324a;
  --teal: #0e8a7d;
  --amber: #f2a33c;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c2733;
  --muted: #5c6b7a;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 12px; }
.hero {
  background: linear-gradient(135deg, var(--navy), #1b4a6b);
  color: #fff; border-radius: 16px; padding: 20px 18px; margin-bottom: 12px;
}
.hero h1 { margin: 0 0 6px; font-size: 1.45rem; }
.hero p { margin: 0; color: #cfe0ee; font-size: 0.95rem; }
.card {
  background: var(--card); border-radius: 14px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(18,50,74,.08);
}
#map {
  width: 100%; height: 380px;
  border-radius: 12px; background: #dfe6ec; overflow: hidden;
}
.map-missing { padding: 30px 16px; text-align: center; color: var(--muted); }
.field { margin-bottom: 10px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.field input, .field select {
  width: 100%; padding: 11px 12px; border: 1.5px solid #c9d4de; border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); }
.row { display: flex; gap: 8px; }
.row .field { flex: 1; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 12px;
  padding: 13px; font-size: 1.05rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-align: center; text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:disabled { background: #9fb8b3; }
.btn-ghost {
  background: #eef4f6; color: var(--navy); width: auto; display: inline-block;
  padding: 9px 14px; font-size: .9rem; font-weight: 600;
}
.btn-wa { background: #25d366; color: #fff; margin-top: 8px; }
.btn-outline {
  background: #fff; color: var(--navy); border: 1.5px solid var(--navy); margin-top: 8px;
}
.result-grid { display: flex; text-align: center; gap: 8px; }
.result-cell { flex: 1; background: #f0f6f8; border-radius: 10px; padding: 10px 4px; }
.result-cell .v { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.result-cell .k { font-size: .8rem; color: var(--muted); }
.fare-cell { background: #fdf3e2; }
.fare-cell .v { color: #a05e10; }
.note {
  background: #fdf3e2; border-right: 4px solid var(--amber);
  border-radius: 8px; padding: 10px 12px; font-size: .88rem; color: #7a5314; margin-top: 10px;
}
.errors { color: var(--danger); font-size: .9rem; margin-bottom: 8px; }
#route-error {
  color: var(--danger); background: #fdecea; border-radius: 8px;
  padding: 8px 12px; font-size: .9rem; margin-top: 8px;
}
.hidden { display: none !important; }
.success-title { color: var(--teal); font-weight: 800; font-size: 1.15rem; margin: 0 0 6px; }
.small { font-size: .85rem; color: var(--muted); }
.swap-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }

/* Leaflet + markers + suggestions */
#map { position: relative; z-index: 0; }
.leaflet-container { font-family: inherit; }
.mk-wrap { background: none; border: none; }
.mk {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.05rem;
  border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.mk-pickup { background: var(--teal); }
.mk-destination { background: var(--amber); color: #4a3200; }
.suggest-wrap { position: relative; }
.suggest {
  position: absolute; top: 100%; right: 0; left: 0; z-index: 1000;
  background: #fff; border: 1.5px solid #c9d4de; border-radius: 10px;
  margin: 4px 0 0; padding: 0; list-style: none;
  max-height: 220px; overflow-y: auto; box-shadow: 0 6px 18px rgba(18,50,74,.18);
}
.suggest li {
  padding: 10px 12px; font-size: .9rem; cursor: pointer;
  border-bottom: 1px solid #eef2f5; line-height: 1.5;
}
.suggest li:last-child { border-bottom: 0; }
.suggest li:hover { background: #f0f6f8; }
