/* ==========================================================================
   STATEFLOW ENGAJAMENTO PLATFORM — LUXURY DARK PURPLE DESIGN SYSTEM
   Baseado em Geist & Liquid Glass Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  /* Dark Purple & Obsidian Core Palette */
  --bg-main: #07060e;
  --bg-surface: #0e0a1b;
  --bg-surface-elevated: #16112a;
  --bg-surface-glass: rgba(22, 17, 42, 0.65);
  
  --bg-card: rgba(20, 15, 38, 0.58);
  --bg-card-hover: rgba(32, 24, 60, 0.85);
  
  --border-subtle: rgba(168, 85, 247, 0.14);
  --border-active: rgba(168, 85, 247, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #80759f;
  
  /* Brand Tokens — Dark Purple, Violet, Blush & Sage Emerald */
  --brand-primary: #8b5cf6;
  --brand-primary-light: #a78bfa;
  --brand-primary-dark: #6d28d9;
  --brand-accent: #ec4899;
  --brand-accent-cyan: #38bdf8;
  
  --sage: #10b981;
  --sage-light: #34d399;
  --sage-dark: #059669;
  
  --blush: #f43f5e;
  --blush-light: #fb7185;
  --blush-dark: #be123c;
  
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Gradients */
  --gradient-body: radial-gradient(circle at 50% -10%, rgba(139, 92, 246, 0.18), transparent 45%),
                   radial-gradient(circle at 90% 20%, rgba(236, 72, 153, 0.12), transparent 40%),
                   radial-gradient(circle at 10% 60%, rgba(16, 185, 129, 0.08), transparent 35%),
                   linear-gradient(180deg, #07060e 0%, #0c0818 100%);
                   
  --gradient-aurora: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #ec4899 100%);
  --gradient-aurora-text: linear-gradient(135deg, #e9d5ff 0%, #c084fc 40%, #f472b6 80%, #38bdf8 100%);
  --gradient-metallic: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  --gradient-gold-text: linear-gradient(135deg, #fef08a 0%, #f59e0b 60%, #d97706 100%);
  --gradient-emerald-text: linear-gradient(135deg, #a7f3d0 0%, #34d399 50%, #059669 100%);
  
  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-glow-purple: 0 0 25px rgba(139, 92, 246, 0.3), 0 0 60px rgba(99, 102, 241, 0.15);
  --shadow-glow-blush: 0 0 25px rgba(236, 72, 153, 0.25);
  --shadow-glow-sage: 0 0 25px rgba(16, 185, 129, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-glass: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  
  --border-subtle: #e2e8f0;
  --border-active: #7c3aed;
  --border-glass: rgba(0, 0, 0, 0.08);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

  --gradient-body: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --gradient-aurora-text: linear-gradient(135deg, #6d28d9 0%, #7c3aed 40%, #db2777 80%, #0284c7 100%);
  --gradient-metallic: linear-gradient(135deg, #0f172a 0%, #334155 60%, #475569 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-main);
  background-image: var(--gradient-body);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================================================
   TYPOGRAPHY CLASSES
   ========================================================================= */
.font-display {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.text-gradient-aurora {
  background: var(--gradient-aurora-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-emerald {
  background: var(--gradient-emerald-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-metallic {
  background: var(--gradient-metallic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================================================
   LIQUID GLASS SYSTEM (MÁSCARA GRADIENTE & REFRAÇÃO)
   ========================================================================= */
.liquid-glass-dark {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.liquid-glass-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.45) 0%,
    rgba(99, 102, 241, 0.2) 25%,
    rgba(236, 72, 153, 0.05) 50%,
    rgba(16, 185, 129, 0.15) 75%,
    rgba(168, 85, 247, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glow-purple {
  box-shadow: var(--shadow-glow-purple);
}

.glow-blush {
  box-shadow: var(--shadow-glow-blush);
}

.glow-sage {
  box-shadow: var(--shadow-glow-sage);
}

/* =========================================================================
   AUTENTICAÇÃO & TELA DE LOGIN (CYBERSECURITY GATE)
   ========================================================================= */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 4, 10, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: rgba(18, 14, 34, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.9), var(--shadow-glow-purple);
  position: relative;
  overflow: hidden;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin: 0 auto 16px auto;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(168, 85, 247, 0.6));
}

.auth-header h2 {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-error-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 8px;
}

/* =========================================================================
   BARRA LATERAL (SIDEBAR)
   ========================================================================= */
.sidebar {
  width: 270px;
  background: rgba(14, 10, 27, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: var(--transition-smooth);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.app-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 10px rgba(168, 85, 247, 0.5));
}

.logo-text h1 {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-text span {
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  color: var(--brand-primary-light);
  font-weight: 600;
  display: block;
}

/* Badge de Operação ROD na Sidebar */
.sidebar-fleet-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 12px 14px 4px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-md);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.sidebar-rod-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.sidebar-nav {
  padding: 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 14px 6px 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: rgba(168, 85, 247, 0.15);
}

.nav-item.active {
  background: rgba(139, 92, 246, 0.16);
  color: var(--brand-primary-light);
  border-color: var(--border-active);
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

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

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}

/* =========================================================================
   TOPBAR & HEADER SUPERIOR
   ========================================================================= */
.main-wrapper {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  height: 70px;
  background: rgba(14, 10, 27, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.page-title h2 {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.page-title p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rod-partner-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  color: #f59e0b;
}

.rod-top-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.badge-stateflow {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--brand-primary-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.user-profile-badge:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

.btn-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

/* =========================================================================
   CONTAINER DE CONTEÚDO & CARDS
   ========================================================================= */
.content-container {
  padding: 28px 32px 60px 32px;
  flex: 1;
}

.tab-pane {
  display: none;
}

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

/* Stats Cards (Dashboard) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.35) 0%,
    rgba(99, 102, 241, 0.15) 40%,
    transparent 70%,
    rgba(236, 72, 153, 0.25) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.55),
    var(--shadow-glow-purple);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.stat-value {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.stat-growth {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.growth-positive { color: var(--success); }

/* Dashboard Grids */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.chart-card, .feed-card, .form-card, .admin-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.4);
}

.chart-card::before, .feed-card::before, .form-card::before, .admin-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.3) 0%,
    rgba(99, 102, 241, 0.1) 40%,
    transparent 70%,
    rgba(236, 72, 153, 0.2) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-title {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-badge {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--danger);
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  transition: var(--transition-smooth);
}

.feed-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(168, 85, 247, 0.3);
}

.feed-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feed-item-content {
  flex: 1;
}

.feed-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-weight: 600;
}

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

/* =========================================================================
   PÚBLICOS SEGMENTADOS & CARDS COMPORTAMENTAIS
   ========================================================================= */
.audience-summary-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 10px 30px rgba(0, 0, 0, 0.4);
}

.audience-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audience-counter-number {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-aurora-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.segment-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.35);
}

.segment-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.3) 0%,
    transparent 60%,
    rgba(236, 72, 153, 0.2) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.segment-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow-purple);
}

.segment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.segment-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.segment-count-badge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  white-space: nowrap;
}

.segment-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-gear-segment {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-gear-segment:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-primary);
  color: #fff;
  transform: rotate(30deg);
}

.segment-title {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.segment-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 14px;
}

.segment-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.segment-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* =========================================================================
   FORMULÁRIOS & BOTÕES LIQUID GLASS
   ========================================================================= */
.broadcast-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(22, 17, 42, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  transition: var(--transition-smooth);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-primary-light);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.3);
  background: rgba(30, 22, 58, 0.85);
}

.form-textarea {
  min-height: 95px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 50%, #ec4899 100%);
  color: white;
  box-shadow: var(--shadow-glow-purple);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
  background: rgba(26, 20, 48, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(42, 32, 78, 0.9);
  border-color: var(--border-active);
}

.btn-date-preset.active {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

/* Tags */
.tag {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.tag-highlight {
  background: rgba(139, 92, 246, 0.16);
  color: var(--brand-primary-light);
  border-color: rgba(139, 92, 246, 0.35);
}

.tag-city {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

/* =========================================================================
   PHONE MOCKUP PREVIEW (DISPLAY REALISTA COM LIQUID GLASS)
   ========================================================================= */
.phone-mockup-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup {
  width: 295px;
  height: 550px;
  background: #000;
  border-radius: 40px;
  border: 8px solid #231b3d;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), var(--shadow-glow-purple);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 110px;
  height: 18px;
  background: #231b3d;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

.phone-screen {
  flex: 1;
  background: linear-gradient(180deg, #1e1338 0%, #0c0818 100%);
  padding: 38px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

.phone-lock-time {
  text-align: center;
  color: white;
  margin-top: 8px;
  margin-bottom: 22px;
}

.phone-lock-time .time {
  font-family: 'Geist', sans-serif;
  font-size: 38px;
  font-weight: 300;
  letter-spacing: -1px;
}

.phone-lock-time .date {
  font-size: 11.5px;
  opacity: 0.8;
}

.push-notification-preview {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 13px;
  color: #1e1338;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

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

.push-app-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.push-app-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.push-app-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.push-app-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e1338;
}

.push-time {
  font-size: 10px;
  color: #64748b;
}

.push-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.push-body {
  font-size: 11.5px;
  color: #334155;
  line-height: 1.35;
}

.inapp-banner-preview {
  background: rgba(26, 20, 48, 0.95);
  border: 1px solid var(--border-active);
  border-radius: 16px;
  padding: 16px;
  color: white;
  margin-top: 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.inapp-banner-img {
  width: 100%;
  min-height: 75px;
  max-height: 120px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(14, 10, 27, 0.6);
}

.inapp-brand-logo-img {
  width: 100%;
  height: 100%;
  max-height: 110px;
  object-fit: cover;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.inapp-brand-logo-img.is-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.inapp-banner-btn {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: white;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  padding: 9px;
  border-radius: 8px;
  margin-top: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.inapp-banner-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* =========================================================================
   GATILHOS, CUPONS, ADMIN & SANDBOX
   ========================================================================= */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.triggers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trigger-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  transition: var(--transition-smooth);
}

.trigger-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow-purple);
}

.trigger-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.trigger-info h3 {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.trigger-info p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Switch Component */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  border-color: var(--brand-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Tabelas */
.coupons-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.coupons-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}

.coupons-table td {
  padding: 14px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.coupon-code {
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  color: var(--brand-primary-light);
  background: rgba(139, 92, 246, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px dashed rgba(139, 92, 246, 0.4);
}

/* Sandbox Console */
.sandbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.console-output {
  background: #040308;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  color: #34d399;
  min-height: 300px;
  max-height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.55;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(22, 17, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

@media (max-width: 992px) {
  .sidebar {
    width: 65px;
  }
  .sidebar-header .logo-text, .nav-item span, .nav-section-title, .sidebar-footer, .sidebar-fleet-pill {
    display: none;
  }
  .main-wrapper {
    margin-left: 65px;
  }
  .dashboard-main-grid, .broadcast-layout, .sandbox-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ROD CLUB — CARTÃO DIGITAL DE FIDELIDADE & MURO DE RETENÇÃO (HIPÓTESES 1 & 3)
   ========================================================================== */

/* Cartão Virtual de Membro VIP */
.rod-loyalty-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 250px;
  border-radius: 20px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(30, 20, 55, 0.9) 0%, rgba(15, 10, 30, 0.95) 50%, rgba(45, 25, 75, 0.85) 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.25);
  overflow: hidden;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rod-loyalty-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(139, 92, 246, 0.4);
}

.card-hologram-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(236, 72, 153, 0.12) 50%,
    rgba(56, 189, 248, 0.12) 55%,
    transparent 70%
  );
  transform: rotate(25deg);
  pointer-events: none;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.card-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-brand-logo img {
  height: 32px;
  border-radius: 6px;
}

.card-brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, #e9d5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-chip {
  width: 44px;
  height: 32px;
  background: linear-gradient(135deg, #d4af37 0%, #f6e27a 45%, #cb9b2a 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.4);
}

.card-chip::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.25);
}

.card-chip::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.25);
}

.card-middle-row {
  position: relative;
  z-index: 2;
  margin: 18px 0;
}

.card-number-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.card-number-value {
  font-family: 'Fira Code', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.card-member-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
}

.card-tier-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

/* Variações de Tiers do Cartão */
.tier-bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(205, 127, 50, 0.05));
  color: #f6ad55;
  border-color: rgba(205, 127, 50, 0.4);
}

.tier-prata {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.25), rgba(148, 163, 184, 0.05));
  color: #e2e8f0;
  border-color: rgba(203, 213, 225, 0.4);
}

.tier-ouro {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.05));
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
}

.tier-diamante {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(139, 92, 246, 0.15));
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
}

.tier-embaixador {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.2));
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.5);
}

