/*
 * Sender Vision — Design System
 * CEO: Menor Visionário | +55 11 99533-8253
 * Inspirado no BlackCatPay.com.br — Dark Premium + Neon Green
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

/* =========================================
   TOKENS
   ========================================= */
:root {
  --bg-primary:     #000000;
  --bg-secondary:   #0D0D0D;
  --bg-tertiary:    #111111;
  --bg-hover:       #161616;

  --border:         #1A1A1A;
  --border-accent:  rgba(50, 255, 0, 0.3);
  --border-subtle:  rgba(255, 255, 255, 0.05);

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

  --text:           #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted:     #52525B;
  --text-accent:    #32FF00;

  --success:        #32FF00;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #3B82F6;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --shadow-glow-lg: 0 0 40px var(--accent-glow), 0 0 80px rgba(50,255,0,0.1);

  --transition: 0.2s ease;
  --font: 'Inter', system-ui, sans-serif;

  --sidebar-width: 240px;
  --topbar-height: 60px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* =========================================
   TIPOGRAFIA
   ========================================= */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.7; }

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.text-xs  { font-size: 0.75rem; }
.text-sm  { font-size: 0.875rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }

/* =========================================
   LAYOUT
   ========================================= */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
.card-accent:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px rgba(50,255,0,0.06);
}
.card-glass {
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.card-metric {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card-metric:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 16px rgba(50,255,0,0.06);
}

/* =========================================
   BOTÕES
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.05rem; border-radius: var(--radius-lg); }

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow-lg);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-accent);
}
.btn-outline:hover { background: var(--accent-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: rgba(255,255,255,0.12); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { opacity: 0.85; }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-icon:hover { color: var(--text); border-color: rgba(255,255,255,0.12); }

/* =========================================
   INPUTS
   ========================================= */
.input, .select, .textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(50,255,0,0.1);
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input-group { display: flex; flex-direction: column; gap: 0.375rem; }
.input-label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }
.input-error { border-color: var(--danger); }
.input-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }

/* =========================================
   BADGES
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}
.badge-success { background: rgba(50,255,0,0.1); color: var(--accent); border: 1px solid rgba(50,255,0,0.2); }
.badge-warning { background: rgba(245,158,11,0.1); color: #F59E0B; border: 1px solid rgba(245,158,11,0.2); }
.badge-danger  { background: rgba(239,68,68,0.1); color: #EF4444; border: 1px solid rgba(239,68,68,0.2); }
.badge-info    { background: rgba(59,130,246,0.1); color: #3B82F6; border: 1px solid rgba(59,130,246,0.2); }
.badge-neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }

/* =========================================
   STATUS DOT
   ========================================= */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online  { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: pulse-dot 2s ease-in-out infinite; }
.status-dot.offline { background: var(--danger); }
.status-dot.warning { background: var(--warning); }
.status-dot.muted   { background: var(--text-muted); }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px var(--accent); }
  50%       { box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow); }
}

/* =========================================
   PROGRESS BAR
   ========================================= */
.progress { height: 6px; background: var(--bg-hover); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.5s ease;
}
.progress-sm { height: 4px; }
.progress-lg { height: 8px; }

/* =========================================
   TABELA
   ========================================= */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* =========================================
   DIVISOR / SEPARADOR
   ========================================= */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.divider-accent { height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }

/* =========================================
   TOOLTIP
   ========================================= */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
}

/* =========================================
   ICON BOX
   ========================================= */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-dark);
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.icon-box-sm { width: 32px; height: 32px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.icon-box-lg { width: 52px; height: 52px; font-size: 1.25rem; border-radius: var(--radius-lg); }
.icon-box-danger  { background: rgba(239,68,68,0.1); color: #EF4444; }
.icon-box-warning { background: rgba(245,158,11,0.1); color: #F59E0B; }
.icon-box-info    { background: rgba(59,130,246,0.1); color: #3B82F6; }

/* =========================================
   EFEITOS ESPECIAIS
   ========================================= */
.bg-grid {
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(rgba(50,255,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50,255,0,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}
.bg-radial-glow {
  background: radial-gradient(ellipse 80% 50% at 50% -5%, rgba(50,255,0,0.12) 0%, transparent 70%);
}
.bg-radial-glow-subtle {
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(50,255,0,0.07) 0%, transparent 60%);
}
.glow-text { text-shadow: 0 0 20px var(--accent-glow); }
.glow-border { border-color: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(50,255,0,0.15); }

/* =========================================
   ANIMAÇÕES
   ========================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.animate-fadeInUp    { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeIn      { animation: fadeIn 0.4s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.4s ease forwards; }
.animate-delay-1     { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2     { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3     { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4     { animation-delay: 0.4s; opacity: 0; }
.animate-delay-5     { animation-delay: 0.5s; opacity: 0; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* =========================================
   ALERTAS / NOTIFICAÇÕES
   ========================================= */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  border-left: 3px solid;
}
.alert-success { background: rgba(50,255,0,0.06); border-color: var(--accent); color: var(--text); }
.alert-warning { background: rgba(245,158,11,0.08); border-color: #F59E0B; }
.alert-danger  { background: rgba(239,68,68,0.08); border-color: #EF4444; }
.alert-info    { background: rgba(59,130,246,0.08); border-color: #3B82F6; }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.3s ease;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-title  { font-size: 1.1rem; font-weight: 700; }

/* =========================================
   DROPDOWN
   ========================================= */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 180px;
  z-index: 50;
  padding: 0.375rem;
  animation: fadeInUp 0.15s ease;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.08); color: #EF4444; }

/* =========================================
   ACCORDION (FAQ)
   ========================================= */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}
.accordion-item:hover { border-color: rgba(255,255,255,0.1); }
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem 1.25rem;
  background: var(--bg-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--bg-hover); }
.accordion-trigger.active { color: var(--accent); }
.accordion-icon { transition: transform 0.3s ease; color: var(--text-muted); }
.accordion-trigger.active .accordion-icon { transform: rotate(45deg); color: var(--accent); }
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: var(--bg-tertiary);
}
.accordion-content.open { max-height: 400px; }
.accordion-body { padding: 1rem 1.25rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* =========================================
   TABS
   ========================================= */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* =========================================
   TOGGLE / SWITCH
   ========================================= */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.toggle input:checked + .toggle-slider { background: rgba(50,255,0,0.15); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px) translateY(-50%);
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

/* =========================================
   UTILITÁRIOS
   ========================================= */
.p-0  { padding: 0; }
.p-1  { padding: 0.25rem; }
.p-2  { padding: 0.5rem; }
.p-3  { padding: 0.75rem; }
.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }
.p-8  { padding: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.rounded    { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* =========================================
   RESPONSIVO
   ========================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
  ::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) {
  .container, .container-wide { padding: 0 1rem; }
  .btn-xl { padding: 0.875rem 1.75rem; }
}
