@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Sans:wght@400;450;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
:root {
  color-scheme: dark;
  --bg: #101925;
  --panel: #162334;
  --raised: #1c2d40;
  --line: #2c4057;
  --text: #e6edf5;
  --muted: #9bacc0;
  --ice: #98cce5;
  --lilac: #cfb8e6;
  --orange: #edb28c;
  --good: #9fc8b2;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--body);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ice);
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  padding: 9px 13px;
  border-radius: 6px;
  transition: background 0.15s;
}
button:hover {
  background: #2b4057;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: var(--ice);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.primary {
  background: var(--ice);
  color: #122538;
  border-color: var(--ice);
  font-weight: 600;
}
.primary:hover {
  background: #bcdfef;
}
.quiet {
  background: transparent;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #142131;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 30px 18px;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font: 600 28px/1.1 var(--display);
  letter-spacing: 0.2px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand-light {
  font-weight: 500;
  color: var(--ice);
}
.brand small {
  display: block;
  font: 9px var(--mono);
  letter-spacing: 1.6px;
  margin-top: 7px;
  color: var(--muted);
}
.rail-label {
  margin: 43px 13px 12px;
  font: 10px var(--mono);
  letter-spacing: 1.5px;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 5px;
}
nav button {
  background: transparent;
  border: 0;
  text-align: left;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
}
nav button span {
  font-size: 20px;
  width: 21px;
  text-align: center;
  color: #8da6c0;
}
nav button.active {
  background: #233b50;
  color: #d9ecf5;
  box-shadow: inset 3px 0 var(--ice);
}
nav b {
  margin-left: auto;
  font: 10px var(--mono);
  padding: 2px 5px;
  background: #122233;
  border-radius: 4px;
}
.globe-link {
  margin-top: 30px;
  border: 1px solid #39546e;
  border-radius: 8px;
  padding: 15px;
  color: var(--text);
  display: grid;
  grid-template-columns: 32px 1fr;
}
.globe-link span {
  font: 32px var(--body);
  grid-row: span 2;
  color: var(--ice);
}
.globe-link strong {
  font-size: 12px;
  font-weight: 500;
}
.globe-link small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.rail-bottom {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
  padding: 30px 8px 0;
}
.rail-bottom small {
  display: block;
  margin: 7px 0 18px;
  color: #7990a9;
}
.rail-bottom a {
  display: block;
  font-size: 10px;
  margin-top: 8px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  margin-right: 7px;
}
main {
  margin-left: 238px;
  min-height: 100vh;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
}
.breadcrumb {
  font: 10px var(--mono);
  letter-spacing: 1.2px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: #506781;
}
.breadcrumb strong {
  font-weight: 400;
  color: var(--text);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
time {
  font: 10px var(--mono);
  color: var(--muted);
  margin-right: 9px;
}
#content {
  padding: 34px 36px 40px;
  max-width: 1800px;
  margin: auto;
}
.eyebrow {
  color: var(--lilac);
  font: 10px var(--mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 0 0 8px;
}
h1 {
  font: 600 42px/1.1 var(--display);
  letter-spacing: 0.3px;
  margin: 0 0 12px;
}
h2 {
  font: 600 25px/1.2 var(--display);
  margin: 0;
}
h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 6px;
}
p {
  margin: 0 0 15px;
  color: var(--muted);
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  align-items: center;
}
.page-head p {
  max-width: 750px;
  margin: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric small {
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.metric strong {
  font: 500 39px var(--display);
  display: block;
  margin-top: 7px;
}
.metric span {
  font-size: 11px;
  color: var(--muted);
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 22px;
}
.tag {
  font: 9px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 7px;
  color: var(--muted);
}
.tag.connected,
.tag.open {
  color: var(--good);
}
.tag.error,
.tag.critical,
.tag.high {
  color: var(--orange);
  border-color: #79584b;
}
.tag.partial,
.tag.medium {
  color: #e3ca8e;
}
.tag.low {
  color: var(--ice);
}
.signal-matrix {
  padding: 24px;
  min-height: 180px;
  position: relative;
  background-image:
    linear-gradient(#2d415326 1px, transparent 1px),
    linear-gradient(90deg, #2d415326 1px, transparent 1px);
  background-size: 24px 24px;
}
.signal-row {
  display: grid;
  grid-template-columns: 85px 1fr 55px;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  font: 11px var(--mono);
}
.signal-bar {
  height: 12px;
  background: #27384c;
  border-radius: 2px;
  overflow: hidden;
}
.signal-bar i {
  display: block;
  height: 100%;
  background: var(--ice);
}
.signal-row:nth-child(1) .signal-bar i {
  background: var(--orange);
}
.signal-row:nth-child(2) .signal-bar i {
  background: #d9b892;
}
.signal-row:nth-child(3) .signal-bar i {
  background: var(--lilac);
}
.signal-foot {
  color: var(--muted);
  font-size: 10px;
  margin-top: 22px;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border: 0;
}
.list-row .grow {
  flex: 1;
  min-width: 0;
}
.list-row strong {
  font-size: 12px;
  font-weight: 500;
}
.list-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.step {
  width: 28px;
  height: 28px;
  border: 1px solid #4e6781;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 11px var(--mono);
  color: var(--ice);
  flex: none;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
  font-size: 11px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wrap {
  flex-wrap: wrap;
}
.space {
  justify-content: space-between;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input[type='search'] {
  min-width: 200px;
  flex: 1;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 250px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card p {
  font-size: 12px;
  margin: 0;
  min-height: 34px;
}
.card .actions {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding-top: 5px;
}
.source-host {
  font: 10px var(--mono);
  word-break: break-all;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
th {
  font: 10px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  background: #19293b;
  padding: 14px 17px;
}
td {
  padding: 13px 17px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  background: var(--panel);
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tr:hover td {
  background: var(--raised);
}
td button {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: var(--ice);
  font-weight: 500;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}
.empty {
  padding: 48px 30px;
  text-align: center;
  border: 1px dashed #42556c;
  border-radius: 8px;
  background: #172333;
}
.empty h2 {
  margin-bottom: 12px;
}
.empty p {
  max-width: 500px;
  margin: 0 auto 22px;
  font-size: 13px;
}
.timeline {
  display: grid;
  gap: 0;
}
.event {
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
}
.event:last-child {
  border: 0;
}
.event strong {
  display: block;
  font-size: 12px;
}
.event p {
  margin: 4px 0 0;
  font-size: 11px;
  word-break: break-word;
}
.history-integrity {
  padding: 15px 20px;
  border: 1px solid #415e55;
  background: #1e3536;
  border-radius: 7px;
  margin-bottom: 22px;
  color: var(--good);
  font-size: 12px;
}
.notice {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 100px);
  transform: translateX(-50%);
  max-width: 620px;
  background: #324a60;
  border: 1px solid var(--ice);
  padding: 14px 22px;
  border-radius: 8px;
  z-index: 3000;
  box-shadow: 0 12px 40px #0007;
}
.notice.error {
  border-color: var(--orange);
  background: #48372f;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #566b83;
  border-radius: 12px;
  padding: 0;
  width: min(850px, 94vw);
  max-height: 91vh;
  box-shadow: 0 25px 100px #0008;
}
dialog::backdrop {
  background: #050c17b8;
  backdrop-filter: blur(4px);
}
.dialog-header {
  padding: 23px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-header button {
  padding: 5px 12px;
}
.dialog-body {
  padding: 25px 26px;
}
.dialog-body p {
  font-size: 12px;
}
.dialog-actions {
  border-top: 1px solid var(--line);
  padding: 18px 26px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
input,
select,
textarea {
  display: block;
  width: 100%;
  background: #101c2b;
  border: 1px solid #3d526a;
  border-radius: 5px;
  color: var(--text);
  padding: 10px 11px;
  margin-top: 6px;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 1px solid var(--ice);
  border-color: var(--ice);
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  display: inline;
}
.check {
  display: flex;
  gap: 9px;
  align-items: center;
}
.help {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}
.subhead {
  font: 500 19px var(--display);
  margin: 24px 0 15px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.key-help {
  background: #21374b;
  border: 1px solid #436680;
  border-radius: 6px;
  padding: 13px 16px;
  margin-bottom: 20px;
}
.key-help a {
  margin-right: 20px;
  font-size: 11px;
}
.raw {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 330px;
  overflow: auto;
  background: #101c2b;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 17px;
  font: 11px/1.65 var(--mono);
}
.details {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 10px;
  font-size: 12px;
  margin: 18px 0;
}
.details dt {
  color: var(--muted);
}
.details dd {
  margin: 0;
  word-break: break-all;
}
details {
  margin-top: 18px;
}
summary {
  cursor: pointer;
  color: var(--ice);
  font-size: 12px;
}
.case-note {
  padding: 15px;
  border-left: 2px solid var(--lilac);
  background: #1b2a3d;
  margin: 15px 0;
  white-space: pre-wrap;
  font-size: 12px;
}
.section-gap {
  margin-top: 30px;
}
.danger-text {
  color: var(--orange);
}
footer {
  padding: 20px 36px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #8399b2;
  display: flex;
  justify-content: space-between;
}
.form-error {
  padding: 10px 0;
  color: var(--orange);
  font-size: 12px;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1600px) {
  #content {
    padding: 45px 52px;
  }
  .topbar {
    padding: 0 52px;
  }
  h1 {
    font-size: 48px;
  }
  .metrics {
    gap: 20px;
  }
  .overview-grid {
    gap: 26px;
  }
}
@media (max-width: 1100px) {
  .rail {
    width: 205px;
    padding: 25px 12px;
  }
  main {
    margin-left: 205px;
  }
  .brand {
    font-size: 24px;
  }
  .brand img {
    width: 35px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 22px;
  }
  #content {
    padding: 28px 22px;
  }
  .topbar time {
    display: none;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 16px;
  }
  .event {
    grid-template-columns: 120px 1fr;
  }
  .breadcrumb {
    font-size: 9px;
  }
}
@media (max-width: 720px) {
  .rail {
    position: static;
    width: 100%;
    padding: 15px;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 26px;
  }
  .rail-label,
  .rail-bottom,
  .globe-link {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 16px;
  }
  nav button {
    white-space: nowrap;
    padding: 9px;
    font-size: 11px;
  }
  nav button span,
  nav b {
    display: none;
  }
  main {
    margin-left: 0;
  }
  .topbar {
    height: 65px;
    padding: 0 16px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
  #content {
    padding: 24px 16px;
  }
  h1 {
    font-size: 36px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head p {
    font-size: 12px;
  }
  .page-head > button {
    font-size: 11px;
    white-space: nowrap;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric strong {
    font-size: 31px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .toolbar input,
  .toolbar select {
    max-width: 100%;
    flex: 1;
  }
  .notice {
    left: 50%;
    width: 90%;
  }
  .event {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  footer {
    padding: 20px 16px;
    gap: 12px;
  }
  .dialog-body {
    padding: 20px;
  }
  .overview-grid {
    display: block;
  }
  .table-wrap {
    max-width: calc(100vw - 32px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Investigation tools keep the same type and spacing as the record workspace. */
.saved-searches { display: grid; gap: 12px; padding: 16px 0 22px; }
.saved-query { display: inline-flex; border: 1px solid var(--line, #34445a); border-radius: 8px; }
.saved-query button { background: transparent; border: 0; }
.record-indicators { padding: 16px 0; }
.record-indicators button { font-size: 12px; max-width: 100%; overflow-wrap: anywhere; }
.connection-anchor { padding: 24px; margin: 20px 0; border-left: 4px solid #a8cae1; }
.connection-anchor h2 { overflow-wrap: anywhere; }
.connection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.record-timeline { margin: 26px 0; }
.timeline-event { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding-bottom: 22px; }
.timeline-event time { padding: 22px 18px 0 0; text-align: right; font: 12px/1.6 monospace; color: #a4bcd0; border-right: 2px solid #45647d; }
@media (max-width: 700px) { .timeline-event { grid-template-columns: 1fr; gap: 8px; } .timeline-event time { text-align: left; border: 0; padding: 0; } }
