:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-alt: #f1f3f9;
  --border: #e4e7ef;
  --text: #171a21;
  --text-muted: #5b6475;
  --brand: #5b5bd6;
  --brand-strong: #4846c4;
  --brand-contrast: #ffffff;
  --accent: #0ea47a;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --ok: #027a48;
  --ok-bg: #ecfdf3;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --code-bg: #0f1221;
  --code-text: #e7e9f5;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px -12px rgba(16, 24, 40, .18);
  --glass-bg: rgba(255, 255, 255, .62);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-hi: rgba(255, 255, 255, .9);
  --hairline: rgba(16, 24, 40, .08);
  --glow-brand: rgba(91, 91, 214, .28);
  --glow-accent: rgba(14, 164, 122, .22);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .05), 0 32px 60px -24px rgba(16, 24, 40, .28);
  --shadow-glow: 0 18px 46px -16px var(--glow-brand);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --maxw: 1120px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #0b0d14;
    --surface: #141722;
    --surface-alt: #1a1e2b;
    --border: #262b3a;
    --text: #eceef5;
    --text-muted: #9aa3b6;
    --brand: #8b8bf0;
    --brand-strong: #7b7bec;
    --brand-contrast: #0b0d14;
    --accent: #2dd4a7;
    --danger: #ffb4ab;
    --danger-bg: #2a1512;
    --ok: #7ee3c0;
    --ok-bg: #0f2a20;
    --warn: #fcd9a8;
    --warn-bg: #2a1f0f;
    --code-bg: #0a0c15;
    --code-text: #e7e9f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .6);
    --glass-bg: rgba(20, 23, 34, .5);
    --glass-border: rgba(255, 255, 255, .08);
    --glass-hi: rgba(255, 255, 255, .14);
    --hairline: rgba(255, 255, 255, .08);
    --glow-brand: rgba(139, 139, 240, .32);
    --glow-accent: rgba(45, 212, 167, .22);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 40px 70px -28px rgba(0, 0, 0, .7);
    --shadow-glow: 0 22px 54px -18px var(--glow-brand);
  }
}
:root[data-theme=dark] {
  --bg: #0b0d14;
  --surface: #141722;
  --surface-alt: #1a1e2b;
  --border: #262b3a;
  --text: #eceef5;
  --text-muted: #9aa3b6;
  --brand: #8b8bf0;
  --brand-strong: #7b7bec;
  --brand-contrast: #0b0d14;
  --accent: #2dd4a7;
  --danger: #ffb4ab;
  --danger-bg: #2a1512;
  --ok: #7ee3c0;
  --ok-bg: #0f2a20;
  --warn: #fcd9a8;
  --warn-bg: #2a1f0f;
  --code-bg: #0a0c15;
  --code-text: #e7e9f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .6);
  --glass-bg: rgba(20, 23, 34, .5);
  --glass-border: rgba(255, 255, 255, .08);
  --glass-hi: rgba(255, 255, 255, .14);
  --hairline: rgba(255, 255, 255, .08);
  --glow-brand: rgba(139, 139, 240, .32);
  --glow-accent: rgba(45, 212, 167, .22);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 40px 70px -28px rgba(0, 0, 0, .7);
  --shadow-glow: 0 22px 54px -18px var(--glow-brand);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(820px 560px at 8% -6%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 62%), radial-gradient(720px 500px at 102% 2%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 64%), radial-gradient(680px 560px at 54% 112%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 66%);
  opacity: 0.9;
  animation: aurora-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, 1.5%, 0) scale(1.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 3px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  color: var(--brand-strong);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-feature-settings: "ss01" 1;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  font-size: 1.1rem;
  margin-top: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 36px auto;
  padding: 0 var(--gutter);
  flex: 1 0 auto;
}

.container-wide {
  max-width: 1520px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px var(--glow-brand);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 11;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 56px;
}
.site-header form {
  margin: 0;
}

