/* SysWP Radar — app shell (auth + dashboard) */

/* ─── Auth layout: centered card on dark bg ─────────────────── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-strong);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 2rem 2.2rem;
  position: relative;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.auth-card .auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin-bottom: 1.4rem;
}
.auth-card .auth-brand img { width: 40px; height: 40px; border-radius: 12px; }
.auth-card .auth-brand span { font-size: 1.05rem; font-weight: 700; }

.auth-card h1 {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em;
  text-align: center; margin: 0 0 0.4rem;
}
.auth-card .auth-sub {
  color: var(--text-muted); text-align: center;
  font-size: 0.92rem; margin-bottom: 1.6rem;
}

.auth-card .field { margin-bottom: 1rem; }
.auth-card .err {
  margin-bottom: 1rem; padding: 0.7rem 0.9rem; border-radius: 10px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; font-size: 0.88rem;
}
.auth-card .ok {
  margin-bottom: 1rem; padding: 0.7rem 0.9rem; border-radius: 10px;
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3);
  color: var(--emerald); font-size: 0.88rem;
}

.auth-foot {
  text-align: center; margin-top: 1.2rem;
  color: var(--text-muted); font-size: 0.88rem;
}
.auth-foot a { color: var(--cyan); }
.auth-foot a:hover { text-decoration: underline; }

/* "Continue with Google" button — used on /auth/login and /auth/signup */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1rem;
  transition: filter 0.15s, transform 0.05s;
}
.btn-google:hover { filter: brightness(0.97); }
.btn-google:active { transform: translateY(1px); }
.btn-google svg { flex-shrink: 0; }

/* "Continue with SysWP Shield" — sibling SaaS SSO.
   Mirrors .btn-google (white surface, dark text) so the two SSO providers
   look like a coherent set. The Shield brand mark itself is dark (indigo→cyan
   gradient on navy) so it needs a light background to read clearly. */
.btn-shield {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1rem;
  transition: filter 0.15s, transform 0.05s;
}
.btn-shield:hover { filter: brightness(0.97); }
.btn-shield:active { transform: translateY(1px); }
/* The Shield brand mark ships its own gradient — don't tint, just size + align. */
.btn-shield__logo { flex-shrink: 0; display: block; }

.auth-divider {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0.6rem 0 1rem;
  color: var(--text-dim);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(148,163,184,0.15);
}

/* Stepper for onboarding */
.stepper {
  display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; margin-bottom: 1.6rem;
}
.stepper .step {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 700;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.stepper .step.done { background: var(--emerald); color: #06090f; border-color: var(--emerald); }
.stepper .step.active {
  background: var(--grad); color: #06090f;
  box-shadow: 0 0 18px rgba(34,211,238,0.4);
}
.stepper .bar {
  flex: 1; max-width: 36px; height: 2px;
  background: rgba(255,255,255,0.1); border-radius: 1px;
}
.stepper .bar.done { background: var(--emerald); }

.snippet-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
  position: relative;
  overflow-x: auto;
  word-break: break-all;
}
.snippet-block .copy-btn {
  position: absolute; top: 0.6rem; right: 0.6rem;
  padding: 0.3rem 0.7rem; border-radius: 7px;
  background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3);
  color: var(--cyan); font-size: 0.75rem; font-weight: 600;
  font-family: Inter, sans-serif;
  cursor: pointer; transition: all 0.15s ease;
}
.snippet-block .copy-btn:hover { background: rgba(34,211,238,0.18); }
.snippet-block .copy-btn.copied { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.4); color: var(--emerald); }

.verify-pulse {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  display: flex; gap: 0.9rem; align-items: center;
}
.verify-pulse.detected {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.3);
}
.verify-pulse .vp-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(34,211,238,0.1);
  color: var(--cyan); flex-shrink: 0;
  position: relative;
}
.verify-pulse .vp-icon::before {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  border: 2px solid var(--cyan);
  animation: ringPulse 1.6s ease-out infinite;
}
.verify-pulse.detected .vp-icon { background: rgba(16,185,129,0.15); color: var(--emerald); }
.verify-pulse.detected .vp-icon::before { display: none; }
@keyframes ringPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.verify-pulse strong { display: block; color: var(--text); margin-bottom: 0.15rem; }
.verify-pulse span { color: var(--text-muted); font-size: 0.88rem; }

