:root {
  --bg: #f6f3ee;
  --panel: rgba(255,255,255,0.9);
  --panel-border: rgba(28, 36, 44, 0.08);
  --ink: #1b232b;
  --muted: #5b6b78;
  --accent: #0d8f87;
  --accent-2: #f08b39;
  --danger: #c44747;
  --ok: #2a8f52;
  --shadow: 0 20px 60px rgba(17, 28, 39, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(240,139,57,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(13,143,135,0.15), transparent 30%),
    linear-gradient(180deg, #fbf8f3 0%, #f2efe7 100%);
  color: var(--ink);
}
a { color: inherit; }
button, input, textarea, select {
  font: inherit;
}
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.sidebar {
  padding: 28px 22px;
  background: rgba(255,255,255,0.55);
  border-right: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
}
.brand {
  margin-bottom: 28px;
}
.brand h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
}
.brand p {
  color: var(--muted);
  margin: 10px 0 0;
}
.nav-group { margin-bottom: 8px; }
.nav-group summary {
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 600;
}
.nav-group summary:hover { background: rgba(13,143,135,0.09); }
.nav-group .nav-link { margin: 2px 0 2px 14px; padding: 9px 14px; }
.nav-link {
  display: block;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--muted);
  transition: 0.2s ease;
}
.nav-link.active,
.nav-link:hover {
  color: var(--ink);
  background: rgba(13,143,135,0.09);
}
.content {
  padding: 28px;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.header h2 { margin: 0; font-size: 32px; }
.header p { margin: 8px 0 0; color: var(--muted); }
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.hint-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13,143,135,0.08), rgba(240,139,57,0.08));
  border: 1px solid rgba(13,143,135,0.14);
}
.result-box {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  font-weight: 600;
}
.result-box.success {
  color: #216940;
  background: rgba(42,143,82,0.12);
  border: 1px solid rgba(42,143,82,0.22);
}
.result-box.error {
  color: #7c3030;
  background: rgba(196,71,71,0.12);
  border: 1px solid rgba(196,71,71,0.22);
}
.grid {
  display: grid;
  gap: 18px;
}
.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.metric-cards {
  align-items: stretch;
}
.card-value {
  font-size: 36px;
  font-weight: 700;
  margin: 10px 0 0;
}
.metric-card {
  padding: 18px;
  background: rgba(255,255,255,0.72);
}
.metric-card-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}
.metric-big {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 14px;
}
.metric-chart-wrap {
  margin-bottom: 14px;
}
.metric-chart {
  width: 100%;
  height: 72px;
  display: block;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(13,143,135,0.10), rgba(13,143,135,0.02)),
    linear-gradient(90deg, rgba(27,35,43,0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27,35,43,0.05) 1px, transparent 1px);
  background-size: auto, 44px 100%, 100% 18px;
  border: 1px solid rgba(27,35,43,0.08);
}
.metric-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.metric-chart-caption {
  margin-top: 6px;
  font-size: 12px;
}
.metric-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(27,35,43,0.08);
}

