@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
  --bg: #eef5ff;
  --panel: #fbfdff;
  --line: #d5e2f1;
  --ink: #13283f;
  --muted: #5d6b7c;
  --ok: #0f8b62;
  --down: #c54f38;
  --unknown: #9a6a09;
  --http: #8f5c00;
  --stream: #1d5fa8;
  --active: #0f7f8b;
  --backup: #50627a;
  --inactive: #6f7e90;
  --edge: #c9d5e1;
  --edge-down: #efb7a7;
  --hero-start: #0f2742;
  --hero-mid: #1a4670;
  --hero-end: #0ea5b8;
  --accent-gold: #0f8ca8;
  --accent-gold-soft: #d8eff7;
  --shadow: 0 18px 36px rgba(13, 35, 58, 0.14);
  --shadow-soft: 0 8px 18px rgba(19, 40, 63, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, #d8e8fb 0, transparent 34%),
    radial-gradient(circle at 100% 0, #dceeff 0, transparent 30%),
    radial-gradient(circle at 80% 100%, #e6edf8 0, transparent 36%),
    var(--bg);
  min-height: 100vh;
}

.container {
  width: min(1600px, 95vw);
  margin: 24px auto 34px;
}

.hero {
  background:
    linear-gradient(120deg, var(--hero-start) 0%, var(--hero-mid) 55%, var(--hero-end) 100%);
  color: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.24) 0, transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(166, 223, 255, 0.24) 0, transparent 30%),
    repeating-linear-gradient(140deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 10px);
  pointer-events: none;
  opacity: 0.45;
}

.hero > * {
  position: relative;
  z-index: 1;
}

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

.hero-logo {
  width: 132px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 10px rgba(4, 17, 31, 0.22));
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  font-weight: 800;
}

.hero p {
  margin: 8px 0 0;
  opacity: .96;
  font-size: .92rem;
}

.hero-runtime {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .2px;
  min-height: 27px;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  background: rgba(255, 255, 255, 0.7);
}

.badge-ws.connected::before { background: #8df2c8; }
.badge-ws.connecting::before { background: #f7d58a; }
.badge-ws.offline::before { background: #f3a99b; }

.badge-poll::before,
.badge-data::before,
.badge-server::before {
  background: rgba(255, 255, 255, 0.8);
}

.badge-link {
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.badge-link::before {
  background: rgba(255, 255, 255, 0.8);
}

.badge-link:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.toolbar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 10px;
}

.control {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: .9rem;
  min-height: 39px;
  padding: 8px 10px;
  outline: none;
  transition: background .18s ease, border-color .18s ease, transform .16s ease;
}

.control option { color: #143d57; }
.control::placeholder { color: rgba(255,255,255,.82); }
button.control { cursor: pointer; font-weight: 700; }
.control:hover { background: rgba(255, 255, 255, .2); }
.control:focus-visible {
  border-color: rgba(186, 224, 255, .95);
  box-shadow: 0 0 0 2px rgba(169, 211, 248, .34);
  transform: translateY(-1px);
}

.legend {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.legend-label {
  font-size: .75rem;
  opacity: .88;
  margin-right: 2px;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 700;
}

.legend-item {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .12);
  padding: 4px 9px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}

.error {
  display: none;
  border: 1px solid #f0b1a2;
  background: #fce8e2;
  color: #8f321d;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.tiny {
  font-size: .85rem;
  color: var(--muted);
  padding: 8px;
}

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

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.insight-card {
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border: 1px solid #d9e6f5;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 10px;
  margin-bottom: 12px;
}

.analysis-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

.analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.analysis-title {
  margin: 0;
  font-size: .9rem;
  font-weight: 800;
  color: #1b3959;
}

.analysis-hint {
  font-size: .76rem;
  font-weight: 700;
  color: #5d6b7c;
}

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

.compare-item {
  border: 1px solid #dce8f7;
  border-radius: 10px;
  background: #f8fbff;
  padding: 9px;
  display: grid;
  gap: 3px;
}

.compare-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6a7583;
  font-weight: 800;
}

.compare-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1b3959;
}

.compare-delta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #d7e3f2;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
}

.compare-delta.positive {
  color: #06643d;
  background: #e8f8f0;
  border-color: #bde8d0;
}

.compare-delta.negative {
  color: #8f321d;
  background: #fce8e2;
  border-color: #f4c0b4;
}

.compare-delta.neutral {
  color: #5d6b7c;
  background: #edf4fc;
  border-color: #d7e3f2;
}

.timeline-list {
  display: grid;
  gap: 7px;
  max-height: 208px;
  overflow: auto;
  padding-right: 2px;
}

.timeline-item {
  border: 1px solid #dbe8f7;
  border-radius: 10px;
  background: #fafdff;
  padding: 8px 9px;
  display: grid;
  gap: 4px;
}

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

.timeline-kind {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #3f5570;
}

.timeline-time {
  font-size: .72rem;
  color: #6a7583;
  font-weight: 700;
}

.timeline-msg {
  font-size: .79rem;
  color: #1c3b5c;
  font-weight: 700;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 12px;
  padding: 6px;
  border-radius: 12px;
  background: #e9f1fb;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.tab-btn {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #35506d;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.tab-btn:hover {
  background: rgba(29, 95, 168, 0.16);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: #ffffff;
  color: #183d63;
  box-shadow: 0 3px 10px rgba(23, 55, 91, 0.14);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: appear .22s ease;
}

.s-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease;
}

