/* src/styles/tokens.css */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #0f1b33;
  --ink-2: #3a4760;
  --muted: #5b6780;
  --line: #dde2ea;
  --line-2: #c9d0dc;
  --series: #14213d;
  --series-2: #7c8aa5;
  --signal: #e8710a;
  --signal-h: #cf6508;
  --signal-a: #b85500;
  --signal-bg: #fdefdf;
  --signal-ink: #9a4a00;
  --ok: #1e8e5a;
  --ok-bg: #e4f3eb;
  --late: #c8372d;
  --late-bg: #fae8e6;
  --info: #2b5c9e;
  --info-bg: #e7eef8;
  --land: #e9edf3;
  --water: #f8f9fc;
  --coast: #bac3d3;
  --grid: #e6eaf0;
  --route: #9aa6bc;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --t: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --shadow-pop: 0 8px 24px rgba(15, 27, 51, 0.1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0b1220;
  --surface: #121a2b;
  --surface-2: #182238;
  --ink: #e7ecf5;
  --ink-2: #b6c0d3;
  --muted: #8a96ad;
  --line: #25304a;
  --line-2: #34415e;
  --series: #9db4e0;
  --series-2: #566485;
  --signal: #f28c2e;
  --signal-h: #f6a04f;
  --signal-a: #d9761b;
  --signal-bg: #2c2012;
  --signal-ink: #f6b26b;
  --ok: #3fbf86;
  --ok-bg: #12281f;
  --late: #f0665c;
  --late-bg: #2e1716;
  --info: #7da2dd;
  --info-bg: #162338;
  --land: #172136;
  --water: #0e1627;
  --coast: #2e3b58;
  --grid: #18233a;
  --route: #4a5878;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

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

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

button {
  font-family: inherit;
}

.skip {
  position: fixed;
  left: 16px;
  top: -48px;
  z-index: 100;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--series);
  color: var(--bg);
  font-weight: 500;
  cursor: pointer;
  transition: top var(--t) var(--ease);
}

.skip:focus-visible {
  top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* src/styles/shell.css */
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sider {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.sider--drawer {
  position: static;
  height: auto;
  padding: 0;
  border: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 8px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__name {
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__mark {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--series);
  display: grid;
  place-items: center;
}

.brand__mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--bg);
  stroke-width: 2;
  stroke-linecap: round;
}

.brand__sub {
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

.nav__link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav__link:active {
  background: var(--line);
}

.nav__link.active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--series);
}

.nav__link .anticon {
  font-size: 16px;
}

.nav__badge {
  margin-left: auto;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--signal-bg);
  color: var(--signal-ink);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.sider__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
}

.avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.sider__who {
  min-width: 0;
  line-height: 1.3;
}

.sider__who b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sider__who span {
  font-size: 12px;
  color: var(--muted);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__menu {
  display: none;
}

.topbar__spacer {
  flex: 1 1 0;
  min-width: 0;
}

.gsearch {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 440px;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.clock__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  outline: none;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
    color var(--t) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--ink);
}

.icon-btn:active {
  background: var(--line);
}

.icon-btn__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--signal);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.notif {
  width: 340px;
  max-width: calc(100vw - 32px);
}

.notif__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.notif__item:hover b {
  color: var(--signal-a);
}

.notif__item span {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sider {
    display: none;
  }
  .sider--drawer {
    display: flex;
  }
  .topbar {
    padding: 0 16px;
  }
  .topbar__menu {
    display: inline-grid;
  }
  .clock {
    display: none;
  }
  .page {
    padding: 16px 16px 24px;
  }
}


/* src/styles/data.css */
/* Shipment table, filters, bulk bar and drawer content. Loaded before components.css so its media rules win. */
.bulk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.bulk b {
  margin-right: 8px;
  font-family: var(--mono);
  font-weight: 500;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.filters .filters__search {
  width: 260px;
}

.filters__spacer {
  flex: 1;
}

.col-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
}

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

.facts dt {
  font-size: 12px;
  color: var(--muted);
}

.facts dd {
  font-size: 13px;
  font-weight: 500;
}

.docs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.events {
  list-style: none;
  padding: 0;
  margin: 0;
}

.events li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.events time {
  font-size: 12px;
  color: var(--muted);
}

.events .events__exc {
  color: var(--signal-ink);
  font-weight: 500;
}

.ship-cards {
  display: flex;
  flex-direction: column;
}

.ship-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.ship-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pager-m {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.ant-table-wrapper .ant-table-thead > tr > th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ant-table-wrapper .ant-table-tbody > tr > td {
  font-size: 13px;
}


/* src/styles/components.css */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.card__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.card__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

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

.card__body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 16px;
}

.card__body--flush {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.page-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  transition: border-color var(--t) var(--ease);
}

.kpi:hover {
  border-color: var(--line-2);
}

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

.kpi__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.kpi__value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.kpi__value--signal {
  color: var(--signal);
}

.kpi__unit {
  margin-left: 4px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0;
}

