/* Look follows the company's operations board: rounded sidebar card, pill filters,
   dark summary strip, segmented tabs, two-line table rows with small tags. */
:root {
  --text: #101828;
  --muted: #667085;
  --line: #EAECF0;
  --line-strong: #D0D5DD;
  --soft: #F6F7F9;
  --blue: #2F6BEA;
  --blue-dark: #1F56C7;
  --navy: #0B1220;
  --red: #E5484D;
  --green: #16A34A;
  color-scheme: light;
  accent-color: #2F6BEA;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #fff; }
body {
  display: flex; gap: 6px; padding: 6px; color: var(--text);
  font: 13px/1.35 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "tnum";
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 13px; margin: 0; font-weight: 700; white-space: nowrap; }
h2 { font-size: 13px; margin: 0 0 6px; font-weight: 650; }
svg.i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* sidebar card */
#nav { width: 214px; flex: none; height: calc(100vh - 12px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px 8px; overflow-y: auto; }
body.nav-off #nav { display: none; }
.nav-brand { font-weight: 700; font-size: 14px; line-height: 1.2; padding: 2px 6px 14px; }
.nav-sec-h { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px; background: none; border: 0; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: #475467; text-transform: uppercase; cursor: pointer; }
.nav-sec-h svg { width: 13px; height: 13px; }
.nav-sec-body { background: var(--soft); border-radius: 8px; padding: 6px; }
.nav-sec.closed .nav-sec-body { display: none; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; color: #1D2939; font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.nav-link:last-child { margin-bottom: 0; }
.nav-link:hover { background: var(--line); }
.nav-link.active { background: var(--blue); color: #fff; font-weight: 600; }
.nav-count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; min-width: 18px; text-align: center; padding: 0 5px; border-radius: 9px; animation: blink 1.1s infinite; }
.nav-foot { margin-top: auto; }
.nav-demo { padding: 8px 6px; font-size: 11.5px; color: var(--muted); }
.nav-demo p { margin: 0 0 3px; }
.nav-user { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; flex: none; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: var(--soft); }
.nav-user-t { min-width: 0; flex: 1; }
.nav-user-t b { display: block; font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-t span { font-size: 11.5px; color: var(--muted); }
.nav-user select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* main */
#main { flex: 1; min-width: 0; height: calc(100vh - 12px); display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; flex: none; }
.topbar-r { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* controls */
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; background-color: #fff; height: 32px; }
select { appearance: none; -webkit-appearance: none; padding-right: 26px; font-weight: 500; background-repeat: no-repeat; background-position: right 8px center; background-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E"); }
.topbar select { min-width: 132px; max-width: 170px; }
.topbar select.wide { min-width: 180px; max-width: 240px; }
textarea { height: auto; padding: 6px 9px; resize: vertical; width: 100%; }
input[type=checkbox] { height: auto; margin: 0; }
input[type=date] { width: 128px; }
input::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
input:disabled, select:disabled { background-color: var(--soft); color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 0 11px; }
.btn:hover { background: var(--soft); }
.btn.sm { height: 25px; padding: 0 8px; font-size: 11.5px; border-radius: 5px; border-color: var(--line-strong); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.link { border: 0; background: none; padding: 0; height: auto; color: var(--blue); font-size: 11.5px; }
.btn:disabled, .btn.off { color: #98A2B3; cursor: default; background: #fff; }
.icon-btn { width: 32px; padding: 0; }

/* dark summary strip */
.strip { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; min-height: 49px; padding: 7px 14px; background: var(--navy); color: #fff; border-radius: 8px; margin-bottom: 8px; }
.strip-b { padding-right: 22px; border-right: 1px solid #2A3345; }
.strip-t { font-weight: 700; font-size: 13px; white-space: nowrap; }
.live { color: #34D399; font-weight: 500; font-size: 11.5px; margin-left: 8px; }
.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #34D399; margin-right: 4px; vertical-align: 1px; }
.strip-s { font-size: 11.5px; color: #98A2B3; white-space: nowrap; }
.stat b { display: block; font-size: 17px; font-weight: 700; line-height: 1.15; }
.stat span { font-size: 10px; letter-spacing: .03em; color: #98A2B3; text-transform: uppercase; white-space: nowrap; }
.stat.hot b { color: #FF6B6B; }
.strip-a { margin-left: auto; }

/* tabs and search */
.tabsrow { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.seg { display: flex; background: var(--soft); border-radius: 8px; padding: 3px; overflow-x: auto; }
.seg:empty { display: none; }
.view { background: none; border: 0; border-radius: 6px; padding: 4px 10px; font: inherit; font-weight: 500; color: #1D2939; cursor: pointer; white-space: nowrap; }
.view b { font-weight: 400; font-size: 11px; margin-left: 7px; color: var(--muted); }
.view:hover { background: var(--line); }
.view.active { background: #fff; font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search input { width: 240px; padding-left: 32px; border-style: dashed; border-color: var(--line-strong); }
.tabsrow label { display: flex; align-items: center; gap: 5px; color: var(--muted); }

/* table card */
.grid-host { flex: 1; min-height: 0; display: flex; }
.grid { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gscroll { flex: 1; min-height: 0; overflow: auto; }
.gt { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px; }
.gt th, .gt td { height: 40px; padding: 0 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.gt thead th { position: sticky; top: 0; z-index: 3; height: 37px; font-size: 12px; font-weight: 600; color: #1D2939; }
.gt tbody tr:hover td { background: #FAFBFC; }
.gt tbody tr.sel td { background: #EEF4FF; }
.gt .num { text-align: right; }
.gt .gsel { position: sticky; left: 0; z-index: 2; padding: 0; text-align: center; font-weight: 600; }
.gt thead .gsel { z-index: 5; }
.gsel input { display: none; }
tr:hover > .gsel input, tr.sel > .gsel input, .has-sel .gsel input, .gsel input:focus-visible { display: inline-block; }
tr:hover > .gsel .rownum, tr.sel > .gsel .rownum, .has-sel .gsel .rownum { display: none; }
.gt .gstick { position: sticky; z-index: 2; }
.gt thead .gstick { z-index: 4; }
.gt tfoot td { position: sticky; bottom: 0; z-index: 2; font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.gt tfoot .gsel, .gt tfoot .gstick { z-index: 3; }
.gt td:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.gh { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 4px; }
.si { color: #475467; display: inline-flex; font-style: normal; font-size: 9px; }
.si svg { width: 12px; height: 12px; }
.si.on { color: var(--blue); }
.rz { position: absolute; top: 0; right: 0; width: 5px; height: 100%; cursor: col-resize; }
.rz:hover { background: var(--line); }
.gt td.editable { cursor: cell; }
.gt tbody tr td.editable:hover { box-shadow: inset 0 0 0 1px #A9C4F5; }
.gt td.locked { cursor: not-allowed; }
.gt td.editing { padding: 0; overflow: visible; }
.gin { width: 100%; height: 38px; border: 0; border-radius: 0; outline: 2px solid var(--blue); outline-offset: -2px; }
.gempty { padding: 26px 16px; color: var(--muted); text-align: center; }
.gcols { position: absolute; top: 7px; right: 8px; z-index: 7; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 0; border-radius: 5px; color: #475467; cursor: pointer; }
.gcols:hover { background: var(--soft); }
.gbulk { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EEF4FF; flex: none; }
.gbulk ~ .gcols { top: 45px; }
.gfoot { display: flex; align-items: center; gap: 14px; padding: 3px 10px; border-top: 1px solid var(--line); font-size: 12px; color: #344054; flex: none; min-height: 30px; }
.ghint { color: var(--muted); }
.gpager { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.gpager select { height: 25px; border-radius: 5px; }
.gpop { position: absolute; right: 8px; top: 34px; z-index: 10; width: 200px; max-height: 70%; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; box-shadow: 0 4px 14px rgba(16, 24, 40, .1); }
.gpop-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gpop label { display: flex; gap: 7px; align-items: center; padding: 3px 0; }

/* two-line cells */
.l1, .l2 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l1 { font-weight: 500; line-height: 17px; }
.l2 { font-size: 11.5px; line-height: 15px; color: var(--muted); }
.l2 b { font-size: 12.5px; color: var(--text); font-weight: 600; margin-right: 4px; }
.sub { color: var(--muted); }

/* small tags */
.tag { display: inline-block; font-size: 11px; font-weight: 500; line-height: 16px; padding: 0 6px; border-radius: 4px; border: 1px solid transparent; white-space: nowrap; }
.t-outline { background: #fff; border-color: var(--line); color: #344054; }
.t-plain { background: var(--soft); color: #344054; }
.t-amber { background: #FFF6E5; border-color: #F7C266; color: #C27A0E; }
.t-red { background: #FEECEC; border-color: #F5A3A3; color: #C4282D; }
.t-green { background: #ECFDF3; border-color: #86DCA8; color: #15803D; }
.t-blue { background: #EEF4FF; border-color: #A9C4F5; color: #1F56C7; }
.ptime { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; line-height: 14px; padding: 0 6px; border-radius: 4px; border: 1px solid #86DCA8; background: #ECFDF3; color: #15803D; }
.ptime i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.ptime.off { background: var(--soft); border-color: var(--line); color: #475467; }
.ptime.off i { background: #98A2B3; }
.req { color: var(--red); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.status-new { display: inline-flex; gap: 4px; align-items: center; }
.new { font-size: 9.5px; font-weight: 750; line-height: 14px; padding: 0 4px; border-radius: 3px; background: var(--blue); color: #fff; animation: blink 1.1s infinite; }
.new.red { background: var(--red); }
@media (prefers-reduced-motion: reduce) { .new, .nav-count { animation: none; } }

/* issue record */
.record { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.cmdbar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 2px 0 8px; background: #fff; }
.count { color: var(--muted); }
.right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.rec-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 49px; padding: 7px 14px; background: var(--navy); color: #fff; border-radius: 8px; margin-bottom: 8px; }
.rec-title h1 { font-size: 14px; }
.docno { color: #98A2B3; font-weight: 500; }
.fg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.fg-item { display: flex; min-width: 0; border-bottom: 1px solid var(--line); min-height: 40px; }
.fg-item.wide { grid-column: 1 / -1; }
.fg-l { flex: none; width: 112px; padding: 11px 10px; font-size: 12px; color: var(--muted); }
.fg-v { flex: 1; min-width: 0; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; font-weight: 500; overflow-wrap: anywhere; }
.fg-v input:not([type=checkbox]), .fg-v select, .fg-v textarea, .fg-v .checks { width: 100%; }
.fg-v.lockv { cursor: not-allowed; color: var(--muted); }
.ferr { color: var(--red); font-size: 11.5px; }
.ferr:empty { display: none; }
.invalid input:not([type=checkbox]), .invalid select, .invalid textarea { border-color: var(--red); }
.errors { background: #FEECEC; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.errors[hidden] { display: none; }
section.block { margin-bottom: 10px; }
.form { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.form-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.field.wide { margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; color: var(--text); font-size: 13px; }
.hint { font-size: 11.5px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 3px 14px; padding: 3px 0; color: var(--text); font-size: 12.5px; font-weight: 400; }
.checks label { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.closed-note { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.grid.plain .gscroll { max-height: 320px; }

/* dialog */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 40, .35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 440px; max-width: 100%; background: #fff; border-radius: 10px; padding: 14px 16px; }
.dialog p { margin: 0 0 10px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }

#toast { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 60; background: var(--navy); color: #fff; padding: 7px 14px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
#toast.show { opacity: 1; }

@media (max-width: 860px) {
  body { flex-direction: column; height: auto; }
  #nav { width: 100%; height: auto; }
  .nav-foot { display: none; }
  #main { height: calc(100vh - 170px); }
  .fg, .form-row { grid-template-columns: minmax(0, 1fr); }
  .search, .search input { width: 100%; }
  .topbar-r { margin-left: 0; }
}

/* issue page: two working columns, cards, feed */
.rec-title { gap: 8px 22px; }
.rec-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 22px; border-right: 1px solid #2A3345; }
.stat.sm b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 5px; min-height: 18px; }
.rec-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.rec-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card-h { padding: 9px 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.card-b { padding: 12px; }
.card.flush .card-b { padding: 0; }
.card .grid { border: 0; border-radius: 0; }
.dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl dd b { font-weight: 600; }
.fg.one { grid-template-columns: minmax(0, 1fr); border-radius: 8px; margin-bottom: 6px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.feed li { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.ev-h { display: flex; align-items: center; gap: 8px; }
.ev-h b { font-weight: 600; }
.ev-c { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ev-n { margin-top: 3px; }
#talk-form .field { margin-bottom: 10px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.pick span:hover { background: var(--soft); }
.pick input:checked + span { background: #EEF4FF; border-color: var(--blue); color: var(--blue-dark); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.invalid .pick span { border-color: var(--red); }
.talk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.talk-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.talk-row .field { margin-bottom: 0 !important; }
.more { margin-top: 10px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.more-b { padding-top: 8px; }
.talk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 1100px) {
  .rec-body { grid-template-columns: minmax(0, 1fr); }
  .talk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.drv b { font-weight: 600; margin-right: 2px; }
.drv .sub { font-size: 11.5px; margin-left: 2px; }

/* yard cell with distance, visit timeline */
.yardl { display: flex; align-items: center; gap: 4px; }
.pinbtn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--blue); cursor: pointer; flex: none; }
.pinbtn svg { width: 13px; height: 13px; }
.pinbtn:hover { background: #EEF4FF; border-color: #A9C4F5; }
.tl { display: flex; align-items: center; gap: 5px; font-weight: 400; }
.tl-s { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.tl-s b { color: var(--text); font-weight: 600; font-size: 12px; }
.tl-s i { width: 7px; height: 7px; border-radius: 50%; background: #98A2B3; }
.s-near i { background: #F59E0B; } .s-in i { background: var(--green); } .s-out i { background: #98A2B3; }
.s-load i { background: var(--blue); } .s-eta i { background: #fff; box-shadow: inset 0 0 0 2px var(--blue); }
.tl-a { color: #98A2B3; }
.l2 .ptime { margin-right: 4px; }
.l2 > b { color: var(--text); font-weight: 600; }

/* map window */
.mapdlg { width: min(1180px, 96vw); height: min(720px, 90vh); background: #fff; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.map-t { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.map-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); }
.map-side { border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.map-sec { font-size: 12px; font-weight: 600; color: #475467; text-transform: uppercase; letter-spacing: .02em; }
#map-yards { display: flex; flex-direction: column; gap: 6px; }
.yrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: var(--text); cursor: pointer; }
.yrow:hover { background: var(--soft); }
.yrow.on { border-color: var(--blue); background: #EEF4FF; }
.yrow-t { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.yrow-t b { font-weight: 600; }
.yrow-n { text-align: right; flex: none; }
.yrow-n b { display: block; font-size: 14px; }
.yrow-n span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.map-note { font-size: 11.5px; color: var(--muted); }
.map-canvas { position: relative; min-height: 0; }
.mk-yard { display: inline-block; white-space: nowrap; transform: translate(-4px, -4px); padding: 2px 7px 2px 18px; background: #fff; border: 1px solid #D0D5DD; border-radius: 10px; font: 600 11px Inter, sans-serif; color: #101828; position: relative; }
.mk-yard::before { content: ""; position: absolute; left: 5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--green); }
.mk-truck { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 6px; background: var(--navy); color: #fff; border-radius: 14px; font: 700 11px Inter, sans-serif; white-space: nowrap; }
.mk-truck svg { width: 15px; height: 15px; }
@media (max-width: 860px) { .map-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(300px, 1fr); } .map-side { border-right: 0; border-bottom: 1px solid var(--line); } }

/* retention: kanban, call window */
.kanban { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 8px; overflow-x: auto; }
.kcol { display: flex; flex-direction: column; min-height: 0; background: var(--soft); border-radius: 10px; border: 1px solid transparent; }
.kcol.over { border-color: var(--blue); background: #EEF4FF; }
.kcol-h { display: flex; justify-content: space-between; padding: 9px 10px; font-weight: 600; }
.kcol-h b { color: var(--muted); font-weight: 500; }
.kcol-b { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; cursor: grab; }
.kcard[draggable=false] { cursor: default; opacity: .8; }
.kcard.dragging { opacity: .4; }
.kc-h { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.kc-h a { font-weight: 600; margin-right: auto; }
.kc-d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-p { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-f { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.kc-f .late { color: var(--red); font-weight: 600; }
.calldlg { width: min(1180px, 96vw); height: min(760px, 92vh); background: #fff; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.call-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.cx { border-right: 1px solid var(--line); padding: 12px 14px; overflow-y: auto; }
.cx-why { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.cx-dl { grid-template-columns: 112px minmax(0, 1fr); gap: 7px 12px; }
.cx-dl dd.warn { color: #B54708; font-weight: 600; }
.cx-sec { margin: 14px 0 4px; font-size: 12px; font-weight: 600; color: #475467; text-transform: uppercase; letter-spacing: .02em; }
.feed.mini { max-height: none; border: 1px solid var(--line); border-radius: 8px; }
.feed.mini li { padding: 7px 10px; }
.paybars { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-bottom: 3px; }
.paybars i { width: 14px; background: #D0D5DD; border-radius: 2px 2px 0 0; }
.paybars i.now { background: var(--blue); }
.call-form { padding: 12px 14px; overflow-y: auto; }
.call-form .field { margin-bottom: 12px; }
.fu { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qbtn { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.qbtn:hover { background: var(--soft); }
.qbtn.on { background: #EEF4FF; border-color: var(--blue); color: var(--blue-dark); font-weight: 600; }
.pick label.off span { color: #98A2B3; cursor: not-allowed; }
.mode-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 12px; background: var(--soft); }
.mode-box .field:last-child { margin-bottom: 0; }
.call-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .call-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; } .cx { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Inspection Radar ---------- */
.lnk { color: var(--blue); font-weight: 500; }
.lnk:hover { text-decoration: underline; }
.hotv { color: var(--red); font-weight: 700; }
.split { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.mapbox { position: relative; flex: none; height: 38vh; min-height: 240px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--soft); }
.map-legend { position: absolute; z-index: 500; left: 50px; top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 11.5px; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff; box-shadow: 0 0 0 1px #D0D5DD; }
.map-legend i.tk { width: 7px; height: 7px; background: var(--blue); box-shadow: 0 0 0 1px var(--navy); }
.leaflet-tooltip { font: 12px/1.35 Inter, sans-serif; }
.rec-title .stat.sm b { font-size: 14px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.mini th, table.mini td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.mini th { font-weight: 600; font-size: 12px; color: #1D2939; background: #fff; }
table.mini tr:last-child td { border-bottom: 0; }
table.mini .num { text-align: right; }
.sec-l { font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.sec-l:first-child { margin-top: 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 74px; }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar i { display: block; width: 100%; background: #C7D7FB; border-radius: 2px 2px 0 0; }
.bar.now i { background: var(--blue); }
.bar span { font-size: 10px; color: var(--muted); height: 13px; line-height: 13px; white-space: nowrap; }
.rep-note { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
@media (max-width: 860px) { .mapbox { height: 300px; } }

/* ---------- map view ---------- */
.mv { flex: 1; min-height: 0; display: flex; gap: 6px; }
.mv:fullscreen { background: #fff; padding: 6px; }
.mv-list { width: 340px; flex: none; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.mv.nolist .mv-list { display: none; }
.mv-lh { padding: 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.mv-tabs .view { flex: 1; }
.mv-lh .search, .mv-lh .search input { width: 100%; }
.mv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pill { height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 11.5px; font-weight: 500; color: #344054; cursor: pointer; }
.pill b { font-weight: 600; color: var(--muted); margin-left: 2px; }
.pill.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill.on b { color: #DCE7FF; }
.mv-n { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.mv-rows { flex: 1; min-height: 0; overflow-y: auto; }
.mr { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mr:hover { background: #FAFBFC; }
.mr.on { background: #EEF4FF; box-shadow: inset 3px 0 0 var(--blue); }
.mr:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.mr-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mr-h b { font-weight: 600; }
.mr-h > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mph { font-weight: 600; font-size: 12px; white-space: nowrap; }
.mr-s { margin-top: 2px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-s svg.i { width: 12px; height: 12px; }
.mr-s b { color: var(--text); }
.mr-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.mr-t .sub { font-size: 11px; margin-left: auto; }
.mr.sm { padding: 7px 12px; }
.mv-map { position: relative; flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #E8ECF0; }
#map { position: absolute; inset: 0; }
.mv-top { position: absolute; z-index: 700; top: 10px; left: 10px; }
.pillseg { background: rgba(255,255,255,.95); box-shadow: 0 1px 4px rgba(16,24,40,.15); }
.pillseg .view.active { background: var(--blue); color: #fff; box-shadow: none; }
.pillseg .view.active b { color: #DCE7FF; }
.mv-tools { position: absolute; z-index: 700; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
.mvb { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(16,24,40,.12); color: #344054; cursor: pointer; }
.mvb:hover { background: var(--soft); }
.mv-card { position: absolute; z-index: 800; top: 10px; right: 54px; width: 360px; max-width: calc(100% - 70px); max-height: calc(100% - 96px); overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(16,24,40,.18); }
.mv-card[hidden], .mv-bar[hidden] { display: none; }
.cd-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 8px; }
.cd-t { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cd-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cd-s b { color: var(--text); }
.mvx { border: 0; background: var(--soft); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: #344054; flex: none; }
.cd-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kv { background: #fff; padding: 7px 12px; }
.kv span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.kv b { font-size: 14px; font-weight: 650; }
.cd-sec { padding: 10px 14px 4px; font-size: 11.5px; font-weight: 600; color: #475467; text-transform: uppercase; letter-spacing: .02em; }
.cd-p { padding: 2px 14px 6px; font-size: 12.5px; }
.cd-p svg.i { width: 13px; height: 13px; vertical-align: -2px; color: var(--muted); }
.cd-btns { display: flex; gap: 6px; padding: 6px 14px 4px; }
.cd-btns .btn, .cd-btns select { flex: 1; }
.cd-list { border-top: 1px solid var(--line); margin-top: 4px; }
.cd-list .mr:last-child { border-bottom: 0; }
.mv-bar { position: absolute; z-index: 750; left: 10px; right: 54px; bottom: 10px; background: #fff; border-radius: 10px; box-shadow: 0 4px 16px rgba(16,24,40,.16); padding: 9px 14px 6px; }
.bar-h { font-size: 12.5px; margin-bottom: 4px; }
.tline { display: flex; align-items: center; gap: 10px; height: 44px; }
.tl-a { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tl-track { position: relative; flex: 1; height: 6px; background: #C7D7FB; border-radius: 3px; margin-bottom: 16px; }
.tl-m { position: absolute; top: -4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #D0D5DD; }
.tl-m span { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); font-size: 10px; font-style: normal; line-height: 1.2; color: #344054; white-space: nowrap; text-align: center; }
.tl-hot { background: #E5484D; } .tl-elevated { background: #F59E0B; } .tl-normal { background: #98A2B3; width: 10px; height: 10px; top: -2px; margin-left: -5px; }
.tl-normal span { display: none; }
.mv-legend { position: absolute; z-index: 700; left: 10px; bottom: 30px; display: flex; flex-wrap: wrap; gap: 4px 10px; max-width: 60%; background: rgba(255,255,255,.92); border-radius: 8px; padding: 4px 9px; font-size: 11px; box-shadow: 0 1px 4px rgba(16,24,40,.12); }
.mv-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mv-legend i { width: 9px; height: 9px; border-radius: 50%; }
.mv-legend em.la { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #0B1220; }
.la.a { border-bottom-color: #E5484D !important; } .la.w { border-bottom-color: #F59E0B !important; } .la.o { border-bottom-color: #0B1220 !important; }
.mv-card ~ .mv-legend { }
.sumi { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sumi b { color: var(--text); font-size: 13px; margin-right: 2px; }
.tk { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tk svg { width: 18px; height: 18px; fill: #0B1220; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.tk-alert svg { fill: #E5484D; } .tk-watch svg { fill: #F59E0B; } .tk-park svg { fill: #98A2B3; width: 12px; height: 12px; }
.tk.sel svg { fill: #2F6BEA; width: 26px; height: 26px; }
.tk-l { position: absolute; left: 26px; top: 3px; background: #0B1220; color: #fff; font: 700 11px Inter, sans-serif; padding: 1px 6px; border-radius: 9px; white-space: nowrap; }
.slabel { font: 600 11px Inter, sans-serif; color: #B42318; background: rgba(255,255,255,.9); padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.rp { display: inline-flex; align-items: center; gap: 4px; transform: translate(-50%, -150%); white-space: nowrap; padding: 2px 9px; border-radius: 11px; font: 600 11px Inter, sans-serif; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.rp-hot { background: #E5484D; } .rp-elevated { background: #F59E0B; }
.rp-end { background: #fff; color: #B42318; border: 1.5px solid #E5484D; transform: translate(-12px, -50%); }
.rp-end i { font-style: normal; background: #E5484D; color: #fff; border-radius: 50%; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.pinbtn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--blue); vertical-align: -4px; }
.pinbtn svg { width: 13px; height: 13px; }
@media (max-width: 860px) { .mv { flex-direction: column; } .mv-list { width: 100%; height: 40vh; } .mv-map { min-height: 60vh; } .mv-card { left: 10px; right: 10px; width: auto; max-width: none; } }
