:root {
  --bg: #0b0e13;
  --card: #141a22;
  --card2: #1a2230;
  --line: #232d3d;
  --txt: #eef1f6;
  --mut: #9aa7b8;
  --acc: #ffd23f;
  --acc2: #ffbe1a;
  --green: #2ee6a8;
  --red: #ff6b6b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  overscroll-behavior: none;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, #10151d, #0b0e13);
  position: sticky; top: 0; z-index: 600;
}
.brand { font-size: 26px; font-weight: 800; color: var(--acc); line-height: 1.1; }
.brand span { display: block; font-size: 11px; font-weight: 600; color: var(--mut); letter-spacing: .3px; }
.ghost { color: var(--mut); text-decoration: none; font-size: 13px; font-weight: 700; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; background: var(--card); }
.ghost:active { transform: scale(.96); }

#map { height: 42dvh; min-height: 240px; background: #10151d; position: relative; z-index: 1; }
.leaflet-container { font-family: inherit; }

.sheet {
  flex: 1;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  margin-top: -18px;
  position: relative; z-index: 500;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.35);
}
.page { flex: 1; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.card2 { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }

.row { display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.dot.pick { background: var(--green); }
.dot.dest { background: var(--red); }

label.f { display: block; font-size: 13px; font-weight: 700; color: var(--mut); margin: 10px 0 6px; }
input[type=text], input[type=tel], input[type=password], input[type=number], textarea {
  width: 100%; background: var(--card2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 13px 14px; font-size: 16px; font-family: inherit; outline: none;
}
input:focus { border-color: var(--acc); }

.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px;
  background: var(--acc); color: #1a1400; font-size: 17px; font-weight: 800; font-family: inherit;
  cursor: pointer; text-align: center; text-decoration: none;
}
.btn:active { transform: scale(.98); background: var(--acc2); }
.btn[disabled] { opacity: .45; }
.btn.sec { background: var(--card2); color: var(--txt); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn.ok { background: var(--green); color: #00291b; }
.btn.half { width: 49%; }
.row2 { display: flex; justify-content: space-between; gap: 2%; }

.sugg { margin: 4px 0 0; padding: 0; list-style: none; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sugg li { padding: 11px 12px; font-size: 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sugg li:last-child { border-bottom: 0; }
.sugg li:active { background: var(--line); }

.estimate { display: flex; align-items: center; justify-content: space-between; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.estimate .fare { font-size: 24px; font-weight: 800; color: var(--acc); }
.estimate .meta { font-size: 13px; color: var(--mut); text-align: left; direction: ltr; }

.hint { font-size: 12px; color: var(--mut); }
.center { text-align: center; }
.big { font-size: 20px; font-weight: 800; }
.spin { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--acc); border-radius: 50%; margin: 14px auto; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--mut); }
.badge.pending { color: var(--acc); border-color: var(--acc); }
.badge.approved, .badge.completed, .badge.ongoing { color: var(--green); border-color: var(--green); }
.badge.rejected, .badge.cancelled { color: var(--red); border-color: var(--red); }
.badge.searching, .badge.accepted, .badge.arrived { color: #7cc4ff; border-color: #7cc4ff; }

.toggle { display: flex; align-items: center; justify-content: space-between; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.switch { position: relative; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .2s; }
.slider:before { content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #fff; top: 3px; right: 3px; transition: .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(-22px); }

.req { display: flex; flex-direction: column; gap: 6px; }
.req .price { color: var(--acc); font-weight: 800; font-size: 18px; }
.req .route-txt { font-size: 14px; }
.req .sub { font-size: 12px; color: var(--mut); }

.doc { background: var(--card2); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; text-align: center; font-size: 14px; font-weight: 700; color: var(--mut); cursor: pointer; position: relative; overflow: hidden; }
.doc input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc.done { border-style: solid; border-color: var(--green); color: var(--green); }
.doc img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; display: block; margin-top: 8px; }
.docs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.tab { flex: 1; text-align: center; padding: 11px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--mut); font-weight: 800; cursor: pointer; }
.tab.on { background: var(--acc); color: #1a1400; border-color: var(--acc); }

.list { display: flex; flex-direction: column; gap: 10px; }
.drv { cursor: pointer; }
.drv .name { font-weight: 800; }
.drv .sub { font-size: 12.5px; color: var(--mut); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.modal .box { background: var(--card); width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; border-radius: 20px 20px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
.modal img { width: 100%; border-radius: 12px; margin-top: 6px; }
.x { float: left; background: var(--card2); border: 1px solid var(--line); color: var(--txt); border-radius: 999px; width: 34px; height: 34px; font-size: 18px; }

.maptools { position: absolute; z-index: 450; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 6px; }
.maptools button { background: rgba(20,26,34,.92); border: 1px solid var(--line); color: var(--txt); font-family: inherit; font-weight: 700; font-size: 12px; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.maptools button.on { background: var(--acc); color: #1a1400; border-color: var(--acc); }

.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: #222b3a; color: var(--txt); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 2000; box-shadow: 0 6px 24px rgba(0,0,0,.4); max-width: 88%; text-align: center; }

a { color: var(--acc); }
.steps { display: flex; flex-direction: column; gap: 10px; }
.kv { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { color: var(--mut); font-weight: 700; }
