/*
 * Vision Cloud VIP — Ultra-Modern BlackCat Neon Design System
 * CEO: Menor Visionário | Suporte: +55 11 99533-8253
 * True Black (#000000) + Neon Lime Green (#32FF00) + Glassmorphism
 */

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

:root {
  --bg-primary:     #000000;
  --bg-secondary:   #0a0a0a;
  --bg-tertiary:    #111111;
  --bg-card:        #0d0d0d;
  --bg-card-hover:  #141414;
  --bg-input:       #080808;

  --border-subtle:  #1a1a1a;
  --border-color:   #1f1f1f;
  --border-accent:  rgba(50, 255, 0, 0.25);
  --border-focus:   #32FF00;

  --accent:         #32FF00;
  --accent-dim:     #1a8800;
  --accent-dark:    rgba(50, 255, 0, 0.08);
  --accent-glow:    rgba(50, 255, 0, 0.4);
  --accent-glow-lg: 0 0 35px rgba(50, 255, 0, 0.35);

  --text-primary:   #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted:     #52525B;
  --text-dim:       #71717A;

  --green:          #32FF00;
  --purple:         #A855F7;
  --blue:           #3B82F6;
  --orange:         #F59E0B;
  --red:            #EF4444;
  --cyan:           #06B6D4;

  --radius-sm:      8px;
  --radius:         14px;
  --radius-lg:      20px;
  --radius-full:    9999px;

  --sidebar-w:      260px;
  --transition:     all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --font-main:      'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(50, 255, 0, 0.07) 0%, transparent 60%),
    linear-gradient(rgba(50, 255, 0, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50, 255, 0, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #262626; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Typography */
h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.025em; color: #fff; }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
h3 { font-size: 1.2rem; font-weight: 700; color: #fff; }
h4 { font-size: 1rem; font-weight: 600; }

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================================
   SIDEBAR (True Black + Neon Accent)
   ======================================================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 1.25rem;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo i {
  color: var(--accent);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

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

.nav-section {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
}

.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-item:hover i {
  color: var(--accent);
}

.nav-item.active {
  background: var(--accent-dark);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  font-weight: 700;
}

.nav-item.active i {
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dark);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 800;
}

.logout-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

/* ========================================================
   MAIN CONTENT & TOPBAR
   ======================================================== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 36px 60px;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-w));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1.25rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 999;
}

/* ========================================================
   CARDS & GRIDS
   ======================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.stat-card:hover::after {
  background: var(--accent);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-card.accent-green .stat-icon { background: rgba(50, 255, 0, 0.1); color: var(--accent); }
.stat-card.accent-blue .stat-icon { background: rgba(59, 130, 246, 0.1); color: var(--blue); }
.stat-card.accent-purple .stat-icon { background: rgba(168, 85, 247, 0.1); color: var(--purple); }
.stat-card.accent-orange .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--orange); }
.stat-card.accent-red .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--red); }
.stat-card.accent-cyan .stat-icon { background: rgba(6, 182, 212, 0.1); color: var(--cyan); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.content-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h3 i {
  color: var(--accent);
}

.card-body {
  padding: 22px;
}

/* ========================================================
   BUTTONS (BlackCat Neon Style)
   ======================================================== */
.btn-primary {
  background: var(--accent);
  color: #000000;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  transition: var(--transition);
  box-shadow: 0 0 20px var(--accent-glow);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--accent-glow);
  filter: brightness(1.08);
}

.btn-pill {
  border-radius: var(--radius-full);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.btn-green { background: var(--accent); color: #000; }
.btn-blue  { background: var(--blue); color: #fff; box-shadow: 0 0 15px rgba(59, 130, 246, 0.3); }
.btn-purple{ background: var(--purple); color: #fff; box-shadow: 0 0 15px rgba(168, 85, 247, 0.3); }
.btn-red   { background: var(--red); color: #fff; }
.btn-full  { width: 100%; }

/* ========================================================
   FORMS & INPUTS
   ======================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(50, 255, 0, 0.15);
  background: var(--bg-card);
}

/* ========================================================
   TABLES
   ======================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
}

table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ========================================================
   BADGES & STATUS DOTS
   ======================================================== */
.badge-green  { background: rgba(50, 255, 0, 0.12); color: var(--accent); border: 1px solid rgba(50, 255, 0, 0.25); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-blue   { background: rgba(59, 130, 246, 0.12); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.25); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.25); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-orange { background: rgba(245, 158, 11, 0.12); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.25); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-red    { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.25); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px var(--accent); }
  50% { box-shadow: 0 0 12px var(--accent), 0 0 20px var(--accent-glow); }
}

/* ========================================================
   ALERTS
   ======================================================== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: rgba(50, 255, 0, 0.1);
  border: 1px solid rgba(50, 255, 0, 0.3);
  color: var(--accent);
}
.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ========================================================
   TOP LIST & VOUCHERS
   ======================================================== */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.top-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.top-rank {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
  width: 30px;
}
.top-query {
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.codes-generated {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.code-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-weight: 700;
}
.code-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}
.code-copy:hover { color: var(--accent); }

/* ========================================================
   RESPONSIVE BREAKPOINTS (Mobile-First)
   ======================================================== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .main-content {
    margin-left: 0;
    max-width: 100vw;
    padding: 20px 16px 60px;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .content-grid-2 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
