:root {
  --ink: #0b1a24;
  --ink-soft: #3a5163;
  --muted: #5f7588;
  --line: rgba(11, 26, 36, 0.09);
  --line-strong: rgba(11, 26, 36, 0.15);
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --panel-2: #f0f7f8;
  --bg: #d9ebe8;
  --bg-deep: #c5ddd8;
  --sidebar: #07141f;
  --sidebar-2: #0c1c2a;
  --sidebar-line: rgba(255, 255, 255, 0.09);
  --sidebar-text: rgba(220, 245, 240, 0.72);
  --sidebar-strong: #f2fffc;
  --teal: #0d9f8f;
  --teal-bright: #2dd4bf;
  --teal-deep: #0a7f72;
  --teal-dim: rgba(13, 159, 143, 0.14);
  --mint: var(--teal);
  --mint-dim: var(--teal-dim);
  --copper: #e08a3a;
  --copper-dim: rgba(224, 138, 58, 0.16);
  --rose: #e8456a;
  --rose-dim: rgba(232, 69, 106, 0.14);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.16);
  --sky: #38bdf8;
  --sky-dim: rgba(56, 189, 248, 0.14);
  --violet: #8b5cf6;
  --lime: #84cc16;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px rgba(7, 40, 48, 0.1);
  --shadow-sm: 0 8px 22px rgba(7, 40, 48, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Manrope", sans-serif;
  --display: "Sora", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(45, 212, 191, 0.45), transparent 55%),
    radial-gradient(820px 540px at 96% 0%, rgba(56, 189, 248, 0.32), transparent 52%),
    radial-gradient(700px 480px at 70% 110%, rgba(232, 69, 106, 0.22), transparent 55%),
    radial-gradient(600px 420px at 20% 90%, rgba(245, 158, 11, 0.2), transparent 50%),
    linear-gradient(155deg, #e4f7f3 0%, #dff0f8 42%, #f3e9e4 100%);
  animation: ambientShift 18s ease-in-out infinite alternate;
}
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}
.ambient::before {
  width: 340px;
  height: 340px;
  left: 18%;
  top: 28%;
  background: rgba(45, 212, 191, 0.35);
  animation: floatOrb 14s ease-in-out infinite;
}
.ambient::after {
  width: 280px;
  height: 280px;
  right: 12%;
  bottom: 18%;
  background: rgba(56, 189, 248, 0.3);
  animation: floatOrb 11s ease-in-out infinite reverse;
}
@keyframes ambientShift {
  from { filter: hue-rotate(0deg) saturate(1); }
  to { filter: hue-rotate(12deg) saturate(1.08); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -24px) scale(1.08); }
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.mono { font-family: var(--mono); font-size: 0.9em; }
.muted { color: var(--muted); }

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  animation: riseIn 0.45s ease both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.pulse-in { animation: pulseIn 0.45s ease both; animation-delay: var(--d, 0s); }

/* —— Sidebar —— */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--sidebar-line);
  background:
    radial-gradient(420px 280px at 10% -10%, rgba(20, 184, 166, 0.18), transparent 60%),
    linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  color: var(--sidebar-text);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 6px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #0a0506;
  color: #fecaca;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 8px 22px rgba(127, 29, 29, 0.45), inset 0 0 0 1px rgba(225, 29, 72, 0.35);
  position: relative;
  overflow: hidden;
  padding: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 11px;
}
.brand-mark::after {
  content: none;
}
.brand-logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 0 0 22px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--sidebar-strong);
}
.brand p {
  margin: 4px 0 0;
  color: rgba(232, 240, 248, 0.5);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px;
}
.nav-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--sidebar-text);
  padding: 10px 11px;
  border-radius: 11px;
  display: flex;
  gap: 11px;
  align-items: center;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-btn .nav-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(232, 240, 248, 0.55);
  background: rgba(255, 255, 255, 0.04);
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-btn .nav-ico svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-strong);
}
.nav-btn:hover .nav-ico { color: #9aefe3; }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(20, 184, 166, 0.06));
  color: #e8fffb;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28);
}
.nav-btn.active .nav-ico {
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.25);
}

.sidebar-foot {
  margin-top: auto;
  padding: 10px 12px;
  color: rgba(232, 240, 248, 0.55);
  font-size: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sidebar-line);
  word-break: break-all;
}
.sidebar .btn.ghost {
  width: 100%;
  justify-content: center;
  background: transparent;
  color: var(--sidebar-text);
  border-color: var(--sidebar-line);
}
.sidebar .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-strong);
  border-color: rgba(255, 255, 255, 0.18);
}

