/* ============================================================
   DESIGN SYSTEM - META ADS HUB
   Ultra-modern Dark Mode, Glassmorphism & High Aesthetic
   ============================================================ */

:root {
  --bg-main: #080c14;
  --bg-surface: #0e1424;
  --bg-card: rgba(18, 26, 44, 0.7);
  --bg-card-hover: rgba(26, 38, 64, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(24, 119, 242, 0.5);

  --primary: #1877f2;
  --primary-hover: #166fe5;
  --primary-glow: rgba(24, 119, 242, 0.35);

  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(24, 119, 242, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Efeito Glassmorphism Padronizado */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* ============================================================
   TELA DE LOGIN
   ============================================================ */
.login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(20px);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(24, 119, 242, 0.15);
  animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand .brand-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  box-shadow: 0 10px 25px var(--primary-glow);
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-brand .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ============================================================
   LAYOUT DO SISTEMA
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-left: none;
  padding: 24px 18px;
  background: rgba(12, 18, 32, 0.85);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.brand-logo i {
  color: var(--primary);
  font-size: 24px;
}

.brand-logo strong {
  color: var(--primary);
  font-weight: 800;
}

.version-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(24, 119, 242, 0.15);
  border-color: rgba(24, 119, 242, 0.35);
  color: #60a5fa;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.12);
}

.sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.status-dot.amber {
  background: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
}

.status-dot.red {
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.logout-btn:hover {
  color: var(--accent-red);
}

/* ============================================================
   CONTEÚDO PRINCIPAL E TOPBAR
   ============================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  gap: 24px;
  max-width: 1600px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.topbar-left h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.time-badge {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quick-stat-chip {
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  border: 1px solid var(--border-color);
}

.chip-label {
  color: var(--text-secondary);
  margin-right: 4px;
}

.chip-value {
  color: #38bdf8;
  font-weight: 600;
}

/* ============================================================
   CARDS DE MÉTRICAS
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-card.glow-blue:hover {
  box-shadow: 0 10px 30px rgba(24, 119, 242, 0.2);
  border-color: rgba(24, 119, 242, 0.4);
}

.metric-card.glow-cyan:hover {
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
}

.metric-card.glow-purple:hover {
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.metric-card.glow-green:hover {
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.metric-footer {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   TABELAS E CAIXAS DE CONTEÚDO
   ============================================================ */
.content-box {
  padding: 24px;
}

.box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.box-title h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.box-title .subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.badge-count {
  font-size: 11px;
  background: rgba(24, 119, 242, 0.2);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 8px;
  vertical-align: middle;
}

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

.search-box {
  position: relative;
  width: 240px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.table-responsive {
  overflow-x: auto;
}

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

.data-table th {
  padding: 12px 14px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.status-badge.disabled {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 38px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ============================================================
   DISPARO EM MASSA & PREVIEW DO FEED
   ============================================================ */
.bulk-launch-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

.bulk-form-container {
  padding: 28px;
}

.form-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.section-title h4 {
  font-size: 15px;
  font-weight: 600;
}

.accounts-selector-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.selector-header {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
}

.accounts-scroll-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 6px;
}

.account-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.account-check-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Inputs & Controles */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
.select-control {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
.select-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 42px;
}

.icon-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.icon-btn:hover {
  color: var(--text-main);
}

/* Custom Checkbox */
.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.custom-checkbox input:checked ~ .checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox input:checked ~ .checkbox-box::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: white;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-warning {
  background: var(--accent-amber);
  color: #1a1003;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
  width: 100%;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   AD MOCKUP (PREVIEW DO FEED DO FACEBOOK)
   ============================================================ */
.preview-card {
  padding: 20px;
}

.sticky-top {
  position: sticky;
  top: 24px;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.ad-mockup {
  background: #18191a;
  border-radius: 10px;
  border: 1px solid #2d3035;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.ad-top {
  display: flex;
  align-items: center;
  padding: 12px;
  gap: 10px;
}

.page-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #242526;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}

.page-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.page-name {
  font-size: 13px;
  font-weight: 600;
  color: #e4e6eb;
}

.ad-sponsored {
  font-size: 11px;
  color: #b0b3b8;
}

.ad-dots {
  color: #b0b3b8;
  font-size: 14px;
}

.ad-body-text {
  padding: 0 12px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #e4e6eb;
  word-break: break-word;
}

.ad-media-container {
  width: 100%;
  height: 220px;
  background: #242526;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ad-media-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #8a8d91;
  font-size: 12px;
}

.media-placeholder i {
  font-size: 32px;
}

.ad-bottom-bar {
  background: #242526;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ad-headline-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ad-domain {
  font-size: 10px;
  color: #b0b3b8;
  text-transform: uppercase;
}

.ad-headline {
  font-size: 13px;
  color: #e4e6eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-cta-btn {
  background: #3a3b3c;
  color: #e4e6eb;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.preview-tips {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: rgba(24, 119, 242, 0.08);
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: var(--radius-md);
  margin-top: 16px;
  font-size: 12px;
  color: #93c5fd;
}

/* ============================================================
   MODAL DE PROGRESSO
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  padding: 28px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title i {
  color: var(--primary);
  font-size: 20px;
}

.modal-badge {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.progress-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  transition: width 0.3s ease;
}

.progress-logs {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  height: 160px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.log-entry.success { color: #34d399; }
.log-entry.error { color: #f87171; }
.log-entry.info { color: #94a3b8; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* Checklist de Permissões */
.permissions-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perm-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.perm-item i.green {
  color: var(--accent-green);
  font-size: 16px;
  margin-top: 2px;
}

.perm-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.perm-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Banners de Alerta */
.banner-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  gap: 16px;
}

.banner-alert.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-icon i {
  font-size: 24px;
  color: var(--accent-amber);
}

.alert-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
}

.alert-text p {
  font-size: 12px;
  color: #fde68a;
  margin-top: 2px;
}

.error-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.feedback-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  font-size: 13px;
}

.feedback-banner.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.feedback-banner.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Utilitários */
.hidden { display: none !important; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px var(--primary-glow); }
  50% { box-shadow: 0 0 30px var(--primary-glow); }
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* ============================================================
   CONTROLE DE ABAS (TAB PANES)
   ============================================================ */
.tab-pane {
  display: none !important;
}

.tab-pane.active {
  display: block !important;
  animation: tabFadeIn 0.25s ease-out;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.refresh-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-refresh-select {
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.auto-refresh-select:focus {
  border-color: var(--primary);
  color: var(--text-main);
}

/* ============================================================
   ESTILOS DE TRAQUEAMENTO & WEBHOOKS (UTMIFY ENGINE)
   ============================================================ */
.metric-card.glow-emerald:hover {
  box-shadow: 0 10px 30px rgba(52, 211, 153, 0.25);
  border-color: rgba(52, 211, 153, 0.4);
}

.utm-injection-box {
  background: rgba(24, 119, 242, 0.06);
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 12px;
}

.utm-preview-snippet {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.utm-tag-label {
  font-size: 11px;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 6px;
}

.utm-preview-snippet code,
.whatsapp-link-preview code {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: #38bdf8;
  word-break: break-all;
  line-height: 1.5;
}

.tracking-tools-grid,
.webhooks-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tool-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.tool-card-header i {
  font-size: 18px;
  color: var(--primary);
}

.tool-card-header i.green {
  color: #22c55e;
}

.tool-card-header h4 {
  font-size: 15px;
  font-weight: 700;
}

.tool-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.code-box {
  position: relative;
  background: #060910;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.code-box pre {
  margin: 0;
  overflow-x: auto;
  font-size: 12px;
  color: #a5f3fc;
  line-height: 1.4;
  font-family: monospace;
}

.copy-btn {
  margin-top: 10px;
  width: 100%;
}

.tags-explanation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.tag-row code {
  color: #60a5fa;
  font-weight: 600;
}

.tag-row span {
  color: var(--text-secondary);
}

.whatsapp-link-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .bulk-launch-grid,
  .tracking-tools-grid,
  .webhooks-setup-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .main-content {
    padding: 16px;
  }
  .grid-2-cols {
    grid-template-columns: 1fr;
  }
}