.kpi__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}

.delta {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 12px;
}

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

.delta--bad {
  color: var(--late);
  background: var(--late-bg);
}

.delta--flat {
  color: var(--muted);
  background: var(--surface-2);
}

.spark {
  width: 72px;
  height: 28px;
  flex: none;
  overflow: visible;
}

.spark path {
  fill: none;
  stroke: var(--series);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag--info {
  color: var(--info);
  background: var(--info-bg);
}

.tag--ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.tag--late {
  color: var(--late);
  background: var(--late-bg);
}

.tag--signal {
  color: var(--signal-ink);
  background: var(--signal-bg);
}

.tag--mute {
  color: var(--muted);
  background: var(--surface-2);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: color var(--t) var(--ease);
}

.link-btn:hover {
  color: var(--signal-a);
  text-decoration: underline;
}

.link-btn:active {
  color: var(--signal-h);
}

.bar {
  height: 6px;
  min-width: 48px;
  flex: 1;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-2);
}

.bar__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--series);
  transition: width var(--t) var(--ease);
}

.bar--signal .bar__fill {
  background: var(--signal);
}

.bar--late .bar__fill {
  background: var(--late);
}

.bar--mute .bar__fill {
  background: var(--series-2);
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
}

.cell-late {
  font-size: 12px;
  color: var(--late);
}

.cell-prog {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 112px;
}

.cell-prog span {
  width: 36px;
  text-align: right;
  font-size: 12px;
  color: var(--ink-2);
}

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}

.state__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 18px;
}

.state__icon--late {
  background: var(--late-bg);
  color: var(--late);
}

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

.state__text {
  max-width: 320px;
  font-size: 13px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters .filters__search {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .kpi__value {
    font-size: 22px;
  }
  .kpi {
    padding: 12px;
  }
  .spark {
    display: none;
  }
}


/* src/styles/pages.css */
.cols-main {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.cols-even {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fill-wrap {
  position: relative;
  min-height: 360px;
}

.fill-abs {
  position: absolute;
  inset: 0;
  display: flex;
}

.fill-abs > .card {
  flex: 1;
  min-height: 0;
}

.exc-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.exc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background var(--t) var(--ease);
}

.exc:hover {
  background: var(--surface-2);
}

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

.exc__delay {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--late);
}

.exc__cause {
  font-size: 13px;
  font-weight: 500;
}

.exc__meta {
  font-size: 12px;
  color: var(--muted);
}

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

.exc__done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ok);
}

