:root {
  color-scheme: dark;
  --bg: #0c1017;
  --rail: #10141d;
  --surface: #141b25;
  --surface2: #1b2330;
  --line: #303a48;
  --subtle: #232c39;
  --text: #edf2f8;
  --muted: #a9b5c7;
  --mint: #72e5be;
  --violet: #ab9bff;
  --danger: #ffacb4;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(32px, 3.3vw, 48px);
  letter-spacing: -0.052em;
  line-height: 1.1;
  font-weight: 620;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.033em;
  line-height: 1.35;
}
h3 {
  font-size: 15px;
  letter-spacing: -0.015em;
}
a {
  color: var(--mint);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a.btn {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
input,
select,
textarea {
  color-scheme: dark;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    color 0.15s;
}
button:hover:not(:disabled) {
  filter: brightness(1.12);
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 50;
  padding: 8px 13px;
  background: var(--mint);
  color: #071c14;
}
.btn,
.iconbtn,
.textbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.3;
  font-weight: 540;
}
.btn,
.iconbtn {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}
.btn:hover,
.iconbtn:hover {
  text-decoration: none;
  background: #222d3c;
}
.btn.primary,
button.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #06251b;
}
.btn.dangerous {
  color: #2c070a;
  background: var(--danger);
  border-color: var(--danger);
}
.textbtn {
  padding: 3px 0;
  background: none;
  border: 0;
  color: var(--mint);
  text-align: left;
}
.danger {
  color: var(--danger);
}
.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iconbtn {
  width: 36px;
  padding: 0;
}
.row,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.actions {
  justify-content: flex-end;
}
.small,
small {
  font-size: 12px;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.layout {
  min-height: 100dvh;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 218px;
  padding: 23px 14px 18px;
  background: var(--rail);
  border-right: 1px solid var(--line);
  z-index: 12;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 660;
  font-size: 18px;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  background: var(--mint);
  color: #103b2e;
  font-size: 31px;
  font-weight: 650;
  line-height: 1;
  border-radius: 9px;
}
.rail .eyebrow {
  margin: 34px 12px 9px;
}
.rail nav {
  display: grid;
  gap: 3px;
}
.navlink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 530;
  font-size: 13px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.navlink:hover {
  background: #1a202a;
  color: var(--text);
  text-decoration: none;
}
.navlink.active {
  color: var(--mint);
  background: #182b29;
  border-color: #27443e;
}
.identity {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 14px 7px 0;
}
.user-email {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.identity .textbtn {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.page-shell {
  margin-left: 218px;
}
.auth-shell .page-shell {
  margin-left: 0;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 clamp(18px, 3vw, 48px);
  border-bottom: 1px solid var(--subtle);
  background: #0f131b;
}
.breadcrumb,
.home-link {
  color: var(--muted);
  font-size: 12px;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.home-link .icon {
  width: 14px;
  height: 14px;
}
.mobile-menu,
.scrim {
  display: none;
}
.main {
  max-width: 1630px;
  margin: 0 auto;
  padding: 30px clamp(18px, 3vw, 48px) 48px;
}
.main:focus {
  outline: none;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 21px;
}
.page-head p {
  margin-top: 7px;
  color: var(--muted);
}
.surface,
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
}
.surface + .surface {
  margin-top: 15px;
}
.panel-head,
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 19px;
}
.panel-head > span,
.panel-head small,
.panel-foot {
  font-size: 12px;
  color: var(--muted);
}
.panel-head a,
.panel-foot a {
  font-size: 12px;
}
.panel-foot {
  border-top: 1px solid var(--subtle);
  padding: 10px 18px;
}
.panel-pad,
.form-card {
  padding: 21px;
}
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 14px 0;
}
.filters label {
  display: grid;
  gap: 3px;
  font-size: 10px;
  color: var(--muted);
}
.filters select,
.filters input,
.filters button,
.date-control {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151b25;
  color: var(--text);
}
.filters select,
.filters input {
  width: auto;
  max-width: 190px;
  padding: 6px 8px;
  font-size: 12px;
  min-height: 34px;
}
.filters input[data-model] {
  max-width: 145px;
}
.seg,
.date-control {
  display: inline-flex;
  align-items: center;
  height: 35px;
}
.seg {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #151b25;
  padding: 2px;
}
.seg button,
.date-control button {
  height: 29px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.seg button[aria-pressed="true"] {
  background: #303a49;
  color: var(--text);
}
.date-control input {
  background: transparent;
  border: 0;
  min-height: 30px;
}
.date-control button {
  font-size: 18px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 12px 0 17px;
}
.metrics .surface {
  margin: 0;
}
.metric {
  padding: 16px 19px;
}
.metric.featured {
  background: linear-gradient(110deg, #172a23, #151d24);
  border-color: #3f574e;
}
.metric p {
  font-size: 12px;
  color: #c6d2df;
}
.metric b {
  display: block;
  font-size: clamp(30px, 3vw, 45px);
  font-weight: 590;
  letter-spacing: -0.06em;
  line-height: 1.2;
  margin: 5px 0;
}
.metric small {
  font-size: 11px;
}
.report-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font: 11px/1.5 var(--mono);
}
.duo,
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 15px;
  margin: 14px 0;
}
.duo .surface,
.grid2 .surface {
  margin: 0;
}
.usage-chart {
  width: 100%;
  display: block;
  padding: 0 12px;
  min-height: 145px;
}
.legend,
.legend span,
.mix-item span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.legend {
  gap: 11px;
  font-size: 11px;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
  flex: none;
}
.dot.c0 {
  background: #72e5be;
}
.dot.c1 {
  background: #ab9bff;
}
.dot.c2 {
  background: #88b5f1;
}
.dot.c3 {
  background: #eabd79;
}
.dot.c4 {
  background: #eaacbf;
}
.dot.c5 {
  background: #8ed4df;
}
.mix-list {
  display: grid;
  gap: 9px;
  padding: 0 19px 19px;
}
.mix-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.mix-item span {
  overflow-wrap: anywhere;
}
.mix-item strong {
  font: 12px var(--mono);
  color: var(--text);
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
td,
th {
  padding: 10px 17px;
  border-top: 1px solid var(--subtle);
  white-space: nowrap;
}
th {
  font-size: 10px;
  color: var(--muted);
  background: #121822;
}
.num {
  text-align: right;
  font-family: var(--mono);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #e5bf7f;
}
.pill.ok {
  color: var(--mint);
}
.pill.bad {
  color: var(--danger);
}
.pill:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.empty {
  text-align: center;
  padding: 38px 18px;
}
.empty p {
  margin: 7px 0 15px;
  color: var(--muted);
}
.empty.mini {
  color: var(--muted);
}
.loading {
  color: var(--muted);
  padding: 40px 10px;
}
.forms {
  display: grid;
  gap: 13px;
}
.field,
.forms > label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 560;
}
.field input,
.field select,
.field textarea,
.forms input:not([type="checkbox"]),
.forms select,
.forms textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #1b222e;
  color: var(--text);
  font-weight: 400;
}
.forms .check,
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
}
.forms input[type="checkbox"] {
  accent-color: var(--mint);
}
.alert,
.inline-error:not(:empty) {
  padding: 10px 13px;
  color: #f7c1bc;
  background: #2b2025;
  border: 1px solid #68414c;
  border-radius: 7px;
  font-size: 13px;
}
.alert.info {
  color: #cbdfef;
  background: #192531;
  border-color: #34495c;
}
.auth-shell .main {
  max-width: 900px;
}
.auth-shell .form-card {
  max-width: 470px;
  margin: 3vh auto;
}
.forms .btn:only-child {
  justify-self: start;
}
.forms + .row,
.alert + .forms {
  margin-top: 14px;
}
.form-card h1 {
  font-size: 32px;
}
.form-card p {
  color: var(--muted);
}
.connection-modal,
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #455365;
  border-radius: 13px;
  width: min(555px, calc(100vw - 24px));
  max-height: 86dvh;
  padding: 0;
  box-shadow: 0 24px 112px #000a;
}
dialog::backdrop {
  background: #04070cc4;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}
.modal-body p {
  font-size: 13px;
  color: var(--muted);
}
.source-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.source-options .btn {
  font-size: 12px;
  min-height: 32px;
}
.guide {
  padding: 11px;
  border-radius: 7px;
  background: #10161e;
}
.guide p {
  font-size: 12px;
}
.guide pre,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
  padding: 10px 12px;
  background: #0c1119;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #c6dfd5;
  font: 11px/1.6 var(--mono);
}
details > summary {
  cursor: pointer;
  color: var(--mint);
  font-size: 13px;
}
details[open] > summary {
  margin-bottom: 8px;
}
.facts {
  margin: 0;
  display: grid;
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--subtle);
  font-size: 12px;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