/* ─── App layout: sidebar + main ────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  /* Mobile sidebar hide rule moved to AFTER all .app-sidebar definitions
     (see end of this file) to avoid specificity battle with `.app-sidebar { display: flex }` */
}

.app-sidebar {
  background: rgba(255,255,255,0.025);
  border-right: 1px solid var(--border);
  padding: 1.2rem 0.9rem;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.app-sidebar .brand {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.6rem; margin-bottom: 1.4rem;
}
.app-sidebar .brand img { width: 32px; height: 32px; border-radius: 9px; }
.app-sidebar .brand span { font-weight: 700; font-size: 0.98rem; }

.app-sidebar h5 {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim);
  margin: 1rem 0.6rem 0.4rem;
}
.app-sidebar .nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.8rem; border-radius: 9px;
  color: var(--text-muted); font-size: 0.92rem; font-weight: 500;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.12s ease;
}
.app-sidebar .nav-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.app-sidebar .nav-item.active {
  background: rgba(34,211,238,0.08);
  color: var(--cyan);
  border-left-color: var(--cyan);
}
.app-sidebar .nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.app-sidebar .nav-item .badge {
  margin-left: auto;
  font-size: 0.65rem; padding: 0.1rem 0.4rem;
  border-radius: 999px; font-family: 'JetBrains Mono', monospace;
  background: rgba(34,211,238,0.1); color: var(--cyan);
}

/* Divider between user nav and superadmin block (Shield-style split sidebar). */
.app-sidebar .nav-divider {
  margin: 1.1rem 0.4rem 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(148,163,184,0.10);
}
.app-sidebar .nav-divider span {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.20em;
  text-transform: uppercase; color: var(--amber);
  padding: 0 0.4rem;
}
/* Admin links: amber tint to visually mark "danger zone — full system access". */
.app-sidebar .nav-item--admin:hover {
  background: rgba(245,158,11,0.05);
  color: var(--amber);
}
.app-sidebar .nav-item--admin.active {
  background: rgba(245,158,11,0.08);
  color: var(--amber);
  border-left-color: var(--amber);
}
.app-sidebar .nav-item--admin.active svg { color: var(--amber); }

