:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f2;
  --rail: #182422;
  --text: #17211f;
  --muted: #66746f;
  --border: #dce4e2;
  --accent: #197e6b;
  --accent-soft: #dff2ed;
  --blue: #2f6fba;
  --red: #b83b3b;
  --red-soft: #f7e3e2;
  --orange: #b96a1a;
  --orange-soft: #f7eadc;
  --green: #287a49;
  --green-soft: #e0f1e7;
  --shadow: 0 12px 32px rgba(22, 33, 31, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

input,
button,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: var(--rail);
  color: #fff;
  padding: 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: var(--radius);
  font-weight: 850;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.nav-group,
.nav-tree {
  display: grid;
  gap: 6px;
}

.nav-group-title,
.nav-icon,
.nav-upgrade {
  display: none;
}

.side-nav a {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  color: #9fb3ae;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 750;
}

.side-nav a:hover {
  color: #fff;
  background: var(--accent);
}

.side-nav a.active {
  color: #fff;
  background: rgba(25, 126, 107, 0.78);
}

.main {
  min-width: 0;
}

.main-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

.content {
  padding: 24px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 24px;
}

h2 {
  font-size: 17px;
}

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

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  align-items: start;
}

.panel,
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.auth-card {
  width: min(420px, calc(100vw - 32px));
}

.form {
  display: grid;
  gap: 12px;
}

.form.compact {
  margin-top: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

label.inline {
  display: flex;
  align-items: center;
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--text);
  background: #fff;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
}

select {
  min-height: 40px;
  padding: 0 34px 0 12px;
}

textarea {
  padding: 10px 12px;
  resize: vertical;
}

.button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button.warn {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-soft);
}

.button.ghost {
  background: transparent;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 850;
  padding: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  padding: 12px;
  overflow-wrap: anywhere;
}

.table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.table td span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex !important;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
}

.badge.ok {
  color: var(--green);
  background: var(--green-soft);
}

.badge.warn {
  color: var(--orange);
  background: var(--orange-soft);
}

.badge.muted {
  color: var(--muted);
  background: var(--surface-soft);
}

.notice {
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 750;
}

.notice.error {
  color: var(--red);
  background: var(--red-soft);
}

.notice.success {
  color: var(--green);
  background: var(--green-soft);
}

.check-list {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.check-row input {
  min-height: auto;
  margin-top: 4px;
}

.check-row small {
  display: block;
  color: var(--muted);
}

.qr {
  width: 190px;
  height: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.screens-page {
  display: grid;
  gap: 16px;
}

.screens-top,
.screens-actions,
.screens-toolbar,
.bulk-tools,
.filter-head,
.inspector-head,
.draw-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.screens-top {
  justify-content: space-between;
}

.screens-actions {
  min-width: min(440px, 100%);
}

.screens-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.screens-filters,
.screens-workspace,
.screen-inspector {
  min-width: 0;
}

.screens-filters,
.screen-inspector {
  position: sticky;
  top: 16px;
}

.filter-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-pill {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

.category-pill.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.category-pill strong,
.category-pill small,
.category-pill em {
  display: block;
}

.category-pill small,
.category-pill em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.screens-workspace {
  display: grid;
  gap: 12px;
}

.screens-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  flex-wrap: wrap;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  box-shadow: var(--shadow);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 850;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--accent);
  color: #fff;
}

.archive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--text);
}

.archive-toggle input {
  width: auto;
  min-height: auto;
}

.bulk-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bulk-tools .button {
  min-height: 34px;
}

.screens-summary {
  color: var(--muted);
  font-weight: 750;
}

.screens-viewer {
  min-width: 0;
}

.screens-viewer-stage {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.screens-viewer-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.screens-viewer-empty strong {
  color: var(--text);
}

.screens-viewer-main {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111821;
}

.screens-viewer-image {
  width: 100%;
  max-height: min(76vh, 760px);
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.screens-viewer-image img {
  width: 100%;
  max-height: min(76vh, 760px);
  display: block;
  object-fit: contain;
}

.screens-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(8, 11, 20, 0.64);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.screens-viewer-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.screens-viewer-nav.prev {
  left: 10px;
}

.screens-viewer-nav.next {
  right: 10px;
}

.screens-viewer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.screens-viewer-info > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.screens-viewer-info span,
.screens-viewer-info small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.screens-viewer-info strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screens-viewer-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.screens-viewer-select {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 0 10px;
  color: var(--text);
  font-weight: 850;
}

.screens-viewer-select input {
  width: 16px;
  min-height: 16px;
}

.screens-viewer-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.screens-viewer-thumb {
  position: relative;
  flex: 0 0 74px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 5px;
  color: var(--muted);
  cursor: pointer;
  scroll-snap-align: center;
}

.screens-viewer-thumb.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.screens-viewer-thumb img {
  width: 100%;
  aspect-ratio: 350 / 758;
  display: block;
  border-radius: 5px;
  object-fit: cover;
  background: var(--surface);
}

.screens-viewer-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 850;
}

.screens-viewer-thumb i {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 3px 8px rgba(22, 33, 31, 0.24);
}

.screens-grid {
  display: grid;
  gap: 12px;
}

.screens-grid.view-grid {
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
}

.screens-grid.view-dense {
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
}

.screens-grid.view-timeline {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.day-separator {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 850;
  padding: 8px 0 2px;
}

.screen-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(78px, auto);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(22, 33, 31, 0.06);
}

.screen-card.current {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(47, 111, 186, 0.18);
}

.screen-card.has-notes {
  border-color: rgba(47, 111, 186, 0.72);
}

.screen-card.has-drawing {
  border-color: rgba(185, 106, 26, 0.78);
}

.screen-card.has-notes.has-drawing {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 2px rgba(185, 106, 26, 0.24),
    0 8px 18px rgba(22, 33, 31, 0.06);
}

.screen-card.has-notes::after,
.screen-card.has-drawing::after {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 4px 12px rgba(22, 33, 31, 0.08);
}

.screen-card.has-notes::after {
  content: "Заметка";
  color: var(--blue);
}

.screen-card.has-drawing::after {
  content: "Рисунок";
  color: var(--orange);
}

.screen-card.has-notes.has-drawing::after {
  content: "Пометки";
  color: var(--accent);
}

.screen-card.current,
.screen-card.current.has-notes,
.screen-card.current.has-drawing,
.screen-card.current.has-notes.has-drawing {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(47, 111, 186, 0.18);
}

.screen-card.archived {
  opacity: 0.72;
}

.screen-check {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
}

.screen-check input {
  width: 16px;
  min-height: 16px;
}

.screen-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 350 / 758;
  border: 0;
  background: var(--surface-soft);
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.screen-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 0;
}

.screen-card.has-notes .screen-thumb::after {
  box-shadow: inset 0 0 0 5px rgba(47, 111, 186, 0.92);
}

.screen-card.has-drawing .screen-thumb::after {
  box-shadow: inset 0 0 0 5px rgba(185, 106, 26, 0.96);
}

.screen-card.has-notes.has-drawing .screen-thumb::after {
  box-shadow:
    inset 0 0 0 5px rgba(25, 126, 107, 0.96),
    inset 0 0 0 9px rgba(185, 106, 26, 0.82);
}

.screen-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.screen-meta {
  display: grid;
  gap: 2px;
  padding: 10px;
  min-width: 0;
}

.screen-meta strong,
.screen-meta span,
.screen-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-meta span,
.screen-meta small {
  color: var(--muted);
  font-size: 12px;
}

.view-dense .screen-meta {
  padding: 7px;
}

.view-dense .screen-meta small {
  display: none;
}

.screens-load {
  display: grid;
  place-items: center;
  padding: 8px 0 18px;
}

.screen-inspector {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.inspector-empty,
.empty-state {
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.empty-state.small {
  padding: 10px;
}

.inspector-head {
  justify-content: space-between;
}

.inspector-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.annotator {
  position: relative;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
}

.annotator img {
  width: 100%;
  display: block;
  user-select: none;
}

.annotator canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.draw-tools {
  justify-content: stretch;
}

.draw-tools .button {
  flex: 1;
}

.note-form {
  display: grid;
  gap: 8px;
}

.notes-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.note-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
}

.note-item p {
  margin: 4px 0;
  color: var(--text);
  white-space: pre-wrap;
}

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

.history-page {
  display: grid;
  gap: 16px;
}

.history-top,
.history-actions,
.history-toolbar,
.history-controls,
.history-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-top {
  justify-content: space-between;
}

.history-actions {
  min-width: min(440px, 100%);
}

.history-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.history-filters,
.history-inspector {
  position: sticky;
  top: 16px;
}

.history-workspace,
.history-filters,
.history-inspector {
  min-width: 0;
}

.history-workspace {
  display: grid;
  gap: 12px;
}

.history-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  box-shadow: var(--shadow);
}

.history-search {
  min-width: min(420px, 100%);
  flex: 1;
}

.history-controls {
  flex: 0 0 160px;
}

.history-stats {
  color: var(--muted);
  font-weight: 750;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-day {
  position: sticky;
  top: 64px;
  z-index: 3;
  color: var(--muted);
  font-weight: 850;
  background: var(--bg);
  padding: 8px 0 2px;
}

.history-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(22, 33, 31, 0.05);
  overflow: hidden;
}

.history-row.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(47, 111, 186, 0.18);
}

