:root {
  --asphalt: #1f2a33;
  --asphalt-2: #2b3843;
  --paper: #f7f8f6;
  --white: #ffffff;
  --line: #e1e4e0;
  --text: #1f2a33;
  --muted: #66737c;
  --amber: #f2b705;
  --teal: #0f766e;
  --rust: #c2410c;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--paper); font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--asphalt); color: #dfe5e9; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding-bottom: 22px; }
/* The zebra crossing: white bars painted across the asphalt */
.crossing { height: 64px; margin: 0 22px 18px; background: repeating-linear-gradient(90deg, #f3f4f1 0 16px, transparent 16px 30px); opacity: .92; }
.brand { font-size: 30px; font-weight: 800; font-stretch: 78%; letter-spacing: -0.5px; padding: 0 24px; color: #fff; }
.brand-sub { color: #8d9aa3; padding: 0 24px; margin-bottom: 24px; }
.side nav { display: flex; flex-direction: column; }
.side nav a { color: #c7d0d6; text-decoration: none; padding: 11px 24px; border-left: 4px solid transparent; }
.side nav a:hover { background: var(--asphalt-2); color: #fff; }
.side nav a.active { color: #fff; font-weight: 700; border-left-color: var(--amber); background: var(--asphalt-2); }
.count { background: var(--amber); color: var(--asphalt); font-weight: 700; border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.side-logout { margin: auto 24px 0; color: #c7d0d6; text-decoration: none; border: 1px solid #44525d; padding: 9px; border-radius: 6px; text-align: center; }

.main { padding: 36px 44px 60px; max-width: 1320px; width: 100%; }
h1 { font-size: 34px; font-weight: 800; font-stretch: 82%; margin: 0 0 4px; letter-spacing: -0.5px; }
h2 { font-size: 19px; font-weight: 700; margin: 34px 0 12px; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 64ch; }
.flash { padding: 12px 16px; border-left: 4px solid var(--teal); background: #e3f1ef; margin-bottom: 20px; border-radius: 4px; }
.flash.warn { border-color: var(--rust); background: #fbe9e1; }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.strip > div { padding: 18px 20px; border-right: 1px solid var(--line); }
.strip > div:last-child { border-right: 0; }
.strip .v { font-size: 27px; font-weight: 800; font-stretch: 85%; font-variant-numeric: tabular-nums; }
.strip .k { color: var(--muted); font-size: 13px; }
.strip .hot .v { color: var(--rust); }

.two { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: 8px 14px; color: var(--muted); text-decoration: none; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--asphalt); color: #fff; }
.search { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 260px; background: var(--white); }

.tbl-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sub { color: var(--muted); font-size: 13px; }
.sub.online { color: var(--teal); font-weight: 600; }
.route { max-width: 260px; }
.empty { padding: 28px; color: var(--muted); }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 13px; background: #eef0ed; white-space: nowrap; }
.tag.searching { background: #fff4cc; color: #7a5d00; }
.tag.accepted, .tag.arrived, .tag.started { background: #e0efed; color: var(--teal); }
.tag.completed, .tag.approved { background: var(--teal); color: #fff; }
.tag.cancelled, .tag.rejected, .tag.blocked { background: #fbe6dc; color: var(--rust); }
.tag.pending { background: var(--amber); color: var(--asphalt); }
.plate { display: inline-block; font-weight: 700; border: 1.5px solid var(--text); border-radius: 4px; padding: 0 6px; font-size: 13px; margin-top: 3px; }

.btn { border: 1px solid var(--line); background: var(--white); padding: 7px 12px; border-radius: 7px; cursor: pointer; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn.go { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.stop { color: var(--rust); }
.btn.primary { background: var(--amber); border-color: var(--amber); font-weight: 700; padding: 10px 18px; }
.btn.wide { width: 100%; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.bars { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.bar { margin-bottom: 12px; }
.bar-top { display: flex; justify-content: space-between; font-size: 14px; }
.bar-track { height: 8px; background: #eef0ed; border-radius: 4px; margin-top: 4px; }
.bar-fill { height: 100%; background: var(--asphalt); border-radius: 4px; }

.form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 22px; max-width: 780px; }
.form h2 { margin-top: 8px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid4 { display: grid; grid-template-columns: 110px repeat(3, 1fr); gap: 10px; align-items: center; }
.grid4 .h { color: var(--muted); font-size: 13px; }
.cap { text-transform: capitalize; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 13px; }
.field input, .grid4 input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; width: 100%; background: var(--white); }
.err { color: var(--rust); }

.login { min-height: 100vh; display: grid; place-items: center; background: var(--asphalt) repeating-linear-gradient(90deg, #f3f4f1 0 34px, transparent 34px 64px) no-repeat center / 100% 120px; }
.login form { background: var(--white); padding: 34px; border-radius: 12px; width: min(380px, 92vw); position: relative; }
.login h1 { margin-bottom: 18px; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .crossing, .brand-sub { display: none; }
  .brand { padding: 0 10px 0 0; font-size: 24px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side nav a { padding: 8px 10px; border-left: 0; }
  .side-logout { margin: 0 0 0 auto; padding: 6px 10px; }
  .main { padding: 24px 16px; }
  .row3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 80px repeat(3, 1fr); }
}

/* SMS page */
.tag.sms-delivered { background: var(--teal); color: #fff; }
.tag.sms-submitted, .tag.sms-enroute, .tag.sms-accepted, .tag.sms-ringing { background: #fff4cc; color: #7a5d00; }
.tag.sms-failed, .tag.sms-undelivered, .tag.sms-expired, .tag.sms-rejected { background: #fbe6dc; color: var(--rust); }
.tag.sms-logged { background: #eef0ed; color: var(--muted); }
.err-filter { color: var(--rust); font-weight: 600; }
.form select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.copy { width: 100%; padding: 9px 11px; border: 1px dashed var(--text); border-radius: 7px; background: var(--paper); font-size: 13px; }
.kv td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv td:first-child { color: var(--muted); padding-right: 16px; }
code { background: var(--paper); padding: 1px 5px; border-radius: 4px; }

/* Feature switches, wallets, rental packages, coupons */
.switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 8px; }
.switch { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 9px; padding: 14px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--teal); margin: 2px 0 0; flex: none; }
.switch b { display: block; }
.field textarea, .field select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; width: 100%; background: var(--white); font: inherit; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input, .inline select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.inline input[type=number] { width: 110px; }
.money-in { color: var(--teal); font-weight: 700; }
.money-out { color: var(--rust); font-weight: 700; }
.tag.on { background: var(--teal); color: #fff; }
.tag.off { background: #eef0ed; color: var(--muted); }
@media (max-width: 760px) { .inline input[type=number] { width: 90px; } }

/* Driver documents */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.doc { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.doc img { display: block; width: 100%; height: 210px; object-fit: cover; background: var(--paper); }
.doc-body { padding: 14px; }
.doc .inline input { flex: 1; min-width: 120px; }
.tag.pending { background: var(--amber); color: var(--asphalt); }

/* Profile pictures */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; float: left; margin: 2px 10px 0 0; }

/* App modules, ride & wallet rules */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form.wide { max-width: 1100px; }
.thumb { height: 34px; max-width: 64px; object-fit: contain; }
.toggle { width: 46px; height: 26px; border-radius: 999px; border: 0; background: #cfd6d3; position: relative; cursor: pointer; padding: 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on { background: var(--teal); }
.toggle.on span { left: 23px; }
@media (max-width: 760px) { .row2 { grid-template-columns: 1fr; } }

/* Service areas, zones, prices, God's eye */
.nav-head { color: #7d8b95; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 16px 24px 4px; }
.side { overflow-y: auto; }
.side > * { flex-shrink: 0; }
.map { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #e9ece8; }
.map.tall { height: calc(100vh - 220px); min-height: 480px; }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.map-tools input { flex: 1; min-width: 220px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; }
.eye { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.eye-list { background: var(--white); border: 1px solid var(--line); border-radius: 10px; max-height: calc(100vh - 220px); min-height: 480px; overflow-y: auto; }
.eye-list .d { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px; align-items: center; }
.eye-list .d:hover { background: var(--paper); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.dot.available { background: #16a34a; } .dot.busy { background: #2563eb; } .dot.offline { background: #9ca3af; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; align-items: center; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); }
.req { font-weight: 700; font-variant-numeric: tabular-nums; }
.vimg { width: 56px; height: 40px; object-fit: contain; }
.form .section { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }
.surge { color: var(--rust); font-weight: 700; }
@media (max-width: 1000px) { .eye { grid-template-columns: 1fr; } .eye-list { max-height: 300px; min-height: 0; } }
a.btn { text-decoration: none; display: inline-block; }
.area-results { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.area-results .area { text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; font: inherit; }
.area-results .area:hover { border-color: var(--teal); }
.area-results .area .sub { display: block; }

/* Drivers: cards, list, profile */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; position: relative; }
.panel-bar select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); margin: 0 4px; }
.panel-bar .search { flex: 1; }
.seg.views a { padding: 6px 12px; font-size: 16px; }
.filters { position: relative; }
.filters > summary { list-style: none; background: var(--rust); border-color: var(--rust); color: #fff; }
.filters > summary::-webkit-details-marker { display: none; }
.filter-panel { position: absolute; right: 0; top: 46px; z-index: 20; width: min(560px, 90vw); background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filter-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.filter-panel select, .filter-panel input { padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--text); margin: 0; }
.filter-panel .actions { grid-column: 1 / -1; }
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.dcard { background: var(--white); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
.dcard-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 0; }
.dcard-ref { padding: 8px 14px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px dashed var(--line); line-height: 1.9; }
.dcard-ref b { color: var(--text); font-weight: 600; }
.copy-btn { border: 0; background: var(--paper); border-radius: 5px; cursor: pointer; padding: 1px 6px; margin-left: 4px; }
.dcard-who { display: flex; gap: 12px; align-items: center; padding: 12px 14px 4px; color: var(--text); text-decoration: none; }
.dcard-who b { display: block; font-size: 16px; }
.dcard-photo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: #fdf1dc; }
.list-photo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--teal); background: #e3f1ef; }
.stars { color: var(--amber); letter-spacing: 1px; font-size: 14px; display: block; }
.dcard-lines { list-style: none; margin: 0; padding: 4px 14px 10px; flex: 1; }
.dcard-lines li { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; min-height: 34px; word-break: break-word; }
.dcard-lines .ic { width: 22px; text-align: center; flex: none; opacity: .75; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { border: 1px dashed var(--text); border-radius: 4px; padding: 0 6px; font-size: 12px; }
.dcard-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.dcard-foot .doc-link { margin-left: auto; text-decoration: none; font-size: 22px; position: relative; }
.dcard-foot .doc-link .count { position: absolute; top: -6px; right: -10px; font-size: 11px; }
.dcard-reason { padding: 0 14px 12px; font-size: 13px; color: var(--muted); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 6px; color: var(--muted); }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: 24px; z-index: 30; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.12); min-width: 190px; padding: 6px 0; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 8px 14px; background: none; border: 0; font: inherit; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--paper); }
.menu-list .stop { color: var(--rust); }
.tag.blocked { background: #1f2a33; color: #fff; }
.dhead { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 20px; }
.dhead > div, .dhead > ul { padding: 0 18px; border-right: 1px solid var(--line); }
.dhead > :last-child { border-right: 0; }
.dhead-who { display: flex; gap: 16px; align-items: center; padding-left: 0 !important; }
.dhead-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; font-size: 26px; }
.big { font-size: 19px; }
.dhead-contact { list-style: none; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.dhead-car { display: flex; gap: 14px; align-items: center; }
.dhead-car img { width: 110px; height: 70px; object-fit: contain; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; padding: 8px 12px 0; margin-bottom: 18px; }
.tabs a { padding: 10px 14px; color: var(--text); text-decoration: none; border-bottom: 3px solid transparent; font-size: 14px; }
.tabs a.on { border-bottom-color: var(--amber); font-weight: 700; background: var(--paper); border-radius: 6px 6px 0 0; }
.card-box { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.gstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gstat { border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.gicon { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: #e3f1ef; align-items: center; justify-content: center; font-size: 17px; }
.gstat.red .gicon { background: #fbe6dc; }
.gstat .gv { font-size: 24px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.gstat .gk { color: var(--muted); font-size: 14px; }
@media (max-width: 1000px) { .dhead { grid-template-columns: 1fr; gap: 14px; } .dhead > div, .dhead > ul { border-right: 0; padding: 0; } }

/* Referral settings and dashboard */
.tip { color: var(--muted); cursor: help; font-size: 13px; }
.big-switch { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 9px; padding: 16px 18px; }
.big-switch input { width: 46px; height: 24px; accent-color: var(--teal); flex: none; }
.ref-box { border: 1px solid var(--line); border-radius: 9px; padding: 16px; margin: 6px 0 18px; }
.ref-box h3 { font-size: 15px; margin: 16px 0 8px; }
.ref-cell { background: #f1f3f6; border-radius: 8px; padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.ref-cell label { font-size: 13px; color: var(--muted); }
.ref-cell input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--teal); }
.kcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kcard { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.kcard .kk { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.kcard .kv { font-size: 24px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; }
.chg { font-size: 13px; font-weight: 600; }
.chg.up { color: var(--teal); } .chg.down { color: var(--rust); }
.leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-top: 18px; }
.leader { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.leader:hover { border-color: var(--teal); }
.leader .rank { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--teal); display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--paper); margin-bottom: 6px; }
.leader img, .leader .lav { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.leader .lav { display: flex; align-items: center; justify-content: center; background: #f6dff7; color: #86198f; font-weight: 700; font-size: 20px; }
.mbars { display: flex; gap: 10px; align-items: flex-end; height: 240px; padding-top: 10px; }
.mbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.mtrack { flex: 1; width: 100%; max-width: 46px; background: var(--paper); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.mfill { width: 100%; background: var(--teal); border-radius: 6px 6px 0 0; }
.mval { font-size: 11px; color: var(--muted); white-space: nowrap; }
.mlab { font-weight: 600; font-size: 13px; }
.big-switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 26px; border-radius: 999px; background: #cfd6d3; position: relative; cursor: pointer; transition: background .15s; }
.big-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.big-switch input:checked { background: #3c4f8f; }
.big-switch input:checked::after { left: 25px; }

/* Franchise */
.fcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.fcard { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; position: relative; }
.fcard .fk { font-size: 14px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.fcard .fv { font-size: 22px; font-weight: 700; margin-top: 4px; }
.fview { position: absolute; right: 14px; bottom: 12px; font-size: 13px; color: var(--text); }
.ficon { display: inline-flex; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; flex: none; font-size: 18px; }
.ficon.amber { background: #fdf1d6; } .ficon.teal { background: #dff3ef; } .ficon.rust { background: #fbe6dc; } .ficon.sky { background: #e0f2fe; }
.ficon.navy { background: #e2e6f3; } .ficon.gray { background: #ececec; }
.c-amber { color: #d29b00; font-weight: 600; } .c-teal { color: var(--teal); font-weight: 600; } .c-rust { color: var(--rust); font-weight: 600; }
.fgrid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; }
.mini .fk { font-size: 13px; color: var(--muted); }
.mini .fv { font-size: 21px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.donut { width: 170px; height: 170px; border-radius: 50%; position: relative; flex: none; }
.donut span { position: absolute; inset: 28px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legend-list i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.icon-actions { gap: 6px; }
.ia { width: 34px; height: 30px; border: 0; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; font-size: 14px; }
.ia.edit { background: #fdf1d6; color: #b7791f; } .ia.lock { background: #e0e7ff; } .ia.del { background: #fde2e1; } .ia.view { background: #dff3ef; }
.doc-icon { font-size: 22px; text-decoration: none; position: relative; }
.doc-icon .count { position: absolute; top: -6px; right: -12px; font-size: 11px; }
@media (max-width: 1000px) { .fgrid { grid-template-columns: 1fr; } }
.main { min-width: 0; }
.icon-actions { flex-wrap: nowrap; }
td .toggle { flex: none; }
.payacc { border: 1px solid #3c4f8f; border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.payacc ul { list-style: none; margin: 6px 0 8px; padding: 0; font-size: 13px; }
.payacc li::before { content: '✔'; display: inline-flex; width: 15px; height: 15px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 9px; align-items: center; justify-content: center; margin-right: 6px; }
.payacc li { padding: 2px 0; }
.payacc-form h3 { font-size: 15px; margin: 14px 0 8px; }
.balance-card { border: 1px solid #3c4f8f; border-radius: 6px; padding: 14px 16px; width: 230px; }
.balance-card .ficon { margin: 18px 0 4px; border-radius: 50%; }
.balance-card .bv { text-align: right; font-size: 18px; }
.req-box { border: 2px solid var(--amber); }

/* Top bar: location, notifications, full screen, dark mode */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -18px 0 18px; flex-wrap: wrap; }
.tb-loc { display: flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.tb-loc select { border: 0; background: transparent; font: inherit; color: var(--text); }
.tb-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; position: relative; list-style: none; }
.tb-btn::-webkit-details-marker { display: none; }
.tb-bell { position: relative; }
.tb-bell > summary { list-style: none; }
.tb-count { position: absolute; top: -4px; right: -4px; background: var(--rust); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 5px; }
.tb-drop { position: absolute; right: 0; top: 46px; width: min(360px, 92vw); background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 36px rgba(0,0,0,.18); z-index: 50; overflow: hidden; }
.tb-head { background: #3c4f8f; color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.tb-new { background: #fff; color: #3c4f8f; border-radius: 4px; padding: 1px 7px; font-size: 12px; font-weight: 700; }
.tb-tabs { display: flex; background: #3c4f8f; padding: 0 10px; gap: 4px; }
.tb-tabs button { border: 0; background: transparent; color: #dbe2ff; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 13px; border-radius: 6px 6px 0 0; }
.tb-tabs button.on { background: var(--white); color: var(--text); }
.tb-list { max-height: 360px; overflow-y: auto; }
.tb-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tb-item:hover { background: var(--paper); }
.tb-item.unread { background: #f4f7ff; }
.tb-item b, .tb-item .sub { display: block; }
.tb-ic { width: 32px; height: 32px; border-radius: 50%; background: #f6dff7; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tb-foot { display: flex; justify-content: center; gap: 8px; padding: 10px; }
.tb-foot .btn:first-child { background: #dff3ef; border-color: #dff3ef; color: var(--teal); font-weight: 600; }
.tb-user { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px 4px 4px; }
.tb-av { width: 30px; height: 30px; border-radius: 6px; background: var(--amber); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.unread-row { background: #f4f7ff; }
html[data-theme="dark"] { --paper: #141a20; --white: #1d252d; --line: #2f3a44; --text: #e5e9ec; --muted: #9aa7b1; }
html[data-theme="dark"] body { background: var(--paper); color: var(--text); }
html[data-theme="dark"] .tb-item.unread, html[data-theme="dark"] .unread-row { background: #232e44; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #151b21; color: var(--text); border-color: var(--line); }
html[data-theme="dark"] .ref-cell, html[data-theme="dark"] .mtrack, html[data-theme="dark"] .seg a.on { background: #2a3540; }
@media (max-width: 760px) { .topbar { margin-top: 0; } }
.dash-card { margin: 16px 0; }
.dash-card h2 { margin-top: 0; }
.empty.center { text-align: center; font-size: 15px; }
.sos-row { background: #fff4f2; }
html[data-theme="dark"] .sos-row { background: #3a2422; }
.kcard .kk .chg { float: right; }
.donut-box { max-width: 290px; margin: 6px auto 0; }

/* Dispatch monitor */
.info-box { background: #e3f2fb; border: 1px solid #b6dcf2; border-radius: 8px; padding: 12px 16px; color: #1f5f86; font-size: 13px; margin-bottom: 16px; }
.info-box ul { margin: 6px 0 0; padding-left: 18px; }
.info-box li { margin: 2px 0; }
.dm { display: grid; grid-template-columns: 330px 1fr; gap: 16px; align-items: start; }
.dm-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); margin: -4px -18px 14px; padding: 0 18px 12px; }
.dm-head h2 { margin: 0; }
.dm-badge { background: #3c4f8f; color: #fff; border-radius: 4px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.dm-left .search { width: 100%; min-width: 0; margin: 6px 0 10px; }
.dm-left #list { max-height: calc(100vh - 330px); min-height: 200px; overflow-y: auto; }
.dm-ride { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font: inherit; color: var(--text); }
.dm-ride:hover { border-color: var(--teal); }
.dm-ride.on { border-color: #3c4f8f; box-shadow: 0 0 0 2px #3c4f8f33; }
.dm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dm-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-right { min-height: 420px; }
.dm-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.dm-k { margin-bottom: 14px; }
.dm-right h3 { font-size: 15px; margin: 16px 0 6px; }
.dm-no td { opacity: .75; }
@media (max-width: 1000px) { .dm { grid-template-columns: 1fr; } }
.dm-top .actions { align-items: flex-start; height: fit-content; }
.dm-k { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dm-k .kcard { padding: 12px 14px; }
@media (max-width: 1200px) { .dm-k { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Brand & website (migration 018) */
.brand-logo { display: flex; align-items: center; gap: 10px; padding: 0 24px; }
.brand-logo img { max-height: 40px; max-width: 160px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.brand-logo .brand { padding: 0; font-size: 24px; }
.login .login-logo { display: block; max-height: 56px; max-width: 200px; margin: 0 auto 12px; }
.site-tabs { flex-wrap: wrap; margin-bottom: 18px; }
.site-file { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; }
.site-file img { max-height: 64px; max-width: 160px; object-fit: contain; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 6px; }
.site-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 14px; }
.site-sec { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--white); }
.site-sec input[type=number] { width: 56px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--text); }
.site-ic { font-size: 24px; text-align: center; }
.site-ic img { width: 40px; height: 40px; object-fit: contain; }
.msg-body { white-space: pre-wrap; margin-top: 6px; }

/* Driver profile > Documents table */
.doc-table td { vertical-align: middle; }
.icon-btn { display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 6px; border-radius: 6px; text-decoration: none; font-size: 15px; }
.icon-btn small { font-size: 10px; font-weight: 700; margin-left: 1px; }
.icon-btn.view { background: #e0f2fe; color: #0369a1; }
.icon-btn.get { background: #dcfce7; color: #15803d; }
.btn.approve-btn { color: #0f766e; border-color: #14b8a6; background: transparent; }
.btn.decline-btn { color: #dc2626; border-color: #f87171; background: transparent; }
.btn.approve-btn:disabled, .btn.decline-btn:disabled { opacity: .35; cursor: default; }
/* Driver profile: completed, acceptance, cancellation cards */
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rcard { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.rcard .rc-ic { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center; font-size: 17px; background: #e3f1ef; color: #0f8a7e; }
.rcard.bad .rc-ic { background: #fbe6dc; color: #d9534f; }
.rcard b { display: block; font-size: 24px; font-weight: 700; margin-top: 12px; font-variant-numeric: tabular-nums; }
.rcard .rc-k { display: block; color: var(--muted); font-size: 14px; }
.rcard small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