.latency-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.latency-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(27,35,43,0.08);
  background: rgba(255,255,255,0.76);
}
.latency-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(13,143,135,0.12), transparent 36%);
}
.latency-card.server-card::before {
  background: radial-gradient(circle at top right, rgba(45,91,255,0.13), transparent 36%);
}
.latency-card-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.latency-card h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}
.latency-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.latency-total {
  min-width: 120px;
  text-align: right;
}
.latency-total strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}
.latency-total span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.latency-bar {
  position: relative;
  display: flex;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27,35,43,0.06);
  border: 1px solid rgba(27,35,43,0.06);
}
.latency-bar-segment {
  min-width: 2px;
  transition: width 0.25s ease;
}
.latency-segments {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.latency-segment-row {
  display: grid;
  grid-template-columns: 12px minmax(110px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(27,35,43,0.06);
}
.latency-segment-row small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
}
.latency-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.event-batch-breakdown {
  position: relative;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(27,35,43,0.1);
}
.event-batch-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.event-batch-head strong {
  color: var(--ink);
}
.latency-extra {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.latency-extra span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(27,35,43,0.055);
  color: var(--muted);
  font-size: 11px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.catalog-list-tools {
  margin: 18px 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(27,35,43,0.08);
  background: rgba(255,255,255,0.58);
}
.catalog-filter-grid {
  grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(120px, 1fr));
  margin-bottom: 12px;
}
.catalog-toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid rgba(27,35,43,0.12);
  background: rgba(255,255,255,0.92);
  padding: 12px 14px;
  border-radius: 14px;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(13,143,135,0.6);
  box-shadow: 0 0 0 4px rgba(13,143,135,0.12);
}
.button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.button.secondary {
  background: rgba(27,35,43,0.08);
  color: var(--ink);
}
.button.warn { background: var(--accent-2); }
.button.danger { background: var(--danger); }
.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(27,35,43,0.07);
}
.segmented-control button {
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.segmented-control button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(27,35,43,0.08);
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(27,35,43,0.08);
  vertical-align: top;
}
.table-sort {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.compact-table th, .compact-table td {
  padding: 8px 7px;
  font-size: 12px;
}
.percentile-line {
  margin-top: 3px;
  white-space: nowrap;
  font-size: 10px;
}
.country-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(45, 91, 255, 0.11);
  color: var(--accent);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.telemetry-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.telemetry-status.ok,
.telemetry-status.receiving {
  background: rgba(42,143,82,0.16);
  color: #216940;
}
.telemetry-status.missing {
  background: rgba(196,71,71,0.16);
  color: #7c3030;
}
.telemetry-status.stale {
  background: rgba(240,139,57,0.18);
  color: #8a4f16;
}
.telemetry-status.disconnected {
  background: rgba(27,35,43,0.12);
  color: var(--muted);
}
.coverage-list {
  display: grid;
  gap: 12px;
}
.coverage-card {
  border: 1px solid rgba(27,35,43,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.64);
  overflow: hidden;
}
.coverage-card .table th,
.coverage-card .table td {
  border-bottom-color: rgba(27,35,43,0.06);
}
.coverage-card .table tr:last-child td {
  border-bottom: 0;
}
.coverage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(27,35,43,0.035);
}