.history-open {
  width: 100%;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(132px, 190px);
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

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

.history-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history-main strong,
.history-main small,
.history-side em,
.history-side mark {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-main small,
.history-side em {
  color: var(--muted);
  font-size: 12px;
}

.history-side {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 5px;
}

.history-side mark {
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.history-side mark.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.history-inspector {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.history-detail {
  display: grid;
  gap: 10px;
}

.history-detail > div,
.history-detail-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.history-detail span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.history-detail strong,
.history-url {
  color: var(--text);
  overflow-wrap: anywhere;
}

.history-url {
  margin: 0;
}

.history-detail-grid {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}

.history-detail-grid span {
  margin: 0;
}

.history-detail-actions {
  align-items: stretch;
}

.history-detail-actions .button {
  flex: 1;
}

.keylogger-open .history-main strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.keylogger-page .history-toolbar {
  flex-wrap: wrap;
  align-items: stretch;
}

.keylogger-page .history-search {
  min-width: min(280px, 100%);
}

.keylogger-metric,
.keylogger-alert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
}

.keylogger-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.keylogger-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.keylogger-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keylogger-alert {
  grid-column: 1 / -1;
  color: var(--red);
  background: var(--red-soft);
  font-weight: 800;
}

.keylogger-mask-toggle {
  flex: 0 0 auto;
  padding: 0 2px;
}

.keylogger-text {
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.call-recording-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.call-recording-open .history-main strong {
  white-space: normal;
}

.recording-player {
  width: 100%;
  min-height: 44px;
}

.contacts-layout {
  grid-template-columns: 300px minmax(0, 1fr) 380px;
}

.contacts-toolbar {
  flex-wrap: wrap;
  align-items: stretch;
}

.contacts-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 8px;
  flex: 0 1 520px;
}

.contacts-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.contact-metric {
  min-height: 76px;
}

.contact-metric.red {
  border-top: 3px solid var(--red);
}

.contact-metric.green {
  border-top: 3px solid var(--green);
}

.contact-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-group-pill strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.contacts-open {
  grid-template-columns: 18px 42px minmax(0, 1fr) minmax(132px, 200px);
  gap: 10px;
}

.contacts-row.status-deleted {
  border-color: rgba(184, 59, 59, 0.44);
  background: linear-gradient(90deg, rgba(247, 227, 226, 0.68), #fff 26%);
}

.contacts-row.status-added {
  border-color: rgba(40, 122, 73, 0.38);
  background: linear-gradient(90deg, rgba(224, 241, 231, 0.68), #fff 26%);
}

.contact-pin {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 999px;
  background: #b7c4c0;
  box-shadow: 0 0 0 3px rgba(183, 196, 192, 0.16);
}

.contact-pin.red {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.contact-pin.green {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.contact-pin.none {
  background: #b7c4c0;
}

.contact-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.contact-avatar.large {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  font-size: 14px;
}

.history-side mark.red,
.history-side mark.warn.red {
  background: var(--red-soft);
  color: var(--red);
}

.history-side mark.green,
.history-side mark.ok.green {
  background: var(--green-soft);
  color: var(--green);
}

.contact-inspector-head {
  justify-content: flex-start;
}

.contact-inspector-head > div {
  min-width: 0;
}

.contact-inspector-head span span,
.contact-inspector-head i {
  margin-right: 7px;
}

.contact-detail-grid {
  grid-template-columns: 104px minmax(0, 1fr);
}

.overview-page {
  display: grid;
  gap: 16px;
}

.overview-top,
.overview-actions,
.overview-toolbar,
.overview-hero,
.overview-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-top,
.overview-hero,
.overview-section-head {
  justify-content: space-between;
}

.overview-actions {
  min-width: min(440px, 100%);
}

.overview-hero {
  min-height: 126px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 243, 242, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.overview-hero-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.overview-hero-main strong {
  font-size: 25px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.overview-hero-main small,
.overview-hero-side span,
.overview-hero-side strong {
  color: var(--muted);
}

.overview-hero-side {
  min-width: 220px;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.overview-hero-side strong {
  color: var(--text);
  font-size: 17px;
}

.overview-status {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.overview-status.ok {
  color: var(--green);
  background: var(--green-soft);
}

.overview-status.warn {
  color: var(--orange);
  background: var(--orange-soft);
}

.overview-status.muted {
  color: var(--muted);
  background: var(--surface-soft);
}

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

.overview-metric {
  min-width: 0;
  min-height: 94px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(22, 33, 31, 0.05);
}

.overview-metric.warn {
  border-top-color: var(--orange);
}

.overview-metric.power {
  border-top-color: var(--green);
}

.overview-metric.info {
  border-top-color: var(--blue);
}

.overview-metric.activity {
  border-top-color: var(--red);
}

.overview-metric.archive {
  border-top-color: var(--muted);
}

.overview-metric span,
.overview-metric small,
.overview-section-head span,
.overview-snapshot small,
.overview-field span,
.overview-field-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.overview-metric strong {
  font-size: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-metric small {
  min-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.overview-workspace,
.overview-timeline {
  min-width: 0;
}

.overview-workspace {
  display: grid;
  gap: 12px;
}

.overview-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 10px;
}

.overview-toolbar .history-search {
  min-width: 0;
}

.overview-mode {
  flex: 0 0 auto;
}

.overview-sections {
  display: grid;
  gap: 12px;
}

.overview-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(22, 33, 31, 0.05);
}

.overview-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.overview-field,
.overview-field-row {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.overview-field {
  display: grid;
  gap: 5px;
}

.overview-field strong {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.overview-field.percent {
  background: var(--green-soft);
  border-color: rgba(40, 122, 73, 0.24);
}

.overview-field.status {
  background: var(--orange-soft);
  border-color: rgba(185, 106, 26, 0.22);
}

.overview-field.url {
  background: #e8eff8;
  border-color: rgba(47, 111, 186, 0.22);
}

.overview-field-list {
  display: grid;
  gap: 8px;
}

.overview-field-row {
  display: grid;
  grid-template-columns: 150px minmax(160px, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.overview-field-row strong,
.overview-field-row p {
  margin: 0;
  overflow-wrap: anywhere;
}

.overview-timeline {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.overview-snapshots {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.overview-snapshot {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

.overview-snapshot.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.overview-snapshot strong,
.overview-snapshot small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-snapshot small {
  grid-column: 1 / -1;
}

@media (max-width: 1400px) {
  .history-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .history-inspector {
    grid-column: 1 / -1;
    position: static;
  }

  .history-toolbar {
    align-items: stretch;
  }

  .history-controls {
    flex-basis: 150px;
  }

  .keylogger-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-recording-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contacts-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-timeline {
    position: static;
  }

  .overview-snapshots {
    max-height: none;
  }
}

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

  .sidebar {
    position: static;
  }

  .grid.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .table {
    min-width: 720px;
  }

  .panel {
    overflow-x: auto;
  }
}

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

  .screen-inspector {
    grid-column: 1 / -1;
    position: static;
  }

  .history-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .history-inspector {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 760px) {
  .screens-top,
  .screens-actions,
  .history-top,
  .history-actions,
  .history-toolbar,
  .overview-top,
  .overview-actions,
  .overview-toolbar,
  .overview-hero {
    display: grid;
  }

  .screens-layout,
  .history-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .screens-filters,
  .screens-toolbar,
  .history-filters,
  .history-toolbar {
    position: static;
  }

  .screens-grid.view-grid,
  .screens-grid.view-timeline {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }

  .history-open {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .contacts-open {
    grid-template-columns: 18px 38px minmax(0, 1fr);
  }

  .contacts-open .history-side {
    grid-column: 3;
  }

  .history-side {
    justify-items: start;
  }

  .keylogger-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .call-recording-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .contacts-summary,
  .contacts-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-metrics,
  .overview-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-hero-side {
    min-width: 0;
    justify-items: start;
  }

  .overview-field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-toolbar .history-search {
    width: 100%;
    justify-self: stretch;
  }

  .overview-mode {
    justify-self: start;
  }

  .overview-toolbar {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .history-day {
    position: static;
  }
}

body.route-overview {
  --ov-bg: #0c0a12;
  --ov-bg-soft: #12101a;
  --ov-panel: rgba(20, 18, 29, 0.92);
  --ov-panel-strong: rgba(27, 24, 38, 0.96);
  --ov-panel-soft: rgba(16, 14, 24, 0.78);
  --ov-border: rgba(255, 255, 255, 0.105);
  --ov-border-strong: rgba(255, 255, 255, 0.18);
  --ov-text: #f4f2ff;
  --ov-muted: #9895a8;
  --ov-dim: #6d687c;
  --ov-cyan: #22d7c7;
  --ov-teal: #087e83;
  --ov-lime: #9cff2e;
  --ov-green: #2fe08a;
  --ov-yellow: #f5e94d;
  --ov-violet: #8b6cff;
  --ov-rose: #ff6c9c;
  --ov-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  background:
    linear-gradient(180deg, #111019 0%, #0c0a12 54%, #09080d 100%),
    var(--ov-bg);
  color: var(--ov-text);
}

.route-overview .shell {
  grid-template-columns: 250px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(34, 215, 199, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--ov-bg);
  background-size: 56px 56px, auto, auto;
}

.route-overview .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  border-right: 1px solid var(--ov-border);
  background:
    linear-gradient(180deg, rgba(26, 23, 36, 0.98), rgba(13, 11, 19, 0.98)),
    var(--ov-bg-soft);
  color: var(--ov-text);
  padding: 20px 18px;
}

.route-overview .brand {
  min-height: 44px;
  margin-bottom: 26px;
}

.route-overview .brand span {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 215, 199, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 215, 199, 0.28), rgba(139, 108, 255, 0.18)),
    rgba(255, 255, 255, 0.045);
  color: #ffffff;
  box-shadow: 0 0 28px rgba(34, 215, 199, 0.18);
}

.route-overview .brand strong {
  color: var(--ov-text);
}

.route-overview .side-nav {
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--ov-border);
}

.route-overview .side-nav a {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ov-muted);
  padding: 0 12px;
  font-weight: 760;
}

.route-overview .side-nav a:hover {
  color: var(--ov-text);
  border-color: rgba(34, 215, 199, 0.18);
  background: rgba(34, 215, 199, 0.08);
}

.route-overview .side-nav a.active {
  color: #ffffff;
  border-color: rgba(34, 215, 199, 0.34);
  background:
    linear-gradient(90deg, rgba(34, 215, 199, 0.22), rgba(139, 108, 255, 0.07)),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 3px 0 0 rgba(156, 255, 46, 0.78),
    0 10px 28px rgba(34, 215, 199, 0.09);
}

.route-overview .main {
  min-height: 100vh;
  background: transparent;
}

.route-overview .topbar {
  min-height: 72px;
  margin: 18px 24px 0;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(23, 21, 33, 0.88), rgba(15, 13, 22, 0.88)),
    rgba(12, 10, 18, 0.92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  color: var(--ov-text);
}

.route-overview .topbar span {
  color: var(--ov-muted);
}

.route-overview .topbar .button.ghost {
  border-color: var(--ov-border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ov-muted);
}

.route-overview .content {
  padding: 20px 24px 28px;
}

.route-overview .overview-page {
  gap: 14px;
  color: var(--ov-text);
}

.route-overview .overview-top {
  min-height: 70px;
  border-bottom: 1px solid var(--ov-border);
  padding-bottom: 16px;
}

.route-overview .overview-top h1 {
  margin-bottom: 3px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 820;
}

.route-overview .overview-top .muted {
  max-width: 620px;
  margin: 0;
  color: var(--ov-muted);
}

.route-overview .overview-actions {
  min-width: min(470px, 100%);
  justify-content: flex-end;
}

.route-overview .select,
.route-overview .overview-page input,
.route-overview .overview-page select {
  min-height: 40px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(14, 12, 21, 0.86);
  color: var(--ov-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.route-overview .overview-page input::placeholder {
  color: var(--ov-dim);
}

.route-overview .overview-page select option {
  background: #15131e;
  color: var(--ov-text);
}

.route-overview .overview-page .button {
  min-height: 40px;
  border: 1px solid rgba(34, 215, 199, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(34, 215, 199, 0.18), rgba(34, 215, 199, 0.08)),
    rgba(255, 255, 255, 0.035);
  color: #eafffb;
  box-shadow: 0 0 28px rgba(34, 215, 199, 0.1);
}

.route-overview .overview-page .button:hover,
.route-overview .overview-snapshot:hover {
  border-color: rgba(156, 255, 46, 0.34);
  box-shadow: 0 0 0 1px rgba(156, 255, 46, 0.08), 0 16px 38px rgba(0, 0, 0, 0.24);
}

.route-overview .overview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.34fr);
  min-height: 182px;
  overflow: hidden;
  border: 1px solid var(--ov-border-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 215, 199, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--ov-panel);
  box-shadow: var(--ov-shadow);
  padding: 22px;
}

.route-overview .overview-hero::before {
  content: "";
  position: absolute;
  inset: auto 22px 20px 42%;
  height: 54px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(34, 215, 199, 0.9), rgba(156, 255, 46, 0.84), rgba(245, 233, 77, 0.72), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 26px);
  clip-path: polygon(0 64%, 12% 48%, 25% 58%, 38% 28%, 53% 66%, 68% 18%, 82% 52%, 100% 40%, 100% 100%, 0 100%);
  opacity: 0.66;
  filter: drop-shadow(0 0 14px rgba(34, 215, 199, 0.34));
}

.route-overview .overview-hero::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 28px;
  width: 140px;
  height: 140px;
  pointer-events: none;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, transparent 0 20%, var(--ov-cyan) 20% 42%, var(--ov-lime) 42% 58%, var(--ov-yellow) 58% 69%, transparent 69% 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 42%, #000 43% 62%, transparent 63%);
  mask: radial-gradient(circle, transparent 0 42%, #000 43% 62%, transparent 63%);
  opacity: 0.7;
}

.route-overview .overview-hero-main {
  position: relative;
  z-index: 1;
  align-content: start;
  gap: 9px;
}

.route-overview .overview-hero-main strong {
  max-width: 760px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 780;
}

.route-overview .overview-hero-main small,
.route-overview .overview-hero-side span,
.route-overview .overview-hero-side strong {
  color: var(--ov-muted);
}

.route-overview .overview-hero-side {
  position: relative;
  z-index: 1;
  align-self: end;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background: rgba(8, 7, 13, 0.48);
}

.route-overview .overview-hero-side strong {
  color: var(--ov-text);
  font-size: 18px;
}

.route-overview .overview-status {
  min-height: 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0;
}

.route-overview .overview-status.ok {
  color: #d9fff5;
  border-color: rgba(47, 224, 138, 0.4);
  background: rgba(47, 224, 138, 0.14);
}

.route-overview .overview-status.warn {
  color: #fff2bd;
  border-color: rgba(245, 233, 77, 0.34);
  background: rgba(245, 233, 77, 0.11);
}

.route-overview .overview-status.muted {
  color: var(--ov-muted);
  border-color: var(--ov-border);
  background: rgba(255, 255, 255, 0.045);
}

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

.route-overview .overview-metric {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  border: 1px solid var(--ov-border);
  border-top: 1px solid var(--ov-border-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    var(--ov-panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  padding: 13px 13px 23px;
}

.route-overview .overview-metric::before {
  content: "";
  position: absolute;
  inset: auto 12px 10px 12px;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--ov-cyan), var(--ov-lime), rgba(255, 255, 255, 0.86));
  opacity: 0.86;
}

.route-overview .overview-metric.warn::before {
  background: linear-gradient(90deg, var(--ov-yellow), var(--ov-rose));
}

.route-overview .overview-metric.power::before {
  background: linear-gradient(90deg, var(--ov-green), var(--ov-lime));
}

.route-overview .overview-metric.info::before {
  background: linear-gradient(90deg, var(--ov-cyan), var(--ov-violet));
}

.route-overview .overview-metric.activity::before {
  background: linear-gradient(90deg, var(--ov-rose), var(--ov-yellow));
}

.route-overview .overview-metric.archive::before {
  background: linear-gradient(90deg, var(--ov-dim), var(--ov-cyan));
}

.route-overview .overview-metric span,
.route-overview .overview-metric small,
.route-overview .overview-section-head span,
.route-overview .overview-snapshot small,
.route-overview .overview-field span,
.route-overview .overview-field-row span {
  color: var(--ov-muted);
}

.route-overview .overview-metric strong {
  color: var(--ov-text);
  font-size: 22px;
  font-weight: 760;
}

.route-overview .overview-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
}

.route-overview .overview-toolbar,
.route-overview .overview-section,
.route-overview .overview-timeline {
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    var(--ov-panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.route-overview .overview-toolbar {
  top: 14px;
  gap: 12px;
  padding: 10px;
  backdrop-filter: blur(14px);
}

.route-overview .segmented {
  border-color: var(--ov-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.route-overview .segmented button {
  border-right-color: var(--ov-border);
  background: transparent;
  color: var(--ov-muted);
}

.route-overview .segmented button.active {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(34, 215, 199, 0.28), rgba(34, 215, 199, 0.1)),
    rgba(255, 255, 255, 0.04);
}

.route-overview .overview-section {
  gap: 12px;
  padding: 14px;
}

.route-overview .overview-section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ov-border);
}

.route-overview .overview-section-head strong {
  color: #ffffff;
  font-size: 17px;
}

.route-overview .overview-fields {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.route-overview .overview-field,
.route-overview .overview-field-row {
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--ov-panel-soft);
  color: var(--ov-text);
}

.route-overview .overview-field {
  gap: 8px;
  padding: 12px;
}

.route-overview .overview-field strong {
  color: #ffffff;
  font-weight: 720;
}

.route-overview .overview-field.percent {
  border-color: rgba(156, 255, 46, 0.28);
  background: linear-gradient(180deg, rgba(156, 255, 46, 0.12), rgba(255, 255, 255, 0.02));
}

.route-overview .overview-field.status {
  border-color: rgba(34, 215, 199, 0.26);
  background: linear-gradient(180deg, rgba(34, 215, 199, 0.1), rgba(255, 255, 255, 0.018));
}

.route-overview .overview-field.url {
  border-color: rgba(139, 108, 255, 0.28);
  background: linear-gradient(180deg, rgba(139, 108, 255, 0.1), rgba(255, 255, 255, 0.018));
}

.route-overview .overview-field-row {
  grid-template-columns: 145px minmax(160px, 0.72fr) minmax(0, 1fr);
  padding: 12px;
}

.route-overview .overview-field-row p,
.route-overview .overview-field-row strong {
  color: var(--ov-text);
}

.route-overview .overview-timeline {
  top: 14px;
  padding: 14px;
}

.route-overview .filter-head {
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ov-border);
}

.route-overview .filter-head strong {
  color: #ffffff;
}

.route-overview .filter-head .muted {
  color: var(--ov-muted);
}

.route-overview .overview-snapshots {
  gap: 9px;
}

.route-overview .overview-snapshot {
  min-height: 78px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
    rgba(10, 9, 15, 0.7);
  color: var(--ov-text);
}

.route-overview .overview-snapshot.active {
  border-color: rgba(34, 215, 199, 0.44);
  background:
    linear-gradient(90deg, rgba(34, 215, 199, 0.15), rgba(139, 108, 255, 0.06)),
    rgba(14, 12, 21, 0.9);
}

.route-overview .overview-snapshot strong {
  color: var(--ov-text);
}

.route-overview .empty-state {
  border-color: var(--ov-border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ov-muted);
}

.route-overview .overview-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.route-overview .overview-hero-chips span {
  max-width: 240px;
  min-height: 30px;
  overflow: hidden;
  border: 1px solid var(--ov-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ov-text);
  padding: 6px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-overview .overview-hero-side small {
  display: block;
  margin-top: 6px;
  color: var(--ov-muted);
}

.route-overview .overview-block-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.route-overview .overview-block {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ov-border);
  border-top-color: var(--ov-border-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    var(--ov-panel);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  padding: 14px;
}

.route-overview .overview-block::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ov-cyan), var(--ov-lime));
  opacity: 0.78;
}

.route-overview .overview-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  padding-left: 4px;
}

.route-overview .overview-block-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.route-overview .overview-block-head span,
.route-overview .overview-block-head small,
.route-overview .overview-kv-grid span,
.route-overview .overview-data-tile span,
.route-overview .overview-data-tile small,
.route-overview .overview-event-list span,
.route-overview .overview-activity-list small,
.route-overview .overview-notification-list span {
  color: var(--ov-muted);
}

.route-overview .overview-block-head span {
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.route-overview .overview-block-head strong {
  color: #ffffff;
  font-size: 17px;
}

.route-overview .overview-block-head small {
  flex: 0 0 auto;
  border: 1px solid var(--ov-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 5px 9px;
  font-size: 12px;
}

.route-overview .overview-block-new-data {
  grid-column: 1 / -1;
}

.route-overview .overview-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 10px;
}

.route-overview .overview-data-tile {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(34, 215, 199, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(10, 9, 15, 0.68);
  padding: 12px;
}

.route-overview .overview-data-tile.hot {
  border-color: rgba(156, 255, 46, 0.3);
  background:
    linear-gradient(180deg, rgba(156, 255, 46, 0.12), rgba(255, 255, 255, 0.018)),
    rgba(10, 9, 15, 0.7);
}

.route-overview .overview-data-tile strong {
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.route-overview .overview-data-tile i {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.route-overview .overview-data-tile i::before {
  content: "";
  display: block;
  width: var(--pct);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ov-cyan), var(--ov-lime));
}

.route-overview .overview-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.route-overview .overview-kv-grid div {
  display: grid;
  gap: 6px;
  min-height: 76px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
  padding: 10px;
}

.route-overview .overview-kv-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 14px;
}

.route-overview .overview-location-layout,
.route-overview .overview-usage-plate {
  display: grid;
  gap: 12px;
}

.route-overview .overview-map-plate {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(34, 215, 199, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 58% 42%, rgba(156, 255, 46, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(34, 215, 199, 0.12), rgba(139, 108, 255, 0.08));
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.route-overview .overview-map-plate span {
  position: absolute;
  left: 57%;
  top: 41%;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--ov-lime);
  box-shadow: 0 0 0 12px rgba(156, 255, 46, 0.16), 0 0 32px rgba(156, 255, 46, 0.28);
}

.route-overview .overview-event-list,
.route-overview .overview-activity-list,
.route-overview .overview-notification-list {
  display: grid;
  gap: 8px;
}

.route-overview .overview-event-list article,
.route-overview .overview-notification-list article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
  padding: 10px;
}

.route-overview .overview-event-list strong,
.route-overview .overview-notification-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 14px;
}

.route-overview .overview-activity-list article {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 3px;
  min-height: 44px;
}

.route-overview .overview-activity-list article > span {
  grid-row: 1 / span 2;
  align-self: start;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 2px solid rgba(156, 255, 46, 0.78);
  border-radius: 50%;
  background: rgba(156, 255, 46, 0.16);
}

.route-overview .overview-activity-list article:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.route-overview .overview-activity-list strong {
  color: #ffffff;
  font-size: 14px;
}

.route-overview .overview-usage-plate > div:first-child {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent, rgba(34, 215, 199, 0.06)),
    rgba(255, 255, 255, 0.024);
  padding: 18px;
}

.route-overview .overview-usage-plate > div:first-child span {
  flex: 1 1 0;
  height: var(--h);
  min-height: 26px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--ov-lime), var(--ov-cyan));
  box-shadow: 0 0 22px rgba(34, 215, 199, 0.16);
}

.route-overview .overview-block-permissions::before,
.route-overview .overview-block-bluetooth::before {
  background: linear-gradient(180deg, var(--ov-violet), var(--ov-cyan));
}

.route-overview .overview-block-notifications::before {
  background: linear-gradient(180deg, var(--ov-rose), var(--ov-yellow));
}

@media (max-width: 1400px) {
  .route-overview .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-timeline {
    position: static;
  }

  .route-overview .overview-block-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .route-overview .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .sidebar {
    position: static;
    min-height: auto;
    padding: 14px 16px;
  }

  .route-overview .content {
    padding: 16px;
  }

  .route-overview .topbar {
    margin: 12px 16px 0;
  }

  .route-overview .brand {
    margin-bottom: 12px;
  }

  .route-overview .side-nav {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 10px 16px 2px;
    overflow-x: auto;
    border-top: 1px solid var(--ov-border);
    scrollbar-width: thin;
  }

  .route-overview .side-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .route-overview .overview-top,
  .route-overview .overview-actions,
  .route-overview .overview-toolbar,
  .route-overview .overview-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-hero {
    min-height: 220px;
    padding: 18px;
  }

  .route-overview .overview-hero::before {
    inset: auto 18px 18px 18px;
  }

  .route-overview .overview-hero::after {
    right: 14px;
    top: 18px;
    width: 110px;
    height: 110px;
  }

  .route-overview .overview-hero-main strong {
    font-size: 25px;
  }

  .route-overview .overview-metrics,
  .route-overview .overview-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-head,
  .route-overview .overview-hero-chips {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-data-grid,
  .route-overview .overview-kv-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1241px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications {
    grid-column: span 2;
  }
}

@media (max-width: 1240px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .route-overview .overview-metrics,
  .route-overview .overview-block-grid,
  .route-overview .overview-data-grid,
  .route-overview .overview-kv-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications {
    grid-column: auto;
  }
}

.route-overview .overview-block-location {
  grid-column: span 2;
}

.route-overview .overview-block-location .overview-location-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.25fr) minmax(220px, 0.75fr);
  gap: 12px;
  align-items: stretch;
}

.route-overview .overview-block-location .overview-location-map {
  min-height: 270px;
}

.route-overview .overview-block-location .overview-kv-grid {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

@media (max-width: 900px) {
  .route-overview .overview-block-location {
    grid-column: auto;
  }

  .route-overview .overview-block-location .overview-location-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-location .overview-location-map {
    min-height: 220px;
  }
}

.overview-location-map {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(32, 215, 201, 0.2);
  border-radius: 8px;
  background: #edf2ee;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.overview-location-map-canvas,
.overview-location-map-fallback {
  position: absolute;
  inset: 0;
}

.overview-location-map-canvas {
  z-index: 1;
}

.overview-location-map > .overview-location-map-canvas.maplibregl-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.overview-location-map-fallback {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(31, 67, 82, 0.14) 1px, transparent 1px),
    linear-gradient(180deg, rgba(31, 67, 82, 0.14) 1px, transparent 1px),
    radial-gradient(circle at 58% 42%, rgba(32, 215, 201, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(238, 246, 241, 0.94), rgba(218, 235, 230, 0.9));
  background-size: 32px 32px, 32px 32px, auto, auto;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.overview-location-map.map-ready .overview-location-map-fallback {
  opacity: 0;
}

.overview-location-map-fallback span,
.overview-location-marker {
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #20d7c9;
  box-shadow: 0 0 0 12px rgba(32, 215, 201, 0.16), 0 16px 28px rgba(8, 11, 20, 0.32);
}

.overview-location-map-fallback span {
  position: absolute;
  left: 57%;
  top: 41%;
}

.overview-location-marker {
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.overview-location-marker.mock {
  background: var(--red);
  box-shadow: 0 0 0 12px rgba(255, 118, 168, 0.16), 0 16px 28px rgba(8, 11, 20, 0.32);
}

.overview-location-map-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  border: 1px solid rgba(8, 11, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  color: var(--text);
  box-shadow: 0 14px 28px rgba(8, 11, 20, 0.18);
  backdrop-filter: blur(10px);
}

.overview-location-map-caption strong,
.overview-location-map-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-location-map-caption strong {
  font-size: 13px;
}

.overview-location-map-caption span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.overview-location-map .maplibregl-map {
  font: inherit;
}

.overview-location-map .maplibregl-ctrl-top-right {
  top: 10px;
  right: 10px;
}

.overview-location-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(8, 11, 20, 0.14);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(8, 11, 20, 0.16);
}

.overview-location-map .maplibregl-popup-content {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(8, 11, 20, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 10px;
  color: var(--text);
  box-shadow: 0 14px 28px rgba(8, 11, 20, 0.22);
}

.overview-location-map .maplibregl-popup-content strong,
.overview-location-map .maplibregl-popup-content span {
  display: block;
  white-space: nowrap;
}

.overview-location-map .maplibregl-popup-content span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.route-overview .overview-location-map {
  border-color: rgba(32, 215, 201, 0.22);
  background: #0b1019;
}

.route-overview .overview-location-map-fallback {
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(32, 215, 201, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 58% 42%, rgba(146, 255, 56, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(32, 215, 201, 0.12), rgba(143, 124, 255, 0.08));
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.route-overview .overview-location-map-caption {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(12, 14, 23, 0.88);
  color: var(--hx-text);
}

.route-overview .overview-location-map-caption span {
  color: var(--hx-muted);
}

@media (max-width: 760px) {
  .overview-location-map {
    min-height: 210px;
  }

  .overview-location-map-caption {
    left: 10px;
    right: 10px;
    justify-content: space-between;
  }
}

.nav-icon-locations::before {
  border-radius: 50%;
}

.nav-icon-locations::after {
  inset: 6px;
  border-radius: 50%;
}

.route-overview .nav-icon-locations::before {
  border-radius: 50%;
}

.route-overview .nav-icon-locations::after {
  inset: 6px;
  border-radius: 50%;
}

.locations-layout {
  grid-template-columns: 270px minmax(0, 1fr) 360px;
}

.locations-toolbar {
  align-items: stretch;
}

.location-filter-label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.location-side-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.location-summary-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
}

.location-summary-card span,
.location-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.location-summary-card strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-map {
  min-height: 300px;
}

.location-map-shell {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0a1118;
  box-shadow: var(--shadow);
}

.location-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.location-map-shell > .location-map-canvas.maplibregl-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.location-map-local-base {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.86;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.location-map-shell.map-tiles-ready .location-map-local-base {
  opacity: 0;
}

.location-map-dom-route {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.location-map-dom-route polyline {
  fill: none;
  stroke: rgba(32, 215, 201, 0.88);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 6px rgba(8, 11, 20, 0.55));
}

.location-map-dom-points {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.location-map-marker {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(8, 11, 20, 0.92);
  border-radius: 999px;
  background: #e8f7f4;
  box-shadow: 0 0 0 3px rgba(32, 215, 201, 0.18), 0 9px 18px rgba(8, 11, 20, 0.34);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.location-map-marker.good {
  background: #20d7c9;
}

.location-map-marker.mock {
  z-index: 3;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 118, 168, 0.18), 0 9px 18px rgba(8, 11, 20, 0.34);
}

.location-map-marker.latest {
  z-index: 4;
  width: 17px;
  height: 17px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(146, 255, 56, 0.18), 0 10px 22px rgba(8, 11, 20, 0.42);
}

.location-map-marker.active {
  z-index: 5;
  width: 18px;
  height: 18px;
  background: #8f7cff;
  box-shadow: 0 0 0 7px rgba(143, 124, 255, 0.22), 0 10px 22px rgba(8, 11, 20, 0.42);
}

.location-map .maplibregl-map {
  font: inherit;
}

.location-map .maplibregl-ctrl-top-right {
  top: 12px;
  right: 12px;
}

.location-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(8, 11, 20, 0.14);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(8, 11, 20, 0.16);
}

.location-map .maplibregl-popup-content {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(8, 11, 20, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 10px;
  color: var(--text);
  box-shadow: 0 14px 28px rgba(8, 11, 20, 0.22);
}

.location-map .maplibregl-popup-content strong,
.location-map .maplibregl-popup-content span {
  display: block;
  white-space: nowrap;
}

.location-map .maplibregl-popup-content span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.location-map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(520px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

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

.location-map-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
  background: var(--accent);
}

.location-map-legend i.latest {
  background: var(--green);
}

.location-map-legend i.good {
  background: var(--accent);
}

.location-map-legend i.mock {
  background: var(--red);
}

.location-map-surface {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #eff4f1;
  box-shadow: var(--shadow);
}

.location-basemap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.location-basemap-fill {
  fill: #eef4ef;
}

.location-basemap-grid {
  stroke: rgba(31, 67, 82, 0.16);
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
}

.location-basemap-label {
  fill: rgba(31, 67, 82, 0.5);
  font-size: 2.4px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(238, 244, 239, 0.84);
  stroke-width: 0.32px;
}

.location-basemap-water {
  fill: url("#locationBasemapWater");
}

.location-basemap-park {
  fill: rgba(72, 157, 110, 0.16);
  stroke: rgba(72, 157, 110, 0.18);
  stroke-width: 0.32;
  vector-effect: non-scaling-stroke;
}

.location-basemap-road {
  fill: none;
  stroke: rgba(72, 85, 91, 0.4);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.05;
  vector-effect: non-scaling-stroke;
}

.location-basemap-road.minor {
  stroke: rgba(72, 85, 91, 0.22);
  stroke-width: 0.58;
}

.location-basemap-road.accent {
  stroke: rgba(42, 117, 140, 0.4);
  stroke-width: 0.88;
}

.location-route {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.location-route polyline {
  fill: none;
  stroke: rgba(42, 117, 140, 0.7);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.location-dot {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(42, 117, 140, 0.18), 0 8px 16px rgba(22, 33, 31, 0.14);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.location-dot.latest {
  width: 17px;
  height: 17px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(40, 122, 73, 0.16), 0 10px 18px rgba(22, 33, 31, 0.16);
}

.location-dot.active {
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(47, 111, 186, 0.18), 0 10px 18px rgba(22, 33, 31, 0.18);
}

.location-map-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(460px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.location-map-caption strong {
  color: var(--text);
  font-size: 16px;
}

.location-open {
  grid-template-columns: 140px minmax(0, 1fr) minmax(130px, 180px);
}

.route-overview .location-filter-label {
  color: var(--hx-muted);
}

.route-overview .location-summary-card,
.route-overview .location-map-shell {
  border-color: var(--hx-line);
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(32, 215, 201, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 18% 22%, rgba(32, 215, 201, 0.14), transparent 32%),
    var(--hx-panel-soft);
  background-size: 34px 34px, 34px 34px, auto, auto;
  color: var(--hx-text);
}

.route-overview .location-map-surface {
  border-color: var(--hx-line);
  background: #0b1019;
  color: var(--hx-text);
}

.route-overview .location-basemap-fill {
  fill: #101824;
}

.route-overview .location-basemap-grid {
  stroke: rgba(102, 244, 232, 0.15);
}

.route-overview .location-basemap-label {
  fill: rgba(212, 224, 239, 0.5);
  stroke: rgba(12, 16, 25, 0.82);
}

.route-overview .location-basemap-water {
  fill: rgba(36, 124, 153, 0.24);
}

.route-overview .location-basemap-park {
  fill: rgba(69, 176, 120, 0.16);
  stroke: rgba(69, 176, 120, 0.22);
}

.route-overview .location-basemap-road {
  stroke: rgba(216, 224, 239, 0.24);
}

.route-overview .location-basemap-road.minor {
  stroke: rgba(216, 224, 239, 0.14);
}

.route-overview .location-basemap-road.accent {
  stroke: rgba(32, 215, 201, 0.34);
}

.route-overview .location-summary-card span,
.route-overview .location-summary-card small {
  color: var(--hx-muted);
}

.route-overview .location-summary-card strong,
.route-overview .location-map-caption strong {
  color: var(--hx-text);
}

.route-overview .location-route polyline {
  stroke: rgba(32, 215, 201, 0.72);
}

.route-overview .location-dot {
  border-color: rgba(17, 15, 26, 0.92);
  background: var(--hx-cyan);
  box-shadow: 0 0 0 2px rgba(32, 215, 201, 0.18), 0 12px 22px rgba(0, 0, 0, 0.28);
}

.route-overview .location-dot.latest {
  background: var(--hx-lime);
  box-shadow: 0 0 0 5px rgba(146, 255, 56, 0.13), 0 12px 22px rgba(0, 0, 0, 0.28);
}

.route-overview .location-dot.active {
  background: #8f7cff;
  box-shadow: 0 0 0 6px rgba(143, 124, 255, 0.2), 0 12px 22px rgba(0, 0, 0, 0.3);
}

.route-overview .location-map-caption {
  border-color: var(--hx-line);
  background: rgba(17, 15, 26, 0.88);
  color: var(--hx-muted);
}

.route-overview .location-map-legend {
  border-color: var(--hx-line);
  background: rgba(17, 15, 26, 0.88);
  color: var(--hx-muted);
}

.route-overview .location-map .maplibregl-ctrl-group {
  border-color: var(--hx-line);
  background: rgba(17, 15, 26, 0.9);
}

.route-overview .location-map .maplibregl-ctrl-group button {
  filter: invert(1);
}

.route-overview .location-map .maplibregl-popup-content {
  border-color: var(--hx-line);
  background: rgba(17, 15, 26, 0.92);
  color: var(--hx-text);
}

.route-overview .location-map .maplibregl-popup-content span {
  color: var(--hx-muted);
}

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

@media (max-width: 760px) {
  .locations-toolbar,
  .location-open {
    grid-template-columns: 1fr;
  }

  .location-map-surface {
    min-height: 240px;
  }

  .location-map-shell {
    min-height: 300px;
  }

  .location-map-caption {
    left: 10px;
    right: 10px;
    justify-content: space-between;
  }

  .location-map-legend {
    right: 10px;
    left: 10px;
  }
}

@media (max-width: 760px) {
  .route-overview .history-toolbar,
  .route-overview .contacts-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .history-search,
  .route-overview .history-controls,
  .route-overview .contacts-controls,
  .route-overview .keylogger-mask-toggle {
    width: 100%;
    min-width: 0;
  }

  .route-overview .history-search input,
  .route-overview .history-controls .select,
  .route-overview .contacts-controls .select {
    width: 100%;
  }
}

.route-overview .history-toolbar {
  flex-wrap: wrap;
  align-items: stretch;
}

.route-overview .history-search {
  min-width: min(280px, 100%);
}

.route-overview .history-controls {
  flex: 1 1 150px;
}

.route-overview .history-controls .select {
  width: 100%;
}

@media (max-width: 1520px) {
  .route-overview .screens-layout,
  .route-overview .history-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .route-overview .contacts-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .route-overview .screen-inspector,
  .route-overview .history-inspector {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 760px) {
  .route-overview .screens-layout,
  .route-overview .history-layout,
  .route-overview .contacts-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .screens-filters,
  .route-overview .history-filters {
    position: static;
  }
}

/* Shared command theme for the sections that still use the older list/table layouts. */
.route-overview .history-page,
.route-overview .screens-page,
.route-overview .page-head,
.route-overview .grid {
  max-width: 1600px;
  margin-right: auto;
  margin-left: auto;
}

.route-overview .history-page,
.route-overview .screens-page {
  gap: 18px;
  color: var(--hx-text);
}

.route-overview .page-head,
.route-overview .history-top,
.route-overview .screens-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  margin-bottom: 18px;
}

.route-overview .history-top,
.route-overview .screens-top {
  margin-bottom: 0;
}

.route-overview .page-head h1,
.route-overview .history-top h1,
.route-overview .screens-top h1 {
  margin: 0 0 4px;
  color: var(--hx-text);
  font-size: 24px;
  font-weight: 680;
}

.route-overview .page-head p,
.route-overview .history-top .muted,
.route-overview .screens-top .muted,
.route-overview .muted,
.route-overview p {
  color: var(--hx-muted);
}

.route-overview .history-actions,
.route-overview .screens-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(470px, 100%);
}

.route-overview input,
.route-overview select,
.route-overview textarea {
  border-color: var(--hx-line);
  background: var(--hx-panel-softer);
  color: var(--hx-text);
}

.route-overview input::placeholder,
.route-overview textarea::placeholder {
  color: var(--hx-faint);
}

.route-overview select option {
  background: var(--hx-bg-2);
  color: var(--hx-text);
}

.route-overview textarea,
.route-overview input:not([type="checkbox"]) {
  border-radius: 999px;
}

.route-overview textarea {
  border-radius: 8px;
}

.route-overview .button {
  border-color: rgba(32, 215, 201, 0.28);
  background:
    linear-gradient(180deg, rgba(32, 215, 201, 0.18), rgba(32, 215, 201, 0.08)),
    var(--hx-panel-softer);
  color: var(--hx-text);
  box-shadow: 0 0 28px rgba(32, 215, 201, 0.1);
}

.route-overview .button.ghost {
  border-color: var(--hx-line);
  background: var(--hx-panel-softer);
  color: var(--hx-muted);
  box-shadow: none;
}

.route-overview .button.warn {
  border-color: rgba(255, 118, 168, 0.3);
  background: rgba(255, 118, 168, 0.12);
  color: #ffd3e3;
}

.route-overview .link-button {
  color: var(--hx-cyan);
}

.route-overview .panel,
.route-overview .screens-filters,
.route-overview .screen-inspector,
.route-overview .history-filters,
.route-overview .history-inspector {
  border: 1px solid var(--hx-line);
  border-top-color: var(--hx-line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--hx-panel);
  box-shadow: var(--hx-card-shadow);
}

.route-overview .screens-filters,
.route-overview .history-filters {
  padding: 14px;
}

.route-overview .panel {
  color: var(--hx-text);
}

.route-overview .panel h2,
.route-overview label {
  color: var(--hx-text);
}

.route-overview .filter-head {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hx-line);
  padding-bottom: 10px;
}

.route-overview .filter-head strong,
.route-overview .inspector-head strong,
.route-overview .table strong {
  color: var(--hx-text);
}

.route-overview .category-pill,
.route-overview .history-row,
.route-overview .screen-card,
.route-overview .note-item,
.route-overview .check-row,
.route-overview .history-detail > div,
.route-overview .history-detail-grid,
.route-overview .keylogger-metric,
.route-overview .annotator {
  border-color: var(--hx-line);
  background: var(--hx-panel-soft);
  color: var(--hx-text);
}

.route-overview .category-pill {
  min-height: 62px;
  border-radius: 8px;
}

.route-overview .category-pill:hover,
.route-overview .history-row:hover,
.route-overview .screen-card:hover {
  border-color: rgba(32, 215, 201, 0.22);
  background:
    linear-gradient(180deg, rgba(32, 215, 201, 0.07), rgba(255, 255, 255, 0.018)),
    var(--hx-panel-soft);
}

.route-overview .category-pill.active,
.route-overview .history-row.active,
.route-overview .screen-card.current {
  border-color: rgba(32, 215, 201, 0.34);
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.14), rgba(32, 215, 201, 0.04)),
    var(--hx-panel-soft);
  box-shadow: 0 0 0 1px rgba(32, 215, 201, 0.08), var(--hx-card-shadow);
}

.route-overview .category-pill small,
.route-overview .category-pill em,
.route-overview .screen-meta span,
.route-overview .screen-meta small,
.route-overview .history-time,
.route-overview .history-main small,
.route-overview .history-side em,
.route-overview .inspector-head span,
.route-overview .history-detail span,
.route-overview .keylogger-metric span,
.route-overview .keylogger-metric small,
.route-overview .table td span,
.route-overview .check-row small {
  color: var(--hx-muted);
}

.route-overview .category-pill strong,
.route-overview .screen-meta strong,
.route-overview .history-main strong,
.route-overview .history-detail strong,
.route-overview .history-url,
.route-overview .keylogger-metric strong,
.route-overview .note-item p {
  color: var(--hx-text);
}

.route-overview .history-toolbar,
.route-overview .screens-toolbar {
  top: 14px;
  border: 1px solid var(--hx-line);
  border-top-color: var(--hx-line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(22, 19, 32, 0.9);
  box-shadow: var(--hx-card-shadow);
  backdrop-filter: blur(18px);
}

.route-overview .history-stats,
.route-overview .screens-summary {
  color: var(--hx-muted);
}

.route-overview .history-day,
.route-overview .day-separator {
  top: 66px;
  background: rgba(9, 8, 16, 0.92);
  color: var(--hx-muted);
}

.route-overview .screen-thumb {
  background: rgba(255, 255, 255, 0.035);
}

.route-overview .screens-viewer-stage,
.route-overview .screens-viewer-empty,
.route-overview .screens-viewer-select,
.route-overview .screens-viewer-thumb {
  border-color: var(--hx-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--hx-panel);
  color: var(--hx-text);
}

.route-overview .screens-viewer-main {
  background:
    radial-gradient(circle at 50% 18%, rgba(32, 215, 201, 0.08), transparent 38%),
    #090b12;
}

.route-overview .screens-viewer-empty strong,
.route-overview .screens-viewer-info strong {
  color: var(--hx-text);
}

.route-overview .screens-viewer-info span,
.route-overview .screens-viewer-info small,
.route-overview .screens-viewer-thumb span {
  color: var(--hx-muted);
}

.route-overview .screens-viewer-thumb.active {
  border-color: rgba(32, 215, 201, 0.45);
  background:
    linear-gradient(180deg, rgba(32, 215, 201, 0.14), rgba(32, 215, 201, 0.04)),
    var(--hx-panel-soft);
}

.route-overview .screens-viewer-select {
  background: var(--hx-panel-softer);
}

.route-overview .screen-check {
  border: 1px solid var(--hx-line);
  background: rgba(17, 15, 26, 0.86);
}

.route-overview .screen-card.has-notes::after,
.route-overview .screen-card.has-drawing::after {
  border-color: var(--hx-line);
  background: rgba(17, 15, 26, 0.9);
  color: var(--hx-cyan);
}

.route-overview .screen-card.has-drawing::after {
  color: var(--hx-yellow);
}

.route-overview .history-side mark {
  background: var(--hx-panel-softer);
  color: var(--hx-muted);
}

.route-overview .history-side mark.ok,
.route-overview .badge.ok {
  background: rgba(32, 215, 201, 0.12);
  color: var(--hx-text);
}

.route-overview .badge.warn,
.route-overview .history-side mark.warn {
  background: rgba(239, 233, 75, 0.12);
  color: #fff4b8;
}

.route-overview .history-side mark.red,
.route-overview .history-side mark.warn.red,
.route-overview .contact-metric.red {
  border-color: rgba(255, 118, 168, 0.28);
  background: rgba(255, 118, 168, 0.11);
  color: #ffd3e3;
}

.route-overview .history-side mark.green,
.route-overview .history-side mark.ok.green,
.route-overview .contact-metric.green {
  border-color: rgba(146, 255, 56, 0.28);
  background: rgba(146, 255, 56, 0.1);
  color: #e8ffc8;
}

.route-overview .contacts-row.status-deleted {
  border-color: rgba(255, 118, 168, 0.25);
  background:
    linear-gradient(90deg, rgba(255, 118, 168, 0.13), transparent 32%),
    var(--hx-panel-soft);
}

.route-overview .contacts-row.status-added {
  border-color: rgba(146, 255, 56, 0.23);
  background:
    linear-gradient(90deg, rgba(146, 255, 56, 0.11), transparent 32%),
    var(--hx-panel-soft);
}

.route-overview .contact-avatar {
  background:
    linear-gradient(135deg, rgba(32, 215, 201, 0.16), rgba(143, 124, 255, 0.12)),
    var(--hx-panel-soft);
  color: var(--hx-text);
}

.route-overview .keylogger-summary {
  gap: 12px;
}

.route-overview .keylogger-metric {
  position: relative;
  min-height: 86px;
  overflow: hidden;
  padding: 13px 13px 18px;
}

.route-overview .keylogger-metric::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 10px;
  left: 13px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hx-cyan), var(--hx-lime), rgba(255, 255, 255, 0.72));
}

.route-overview .keylogger-alert,
.route-overview .notice.error {
  border: 1px solid rgba(255, 118, 168, 0.28);
  background: rgba(255, 118, 168, 0.12);
  color: #ffd3e3;
}

.route-overview .notice.success {
  border: 1px solid rgba(146, 255, 56, 0.28);
  background: rgba(146, 255, 56, 0.1);
  color: #e8ffc8;
}

.route-overview .table th,
.route-overview .table td {
  border-bottom-color: var(--hx-line);
}

.route-overview .table th {
  background: var(--hx-panel-soft);
  color: var(--hx-muted);
}

.route-overview .table td,
.route-overview .table td a {
  color: var(--hx-text);
}

.route-overview .qr {
  border-color: var(--hx-line);
  background: #fff;
}

.route-overview audio.recording-player {
  filter: invert(1) hue-rotate(160deg) saturate(0.78);
}

@media (max-width: 760px) {
  .route-overview .page-head,
  .route-overview .history-top,
  .route-overview .screens-top,
  .route-overview .history-actions,
  .route-overview .screens-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .history-actions,
  .route-overview .screens-actions {
    justify-content: stretch;
  }

  .route-overview .history-actions .select,
  .route-overview .history-actions .button,
  .route-overview .screens-actions .select,
  .route-overview .screens-actions .button {
    width: 100%;
  }
}

@media (min-width: 1241px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications {
    grid-column: span 2;
  }
}

@media (max-width: 1240px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Hallmark · redesign: overview dashboard · genre: technical/luxury · reference: dark glass command center
 * critique: Philosophy 4 · Hierarchy 4 · Execution 4 · Specificity 4 · Restraint 4 · Variety 4
 */
body.route-overview {
  --hx-bg-0: #0a0910;
  --hx-bg-1: #100e18;
  --hx-bg-2: #15121f;
  --hx-panel: rgba(21, 18, 31, 0.86);
  --hx-panel-strong: rgba(27, 23, 39, 0.94);
  --hx-panel-soft: rgba(255, 255, 255, 0.035);
  --hx-panel-softer: rgba(255, 255, 255, 0.022);
  --hx-line: rgba(255, 255, 255, 0.11);
  --hx-line-strong: rgba(255, 255, 255, 0.19);
  --hx-text: #f7f4ff;
  --hx-muted: #a9a3b8;
  --hx-faint: #6f687e;
  --hx-cyan: #20d7c9;
  --hx-teal: #0b777d;
  --hx-lime: #92ff38;
  --hx-yellow: #f0e84c;
  --hx-violet: #8f7cff;
  --hx-pink: #ff76a8;
  --hx-shadow: 0 22px 80px rgba(0, 0, 0, 0.36);
  --hx-card-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  overflow-x: clip;
  background:
    radial-gradient(circle at 55% -10%, rgba(32, 215, 201, 0.10), transparent 32%),
    linear-gradient(180deg, var(--hx-bg-1), var(--hx-bg-0) 58%, #08070d);
  color: var(--hx-text);
}

.route-overview .shell {
  grid-template-columns: 312px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    transparent;
  background-size: 70px 70px;
}

.route-overview .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  border-right: 1px solid var(--hx-line);
  background:
    linear-gradient(180deg, rgba(19, 16, 29, 0.98), rgba(10, 9, 16, 0.98)),
    var(--hx-bg-1);
  padding: 26px 24px 20px;
  color: var(--hx-text);
}

.route-overview .brand {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-bottom: 34px;
}

.route-overview .brand span {
  width: 38px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, transparent 0 20%, var(--hx-text) 20% 34%, transparent 34% 48%, var(--hx-text) 48% 62%, transparent 62% 76%, var(--hx-text) 76% 90%, transparent 90%);
  color: transparent;
  box-shadow: none;
}

.route-overview .brand strong {
  color: var(--hx-text);
  font-size: 17px;
  font-weight: 760;
}

.route-overview .side-nav {
  display: grid;
  gap: 28px;
  border: 0;
  padding: 0;
}

.route-overview .nav-group {
  display: grid;
  gap: 11px;
  padding: 0 0 4px;
}

.route-overview .nav-group + .nav-group {
  padding-top: 20px;
  border-top: 1px solid var(--hx-line);
}

.route-overview .nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  color: var(--hx-muted);
  font-size: 13px;
  font-weight: 720;
}

.route-overview .nav-group-title::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.72;
}

.route-overview .nav-tree {
  position: relative;
  display: grid;
  gap: 8px;
  margin-left: 10px;
  padding-left: 24px;
}

.route-overview .nav-tree::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 18px;
  width: 1px;
  background: var(--hx-line-strong);
}

.route-overview .side-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--hx-muted);
  padding: 0 12px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 620;
}

.route-overview .side-nav a::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 50%;
  width: 15px;
  height: 1px;
  background: var(--hx-line-strong);
}

.route-overview .side-nav a:hover {
  border-color: rgba(32, 215, 201, 0.18);
  background: rgba(32, 215, 201, 0.05);
  color: var(--hx-text);
}

.route-overview .side-nav a.active {
  border-color: rgba(32, 215, 201, 0.32);
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.24), rgba(32, 215, 201, 0.05)),
    var(--hx-panel-softer);
  color: var(--hx-text);
  box-shadow:
    inset 0 0 0 1px rgba(146, 255, 56, 0.05),
    0 0 32px rgba(32, 215, 201, 0.11);
}

.route-overview .nav-icon {
  display: block;
  position: relative;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.route-overview .nav-icon::before,
.route-overview .nav-icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.6px solid currentColor;
  border-radius: 4px;
  opacity: 0.88;
}

.route-overview .nav-icon-overview::before {
  transform: rotate(45deg) scale(0.76);
}

.route-overview .nav-icon-devices::after,
.route-overview .nav-icon-history::after,
.route-overview .nav-icon-recordings::after {
  inset: 7px 3px 4px;
  border-top: 0;
}

.route-overview .nav-icon-screenshots::before {
  border-radius: 3px;
}

.route-overview .nav-icon-keylogger::after,
.route-overview .nav-icon-users::after,
.route-overview .nav-icon-logins::after,
.route-overview .nav-icon-security::after {
  inset: 5px;
  border-radius: 50%;
}

.route-overview .nav-upgrade {
  display: grid;
  gap: 10px;
  margin-top: 44px;
  border: 1px solid var(--hx-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 215, 201, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022)),
    var(--hx-panel);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.26);
  padding: 18px;
}

.route-overview .nav-upgrade-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(32, 215, 201, 0.36);
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--hx-cyan), var(--hx-teal));
  box-shadow: 0 0 26px rgba(32, 215, 201, 0.22);
}