/* O Muro de Retenção (Barra de Progresso de Viagens) */
.muro-retention-box {
  background: rgba(22, 17, 42, 0.85);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

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

.muro-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.muro-progress-container {
  margin: 18px 0 10px 0;
}

.muro-progress-bar-bg {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.muro-progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 70%, #38bdf8 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.muro-stages-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Grid de Cards de Passageiros (Alternativa moderna à tabela) */
.customers-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.customer-profile-card {
  background: rgba(22, 17, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.customer-profile-card:hover {
  border-color: var(--border-active);
  background: rgba(30, 22, 58, 0.85);
  box-shadow: var(--shadow-md), var(--shadow-glow-purple);
  transform: translateY(-2px);
}

.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.customer-avatar-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.customer-card-body {
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.customer-card-stat-pill {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.customer-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mural de Novidades & Campanhas (Feed) */
.mural-feed-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.mural-card-item {
  background: rgba(20, 15, 38, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.mural-card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-primary);
}

.mural-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* ==========================================================================
   METAS & BENEFÍCIOS (ROD CLUB GAMIFICATION)
   ========================================================================== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.benefit-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow-purple);
}

.benefit-card.active-goal {
  border-left: 4px solid var(--brand-primary);
}

.benefit-card.inactive-goal {
  opacity: 0.65;
  border-left: 4px solid var(--text-muted);
}

.benefit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.benefit-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.benefit-target-badge {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--brand-primary-light);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.benefit-reward-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.benefit-coupon-prefix {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-accent);
}

.benefit-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  font-size: 12px;
}

/* ==========================================================================
   MODAL GENÉRICO PARA CRIAÇÃO DE METAS & CADASTRO DE GESTOR
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 3, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-active);
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   2FA TOTP SETUP & RECOVERY CODES
   ========================================================================== */
.totp-secret-box {
  background: rgba(139, 92, 246, 0.1);
  border: 1px dashed var(--border-active);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.totp-secret-key {
  font-family: 'Fira Code', monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand-primary-light);
  margin: 8px 0;
  user-select: all;
}

.recovery-codes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.recovery-code-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 8px;
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  color: var(--gold-light);
  text-align: center;
}

/* ==========================================================================
   MODO CLARO (LIGHT MODE) — COMPONENTES DE ALTO CONTRASTE
   ========================================================================== */
[data-theme="light"] .sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  backdrop-filter: blur(12px) !important;
}