#notice:not(:empty) {
  position: fixed;
  z-index: 30;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 9px 15px;
  background: #21362e;
  color: #dbf3e7;
  border: 1px solid #446956;
  border-radius: 7px;
  font-size: 13px;
}
@media (max-width: 880px) {
  .rail {
    width: 200px;
    transform: translateX(-105%);
    transition: transform 0.18s;
    visibility: hidden;
  }
  .nav-open .rail {
    visibility: visible;
    transform: none;
  }
  .page-shell {
    margin: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: #04070ca6;
    z-index: 11;
    border: 0;
  }
  .main {
    padding: 22px 17px 35px;
  }
  .top {
    padding: 0 17px;
  }
}
@media (max-width: 650px) {
  .top {
    min-height: 48px;
  }
  .main {
    padding: 20px 12px 30px;
  }
  .page-head {
    gap: 9px;
    align-items: flex-start;
  }
  .page-head .btn {
    font-size: 12px;
  }
  .page-head p {
    font-size: 12px;
  }
  .filters {
    gap: 6px;
  }
  .filters select,
  .filters input {
    max-width: 150px;
  }
  .report-meta {
    font-size: 10px;
  }
  .metrics {
    gap: 6px;
  }
  .metric {
    padding: 10px 8px;
  }
  .metric p,
  .metric small {
    font-size: 10px;
  }
  .metric b {
    font-size: clamp(22px, 5.8vw, 34px);
  }
  .duo,
  .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel-head,
  .panel-pad,
  .form-card {
    padding: 14px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .usage-chart {
    min-height: 128px;
  }
  .panel-foot,
  .mix-list {
    font-size: 11px;
  }
  .panel-foot {
    padding: 7px 13px;
  }
  .usage-chart text {
    font-size: 14px;
  }
  .home-link {
    font-size: 11px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .auth-shell .main {
    padding: 14px;
  }
}
[hidden] {
  display: none !important;
}
.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.device-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--subtle);
}
.device-list small {
  display: block;
}
.modal-body .forms {
  min-width: 0;
}
dialog > form.forms {
  padding: 20px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
