/* ==========================================================================
   VPS Sentinel - Ultra Premium Cyber / Next-Gen Glassmorphic Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta Base Ultra Dark */
  --bg-app: #06080d;
  --bg-surface: #0b0f19;
  --bg-card: rgba(14, 20, 33, 0.75);
  --bg-card-hover: rgba(20, 29, 48, 0.85);
  --bg-glass: rgba(11, 15, 25, 0.7);
  --bg-input: rgba(6, 9, 15, 0.8);
  
  /* Bordas & Brilhos */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(0, 240, 255, 0.35);
  --border-active: rgba(0, 240, 255, 0.6);

  /* Acentos Vibrantes Cyberpunk/SaaS */
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.3);
  --cyan-dim: rgba(0, 240, 255, 0.12);
  
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.3);
  --purple-dim: rgba(168, 85, 247, 0.12);

  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --emerald-dim: rgba(16, 185, 129, 0.12);

  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.3);
  --amber-dim: rgba(245, 158, 11, 0.12);

  --rose: #ff3366;
  --rose-glow: rgba(255, 51, 102, 0.35);
  --rose-dim: rgba(255, 51, 102, 0.12);

  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.3);
  --blue-dim: rgba(59, 130, 246, 0.12);

  /* Tipografia */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Formas e Efeitos */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-card-hover: 0 16px 40px -6px rgba(0, 0, 0, 0.8), 0 0 24px var(--cyan-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & FUNDO GERAL
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dark-theme {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(168, 85, 247, 0.04) 0%, transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* Ambient Glow Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--cyan-glow) 0%, transparent 70%);
  top: -150px;
  left: -150px;
}
.glow-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  bottom: 0px;
  right: -100px;
}

/* ==========================================================================
   HEADER SUPERIOR FLUTUANTE
   ========================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2.2rem;
  background: rgba(6, 8, 13, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00f0ff, #7928ca);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 0 20px var(--cyan-glow);
  position: relative;
}

.brand-info h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #00f0ff, #0284c7);
  color: #000;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  -webkit-text-fill-color: #000;
  box-shadow: 0 0 10px var(--cyan-glow);
}

.brand-info .subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Status Pill & Pulse */
.status-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
  box-shadow: 0 0 10px #10b981;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.5);
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

.uptime-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.uptime-badge i {
  color: var(--cyan);
}

/* ==========================================================================
   BOTÕES & INTERAÇÕES MODERNAS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-card);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff, #0284c7);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 18px var(--cyan-glow);
}
.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 25px var(--cyan-glow);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--rose-dim);
  border-color: rgba(255, 51, 102, 0.4);
  color: #ff6b8b;
}
.btn-danger:hover {
  background: #ff3366;
  color: #fff;
  box-shadow: 0 0 16px var(--rose-glow);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}
.btn-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.btn-sm { padding: 5px 12px; font-size: 0.76rem; }
.btn-xs { padding: 3px 9px; font-size: 0.7rem; border-radius: var(--radius-xs); }

/* ==========================================================================
   NAVEGAÇÃO POR ABAS FLUTUANTE (DOCK STYLE)
   ========================================================================== */
.nav-tabs-container {
  padding: 0 2.2rem;
  margin-top: 1.2rem;
  z-index: 20;
  position: relative;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(14, 20, 33, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  padding: 6px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(168, 85, 247, 0.15));
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
}

.tab-btn.active i {
  color: var(--cyan);
}

.counter-badge {
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.counter-badge.badge-danger {
  background: var(--rose-dim);
  border-color: rgba(255, 51, 102, 0.4);
  color: #ff6b8b;
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL & KPI GRID
   ========================================================================== */
.main-content {
  position: relative;
  z-index: 10;
  padding: 1.5rem 2.2rem 3rem;
  max-width: 1650px;
  margin: 0 auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.kpi-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: relative;
}

.icon-cyan { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.3); }
.icon-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.icon-emerald { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.icon-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.3); }
.icon-amber { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.icon-rose { background: var(--rose-dim); color: var(--rose); border: 1px solid rgba(255, 51, 102, 0.3); }

.kpi-meta {
  flex: 1;
}

.kpi-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.kpi-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.kpi-value-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-family: var(--font-mono);
  border: 1px solid var(--border-card);
}