[data-theme="light"] .stat-card,
[data-theme="light"] .chart-card,
[data-theme="light"] .feed-card,
[data-theme="light"] .form-card,
[data-theme="light"] .admin-card,
[data-theme="light"] .benefit-card,
[data-theme="light"] .trigger-card,
[data-theme="light"] .filters-bar-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .stat-card:hover,
[data-theme="light"] .benefit-card:hover,
[data-theme="light"] .trigger-card:hover {
  border-color: #8b5cf6 !important;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12) !important;
}

[data-theme="light"] .stat-card::before,
[data-theme="light"] .chart-card::before,
[data-theme="light"] .form-card::before,
[data-theme="light"] .admin-card::before {
  display: none !important;
}

[data-theme="light"] .stat-card-title {
  color: #64748b !important;
  font-weight: 600 !important;
}

[data-theme="light"] .stat-value {
  color: #0f172a !important;
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .coupons-table {
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .coupons-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .coupons-table td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}

[data-theme="light"] .coupons-table tbody tr:hover {
  background: #f8fafc !important;
}

[data-theme="light"] .tag {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .tag-city {
  background: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.2) !important;
}

[data-theme="light"] .tag-highlight {
  background: rgba(124, 58, 237, 0.08) !important;
  color: #7c3aed !important;
  border-color: rgba(124, 58, 237, 0.2) !important;
}

[data-theme="light"] .modal-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-title span {
  color: #0f172a !important;
}

[data-theme="light"] .nav-item {
  color: #475569 !important;
}

[data-theme="light"] .nav-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="light"] .nav-item.active {
  background: rgba(124, 58, 237, 0.1) !important;
  color: #7c3aed !important;
  border-left-color: #7c3aed !important;
}

[data-theme="light"] .console-output {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

/* ==========================================================================
   OTIMIZAÇÃO MOBILE (SMARTPHONES E TABLETS)
   ========================================================================== */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 99;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    z-index: 100 !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.6) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .mobile-backdrop.active {
    display: block !important;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 12px 10px 40px !important;
  }

  .header {
    padding: 10px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .header-actions {
    gap: 6px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .modal-box {
    width: 95% !important;
    max-width: 95% !important;
    padding: 16px !important;
    margin: 10px !important;
  }

  .coupons-table th, .coupons-table td {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
  }

  .btn {
    min-height: 40px;
  }
}