.route-overview .nav-upgrade strong {
  color: var(--hx-text);
  font-size: 15px;
}

.route-overview .nav-upgrade small {
  color: var(--hx-muted);
  line-height: 1.35;
}

.route-overview .main {
  min-height: 100vh;
  background: transparent;
}

.route-overview .overview-command-topbar {
  min-height: 76px;
  margin: 0 36px;
  border: 0;
  border-bottom: 1px solid var(--hx-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hx-text);
  padding: 0;
}

.route-overview .topbar-pills,
.route-overview .topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.route-overview .topbar-pill,
.route-overview .overview-top-search,
.route-overview .topbar-profile .button.ghost {
  min-height: 38px;
  border: 1px solid var(--hx-line);
  border-radius: 999px;
  background: var(--hx-panel-softer);
  color: var(--hx-muted);
  padding: 8px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.route-overview .topbar-pill-report {
  padding-left: 32px;
  background:
    radial-gradient(circle at 15px 50%, rgba(32, 215, 201, 0.32) 0 4px, transparent 5px),
    var(--hx-panel-softer);
}

.route-overview .overview-top-search {
  flex: 1 1 auto;
  max-width: 520px;
  color: var(--hx-faint);
}

.route-overview .topbar-profile > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hx-line);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 118, 168, 0.36), rgba(32, 215, 201, 0.22)),
    var(--hx-panel);
  color: var(--hx-text);
  font-size: 14px;
  font-weight: 820;
}

