:root {
  --navy: #112f64;
  --yellow: #f7c21b;
  --bg: #eef2f8;
  --ink: #14213d;
  --muted: #6b7690;
  --line: #e1e7f0;
  --green: #14a44d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Heebo', system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.ob {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
}
.ob img {
  height: 56px;
}
.ob h1 {
  margin: 0;
  font-size: 19px;
}
.ob span {
  font-size: 13px;
  opacity: 0.8;
}
.ob div {
  flex: 1;
}
.ob-back {
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.demo-banner {
  background: #fff4cc;
  color: #6b4e00;
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f0dc94;
}
.og {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  padding: 14px;
  max-width: 1400px;
  margin: 0 auto;
}
.panel {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 20px rgba(17, 47, 100, 0.08);
  min-width: 0;
}
.panel h2 {
  font-size: 16px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-panel {
  grid-column: 1/-1;
}
.flow {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.node {
  flex: 1;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  position: relative;
  transition:
    box-shadow 0.3s,
    border-color 0.3s;
  min-width: 0;
}
.node .ni {
  font-size: 26px;
}
.node b {
  display: block;
  font-size: 14.5px;
  margin-top: 2px;
}
.node span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.node em {
  position: absolute;
  top: -9px;
  left: -6px;
  background: var(--navy);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 7px;
}
.node.flash {
  border-color: var(--yellow);
  box-shadow: 0 0 0 5px rgba(247, 194, 27, 0.3);
}
.n-pri {
  background: #f6f8fd;
}
.n-itu {
  background: #f3fbf6;
}
.n-wob {
  background: #fffaf0;
}
.arrow {
  width: 34px;
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
}
.arrow::before {
  content: '';
  position: absolute;
  right: 0;
  left: 6px;
  top: 50%;
  height: 2px;
  background: #c8d1e2;
}
.arrow::after {
  content: '';
  position: absolute;
  left: 0;
  top: calc(50% - 6px);
  border: 6px solid transparent;
  border-right-color: #c8d1e2;
}
.arrow i {
  position: absolute;
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  animation: mv 1.6s linear infinite;
}
@keyframes mv {
  from {
    right: 0;
  }
  to {
    right: calc(100% - 8px);
  }
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.kpis div {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.kpis b {
  display: block;
  font-size: 22px;
  color: var(--navy);
}
.kpis span {
  font-size: 12px;
  color: var(--muted);
}
.live {
  color: #e5484d;
  font-size: 12px;
  animation: bl 1s infinite;
}
@keyframes bl {
  50% {
    opacity: 0.3;
  }
}
.log {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 330px;
  overflow-y: auto;
  font-size: 13.5px;
}
.log li {
  display: flex;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
  animation: li 0.4s ease;
}
@keyframes li {
  from {
    background: #fff6d6;
  }
  to {
    background: transparent;
  }
}
.log time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
  direction: ltr;
}
.tag {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  padding: 1px 7px;
  height: fit-content;
}
.tag.priority {
  background: #e5eeff;
  color: #1d4fb8;
}
.tag.wobelt {
  background: #fff1d6;
  color: #8a5a00;
}
.tag.ituran {
  background: #e3f6ea;
  color: #0e7a3a;
}
.tag.app {
  background: #f1ecff;
  color: #6b46c1;
}
.log li.mine {
  background: #fffbe9;
}
#fleetMap {
  height: 330px;
  border-radius: 12px;
}
.table-panel {
  grid-column: 1/-1;
}
.tw {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 820px;
}
th {
  background: #f1f4fa;
  text-align: right;
  padding: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td.so {
  direction: ltr;
  text-align: right;
  font-weight: 700;
  color: var(--navy);
}
tr.mine td {
  background: #fffbe9;
  font-weight: 600;
}
.st {
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 8px;
}
.st.s0 {
  background: #e5eeff;
  color: #1d4fb8;
}
.st.s1 {
  background: #fff1d6;
  color: #8a5a00;
}
.st.s2,
.st.s3 {
  background: #fff4cc;
  color: #7a5700;
}
.st.s4 {
  background: #e3f6ea;
  color: #0e7a3a;
}
.plate {
  direction: ltr;
  display: inline-block;
  background: #ffd200;
  color: #111;
  font-weight: 800;
  font-size: 11.5px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1.5px solid #111;
}
.muted {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.tk {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: var(--navy);
}
.tk.mine {
  background: var(--navy);
  color: var(--yellow);
  width: 36px;
  height: 36px;
}
@media (max-width: 900px) {
  .og {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .flow {
    flex-direction: column;
  }
  .arrow {
    width: auto;
    height: 22px;
    justify-content: center;
  }
  .arrow::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 6px;
    height: auto;
    width: 2px;
  }
  .arrow::after {
    left: calc(50% - 6px);
    top: auto;
    bottom: -6px;
    border-color: transparent;
    border-top-color: #c8d1e2;
  }
  .arrow i {
    right: calc(50% - 4px);
    animation: mvv 1.4s linear infinite;
  }
  @keyframes mvv {
    from {
      top: 0;
    }
    to {
      top: calc(100% - 8px);
    }
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .ob h1 {
    font-size: 16px;
  }
  .ob img {
    height: 46px;
  }
  .ob-back {
    font-size: 12px;
  }
  .log {
    height: 280px;
  }
}

@media (max-width: 900px) {
  .flow {
    gap: 0;
  }
  .node {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    text-align: right;
    padding: 8px 12px;
    column-gap: 8px;
  }
  .node .ni {
    grid-row: 1/3;
    font-size: 22px;
    align-self: center;
  }
  .node b {
    margin: 0;
    font-size: 14px;
  }
  .node span {
    margin: 0;
  }
  .arrow {
    height: 14px;
  }
  .ob {
    flex-wrap: wrap;
  }
}

.tag.dispatch {
  background: #fff1d6;
  color: #8a5a00;
}
.tag.driver {
  background: #e3f6ea;
  color: #0e7a3a;
}
.tag.dn {
  background: #e8f4fb;
  color: #0b5f86;
}
.tag.cus {
  background: #f1f3f7;
  color: #3a4660;
}
.n-dis {
  background: #fffaf0;
}
.n-drv {
  background: #f3fbf6;
}
.n-dn {
  background: #f2f8fc;
}

.tag.appr {
  background: #fdeee0;
  color: #b54708;
}

.occ-b {
  display: block;
  width: fit-content;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  color: #7a5200;
  background: #fff1c2;
  border: 1px solid #f1d27a;
  border-radius: 6px;
  padding: 1px 6px;
}

/* v3p */
.xbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.xb {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: #eef2f9;
  color: #1b2a4c;
  line-height: 1.5;
}
.xb.h {
  background: #fff3d1;
  color: #7a4b00;
}
.xb.f {
  background: #e8f0ff;
  color: #123c8a;
}
.xb.n {
  background: #f3f4f6;
  color: #333;
  font-weight: 600;
}
.xb.s {
  background: #e9f7ef;
  color: #11643a;
}
.xb.heat {
  background: #ffe9e0;
  color: #8a2b00;
}

.dup-b {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 800;
  color: #7a4b00;
  background: #fff3d1;
  border-radius: 6px;
  padding: 1px 6px;
  width: max-content;
}
.st.sx {
  background: #fde8e8;
  color: #b42318;
}
.xb.cx {
  background: #fde8e8;
  color: #b42318;
}
tr.cxr td {
  opacity: 0.75;
}
tr.cxr td.so {
  text-decoration: line-through;
}