.telemetry-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.telemetry-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(27,35,43,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
}
.telemetry-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.telemetry-user-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.telemetry-user-line strong {
  overflow-wrap: anywhere;
}
.telemetry-rtt {
  flex: 0 0 auto;
  text-align: right;
}
.telemetry-rtt strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}
.telemetry-rtt span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.telemetry-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.telemetry-mini-grid > div {
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(27,35,43,0.045);
}
.telemetry-mini-grid span,
.telemetry-mini-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.telemetry-mini-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.telemetry-percentiles {
  margin-top: 8px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.telemetry-updated {
  margin-top: 8px;
  font-size: 11px;
}
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; border-right: 0; border-bottom: 1px solid var(--panel-border); }
  .content { padding: 18px; }
  .telemetry-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latency-card-head,
  .telemetry-card-head { flex-direction: column; }
  .latency-total,
  .telemetry-rtt { text-align: left; }
}
.journal-table {
  table-layout: fixed;
}
.journal-table .journal-entity-col {
  width: 180px;
}
.journal-table .journal-payload-col {
  width: 46%;
}
.journal-payload {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: none;
}
.journal-footer {
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.server-log-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 120px repeat(4, minmax(140px, 1fr)) 110px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.server-log-table {
  table-layout: fixed;
}
.server-log-table th:nth-child(1) {
  width: 170px;
}
.server-log-table th:nth-child(2) {
  width: 90px;
}
.server-log-table th:nth-child(3) {
  width: 170px;
}
.server-log-table th:nth-child(4) {
  width: 220px;
}
.server-log-table th:nth-child(5) {
  width: 220px;
}
.server-log-raw-col {
  width: 42%;
}
.server-log-raw {
  max-height: 320px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .server-log-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .server-log-filters {
    grid-template-columns: 1fr;
  }
}
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.open { background: rgba(240,139,57,0.18); color: #8a4f16; }
.badge.in_review { background: rgba(13,143,135,0.15); color: #0b625d; }
.badge.resolved { background: rgba(42,143,82,0.16); color: #216940; }
.badge.rejected { background: rgba(196,71,71,0.16); color: #7c3030; }
.badge.danger { background: rgba(196,71,71,0.16); color: #7c3030; }
.muted { color: var(--muted); }
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: min(460px, 100%);
}
.form-grid {
  display: grid;
  gap: 14px;
}
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}
.list {
  display: grid;
  gap: 12px;
}
.list-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(27,35,43,0.08);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 30, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-shell {
  width: min(1400px, 100%);
  max-height: 100%;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(17, 28, 39, 0.22);
  padding: 24px;
}
.modal-xl {
  width: min(1520px, calc(100vw - 48px));
}
.editor-panel {
  background: rgba(255,255,255,0.55);
}
.nested-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.nested-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.field-span-1 {
  min-width: 0;
}
.field-span-2 {
  grid-column: 1 / -1;
}
.add-field-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 160px auto;
  gap: 12px;
  margin-top: 14px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.mini-action {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.danger-text {
  color: var(--danger);
}
.nested-array-head,
.array-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.tree-node-head {
  justify-content: flex-start;
}
.tree-node-head > .button {
  margin-left: auto;
}
.tree-toggle {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(27,35,43,0.07);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
.array-stack {
  display: grid;
  gap: 16px;
}
.array-card,
.nested-object,
.nested-array {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(27,35,43,0.08);
  background: rgba(255,255,255,0.68);
}
pre.code {
  white-space: pre-wrap;
  word-break: break-word;
  background: #10161d;
  color: #edf2f7;
  border-radius: 18px;
  padding: 14px;
  overflow: auto;
}
.raw-json-view {
  max-height: 68vh;
}
.telemetry-page {
  min-width: 0;
}
.telemetry-title-row {
  margin-bottom: 0;
}
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(91,107,120,.1);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .06em;
}
.live-indicator span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.live-indicator.live {
  color: var(--ok);
  background: rgba(42,143,82,.12);
}
.live-indicator.connecting,
.live-indicator.reconnecting {
  color: var(--accent-2);
}
.live-indicator.live span,
.live-indicator.connecting span,
.live-indicator.reconnecting span {
  animation: telemetry-pulse 1.5s ease-in-out infinite;
}
@keyframes telemetry-pulse {
  50% { opacity: .28; transform: scale(.72); }
}
.telemetry-filter-panel {
  background:
    linear-gradient(135deg, rgba(13,143,135,.075), rgba(255,255,255,.76) 45%, rgba(240,139,57,.055)),
    var(--panel);
}
.telemetry-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}
.telemetry-filter-actions {
  margin-top: 16px;
  align-items: center;
}
.telemetry-live-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(13,143,135,.08);
}
.telemetry-total-cards {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) !important;
}
.telemetry-total-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
}
.telemetry-total-card::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  right: -35px;
  top: -35px;
  border-radius: 50%;
  background: rgba(13,143,135,.09);
}
.telemetry-total-card span {
  color: var(--muted);
}
.telemetry-total-card strong {
  display: block;
  margin-top: 14px;
  font-size: 34px;
}
.telemetry-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr);
  gap: 18px;
}
.telemetry-main-chart {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13,143,135,.12), rgba(13,143,135,.015)),
    linear-gradient(90deg, rgba(27,35,43,.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27,35,43,.05) 1px, transparent 1px);
  background-size: auto, 10% 100%, 100% 25%;
  border: 1px solid rgba(27,35,43,.08);
}
.telemetry-main-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.telemetry-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.event-bars {
  display: grid;
  gap: 8px;
}
.event-type-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.event-type-pager {
  justify-content: space-between;
  margin-top: 14px;
}
.localization-file-button {
  cursor: pointer;
}
.localization-file-button input[type="file"] {
  display: none;
}
.event-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 7px 12px;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid rgba(27,35,43,.07);
  background: transparent;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.event-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-bar-track {
  grid-column: 1 / -1;
  display: block;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(27,35,43,.06);
}
.event-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
@media (max-width: 720px) {
  .event-type-tools { grid-template-columns: 1fr; }
  .event-type-pager { align-items: stretch; flex-direction: column; }
}
.active-match-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.active-match-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(13,143,135,.16);
  border-radius: 16px;
  background: rgba(13,143,135,.06);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.active-match-card span {
  color: var(--muted);
  font-size: 12px;
}
.telemetry-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.telemetry-metric-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(27,35,43,.08);
}
.telemetry-metric-card > span,
.telemetry-metric-card small {
  color: var(--muted);
}
.telemetry-metric-card > strong {
  font-size: 26px;
}
.telemetry-quantiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.telemetry-quantiles b {
  padding: 7px 4px;
  border-radius: 9px;
  background: rgba(13,143,135,.07);
  font-size: 11px;
  text-align: center;
}
.telemetry-events-panel,
.telemetry-events-table {
  min-width: 0;
}
.telemetry-events-table {
  table-layout: fixed;
  width: 100%;
}
.telemetry-events-table th:nth-child(1) { width: 150px; }
.telemetry-events-table th:nth-child(2) { width: 190px; }
.telemetry-events-table th:nth-child(3) { width: 150px; }
.telemetry-events-table th:nth-child(4) { width: 150px; }
.telemetry-events-table th:nth-child(5) { width: 100px; }
.telemetry-events-table td {
  overflow-wrap: anywhere;
}
.telemetry-event-json {
  max-width: 460px;
  max-height: 260px;
  font-size: 11px;
}
.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--panel-border); }
  .two-col { grid-template-columns: 1fr; }
  .catalog-filter-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; }
  .modal-xl { width: 100%; }
  .nested-grid { grid-template-columns: 1fr; }
  .add-field-row { grid-template-columns: 1fr; }
  .telemetry-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telemetry-total-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .telemetry-charts-grid { grid-template-columns: 1fr; }
  .telemetry-events-table { min-width: 820px; }
}
@media (max-width: 600px) {
  .telemetry-filter-grid { grid-template-columns: 1fr; }
  .telemetry-total-cards { grid-template-columns: 1fr !important; }
  .telemetry-quantiles { grid-template-columns: 1fr; }
}
.help-card .code {
  white-space: pre-wrap;
  word-break: break-word;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.help-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.help-doc-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(27,35,43,0.08);
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  cursor: pointer;
  transition: 0.2s ease;
}
.help-doc-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.help-doc-card.active,
.help-doc-card:hover {
  border-color: rgba(13,143,135,0.28);
  background: linear-gradient(135deg, rgba(13,143,135,0.12), rgba(240,139,57,0.08));
  transform: translateY(-1px);
}
.help-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(27,35,43,0.08);
}
.help-doc-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid rgba(27,35,43,0.1);
  border-radius: 22px;
  background: white;
}
@media (max-width: 720px) {
  .help-viewer-toolbar { align-items: flex-start; flex-direction: column; }
  .help-doc-frame { min-height: 65vh; }
}
.game-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.game-mode-card {
  padding: 18px;
  border: 1px solid rgba(27,35,43,0.08);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(245,247,240,0.74));
  box-shadow: 0 14px 34px rgba(27,35,43,0.06);
}
.game-mode-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.game-mode-head strong {
  font-size: 18px;
  letter-spacing: 0.01em;
}
.game-mode-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.code-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  min-height: 420px;
}
@media (max-width: 720px) {
  .game-mode-grid { grid-template-columns: 1fr; }
  .game-mode-fields { grid-template-columns: 1fr; }
}

