/* RouteDesk-specific styles */
.mobile-city { display: none; }
.live-pill { animation: pulseLive 2s infinite; }
@keyframes pulseLive { 50% { opacity: .65; } }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.filters .spacer { flex: 1; }
.rider-cell { display: flex; align-items: center; gap: 8px; }
.assign-inline { height: 28px; font-size: 12.5px; padding: 0 6px; border-style: dashed; color: var(--amber); }

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--text-3); }

.exc-list { display: flex; flex-direction: column; }
.exc { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.exc:last-child { border-bottom: 0; }
.exc .e-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.exc .e-main { flex: 1; min-width: 0; }
.exc .e-title { font-weight: 550; font-size: 13px; }
.exc .e-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Map */
.map-wrap { position: relative; }
.map-svg { width: 100%; height: auto; display: block; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: #eef1f5; }
.map-svg .area-label { font-size: 12px; font-weight: 600; fill: #64748b; paint-order: stroke; stroke: #eef1f5; stroke-width: 4px; }
.map-svg .rider-dot { transition: r .2s; cursor: pointer; }
.map-svg .pulse { animation: mapPulse 2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mapPulse { 0% { opacity: .5; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }
.map-legend { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.94); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; display: flex; gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.map-stats { position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,.95); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 12px; display: flex; gap: 14px; box-shadow: var(--shadow-sm); }
.map-stats b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.rider-list { max-height: 640px; overflow-y: auto; }
.rider-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.rider-row:hover { background: var(--surface-2); }
.rider-row.sel { background: var(--accent-50); }
.rider-row .r-main { flex: 1; min-width: 0; }
.rider-row .r-name { font-weight: 550; font-size: 13px; }
.rider-row .r-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rider-row .r-right { text-align: right; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* COD */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; }
.flow-step { padding: 16px 18px; position: relative; display: flex; gap: 12px; align-items: flex-start; }
.flow-step + .flow-step { border-left: 1px solid var(--border); }
.flow-step .f-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; flex-shrink: 0; }
.flow-step .f-t { font-weight: 600; font-size: 13px; }
.flow-step .f-s { font-size: 12px; color: var(--text-3); }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item.fresh { animation: rowIn 2s ease; }
.feed-item .fi-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.feed-item .fi-main { flex: 1; min-width: 0; font-size: 13px; }
.feed-item .fi-sub { font-size: 12px; color: var(--text-3); }
.feed-item .fi-amt { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Merchant */
.wallet-hero { background: linear-gradient(135deg, #4a4ac4, #6d5bd6 60%, #8b5cf6); color: #fff; border: 0; padding: 22px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.wallet-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.wallet-hero .w-label { opacity: .85; font-size: 13px; }
.wallet-hero .w-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wallet-hero .btn { background: #fff; color: #3730a3; border-color: #fff; align-self: flex-start; margin-top: 8px; }
.act-list { display: flex; flex-direction: column; }
.act { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 13px; }
.act:last-child { border-bottom: 0; }
.act .a-main { flex: 1; min-width: 0; }
.act .a-sub { font-size: 12px; color: var(--text-3); }
.pay-opt { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; align-items: flex-start; }
.pay-opt.sel { border-color: var(--accent); background: var(--accent-50); }
.pay-opt input { margin-top: 3px; accent-color: var(--accent); }
.success-big { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 20px 8px; }
.success-big .s-ring { width: 64px; height: 64px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; animation: pop .4s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: var(--accent-100); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Driver app */
.drv-hero { background: linear-gradient(160deg, #4a4ac4, #6d5bd6); color: #fff; padding: 6px 18px 18px; }
.drv-hero h2 { font-size: 19px; }
.drv-hero .muted { color: rgba(255,255,255,.8); }
.drv-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.drv-sum div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 9px 10px; }
.drv-sum b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.drv-sum span { font-size: 11px; opacity: .85; }
.stop { display: flex; gap: 12px; align-items: center; cursor: pointer; transition: transform .1s; }
.stop:active { transform: scale(.99); }
.stop .s-num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.stop.done { opacity: .6; }
.stop.done .s-num { background: var(--green-50); color: var(--green); }
.stop.next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.stop .s-main { flex: 1; min-width: 0; }
.stop .s-name { font-weight: 600; font-size: 14px; }
.stop .s-sub { font-size: 12px; color: var(--text-3); }
.stop .s-amt { text-align: right; font-weight: 650; font-size: 13px; }
.method-tile { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1.5px solid #e5e7eb; background: #fff; cursor: pointer; text-align: left; width: 100%; }
.method-tile:hover { border-color: var(--accent); }
.method-tile .m-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.method-tile b { display: block; font-size: 14px; }
.method-tile span { font-size: 12px; color: var(--text-3); }
.qr-box { background: #fff; padding: 14px; border-radius: 16px; align-self: center; box-shadow: var(--shadow); }
.nfc { width: 140px; height: 140px; border-radius: 50%; background: var(--accent-50); display: grid; place-items: center; align-self: center; position: relative; color: var(--accent); }
.nfc::before, .nfc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: ripple 1.8s infinite; }
.nfc::after { animation-delay: .9s; }
@keyframes ripple { from { transform: scale(.7); opacity: .8; } to { transform: scale(1.3); opacity: 0; } }
.amt-big { font-size: 30px; font-weight: 700; text-align: center; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-map { height: 130px; border-radius: 14px; overflow: hidden; background: #eef1f5; }
.mini-map svg { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .mobile-city { display: block; height: 30px; font-size: 12.5px; }
  .flow { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .flow-step:nth-child(3) { border-left: 0; }
  .flow-step:nth-child(n+3) { border-top: 1px solid var(--border); }
  .rider-list { max-height: 420px; }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: minmax(0,1fr); }
  .flow-step + .flow-step { border-left: 0; border-top: 1px solid var(--border); }
  .map-stats { position: static; border-radius: 0; border-width: 0 0 1px; box-shadow: none; justify-content: space-around; }
  .map-legend { position: static; border-radius: 0; border-width: 1px 0 0; box-shadow: none; }
  .filters { padding: 10px 14px; }
  .live-pill { display: none; }
}
