:root {
  color-scheme: dark;
  --base: #252736;
  --panel: #2b3141;
  --active: #333b51;
  --text: #f5f6ff;
  --muted: #acb6c9;
  --line: #40485c;
  --blue: #8495ee;
  --green: #59c3b6;
  --accent: #6371ca;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font:
    14px/1.5 Roboto,
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
.btn {
  cursor: pointer;
  border: 0;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
.svg-sprites {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.navbar {
  width: 198px;
  flex: none;
  background: var(--panel);
  align-self: flex-start;
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 23px;
  height: 60px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.brand-mark {
  width: 28px;
}
.nav-content {
  padding: 8px 10px;
}
.nav-section {
  margin: 22px 12px 8px;
  color: var(--muted);
  font-size: 12px;
}
.navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 3px;
}
.navigation:hover,
.navigation.active {
  background: var(--active);
  color: var(--text);
}
.navigation.active {
  box-shadow: inset 3px 0 var(--blue);
}
.navigation.active .icon {
  color: var(--blue);
}
.workspace {
  min-width: 0;
  flex: 1;
}
.topbar {
  height: 60px;
  background: #37384c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(16px, 3vw, 46px);
}
.breadcrumb,
.identity,
.row,
.buttons,
.legend {
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb,
.identity {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb b {
  color: var(--text);
  font-weight: 500;
}
.identity {
  min-width: 0;
}
.identity span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard {
  max-width: 1580px;
  margin: auto;
  padding: 32px clamp(16px, 3vw, 46px) 56px;
}
.heading,
.panel-head,
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.heading {
  margin-bottom: 24px;
}
.heading h1 {
  font-size: clamp(23px, 2vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.7px;
}
.heading p,
.muted,
.sub {
  color: var(--muted);
}
.heading p {
  margin-top: 6px;
  font-size: 13px;
}
.primary,
.quiet,
.danger,
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.primary,
.btn {
  background: #5867bf;
  color: white;
}
.quiet {
  background: var(--active);
  color: #e2e7f4;
}
.danger {
  color: #ffb9bb;
  background: #543b47;
}
button:hover,
.btn:hover {
  filter: brightness(1.13);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi {
  background: #5c69b7;
  border-radius: 4px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.kpi span {
  color: #eff0ff;
  font-size: 13px;
}
.kpi strong {
  grid-row: 2;
  font-size: 28px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi .icon {
  grid-row: 1 / 3;
  grid-column: 2;
  width: 29px;
  height: 29px;
  color: #d0d8ff;
}
.kpi small {
  grid-column: 1/-1;
  color: #e1e5ff;
  margin-top: 9px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.panel {
  background: var(--panel);
  padding: 20px;
  border-radius: 4px;
  min-width: 0;
}
.panel-head {
  margin-bottom: 18px;
}
.panel-head h2,
.dialog-head h2 {
  font-size: 17px;
  letter-spacing: -0.25px;
}
.panel-head a {
  color: #b5c1ff;
  font-size: 13px;
}
.traffic {
  display: flex;
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
}
.ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 12px;
  flex: none;
}
.ring div {
  border-radius: 50%;
  background: var(--panel);
  height: 100%;
  display: grid;
  align-content: center;
  text-align: center;
}
.ring strong {
  font-size: 24px;
}
.ring small,
.sub {
  font-size: 12px;
}
.channels {
  flex: 1;
}
.channel,
.item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.channel:last-child,
.item:last-child {
  border: 0;
}
.channel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 7px;
}
.dot.green {
  background: var(--green);
}
.item .icon,
.empty-icon {
  color: var(--blue);
}
.item b,
.item small {
  display: block;
}
.item small {
  color: var(--muted);
  font-size: 12px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bdc5d6;
  font-size: 12px;
  white-space: nowrap;
}
.status:before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status.good {
  color: var(--green);
}
.status.warn {
  color: #e7c486;
}
.status.bad {
  color: #ff9caa;
}
.scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td b,
td small {
  display: block;
}
td small {
  color: var(--muted);
}
.bar {
  display: flex;
  overflow: hidden;
  border-radius: 3px;
  background: var(--green);
  height: 5px;
  margin: 5px 0;
  width: 100px;
}
.bar i {
  background: var(--blue);
}
.empty {
  padding: 26px 12px;
  text-align: center;
}
.empty .icon {
  width: 30px;
  height: 30px;
  color: var(--blue);
  margin-bottom: 8px;
}
.empty p {
  margin: 4px 0 12px;
  color: var(--muted);
}
.empty h3 {
  font-size: 16px;
}
.buttons {
  flex-wrap: wrap;
}
.problem {
  border-left: 3px solid #ef8e96;
  background: #473543;
  padding: 10px 14px;
  margin-bottom: 14px;
}
dialog {
  background: var(--panel);
  color: var(--text);
  width: min(540px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  max-height: 90dvh;
}
dialog::backdrop {
  background: rgba(16, 18, 30, 0.76);
}
dialog form {
  padding: 22px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dialog-head button {
  font-size: 20px;
  line-height: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field {
  display: grid;
  gap: 5px;
  font-size: 13px;
  margin-bottom: 12px;
}
input:not([type='checkbox']):not([type='range']),
select {
  width: 100%;
  background: var(--base);
  color: var(--text);
  border: 1px solid #535d73;
  border-radius: 4px;
  padding: 8px 10px;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--green);
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
}
.check input {
  accent-color: var(--accent);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 12px 0;
  padding: 10px 12px 0;
}
legend {
  font-size: 13px;
  padding: 0 6px;
}
.help {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 14px;
}
dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}
dialog footer .danger {
  margin-right: auto;
}
code {
  word-break: break-word;
  background: var(--base);
  padding: 2px 5px;
}
.instructions li {
  margin: 8px 0;
}
.instructions {
  padding-left: 20px;
}
.wrap {
  overflow-wrap: anywhere;
}
@media (max-width: 1080px) {
  .navbar {
    width: 164px;
  }
  .kpis {
    gap: 10px;
  }
  .dashboard {
    padding: 24px 18px;
  }
  .split {
    gap: 12px;
  }
  .ring {
    width: 105px;
    height: 105px;
  }
  .traffic {
    gap: 14px;
  }
  .panel {
    padding: 16px;
  }
}
@media (max-width: 800px) {
  .navbar {
    width: 54px;
  }
  .nav-content {
    padding: 6px;
  }
  .logo {
    padding: 0;
    justify-content: center;
  }
  .logo span,
  .navigation span,
  .nav-section {
    display: none;
  }
  .navigation {
    justify-content: center;
    padding: 12px 0;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .identity span {
    display: none;
  }
  .topbar {
    height: 50px;
  }
  .logo {
    height: 50px;
  }
}
@media (max-width: 520px) {
  .dashboard {
    padding: 18px 12px;
  }
  .heading {
    flex-wrap: wrap;
    gap: 10px;
  }
  .kpi {
    padding: 11px;
  }
  .kpi .icon {
    width: 18px;
    height: 18px;
  }
  .kpi strong {
    font-size: 23px;
  }
  .kpi span {
    font-size: 12px;
  }
  .kpi small {
    font-size: 10px;
  }
  .topbar {
    padding: 0 10px;
  }
  .breadcrumb {
    gap: 5px;
  }
  .breadcrumb .icon {
    display: none;
  }
  .primary,
  .quiet,
  .danger {
    padding: 7px 9px;
  }
  .panel {
    padding: 13px;
  }
  .ring {
    width: 88px;
    height: 88px;
    padding: 8px;
  }
  .traffic {
    gap: 12px;
  }
  .item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .form-grid {
    gap: 8px;
  }
  .dashboard .row {
    gap: 6px;
  }
}

.filters,
.section-links {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 18px;
}
.filters .field {
  margin: 0;
  min-width: 155px;
}
.stack-panels {
  display: grid;
  gap: 18px;
}
.facts {
  margin: 0 0 12px;
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.endpoint {
  display: block;
  padding: 10px;
  margin: 10px 0;
}
.plots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.histogram {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 140px;
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent calc(25% - 1px),
    var(--line) 25%
  );
}
.histogram > div {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.histogram i {
  background: var(--green);
}
.histogram b {
  background: var(--blue);
}
.plot-axis {
  display: flex;
  justify-content: space-between;
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.legend {
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.log-message {
  min-width: 190px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-width: 620px;
}
.inline-link {
  color: #b8c4ff;
}
.inline-link:hover {
  text-decoration: underline;
}
.section-links:not(:first-child) {
  margin-top: 14px;
}
#policy-inputs {
  margin-top: 12px;
}
.plots + .panel {
  margin-top: 16px;
}
@media (max-width: 800px) {
  .plots {
    grid-template-columns: 1fr;
  }
  .filters .field {
    min-width: 0;
    width: 100%;
  }
  .facts div {
    flex-wrap: wrap;
  }
}
.work-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.work-tabs a {
  padding: 7px 14px;
}
.filters {
  align-items: end;
}
.compact table th,
.compact table td {
  padding-top: 5px;
  padding-bottom: 5px;
}
textarea {
  width: 100%;
  font: inherit;
  background: var(--base);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: 8px;
}
.shift-report {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.panel + .panel {
  margin-top: 14px;
}
@media print {
  body:has(.shift-report) .app-shell,
  body:has(.shift-report) .dialog-head,
  body:has(.shift-report) dialog footer {
    display: none !important;
  }
  body:has(.shift-report),
  body:has(.shift-report) dialog {
    color: black;
    background: white;
  }
  body:has(.shift-report) dialog {
    position: static;
    border: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
  }
  .shift-report {
    font: 11pt/1.5 sans-serif;
  }
}
