:root {
  --navy: #12355b;
  --navy2: #1f4f82;
  --ink: #1b2430;
  --muted: #6b7785;
  --line: #e3e8ef;
  --open: #1f8a4c;
  --openbg: #e6f4ea;
  --close: #c0392b;
  --closebg: #fdeceb;
  --pend: #b8860b;
  --pendbg: #fdf6e3;
  --bg: #f5f7fa;
  --card: #fff;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 18px 60px
}

header.top {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 3px solid var(--navy);
  padding-bottom: 13px;
  margin-bottom: 16px
}

h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: .2px;
  color: var(--navy)
}

.sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px
}

.sub a {
  color: var(--navy)
}

.stamp {
  text-align: right;
  font-size: 12px;
  color: var(--muted)
}

.stamp b {
  display: block;
  font-size: 15px;
  color: var(--ink)
}

.livebar {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-end;
  margin-bottom: 5px
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b9c4d1;
  display: inline-block;
  flex: 0 0 auto
}

.dot.live {
  background: var(--open);
  box-shadow: 0 0 0 3px rgba(31, 138, 76, .16)
}

.dot.snap {
  background: #d9a406;
  box-shadow: 0 0 0 3px rgba(217, 164, 6, .16)
}

.dot.err {
  background: var(--close);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .16)
}

.dot.chk {
  background: var(--navy2);
  animation: pulse 1s infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .35
  }
}

.livetxt {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink)
}

.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 250, .97);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .05);
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center
}

.filters .flabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 700;
  margin-right: 0
}

input[type=search],
select,
.ms>summary {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
  font-family: inherit
}

input[type=search] {
  width: 164px
}

input[type=search]:focus {
  border-color: #9bb6d4;
  box-shadow: 0 0 0 3px rgba(155, 182, 212, .25)
}

.ms {
  position: relative
}

.ms>summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-width: 116px;
  justify-content: space-between
}

.ms>summary::-webkit-details-marker {
  display: none
}

.ms>summary:after {
  content: "\25BE";
  color: var(--muted);
  font-size: 10px
}

.ms[open]>summary {
  border-color: #9bb6d4
}

.ms .cnt {
  font-size: 11px;
  color: #fff;
  background: var(--navy);
  border-radius: 99px;
  padding: 0 7px;
  font-weight: 700
}

.msbody {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 250px;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .14);
  padding: 8px;
  z-index: 30
}

.msbody label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer
}

.msbody label:hover {
  background: #f3f7fb
}

.msbody .mini-actions {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 2px 2px 8px;
  margin-bottom: 6px
}

.msbody .mini-actions button {
  flex: 1;
  font-size: 11.5px;
  padding: 4px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: var(--navy);
  font-weight: 600
}

.msbody .mini-actions button:hover {
  background: #eef4fa
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff
}

.seg button {
  border: 0;
  background: #fff;
  padding: 7px 9px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600
}

.seg button+button {
  border-left: 1px solid var(--line)
}

.seg button.on {
  background: var(--navy);
  color: #fff
}

.switch {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
  user-select: none
}

.switch input {
  accent-color: var(--navy);
  margin: 0
}

.reset {
  margin-left: 0;
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer
}

.reset:hover {
  background: #eef4fa
}

.scopebar {
  font-size: 12px;
  color: var(--muted);
  margin: -6px 0 14px
}

.scopebar b {
  color: var(--ink)
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  margin-bottom: 18px
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04)
}

.kpi .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted)
}

.kpi .val {
  font-size: 26px;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums
}

.kpi.open .val {
  color: var(--open)
}

.kpi.close .val {
  color: var(--close)
}

.kpi.pend .val {
  color: var(--pend)
}

.kpi.zone .val {
  color: var(--navy)
}

.bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 9px;
  display: flex
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  overflow: hidden;
  margin-bottom: 18px
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line)
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  color: var(--navy)
}

.panel-head .hint {
  font-size: 12px;
  color: var(--muted)
}

table {
  width: 100%;
  border-collapse: collapse
}

th,
td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line)
}

thead th {
  background: #f0f4f9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: pointer;
  user-select: none
}

thead th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums
}

thead th.ctr,
td.ctr {
  text-align: center
}

tbody tr.zone-row {
  cursor: pointer
}

tbody tr.zone-row:hover {
  background: #f7fafd
}

tbody tr.zone-row.sel {
  background: #eaf2fb;
  box-shadow: inset 3px 0 0 var(--navy)
}

td.zname {
  font-weight: 600
}

.sortcaret {
  color: #b9c4d1;
  font-size: 9px;
  margin-left: 3px
}

th.sorted .sortcaret {
  color: var(--navy)
}

.pill {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700
}

.pill.o {
  color: var(--open);
  background: var(--openbg)
}

.pill.c {
  color: var(--close);
  background: var(--closebg)
}

.pill.p {
  color: var(--pend);
  background: var(--pendbg)
}

.badge {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700
}

.badge.o {
  color: var(--open);
  background: var(--openbg)
}

.badge.c {
  color: var(--close);
  background: var(--closebg)
}

.badge.p {
  color: var(--pend);
  background: var(--pendbg)
}

body.single-update .updcol {
  display: none
}

.mini {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end
}

.mini .tr {
  width: 104px;
  height: 9px;
  border-radius: 99px;
  background: #eef1f5;
  display: flex;
  overflow: hidden
}

.mini .tr i {
  display: block;
  height: 100%
}

.scroll {
  max-height: 540px;
  overflow: auto
}

.scroll-free {
  overflow: auto
}

.scroll-free thead th {
  position: sticky;
  top: 0
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 13px
}

.note {
  background: #fff9e8;
  border: 1px solid #f2e2b3;
  color: #7a6520;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-bottom: 16px
}

#note {
  transition: opacity .55s ease, max-height .55s ease;
  max-height: 600px
}

#note.gone {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  pointer-events: none
}

.note b {
  color: #5f4e18
}

.note button {
  font: inherit;
  font-weight: 700;
  background: #fff;
  border: 1px solid #e2cd8a;
  border-radius: 6px;
  padding: 2px 9px;
  cursor: pointer;
  color: #7a6520
}

.note.info {
  background: #eef4fa;
  border-color: #c8dbf0;
  color: #25476b
}

.note.info b {
  color: #12355b
}

footer {
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  margin-top: 24px;
  line-height: 1.7
}

code {
  background: #eef1f5;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px
}

@media print {
  body {
    background: #fff;
    font-size: 11px
  }

  .filters,
  .no-print,
  .reset,
  .switch,
  .seg,
  .ms,
  .scopebar,
  .livebar {
    display: none !important
  }

  .panel {
    box-shadow: none;
    border-color: #ccc;
    break-inside: avoid
  }

  .scroll {
    max-height: none;
    overflow: visible
  }

  .wrap {
    max-width: none;
    padding: 0
  }

  thead th {
    position: static
  }

  .note {
    display: none
  }
}