:root {
  color-scheme: dark;
  --bg: #080c0b;
  --bg-deep: #050807;
  --surface: #101714;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --surface-strong: #151f1b;
  --line: rgba(232, 243, 234, 0.1);
  --line-strong: rgba(232, 243, 234, 0.18);
  --text: #eef4ec;
  --muted: #9caf9f;
  --muted-strong: #c0cec2;
  --muted-dim: #6f8275;
  --lime: #c9f36d;
  --lime-strong: #b8ef4f;
  --lime-soft: rgba(201, 243, 109, 0.12);
  --cyan: #78dfee;
  --cyan-soft: rgba(120, 223, 238, 0.12);
  --amber: #ffc16f;
  --amber-soft: rgba(255, 193, 111, 0.12);
  --red: #ff8f80;
  --red-soft: rgba(255, 143, 128, 0.12);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1000px 620px at 88% -10%, rgba(201, 243, 109, 0.09), transparent 62%),
    radial-gradient(760px 520px at -12% 12%, rgba(120, 223, 238, 0.07), transparent 60%),
    linear-gradient(180deg, #0a0f0d 0%, var(--bg) 38%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: var(--lime);
  color: #0a0f0d;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.boot-mark {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(201, 243, 109, 0.18);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--lime);
  background: rgba(201, 243, 109, 0.08);
  border: 1px solid rgba(201, 243, 109, 0.2);
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(201, 243, 109, 0.06);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 4.6vw, 58px);
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(22px, 2.4vw, 30px);
}