.sev {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sev--critical {
  background: var(--late);
}

.sev--high {
  background: var(--signal);
}

.sev--medium {
  background: var(--signal);
  opacity: 0.5;
}

.sev-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.arrivals {
  margin: 0;
  padding: 0;
  list-style: none;
}

.arrivals li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.arrivals li:last-child,
.exc-list > li:last-child {
  border-bottom: 0;
}

.arrivals__eta {
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.veh {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  transition: border-color var(--t) var(--ease);
}

.veh:hover {
  border-color: var(--line-2);
}

.veh__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.veh__id {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.veh__type {
  font-size: 12px;
  color: var(--muted);
}

.veh__util {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.veh__util-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.veh__util-head b {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
}

.veh__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.veh__meta b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.shift-wrap {
  overflow-x: auto;
}

.shift {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.shift th,
.shift td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.shift th {
  font-weight: 500;
  color: var(--muted);
}

.shift th:first-child,
.shift td:first-child {
  position: sticky;
  left: 0;
  padding-left: 16px;
  background: var(--surface);
  text-align: left;
  z-index: 1;
}

.shift .shift__today {
  background: var(--surface-2);
}

.shift__who {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.shift__cell {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.shift__cell--E {
  background: var(--info-bg);
  color: var(--info);
}

.shift__cell--D {
  background: var(--ok-bg);
  color: var(--ok);
}

.shift__cell--L {
  background: var(--signal-bg);
  color: var(--signal-ink);
}

.shift__cell--O {
  color: var(--muted);
  border: 1px dashed var(--line-2);
}

.hours {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.hours span {
  width: 40px;
  font-size: 12px;
  text-align: right;
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1180px) {
  .cols-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .fill-wrap {
    min-height: 0;
  }
  .fill-abs {
    position: static;
  }
  .exc-list {
    max-height: 480px;
  }
}

@media (max-width: 900px) {
  .cols-even {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* src/styles/routes.css */
.routes-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.rt-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rt-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background var(--t) var(--ease);
}

.rt-item:hover {
  background: var(--surface-2);
}

.rt-item:active {
  background: var(--line);
}

.rt-item[aria-current='true'] {
  background: var(--surface-2);
  box-shadow: inset 2px 0 0 var(--series);
}

.rt-item__name {
  font-weight: 500;
}

.rt-item__meta {
  font-size: 12px;
  color: var(--muted);
}

.rt-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.rt-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.rt-metrics div {
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.rt-metrics div:last-child {
  border-right: 0;
}

.rt-metrics span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.rt-metrics b {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
}

.stops {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stop {
  display: grid;
  grid-template-columns: 20px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: background var(--t) var(--ease), opacity var(--t) var(--ease);
}

.stop:hover {
  background: var(--surface-2);
}

.stop--drag {
  opacity: 0.4;
}

.stop--over {
  box-shadow: inset 0 2px 0 var(--signal);
}

.stop__grip {
  color: var(--muted);
  cursor: grab;
  font-size: 14px;
}

.stop__idx {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--series);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.stop__name {
  font-weight: 500;
  line-height: 1.3;
}

.stop__leg {
  font-size: 12px;
  color: var(--muted);
}

.stop__btns {
  display: flex;
  gap: 4px;
}

@media (max-width: 1180px) {
  .rt-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .routes-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .rt-list {
    max-height: 236px;
    overflow-y: auto;
  }
  .rt-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rt-metrics div:nth-child(2) {
    border-right: 0;
  }
  .rt-metrics div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}


/* src/styles/settings.css */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row b {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.toggle-row span {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* src/styles/map.css */
.map {
  position: relative;
  overflow: hidden;
  background: var(--water);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.map--mini {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.map__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.map__water {
  fill: var(--water);
}

.map__land {
  fill: var(--land);
  stroke: var(--coast);
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.map__grid {
  stroke: var(--grid);
  stroke-width: 0.6;
}

.map__sea {
  fill: var(--muted);
  font: 500 9px var(--font);
  letter-spacing: 0.22em;
  text-anchor: middle;
  opacity: 0.7;
}

.map__route {
  fill: none;
  stroke: var(--route);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  opacity: 0.85;
  animation: wp-dash 1.6s linear infinite;
}

.map__route--sel {
  stroke: var(--series);
  stroke-width: 1.8;
  stroke-dasharray: none;
  opacity: 1;
  animation: none;
}

.map__route--plan {
  fill: none;
  stroke: var(--series);
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  animation: wp-dash 1.6s linear infinite;
}

@keyframes wp-dash {
  to {
    stroke-dashoffset: -14;
  }
}

.map__city {
  fill: var(--surface);
  stroke: var(--ink-2);
  stroke-width: 1.2;
}

.map__label {
  fill: var(--ink-2);
  font: 500 10.5px var(--font);
  paint-order: stroke;
  stroke: var(--land);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.map__veh {
  cursor: pointer;
  outline: none;
  transition: transform 1000ms linear;
}

.map__veh .dot {
  stroke: var(--surface);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--t) var(--ease);
}

.map__veh:hover .dot,
.map__veh:focus-visible .dot {
  transform: scale(1.35);
}

.map__veh .focus-ring {
  fill: none;
  stroke: transparent;
  stroke-width: 2;
}

.map__veh:focus-visible .focus-ring {
  stroke: var(--signal);
}

.map__veh .sel-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.veh--in_transit .dot {
  fill: var(--series);
}

.veh--delayed .dot {
  fill: var(--late);
}

.veh--exception .dot {
  fill: var(--signal);
}

.map__node {
  fill: var(--series);
  stroke: var(--surface);
  stroke-width: 2;
}

.map__node-num {
  fill: var(--bg);
  font: 500 9px var(--mono);
  text-anchor: middle;
}

.map__hud {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--ink-2);
}

.map__hud span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map__hud i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.map__stamp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.tip {
  position: absolute;
  z-index: 5;
  min-width: 200px;
  max-width: 260px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
}

.tip--end {
  transform: translate(-88%, calc(-100% - 14px));
}

.tip--start {
  transform: translate(-12%, calc(-100% - 14px));
}

.tip--below {
  transform: translate(-50%, 14px);
}

.tip--below.tip--end {
  transform: translate(-88%, 14px);
}

.tip--below.tip--start {
  transform: translate(-12%, 14px);
}

.tip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tip__id {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
}

.tip__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.tip__row b {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
}

.chart {
  position: relative;
}

.chart__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ch-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.ch-axis {
  fill: var(--muted);
  font: 400 11px var(--mono);
  font-variant-numeric: tabular-nums;
}

.ch-label {
  fill: var(--ink-2);
  font: 500 12px var(--font);
}

.ch-val {
  fill: var(--ink);
  font: 500 11px var(--mono);
}

.ch-cross {
  stroke: var(--ink-2);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.ch-target {
  stroke: var(--ok);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.ch-target-label {
  fill: var(--ok);
  font: 500 11px var(--mono);
}

.ch-bar {
  transition: opacity var(--t) var(--ease), fill var(--t) var(--ease);
}

.ch-line {
  fill: none;
  stroke: var(--series);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.ch-dot {
  fill: var(--surface);
  stroke: var(--series);
  stroke-width: 2;
}

.ch-row {
  cursor: default;
}

.ch-focus {
  fill: none;
  stroke: transparent;
  stroke-width: 2;
}

.ch-focus:focus-visible {
  stroke: var(--signal);
}
