:root {
  --bg: #f7f8fa;
  --surface: #fff;
  --ink: #17232f;
  --muted: #687481;
  --line: #e4e8ed;
  --primary: #225de8;
  --primary-soft: #edf2ff;
  --good: #23714d;
  --good-soft: #edf8f0;
  --bad: #ba3945;
  --bad-soft: #fff0f1;
  --warn: #906011;
  --warn-soft: #fff7e8;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 650;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 9px;
}
.boot {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--line);
  padding: 35px 20px 22px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 25px;
  letter-spacing: -1.1px;
  padding: 0 9px;
}
.brand strong {
  font-weight: 650;
}
.brand-mark {
  width: 25px;
  height: 25px;
  display: inline-block;
  background:
    linear-gradient(
      90deg,
      var(--primary) 44%,
      transparent 44%,
      transparent 56%,
      var(--primary) 56%
    ),
    linear-gradient(
      0deg,
      var(--primary) 44%,
      transparent 44%,
      transparent 56%,
      var(--primary) 56%
    );
  border-radius: 3px;
  transform: rotate(-5deg);
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #8a95a1;
  font-weight: 650;
  margin: 51px 12px 13px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav a {
  padding: 11px 12px;
  border-radius: 7px;
  color: #53616f;
  min-height: 43px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
nav a:hover {
  background: #f5f7fa;
}
nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 9px 0;
}
.domain-label {
  font-size: 11px;
  color: var(--muted);
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
  font-size: 12px;
  min-height: 40px;
}
.text-button:hover {
  color: var(--primary);
}
main {
  padding: 44px clamp(24px, 4vw, 64px) 64px;
  min-width: 0;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.button,
select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  min-height: 40px;
  color: var(--ink);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 550;
}
.button:hover {
  border-color: #bac5d2;
}
.button span {
  font-size: 16px;
  vertical-align: -1px;
  margin-right: 5px;
}
select {
  max-width: 245px;
  padding-right: 30px;
  cursor: pointer;
}
.primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.primary:hover {
  background: #174ecb;
  border-color: #174ecb;
}
.status-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: 26px 0 24px;
  font-size: 11px;
  color: var(--muted);
}
#scope-label {
  font-weight: 600;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 38px;
}
.stat {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 112px;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.stat-value {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-value.small {
  font-size: 19px;
  letter-spacing: -0.3px;
  line-height: 1.4;
}
.section {
  margin-top: 30px;
}
.section:first-child {
  margin-top: 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 15px;
}
.count {
  color: var(--muted);
  font-size: 11px;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
  border-top: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 15px 12px 0;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 15px 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  vertical-align: middle;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
td strong {
  font-weight: 600;
}
.secondary {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: -0.25px;
}
.truncate {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf0f3;
  color: #5a6774;
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}
.badge::before {
  content: "";
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.good {
  background: var(--good-soft);
  color: var(--good);
}
.badge.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.info {
  background: var(--primary-soft);
  color: var(--primary);
}
.row-button {
  display: block;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 9px 0;
  margin: -9px 0;
  min-height: 40px;
  max-width: 250px;
  font: inherit;
}
.row-button:hover {
  text-decoration: underline;
}
.row-button .mono {
  font-size: 11px;
}
.notice {
  border: 1px solid var(--line);
  padding: 13px 16px;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 20px;
  background: var(--surface);
  color: var(--muted);
}
.notice.error {
  border-color: #f0c7cb;
  color: var(--bad);
  background: var(--bad-soft);
}
.empty {
  padding: 46px 18px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.loading {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.metric-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.metric-inline strong {
  color: var(--ink);
  font-weight: 600;
}
.info-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 50%;
  width: 19px;
  height: 19px;
  padding: 0;
  margin-left: 6px;
  font-size: 10px;
  cursor: help;
}
.grant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 420px;
  white-space: normal;
}
.grant {
  font-size: 10px;
  background: #edf0f3;
  border-radius: 4px;
  padding: 3px 6px;
  color: #556475;
}
.login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  flex-direction: column;
  background: var(--surface);
}
.login-brand {
  position: absolute;
  top: 38px;
  left: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -1px;
}
.login-form {
  width: min(100%, 370px);
}
.login-form h1 {
  font-size: 29px;
  margin-bottom: 36px;
}
.login-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
}
.login-form input {
  width: 100%;
  border: 1px solid #cbd3dd;
  border-radius: 7px;
  padding: 12px;
  min-height: 46px;
  outline-color: var(--primary);
  background: var(--surface);
}
.login-form .button {
  width: 100%;
  margin-top: 18px;
  font-size: 13px;
  min-height: 44px;
}
.error-text {
  color: var(--bad);
  font-size: 12px;
  margin-top: 10px;
}
.login-foot {
  position: absolute;
  bottom: 30px;
  color: #919ca7;
  font-size: 11px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-only {
  display: none;
}
dialog {
  border: 0;
  padding: 0;
  border-radius: 14px;
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100dvh - 64px);
  box-shadow: 0 25px 90px #11243c35;
  color: var(--ink);
  background: var(--surface);
}
dialog::backdrop {
  background: #13273e70;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 25px 28px;
  gap: 20px;
}
.dialog-header h2 {
  font-family: var(--mono);
  font-size: 15px;
  overflow-wrap: anywhere;
  letter-spacing: -0.5px;
}
.dialog-content {
  padding: 25px 28px;
  max-height: calc(100dvh - 190px);
  overflow: auto;
}
.icon-button {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.detail-label {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 6px;
}
.detail-value {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  border-left: 1px solid var(--line);
  padding: 0 0 25px 23px;
  margin-left: 5px;
}
.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.timeline li::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  left: -4px;
  top: 5px;
  background: #93a5bf;
  box-shadow: 0 0 0 4px #fff;
}
.event-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 12px;
}
.event-time {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.event-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.event-trace {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
}
details {
  margin-top: 12px;
}
summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--primary);
  min-height: 28px;
  padding: 4px 0;
}
pre {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  background: #f5f7fa;
  padding: 16px;
  border-radius: 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 500px;
  overflow: auto;
  color: #42546a;
}
.right {
  text-align: right;
}
.data-error {
  margin: 20px 0;
  color: var(--bad);
  font-size: 12px;
}
@media (max-width: 1100px) {
  main {
    padding: 35px 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .brand {
    font-size: 23px;
  }
  .page-header {
    align-items: flex-start;
  }
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .stat-value {
    font-size: 26px;
  }
}
@media (max-width: 760px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 20px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0;
    font-size: 23px;
  }
  .brand-mark {
    width: 23px;
    height: 23px;
  }
  .workspace-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    margin-top: 21px;
    gap: 9px;
    padding-bottom: 10px;
  }
  nav a {
    padding: 9px 10px;
    min-height: 40px;
    font-size: 12px;
  }
  main {
    padding: 25px 20px 40px;
  }
  .page-header {
    display: block;
  }
  .page-header h1 {
    font-size: 27px;
  }
  .header-actions {
    justify-content: flex-start;
    margin-top: 20px;
  }
  .header-actions select {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
  .status-line {
    margin-top: 21px;
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 28px;
  }
  .stat {
    min-height: 104px;
    padding: 17px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-label {
    font-size: 10px;
  }
  .section {
    margin-top: 28px;
  }
  td {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 10px;
  }
  .dialog-header {
    padding: 20px;
  }
  .dialog-content {
    padding: 20px;
    max-height: calc(100dvh - 150px);
  }
  .dialog-header h2 {
    font-size: 12px;
  }
  .login-brand {
    top: 27px;
    left: 28px;
  }
  .login-form h1 {
    font-size: 27px;
  }
  .table-wrap {
    margin-right: -20px;
    padding-right: 20px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .count {
    text-align: right;
    font-size: 10px;
  }
  .stat-value.small {
    font-size: 17px;
  }
  .mobile-only {
    display: inline-block;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

html {
  scrollbar-gutter: stable;
}
body:has(dialog[open]) {
  overflow: hidden;
}

.monitor-state {
  display: flex;
  align-items: center;
  min-height: 34px;
}
.monitor-state .badge {
  font-size: 11px;
  white-space: normal;
}
.monitor-stats {
  margin-bottom: 20px;
}
