:root {
  --green: #11673A; --green-d: #0C5530; --ink: #0F3D24; --muted: #536156; --line: #E1E8E0;
  --bg: #F4F7F2; --yellow: #FFC20E; --yellow-soft: #FFF6D6; --mint: #CFE3D6; --red: #B42318; --orange: #E67E22;
  --display: 'Bricolage Grotesque', system-ui, sans-serif; --body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--body); }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 17px; }
a { color: var(--ink); }
/* Selalu tema terang (HP / browser mode gelap membuat kotak pilihan gelap & tulisan tak terbaca). */
:root { color-scheme: light; }
input, select, textarea { font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid #D3DDD2; border-radius: 9px; background: #fff; min-width: 0; }
option { background: #fff; color: var(--ink); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

.btn { font: 600 13px var(--body); border-radius: 10px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); }
.btn.danger { color: var(--red); border-color: #F2C8C3; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.err { color: var(--red); margin: 0; }

.login { min-height: 100%; display: grid; place-items: center; background: var(--green); padding: 16px; }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 22px; color: #fff; padding: 0 10px 18px; }
.brand span { color: var(--yellow); }
.brand small { font-size: 12px; font-weight: 600; color: var(--mint); }
.brand.dark { color: var(--ink); padding: 0; }
.brand.dark small { color: var(--muted); }

.app { display: flex; min-height: 100%; }
.side { flex: 0 0 220px; background: var(--green); color: #fff; padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side a { display: flex; justify-content: space-between; align-items: center; color: #fff; text-decoration: none; padding: 11px 12px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.side a:hover { background: var(--green-d); }
.side a.on { background: var(--yellow); color: var(--ink); }
/* Sub menu area per zona di bawah Driver / Pelanggan. */
.side .subnav { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px 10px; padding-left: 8px; border-left: 2px solid rgba(255,255,255,.25); }
.side .subnav[hidden] { display: none; }
.side .subnav a { padding: 6px 10px; font-size: 13px; font-weight: 500; opacity: .92; }
.side .subnav a small { font-size: 11px; opacity: .8; font-weight: 600; }
.side .subnav a.on { background: rgba(255,255,255,.18); color: #fff; opacity: 1; font-weight: 700; }
.side .subnav a.subprov { font-weight: 700; opacity: 1; cursor: pointer; }
.side .subnav .subgroup { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 8px; padding-left: 6px; border-left: 1px dashed rgba(255,255,255,.3); }
.side-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mint); padding: 0 10px; }
.badge { background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
main { flex: 1; min-width: 0; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 20px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rt { font-size: 13px; font-weight: 600; color: #1F7A4D; display: flex; align-items: center; gap: 8px; }
.rt::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: currentColor; }
.rt.off { color: var(--muted); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; }
.tile .k { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.tile .v { font-family: var(--display); font-weight: 700; font-size: 30px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12px; color: var(--muted); }
.tile.hero { background: var(--green); color: #fff; border-color: var(--green); }
.tile.hero .k { color: var(--mint); } .tile.hero .s { color: var(--yellow); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .card { flex: 1 1 360px; min-width: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { flex: 1 1 220px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: #FAFCF9; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: #FAFCF9; }
.sub { font-size: 12px; color: var(--muted); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--mint); color: var(--ink); white-space: nowrap; }
.pill.searching, .pill.negotiating, .pill.pending { background: var(--yellow-soft); color: #8A5A00; }
.pill.accepted, .pill.arrived, .pill.on_trip, .pill.scheduled { background: #DCEBFA; color: #1E4F86; }
.pill.completed, .pill.approved { background: var(--mint); color: var(--green-d); }
.pill.cancelled, .pill.rejected, .pill.suspended { background: #FBE3DF; color: var(--red); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; background: var(--green); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar.today i { background: var(--yellow); }
.bar span { font-size: 10px; color: var(--muted); }
.bar b { font-size: 10px; font-variant-numeric: tabular-nums; }
.bar i.neg { background: var(--red); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tile .v.small { font-size: 22px; }
.tile.yellow { background: var(--yellow-soft); border-color: var(--yellow); }
.split { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.split span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.split .total { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 800; }
.thread { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.chat .m .offer { display: block; font-weight: 800; }

#zoneMap { height: 420px; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 16px; }
.zone-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.zone-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .zone-form { grid-template-columns: 1fr 1fr; } }
#map { height: calc(100vh - 160px); min-height: 420px; border-radius: 16px; border: 1px solid var(--line); }
.drv-pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); font-size: 14px; }
.drv-pin.busy { background: var(--green); }
.drv-pin.off { background: #c9ccc9; opacity: .8; }
.shop-pin { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #fff; border: 2px solid #E8590C; font-size: 14px; }
.shop-pin.store { border-color: #1C7ED6; }
.shop-pin.closed { opacity: .5; }
.live-filter label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.live-grid { display: grid; grid-template-columns: 1fr 340px; gap: 12px; }
.live-grid #map { height: calc(100vh - 220px); }
.live-list { height: calc(100vh - 220px); min-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 10px; background: #fff; }
.live-list h3 { margin: 10px 4px 4px; font-size: 13px; text-transform: uppercase; color: var(--muted, #667); }
.live-sum { padding: 4px; font-size: 13px; }
.live-row { display: flex; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; align-items: flex-start; }
.live-row:hover { background: #f3f5f3; }
.live-row .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--yellow); border: 2px solid var(--ink); }
.live-row .dot.busy { background: var(--green); }
.live-row .dot.off { background: #c9ccc9; }
.live-row .em { width: 18px; text-align: center; flex: none; }
.coord { font-family: ui-monospace, monospace; font-size: 12px; }
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr; } .live-list { height: auto; max-height: 420px; } }

dialog { background: #fff; color: var(--ink); border: 0; border-radius: 18px; padding: 0; width: min(720px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 41, 24, .45); }
#modalBody { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; background: var(--bg); padding: 10px; border-radius: 12px; }
.chat .m { max-width: 80%; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.chat .m.c { align-self: flex-end; background: var(--green); color: #fff; border-color: var(--green); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 2000; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.menu-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.menu-row:last-child { border-bottom: 0; }


.fb { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.fb .head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.fb blockquote { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; border-left: 4px solid var(--yellow); white-space: pre-wrap; }
.fb.report blockquote { border-left-color: var(--red); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.big-photo { max-width: 100%; max-height: 70vh; border-radius: 12px; align-self: center; }

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; flex-basis: auto; padding: 12px; }
  .side .brand { width: 100%; padding-bottom: 6px; }
  .side a { padding: 8px 10px; }
  .side .subnav { flex-direction: row; flex-wrap: wrap; width: 100%; margin: 4px 0 6px; padding: 6px 0 0; border-left: 0; border-top: 2px solid rgba(255,255,255,.25); }
  .side .subnav a { white-space: nowrap; }
  .side .subnav .subgroup { flex-direction: row; flex-wrap: wrap; width: 100%; margin: 0 0 4px; border-left: 0; padding-left: 0; }
  .side-foot { width: 100%; margin-top: 6px; }
  main { padding: 18px 16px 32px; }
  .kv { grid-template-columns: 1fr; }
}
td.num.neg { color: var(--red); font-weight: 700; }
.fraud-set .form-grid { margin-bottom: 12px; }

/* Pemilik toko (pendaftaran merchant dari aplikasi mitra) */
.owner-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--mint); }
.owner-row.pending { background: var(--yellow-soft); }
.owner-row.rejected { background: #FBE0E0; }

/* Tampilan Aplikasi: pratinjau layar HP Android di sebelah kanan */
.brand-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.brand-main { min-width: 0; }
.brand-phone { position: sticky; top: 16px; }
@media (max-width: 1180px) {
  .brand-wrap { grid-template-columns: minmax(0, 1fr); }
  .brand-phone { position: static; order: -1; }
}
.phone { width: 320px; height: 660px; margin: 0 auto; background: #15181A; border-radius: 46px; padding: 11px; box-shadow: 0 18px 40px rgba(10, 51, 32, .25), inset 0 0 0 2px #2B3034; display: flex; flex-direction: column; position: relative; }
.phone-bar { height: 28px; background: #0A3320; color: #fff; border-radius: 36px 36px 0 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font: 600 11px/1 system-ui, sans-serif; }
.phone-bar i { width: 12px; height: 12px; border-radius: 50%; background: #15181A; }
.phone-screen { flex: 1; min-height: 0; background: #F7F4EC; display: flex; flex-direction: column; overflow: hidden; font-family: "Plus Jakarta Sans", Roboto, system-ui, sans-serif; color: #10231A; }
.phone-home { height: 22px; background: #fff; border-radius: 0 0 36px 36px; display: flex; align-items: center; justify-content: center; }
.phone-home i { width: 96px; height: 4px; border-radius: 4px; background: #222; }
.pv-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; }
.pv-scroll::-webkit-scrollbar { display: none; }
.pv-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #0A3320 0%, #11673A 62%, #1C8A50 100%); border-radius: 0 0 24px 24px; padding: 8px 12px 16px; color: #fff; }
.pv-ring { position: absolute; right: -60px; top: -36px; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(232, 185, 49, .22); box-shadow: inset 0 0 0 28px transparent, 0 0 0 0 transparent; }
.pv-ring::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; border: 1px solid rgba(232, 185, 49, .16); }
.pv-top { display: flex; align-items: center; gap: 6px; position: relative; }
.pv-logo { height: 36px; max-width: 130px; padding: 5px 8px; background: #fff; border-radius: 11px; display: inline-flex; align-items: center; }
.pv-logo img { height: 100%; max-width: 114px; object-fit: contain; }
.pv-glass { width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); display: inline-flex; align-items: center; justify-content: center; }
.pv-glass svg { width: 19px; height: 19px; }
.pv-city { display: flex; align-items: center; gap: 4px; margin-top: 10px; position: relative; }
.pv-city small { display: block; font-size: 8.5px; letter-spacing: .4px; color: rgba(255, 255, 255, .65); }
.pv-city b { font-size: 12.5px; }
.pv-ticker { margin-top: 8px; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 5px 0; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 600; }
.pv-ticker span { display: inline-block; padding-left: 100%; animation: pvTick 14s linear infinite; }
@keyframes pvTick { to { transform: translateX(-100%); } }
.pv-hi { margin-top: 10px; font-size: 10.5px; color: #BFE3CC; }
.pv-ask { font-family: "Bricolage Grotesque", Georgia, serif; font-size: 18px; font-weight: 600; }
.pv-ask em { color: #E8B931; font-weight: 500; }
.pv-search { margin-top: 8px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 11.5px; color: rgba(255, 255, 255, .78); }
.pv-search svg { width: 16px; height: 16px; }
.pv-pad { padding: 12px 12px 0; }
.pv-car { position: relative; border-radius: 16px; overflow: hidden; background: #E6F2EA; }
.pv-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.pv-slide.on { opacity: 1; }
.pv-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-slide span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; font-size: 11px; font-weight: 700; }
.pv-dots { position: absolute; bottom: 6px; right: 8px; display: flex; gap: 4px; }
.pv-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .6); }
.pv-dots i.on { width: 14px; background: #fff; }
.pv-h { padding: 14px 14px 8px; font-family: "Bricolage Grotesque", Georgia, serif; font-size: 16px; font-weight: 700; }
.pv-h2 { font-family: "Bricolage Grotesque", Georgia, serif; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px 6px; padding: 0 10px; }
.pv-tile { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pv-tile > div { width: 100%; aspect-ratio: 1.12; border-radius: 14px; background: #EFF8F3; border: 1px solid #EAE5D8; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pv-tile img { width: 100%; height: 100%; object-fit: contain; }
.pv-tile .more { background: #fff; display: grid; grid-template-columns: 11px 11px; gap: 4px; place-content: center; }
.pv-tile .more i { width: 11px; height: 11px; border-radius: 50%; }
.pv-tile span { margin-top: 4px; font-size: 9.5px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pv-card { border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; border: 1px solid #EAE5D8; }
.pv-card b { font-family: "Bricolage Grotesque", Georgia, serif; font-size: 13.5px; }
.pv-card small { font-size: 10px; color: #5C6B63; }
.pv-btn { align-self: flex-start; margin-top: 6px; background: #FFC20E; border-radius: 10px; padding: 5px 10px; font-size: 10.5px; font-weight: 800; }
.pv-nav { display: flex; justify-content: space-around; background: #fff; border-top: 1px solid #EAE5D8; padding: 6px 0 4px; }
.pv-nav span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; font-weight: 600; color: #6B7A71; }
.pv-nav span b { display: flex; padding: 2px 12px; border-radius: 12px; }
.pv-nav span svg { width: 18px; height: 18px; }
.pv-nav span.on { color: #11673A; }
.pv-nav span.on b { background: #D8F0E1; }
.pv-drv-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #11673A; }
.pv-sw { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 11px; font-weight: 700; }
.pv-sw i { width: 30px; height: 17px; border-radius: 9px; background: rgba(255, 255, 255, .35); position: relative; }
.pv-sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.pv-map { flex: 1; position: relative; background-color: #E8EEE6; background-image: linear-gradient(#D7E0D4 1px, transparent 1px), linear-gradient(90deg, #D7E0D4 1px, transparent 1px), linear-gradient(35deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%); background-size: 34px 34px, 34px 34px, 100% 100%; }
.pv-off { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; padding: 14px; }
.pv-offcard { background: #fff; border-radius: 16px; padding: 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.pv-offcard b { font-family: "Bricolage Grotesque", Georgia, serif; font-size: 14px; }
.pv-offcard small { font-size: 10px; color: #5C6B63; }
.pv-offcard .pv-car { width: 100%; margin-top: 8px; }
.pv-none { margin-top: 8px; font-style: italic; }
@media (max-width: 380px) { .phone { width: 100%; max-width: 320px; } }
