:root {
  --admin-mint: #7fd9c3;
  --admin-red: #ed9797;
  --admin-amber: #e8c388;
}
main {
  max-width: 1800px;
}
.admin-tag {
  font-size: 9px;
  letter-spacing: 1.3px;
  border: 1px solid #31394c;
  border-radius: 5px;
  color: #98a6bf;
  padding: 6px 9px;
}
.refresh-setting {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.refresh-setting select {
  font-size: 11px;
  height: 35px;
}
.admin-filters {
  padding: 17px 20px;
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(170px, 1fr) auto minmax(
      90px,
      auto
    );
  gap: 16px;
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.scope-badge {
  align-self: center;
  justify-self: end;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  font-size: 11px;
  color: #a5aec2;
}
.admin-context {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 1px 17px;
  font-size: 10px;
  color: var(--muted);
}
.status-strip {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  align-items: center;
  background: #10161f;
  border: 1px solid #273240;
  border-radius: 7px;
  padding: 13px 17px;
  margin-bottom: 20px;
  font-size: 10px;
  color: #7f8da5;
}
.status-strip > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.status-strip strong {
  font-size: 10px;
  font-weight: 500;
  color: #c8d1e0;
}
.status-strip b {
  font-weight: 500;
  color: #b6c4d9;
  font-variant-numeric: tabular-nums;
}
.system-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #6c768c;
}
.system-dot.ok {
  background: var(--admin-mint);
  box-shadow: 0 0 9px #7fd9c333;
}
.system-dot.error {
  background: var(--admin-red);
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.admin-metric {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(115deg, #171c27, #131822);
  padding: 19px 20px;
  min-width: 0;
  --metric-accent: #b5bed2;
}
.admin-metric.mint {
  --metric-accent: var(--admin-mint);
}
.admin-metric.purple {
  --metric-accent: var(--purple);
}
.admin-metric.amber {
  --metric-accent: var(--admin-amber);
}
.metric-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #aab6cc;
}
.metric-symbol {
  font-size: 21px;
  line-height: 1;
  color: var(--metric-accent);
}
.admin-metric .metric {
  font-size: 31px;
  margin: 17px 0 12px;
  color: var(--metric-accent);
}
.metric-description {
  font-size: 10px;
  color: #7f8ca4;
  line-height: 1.6;
}
.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 23px;
}
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2 {
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.panel-heading p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0 0;
}
.panel-label {
  font-size: 8px;
  color: #9aabc4;
  letter-spacing: 1px;
  white-space: nowrap;
  border: 1px solid #30394b;
  border-radius: 4px;
  padding: 5px 7px;
}
.chart-summary {
  padding: 18px 22px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}
.chart-summary > strong {
  font-size: 23px;
  font-weight: 600;
  color: var(--admin-mint);
  font-variant-numeric: tabular-nums;
}
.chart-summary .last-event {
  margin-left: auto;
  font-size: 9px;
  color: #8ea4ba;
}
.ingestion-chart {
  height: 146px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 4px;
  padding: 23px 22px 0;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 40px,
    #27334542 41px,
    #27334542 42px
  );
  margin: 0 0 0;
  position: relative;
}
.chart-bar {
  min-height: 2px;
  height: var(--bar-height, 2px);
  min-width: 0;
  border: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, #2e796e, #78d5bd);
  opacity: 0.85;
  padding: 0;
  transition: height 0.25s;
  outline-offset: 4px;
}
.chart-bar.zero {
  background: #334251;
  opacity: 0.7;
}
.chart-bar:hover,
.chart-bar:focus-visible {
  opacity: 1;
  background: #a0f2d7;
}
.chart-ticks {
  display: flex;
  justify-content: space-between;
  padding: 10px 22px 17px;
  color: #687a92;
  font-size: 9px;
}
.panel-footnote {
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #78869e;
  line-height: 1.6;
}
.distribution-list {
  max-height: 280px;
  min-height: 232px;
  overflow: auto;
  padding: 10px 20px 16px;
}
.distribution-item {
  margin: 13px 0 16px;
}
.distribution-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.distribution-label > span {
  color: #adb9d0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.distribution-label > strong {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #d1dbed;
}
.distribution-track {
  height: 4px;
  margin: 9px 0 6px;
  background: #262f40;
  border-radius: 4px;
  overflow: hidden;
}
.distribution-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 4px;
}
.distribution-meta {
  font-size: 9px;
  color: #78879e;
}
.collector-section {
  margin-top: 23px;
}
.inline-count {
  font-size: 10px;
  background: #28243a;
  color: #c1acef;
  border: 1px solid #3d3356;
  padding: 3px 7px;
  border-radius: 5px;
}
.collector-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
.collector-tools input {
  width: 220px;
}
.collector-tools input,
.collector-tools select {
  font-size: 11px;
}
.admin-table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #364252 transparent;
}
.admin-table-scroll table {
  table-layout: auto;
}
.admin-table-scroll th {
  background: #111722;
  font-size: 10px;
  font-weight: 500;
  padding: 12px 15px;
  white-space: nowrap;
  color: #8b9ab4;
}
.admin-table-scroll td {
  height: 64px;
  font-size: 11px;
  line-height: 1.6;
  padding: 11px 15px;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid #242c3b;
}
.admin-table-scroll td strong {
  font-weight: 500;
  color: #d5deee;
}
.admin-table-scroll td small {
  font-size: 9px;
  display: block;
  color: #71839d;
}
.collector-table {
  min-width: 1180px;
}
.collector-table td:nth-child(2) {
  min-width: 180px;
}
.collector-table td:nth-child(3) {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 500;
  border: 1px solid #344255;
  background: #23314338;
  color: #a4b5cd;
  border-radius: 4px;
  padding: 4px 7px;
}
.status-pill:before {
  content: "";
  width: 4px;
  height: 4px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.active {
  color: var(--admin-mint);
  border-color: #77d6b92c;
  background: #77d6b90b;
}
.status-pill.inactive {
  color: var(--admin-red);
  border-color: #ed97972e;
  background: #ed97970c;
}
.status-pill.warning {
  color: var(--admin-amber);
  border-color: #e8c38833;
  background: #e8c38809;
}
.admin-empty {
  padding: 30px 20px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.breakdown-table td:nth-child(2),
.breakdown-table td:nth-child(3),
.breakdown-table th:nth-child(2),
.breakdown-table th:nth-child(3) {
  text-align: right;
}
.breakdown-table td {
  height: 46px;
}
.database-name {
  font-size: 10px;
  color: var(--admin-mint);
  background: #7fd9c309;
  border: 1px solid #7fd9c329;
  border-radius: 4px;
  padding: 3px 7px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 20px;
}
.collection-item {
  background: #101723;
  border: 1px solid #273247;
  border-radius: 6px;
  padding: 11px 8px;
  min-width: 0;
}
.collection-item span {
  font-family: ui-monospace, monospace;
  font-size: 9px;
  color: #8696b1;
  display: block;
}
.collection-item strong {
  display: block;
  font-size: 19px;
  letter-spacing: -0.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  color: #d5dff1;
}
.storage-details {
  margin: 0;
  padding: 0 20px 17px;
  display: grid;
  gap: 11px;
}
.storage-details > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 10px;
  line-height: 1.5;
}
.storage-details dt {
  color: #8494ae;
}
.storage-details dd {
  margin: 0;
  color: #c1cee3;
  font-variant-numeric: tabular-nums;
}
.recent-section {
  margin-top: 23px;
}
.recent-table {
  min-width: 950px;
}
.recent-table td {
  height: 46px;
}
.mono {
  font-family: ui-monospace, "Cascadia Code", monospace;
  letter-spacing: -0.2px;
}
.stale .admin-metrics,
.stale .operations-grid,
.stale .collector-section,
.stale .recent-section {
  opacity: 0.6;
}
.loading #refresh .refresh-icon {
  animation: spin 1.1s linear infinite;
}
.loading .admin-metric .metric {
  opacity: 0.7;
}
.page-footer {
  font-size: 9px;
}
.table-time {
  font-variant-numeric: tabular-nums;
}
input,
select {
  font-size: 12px;
}
@media (max-width: 1300px) {
  .admin-metrics {
    gap: 12px;
  }
  .admin-metric {
    padding: 17px 15px;
  }
  .admin-metric .metric {
    font-size: 26px;
  }
  .metric-title {
    font-size: 10px;
  }
  .metric-description {
    font-size: 9px;
  }
  .collector-section > .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .collector-tools {
    width: 100%;
  }
  .collector-tools input {
    flex: 1;
  }
  .chart-summary .last-event {
    margin-left: 0;
  }
  .status-strip {
    gap: 12px;
    font-size: 9px;
  }
  .status-strip strong {
    font-size: 9px;
  }
}
@media (max-width: 1050px) {
  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .operations-grid {
    grid-template-columns: 1fr;
  }
  .distribution-list {
    min-height: 0;
    max-height: 260px;
  }
  .admin-filters {
    grid-template-columns: 1fr 1fr;
  }
  .scope-badge {
    justify-self: start;
    border-left: 0;
    padding-left: 0;
  }
  .heading-actions {
    gap: 10px;
  }
  .refresh-setting {
    font-size: 0;
    gap: 0;
  }
  .refresh-setting select {
    font-size: 10px;
  }
  .panel-heading p {
    font-size: 9px;
  }
  .ingestion-chart {
    gap: 3px;
  }
  .collection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 600px) {
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading > div:first-child {
    flex: 1;
  }
  .heading-actions {
    width: 100%;
    justify-content: space-between;
  }
  .heading-actions .button {
    font-size: 11px;
    width: auto;
    padding: 0 12px;
  }
  .refresh-setting {
    font-size: 10px;
    gap: 8px;
  }
  .admin-filters {
    padding: 15px;
    gap: 12px;
  }
  .admin-filters > .field:first-child {
    grid-column: 1/-1;
  }
  .admin-filters > .button {
    grid-column: 1/-1;
  }
  .scope-badge {
    grid-column: 1/-1;
    font-size: 10px;
  }
  .admin-metrics {
    gap: 10px;
  }
  .admin-metric {
    padding: 15px 12px;
  }
  .admin-metric .metric {
    font-size: 24px;
  }
  .metric-title {
    font-size: 9px;
    line-height: 1.5;
  }
  .metric-symbol {
    font-size: 17px;
  }
  .metric-description {
    font-size: 9px;
  }
  .status-strip {
    padding: 12px;
    gap: 12px;
  }
  .status-strip > div {
    width: calc(50% - 10px);
    line-height: 1.5;
  }
  .panel-heading {
    padding: 17px;
    align-items: flex-start;
  }
  .panel-heading h2 {
    font-size: 13px;
  }
  .panel-label {
    font-size: 7px;
  }
  .chart-summary {
    padding: 15px 17px 0;
    font-size: 9px;
  }
  .chart-summary .last-event {
    width: 100%;
    font-size: 8px;
  }
  .ingestion-chart {
    height: 126px;
    padding: 18px 17px 0;
    gap: 2px;
  }
  .chart-ticks {
    font-size: 8px;
    padding: 9px 17px 14px;
  }
  .panel-footnote {
    font-size: 8px;
    padding: 11px 17px;
  }
  .collector-tools {
    flex-direction: column;
    align-items: stretch;
  }
  .collector-tools input {
    width: 100%;
    flex: auto;
  }
  .collector-tools select {
    width: 100%;
  }
  .collection-grid {
    padding: 16px;
    grid-template-columns: 1fr 1fr;
  }
  .storage-details {
    padding: 0 17px 17px;
  }
  .admin-context {
    font-size: 9px;
    line-height: 1.6;
  }
  .admin-context > span:last-child {
    white-space: nowrap;
  }
  .page-footer {
    font-size: 8px;
  }
  .distribution-label {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .chart-bar {
    transition: none;
  }
}