.route-overview .content {
  padding: 28px 36px 42px;
}

.route-overview .overview-page {
  gap: 18px;
  max-width: 1600px;
  margin: 0 auto;
}

.route-overview .overview-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border: 0;
  padding: 0;
}

.route-overview .overview-top h1 {
  margin: 0 0 4px;
  color: var(--hx-text);
  font-size: 24px;
  font-weight: 680;
}

.route-overview .overview-top .muted {
  max-width: 680px;
  color: var(--hx-muted);
  font-size: 13px;
}

.route-overview .overview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(470px, 100%);
}

.route-overview .select,
.route-overview .overview-page input,
.route-overview .overview-page select {
  min-height: 42px;
  border: 1px solid var(--hx-line);
  border-radius: 999px;
  background: var(--hx-panel-softer);
  color: var(--hx-text);
}

.route-overview .overview-page .button {
  min-height: 42px;
  border: 1px solid rgba(32, 215, 201, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(32, 215, 201, 0.18), rgba(32, 215, 201, 0.08)),
    var(--hx-panel-softer);
  color: var(--hx-text);
  box-shadow: 0 0 28px rgba(32, 215, 201, 0.10);
}

.route-overview .overview-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.route-overview .overview-hero,
.route-overview .overview-metric,
.route-overview .overview-toolbar,
.route-overview .overview-timeline,
.route-overview .overview-block,
.route-overview .overview-field-row {
  border: 1px solid var(--hx-line);
  border-top-color: var(--hx-line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--hx-panel);
  box-shadow: var(--hx-card-shadow);
}