/* —— Main —— */
.main {
  padding: 28px 34px 64px;
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid transparent;
  background:
    linear-gradient(var(--line), var(--line)) bottom left / 100% 1px no-repeat;
}
.topbar .eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.topbar h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
  background: linear-gradient(120deg, var(--ink) 20%, #0d9f8f 55%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar .sub {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 52ch;
  font-weight: 500;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-glow {
  position: relative;
  overflow: hidden;
}
.card-glow::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.18), transparent 70%);
  pointer-events: none;
}
.card + .card { margin-top: 14px; }
.card h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stats .card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 18px 22px;
}
.stats .card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal-bright), var(--teal-deep));
}
.stat-card.tone-allow::before { background: linear-gradient(180deg, #5eead4, #0d9488); }
.stat-card.tone-block::before { background: linear-gradient(180deg, #fb7185, #e11d48); }
.stat-card.tone-human::before { background: linear-gradient(180deg, #38bdf8, #0284c7); }
.stat-card.tone-bot::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.stat-card.tone-allow {
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.14), transparent 42%),
    var(--panel);
}
.stat-card.tone-block {
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.14), transparent 42%),
    var(--panel);
}
.stat-card.tone-human {
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.16), transparent 42%),
    var(--panel);
}
.stat-card.tone-bot {
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.16), transparent 42%),
    var(--panel);
}
.stat-value {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
  animation: pulseIn 0.5s ease both;
}
.stat-card.tone-allow .stat-value { color: #0f766e; }
.stat-card.tone-block .stat-value { color: #be123c; }
.stat-card.tone-human .stat-value { color: #0369a1; }
.stat-card.tone-bot .stat-value { color: #b45309; }
.page-stack { display: flex; flex-direction: column; gap: 16px; }
.overview-alive .stats .card { animation: pulseIn 0.5s ease both; }
.overview-alive .stats .card:nth-child(1) { animation-delay: 0.02s; }
.overview-alive .stats .card:nth-child(2) { animation-delay: 0.08s; }
.overview-alive .stats .card:nth-child(3) { animation-delay: 0.14s; }
.overview-alive .stats .card:nth-child(4) { animation-delay: 0.2s; }
.section-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.domain-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  box-shadow: var(--shadow-sm);
}
.domain-chip .host {
  font-weight: 700;
  font-family: var(--display);
  letter-spacing: -0.02em;
  font-size: 14px;
}
.domain-chip .ip {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
}
.pill.up, .pill.allow, .pill.human {
  background: var(--teal-dim);
  color: #0a6f65;
  border-color: rgba(12, 154, 140, 0.18);
}
.pill.down, .pill.block, .pill.bot {
  background: var(--rose-dim);
  color: #a12d42;
  border-color: rgba(209, 59, 85, 0.18);
}
.pill.unknown, .pill.challenge {
  background: var(--amber-dim);
  color: #9a5b0a;
  border-color: rgba(217, 119, 6, 0.18);
}

.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(4, 1fr); }
.stat-label {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.split { grid-template-columns: 1.55fr 1fr; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 246, 249, 0.65);
}
td {
  padding: 13px 10px;
  border-bottom: 1px solid rgba(12, 21, 34, 0.05);
  vertical-align: middle;
}
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(12, 154, 140, 0.035); }
.reasons { color: var(--copper); font-size: 11px; font-weight: 600; }

.btn {
  background: linear-gradient(180deg, #2dd4bf, #0d9f8f);
  color: #042f2e;
  border: 0;
  border-radius: 11px;
  padding: 10px 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 22px rgba(13, 159, 143, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--panel-2);
  border-color: rgba(12, 154, 140, 0.35);
}
.btn.danger {
  background: linear-gradient(180deg, #e85d72, var(--rose));
  color: #fff;
  box-shadow: 0 8px 18px rgba(209, 59, 85, 0.22);
}
.btn.small { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }

input, select, textarea {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toggle {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.toggle:last-child { border-bottom: 0; }
.toggle h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.toggle p { margin: 0; color: var(--muted); font-size: 13px; max-width: 560px; font-weight: 500; }
.switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #c8d2db;
  position: relative;
  border: 0;
  flex: none;
  transition: background 0.15s ease;
}
.switch.on { background: var(--teal); }
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(12, 21, 34, 0.18);
  transition: left 0.18s ease;
}
.switch.on i { left: 21px; }

/* —— Login —— */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  animation: riseIn 0.5s ease both;
}
.login-shell {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgba(12, 21, 34, 0.14);
  background: var(--panel-solid);
}
.login-hero {
  position: relative;
  padding: 44px 38px;
  color: #e8f7f4;
  background:
    radial-gradient(500px 280px at 18% 8%, rgba(94, 234, 212, 0.28), transparent 60%),
    radial-gradient(420px 260px at 92% 88%, rgba(47, 111, 150, 0.28), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #132536 55%, #0a7a70 145%);
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
}
.login-hero > * { position: relative; }
.login-hero .brand-mark {
  width: 56px;
  height: 56px;
  font-size: 21px;
  margin-bottom: 18px;
}
.login-hero .brand-logo {
  margin-bottom: 26px;
}
.login-hero h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  max-width: 11ch;
}
.login-hero p {
  margin: 0;
  color: rgba(232, 247, 244, 0.74);
  font-size: 15px;
  max-width: 30ch;
  line-height: 1.55;
  font-weight: 500;
}
.login-hero .hero-meta {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13px;
  color: rgba(232, 247, 244, 0.68);
  font-weight: 500;
}
.login-hero .hero-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-hero .hero-meta i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.18);
}
.login-card {
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card .form-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.login-card .form-sub {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 500;
}
.login-card label { margin: 14px 0 6px; }
.login-card input { width: 100%; }
.hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  font-weight: 500;
}
.error { color: var(--rose); font-size: 13px; min-height: 18px; margin-top: 8px; font-weight: 600; }

