/* admin console: same night, denser */
.adm-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; min-height: 52px; padding: 8px var(--site-header-gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
.adm-top .grow { flex: 1; }
.adm-tabs { display: flex; gap: 2px; margin-left: 0; }
.adm-tabs a { border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.adm-tabs a:hover { color: var(--ink); }
.adm-tabs a.on { color: var(--ink); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.privacy-pill { font-size: 12px; }
.code-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.code-list li { gap: 8px; }
.adm { width: min(1320px, 100%); margin: 0 auto; padding: 28px 24px 80px; }
.adm h1 { font-size: 34px; line-height: 1.05; }
.adm .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.adm .head p { margin: 8px 0 0; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 22px; }
.tile { padding: 18px 20px; border-left: 1px solid var(--line-2); }
.tile:first-child { border-left: 0; }
.tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tiles.six .tile:nth-child(n) { border-top: 0; }
.tile .k { font: 500 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile .v { margin-top: 12px; font: 500 30px/1 var(--ui); font-variation-settings: "opsz" 32; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tile .s { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.tile.alert { background: rgba(255, 106, 92, .08); }
.tile.alert .v { color: var(--bad); }
.tile.warn { background: var(--ember-bg); }
.tile.warn .v { color: var(--ember); }
.tile.good .v { color: var(--ok); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
.card { min-width: 0; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--bg-2); padding: 20px; margin-bottom: 22px; }
.card > h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; font-size: 17px; letter-spacing: -0.02em; }
.card > h3 .actions { display: flex; gap: 6px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .input { width: 280px; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.toolbar select.input { width: auto; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--radius-md); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line-2); text-align: left; font: 500 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--bg-2); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .empty { padding: 28px 12px; text-align: center; color: var(--faint); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* charts */
.chart { position: relative; height: auto; padding: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg .grid { position: static; display: inline; }
.chart .tip { display: block; transform: none; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--faint); font: 400 11px var(--ui); font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; }
.chart .hit:hover, .chart .hit:focus { fill: rgba(250, 248, 246, .05); outline: none; }
.legend { display: flex; gap: 16px; margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px; background: var(--bg-4); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 12.5px; }
.tip .d { margin-bottom: 6px; color: var(--muted); }
.tip .row { display: flex; align-items: center; gap: 8px; }
.tip .row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip .row i { width: 12px; height: 2px; }
.tip .row span { color: var(--muted); }

.drawer .kv > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; }
.drawer .kv dt { margin: 0; }
.mini-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.mini-actions .card { margin: 0; padding: 14px; }
.mini-actions h4 { margin: 0 0 10px; font-size: 13px; font-weight: 500; }
.mini-actions .input { min-height: 36px; padding: 6px 10px; font-size: 14px; margin-bottom: 8px; }

.howto ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.howto li { margin: 6px 0; }
.howto b { color: var(--ink); font-weight: 500; }

@media (max-width: 1000px) {
  .tiles, .tiles.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { border-left: 0; border-top: 1px solid var(--line-2); }
  .tile:nth-child(-n+2) { border-top: 0; }
  .tile:nth-child(even) { border-left: 1px solid var(--line-2); }
  .tiles.six .tile:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .grid2 { grid-template-columns: 1fr; }
  .privacy-pill { display: none; }
  .mini-actions { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .adm-top { padding: 8px var(--site-header-gutter); }
  .adm-tabs { order: 5; width: 100%; margin: 0; overflow-x: auto; }
  .adm { padding: 20px 16px 60px; }
}