.route-overview .overview-hero {
  min-height: 318px;
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  padding: 28px;
}

.route-overview .overview-hero::before {
  inset: auto 26px 28px 26px;
  height: 132px;
  border: 1px solid rgba(32, 215, 201, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 22%, rgba(32, 215, 201, 0.20) 22% 39%, transparent 39% 45%, rgba(146, 255, 56, 0.16) 45% 64%, transparent 64%),
    linear-gradient(90deg, rgba(32, 215, 201, 0.06), rgba(32, 215, 201, 0.24), rgba(146, 255, 56, 0.16));
  clip-path: polygon(0 74%, 14% 54%, 24% 66%, 39% 24%, 52% 42%, 67% 10%, 80% 50%, 100% 28%, 100% 100%, 0 100%);
  opacity: 0.96;
}

.route-overview .overview-hero::after {
  right: 30px;
  top: 30px;
  width: 118px;
  height: 118px;
  opacity: 0.68;
}

.route-overview .overview-hero-main {
  max-width: 680px;
}

.route-overview .overview-hero-main strong {
  max-width: 680px;
  color: var(--hx-text);
  font-size: 32px;
  font-weight: 560;
}

.route-overview .overview-hero-main small,
.route-overview .overview-hero-side span,
.route-overview .overview-hero-side small,
.route-overview .overview-hero-side strong {
  color: var(--hx-muted);
}

.route-overview .overview-hero-side {
  justify-self: end;
  align-self: start;
  width: min(230px, 100%);
  border: 0;
  background: transparent;
  text-align: right;
  padding: 0;
}

.route-overview .overview-hero-side strong {
  color: var(--hx-text);
  font-size: 19px;
  font-weight: 560;
}

