* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, system-ui, sans-serif; background: #f4f6fb; color: #14213d; }
.hidden { display: none !important; }
.view { min-height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; border: 1px solid #c9d4e8; background: #fff; border-radius: 10px; padding: 8px 14px; }
button.primary { background: #0b5fff; color: #fff; border-color: #0b5fff; font-weight: 600; width: 100%; padding: 12px; }
button.mini { padding: 6px 10px; font-size: 14px; }
button.danger { background: #c0392b; color: #fff; border-color: #c0392b; }
button.good { background: #12805c; color: #fff; border-color: #12805c; }
input[type=text], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 10px; border: 1px solid #c9d4e8; border-radius: 10px; font: inherit; margin-top: 4px; background: #fff;
}
label { display: block; margin: 10px 0; font-size: 14px; font-weight: 600; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; }
.spinner { width: 34px; height: 34px; margin: 16px auto 4px; border: 4px solid #dbe4ff; border-top-color: #0b5fff; border-radius: 50%; animation: fubrspin .9s linear infinite; }
@keyframes fubrspin { to { transform: rotate(360deg); } }
.card { background: #fff; border-radius: 16px; padding: 20px; margin: 16px; box-shadow: 0 2px 12px rgba(20,33,61,.08); }
.center { text-align: center; }
.logo { font-size: 30px; font-weight: 800; text-align: center; }
.muted { color: #5b6b8c; } .small { font-size: 13px; } .error { color: #c0392b; min-height: 18px; }
.segrow { display: flex; gap: 8px; margin: 12px 0; }
.segrow .seg { flex: 1; }
.segrow.small .seg { padding: 6px 8px; font-size: 14px; }
.seg.active { background: #14213d; color: #fff; border-color: #14213d; }
.pill { background: #ffb703; color: #14213d; border-radius: 999px; padding: 1px 8px; font-size: 12px; vertical-align: middle; }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e2e8f5; position: sticky; top: 0; z-index: 1200; }
.brand { font-size: 20px; font-weight: 800; }
header .segrow { margin: 0; min-width: 170px; }
.onlinebar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: #fff3cd; font-size: 14px; }
.onlinebar.on { background: #d3f8df; }
.adminbar { padding: 8px 14px; background: #ffe3e3; font-size: 14px; cursor: pointer; }
main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tab { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
#tabMap { overflow: hidden; position: relative; }
#map { flex: 1; min-height: 260px; z-index: 1; }
.sheet { background: #fff; border-top: 1px solid #e2e8f5; padding: 12px 14px; max-height: 46%; overflow-y: auto; }
#rideBanner { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 900; }
nav#tabbar { display: flex; background: #fff; border-top: 1px solid #e2e8f5; position: sticky; bottom: 0; z-index: 1200; }
nav#tabbar button { flex: 1; border: 0; border-radius: 0; padding: 10px 0 14px; font-size: 20px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; }
nav#tabbar button span { font-size: 12px; }
nav#tabbar button.active { color: #0b5fff; }
.pad { padding: 0 14px; }
.listrow { display: flex; gap: 12px; align-items: center; background: #fff; margin: 8px 12px; padding: 10px 12px; border-radius: 14px; box-shadow: 0 1px 6px rgba(20,33,61,.06); }
.listrow .grow { flex: 1; min-width: 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #dbe4f5; flex: none; }
.avatar.init { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #33507e; font-size: 18px; }
.avatar.sm { width: 36px; height: 36px; }
.stars { color: #f59e0b; font-size: 13px; }
.ridecard { background: #eef4ff; border: 1px solid #bcd0ff; border-radius: 14px; padding: 12px; margin: 8px 0; }
.ridecard.green { background: #e7f9ef; border-color: #9be3bb; }
.ridecard h4 { margin: 0 0 6px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btnrow button { flex: 1; }
.chathead { gap: 8px; }
.chatTitle { flex: 1; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
#chatView { background: #f4f6fb; }
#chatMessages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: #fff; align-self: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,.06); white-space: pre-wrap; word-break: break-word; }
.msg.mine { background: #0b5fff; color: #fff; align-self: flex-end; }
.msg.system { background: #fff8e1; align-self: center; text-align: center; font-size: 13px; max-width: 92%; }
#chatPanel { padding: 8px 12px 0; }
.composer { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #e2e8f5; }
.composer input { flex: 1; margin: 0; }
.composer button { width: auto; }
.staticbody { padding: 16px; max-width: 720px; margin: 0 auto; line-height: 1.5; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #14213d; color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 2000; font-size: 14px; max-width: 90%; text-align: center; }
.leaflet-div-icon { background: transparent; border: 0; }
.pin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #0b5fff; overflow: hidden; background: #dbe4f5; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #33507e; }
.pin.post { border-color: #f59e0b; }
.pin.me { border-color: #12805c; }
.pin img { width: 100%; height: 100%; object-fit: cover; }
.pinlabel { background: rgba(255,255,255,.92); border: 0; box-shadow: none; font-weight: 600; }
.docgrid { display: flex; gap: 8px; flex-wrap: wrap; }
.docgrid img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid #c9d4e8; }
section.reg { border-top: 1px solid #e2e8f5; padding-top: 6px; margin-top: 14px; }
.ratebtns { display: flex; gap: 6px; font-size: 26px; }
.ratebtns button { border: 0; background: transparent; font-size: 26px; padding: 2px; color: #c9d4e8; }
.ratebtns button.on { color: #f59e0b; }