.app-sidebar .site-pill {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem; color: var(--text-muted);
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.12s ease;
}
.app-sidebar .site-pill:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.app-sidebar .site-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dim); flex-shrink: 0;
}
.app-sidebar .site-pill.live .dot { background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
.app-sidebar .site-pill--suspended {
  color: var(--text-dim);
  background: rgba(245,158,11,0.04);
  border-left: 2px solid rgba(245,158,11,0.3);
  padding-left: 0.8rem;
}
.app-sidebar .site-pill--suspended:hover { background: rgba(245,158,11,0.1); color: var(--amber); }
.app-sidebar .site-pill--suspended .lock-icon {
  width: 14px; height: 14px;
  display: inline-grid; place-items: center;
  font-size: 0.78rem; line-height: 1;
}

.app-sidebar .footer-block {
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.app-sidebar .account-row {
  display: flex; gap: 0.6rem; align-items: center;
  padding: 0.5rem 0.6rem; border-radius: 9px;
  background: rgba(255,255,255,0.025);
}
.app-sidebar .account-row .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad); color: #06090f;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem;
}
.app-sidebar .account-row .meta { flex: 1; min-width: 0; }
.app-sidebar .account-row .meta .em { color: var(--text); font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.app-sidebar .account-row .meta .pl { color: var(--text-muted); font-size: 0.72rem; }
.app-sidebar .account-row a { color: var(--text-muted); }

.app-main { padding: 1.6rem 1.8rem 4rem; min-width: 0; position: relative; }
@media (max-width: 720px) { .app-main { padding: 1.2rem 1rem 3rem; } }

/* The floating .user-menu sits absolutely at top-right (top:1.2rem;right:1.8rem)
   with z-index 50 — so it would otherwise paint OVER any element that reaches the
   right edge in that vertical band. The two elements that do are .trial-banner-global
   (with its own Upgrade CTA on the right) and .app-header (with the range pills on
   the right). Reserve room for the menu on those two containers so the menu has its
   own corner. Mobile collapses the display name → only the avatar is visible →
   smaller reserved width. */
@media (min-width: 721px) {
  .app-header,
  .trial-banner-global { padding-right: 220px; }
}
@media (max-width: 720px) {
  .app-header,
  .trial-banner-global { padding-right: 60px; }
}

/* ─── User menu (floating top-right with dropdown) ──────── */
.user-menu {
  position: absolute;
  top: 1.2rem; right: 1.8rem;
  z-index: 50;
}
@media (max-width: 720px) {
  .user-menu { top: 0.8rem; right: 0.8rem; }
}
.user-menu__btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.8rem 0.4rem 0.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit; font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.user-menu__btn:hover { background: rgba(255,255,255,0.07); border-color: var(--cyan); }
.user-menu.open .user-menu__btn { background: rgba(34,211,238,0.08); border-color: var(--cyan); }
.user-menu__avatar {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #06090f;
  font-weight: 800; font-size: 0.78rem;
  flex-shrink: 0;
}
.user-menu__avatar--lg { width: 40px; height: 40px; font-size: 1.05rem; }
.user-menu__display { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .user-menu__display { display: none; } }
.user-menu__chevron { color: var(--text-muted); transition: transform 0.18s; }
.user-menu.open .user-menu__chevron { transform: rotate(180deg); }

.user-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: #0e1828;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  padding: 0.5rem;
  animation: userMenuFadeIn 0.16s ease;
}
@keyframes userMenuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-menu__head {
  display: flex; gap: 0.7rem; align-items: center;
  padding: 0.7rem 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  margin-bottom: 0.4rem;
}
.user-menu__head-text { flex: 1; min-width: 0; }
.user-menu__head-text strong {
  display: block; color: var(--text); font-size: 0.92rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu__head-text small {
  display: block; color: var(--text-dim); font-size: 0.78rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu__plan {
  display: inline-block; margin-top: 0.3rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  background: rgba(34,211,238,0.12); color: var(--cyan);
}
.user-menu__item {
  display: flex; gap: 0.6rem; align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.12s;
}
.user-menu__item:hover { background: rgba(255,255,255,0.05); }
.user-menu__item svg { color: var(--text-muted); flex-shrink: 0; }
.user-menu__item:hover svg { color: var(--cyan); }
.user-menu__item--danger { color: #fca5a5; }
.user-menu__item--danger:hover { background: rgba(239,68,68,0.08); }
.user-menu__item--danger:hover svg { color: var(--red); }
.user-menu__panel hr {
  border: 0; border-top: 1px solid rgba(148,163,184,0.1);
  margin: 0.4rem 0;
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1.2rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.app-header h1 {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em;
  margin: 0; line-height: 1.2;
}
.app-header .crumbs {
  font-size: 0.78rem; color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.app-header .crumbs a { color: var(--text-muted); }
.app-header .crumbs a:hover { color: var(--cyan); }

.range-pills {
  display: inline-flex; gap: 0.2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 0.2rem;
}
/* WordPress plugin install steps (used in onboarding/install.php and sites/install.php) */
.wp-install-steps {
  display: flex; flex-direction: column; gap: 0.9rem;
  margin: 1.2rem 0 0.4rem;
}
.wp-step {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.1rem;
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 12px;
}
.wp-step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #06090f;
  border-radius: 50%;
  font-weight: 800; font-size: 0.95rem;
  font-family: 'JetBrains Mono', monospace;
}
.wp-step > div:last-child { flex: 1; min-width: 0; }
.wp-step strong {
  display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 0.3rem;
}
.wp-step p {
  margin: 0 0 0.6rem;
  color: var(--text-muted); font-size: 0.85rem; line-height: 1.5;
}
.wp-step p:last-child { margin-bottom: 0; }
.wp-step code {
  background: rgba(15,23,42,0.6);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--cyan);
}
.wp-siteid-box {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: #06090f;
  border: 1px solid rgba(34,211,238,0.3);
  border-radius: 8px;
  margin-top: 0.4rem;
}
.wp-siteid-box code {
  flex: 1; font-size: 0.95rem; font-weight: 700;
  color: var(--cyan); background: transparent; padding: 0;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}
.copy-btn--inline {
  padding: 0.3rem 0.7rem; border-radius: 6px;
  background: var(--cyan); color: #06090f;
  border: none; cursor: pointer;
  font-size: 0.78rem; font-weight: 700;
  font-family: inherit;
}
.copy-btn--inline:hover { filter: brightness(1.1); }
.copy-btn--inline.copied { background: var(--green); }

/* Drill-down clickable elements (IPs, country flags, URIs in attacker/feed/session lists) */
.drill-link {
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  transition: opacity 0.15s, outline 0.15s;
  outline: 1px solid transparent;
  outline-offset: 1px;
}
.drill-link:hover { outline-color: var(--cyan); opacity: 1; }
a.drill-link.ip-mono { display: inline-block; }
a.drill-link.attack-uri { color: var(--text); display: inline-block; max-width: 100%; }
a.drill-link.attack-uri:hover { color: var(--cyan); }

/* Delta badge for stat cards (period-over-period comparison) */
.delta-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 0.2rem;
}
.delta-badge.delta-new {
  color: var(--text-dim);
  font-weight: 400;
  font-style: italic;
}

.range-pills button,
.range-pills a {
  padding: 0.35rem 0.8rem; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.8rem; color: var(--text-muted); font-family: inherit;
  text-decoration: none; display: inline-block; line-height: 1.2;
}
.range-pills button.active,
.range-pills a.active { background: rgba(34,211,238,0.12); color: var(--cyan); }
.range-pills button:hover:not(.active),
.range-pills a:hover:not(.active) { color: var(--text); }

/* Stat cards (app-side) */
.app-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem; margin-bottom: 1.4rem;
}
.app-stat {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.app-stat .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.7rem; font-weight: 800; line-height: 1;
}
.app-stat .lbl {
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 0.35rem;
}
.app-stat.humans .num { color: var(--emerald); }
.app-stat.bots .num { color: var(--cyan); }
.app-stat.ai .num { color: #a78bfa; }
.app-stat.attacks .num { color: var(--red); }

.app-grid {
  display: grid; gap: 0.8rem;
}
.app-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.app-grid.cols-3 { grid-template-columns: 1fr 2fr; }
@media (max-width: 980px) {
  .app-grid.cols-2, .app-grid.cols-3 { grid-template-columns: 1fr; }
}
/* Mobile force-collapse: overrides inline `style="grid-template-columns: ..."` via !important.
   Many dashboard panels declare their column layout inline (1fr 1fr, 1fr 1fr 1fr, 1fr 1.2fr).
   On narrow screens we collapse them to a single stacked column unconditionally. */
@media (max-width: 720px) {
  .app-grid {
    grid-template-columns: 1fr !important;
  }
}

.chart-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}
.chart-card .ttl {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.chart-card .host { width: 100%; height: 260px; }
.chart-card .host.short { height: 220px; }

/* Flash messages */
.flash-stack { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.2rem; }
.flash {
  padding: 0.7rem 1rem; border-radius: 10px;
  display: flex; align-items: flex-start; gap: 0.7rem;
  font-size: 0.9rem;
}
.flash.success { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.3); color: var(--emerald); }
.flash.error   { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.flash.info    { background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.3); color: var(--cyan); }
.flash.warn    { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.3); color: var(--amber); }

