:root {
  --green: #0b8a4a;
  --green-dark: #076b39;
  --lime: #c6f432;
  --red: #c62828;
  --ink: #15201a;
  --muted: #6b766f;
  --line: #e4e8e5;
  --bg: #f5f7f6;
  --radius: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--ink); background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .88em; }

#map { position: fixed; inset: 0; z-index: 0; background: #dfe7e2; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 20px; cursor: pointer;
}
.brand-mini { margin-left: auto; background: var(--green); color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 22px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.mode-switch { display: flex; background: #fff; border-radius: 24px; padding: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.mode-switch button { border: 0; background: none; padding: 8px 14px; border-radius: 20px; font-weight: 600; cursor: pointer; color: var(--muted); }
.mode-switch button.active { background: var(--ink); color: #fff; }

.pin-center { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -100%); z-index: 400; font-size: 38px; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  max-height: 72vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.14);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
@media (min-width: 760px) {
  .sheet { left: 16px; right: auto; top: 76px; bottom: auto; width: 400px; max-height: calc(100vh - 92px); border-radius: var(--radius); }
  .sheet::before { display: none; }
}
.sheet h2 { margin: 4px 0 12px; font-size: 1.3rem; }
.sheet h3 { margin: 16px 0 8px; font-size: 1rem; }

.services { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -4px 10px; scrollbar-width: none; }
.service {
  flex: 0 0 auto; min-width: 84px; padding: 10px 8px; border-radius: 14px; border: 2px solid var(--line);
  background: #fff; text-align: center; cursor: pointer;
}
.service .ico { font-size: 26px; display: block; }
.service small { display: block; font-weight: 600; font-size: .78rem; margin-top: 2px; }
.service.active { border-color: var(--green); background: #eef9f2; }

.field { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 12px; margin-bottom: 8px; background: #fff; }
.field .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.field .dot.a { background: var(--green); }
.field .dot.b { background: var(--red); }
.field input, .field select, .field textarea { flex: 1; border: 0; outline: 0; padding: 10px 0; min-width: 0; background: transparent; }
.field .pick { border: 0; background: var(--bg); border-radius: 10px; padding: 8px 10px; cursor: pointer; white-space: nowrap; font-size: .85rem; }
.field.active { border-color: var(--green); }

.suggestions { border: 1px solid var(--line); border-radius: 12px; margin: -4px 0 8px; overflow: hidden; }
.suggestions button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 10px 12px; cursor: pointer; font-size: .9rem; }
.suggestions button:last-child { border-bottom: 0; }

.price-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; }
.price-row .field { flex: 1; margin: 0; min-width: 0; }
.field input { width: 100%; }
.price-row input { font-size: 1.4rem; font-weight: 800; }
.cur { font-weight: 700; color: var(--muted); padding-right: 8px; }
.hint { font-size: .85rem; color: var(--muted); margin: 0 0 10px; }

.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px; font-weight: 700; font-size: 1.02rem;
  background: var(--lime); color: var(--ink); cursor: pointer; margin-top: 8px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: var(--bg); }
.btn.danger { background: #fdecec; color: var(--red); }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 8px 14px; font-weight: 700; cursor: pointer; }

.card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; background: #fff; }
.card .top { display: flex; align-items: center; gap: 10px; }
.card .price { margin-left: auto; font-size: 1.3rem; font-weight: 800; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #e6efe9; display: grid; place-items: center; font-weight: 800; color: var(--green-dark); flex: 0 0 auto; }
.route { font-size: .9rem; margin: 8px 0; line-height: 1.5; }
.route div::before { content: "● "; }
.route .a::before { color: var(--green); }
.route .b::before { color: var(--red); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: .75rem; font-weight: 700; background: var(--bg); }
.badge.green { background: #e3f6ea; color: var(--green-dark); }
.badge.red { background: #fdecec; color: var(--red); }

.searching { text-align: center; padding: 6px 0; }
.pulse { width: 64px; height: 64px; margin: 6px auto 8px; border-radius: 50%; background: var(--green); opacity: .7; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .8 } 100% { transform: scale(1.3); opacity: 0 } }

.stars { display: flex; justify-content: center; gap: 6px; font-size: 38px; margin: 10px 0; }
.stars button { border: 0; background: none; cursor: pointer; filter: grayscale(1); opacity: .45; font-size: inherit; }
.stars button.on { filter: none; opacity: 1; }

.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--bg); margin-bottom: 12px; font-weight: 700; }
.toggle { position: relative; width: 56px; height: 32px; border-radius: 16px; background: #c9d1cc; border: 0; cursor: pointer; transition: .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { left: 27px; }

label.lbl { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; z-index: 900; background: #fff; padding: calc(20px + env(safe-area-inset-top)) 12px 20px; box-shadow: 4px 0 20px rgba(0,0,0,.15); display: flex; flex-direction: column; gap: 4px; }
.drawer-head { display: flex; gap: 12px; align-items: center; padding: 6px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.drawer button { text-align: left; border: 0; background: none; padding: 13px 10px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.drawer button:hover { background: var(--bg); }
.backdrop { position: fixed; inset: 0; z-index: 800; background: rgba(0,0,0,.35); }

.toast { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 1000; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: 90vw; font-size: .92rem; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast.err { background: var(--red); }

.login-wrap { text-align: center; }
.login-wrap .logo { font-size: 2.4rem; font-weight: 900; color: var(--green); margin: 4px 0; }
.code-input { letter-spacing: 10px; text-align: center; font-size: 1.6rem !important; font-weight: 800; }

.marker-car { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.marker-pin { font-size: 30px; line-height: 1; }