h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.lede {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.microcopy {
  margin: 14px 0 0;
  color: var(--muted-dim);
  font-size: 12px;
  line-height: 1.55;
}

.mono {
  font-family: var(--mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  animation: fade-in 0.5s var(--ease) both;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(620px 460px at 20% 78%, rgba(201, 243, 109, 0.08), transparent 66%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 55%);
  border-right: 1px solid var(--line);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.login-copy {
  position: relative;
  z-index: 2;
  padding: clamp(48px, 9vh, 110px) 0;
}

.login-copy h1 {
  margin: 18px 0 26px;
  font-size: clamp(54px, 7.4vw, 108px);
  line-height: 0.92;
  text-wrap: balance;
}

.login-copy h1 em {
  color: var(--lime);
  font-style: italic;
}

.login-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.login-foot {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.radar {
  position: absolute;
  right: -70px;
  bottom: 44px;
  width: min(38vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.9;
}

.radar-ring {
  position: absolute;
  border: 1px solid rgba(201, 243, 109, 0.13);
  border-radius: 50%;
}

.radar-ring-a {
  inset: 0;
}

.radar-ring-b {
  inset: 17%;
}

.radar-ring-c {
  inset: 34%;
}

.radar-axis {
  position: absolute;
  background: rgba(201, 243, 109, 0.1);
}

.radar-axis-x {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.radar-axis-y {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 286deg, rgba(201, 243, 109, 0.32) 360deg);
  mask-image: radial-gradient(circle, transparent 0 29%, black 30%);
  animation: sweep 14s linear infinite;
}

.radar-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(201, 243, 109, 0.08), 0 0 20px rgba(201, 243, 109, 0.7);
}

.radar-dot-a {
  top: 28%;
  left: 62%;
}

.radar-dot-b {
  top: 64%;
  left: 34%;
}

.radar-dot-c {
  top: 46%;
  left: 76%;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  background: rgba(6, 10, 8, 0.72);
  backdrop-filter: blur(18px);
}

.login-form {
  display: grid;
  width: min(100%, 380px);
  gap: 12px;
}

.login-form h2 {
  margin: 8px 0 4px;
  font-size: clamp(32px, 3.4vw, 42px);
}

.login-hint {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-form label,
.add-form label {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 94px;
}

.field-action {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 7px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transform: translateY(-50%);
}

.field-action:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(5, 9, 7, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: var(--muted-dim);
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus {
  background: rgba(5, 9, 7, 0.92);
  border-color: rgba(201, 243, 109, 0.6);
  box-shadow: 0 0 0 4px rgba(201, 243, 109, 0.08);
}

select {
  padding-right: 36px;
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  color: #0a100b;
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  border-color: rgba(201, 243, 109, 0.6);
  box-shadow: 0 10px 30px rgba(201, 243, 109, 0.12);
}

.button-primary:hover {
  background: linear-gradient(135deg, #d6ff82, var(--lime));
}

.button-secondary {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--line);
}

.button-secondary:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
}

.button-wide {
  width: 100%;
  margin-top: 4px;
}

.form-error {
  min-height: 22px;
  margin: 2px 0 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--lime);
  font-size: 13px;
  line-height: 1.5;
}

.form-note.is-error {
  color: var(--red);
}

.app {
  min-height: 100svh;
  animation: fade-in 0.4s var(--ease) both;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(7, 11, 9, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(130%);
  scrollbar-color: rgba(201, 243, 109, 0.25) transparent;
  scrollbar-width: thin;
}

.topbar-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  height: 68px;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  padding: 0 clamp(16px, 4vw, 48px);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}

.tab {
  padding: 8px 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.tab.is-active {
  color: var(--lime);
  background: var(--lime-soft);
  border-color: rgba(201, 243, 109, 0.14);
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.connection-dot {
  width: 6px;
  height: 6px;
  background: var(--muted-dim);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.connection.is-ok .connection-dot {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 243, 109, 0.1), 0 0 12px rgba(201, 243, 109, 0.5);
  animation: pulse-dot 2.6s ease-in-out infinite;
}

.connection.is-warn .connection-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 193, 111, 0.1);
}

.connection.is-danger .connection-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 143, 128, 0.1);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.icon-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

.shell {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px) clamp(16px, 4vw, 48px) 56px;
}

.view {
  animation: rise-in 0.42s var(--ease) both;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.view-title h1 {
  margin-bottom: 12px;
}

.view-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.select-field {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.select-field span {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.select-field select {
  height: 40px;
  font-size: 12px;
  background-color: rgba(16, 23, 20, 0.9);
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.range {
  min-height: 32px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.range:hover {
  color: var(--text);
}

.range.is-active {
  color: #0b110c;
  background: var(--lime);
}

.stack {
  display: grid;
  gap: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  position: relative;
  min-height: 152px;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(220px 140px at 100% 0%, rgba(201, 243, 109, 0.06), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.metric::after {
  position: absolute;
  right: 18px;
  bottom: 17px;
  width: 34px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(201, 243, 109, 0.4));
}

.metric-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.metric-hint {
  margin: 14px 0 0;
  color: var(--muted-dim);
  font-size: 11px;
  line-height: 1.45;
}

.metric-accent .metric-value {
  color: var(--lime);
}

.metric-cyan .metric-value {
  color: var(--cyan);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 18px;
}

.overview-grid-low {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(12, 18, 15, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.card-head h2 {
  margin: 5px 0 0;
  font-size: clamp(22px, 2.2vw, 28px);
}

.card h2 {
  font-size: clamp(22px, 2.2vw, 28px);
}

.card > h2 {
  margin-top: 6px;
}

.card > p:not(.card-kicker):not(.microcopy) {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.chart-card {
  min-height: 390px;
}

.chart {
  position: relative;
  min-height: 300px;
}

.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.chart-tooltip {
  position: absolute;
  top: 4px;
  z-index: 5;
  min-width: 150px;
  padding: 10px 12px;
  pointer-events: none;
  background: rgba(9, 14, 11, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translate(-50%, 0);
  transition: opacity 0.12s ease;
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.chart-tooltip time {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-tooltip strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.chart-tooltip strong + strong {
  margin-top: 4px;
  color: var(--lime);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-dot-queries {
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(120, 223, 238, 0.6);
}

.legend-dot-blocked {
  background: var(--lime);
  box-shadow: 0 0 9px rgba(201, 243, 109, 0.6);
}

.rank-list,
.device-list {
  display: grid;
}

.rank-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(232, 243, 234, 0.07);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-position {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 10px;
}

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

.rank-domain {
  overflow: hidden;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-bar {
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  border-radius: inherit;
}

.rank-value {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(232, 243, 234, 0.07);
}

.device-row:last-child {
  border-bottom: 0;
}

.device-name {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-value {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.device-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.device-bar {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.device-bar span {
  display: block;
  height: 100%;
  background: var(--cyan);
  border-radius: inherit;
  opacity: 0.65;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background:
    radial-gradient(380px 240px at 90% 0%, rgba(201, 243, 109, 0.11), transparent 70%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.action-card h2 {
  margin: 8px 0 10px;
}

.action-card p:not(.card-kicker):not(.microcopy) {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.last-update {
  margin: 18px 0 0;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.banner-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.banner-stack:empty {
  display: none;
}

.banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.banner-copy {
  display: grid;
  gap: 4px;
}

.banner-copy strong {
  font-size: 13px;
  font-weight: 650;
}

.banner-copy span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.banner a,
.banner button {
  flex: 0 0 auto;
  padding: 0;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.banner-warn {
  background: var(--amber-soft);
  border-color: rgba(255, 193, 111, 0.22);
}

.banner-warn .banner-copy strong {
  color: var(--amber);
}

.banner-danger {
  background: var(--red-soft);
  border-color: rgba(255, 143, 128, 0.22);
}

.banner-danger .banner-copy strong {
  color: var(--red);
}

.banner-info {
  background: var(--cyan-soft);
  border-color: rgba(120, 223, 238, 0.18);
}

.banner-info .banner-copy strong {
  color: var(--cyan);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.empty-state strong {
  color: var(--muted-strong);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.empty-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--lime);
  background: var(--lime-soft);
  border: 1px solid rgba(201, 243, 109, 0.16);
  border-radius: 50%;
}

.empty-mark svg {
  width: 17px;
  height: 17px;
}

.query-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.search-field {
  display: flex;
  width: min(100%, 320px);
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(5, 9, 7, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus-within {
  border-color: rgba(201, 243, 109, 0.5);
  box-shadow: 0 0 0 4px rgba(201, 243, 109, 0.07);
}

.search-field svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted-dim);
}

.search-field input {
  height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.search-field input:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-field-small {
  width: min(100%, 230px);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 10px 12px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 13px 12px;
  color: var(--muted);
  font-size: 12.5px;
  border-bottom: 1px solid rgba(232, 243, 234, 0.06);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.table .cell-domain {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 12px;
}

.table .cell-time {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.table .cell-narrow {
  white-space: nowrap;
}

.table code {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
}

.table .table-empty {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
}

.status-pill::before {
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-blocked {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(255, 143, 128, 0.16);
}

.status-allowed {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(120, 223, 238, 0.16);
}

.status-neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.table-foot {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.table-foot:empty {
  display: none;
}

.blocklist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.add-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.inline-field {
  display: flex;
  gap: 8px;
}

.inline-field input {
  min-width: 0;
  flex: 1;
}

.inline-field .button {
  flex: 0 0 auto;
  min-height: 48px;
}

.field-hint {
  margin: 0;
  color: var(--muted-dim);
  font-size: 12px;
  line-height: 1.55;
}

.copy-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
}

.copy-code {
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  overflow-wrap: anywhere;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  background: rgba(5, 9, 7, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.copy-button {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  color: var(--lime);
  background: var(--lime-soft);
  border: 1px solid rgba(201, 243, 109, 0.16);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.copy-button:hover {
  background: rgba(201, 243, 109, 0.18);
  border-color: rgba(201, 243, 109, 0.3);
}

.copy-button svg {
  width: 15px;
  height: 15px;
}

.list-count {
  margin: -8px 0 14px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.settings-card h2 {
  margin: 6px 0 12px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 14px;
  color: var(--muted-strong);
  font-size: 13px;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--muted-dim);
  border-radius: 50%;
}

.status-dot.is-ok {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 243, 109, 0.1);
}

.status-dot.is-warn {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 193, 111, 0.1);
}

.status-dot.is-danger {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 143, 128, 0.1);
}

.setup-list {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.setup-list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  counter-increment: step;
}

.setup-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 9px;
  content: counter(step);
  background: var(--lime-soft);
  border: 1px solid rgba(201, 243, 109, 0.14);
  border-radius: 50%;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.settings-value {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.settings-note {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.footer {
  display: flex;
  max-width: 1260px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 32px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(calc(100vw - 32px), 380px);
  padding: 13px 16px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  background: rgba(15, 22, 18, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-color: rgba(255, 143, 128, 0.35);
}

.toast.is-ok {
  border-color: rgba(201, 243, 109, 0.3);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-grid,
  .overview-grid-low {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    padding-bottom: 34px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-copy {
    padding: 34px 0 10px;
  }

  .login-copy h1 {
    font-size: clamp(46px, 10vw, 72px);
  }

  .radar {
    right: -120px;
    bottom: -90px;
    width: 330px;
    opacity: 0.55;
  }

  .login-foot {
    display: none;
  }

  .view-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .blocklist-grid {
    grid-template-columns: 1fr;
  }

  .settings-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .topbar-track {
    height: 60px;
    gap: 16px;
    padding: 0 16px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 11px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-mark svg {
    width: 21px;
    height: 21px;
  }

  .connection {
    display: none;
  }

  .shell {
    padding-top: 28px;
  }

  .view-head {
    gap: 20px;
    margin-bottom: 26px;
  }

  .view-tools {
    align-items: stretch;
  }

  .select-field {
    min-width: 0;
    flex: 1 1 160px;
  }

  .segmented {
    flex: 0 0 auto;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 132px;
  }

  .card-head {
    flex-direction: column;
    gap: 12px;
  }

  .chart-card {
    min-height: 0;
  }

  .chart {
    min-height: 240px;
  }

  .chart-empty {
    min-height: 220px;
  }

  .query-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field,
  .search-field-small {
    width: 100%;
  }

  .inline-field {
    flex-direction: column;
  }

  .inline-field .button {
    width: 100%;
  }

  .copy-row {
    align-items: stretch;
  }

  .banner {
    flex-direction: column;
    gap: 10px;
  }

  .banner a,
  .banner button {
    align-self: flex-start;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }

  .footer {
    padding-bottom: 24px;
  }

  .login-panel {
    padding: 34px 20px 54px;
  }

  .login-visual {
    padding: 24px 20px 18px;
  }

  .login-copy h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .login-copy p {
    font-size: 14px;
  }

  .radar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