/* Trial banner */
.trial-banner {
  padding: 0.7rem 1.1rem; border-radius: 10px;
  background: linear-gradient(135deg, rgba(52,211,153,0.05), rgba(34,211,238,0.06));
  border: 1px solid rgba(34,211,238,0.25);
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.88rem; margin-bottom: 1.2rem;
}
.trial-banner strong { color: var(--cyan); }

/* Empty state */
.empty {
  text-align: center; padding: 4rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-strong);
}
.empty .empty-icon { font-size: 2.6rem; margin-bottom: 0.6rem; }
.empty h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.empty p { color: var(--text-muted); margin: 0 0 1.2rem; }

/* Site card (for sites list) */
.site-list { display: grid; gap: 0.8rem; }
.site-card {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.3rem; border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  transition: all 0.18s ease;
  text-decoration: none; color: inherit;
}
.site-card:hover { border-color: rgba(34,211,238,0.3); background: rgba(255,255,255,0.04); }
.site-card .site-meta strong { color: var(--text); font-weight: 700; display: block; }
.site-card .site-meta .pl { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.site-card .pixel-id {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  padding: 0.25rem 0.6rem; border-radius: 6px;
  background: rgba(34,211,238,0.08); color: var(--cyan);
}
.site-card .ev-count {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 700px) {
  .site-card { grid-template-columns: 1fr; }
}

/* ─── Site card v2 (sites list with sparkline + inline actions) ─────
 * Layout (left → right):
 *   [head]      site-info (name+url + actions inline)      [spark]    [metric]
 *    icon+dot    name/url ─── pixel-pill · Pixel · ⚙        ───        119
 *                                                                       eventos · 24h
 */
.site-card-v2 {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) minmax(180px, 1.3fr) auto;
  align-items: center;
  gap: 1.4rem;
  padding: 1rem 1.4rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: all 0.18s ease;
  position: relative; overflow: hidden;
  min-height: 70px;
  cursor: pointer;
}
.site-card-v2:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Suspended site card — visible with lock badge, no click navigation to dashboard */
.site-card-v2--suspended {
  background: rgba(245,158,11,0.04);
  border-color: rgba(245,158,11,0.25);
}
.site-card-v2--suspended .site-info__name strong { color: var(--text-muted); }
.site-card-v2--suspended .platform-icon,
.site-card-v2--suspended .site-spark { opacity: 0.45; filter: saturate(0.4); }
.site-card-v2--suspended:hover {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.5);
}
.site-suspend-badge {
  position: absolute;
  top: 0.5rem; right: 0.7rem;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.4);
  letter-spacing: 0.04em;
  z-index: 2;
}
.site-card-v2::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  opacity: 0; transition: opacity 0.2s ease;
}
.site-card-v2:hover {
  border-color: rgba(34,211,238,0.3);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}