.route-overview .overview-hero-chips span,
.route-overview .overview-status {
  border-color: var(--hx-line);
  background: var(--hx-panel-soft);
  color: var(--hx-muted);
}

.route-overview .overview-status.ok {
  color: var(--hx-text);
  border-color: rgba(32, 215, 201, 0.28);
  background: rgba(32, 215, 201, 0.12);
}

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

.route-overview .overview-metric {
  min-height: 151px;
  padding: 18px;
}

.route-overview .overview-metric::before {
  height: 2px;
  right: 18px;
  bottom: 18px;
  left: 18px;
  background: linear-gradient(90deg, var(--hx-cyan), var(--hx-lime), rgba(255, 255, 255, 0.72));
}

.route-overview .overview-metric span,
.route-overview .overview-metric small {
  color: var(--hx-muted);
}

.route-overview .overview-metric strong {
  color: var(--hx-text);
  font-size: 26px;
  font-weight: 500;
}

.route-overview .overview-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.route-overview .overview-workspace {
  display: grid;
  gap: 16px;
}

.route-overview .overview-toolbar {
  position: sticky;
  top: 14px;
  z-index: 4;
  padding: 10px;
  backdrop-filter: blur(18px);
}

.route-overview .segmented {
  border-color: var(--hx-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.route-overview .segmented button {
  min-height: 34px;
  border-radius: 999px;
  color: var(--hx-muted);
}

.route-overview .segmented button.active {
  background:
    linear-gradient(180deg, rgba(32, 215, 201, 0.22), rgba(32, 215, 201, 0.07));
  color: var(--hx-text);
}

.route-overview .overview-block-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.route-overview .overview-block-new-data,
.route-overview .overview-block-notifications {
  grid-column: span 2;
}

.route-overview .overview-block-location,
.route-overview .overview-block-events,
.route-overview .overview-block-activity {
  grid-row: span 2;
}

.route-overview .overview-block {
  min-height: 220px;
  padding: 18px;
}

.route-overview .overview-block::before {
  width: 0;
}

.route-overview .overview-block-head {
  margin-bottom: 16px;
  padding-left: 0;
}

.route-overview .overview-block-head span {
  color: var(--hx-faint);
  font-size: 10px;
  font-weight: 680;
}

.route-overview .overview-block-head strong {
  color: var(--hx-text);
  font-size: 17px;
  font-weight: 560;
}

.route-overview .overview-block-head small {
  border-color: var(--hx-line);
  background: var(--hx-panel-soft);
  color: var(--hx-muted);
}

.route-overview .overview-data-grid {
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}

.route-overview .overview-data-tile,
.route-overview .overview-kv-grid div,
.route-overview .overview-event-list article,
.route-overview .overview-notification-list article {
  border-color: var(--hx-line);
  background: var(--hx-panel-soft);
}

.route-overview .overview-data-tile {
  min-height: 104px;
}

.route-overview .overview-data-tile strong {
  color: var(--hx-text);
  font-size: 24px;
  font-weight: 520;
}

.route-overview .overview-data-tile i {
  background: rgba(255, 255, 255, 0.07);
}

.route-overview .overview-data-tile i::before {
  background: linear-gradient(90deg, var(--hx-cyan), var(--hx-lime));
}

.route-overview .overview-map-plate {
  min-height: 190px;
  border-color: rgba(32, 215, 201, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 58% 42%, rgba(146, 255, 56, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(32, 215, 201, 0.12), rgba(143, 124, 255, 0.08));
  background-size: 32px 32px;
}

.route-overview .overview-map-plate span {
  background: var(--hx-lime);
}

.route-overview .overview-kv-grid strong,
.route-overview .overview-event-list strong,
.route-overview .overview-activity-list strong,
.route-overview .overview-notification-list strong {
  color: var(--hx-text);
  font-weight: 560;
}

.route-overview .overview-timeline {
  top: 14px;
  padding: 16px;
}

.route-overview .filter-head {
  border-bottom-color: var(--hx-line);
}

.route-overview .overview-snapshot {
  border-color: var(--hx-line);
  background: var(--hx-panel-softer);
}

.route-overview .overview-snapshot.active {
  border-color: rgba(32, 215, 201, 0.34);
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.14), rgba(32, 215, 201, 0.04)),
    var(--hx-panel-soft);
}

@media (max-width: 1440px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .route-overview .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .sidebar {
    position: static;
    min-height: auto;
    padding: 18px 18px 10px;
  }

  .route-overview .side-nav {
    gap: 12px;
  }

  .route-overview .nav-group {
    display: block;
  }

  .route-overview .nav-group-title,
  .route-overview .nav-tree::before,
  .route-overview .side-nav a::before,
  .route-overview .nav-upgrade {
    display: none;
  }

  .route-overview .nav-tree {
    display: flex;
    gap: 8px;
    margin: 0 -18px;
    overflow-x: auto;
    padding: 0 18px 8px;
    scrollbar-width: thin;
  }

  .route-overview .side-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .route-overview .overview-command-topbar {
    margin: 0 18px;
  }

  .route-overview .overview-top-search,
  .route-overview .topbar-pills {
    display: none;
  }

  .route-overview .content {
    padding: 20px 18px 32px;
  }
}

@media (max-width: 760px) {
  .route-overview .overview-top,
  .route-overview .overview-actions,
  .route-overview .overview-dashboard,
  .route-overview .overview-layout,
  .route-overview .overview-block-grid,
  .route-overview .overview-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-top {
    display: grid;
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications,
  .route-overview .overview-block-location,
  .route-overview .overview-block-events,
  .route-overview .overview-block-activity {
    grid-column: auto;
    grid-row: auto;
  }

  .route-overview .overview-hero {
    min-height: 300px;
    padding: 20px;
  }

  .route-overview .overview-hero-main strong {
    font-size: 25px;
  }

  .route-overview .overview-hero-side {
    justify-self: start;
    text-align: left;
  }
}

/* Design v1 final pass: dark command dashboard inspired by the supplied Hynex reference. */
body.route-overview {
  --hx-bg-0: #090810;
  --hx-bg-1: #100e18;
  --hx-bg-2: #171421;
  --hx-panel: rgba(22, 19, 32, 0.88);
  --hx-panel-strong: rgba(29, 25, 42, 0.96);
  --hx-panel-soft: rgba(255, 255, 255, 0.038);
  --hx-panel-softer: rgba(255, 255, 255, 0.024);
  --hx-line: rgba(255, 255, 255, 0.112);
  --hx-line-strong: rgba(255, 255, 255, 0.19);
  --hx-text: #f8f5ff;
  --hx-muted: #aaa4b8;
  --hx-faint: #706a7d;
  --hx-cyan: #20d7c9;
  --hx-teal: #087b7f;
  --hx-lime: #92ff38;
  --hx-yellow: #efe94b;
  --hx-violet: #8e7cff;
  --hx-pink: #ff76a8;
  --hx-shadow: 0 24px 76px rgba(0, 0, 0, 0.38);
  --hx-card-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 190px),
    linear-gradient(180deg, var(--hx-bg-1), var(--hx-bg-0) 58%, #07060c);
  color: var(--hx-text);
}

.route-overview .shell {
  grid-template-columns: 292px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
}

.route-overview .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  border-right: 1px solid var(--hx-line);
  background:
    linear-gradient(180deg, rgba(20, 17, 31, 0.99), rgba(10, 9, 16, 0.99)),
    var(--hx-bg-1);
  color: var(--hx-text);
  padding: 26px 22px 20px;
}

.route-overview .brand {
  min-height: 42px;
  margin-bottom: 34px;
}

.route-overview .brand span {
  width: 38px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, transparent 0 20%, var(--hx-text) 20% 34%, transparent 34% 48%, var(--hx-text) 48% 62%, transparent 62% 76%, var(--hx-text) 76% 90%, transparent 90%);
  box-shadow: none;
  color: transparent;
}

.route-overview .brand strong {
  color: var(--hx-text);
  font-size: 17px;
  font-weight: 760;
}

.route-overview .side-nav {
  display: flex;
  min-height: calc(100vh - 122px);
  flex-direction: column;
  gap: 26px;
  border: 0;
  padding: 0;
}

.route-overview .nav-group {
  display: grid;
  gap: 11px;
}

.route-overview .nav-group + .nav-group {
  padding-top: 20px;
  border-top: 1px solid var(--hx-line);
}

.route-overview .nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  color: var(--hx-muted);
  font-size: 13px;
  font-weight: 700;
}

.route-overview .nav-group-title::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.7;
  transform: rotate(45deg) translateY(-2px);
}

.route-overview .nav-tree {
  position: relative;
  display: grid;
  gap: 8px;
  margin-left: 10px;
  padding-left: 24px;
}

.route-overview .nav-tree::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 18px;
  width: 1px;
  background: var(--hx-line-strong);
}

.route-overview .side-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--hx-muted);
  padding: 0 12px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 620;
}

.route-overview .side-nav a::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 50%;
  width: 15px;
  height: 1px;
  background: var(--hx-line-strong);
}

.route-overview .side-nav a:hover {
  border-color: rgba(32, 215, 201, 0.18);
  background: rgba(32, 215, 201, 0.055);
  color: var(--hx-text);
}

.route-overview .side-nav a.active {
  border-color: rgba(32, 215, 201, 0.32);
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.24), rgba(32, 215, 201, 0.052)),
    var(--hx-panel-softer);
  color: var(--hx-text);
  box-shadow:
    inset 0 0 0 1px rgba(146, 255, 56, 0.055),
    0 0 32px rgba(32, 215, 201, 0.11);
}

.route-overview .nav-icon {
  display: block;
  position: relative;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.route-overview .nav-icon::before,
.route-overview .nav-icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.6px solid currentColor;
  border-radius: 4px;
  opacity: 0.88;
}

.route-overview .nav-icon-overview::before {
  transform: rotate(45deg) scale(0.76);
}

.route-overview .nav-icon-devices::after,
.route-overview .nav-icon-history::after,
.route-overview .nav-icon-recordings::after {
  inset: 7px 3px 4px;
  border-top: 0;
}

.route-overview .nav-icon-keylogger::after,
.route-overview .nav-icon-users::after,
.route-overview .nav-icon-logins::after,
.route-overview .nav-icon-security::after {
  inset: 5px;
  border-radius: 50%;
}

.route-overview .nav-upgrade {
  display: grid;
  gap: 10px;
  margin-top: auto;
  border: 1px solid var(--hx-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 215, 201, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022)),
    var(--hx-panel);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.26);
  padding: 18px;
}

.route-overview .nav-upgrade-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(32, 215, 201, 0.36);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hx-cyan), var(--hx-teal));
  box-shadow: 0 0 26px rgba(32, 215, 201, 0.22);
}

.route-overview .nav-upgrade strong {
  color: var(--hx-text);
  font-size: 15px;
}

.route-overview .nav-upgrade small {
  color: var(--hx-muted);
  line-height: 1.35;
}

.route-overview .main {
  min-height: 100vh;
  background: transparent;
}

.route-overview .overview-command-topbar {
  min-height: 76px;
  margin: 0 34px;
  border: 0;
  border-bottom: 1px solid var(--hx-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hx-text);
  padding: 0;
}

.route-overview .topbar-pills,
.route-overview .topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.route-overview .topbar-pill,
.route-overview .overview-top-search,
.route-overview .topbar-profile .button.ghost {
  min-height: 38px;
  border: 1px solid var(--hx-line);
  border-radius: 999px;
  background: var(--hx-panel-softer);
  color: var(--hx-muted);
  padding: 8px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.route-overview .topbar-pill-report {
  padding-left: 32px;
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(32, 215, 201, 0.28) 10px 18px, transparent 18px),
    var(--hx-panel-softer);
}

.route-overview .overview-top-search {
  flex: 1 1 auto;
  max-width: 520px;
  color: var(--hx-faint);
}

.route-overview .topbar-profile > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hx-line);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 118, 168, 0.36), rgba(32, 215, 201, 0.22)),
    var(--hx-panel);
  color: var(--hx-text);
  font-size: 14px;
  font-weight: 820;
}

.route-overview .content {
  padding: 28px 34px 42px;
}

.route-overview .overview-page {
  gap: 18px;
  max-width: 1600px;
  margin: 0 auto;
  color: var(--hx-text);
}

.route-overview .overview-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border: 0;
  padding: 0;
}

.route-overview .overview-top h1 {
  margin: 0 0 4px;
  color: var(--hx-text);
  font-size: 24px;
  font-weight: 680;
}

.route-overview .overview-top .muted {
  max-width: 700px;
  margin: 0;
  color: var(--hx-muted);
  font-size: 13px;
}

.route-overview .overview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(470px, 100%);
}

.route-overview .select,
.route-overview .overview-page input,
.route-overview .overview-page select {
  min-height: 42px;
  border: 1px solid var(--hx-line);
  border-radius: 999px;
  background: var(--hx-panel-softer);
  color: var(--hx-text);
}

.route-overview .overview-page input::placeholder {
  color: var(--hx-faint);
}

.route-overview .overview-page select option {
  background: var(--hx-bg-2);
  color: var(--hx-text);
}

.route-overview .overview-page .button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(32, 215, 201, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(32, 215, 201, 0.18), rgba(32, 215, 201, 0.08)),
    var(--hx-panel-softer);
  color: var(--hx-text);
  box-shadow: 0 0 28px rgba(32, 215, 201, 0.10);
}

.route-overview .overview-page .button::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.6px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.route-overview .overview-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 16px;
  align-items: stretch;
}

