:root {
  color-scheme: dark;
  --ink: #f5f7ef;
  --muted: #979d94;
  --ground: #0b0d0c;
  --panel: #121512;
  --line: #343a34;
  --acid: #ffe84a;
  --pink: #ff5f8f;
  --cyan: #4be6ff;
  --black: #0b0d0c;
  font-family: "Space Grotesk", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --ink: #11130f;
  --muted: #666c62;
  --ground: #f4f6ef;
  --panel: #ffffff;
  --line: #c5cbc0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--ground); color: var(--ink); }
a { color: inherit; }
button { font: inherit; }

.admin-bar {
  height: 66px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--ground) 94%, transparent);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}
.admin-brand { text-decoration: none; font: 34px/1 "Archivo Black", sans-serif; }
.admin-brand span { color: var(--acid); }
.admin-bar > div { display: flex; align-items: center; gap: 14px; }
.admin-state { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; }
.admin-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); }
.admin-state.online i { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.back-link { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); text-decoration: none; font-size: 20px; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 58px 0 90px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.admin-heading p { margin: 0 0 8px; color: var(--cyan); font: 700 11px/1 "Space Grotesk", sans-serif; }
h1 { margin: 0; font: clamp(42px, 7vw, 82px)/.92 "Archivo Black", sans-serif; }
.admin-heading button { border: 2px solid var(--ink); background: var(--acid); color: var(--black); padding: 11px 15px; font-weight: 800; cursor: pointer; box-shadow: 5px 5px 0 var(--pink); }
.admin-heading button:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--pink); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.metrics > div { min-height: 176px; padding: 26px clamp(18px, 3vw, 34px); display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.metrics > div:last-child { border-right: 0; }
.metrics small, .metrics span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metrics strong { margin: auto 0 6px; font: clamp(38px, 5vw, 66px)/1 "Archivo Black", sans-serif; }
.metrics > div:nth-child(1) strong { color: var(--cyan); }
.metrics > div:nth-child(2) strong { color: var(--acid); }
.metrics > div:nth-child(3) strong { color: var(--pink); }

.activity-band, .data-section { margin-top: 56px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-title h2 { margin: 0; font: 26px/1 "Archivo Black", sans-serif; }
.section-title span { color: var(--muted); font-size: 10px; font-weight: 700; }
.event-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: 1px solid var(--line); }
.event-bar { min-height: 104px; padding: 18px; border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.event-bar:last-child { border-right: 0; }
.event-bar i { position: absolute; inset: auto 0 0; height: var(--height); background: color-mix(in srgb, var(--cyan) 16%, transparent); }
.event-bar strong, .event-bar span { position: relative; z-index: 1; display: block; }
.event-bar strong { font: 26px/1 "Archivo Black", sans-serif; }
.event-bar span { margin-top: 9px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }

.table-scroll { overflow-x: auto; border-block: 1px solid var(--line); }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 12px; color: var(--muted); text-align: left; font-size: 10px; }
td { padding: 14px 12px; border-top: 1px solid var(--line); }
td:first-child { font-weight: 800; }
.owner-cell strong, .owner-cell span { display: block; }
.owner-cell span { color: var(--muted); margin-top: 3px; font-size: 11px; }
.status { display: inline-block; padding: 4px 7px; border: 1px solid var(--line); font-size: 9px; font-weight: 800; }
.status.live { color: var(--black); background: var(--acid); border-color: var(--acid); }
.status.deleted, .status.suspended { color: var(--pink); }

.traffic-note { margin-top: 52px; border-left: 5px solid var(--cyan); padding: 10px 0 10px 18px; max-width: 760px; }
.traffic-note strong { font: 17px/1 "Archivo Black", sans-serif; }
.traffic-note p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.traffic-note code { color: var(--ink); }
.admin-error { position: fixed; inset: auto 18px 18px; margin: 0; padding: 14px; background: var(--pink); color: #0b0d0c; font-weight: 800; }

@media (max-width: 720px) {
  main { padding-top: 38px; }
  .admin-heading { align-items: flex-start; }
  .admin-heading button { padding: 9px; }
  .admin-heading button span { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics > div:last-child { border-bottom: 0; }
  .event-bars { grid-template-columns: 1fr 1fr; }
  .event-bar:nth-child(2n) { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