.site-card-v2:hover::before { opacity: 1; }

/* ── 1. Head (status dot + platform icon) ─── */
.site-head {
  display: flex; align-items: center; gap: 0.6rem;
}
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.status-dot.live {
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
}
.status-dot.live.pulsing { animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.7; }
}
.platform-icon {
  display: block; border-radius: 7px;
  flex-shrink: 0;
}

/* ── 2. site-info — name+url AND actions in same flex row ─── */
.site-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}
.site-info__name {
  min-width: 0;
  flex: 0 1 auto;
}
.site-info__name strong {
  display: block; color: var(--text); font-weight: 700; font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-info__name .pl {
  display: block; color: var(--text-muted); font-size: 0.82rem;
  margin-top: 0.15rem;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.site-actions {
  display: flex; align-items: center; gap: 0.4rem;
  flex-shrink: 0;
}
.pixel-id-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.32rem 0.6rem;
  border-radius: 6px;
  background: rgba(34,211,238,0.08);
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,0.2);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pixel-id-pill:hover { background: rgba(34,211,238,0.15); border-color: rgba(34,211,238,0.4); }
.pixel-id-pill.copied {
  background: rgba(52,211,153,0.15);
  color: var(--emerald);
  border-color: rgba(52,211,153,0.4);
}
.pixel-id-pill.copied::after { content: ' ✓'; }

.action-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem; font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.action-btn--icon { padding: 0.4rem 0.55rem; }
.action-btn:hover {
  background: rgba(34,211,238,0.08);
  border-color: rgba(34,211,238,0.3);
  color: var(--cyan);
}

/* ── 3. Sparkline — wider and more prominent ──── */
.site-spark {
  width: 100%;
  height: 56px;
  min-width: 180px;
}

/* ── 4. Metric ─────────────────────────────────── */
.site-metrics {
  text-align: right;
  min-width: 90px;
  flex-shrink: 0;
}
.site-metrics .metric-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem; font-weight: 700;
  color: var(--text); line-height: 1;
}
.site-metrics .metric-lbl {
  font-size: 0.68rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-top: 0.4rem;
}