.header-utils {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-subnav {
  position: sticky;
  top: 56px;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-subnav .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 46px;
}
.site-subnav .subnav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-subnav .subnav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.14s ease, background-color 0.14s ease;
}
.site-subnav .subnav-links a:hover {
  color: var(--brand);
  background: var(--surface-alt);
}
.site-subnav .subnav-links a.active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.site-subnav form {
  margin: 0;
}

.site-switcher {
  position: relative;
  flex-shrink: 0;
}
.site-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 250px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.site-switcher summary::-webkit-details-marker {
  display: none;
}
.site-switcher summary:hover {
  border-color: var(--brand);
}
.site-switcher summary .site-switcher-mark {
  color: var(--text-muted);
  flex-shrink: 0;
}
.site-switcher summary .site-switcher-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-switcher summary.is-scoped {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  color: var(--brand);
}
.site-switcher summary.is-scoped .site-switcher-mark {
  color: var(--brand);
}
.site-switcher summary > .icon:last-child {
  transition: transform 0.15s ease;
}
.site-switcher[open] summary > .icon:last-child {
  transform: rotate(180deg);
}

.site-switcher-scope {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  padding: 2px 6px;
  border-radius: 5px;
}

.site-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 234px;
  max-height: 70vh;
  overflow: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-switcher-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.site-switcher-menu a:hover, .site-switcher-menu a.active {
  background: var(--surface-alt);
  color: var(--brand);
}
.site-switcher-menu .site-switcher-all {
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  white-space: nowrap;
  text-decoration: none;
  background: var(--brand);
  color: var(--brand-contrast);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 22px -12px var(--glow-brand);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -12px var(--glow-brand);
  color: var(--brand-contrast);
}
.btn-block {
  display: flex;
  width: 100%;
  padding: 11px 15px;
  font-size: 14px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: var(--brand-contrast);
  box-shadow: 0 8px 22px -12px var(--glow-brand);
}
.btn-primary:hover {
  box-shadow: 0 14px 32px -12px var(--glow-brand);
}
.btn-ghost {
  background: var(--glass-bg);
  color: var(--text);
  border-color: var(--glass-border);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: none;
}
.btn-light {
  background: var(--surface-alt);
  color: var(--brand);
  box-shadow: none;
}
.btn-light:hover {
  background: var(--surface-alt);
  color: var(--brand-strong);
  box-shadow: none;
}
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  box-shadow: none;
}
.btn-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
  box-shadow: none;
}
.btn-sm {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.row-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.row-link:hover {
  color: var(--brand);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.addsite-details {
  margin: 18px 0 8px;
}
.addsite-details summary {
  display: inline-flex;
  list-style: none;
}
.addsite-details summary::-webkit-details-marker {
  display: none;
}
.addsite-details .card-form {
  margin-top: 16px;
  max-width: 520px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.theme-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
}
.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .theme-toggle .icon-moon {
    display: none;
  }
  :root:not([data-theme=light]) .theme-toggle .icon-sun {
    display: inline;
  }
}
:root[data-theme=dark] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme=dark] .theme-toggle .icon-sun {
  display: inline;
}

:root[data-theme=light] .theme-toggle .icon-moon {
  display: inline;
}

:root[data-theme=light] .theme-toggle .icon-sun {
  display: none;
}

.card {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 10%, transparent), transparent 120px), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  margin-top: 16px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-form {
  max-width: 460px;
}

.kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.kpi {
  position: relative;
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-hi) 10%, transparent), transparent 90px), var(--surface);
  box-shadow: var(--shadow-lg);
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.03em;
}
.kpi-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.kpi-delta {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
}
.kpi-delta.is-up {
  background: var(--ok-bg);
  color: var(--ok);
}
.kpi-delta.is-down {
  background: var(--danger-bg);
  color: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table th {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 9px 10px;
  color: var(--text-muted);
  font-weight: 600;
}
table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--surface-alt);
}
table tbody tr {
  transition: background-color 0.12s ease;
}
table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-alt) 55%, transparent);
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.checkbox-row input {
  width: auto;
}

