/* Viralizate Reseller — Estilos globales */

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }

/* Badges de estado */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending    { background: #1f2937; color: #9ca3af; }
.badge-processing { background: #1c1917; color: #f59e0b; }
.badge-completed  { background: #052e16; color: #4ade80; }
.badge-cancelled  { background: #1f1515; color: #f87171; }
.badge-partial    { background: #1e1b4b; color: #818cf8; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Alertas */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.875rem; }
.alert-success { background: #052e16; color: #4ade80; border: 1px solid #166534; }
.alert-error   { background: #1f1515; color: #f87171; border: 1px solid #991b1b; }

/* ── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 256px;
  height: 100vh;
  z-index: 50;
  transition: left 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Botón cerrar sidebar (solo visible en mobile) */
.sidebar-close-btn { display: none; }

/* ── MOBILE HEADER ─────────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 40;
}

/* Overlay sidebar (fondo oscuro al abrir en mobile) */
#sidebarOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 49;
  -webkit-tap-highlight-color: transparent;
}

/* Bloqueo de scroll al abrir sidebar en iOS */
html.sidebar-open,
html.sidebar-open body {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 767px) {
  .mobile-header     { display: flex; }
  .sidebar-close-btn { display: block; }

  /* Sidebar oculto por defecto en mobile — sin flash */
  .sidebar { left: -280px; }

  main {
    margin-left: 0 !important;
    padding: 72px 16px 24px !important;
  }
}