/* Mobile: stack vertically */
@media (max-width: 980px) {
  .site-card-v2 {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "head info metric"
      "spark spark spark";
    gap: 0.9rem;
    padding: 1rem;
  }
  .site-head    { grid-area: head; }
  .site-info    { grid-area: info; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .site-info__name { width: 100%; }
  .site-actions { width: 100%; flex-wrap: wrap; }
  .site-spark   { grid-area: spark; height: 40px; }
  .site-metrics { grid-area: metric; }
}
@media (max-width: 560px) {
  .pixel-id-pill { font-size: 0.7rem; padding: 0.28rem 0.5rem; }
  .action-btn { font-size: 0.74rem; padding: 0.35rem 0.55rem; }
}

/* Form rows for settings/account pages */
.form-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.form-row:last-child { border-bottom: none; }
.form-row label { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.form-row label small { display: block; font-weight: 400; color: var(--text-muted); margin-top: 0.2rem; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="url"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="search"],
.form-row select,
.form-row textarea {
  width: 100%;
  max-width: 480px;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.4;
  transition: all 0.15s ease;
  -webkit-text-fill-color: var(--text); /* Safari override for disabled inputs */
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(34,211,238,0.04);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--text-dim); }
.form-row input:disabled,
.form-row select:disabled,
.form-row textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(255,255,255,0.015);
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}
.form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
/* Native dropdown menu items — system rendered, but at least set their colors */
.form-row select option {
  background: #06090f;
  color: #f8fafc;
}
.form-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--cyan);
  cursor: pointer;
}
@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row input,
  .form-row select,
  .form-row textarea { max-width: 100%; }
}

/* ─── Bot drill-down tabs (AI / SEO / RSS / Health) ─────── */
.bot-tabs {
  display: inline-flex; gap: 0.2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 9px; padding: 0.2rem;
}
.bot-tab {
  padding: 0.35rem 0.7rem;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.78rem; color: var(--text-muted);
  font-family: inherit;
  border-radius: 7px;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: all 0.15s ease;
}
.bot-tab small {
  font-size: 0.65rem;
  background: rgba(255,255,255,0.05);
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
.bot-tab.active {
  background: rgba(34,211,238,0.12);
  color: var(--cyan);
}
.bot-tab.active small {
  background: rgba(34,211,238,0.2);
  color: var(--cyan);
}
.bot-tab:hover:not(.active) { color: var(--text); }
.bot-pane { padding-top: 0.4rem; }
.bot-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0.6rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  line-height: 1.5;
}
.bot-note code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(34,211,238,0.08);
  color: var(--cyan);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ─── Attacker / sessions / live indicator panels ─────────── */
/* Pixel-coverage caveat: explains that REST/JSON attacks don't load the pixel */
.pixel-coverage-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  margin-top: 0.8rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  cursor: help;
}
.pixel-coverage-note__icon {
  flex: 0 0 auto;
  color: var(--amber, #f59e0b);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
}
/* OK variant — shown when the WP plugin's server-beacon events are detected.
 * Greens out the banner instead of hiding it: customer keeps the visual
 * confirmation that coverage is COMPLETE, not just "no warning". */
.pixel-coverage-note--ok {
  background: rgba(52, 211, 153, 0.06);
  border-color: rgba(52, 211, 153, 0.24);
}
.pixel-coverage-note--ok .pixel-coverage-note__icon { color: var(--green, #34d399); }
.pixel-coverage-note strong { color: var(--text); font-weight: 600; }
.pixel-coverage-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  background: rgba(245, 158, 11, 0.10);
  color: var(--amber, #f59e0b);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}

.attacker-list { display: flex; flex-direction: column; gap: 0.5rem; }
.attacker-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.15);
  font-size: 0.82rem;
}
.attacker-row__ip { display: flex; align-items: center; gap: 0.4rem; }
.attacker-row__ua {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.attacker-row__stats { display: flex; gap: 0.3rem; }

.ip-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  border: 1px solid var(--border);
}
.country-flag {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1;
}

/* Real SVG flag images served from shield.syswp.pro/flags/<cc>.svg */
.flag {
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  background: #1a1a1a;
}

/* Region (state/province) label shown next to country flag */
.region-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-pill {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  white-space: nowrap;
}
.stat-pill--xs { font-size: 0.68rem; padding: 0.1rem 0.45rem; }
.stat-pill--red {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
  color: #fca5a5;
}
.stat-pill--score[data-score] { color: var(--text-muted); }
.stat-pill--score[data-score^="9"], .stat-pill--score[data-score^="8"] {
  background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5;
}
.stat-pill--score[data-score^="7"], .stat-pill--score[data-score^="6"] {
  background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: var(--amber);
}

/* Block-status pills — shows whether attacker hits were stopped (Shield/WAF)
 * or reached the app. Three states: blocked (green), passed (red), mixed
 * (amber), unknown (gray, when only pixel events exist). */
.bs-pill {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.bs-pill--xs { font-size: 0.66rem; padding: 0.1rem 0.4rem; }
.bs-pill--blocked {
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.32);
  color: #6ee7b7;
}
.bs-pill--passed {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.32);
  color: #fca5a5;
}
.bs-pill--mixed {
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.32);
  color: var(--amber);
}
.bs-pill--unknown {
  background: rgba(148,163,184,0.08);
  border: 1px solid rgba(148,163,184,0.22);
  color: var(--text-muted);
}