.section-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px 10px;
  margin-top: 14px;
}

.section-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.section-toggle:hover {
  background: var(--surface-alt);
}
.section-toggle input {
  width: auto;
  margin: 2px 0 0;
}

.section-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.section-events {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.section-events code {
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 5px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border-radius: 4px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 16px;
}
.setting-row p {
  margin: 0;
  flex: 1;
}
.setting-row form {
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .setting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge-brand {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.icon-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.icon-btn.is-danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.row-menu {
  position: relative;
}
.row-menu summary {
  list-style: none;
}
.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 212px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: pop-in 0.13s ease;
}
.row-menu-pop form {
  margin: 0;
}

.row-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.row-menu-item:hover {
  background: var(--surface-alt);
  color: var(--brand);
}
.row-menu-item.is-danger {
  color: var(--danger);
}
.row-menu-item.is-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.row-menu-sep {
  height: 1px;
  margin: 4px 2px;
  background: var(--border);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.lang-switch {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch a {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.lang-switch a:hover {
  color: var(--brand);
}
.lang-switch a.active {
  background: var(--brand);
  color: var(--brand-contrast);
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

.status {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 13px;
}

.warn, .errors {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}

.errors ul {
  margin: 0;
  padding-left: 18px;
}

.actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
}

code {
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 12px;
  padding: 16px 18px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
}
.auth-form {
  width: 100%;
  max-width: 420px;
}
.auth-form h1 {
  margin: 0 0 6px;
}
.auth-form .sub {
  color: var(--text-muted);
  margin: 0 0 8px;
}
.auth-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.auth-form-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-feature-side {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(120deg, var(--brand), var(--accent), var(--brand));
  background-size: 220% 220%;
  animation: auth-flow 15s ease-in-out infinite;
  color: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-feature-side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(520px 420px at 82% 8%, rgba(255, 255, 255, 0.22), transparent 60%), radial-gradient(560px 460px at 0% 100%, rgba(0, 0, 0, 0.18), transparent 62%);
}
.auth-feature-side::after {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(40% 40% at 50% 50%, rgba(255, 255, 255, 0.16), transparent 70%);
  animation: auth-shine 11s ease-in-out infinite alternate;
}
.auth-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.auth-particles canvas {
  display: block;
}
.auth-feature-side .brand {
  color: #fff;
  margin-bottom: 36px;
}
.auth-feature-side h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.auth-feature-side p.lede {
  font-size: 1.05rem;
  opacity: 0.92;
  margin: 0 0 30px;
  max-width: 42ch;
}

.auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.auth-points .check {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-points strong {
  display: block;
  font-weight: 700;
}
.auth-points .on-brand {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .input-group-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-group input {
  padding-left: 38px;
}
.input-group input[type=password],
.input-group input[type=text] {
  padding-right: 44px;
}

.input-group-reveal {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.14s ease, background-color 0.14s ease;
}
.input-group-reveal:hover {
  color: var(--text);
  background: var(--surface-alt);
}
.input-group-reveal .icon-eye-off {
  display: none;
}
.input-group-reveal.is-revealed .icon-eye {
  display: none;
}
.input-group-reveal.is-revealed .icon-eye-off {
  display: inline;
}

.auth-alt {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
.auth-alt a {
  font-weight: 600;
}

.auth-proof {
  margin: 4px 0 34px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  max-width: 320px;
}
.auth-proof .auth-proof-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.auth-proof .auth-proof-metric {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 10px;
}
.auth-proof .auth-proof-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: "tnum" 1;
}
.auth-proof .auth-proof-label {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

.auth-spark {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  overflow: visible;
}

.auth-spark-line {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: auth-spark-draw 1.8s ease-out forwards;
}

@keyframes auth-spark-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes auth-flow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes auth-shine {
  0% {
    transform: translate(-15%, -12%);
  }
  100% {
    transform: translate(15%, 13%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-feature-side,
  .auth-feature-side::after,
  .auth-spark-line {
    animation: none;
  }
  .auth-spark-line {
    stroke-dashoffset: 0;
  }
}
@media (max-width: 860px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-feature-side {
    display: none;
  }
}
html {
  scroll-behavior: smooth;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--brand);
}
.breadcrumb .breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}
.breadcrumb .breadcrumb-current {
  color: var(--text);
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.report-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}
.live-pill.is-idle {
  background: var(--surface-alt);
  color: var(--text-muted);
}
.live-pill.is-idle .live-dot {
  animation: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent);
  animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent);
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
.install-card {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}
.install-card pre {
  margin-bottom: 14px;
}

.sonar {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.sonar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sonar-head .icon {
  color: var(--brand);
}
.sonar-head .sonar-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sonar-head .muted {
  font-size: 13px;
}

.sonar-signals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}

.sonar-signal {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.sonar-signal .icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.sonar-signal strong {
  display: block;
  font-size: 14px;
}
.sonar-signal span {
  font-size: 13px;
  color: var(--text-muted);
}
.sonar-signal.is-alert {
  background: var(--danger-bg);
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
}
.sonar-signal.is-alert .icon, .sonar-signal.is-alert strong {
  color: var(--danger);
}
.sonar-signal.is-warn {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--border));
}
.sonar-signal.is-warn .icon, .sonar-signal.is-warn strong {
  color: var(--warn);
}
.sonar-signal.is-info {
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 30%, var(--border));
}
.sonar-signal.is-info .icon, .sonar-signal.is-info strong {
  color: var(--ok);
}

.sec-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-picker {
  position: relative;
}
.kpi-picker summary {
  list-style: none;
}
.kpi-picker summary::-webkit-details-marker {
  display: none;
}

.kpi-picker-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 210px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-picker-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 2px 8px 6px;
}

.kpi-picker-item {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.kpi-picker-item:hover {
  background: var(--surface-alt);
}
.kpi-picker-item input {
  width: auto;
  margin: 0;
}

.kpi.is-hidden {
  display: none;
}

.report-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) 232px;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

.report-filters {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.report-filters .filters {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.report-filters .filter-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.report-filters .seg {
  width: 100%;
}
.report-filters .filter-dropdown {
  padding: 8px 10px;
  font-size: 13.5px;
}

.report-filters-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 1180px) {
  .report-layout {
    grid-template-columns: 176px minmax(0, 1fr);
  }
  .report-filters {
    grid-column: 1/-1;
    order: -1;
    position: static;
    padding: 14px 16px;
    box-shadow: var(--shadow);
  }
  .report-filters .filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
  }
  .report-filters .filter-group {
    flex-direction: row;
    align-items: center;
  }
  .report-filters .seg {
    width: auto;
  }
  .report-filters .filter-dropdown {
    width: auto;
    min-width: 150px;
  }
  .report-filters-title {
    display: none;
  }
}
.report-nav {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-nav .nav-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.report-nav .nav-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 10px;
}
.report-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.report-nav a:hover {
  background: var(--surface-alt);
  color: var(--brand);
}
.report-nav a:hover .nav-grip {
  opacity: 0.9;
}
.report-nav a.active {
  background: var(--surface-alt);
  color: var(--brand);
}
.report-nav .nav-grip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: grab;
  color: var(--text-muted);
  opacity: 0;
  font-size: 13px;
  line-height: 1;
  transition: opacity 0.14s ease, color 0.14s ease;
}
.report-nav .nav-grip:hover {
  color: var(--brand);
  opacity: 1;
}
.report-nav .nav-grip:active {
  cursor: grabbing;
}
.report-nav .sortable-chosen .nav-grip {
  cursor: grabbing;
}

.report-main > section {
  scroll-margin-top: 112px;
}

.report-grid .card {
  scroll-margin-top: 112px;
}

@media (max-width: 860px) {
  .report-layout {
    grid-template-columns: 1fr;
  }
  .report-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .report-nav .nav-title {
    width: 100%;
  }
}
.range-picker {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.range-picker a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.range-picker a:hover {
  color: var(--brand);
}
.range-picker a.active {
  background: var(--brand);
  color: var(--brand-contrast);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.report-grid .card {
  margin-top: 0;
}
.report-grid .card-wide {
  grid-column: 1/-1;
}
.report-grid h2, .report-grid h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 15px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.seg a {
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
}
.seg a:first-child {
  border-left: 0;
}
.seg a:hover {
  color: var(--brand);
}
.seg a.active {
  background: var(--brand);
  color: var(--brand-contrast);
}

.filter-reset {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.product-search {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  max-width: 480px;
}
.product-search input {
  flex: 1;
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sec-head h2, .sec-head h3 {
  margin: 0;
}

.drag {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: grab;
  font-size: 16px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 6px;
  opacity: 0.45;
}
.drag:hover {
  opacity: 1;
  color: var(--brand);
  background: var(--surface-alt);
}
.drag:active {
  cursor: grabbing;
}

.sortable-ghost {
  opacity: 0.35;
}

.sortable-chosen {
  outline: 2px dashed var(--brand);
  outline-offset: 3px;
}

.hint {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 10px;
}

.chart {
  width: 100%;
  height: 300px;
}

.chart-expand {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}
.chart-expand:hover {
  opacity: 1;
  color: var(--brand);
  background: var(--surface-alt);
}

body.modal-open {
  overflow: hidden;
}

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, #0b0d14 58%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.chart-modal[hidden] {
  display: none;
}

.chart-modal-dialog {
  width: min(1040px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
}

.chart-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-modal-title {
  margin: 0;
  font-size: 18px;
}

.chart-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.chart-modal-close:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.chart-modal-chart {
  width: 100%;
}
.chart-modal-chart .chart {
  height: 60vh;
  max-height: 520px;
}

.chart-modal-table {
  margin-top: 20px;
  max-height: 360px;
  overflow: auto;
}
.chart-modal-table table {
  width: 100%;
}

.card-wide .chart {
  height: 340px;
}

@media (max-width: 760px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}
.hint-filter {
  color: var(--brand);
  font-weight: 600;
}

.page-path {
  font-size: 12px;
  word-break: break-all;
}

.col-rank {
  width: 1%;
  white-space: nowrap;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 14px;
}

.live-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.live-updated::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: live-pulse 2s ease-out infinite;
}
.live-updated.is-stale::before {
  background: var(--text-muted);
  animation: none;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stat-tile .stat-value {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: "tnum" 1;
}
.stat-tile .stat-label {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.stat-tile.is-accent {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
}
.stat-tile.is-accent .stat-value {
  color: var(--accent);
}

.live-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.card-head {
  margin-bottom: 14px;
}
.card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-head p {
  margin: 4px 0 0;
}

.live-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.live-side .card {
  margin-top: 0;
}

.live-feed-card {
  margin-top: 0;
}

.live-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 560px;
  overflow-y: auto;
}

.live-event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 6px;
  border-bottom: 1px solid var(--surface-alt);
}
.live-event:last-child {
  border-bottom: 0;
}
.live-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.live-event-body {
  min-width: 0;
}
.live-event-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}
.live-event-detail {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-event-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.live-event.is-page .live-event-dot {
  background: var(--text-muted);
}
.live-event.is-visit .live-event-dot {
  background: var(--brand);
}
.live-event.is-view .live-event-dot {
  background: var(--brand-strong);
}
.live-event.is-search .live-event-dot {
  background: var(--warn);
}
.live-event.is-cart .live-event-dot {
  background: var(--accent);
}
.live-event.is-checkout .live-event-dot {
  background: var(--warn);
}
.live-event.is-purchase .live-event-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-bg);
}
.live-event.is-purchase .live-event-title {
  color: var(--ok);
}
.live-event.is-new {
  animation: live-enter 0.45s ease;
}

@keyframes live-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    background: transparent;
  }
}
.live-empty {
  display: flex;
  flex-direction: column;
}
.live-empty[hidden] {
  display: none;
}
.live-empty {
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.live-empty strong {
  color: var(--text);
  font-size: 1rem;
}
.live-empty .icon {
  color: var(--brand);
}

.live-pulse {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
}

.live-pulse-bar {
  flex: 1;
  min-width: 2px;
  height: var(--h, 4%);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 30%, transparent));
  transition: height 0.4s ease;
}

.live-pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  overflow: hidden;
}
.live-page-meter {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  z-index: 0;
}
.live-page-path {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}
.live-page-count {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .live-grid {
    grid-template-columns: 1fr;
  }
}
.admin-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.admin-layout td:last-child {
  width: 1%;
  white-space: nowrap;
  text-align: left;
}

