
:root {
  --bg: #e7eef3;
  --paper: #ffffff;
  --ink: #142433;
  --muted: #5c6d7c;
  --line: #d5e0e8;
  --navy: #102a3c;
  --teal: #0f6e82;
  --teal-soft: #e5f4f7;
  --amber: #8a5a12;
  --rose: #9f1239;
  --good: #0c7a48;
  --shadow: 0 1px 2px rgba(16, 42, 60, 0.06), 0 10px 28px rgba(16, 42, 60, 0.05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
a, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; }
.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  background: var(--navy);
  color: #fff;
  box-shadow: inset 0 -3px 0 #1aa3c4;
}

.hero-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 28px 0 22px;
}

.kicker {
  color: #9fd0de;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 8px;
  max-width: 62ch;
  color: #d5e3ec;
}

.facts {
  display: flex;
  gap: 8px;
  margin: 0;
}

.facts div {
  min-width: 108px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.facts dt {
  color: #9fd0de;
  font-size: 12px;
}

.facts dd {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 800;
}

main {
  padding-bottom: 40px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  margin: 0 -8px;
  padding: 12px 8px;
  background: rgba(231, 238, 243, 0.92);
  backdrop-filter: blur(10px);
}

.tool {
  display: flex;
  align-items: center;
  gap: 8px;
}

.countries-tool {
  flex: 1 1 280px;
}

.tool-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segment,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.segment {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.segment a,
.chips a,
.chip,
.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segment a {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 6px 12px;
  border-radius: 999px;
  line-height: 1.1;
}

.date-num {
  font-weight: 700;
  color: var(--ink);
}

.date-wd {
  font-size: 11px;
}

.segment a.on {
  background: var(--navy);
  color: #fff;
}

.segment a.on .date-num,
.segment a.on .date-wd {
  color: #fff;
}

.chips a,
.chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.chips a.on,
.chip.on {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}

.text-btn {
  color: var(--teal);
  font-weight: 700;
}

.slice {
  margin: 8px 0 14px;
}

.slice h2,
.card h2,
.block h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.slice p,
.card-head p,
.block-head p {
  margin-top: 4px;
  color: var(--muted);
}

.compare-note {
  margin-top: 6px;
  color: var(--amber);
  font-weight: 600;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.kpi,
.card,
.note,
.ccard {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.kpi {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 14px 14px 12px;
}

.kpi.queue {
  box-shadow: inset 3px 0 0 var(--rose), var(--shadow);
}

.kpi.alert .kpi-value {
  color: var(--rose);
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.kpi-value small,
.delta,
.kpi-hint,
.meta,
.ccard-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.delta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.delta.bad {
  color: var(--rose);
}

.delta.good {
  color: var(--good);
}

.kpi-hint {
  margin-top: auto;
  padding-top: 10px;
  font-weight: 500;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.flow-card,
.queue-card {
  display: flex;
  flex-direction: column;
}

.card,
.block {
  margin-top: 12px;
}

.layout .card {
  margin-top: 0;
}

.card {
  padding: 16px;
}

.card-head,
.block-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.legend,
.scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scale {
  margin-top: 10px;
}

.scale a {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.scale a.on {
  box-shadow: inset 0 0 0 1px currentColor;
  background: #f7fafb;
}

.queue-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.leaders-scroll {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  overflow: auto;
}

.swatch,
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 99px;
}

.swatch.entry,
.bar.entry {
  background: #0f6e82;
  fill: #0f6e82;
}

.swatch.exit,
.bar.exit {
  background: #b45309;
  fill: #b45309;
}

.swatch.queue,
.bar.queue {
  background: #9f1239;
  fill: #9f1239;
}

.dot-cn {
  background: #0f6e82;
}

.dot-uz {
  background: #b45309;
}

.dot-tm {
  background: #8a7348;
}

.dot-ru {
  background: #1d4e89;
}

.dot-kg {
  background: #3f6f4a;
}

.donuts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.donut.on {
  background: #f3fafb;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.donut-svg {
  display: block;
  width: 100%;
  max-width: 168px;
  height: auto;
}

.groove,
.ring {
  fill: none;
  stroke-width: 12;
}

.groove {
  stroke: #e6eef2;
}

.ring.entry {
  stroke: #0f6e82;
}

.ring.exit {
  stroke: #b45309;
}

.ring.queue {
  stroke: #9f1239;
}

.hole-date {
  font-family: inherit;
  text-anchor: middle;
  fill: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.hole-date.on {
  fill: var(--teal);
}

.donut-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.t-entry {
  color: #0f6e82;
}

.t-exit {
  color: #b45309;
}

.t-queue {
  color: #9f1239;
}

.leaders {
  margin: 0;
  padding: 0 4px 0 0;
  list-style: none;
}

.leaders li + li {
  margin-top: 12px;
}

.leader-top,
.ccard-metrics,
.note header,
.table-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.leader-top span,
.point {
  font-weight: 700;
}

.track {
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7eef2;
}

.fill {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.fill.q-low {
  background: var(--teal);
}

.fill.q-mid {
  background: var(--amber);
}

.fill.q-high {
  background: var(--rose);
}

td.q-none,
td.q-unknown {
  color: var(--muted);
  font-weight: 500;
}

.scale .q-low {
  color: var(--teal);
}

td.q-mid,
strong.q-mid,
.scale .q-mid {
  color: var(--amber);
}

td.q-high,
strong.q-high,
.scale .q-high,
.hot,
.over {
  color: var(--rose);
  font-weight: 800;
}

.meta {
  margin-top: 4px;
}

.meta a,
td a {
  margin-left: 6px;
  color: var(--teal);
  font-weight: 700;
}

.country-grid,
.notes {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.country-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.notes {
  grid-template-columns: 1fr 1fr;
}

.ccard {
  padding: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ccard.on {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal), var(--shadow);
}

.ccard-title {
  display: flex;
  align-items: center;
  font-weight: 800;
}

.ccard-metrics {
  display: grid;
  margin-top: 10px;
  justify-content: stretch;
}

.ccard-metrics b {
  font-variant-numeric: tabular-nums;
}

.note {
  padding: 14px;
  scroll-margin-top: 84px;
}

.note.q-mid {
  box-shadow: inset 3px 0 0 var(--amber), var(--shadow);
}

.note.q-high {
  box-shadow: inset 3px 0 0 var(--rose), var(--shadow);
}

.note header strong,
.note-text {
  color: var(--ink);
}

.note-text {
  margin-top: 8px;
  white-space: pre-line;
}

.table-card .card-head {
  align-items: flex-end;
  margin-bottom: 12px;
}

.table-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.search input {
  width: min(240px, 70vw);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

th button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}

.num {
  text-align: right;
  white-space: nowrap;
}

th.num button {
  width: 100%;
  text-align: right;
}

tbody tr:hover {
  background: #f6fafb;
}

.badge {
  display: inline-block;
  margin: 4px 4px 0 0;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.badge-repair,
.badge-persons {
  background: #fbf3e4;
  color: var(--amber);
}

.badge-no-freight,
.badge-limit {
  background: #eef2f6;
  color: var(--muted);
}

.empty {
  padding: 18px 0;
  color: var(--muted);
}

.quiet {
  color: var(--muted);
}

footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

footer p + p {
  margin-top: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  .queue-card {
    position: relative;
    padding: 0;
  }

  .queue-body {
    position: absolute;
    inset: 0;
    padding: 16px;
    overflow: hidden;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .layout,
  .notes,
  .card-head,
  .table-card .card-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .leaders-scroll {
    max-height: 360px;
  }

  h1 {
    font-size: 28px;
  }
}

@media (max-width: 720px) {
  .donuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kpis,
  .facts {
    grid-template-columns: 1fr;
    display: grid;
  }

.facts {
  width: 100%;
}
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.logout {
  border: 0;
  background: transparent;
  color: #9fd0de;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.login-card {
  width: min(420px, 100%);
  margin: 28px auto 0;
  padding: 22px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.login-card button {
  margin-top: 18px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.login-error {
  margin-top: 10px;
  color: var(--rose);
  font-weight: 700;
}