.s-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.s-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  font-size: .76rem;
  margin: 0;
}

.s-value {
  margin-top: 7px;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.1vw, 1.85rem);
  line-height: 1;
}

.s-value.ok { color: var(--ok); }
.s-value.down { color: var(--down); }
.s-value-time {
  font-size: 1.15rem;
  line-height: 1.2;
}

.s-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: .82rem;
}

.host-stack {
  margin-top: 6px;
  display: grid;
  gap: 8px;
}

.host-line {
  border: 1px solid #dce8f7;
  background: #f7fbff;
  border-radius: 10px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'k v'
    'm m';
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
}

.host-line-key {
  grid-area: k;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .45px;
  color: #4f5e70;
  font-weight: 800;
}

.host-line-val {
  grid-area: v;
  justify-self: end;
  font-size: 1rem;
  color: #173a5d;
  line-height: 1;
}

.host-line-meta {
  grid-area: m;
  font-size: .72rem;
  color: #5c6a7c;
}

.host-line-up {
  border-color: #bde8d0;
  background: #e8f8f0;
}

.host-line-down {
  border-color: #f4c0b4;
  background: #fce8e2;
}

.map {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.map::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(217, 234, 251, 0.24), rgba(217, 234, 251, 0.24)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px 28px);
  pointer-events: none;
  opacity: 0.38;
}

.map > * {
  position: relative;
  z-index: 1;
}

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

.map-title {
  font-size: .92rem;
  font-weight: 800;
  color: #213d5f;
  margin: 0;
}

.map-hint {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.map-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow {
  border: 1px solid #dbe8f7;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px;
  display: grid;
  grid-template-columns: 260px 40px 1fr;
  align-items: center;
  gap: 8px;
  animation: appear .28s ease;
}

.up-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border-radius: 10px;
  padding: 10px;
  min-height: 94px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.up-name {
  font-weight: 800;
  font-size: .96rem;
  line-height: 1.2;
  word-break: break-word;
}

.up-meta {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edge {
  width: 100%;
  border-top: 2px dashed var(--edge);
  position: relative;
  height: 0;
}

.edge::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -5px;
  border-left: 8px solid var(--edge);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 8px;
}

.node {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 9px;
  border-left-width: 4px;
  box-shadow: 0 4px 10px rgba(19, 51, 49, 0.05);
  transition: transform .16s ease, box-shadow .16s ease;
}

.node:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 16px rgba(19, 51, 49, 0.08);
}