.admin-layout .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.admin-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.admin-filter .icon {
  color: var(--text-muted);
}
.admin-filter select {
  width: auto;
  min-width: 190px;
}

.admin-filter-clear {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-filter-clear:hover {
  color: var(--brand);
}

.admin-nav {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav .nav-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.admin-nav a {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-nav a:hover {
  background: var(--surface-alt);
  color: var(--brand);
}
.admin-nav a.active {
  background: var(--surface-alt);
  color: var(--brand);
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-nav .nav-title {
    width: 100%;
  }
}
.docs-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  margin-top: 20px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-nav .nav-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.docs-nav a {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.docs-nav a:hover {
  background: var(--surface-alt);
  color: var(--brand);
}
.docs-nav a.active {
  background: var(--surface-alt);
  color: var(--brand);
}

.docs-main {
  min-width: 0;
}

.docs-prose {
  max-width: 820px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.docs-prose h1,
.docs-prose h2,
.docs-prose h3,
.docs-prose h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  margin: 1.8em 0 0.6em;
}
.docs-prose h1 {
  font-size: 28px;
  margin-top: 0;
}
.docs-prose h2 {
  font-size: 22px;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}
.docs-prose h3 {
  font-size: 18px;
}
.docs-prose h4 {
  font-size: 15px;
}
.docs-prose p {
  margin: 0 0 1em;
}
.docs-prose a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.docs-prose a:hover {
  text-decoration: underline;
}
.docs-prose ul,
.docs-prose ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}
.docs-prose li {
  margin: 0.35em 0;
}
.docs-prose li > ul,
.docs-prose li > ol {
  margin: 0.35em 0;
}
.docs-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12em 0.4em;
}
.docs-prose pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 1.2em;
}
.docs-prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: inherit;
}
.docs-prose blockquote {
  margin: 0 0 1.2em;
  padding: 0.2em 1em;
  border-left: 3px solid var(--brand);
  background: var(--surface-alt);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}
.docs-prose blockquote p:last-child {
  margin-bottom: 0;
}
.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 14px;
}
.docs-prose th,
.docs-prose td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.docs-prose th {
  background: var(--surface-alt);
  font-weight: 700;
}
.docs-prose tr:nth-child(even) td {
  background: var(--surface-alt);
}
.docs-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.docs-prose img {
  max-width: 100%;
  height: auto;
}
.docs-prose :first-child {
  margin-top: 0;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .docs-nav .nav-title {
    width: 100%;
  }
}
.site-footer {
  margin-top: 56px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer-brand .brand {
  font-size: 16px;
}

.site-footer-tagline {
  color: var(--text-muted);
}

.site-footer-nav {
  display: flex;
  gap: 18px;
}
.site-footer-nav a {
  color: var(--text-muted);
  font-weight: 600;
}
.site-footer-nav a:hover {
  color: var(--brand);
}

.site-footer-copy {
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .site-footer .wrap {
    justify-content: flex-start;
  }
}