.attack-feed {
  display: flex; flex-direction: column; gap: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.attack-feed__row {
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  animation: feedRowIn 0.4s ease;
}
.attack-feed__row.is-new {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.3);
}
@keyframes feedRowIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.attack-feed .ago {
  color: var(--text-dim); font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  min-width: 60px;
}
.attack-uri {
  font-family: 'JetBrains Mono', monospace;
  color: #fca5a5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}

.session-list { display: flex; flex-direction: column; gap: 0.5rem; }
.session-row {
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
}
.session-row__head {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.session-cat {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid;
}
.session-row__path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  font-size: 0.76rem;
}
.path-step {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(34,211,238,0.06);
  color: var(--cyan);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(34,211,238,0.18);
}
.path-arrow { color: var(--text-dim); font-size: 0.85rem; }

.live-indicator {
  position: fixed;
  bottom: 16px; right: 18px;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(10,15,26,0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  font-size: 0.78rem;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.live-indicator.is-paused .live-dot { background: var(--amber); animation: none; box-shadow: 0 0 6px var(--amber); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: blink 1.6s ease-in-out infinite;
}
.live-toggle {
  background: transparent;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0;
}
.live-toggle:hover { text-decoration: underline; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: blink 1.4s ease-in-out infinite;
}

@media (max-width: 980px) {
  .attacker-row { grid-template-columns: 1fr; }
  .attacker-row__ua { white-space: normal; }
}

/* Mobile menu toggle */
.app-menu-btn {
  display: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.4rem 0.6rem;
  color: var(--text);
  font-family: inherit; cursor: pointer;
}
@media (max-width: 900px) { .app-menu-btn { display: inline-flex; } }

/* ─────────────────────────────────────────────────────────
 * Mobile sidebar drawer behaviour — MUST be at end of file
 * to win specificity over the base `.app-sidebar { display: flex }` rule above.
 * ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Hide sidebar by default on mobile (overrides `.app-sidebar { display: flex }`
     that appears earlier in this file with same specificity). */
  .app-sidebar { display: none; }

  /* Open: slide-in drawer from the left, fixed position, opaque background. */
  .app-sidebar.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 85vw;
    height: 100vh;
    z-index: 70;
    background: #0b1220;
    border-right: 1px solid rgba(148,163,184,0.18);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    overflow-y: auto;
    animation: sidebarSlideIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Backdrop dim + blur behind the drawer when open. */
  body.sidebar-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(6, 9, 15, 0.7);
    z-index: 65;
    backdrop-filter: blur(2px);
    animation: sidebarBackdropFade 0.22s ease;
  }

  /* Lock body scroll while drawer is open. */
  body.sidebar-open { overflow: hidden; }
}
@keyframes sidebarSlideIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
@keyframes sidebarBackdropFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Global .data-table — consistent table styling across all dashboards
 *
 * Used in /admin pages, dashboard panels (UTM campaigns, top URLs, etc),
 * alerts history, and more. Each view used to redeclare these rules — now
 * they're centralized to prevent the "crammed columns, no padding" look
 * that happens when a panel forgets to add styles.
 *
 * The .truncate-cell helper gives long content (source names, URLs,
 * campaign titles) ellipsis-truncation with a tooltip on hover. */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: auto;
}
.data-table th,
.data-table td {
  padding: 0.55rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}
.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.data-table .r {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table .nowrap { white-space: nowrap; }
/* Truncate-cell: cap content width; ellipsis when overflowing.
 * Combine with title="..." in markup for hover tooltip showing full value. */
.data-table .truncate-cell {
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table .truncate-cell--md { max-width: 28ch; }
.data-table .truncate-cell--lg { max-width: 42ch; }
.data-table .truncate-cell--xl { max-width: 60ch; }