.node.node-up { border-left-color: var(--ok); }
.node.node-down { border-left-color: var(--down); }
.node.node-unknown { border-left-color: var(--unknown); }

.node-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 5px;
}

.node-name {
  font-weight: 700;
  font-size: .84rem;
  word-break: break-word;
}

.addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
  color: #3c5471;
  margin-bottom: 4px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.kv-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.kv-item {
  border: 1px solid #d9e6f5;
  background: #eff5fd;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: .72rem;
  color: #2f4c68;
  font-weight: 700;
  white-space: nowrap;
}

.kv-item strong {
  color: #1e3b5b;
  font-weight: 800;
}

.chip {
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .74rem;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}

.chip-http { background: #fdf4df; color: var(--http); border-color: #efd9a7; }
.chip-stream { background: #e9f1fb; color: var(--stream); border-color: #bed4ed; }
.chip-active { background: #def4f0; color: var(--active); border-color: #b8e5de; }
.chip-backup { background: #edf1f6; color: var(--backup); border-color: #d3dce8; }
.chip-inactive { background: #eef2f6; color: var(--inactive); border-color: #d8e0ea; }
.chip-up { background: #e8f8f0; color: #06643d; border-color: #bde8d0; }
.chip-down { background: #fce8e2; color: #8f321d; border-color: #f4c0b4; }
.chip-unknown { background: #fff6e0; color: var(--unknown); border-color: #f4e3b8; }

.traffic-panel {
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #edf4fd 100%);
  padding: 6px 8px;
  margin-top: 7px;
}

.traffic-title {
  font-size: .67rem;
  color: #566679;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.traffic-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 2px 0;
  border-top: 1px dashed #dbe7f6;
}

.traffic-row:first-of-type {
  border-top: 0;
}

.traffic-label {
  font-size: .7rem;
  color: #5d6b7c;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.traffic-value {
  font-size: .82rem;
  color: #193b5e;
  font-weight: 800;
  line-height: 1.1;
}

.traffic-rate {
  font-size: .68rem;
  color: #697788;
  font-weight: 600;
  margin-left: 4px;
}

.traffic-na {
  color: #6b7f7c;
  font-size: .74rem;
  font-weight: 700;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th {
  text-align: left;
  padding: 9px 10px;
  background: linear-gradient(180deg, #eff6ff 0%, #dfeaff 100%);
  border-bottom: 1px solid var(--line);
  color: #2a4462;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e4edf8;
  vertical-align: middle;
}

tbody tr:hover { background: #eff6ff; }

.req-cell {
  min-width: 170px;
}

.action-cell {
  min-width: 130px;
  text-align: right;
}

.row-log-btn {
  border: 1px solid #b9d3ee;
  background: #e8f2ff;
  color: #1f4f73;
  border-radius: 8px;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  padding: 6px 9px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.row-log-btn:hover {
  background: #d9eafe;
  transform: translateY(-1px);
}

.row-log-btn:disabled {
  opacity: .62;
  cursor: wait;
  transform: none;
}

.req-stack {
  display: grid;
  gap: 2px;
  font-size: .74rem;
  color: #5d6b7c;
  line-height: 1.25;
}

.req-stack strong {
  color: #193b5e;
  font-weight: 800;
  margin-right: 4px;
}

.runtime-col {
  position: relative;
  padding-left: 14px;
}

.runtime-col::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 100%;
  border-radius: 0 7px 7px 0;
  opacity: .9;
}

.status-up::before {
  background: linear-gradient(90deg, rgba(15, 139, 98, .42) 0%, rgba(15, 139, 98, .06) 100%);
}

.status-down::before {
  background: linear-gradient(90deg, rgba(197, 79, 56, .42) 0%, rgba(197, 79, 56, .06) 100%);
}

.status-unknown::before {
  background: linear-gradient(90deg, rgba(154, 106, 9, .38) 0%, rgba(154, 106, 9, .06) 100%);
}

.foot {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .82rem;
}

.logs-btn {
  border: 1px solid #b9d3ee;
  background: #e8f2ff;
  color: #1f4f73;
  border-radius: 8px;
  font: inherit;
  font-size: .83rem;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 10px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.logs-btn:hover {
  background: #d9eafe;
  transform: translateY(-1px);
}

body.modal-open {
  overflow: hidden;
}

.log-modal[hidden] {
  display: none;
}

.log-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.log-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 53, 0.52);
  backdrop-filter: blur(2px);
}

.log-modal-panel {
  position: relative;
  width: min(980px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #d6e3f2;
  border-radius: 14px;
  box-shadow: 0 24px 45px rgba(16, 42, 67, 0.24);
}

.log-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #eff6ff 0%, #dfeaff 100%);
  border-bottom: 1px solid #d6e3f2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.log-modal-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.log-modal-tools label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .45px;
  color: #4f5e70;
  font-weight: 800;
}

.log-window-select {
  border: 1px solid #b9d3ee;
  background: #fff;
  color: #1f4f73;
  border-radius: 8px;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  min-height: 31px;
  padding: 4px 8px;
}

.log-modal-title {
  margin: 0;
  font-size: 1rem;
  color: #1b3959;
}

.log-modal-close {
  border: 1px solid #b9d3ee;
  background: #e8f2ff;
  color: #1f4f73;
  border-radius: 8px;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}

.log-modal-close:hover {
  background: #d9eafe;
}

.log-modal-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.log-detail-card {
  border: 1px solid #dbe8f7;
  border-radius: 12px;
  background: #fafdff;
  padding: 10px;
}

.log-detail-card h4 {
  margin: 0 0 8px;
  color: #254969;
  font-size: .83rem;
}

.log-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.log-kv-grid div {
  border: 1px solid #dce8f7;
  border-radius: 9px;
  background: #f2f7ff;
  padding: 7px 8px;
  display: grid;
  gap: 2px;
}

.log-kv-grid span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .45px;
  color: #667585;
  font-weight: 800;
}

.log-kv-grid strong {
  font-size: .82rem;
  color: #1b3d60;
  word-break: break-word;
}

.log-list-grid {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.log-chart {
  display: grid;
  gap: 6px;
}

.log-chart-row {
  display: grid;
  gap: 3px;
}

.log-chart-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.log-chart-key {
  font-size: .76rem;
  color: #1d3f62;
  font-weight: 700;
  word-break: break-word;
}

.log-chart-val {
  font-size: .74rem;
  color: #194267;
  font-weight: 800;
}

.log-chart-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dfe9f8;
  overflow: hidden;
}

.log-chart-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #184877 0%, #0ea5b8 100%);
}

.log-inline-list,
.log-source-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
}

.log-inline-list li,
.log-source-list li {
  font-size: .78rem;
  color: #2b4f72;
}

.log-inline-list li strong {
  color: #1b3959;
  margin-right: 4px;
}

.log-inline-empty {
  font-size: .8rem;
  color: #667585;
  font-weight: 700;
}

.log-raw-block {
  margin: 0;
  border: 1px solid #dce8f7;
  border-radius: 9px;
  background: #f2f7ff;
  color: #1b3d60;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .73rem;
  line-height: 1.45;
  padding: 8px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1150px) {
  .toolbar { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .insight-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .analysis-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .edge { display: none; }
  .up-box { min-height: auto; }
}

@media (max-width: 700px) {
  .hero-title {
    gap: 10px;
  }
  .hero-logo {
    width: 108px;
    height: 30px;
  }
  .toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .legend { gap: 6px; }
  .summary { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .view-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .table-wrap { overflow-x: auto; }
  table { min-width: 1040px; }
  .traffic-row { gap: 6px; }
  .log-modal-panel { width: 94vw; }
  .log-kv-grid,
  .log-list-grid {
    grid-template-columns: 1fr;
  }
}