.badge-status-ok {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--emerald-dim);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.kpi-big-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.kpi-big-num .unit {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-left: 4px;
}

/* Progress Bars */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-cyan { background: linear-gradient(90deg, #00f0ff, #0284c7); box-shadow: 0 0 10px var(--cyan-glow); }
.fill-purple { background: linear-gradient(90deg, #a855f7, #6366f1); box-shadow: 0 0 10px var(--purple-glow); }
.fill-emerald { background: linear-gradient(90deg, #10b981, #059669); box-shadow: 0 0 10px var(--emerald-glow); }

.kpi-split-speeds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.3rem 0;
}

.speed-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.7rem;
}

.speed-dir {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.download-color { color: var(--cyan); }
.upload-color { color: var(--emerald); }

.speed-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.req-mini-breakdown {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.code-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.code-2xx { background: var(--emerald-dim); color: #34d399; }
.code-4xx { background: var(--amber-dim); color: #fbbf24; }
.code-5xx { background: var(--rose-dim); color: #ff6b8b; }

.kpi-footer {
  font-size: 0.76rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   ESTRUTURA DE PAINEIS (GLASS PANELS)
   ========================================================================== */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

.dashboard-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.flex-1 { flex: 1; min-width: 320px; }
.flex-2 { flex: 2; min-width: 480px; }

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.25rem;
  position: relative;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-head.flex-between {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.head-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.head-title h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-emerald { color: var(--emerald); }
.text-blue { color: var(--blue); }
.text-amber { color: var(--amber); }
.text-rose { color: var(--rose); }
.text-orange { color: #f97316; }

.live-dot-pulse {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #34d399;
  background: var(--emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

.donut-chart-box {
  height: 240px;
}

.chart-legend-custom {
  display: flex;
  gap: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.legend-dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.legend-dot.purple { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.legend-dot.blue { background: var(--blue); }
.legend-dot.green { background: var(--emerald); }

/* ==========================================================================
   TELA DE CONSULTA DE REQUISIÇÕES & LOGS (ULTRA REFINED)
   ========================================================================== */

/* Ribbon de Métricas Rápidas */
.query-stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ribbon-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.ribbon-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}

.ribbon-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.ribbon-meta {
  display: flex;
  flex-direction: column;
}

.ribbon-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.ribbon-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Toolbar de Filtros */
.query-toolbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
  background: rgba(6, 9, 15, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
}

.query-search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.query-search-box:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.query-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
  margin-left: 0.5rem;
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-clear-search:hover { color: #fff; }

.filter-pills-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-right: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.pill-filter:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pill-filter.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}

.pill-filter.status-pill-2xx.active { background: var(--emerald-dim); border-color: var(--emerald); color: #34d399; }
.pill-filter.status-pill-4xx.active { background: var(--amber-dim); border-color: var(--amber); color: #fbbf24; }
.pill-filter.status-pill-5xx.active { background: var(--rose-dim); border-color: var(--rose); color: #ff6b8b; }
.pill-filter.rep-pill-unknown.active { background: var(--amber-dim); border-color: var(--amber); color: #fbbf24; }
.pill-filter.rep-pill-blocked.active { background: var(--rose-dim); border-color: var(--rose); color: #ff6b8b; }
.pill-filter.rep-pill-trusted.active { background: var(--emerald-dim); border-color: var(--emerald); color: #34d399; }

/* ==========================================================================
   TABELAS DE DADOS (CYBER DATA TABLES)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
}

.query-table-wrap {
  border: 1px solid var(--border-card);
  background: rgba(6, 9, 15, 0.5);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.83rem;
}

.data-table th {
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}

.data-table td {
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.05);
}

.query-table tbody tr {
  cursor: pointer;
}

.query-table tbody tr.new-row-anim {
  animation: rowFlash 1.2s ease-out;
}

@keyframes rowFlash {
  0% { background: rgba(0, 240, 255, 0.35); }
  100% { background: transparent; }
}

/* Badges de Métodos HTTP */
.method-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  display: inline-block;
  letter-spacing: 0.02em;
}

.method-GET { background: rgba(0, 240, 255, 0.15); color: #00f0ff; border: 1px solid rgba(0, 240, 255, 0.3); }
.method-POST { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.method-PUT { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.method-DELETE { background: rgba(255, 51, 102, 0.15); color: #ff6b8b; border: 1px solid rgba(255, 51, 102, 0.3); }
.method-PATCH { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Badges de Status Codes */
.status-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.76rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-2xx { background: var(--emerald-dim); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.status-3xx { background: var(--blue-dim); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.status-4xx { background: var(--amber-dim); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.status-5xx { background: var(--rose-dim); color: #ff6b8b; border: 1px solid rgba(255, 51, 102, 0.4); }

/* Badges de Reputação de IP */
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.rep-local { background: var(--blue-dim); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.rep-trusted { background: var(--emerald-dim); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.rep-unknown { background: var(--amber-dim); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.rep-blocked { background: var(--rose-dim); color: #ff6b8b; border: 1px solid rgba(255, 51, 102, 0.4); }

/* Botões de Ação na Tabela */
.btn-table-action {
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.btn-table-block { background: var(--rose-dim); border-color: rgba(255, 51, 102, 0.35); color: #ff6b8b; }
.btn-table-block:hover { background: #ff3366; color: #fff; box-shadow: 0 0 12px var(--rose-glow); }

.btn-table-trust { background: var(--emerald-dim); border-color: rgba(16, 185, 129, 0.35); color: #34d399; }
.btn-table-trust:hover { background: #10b981; color: #fff; box-shadow: 0 0 12px var(--emerald-glow); }

.btn-table-unblock { background: var(--cyan-dim); border-color: rgba(0, 240, 255, 0.35); color: var(--cyan); }
.btn-table-unblock:hover { background: #0284c7; color: #fff; box-shadow: 0 0 12px var(--cyan-glow); }

.table-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.5rem 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.table-click-hint {
  color: var(--cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   WIDGETS: TOP LISTS, SYSTEM INFO & DISKS
   ========================================================================== */
.top-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.top-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.top-list-item:hover {
  background: rgba(0, 240, 255, 0.06);
  border-color: var(--border-hover);
  transform: translateX(3px);
}

.top-item-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-item-count {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  background: var(--cyan-dim);
  color: var(--cyan);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.system-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.info-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

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

.disks-container {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.disk-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
}

.disk-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.disk-mount-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #fff;
  font-family: var(--font-mono);
}

.disk-sizes {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ==========================================================================
   SEGURANÇA & FIREWALL
   ========================================================================== */
.security-banner-panel {
  background: linear-gradient(135deg, rgba(20, 28, 48, 0.9), rgba(11, 15, 25, 0.95));
  border: 1px solid rgba(255, 51, 102, 0.35);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.12);
  margin-bottom: 1.5rem;
}

.security-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.security-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--rose-dim);
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: #ff6b8b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 20px var(--rose-glow);
}

.security-banner-text {
  flex: 1;
  min-width: 280px;
}

.security-banner-text h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
}

.security-banner-text p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.btn-toggle-strict {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: var(--transition);
}

.btn-toggle-strict:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-toggle-strict.active {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.3), rgba(225, 29, 72, 0.5));
  border-color: #ff3366;
  color: #fff;
  box-shadow: 0 0 25px var(--rose-glow);
}

.rule-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group.flex-1 { flex: 1; min-width: 170px; }
.form-group.flex-2 { flex: 2; min-width: 230px; }
.form-group.flex-auto { flex: 0 0 auto; }
.align-end { justify-content: flex-end; }

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}

.form-group select option {
  background: #0f172a;
  color: #fff;
}

/* ==========================================================================
   MODAL / DRAWER DE INSPEÇÃO DETALHADA
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-inspector-card {
  background: #0b0f19;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 40px var(--cyan-glow);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.94) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.6rem;
  border-bottom: 1px solid var(--border-card);
  background: rgba(14, 20, 33, 0.8);
  position: sticky;
  top: 0;
  z-index: 2;
}

.modal-head-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.inspector-pulse-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.modal-head-title h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.modal-sub-id {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-close:hover {
  background: var(--rose-dim);
  border-color: var(--rose);
  color: #fff;
}

.modal-inspector-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.inspector-summary-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.summary-method-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.summary-path-wrap {
  flex: 1;
  min-width: 200px;
}

.inspector-path {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  word-break: break-all;
}

.summary-latency-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--purple-dim);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 4px 11px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.inspector-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.meta-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meta-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.meta-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.inspector-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.section-head-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-agent-box {
  background: #06080d;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.45;
}

.raw-json-box {
  background: #06080d;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.78rem;
  color: #67e8f9;
  max-height: 180px;
  overflow-y: auto;
  line-height: 1.5;
}

.inspector-actions-footer {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-card);
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 290px;
  max-width: 420px;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius-sm);
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.25);
}
.toast-success i { color: #34d399; font-size: 1.2rem; }

.toast-danger {
  border-color: rgba(255, 51, 102, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 51, 102, 0.25);
}
.toast-danger i { color: #ff6b8b; font-size: 1.2rem; }

.toast-info {
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px var(--cyan-glow);
}
.toast-info i { color: var(--cyan); font-size: 1.2rem; }

/* ==========================================================================
   WIDGET: APLICAÇÕES & SITES HOSPEDADOS NO NGINX (VISÃO GERAL)
   ========================================================================== */
.nginx-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.1rem;
}

.site-card {
  background: rgba(14, 20, 33, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.site-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.site-card.site-ssl-active::before {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.site-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.site-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: var(--cyan-dim);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.site-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.site-ssl-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.ssl-secure {
  background: var(--emerald-dim);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.ssl-insecure {
  background: var(--amber-dim);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.site-url-link {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  word-break: break-all;
  transition: var(--transition);
}

.site-url-link:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--cyan);
}

.site-type-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-type-label {
  font-weight: 600;
}

.site-type-target {
  font-family: var(--font-mono);
  color: #fff;
  font-weight: 700;
}

.site-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}

.site-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #34d399;
}

.btn-open-site {
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--cyan);
  padding: 4px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.btn-open-site:hover {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* ==========================================================================
   SERVIÇOS, INTERFACES & GUIA
   ========================================================================== */
.connection-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.conn-stat-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  text-align: center;
}

.conn-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.conn-label {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.interfaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
}

.iface-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.iface-name {
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.iface-ip {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: #fff;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.service-name {
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
}

.service-status-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.service-running { background: var(--emerald-dim); color: #34d399; }
.service-stopped { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); }

.guide-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.guide-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.guide-card code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--cyan);
}

.code-block-wrapper {
  position: relative;
  margin-top: 0.6rem;
}

.code-box {
  background: #04060a;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #e2e8f0;
  overflow-x: auto;
  line-height: 1.55;
}

.btn-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   RESPONSIVIDADE COMPLETA PARA CELULAR & TABLETS (CARDS NATIVOS SEM SCROLL HORIZONTAL)
   ========================================================================== */

/* Ocultar dicas de rolagem horizontal desnecessárias */
.mobile-scroll-hint {
  display: none !important;
}

@media (max-width: 1024px) {
  .dashboard-row { flex-direction: column; gap: 1rem; }
  .flex-1, .flex-2 { width: 100%; min-width: 0; }
  .main-content { padding: 1.2rem 1.5rem 2.5rem; }
  .nav-tabs-container { padding: 0 1.5rem; }
  .top-header { padding: 0.85rem 1.5rem; }
}

@media (max-width: 768px) {
  /* Header Mobile */
  .top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
  }
  .header-brand { justify-content: space-between; width: 100%; }
  .header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }

  /* Dock de Abas Touch sem barra de rolagem feia */
  .nav-tabs-container { padding: 0 1rem; margin-top: 0.6rem; }
  .nav-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px;
    gap: 0.4rem;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
  }

  .main-content { padding: 1rem 1rem 2.5rem; }
  .chart-container { height: 220px; }
  .donut-chart-box { height: 200px; }

  /* ==========================================================================
     TRANSFORMAÇÃO DE TABELAS EM CARDS NATIVOS PARA CELULAR (ZERO HORIZONTAL SCROLL)
     ========================================================================== */
  .table-responsive {
    overflow-x: hidden !important;
    max-height: none !important;
  }

  .query-table-wrap {
    border: none;
    background: transparent;
  }

  .data-table {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none; /* Oculta cabeçalhos rígidos no mobile */
  }

  .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }

  /* Card Nativo de Cada Item */
  .data-table tbody tr {
    display: flex;
    flex-direction: column;
    background: rgba(14, 20, 33, 0.85);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 1rem;
    gap: 0.65rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    white-space: normal;
    position: relative;
    transition: var(--transition);
  }

  .data-table tbody tr:hover {
    border-color: var(--border-hover);
    background: rgba(20, 29, 48, 0.95);
  }

  .data-table td {
    padding: 0;
    border: none;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
  }

  /* Ajustes específicos para Requisições */
  .query-table tbody tr td:nth-child(1) {
    /* Horário */
    order: 1;
    font-size: 0.72rem;
    color: var(--text-muted);
  }
  .query-table tbody tr td:nth-child(2) {
    /* Método */
    order: 2;
    justify-content: flex-start;
  }
  .query-table tbody tr td:nth-child(3) {
    /* Caminho / Endpoint */
    order: 3;
    display: block;
    width: 100%;
    font-size: 0.88rem;
    color: #fff;
    word-break: break-all;
    margin: 0.2rem 0;
  }
  .query-table tbody tr td:nth-child(4) {
    /* Status */
    order: 2;
    justify-content: flex-end;
  }
  .query-table tbody tr td:nth-child(5) {
    /* IP de Origem */
    order: 4;
    justify-content: flex-start;
  }
  .query-table tbody tr td:nth-child(6) {
    /* Reputação */
    order: 4;
    justify-content: flex-end;
  }
  .query-table tbody tr td:nth-child(7) {
    /* Latência */
    order: 5;
    font-size: 0.76rem;
    color: var(--text-secondary);
  }
  .query-table tbody tr td:nth-child(8) {
    /* Ações de Proteção */
    order: 6;
    width: 100%;
    justify-content: stretch;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
  }
  .query-table tbody tr td:nth-child(8) > div,
  .query-table tbody tr td:nth-child(8) > button {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .query-table tbody tr td:nth-child(8) .btn-table-action {
    flex: 1;
    justify-content: center;
    padding: 7px 10px;
  }

  /* Formulário de Regras de Segurança no Mobile */
  .rule-form { flex-direction: column; align-items: stretch; gap: 0.85rem; }
  .form-group.flex-1, .form-group.flex-2, .form-group.flex-auto { width: 100%; min-width: 0; }
  .btn-primary { width: 100%; justify-content: center; padding: 11px; }
  .security-banner-content { flex-direction: column; align-items: stretch; }
  .btn-toggle-strict { width: 100%; justify-content: center; padding: 12px; }

  /* Modal Inspector no Mobile */
  .modal-inspector-card { max-height: 95vh; }
  .inspector-meta-grid { grid-template-columns: 1fr; }
  .inspector-actions-footer { flex-direction: column; }
  .inspector-actions-footer .btn { width: 100%; }

  /* Toolbar de Busca Mobile */
  .query-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  .query-search-box { min-width: 0; width: 100%; }
  .filter-pills-group { width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .filter-pills-group::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  .top-header { padding: 0.75rem; }
  .main-content { padding: 0.75rem 0.75rem 2rem; }
  .nav-tabs-container { padding: 0 0.75rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  #kpi-net-card, #kpi-req-card, #kpi-security-card { grid-column: span 2; }
  .kpi-card { padding: 0.85rem; }
  .kpi-big-num { font-size: 1.5rem; }
  .glass-panel { padding: 0.95rem; margin-bottom: 0.95rem; }
  .query-stats-ribbon { grid-template-columns: repeat(2, 1fr); gap: 0.55rem; }
  .ribbon-card { padding: 0.65rem 0.75rem; gap: 0.5rem; }
  .ribbon-icon { width: 32px; height: 32px; font-size: 0.95rem; }
  .ribbon-val { font-size: 1.05rem; }
}