/* Online operations and product analytics */
.analytics-page { min-width: 0; }
.analytics-title-row { margin-bottom: 0; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
}
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 12px;
}
.ops-kpi {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 35px rgba(17,28,39,.055);
}
.ops-kpi::after {
  content: '';
  position: absolute;
  right: -28px;
  top: -32px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(13,143,135,.08);
}
.ops-kpi.primary {
  color: #f8fffd;
  border-color: transparent;
  background: linear-gradient(140deg, #08776f, #0d9b91 70%, #55b7a5);
}
.ops-kpi.primary span,
.ops-kpi.primary small { color: rgba(255,255,255,.78); }
.ops-kpi.latency { background: linear-gradient(145deg, rgba(229,241,255,.94), rgba(255,255,255,.92)); }
.ops-kpi.warning { border-color: rgba(196,71,71,.28); background: linear-gradient(145deg, rgba(255,240,235,.96), rgba(255,255,255,.9)); }
.ops-kpi span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ops-kpi strong { font-size: 32px; line-height: 1; }
.ops-kpi small { color: var(--muted); line-height: 1.35; }
.analytics-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.analytics-chart-card { min-width: 0; }
.chart-card-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.chart-card-head span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.chart-card-head h3 { margin: 4px 0 0; font-size: 21px; }
.chart-card-head > strong { font-size: 25px; }
.analytics-chart {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(13,143,135,.1), rgba(13,143,135,.01)),
    linear-gradient(90deg, rgba(27,35,43,.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27,35,43,.05) 1px, transparent 1px);
  background-size: auto, 10% 100%, 100% 25%;
  border: 1px solid rgba(27,35,43,.07);
}
.analytics-line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.players-line { stroke: var(--accent); }
.rtt-line { stroke: #2d5bff; }
.installs-line { stroke: #dd7c27; }
.active-users-line { stroke: #08776f; }
.axis-chart-shell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: 180px 34px;
  column-gap: 9px;
  margin: 10px 0 2px;
  min-width: 0;
}
.chart-y-axis {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1px 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chart-y-axis strong {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-18px);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.axis-chart-shell > svg {
  grid-column: 2;
  grid-row: 1;
  border-left: 1px solid rgba(27,35,43,.2);
  border-bottom: 1px solid rgba(27,35,43,.2);
}
.chart-x-axis {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.chart-x-axis span:last-child { text-align: right; }
.chart-x-axis strong { color: var(--ink); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.telemetry-axis-chart { grid-template-rows: 220px 34px; }
.online-player-table th,
.online-player-table td { white-space: nowrap; }
.presence-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(91,107,120,.1);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.presence-status.in_match { color: #08776f; background: rgba(13,143,135,.12); }
.presence-status.searching { color: #a65a1e; background: rgba(240,139,57,.14); }
.presence-status.in_lobby { color: #3057bd; background: rgba(45,91,255,.1); }
.error-count { display: inline-grid; min-width: 30px; height: 30px; place-items: center; border-radius: 10px; background: rgba(42,143,82,.1); color: var(--ok); font-weight: 800; }
.error-count.hot { color: var(--danger); background: rgba(196,71,71,.12); }
.analytics-filter-panel {
  background: linear-gradient(135deg, rgba(13,143,135,.075), rgba(255,255,255,.8) 48%, rgba(240,139,57,.06));
}
.analytics-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.analytics-two-column { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.4fr); gap: 18px; }
.funnel-list { display: grid; gap: 15px; }
.funnel-row { display: grid; gap: 8px; }
.funnel-label { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; }
.funnel-label > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: rgba(13,143,135,.1); font-weight: 800; font-size: 11px; }
.funnel-label small { color: var(--muted); }
.funnel-track { height: 36px; overflow: hidden; border-radius: 12px; background: rgba(27,35,43,.055); }
.funnel-track > div { height: 100%; min-width: 58px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 11px; border-radius: inherit; color: white; background: linear-gradient(90deg, #08776f, #35a494); transition: width .35s ease; }
.funnel-track span { font-size: 11px; opacity: .82; }
.funnel-builder-panel { overflow: hidden; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,247,246,.82)); }
.funnel-builder-header { align-items: flex-start; }
.funnel-config-row { display: grid; grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) minmax(260px, 1fr); gap: 12px; align-items: end; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.72); border: 1px solid rgba(27,35,43,.07); }
.funnel-scope-note { min-height: 42px; display: flex; flex-direction: column; justify-content: center; gap: 3px; color: var(--muted); }
.funnel-scope-note span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.funnel-scope-note strong { color: var(--ink); font-size: 12px; }
.funnel-step-builder { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; padding: 16px 2px 9px; scrollbar-width: thin; }
.funnel-step-card { flex: 1 0 210px; min-width: 210px; padding: 11px; border-radius: 15px; background: white; border: 1px solid rgba(27,35,43,.1); box-shadow: 0 8px 24px rgba(27,35,43,.045); }
.funnel-step-card-head { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 7px; margin-bottom: 9px; }
.funnel-step-card-head > span,
.funnel-table-step { width: 25px; height: 25px; display: inline-grid; place-items: center; border-radius: 8px; color: white; background: var(--accent); font-size: 11px; font-weight: 800; }
.funnel-step-card-head strong { font-size: 12px; }
.funnel-step-actions { display: flex; gap: 3px; }
.funnel-step-actions button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: rgba(27,35,43,.055); cursor: pointer; }
.funnel-step-actions button:hover:not(:disabled) { color: var(--accent); background: rgba(13,143,135,.12); }
.funnel-step-actions button:disabled { opacity: .28; cursor: default; }
.funnel-event-select { width: 100%; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.funnel-add-step { flex: 0 0 112px; min-height: 85px; border: 1px dashed rgba(13,143,135,.38); border-radius: 15px; color: var(--accent); background: rgba(13,143,135,.045); font-weight: 800; cursor: pointer; }
.funnel-add-step:disabled { opacity: .4; cursor: default; }
.funnel-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.funnel-summary-card { position: relative; min-width: 0; padding: 16px 17px; border-radius: 15px; background: white; border: 1px solid rgba(27,35,43,.075); overflow: hidden; }
.funnel-summary-card::after { content: ''; position: absolute; inset: auto -24px -35px auto; width: 90px; height: 90px; border-radius: 50%; background: rgba(13,143,135,.08); }
.funnel-summary-card.danger::after { background: rgba(196,71,71,.09); }
.funnel-summary-card > span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.funnel-summary-card > strong { display: block; margin: 7px 0 4px; color: var(--accent); font-size: 27px; }
.funnel-summary-card.danger > strong { color: var(--danger); }
.funnel-summary-card small { color: var(--muted); }
.funnel-visual-panel { padding: 17px; border-radius: 17px; background: white; border: 1px solid rgba(27,35,43,.075); overflow-x: auto; }
.funnel-visual-head > div { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.funnel-visual-head strong { color: var(--ink); font-size: 14px; }
.funnel-columns { min-width: 720px; height: 285px; display: flex; align-items: stretch; gap: 9px; padding-top: 23px; }
.funnel-column-cell { flex: 1 1 0; min-width: 105px; display: grid; grid-template-rows: 36px minmax(0, 1fr) 40px; }
.funnel-column-meta { display: flex; flex-direction: column; align-items: center; font-size: 11px; }
.funnel-column-meta strong { color: var(--accent); }
.funnel-column-meta span { color: var(--ink); font-weight: 700; }
.funnel-column-shell { display: flex; align-items: flex-end; padding: 0 7%; border-bottom: 1px solid rgba(27,35,43,.14); }
.funnel-column { width: 100%; min-height: 16px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #6b8f89, #0d8f87); box-shadow: 0 8px 18px rgba(13,143,135,.12); transition: height .35s ease; }
.funnel-column-label { display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 5px; align-items: center; padding-top: 8px; }
.funnel-column-label span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; background: rgba(13,143,135,.1); color: var(--accent); font-size: 9px; font-weight: 800; }
.funnel-column-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; text-align: center; }
.funnel-drop-connector { flex: 0 0 74px; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--danger); font-size: 10px; font-weight: 800; transform: translateY(-4px); }
.funnel-drop-connector::before { content: '→'; color: rgba(27,35,43,.28); font-size: 19px; }
.funnel-drop-connector small { color: var(--muted); font-weight: 600; }
.funnel-data-table { margin-top: 14px; }
.funnel-data-table table { min-width: 820px; }
.conversion-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--accent); background: rgba(13,143,135,.1); font-weight: 800; }
.dropoff-hot { color: var(--danger); font-weight: 800; }
.breakdown-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.breakdown-group { min-width: 0; padding: 13px; border-radius: 17px; background: rgba(255,255,255,.62); border: 1px solid rgba(27,35,43,.065); }
.breakdown-group h3 { margin: 0 0 8px; text-transform: capitalize; }
.breakdown-row { display: grid; grid-template-columns: minmax(80px, 1fr) auto; gap: 3px 10px; padding: 8px 0; border-top: 1px solid rgba(27,35,43,.06); }
.breakdown-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breakdown-row span { color: var(--muted); }
.breakdown-row small { grid-column: 1 / -1; color: var(--muted); }

.retention-production-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: #08776f;
  background: rgba(13,143,135,.1);
  border: 1px solid rgba(13,143,135,.2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.retention-filter-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.retention-cohort-panel { min-width: 0; overflow: hidden; }
.retention-table-wrap { max-width: 100%; overflow-x: auto; }
.retention-table { min-width: 780px; table-layout: fixed; }
.retention-table th:first-child,
.retention-table td:first-child { width: 126px; }
.retention-table th:nth-child(2),
.retention-table td:nth-child(2) { width: 118px; }
.retention-table th:not(:first-child),
.retention-table td:not(:first-child) { text-align: center; }
.retention-cell {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  border-radius: 11px;
  font-variant-numeric: tabular-nums;
}
.retention-cell strong { font-size: 15px; }
.retention-cell small { color: inherit; opacity: .72; font-size: 10px; }
.retention-pending { color: var(--muted); }

@media (max-width: 1420px) {
  .ops-kpi-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
}
@media (max-width: 1040px) {
  .analytics-two-column { grid-template-columns: 1fr; }
  .analytics-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
	.retention-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .funnel-config-row { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .funnel-scope-note { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .ops-kpi-grid,
  .analytics-chart-grid,
  .breakdown-grid,
  .analytics-filter-grid { grid-template-columns: 1fr; }
	.retention-filter-grid { grid-template-columns: 1fr; }
  .analytics-title-row { align-items: flex-start; flex-direction: column; }
  .axis-chart-shell { grid-template-columns: 42px minmax(0, 1fr); }
  .chart-x-axis { grid-template-columns: 1fr 1fr; }
  .chart-x-axis strong { display: none; }
  .funnel-label { grid-template-columns: 28px 1fr; }
  .funnel-label small { grid-column: 2; }
  .funnel-config-row,
  .funnel-summary-grid { grid-template-columns: 1fr; }
  .funnel-scope-note { grid-column: auto; }
  .funnel-visual-panel { overflow-x: auto; }
}

.account-console { min-width: 0; }
.account-console code, .account-console small { overflow-wrap: anywhere; }
.account-console details { min-width: 0; padding: 12px 0; border-top: 1px solid var(--panel-border); }
.account-console summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }

.player-economy-panel { grid-column: 1 / -1; min-width: 0; }

.player-inspection > .panel { min-width: 0; }
.player-inspection .toolbar { flex-wrap: wrap; }
.player-inspection .toolbar .input { min-width: 0; flex: 1 1 200px; max-width: 100%; }
@media (max-width: 720px) {
  .account-console .header { flex-direction: column; align-items: flex-start; }
}

.shop-price-console { min-width: 0; max-width: 100%; }
.shop-price-console .header { flex-wrap: wrap; }
.shop-price-console .header > div { flex: 1 1 16rem; min-width: 0; }
.shop-price-console .form-grid > label { min-width: 0; }
.shop-price-console .muted { overflow-wrap: anywhere; }

.admin-support, .admin-support > .panel { min-width: 0; max-width: 100%; }

/* Read-only Billing attention uses the existing panel/table visual language. */
.billing-console { min-width: 0; }
.billing-console .error { color: #a33131; }
.billing-console .metric-cards { margin: 18px 0; }
.billing-attention-table { min-width: 940px; }
.billing-attention-table code { overflow-wrap: anywhere; }

.player-delete-dialog { width: min(1050px, 94vw); max-height: 88vh; color: var(--ink); }
.player-delete-dialog::backdrop { background: rgba(18,24,30,.55); backdrop-filter: blur(8px); }
.player-delete-dialog code { overflow-wrap: anywhere; }