.route-overview .overview-hero,
.route-overview .overview-metric,
.route-overview .overview-toolbar,
.route-overview .overview-timeline,
.route-overview .overview-block,
.route-overview .overview-field-row {
  border: 1px solid var(--hx-line);
  border-top-color: var(--hx-line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--hx-panel);
  box-shadow: var(--hx-card-shadow);
}

.route-overview .overview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  min-height: 344px;
  overflow: hidden;
  padding: 28px;
}

.route-overview .overview-hero::before {
  content: "";
  position: absolute;
  inset: auto 26px 28px 26px;
  height: 132px;
  border: 1px solid rgba(32, 215, 201, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 22%, rgba(32, 215, 201, 0.20) 22% 39%, transparent 39% 45%, rgba(146, 255, 56, 0.16) 45% 64%, transparent 64%),
    linear-gradient(90deg, rgba(32, 215, 201, 0.06), rgba(32, 215, 201, 0.24), rgba(146, 255, 56, 0.16));
  clip-path: polygon(0 74%, 14% 54%, 24% 66%, 39% 24%, 52% 42%, 67% 10%, 80% 50%, 100% 28%, 100% 100%, 0 100%);
  opacity: 0.96;
  pointer-events: none;
}

.route-overview .overview-hero::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 30px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, transparent 0 20%, var(--hx-cyan) 20% 42%, var(--hx-lime) 42% 58%, var(--hx-yellow) 58% 69%, transparent 69% 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 42%, #000 43% 62%, transparent 63%);
  mask: radial-gradient(circle, transparent 0 42%, #000 43% 62%, transparent 63%);
  opacity: 0.68;
  pointer-events: none;
}

.route-overview .overview-hero-main {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.route-overview .overview-hero-main strong {
  max-width: 680px;
  color: var(--hx-text);
  font-size: 32px;
  font-weight: 560;
}

.route-overview .overview-hero-main small,
.route-overview .overview-hero-side span,
.route-overview .overview-hero-side small,
.route-overview .overview-hero-side strong {
  color: var(--hx-muted);
}

.route-overview .overview-hero-side {
  position: relative;
  z-index: 1;
  justify-self: end;
  align-self: start;
  width: min(230px, 100%);
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: right;
}

.route-overview .overview-hero-side strong {
  color: var(--hx-text);
  font-size: 19px;
  font-weight: 560;
}

.route-overview .overview-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.route-overview .overview-hero-chips span,
.route-overview .overview-status {
  border: 1px solid var(--hx-line);
  background: var(--hx-panel-soft);
  color: var(--hx-muted);
}

.route-overview .overview-hero-chips span {
  max-width: 240px;
  min-height: 30px;
  overflow: hidden;
  border-radius: 999px;
  padding: 6px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-overview .overview-status.ok {
  color: var(--hx-text);
  border-color: rgba(32, 215, 201, 0.28);
  background: rgba(32, 215, 201, 0.12);
}

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

.route-overview .overview-metric {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  padding: 18px 18px 26px;
}

.route-overview .overview-metric::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hx-cyan), var(--hx-lime), rgba(255, 255, 255, 0.72));
}

.route-overview .overview-metric.warn::before {
  background: linear-gradient(90deg, var(--hx-yellow), var(--hx-pink));
}

.route-overview .overview-metric.power::before {
  background: linear-gradient(90deg, #2ee48b, var(--hx-lime));
}

.route-overview .overview-metric.info::before {
  background: linear-gradient(90deg, var(--hx-cyan), var(--hx-violet));
}

.route-overview .overview-metric.activity::before {
  background: linear-gradient(90deg, var(--hx-pink), var(--hx-yellow));
}

.route-overview .overview-metric.archive::before {
  background: linear-gradient(90deg, var(--hx-faint), var(--hx-cyan));
}

.route-overview .overview-metric span,
.route-overview .overview-metric small,
.route-overview .overview-block-head span,
.route-overview .overview-block-head small,
.route-overview .overview-kv-grid span,
.route-overview .overview-data-tile span,
.route-overview .overview-data-tile small,
.route-overview .overview-event-list span,
.route-overview .overview-activity-list small,
.route-overview .overview-notification-list span,
.route-overview .overview-snapshot small,
.route-overview .overview-field-row span {
  color: var(--hx-muted);
}

.route-overview .overview-metric strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--hx-text);
  font-size: 26px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-overview .overview-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.route-overview .overview-workspace {
  display: grid;
  gap: 16px;
}

.route-overview .overview-toolbar {
  position: sticky;
  top: 14px;
  z-index: 4;
  gap: 12px;
  padding: 10px;
  backdrop-filter: blur(18px);
}

.route-overview .overview-toolbar .history-search {
  min-width: 0;
}

.route-overview .segmented {
  border-color: var(--hx-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.route-overview .segmented button {
  min-height: 34px;
  border-radius: 999px;
  color: var(--hx-muted);
}

.route-overview .segmented button.active {
  background: linear-gradient(180deg, rgba(32, 215, 201, 0.22), rgba(32, 215, 201, 0.07));
  color: var(--hx-text);
}

.route-overview .overview-block-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.route-overview .overview-block-new-data,
.route-overview .overview-block-notifications {
  grid-column: span 2;
}

.route-overview .overview-block-location,
.route-overview .overview-block-events,
.route-overview .overview-block-activity {
  grid-row: span 2;
}

.route-overview .overview-block {
  min-height: 220px;
  overflow: hidden;
  padding: 18px;
}

.route-overview .overview-block::before {
  width: 0;
}

.route-overview .overview-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-left: 0;
}

.route-overview .overview-block-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.route-overview .overview-block-head span {
  color: var(--hx-faint);
  font-size: 10px;
  font-weight: 680;
  text-transform: uppercase;
}

.route-overview .overview-block-head strong {
  color: var(--hx-text);
  font-size: 17px;
  font-weight: 560;
  overflow-wrap: anywhere;
}

.route-overview .overview-block-head small {
  flex: 0 0 auto;
  border: 1px solid var(--hx-line);
  border-radius: 999px;
  background: var(--hx-panel-soft);
  padding: 5px 9px;
  font-size: 12px;
}

.route-overview .overview-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}

.route-overview .overview-data-tile,
.route-overview .overview-kv-grid div,
.route-overview .overview-event-list article,
.route-overview .overview-notification-list article {
  border: 1px solid var(--hx-line);
  border-radius: 8px;
  background: var(--hx-panel-soft);
}

.route-overview .overview-data-tile {
  min-height: 104px;
}

.route-overview .overview-data-tile strong {
  color: var(--hx-text);
  font-size: 24px;
  font-weight: 520;
}

.route-overview .overview-data-tile i {
  background: rgba(255, 255, 255, 0.07);
}

.route-overview .overview-data-tile i::before {
  background: linear-gradient(90deg, var(--hx-cyan), var(--hx-lime));
}

.route-overview .overview-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
}

.route-overview .overview-kv-grid div {
  min-height: 76px;
}

.route-overview .overview-kv-grid strong,
.route-overview .overview-event-list strong,
.route-overview .overview-activity-list strong,
.route-overview .overview-notification-list strong,
.route-overview .overview-field-row p,
.route-overview .overview-field-row strong {
  color: var(--hx-text);
  font-weight: 560;
  overflow-wrap: anywhere;
}

.route-overview .overview-map-plate {
  min-height: 190px;
  border-color: rgba(32, 215, 201, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(32, 215, 201, 0.12), rgba(143, 124, 255, 0.08));
  background-size: 32px 32px, 32px 32px, auto;
}

.route-overview .overview-map-plate::before,
.route-overview .overview-map-plate::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: rgba(32, 215, 201, 0.32);
}

.route-overview .overview-map-plate::before {
  left: 58%;
  top: 0;
  width: 1px;
  height: 100%;
}

.route-overview .overview-map-plate::after {
  left: 0;
  top: 42%;
  width: 100%;
  height: 1px;
}

.route-overview .overview-map-plate span {
  background: var(--hx-lime);
}

.route-overview .overview-timeline {
  top: 14px;
  padding: 16px;
}

.route-overview .filter-head {
  border-bottom-color: var(--hx-line);
}

.route-overview .filter-head strong {
  color: var(--hx-text);
}

.route-overview .overview-snapshot {
  border-color: var(--hx-line);
  background: var(--hx-panel-softer);
  color: var(--hx-text);
}

.route-overview .overview-snapshot.active {
  border-color: rgba(32, 215, 201, 0.34);
  background:
    linear-gradient(90deg, rgba(32, 215, 201, 0.14), rgba(32, 215, 201, 0.04)),
    var(--hx-panel-soft);
}

.route-overview .empty-state {
  border-color: var(--hx-line);
  background: var(--hx-panel-softer);
  color: var(--hx-muted);
}

@media (max-width: 1440px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .route-overview .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .sidebar {
    position: static;
    min-height: auto;
    padding: 18px 18px 10px;
  }

  .route-overview .brand {
    margin-bottom: 14px;
  }

  .route-overview .side-nav {
    display: grid;
    min-height: 0;
    gap: 10px;
  }

  .route-overview .nav-group {
    display: block;
  }

  .route-overview .nav-group + .nav-group {
    padding-top: 0;
    border-top: 0;
  }

  .route-overview .nav-group-title,
  .route-overview .nav-tree::before,
  .route-overview .side-nav a::before,
  .route-overview .nav-upgrade {
    display: none;
  }

  .route-overview .nav-tree {
    display: flex;
    gap: 8px;
    margin: 0 -18px;
    overflow-x: auto;
    padding: 0 18px 8px;
    scrollbar-width: thin;
  }

  .route-overview .side-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .route-overview .overview-command-topbar {
    margin: 0 18px;
  }

  .route-overview .overview-top-search,
  .route-overview .topbar-pills {
    display: none;
  }

  .route-overview .content {
    padding: 20px 18px 34px;
  }

  .route-overview .overview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-timeline {
    position: static;
  }
}