.bars {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 188px;
  padding: 4px 2px 0;
}
.bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}
.bar-stack {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: stretch;
  gap: 2px;
  min-height: 148px;
}
.bar {
  width: 100%;
  border-radius: 5px 5px 2px 2px;
  transition: height 0.35s ease;
  animation: barRise 0.55s ease both;
  animation-delay: var(--d, 0s);
}
@keyframes barRise {
  from { transform: scaleY(0.2); opacity: 0.3; transform-origin: bottom; }
  to { transform: scaleY(1); opacity: 1; transform-origin: bottom; }
}
.bar-col { animation: pulseIn 0.45s ease both; animation-delay: var(--d, 0s); }
.bar.allow { background: linear-gradient(180deg, #5eead4, #0d9488); box-shadow: 0 6px 14px rgba(13, 148, 136, 0.25); }
.bar.block { background: linear-gradient(180deg, #fb7185, #e11d48); box-shadow: 0 6px 14px rgba(225, 29, 72, 0.22); }
.bar.challenge { background: linear-gradient(180deg, #fcd34d, #f59e0b); box-shadow: 0 6px 14px rgba(245, 158, 11, 0.22); }
.bar.empty { background: rgba(15, 23, 42, 0.08); border-radius: 3px; opacity: 0.75; box-shadow: none; }
.bar-label {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 12px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.list-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
.kv {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.kv strong { font-family: var(--display); letter-spacing: -0.02em; font-weight: 700; }
.codebox {
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.55;
  color: #9aefe3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.blocked-body { min-height: 100vh; display: grid; place-items: center; }
.blocked-card {
  width: min(520px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.blocked-card .mark {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1ad1bc, #0c8f83);
  color: #04211e; font-weight: 700; font-family: var(--display);
}

.live-scroll {
  max-height: 70vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.live-table { width: 100%; }
.live-table th { position: sticky; top: 0; z-index: 1; }
.live-row.flash { animation: liveFlash 0.9s ease; }
@keyframes liveFlash {
  from { background: rgba(12, 154, 140, 0.14); }
  to { background: transparent; }
}
.live-row.bot.flash { animation-name: liveFlashBot; }
@keyframes liveFlashBot {
  from { background: rgba(209, 59, 85, 0.12); }
  to { background: transparent; }
}
.live-actions { white-space: nowrap; text-align: right; }
.live-actions .btn { min-width: 72px; }
.live-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
}
.dot.live {
  background: var(--teal-bright);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1.25); opacity: 0.55; }
  100% { transform: scale(1); opacity: 1; }
}

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.crumb {
  background: transparent;
  border: 0;
  color: var(--teal-deep);
  padding: 0;
  font: inherit;
  font-weight: 700;
}
.crumb:hover { color: var(--ink); }
.crumb-sep { color: var(--muted); }
.files-toolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
.file-check { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.add-domain-card {
  border-color: rgba(12, 154, 140, 0.22);
  background:
    linear-gradient(135deg, rgba(12, 154, 140, 0.06), transparent 42%),
    var(--panel);
}
.add-domain-card input { width: 100%; }

/* Domains */
.domains-page {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 32px;
}
.domains-hero {
  max-width: 760px;
  width: 100%;
  margin: 4px auto 0;
  text-align: center;
}
.domains-hero h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.045em;
}
.domains-hero .sub {
  margin: 0 auto 22px;
  color: var(--muted);
  max-width: 42ch;
  font-weight: 500;
}
.add-domain-inline {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.add-domain-inline input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
}
.domains-bottom {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 8px;
}
.domains-list-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 0 4px;
}
.domains-empty {
  text-align: center;
  padding: 28px 12px;
  border-top: 1px solid var(--line);
}
.domain-lines {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.domain-line { border-bottom: 1px solid var(--line); }
.domain-line:last-child { border-bottom: 0; }
.domain-line-main {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) auto minmax(200px, 1.6fr);
  gap: 16px;
  align-items: center;
  min-height: 56px;
  padding: 10px 4px;
}
.domain-line-host {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.domain-line-host .host {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.domain-line-host .mono { font-size: 11px; }
.domain-line-ssl {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.domain-line-files {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.domain-line-files .path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
  font-weight: 500;
}
.domain-line-picker {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
@media (max-width: 860px) {
  .add-domain-inline { grid-template-columns: 1fr; }
  .domain-line-main {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 4px;
  }
  .domain-line-files { justify-content: flex-start; }
  .domain-line-files .path { text-align: left; }
}
.file-badge {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #0a6f65;
  background: var(--teal-dim);
  border: 1px solid rgba(12, 154, 140, 0.18);
  border-radius: 7px;
  padding: 4px 7px;
  margin-right: 6px;
}
.file-editor {
  width: 100%;
  min-height: 320px;
  margin-top: 12px;
  resize: vertical;
  line-height: 1.5;
  font-family: var(--mono);
  font-size: 13px;
}

/* —— Domains (Moonito-style list) —— */
.domains-moonito {
  --dm-purple: #6d28d9;
  --dm-purple-2: #7c3aed;
  --dm-purple-soft: #f3e8ff;
  --dm-purple-text: #5b21b6;
  --dm-green: #16a34a;
  --dm-green-soft: #dcfce7;
  --dm-green-text: #15803d;
  --dm-dark: #374151;
}
.domains-moonito .dm-head h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.dm-crumb {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.dm-card { padding: 18px 20px 12px; }
.dm-title-row { margin-bottom: 14px; }
.dm-title {
  margin: 0 !important;
  font-family: var(--font) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ink) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dm-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--dm-purple-soft);
  color: var(--dm-purple-text);
  font-size: 12px;
  font-weight: 700;
}
.dm-filters {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 14px;
}
.dm-field label {
  margin-bottom: 6px;
}
.dm-field.grow input,
.dm-field select {
  width: 100%;
  background: #fff;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.dm-field input::placeholder { color: #9aa6b2; }
.dm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dm-toolbar-left,
.dm-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dm-btn-primary {
  background: linear-gradient(180deg, var(--dm-purple-2), var(--dm-purple)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.22) !important;
  border-radius: 8px !important;
  font-weight: 700;
}
.dm-btn-dark {
  background: #4b5563 !important;
  color: #fff !important;
  box-shadow: none !important;
  border-radius: 8px !important;
}
.dm-btn-icon {
  width: 40px;
  height: 40px;
  padding: 0 !important;
  justify-content: center;
  border-radius: 8px !important;
}
.dm-table-wrap {
  overflow: auto;
  border: 1px solid #e5eaf0;
  border-radius: 10px;
}
.dm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 980px;
}
.dm-table th {
  background: #f3f5f8;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 12px;
  border-bottom: 1px solid #e5eaf0;
  white-space: nowrap;
}
.dm-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
}
.dm-table tbody tr:last-child td { border-bottom: 0; }
.dm-table tbody tr:hover { background: #fafbff; }
.dm-updated {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.dm-owner {
  margin-top: 2px;
  font-size: 11px;
  color: #9aa6b2;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dm-domain {
  color: var(--dm-purple-2);
  font-weight: 700;
  text-decoration: none;
}
.dm-domain:hover { text-decoration: underline; color: var(--dm-purple); }
.dm-ok {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--dm-green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}
.dm-num {
  font-weight: 600;
  color: #334155;
}
.dm-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.dm-badge.on {
  background: var(--dm-green-soft);
  color: var(--dm-green-text);
}
.dm-badge.off {
  background: #f3f4f6;
  color: #6b7280;
}
.dm-actions {
  white-space: nowrap;
  text-align: right;
}
.dm-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5eaf0;
  background: #fff;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  color: #64748b;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.dm-ico svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dm-ico.more svg { fill: currentColor; stroke: none; }
.dm-btn-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-right: 2px;
}
.dm-btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dm-ico:hover { background: #f8fafc; }
.dm-ico.shield { color: #2563eb; border-color: #bfdbfe; }
.dm-ico.edit { color: #ea580c; border-color: #fed7aa; }
.dm-ico.del { color: #dc2626; border-color: #fecaca; }
.dm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.dm-modal {
  width: min(480px, 100%);
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}
.dm-modal.fp-modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.fp-actions-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 0;
  background: var(--panel);
}
.fp-actions-top .btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
.fp-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.fp-row.selected td {
  background: rgba(12, 154, 140, 0.08);
}
.fp-selected strong {
  color: var(--ink);
}
.dm-site-path {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-folder-cell {
  white-space: nowrap;
  min-width: 140px;
}
.dm-folder-attached {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.dm-folder-name {
  display: inline-block;
  max-width: 180px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(12, 154, 140, 0.1);
  border: 1px solid rgba(12, 154, 140, 0.25);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-table-wrap table {
  width: 100%;
}
.dm-modal h3 {
  margin: 0 0 14px !important;
  font-family: var(--display) !important;
  font-size: 18px !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  color: var(--ink) !important;
}
.dm-modal input { width: 100%; }
@media (max-width: 860px) {
  .dm-filters { grid-template-columns: 1fr; }
  .dm-toolbar { align-items: stretch; }
  .dm-toolbar-left, .dm-toolbar-right { width: 100%; }
}

/* —— Moonito-style domain edit —— */
.moon-edit .dm-head h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.moon-card { max-width: 760px; padding: 22px 24px; }
.moon-field { margin-bottom: 18px; }
.moon-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
}
.moon-field .req { color: #dc2626; }
.moon-field input,
.moon-field select {
  width: 100%;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  font-size: 14px;
}
.moon-toggles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 18px;
}
.moon-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
}
.moon-switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #d1d5db;
  position: relative;
  flex: none;
  transition: background 0.15s ease;
  padding: 0;
}
.moon-switch.on { background: #6d28d9; }
.moon-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.15s ease;
}
.moon-switch.on i { left: 23px; }
.moon-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.moon-info {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #c4cdd6;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  margin-left: 2px;
}
.moon-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.moon-countries {
  position: relative;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-height: 48px;
}
.moon-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 28px;
}
.moon-chips-empty {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 0;
}
.moon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6d28d9;
  color: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.moon-chip button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.moon-country-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}
.moon-country-row select {
  width: 100%;
  border: 1px solid #d7dde5 !important;
  border-radius: 8px;
  padding: 10px 12px !important;
  background: #fff !important;
}
.moon-cc-hint {
  margin: -4px 0 10px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}
.moon-cc-box {
  border: 1px solid #d7dde5;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  position: relative;
}
.moon-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 10px;
}
.moon-chips-empty {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 0;
}
.moon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6d28d9;
  color: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.moon-chip button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.moon-cc-search-wrap {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}
.moon-cc-search-wrap input {
  width: 100%;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}
.moon-cc-list {
  display: block;
  width: 100%;
  margin-top: 10px;
  min-height: 180px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.moon-cc-list option {
  padding: 8px 10px;
  border-radius: 4px;
}
.moon-cc-list option:checked,
.moon-cc-list option:hover {
  background: #f3e8ff;
  color: #5b21b6;
}
.moon-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 8px;
}
.moon-btn-update {
  background: #6d28d9 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.25) !important;
  min-width: 110px;
  justify-content: center;
  font-weight: 700;
}
.moon-btn-update:hover {
  filter: brightness(1.05);
}
.moon-btn-reset {
  min-width: 90px;
  justify-content: center;
}
.moon-edit .dm-crumb a { color: #7c3aed; font-weight: 600; text-decoration: none; }
@media (max-width: 720px) {
  .moon-grid-2 { grid-template-columns: 1fr; }
  .moon-country-row { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .nav-btn { width: auto; }
  .sidebar-foot { display: none; }
  .stats, .split, .list-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 220px; }
  .main { padding: 20px 16px 40px; }
}