@media (max-width: 760px) {
  .route-overview .overview-top,
  .route-overview .overview-actions,
  .route-overview .overview-dashboard,
  .route-overview .overview-layout,
  .route-overview .overview-block-grid,
  .route-overview .overview-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-top {
    display: grid;
  }

  .route-overview .overview-actions {
    justify-content: stretch;
  }

  .route-overview .overview-actions .select,
  .route-overview .overview-actions .button {
    width: 100%;
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications,
  .route-overview .overview-block-location,
  .route-overview .overview-block-events,
  .route-overview .overview-block-activity {
    grid-column: auto;
    grid-row: auto;
  }

  .route-overview .overview-hero {
    min-height: 314px;
    padding: 20px;
  }

  .route-overview .overview-hero::before {
    inset: auto 18px 18px 18px;
    height: 104px;
  }

  .route-overview .overview-hero::after {
    right: 14px;
    top: 18px;
    width: 92px;
    height: 92px;
  }

  .route-overview .overview-hero-main strong {
    font-size: 25px;
  }

  .route-overview .overview-hero-side {
    justify-self: start;
    text-align: left;
  }

  .route-overview .overview-block-head,
  .route-overview .overview-toolbar,
  .route-overview .overview-hero-chips {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-head small {
    justify-self: start;
  }

  .route-overview .overview-data-grid,
  .route-overview .overview-kv-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1241px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications {
    grid-column: span 2;
  }
}

@media (max-width: 1240px) {
  .route-overview .overview-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-overview .overview-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .route-overview .overview-metrics,
  .route-overview .overview-block-grid,
  .route-overview .overview-data-grid,
  .route-overview .overview-kv-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications {
    grid-column: auto;
  }
}

.route-overview .overview-block-grid > .overview-block-location {
  grid-column: 1 / -1;
}

.route-overview .overview-block-grid > .overview-block-location .overview-location-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 12px;
  align-items: stretch;
}

.route-overview .overview-block-grid > .overview-block-location .overview-location-map {
  min-height: 280px;
}

.route-overview .overview-block-grid > .overview-block-location .overview-kv-grid {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

@media (max-width: 900px) {
  .route-overview .overview-block-grid > .overview-block-location {
    grid-column: auto;
  }

  .route-overview .overview-block-grid > .overview-block-location .overview-location-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-grid > .overview-block-location .overview-location-map {
    min-height: 220px;
  }
}

@media (max-width: 760px) {
  body.route-overview {
    overflow-x: hidden;
    font-size: 13px;
  }

  .route-overview .shell {
    display: block;
    min-height: 100vh;
    background-size: 38px 38px, auto, auto;
  }

  .route-overview .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--hx-line);
    background:
      linear-gradient(180deg, rgba(17, 15, 25, 0.98), rgba(13, 11, 19, 0.94)),
      var(--hx-bg);
    padding: 10px 12px 8px;
    backdrop-filter: blur(18px);
  }

  .route-overview .brand {
    min-height: 34px;
    margin-bottom: 10px;
    gap: 9px;
  }

  .route-overview .brand span {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }

  .route-overview .brand strong {
    font-size: 19px;
  }

  .route-overview .side-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .route-overview .side-nav::-webkit-scrollbar {
    display: none;
  }

  .route-overview .nav-group {
    display: contents;
  }

  .route-overview .nav-tree {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
    max-width: none;
  }

  .route-overview .nav-group-title,
  .route-overview .nav-upgrade {
    display: none !important;
  }

  .route-overview .side-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    max-width: 64vw;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    padding: 0 12px;
    color: var(--hx-muted);
    font-size: 13px;
    scroll-snap-align: center;
  }

  .route-overview .side-nav a.active {
    border-color: rgba(32, 215, 201, 0.36);
    background: rgba(32, 215, 201, 0.16);
    color: var(--hx-text);
    box-shadow: 0 0 22px rgba(32, 215, 201, 0.12);
  }

  .route-overview .side-nav a span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .route-overview .side-nav .nav-icon {
    flex: 0 0 auto;
  }

  .route-overview .overview-command-topbar {
    min-height: 48px;
    margin: 0;
    border-bottom: 1px solid var(--hx-line);
    background: rgba(13, 11, 19, 0.86);
    padding: 7px 12px 9px;
  }

  .route-overview .topbar-pills,
  .route-overview .overview-top-search {
    display: none !important;
  }

  .route-overview .topbar-profile {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .route-overview .topbar-profile .button {
    min-height: 34px;
    padding: 0 13px;
  }

  .route-overview .topbar-profile > span {
    width: 34px;
    height: 34px;
  }

  .route-overview .content {
    padding: 16px 12px 34px;
  }

  .route-overview .overview-page,
  .route-overview .history-page,
  .route-overview .screens-page {
    gap: 14px;
  }

  .route-overview .overview-top,
  .route-overview .history-top,
  .route-overview .screens-top {
    display: grid;
    gap: 12px;
  }

  .route-overview .overview-top h1,
  .route-overview .history-top h1,
  .route-overview .screens-top h1 {
    font-size: 31px;
    line-height: 1.04;
  }

  .route-overview .overview-top p,
  .route-overview .history-top p,
  .route-overview .screens-top p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.42;
  }

  .route-overview .overview-actions,
  .route-overview .history-actions,
  .route-overview .screens-actions {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .route-overview .overview-actions .select,
  .route-overview .overview-actions .button,
  .route-overview .history-actions .select,
  .route-overview .history-actions .button,
  .route-overview .screens-actions .select,
  .route-overview .screens-actions .button {
    width: 100%;
    min-height: 46px;
  }

  .route-overview .overview-dashboard,
  .route-overview .overview-layout,
  .route-overview .history-layout,
  .route-overview .screens-layout,
  .route-overview .contacts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .route-overview .history-workspace,
  .route-overview .screens-workspace {
    order: 1;
  }

  .route-overview .screens-viewer {
    order: 1;
  }

  .route-overview .screens-summary {
    order: 2;
  }

  .route-overview .screens-toolbar {
    order: 3;
  }

  .route-overview .screens-grid {
    order: 4;
  }

  .route-overview .screens-load {
    order: 5;
  }

  .route-overview .history-filters,
  .route-overview .screens-filters {
    order: 2;
  }

  .route-overview .history-inspector,
  .route-overview .screen-inspector {
    order: 3;
  }

  .route-overview .overview-hero {
    min-height: 0;
    display: grid;
    gap: 14px;
    padding: 14px;
  }

  .route-overview .overview-hero::after {
    width: 84px;
    height: 84px;
    right: 14px;
    top: 14px;
  }

  .route-overview .overview-hero-main strong {
    font-size: 26px;
    line-height: 1.08;
  }

  .route-overview .overview-hero-chips {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .route-overview .overview-hero-chips span {
    max-width: 100%;
    min-height: 34px;
    border-radius: 12px;
    white-space: normal;
  }

  .route-overview .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .route-overview .overview-metric {
    min-height: 82px;
    padding: 10px;
  }

  .route-overview .overview-metric strong {
    font-size: 19px;
  }

  .route-overview .overview-block-grid,
  .route-overview .overview-data-grid,
  .route-overview .overview-kv-grid,
  .route-overview .keylogger-summary,
  .route-overview .call-recording-summary,
  .route-overview .contacts-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .route-overview .overview-block {
    min-height: 0;
    padding: 12px;
  }

  .route-overview .overview-block-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
  }

  .route-overview .overview-block-head strong {
    font-size: 18px;
    line-height: 1.18;
  }

  .route-overview .overview-block-grid > .overview-block-location,
  .route-overview .overview-block-new-data,
  .route-overview .overview-block-notifications,
  .route-overview .overview-block-events,
  .route-overview .overview-block-activity {
    grid-column: auto;
    grid-row: auto;
  }

  .route-overview .overview-block-grid > .overview-block-location .overview-location-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-overview .overview-block-grid > .overview-block-location .overview-location-map,
  .route-overview .overview-location-map {
    min-height: 220px;
  }

  .route-overview .history-toolbar,
  .route-overview .screens-toolbar,
  .route-overview .contacts-toolbar,
  .route-overview .overview-toolbar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .route-overview .history-search,
  .route-overview .history-controls,
  .route-overview .contacts-controls,
  .route-overview .screens-toolbar > *,
  .route-overview .bulk-tools {
    width: 100%;
    min-width: 0;
  }

  .route-overview .history-search input,
  .route-overview .history-controls .select,
  .route-overview .contacts-controls .select {
    min-height: 44px;
  }

  .route-overview .segmented {
    width: 100%;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }

  .route-overview .archive-toggle,
  .route-overview .keylogger-mask-toggle {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .route-overview .history-open,
  .route-overview .location-open,
  .route-overview .contacts-open {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .route-overview .contacts-open .history-side,
  .route-overview .history-side {
    grid-column: auto;
    justify-items: start;
  }

  .route-overview .history-main strong,
  .route-overview .history-main p {
    overflow-wrap: anywhere;
  }

  .route-overview .history-day {
    position: static;
    padding-top: 4px;
  }

  .route-overview .screens-summary {
    font-size: 13px;
  }

  .route-overview .screens-viewer-stage {
    gap: 9px;
    border-radius: 10px;
    padding: 9px;
  }

  .route-overview .screens-viewer-main {
    border-radius: 9px;
  }

  .route-overview .screens-viewer-image,
  .route-overview .screens-viewer-image img {
    max-height: 58vh;
  }

  .route-overview .screens-viewer-nav {
    width: 36px;
    height: 48px;
    font-size: 30px;
  }

  .route-overview .screens-viewer-nav.prev {
    left: 7px;
  }

  .route-overview .screens-viewer-nav.next {
    right: 7px;
  }

  .route-overview .screens-viewer-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .route-overview .screens-viewer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .route-overview .screens-viewer-select,
  .route-overview .screens-viewer-actions .button {
    min-height: 40px;
  }

  .route-overview .screens-viewer-strip {
    margin: 0 -2px;
    padding-bottom: 4px;
  }

  .route-overview .screens-viewer-thumb {
    flex-basis: 64px;
    padding: 4px;
  }

  .route-overview .screens-grid {
    display: none;
  }

  .route-overview .history-filters,
  .route-overview .screens-filters,
  .route-overview .history-inspector,
  .route-overview .screen-inspector,
  .route-overview .overview-timeline {
    position: static;
    width: 100%;
  }

  .route-overview .category-list {
    max-height: 420px;
    overflow: auto;
    padding-right: 2px;
  }

  .route-overview .category-pill {
    min-height: 52px;
  }

  .route-overview .location-map-shell {
    min-height: 260px;
  }

  .route-overview .location-map-caption {
    left: 10px;
    right: 10px;
    max-width: none;
    justify-content: space-between;
  }

  .route-overview .location-map-legend {
    left: 10px;
    right: 10px;
    bottom: 58px;
  }
}

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

.screens-grid-mode {
  display: grid;
  gap: 12px;
}

.screens-mode-choice[hidden],
.screens-feed[hidden],
.screens-grid-mode[hidden] {
  display: none !important;
}

.screens-page.screens-mode-choice .screens-layout,
.screens-page.screens-mode-feed .screens-layout {
  grid-template-columns: minmax(0, 1fr);
}

.screens-page.screens-mode-choice .screens-filters,
.screens-page.screens-mode-feed .screens-filters {
  display: none;
}

.screens-mode-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.screens-mode-card {
  min-height: 220px;
  display: grid;
  align-content: end;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    var(--surface);
  color: var(--text);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.screens-mode-card:hover {
  transform: translateY(-1px);
}

.screens-mode-card span {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.screens-mode-card strong {
  max-width: 520px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.08;
}

.screens-mode-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.screens-mode-card.primary {
  background:
    radial-gradient(circle at 20% 18%, rgba(32, 215, 201, 0.22), transparent 36%),
    linear-gradient(145deg, rgba(139, 108, 255, 0.18), rgba(255, 255, 255, 0.018)),
    var(--surface);
}

.route-overview .screens-mode-card {
  border-color: var(--hx-line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--hx-panel);
  color: var(--hx-text);
  box-shadow: var(--hx-card-shadow);
}

.route-overview .screens-mode-card.primary {
  background:
    radial-gradient(circle at 20% 18%, rgba(32, 215, 201, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(139, 108, 255, 0.17), rgba(255, 255, 255, 0.018)),
    var(--hx-panel);
}

.route-overview .screens-mode-card:hover {
  border-color: rgba(32, 215, 201, 0.28);
  background:
    linear-gradient(145deg, rgba(32, 215, 201, 0.105), rgba(255, 255, 255, 0.02)),
    var(--hx-panel-soft);
}

.route-overview .screens-mode-card span {
  border-color: rgba(32, 215, 201, 0.28);
  color: var(--hx-cyan);
}

.route-overview .screens-mode-card strong {
  color: var(--hx-text);
}

.route-overview .screens-mode-card small {
  color: var(--hx-muted);
}

body.screens-feed-open {
  overflow: hidden;
  background: #05060a;
}

body.screens-feed-open.route-overview .shell {
  display: block;
  min-height: 100dvh;
  background: #05060a;
}

body.screens-feed-open.route-overview .sidebar,
body.screens-feed-open.route-overview .overview-command-topbar,
body.screens-feed-open.route-overview .screens-top {
  display: none !important;
}

body.screens-feed-open.route-overview .main,
body.screens-feed-open.route-overview .content,
body.screens-feed-open.route-overview .screens-page,
body.screens-feed-open.route-overview .screens-layout,
body.screens-feed-open.route-overview .screens-workspace {
  min-height: 100dvh;
}

body.screens-feed-open.route-overview .content {
  padding: 0;
}

body.screens-feed-open.route-overview .screens-page {
  max-width: none;
  margin: 0;
  gap: 0;
}

body.screens-feed-open.route-overview .screens-layout,
body.screens-feed-open.route-overview .screens-workspace {
  display: block;
}

.screens-feed {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 20%, rgba(32, 215, 201, 0.16), transparent 34%),
    linear-gradient(180deg, #0a0911 0%, #05060a 100%);
  color: #fff;
}

.screens-feed-track {
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.screens-feed-track::-webkit-scrollbar {
  display: none;
}

.screens-feed-slide {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 7dvh max(12px, env(safe-area-inset-right)) 7dvh max(12px, env(safe-area-inset-left));
}

.screens-feed-frame {
  width: min(100%, 470px);
  height: 86dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: #070910;
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(32, 215, 201, 0.06);
  opacity: 0.78;
  transform: scale(0.985);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.screens-feed-slide.is-active .screens-feed-frame {
  opacity: 1;
  transform: scale(1);
}

.screens-feed-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #05060a;
}

.screens-feed-back,
.screens-feed-action,
.screens-feed-caption,
.screens-feed-counter {
  position: fixed;
  z-index: 40;
}

.screens-feed-back {
  top: calc(env(safe-area-inset-top) + 14px);
  left: calc(env(safe-area-inset-left) + 14px);
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 9, 16, 0.72);
  color: #fff;
  padding: 0 15px;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.screens-feed-side-actions {
  position: fixed;
  z-index: 42;
  right: calc(env(safe-area-inset-right) + 16px);
  top: 50%;
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}

.screens-feed-action {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(7, 9, 16, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.screens-feed-action.download::before {
  content: "";
  width: 17px;
  height: 17px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-4px) rotate(45deg);
}

.screens-feed-action.download::after {
  content: "";
  position: absolute;
  bottom: 14px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.screens-feed-action.bookmark::before {
  content: "";
  width: 18px;
  height: 25px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.screens-feed-action.bookmark::after {
  content: "";
  position: absolute;
  bottom: 12px;
  width: 16px;
  height: 16px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  background: rgba(7, 9, 16, 0.72);
}

.screens-feed-action.bookmark.bookmarked {
  color: #22d7c7;
  border-color: rgba(32, 215, 201, 0.38);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(32, 215, 201, 0.22);
}

.screens-feed-caption {
  right: 92px;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  left: calc(env(safe-area-inset-left) + 18px);
  max-width: 620px;
  display: grid;
  gap: 4px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
}

.screens-feed-caption strong,
.screens-feed-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screens-feed-caption strong {
  font-size: 16px;
  line-height: 1.2;
}

.screens-feed-caption span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 760;
}

.screens-feed-counter {
  right: calc(env(safe-area-inset-right) + 18px);
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(7, 9, 16, 0.66);
  color: rgba(255, 255, 255, 0.78);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.screens-feed-empty {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  padding: 24px;
}

.screens-feed-empty strong {
  color: #fff;
  font-size: 24px;
}

@media (max-width: 760px) {
  .route-overview .screens-page.screens-mode-grid .screens-grid {
    display: grid;
  }

  .screens-mode-choice {
    grid-template-columns: minmax(0, 1fr);
  }

  .screens-mode-card {
    min-height: 172px;
    padding: 16px;
  }

  .screens-mode-card strong {
    font-size: 22px;
  }

  .screens-feed-slide {
    padding-top: 6dvh;
    padding-bottom: 6dvh;
  }

  .screens-feed-frame {
    width: min(100%, 430px);
    height: 88dvh;
    border-radius: 14px;
  }

  .screens-feed-side-actions {
    right: calc(env(safe-area-inset-right) + 10px);
    gap: 10px;
  }

  .screens-feed-action {
    width: 46px;
    height: 46px;
  }

  .screens-feed-caption {
    right: 74px;
    bottom: calc(env(safe-area-inset-bottom) + 16px);
    left: calc(env(safe-area-inset-left) + 14px);
  }

  .screens-feed-counter {
    display: none;
  }
}
