/* ====================================================
   GANAYA — Diseño Rifa Festivo Premium
   ==================================================== */

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

:root {
  /* Paleta Ganaya - Violeta eléctrico + Dorado */
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a855f7;
  --primary-50: #f5f0ff;
  --primary-100: #ede4ff;

  --gold: #f59e0b;
  --gold-dark: #d97706;
  --gold-light: #fcd34d;

  /* Colores secundarios */
  --accent: #ec4899;
  --success: #16a34a;
  --info: #06b6d4;
  --warning: #f59e0b;
  --danger: #e11d48;
  --dark: #1a0b33;

  /* Grises (violeta sutil) */
  --gray-50: #faf8ff;
  --gray-100: #f3eefc;
  --gray-200: #e7ddf6;
  --gray-300: #cbbce6;
  --gray-400: #9b86c4;
  --gray-500: #6e5b93;
  --gray-600: #4f4070;
  --gray-700: #382c54;
  --gray-800: #241a3c;
  --gray-900: #1a0b33;

  /* Gradientes festivos */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
  --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-success: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-danger: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  --gradient-info: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --gradient-mystic: linear-gradient(135deg, #6d28d9 0%, #a855f7 45%, #ec4899 100%);
  --gradient-cosmic: linear-gradient(135deg, #1a0b33 0%, #4c1d95 50%, #7c3aed 100%);
  --gradient-sunset: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #7c3aed 100%);

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(76, 29, 149, 0.05);
  --shadow: 0 1px 3px rgba(76, 29, 149, 0.1), 0 1px 2px rgba(76, 29, 149, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(76, 29, 149, 0.1), 0 2px 4px -1px rgba(76, 29, 149, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(76, 29, 149, 0.15), 0 4px 6px -2px rgba(76, 29, 149, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(76, 29, 149, 0.2), 0 10px 10px -5px rgba(76, 29, 149, 0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(76, 29, 149, 0.3);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.4);
  --shadow-gold: 0 0 30px rgba(245, 158, 11, 0.4);

  /* Border radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
  min-height: 100vh;
}

/* ====================================================
   LAYOUT GENERAL
   ==================================================== */

.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1a0b33 0%, #4c1d95 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  padding: 24px 16px;
  transition: transform 0.3s ease;
  border-right: 1px solid rgba(251, 191, 36, 0.1);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(124,58,237,0.2) 0%, transparent 50%);
  pointer-events: none;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 2px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

.sidebar-brand-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
  animation: float-icon 4s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.sidebar-brand-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-section {
  margin-top: 20px;
  margin-bottom: 8px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(251, 191, 36, 0.6);
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-link i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.sidebar-link:hover {
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: rgba(124, 58, 237, 0.35);
  color: white;
  font-weight: 600;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--gold);
  border-radius: 0 4px 4px 0;
}

.sidebar-link .badge {
  margin-left: auto;
  background: var(--gradient-gold);
  color: var(--gray-900);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}

.sidebar-user {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(251, 191, 36, 0.1);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(251, 191, 36, 0.1);
  border-radius: var(--radius);
  text-decoration: none;
  color: white;
  transition: all 0.2s;
}

.user-card:hover {
  background: rgba(124, 58, 237, 0.2);
  color: white;
  border-color: rgba(251, 191, 36, 0.3);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.5);
}

.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 11px;
  color: var(--gold);
  text-transform: capitalize;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--gray-50);
}

.topbar {
  background: white;
  padding: 16px 32px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}

.topbar-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  letter-spacing: -0.02em;
}

.topbar-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
}

.page-container {
  padding: 28px 32px;
  max-width: 1600px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-700);
  cursor: pointer;
}

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); box-shadow: var(--shadow-2xl); }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: block; }
  .page-container { padding: 16px; }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 16, 51, 0.7);
  z-index: 99;
}

.sidebar-overlay.show { display: block; }

/* ====================================================
   CARDS PREMIUM
   ==================================================== */

.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary-100);
}

.card-header {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 18px 22px;
  font-weight: 600;
}

.card-body { padding: 22px; }

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-100);
}

.stat-card:hover::before { opacity: 1; }

.stat-card-primary::before { background: var(--gradient-primary); }
.stat-card-success::before { background: var(--gradient-success); }
.stat-card-warning::before { background: var(--gradient-gold); }
.stat-card-info::before { background: var(--gradient-info); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  background: var(--primary-50);
  color: var(--primary);
}

.stat-icon-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon-warning { background: rgba(251, 191, 36, 0.15); color: var(--gold-dark); }
.stat-icon-info { background: rgba(6, 182, 212, 0.1); color: var(--info); }
.stat-icon-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 8px;
}

.stat-change-up { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-change-down { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* ====================================================
   BOTONES MÍSTICOS
   ==================================================== */

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: -0.01em;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.btn-gold {
  background: var(--gradient-gold);
  color: var(--gray-900);
  border-color: var(--gold);
}

.btn-gold:hover {
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  border-color: var(--success);
}

.btn-success:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.btn-info {
  background: var(--gradient-info);
  color: white;
  border-color: var(--info);
}

.btn-info:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.35);
}

.btn-warning {
  background: var(--gradient-gold);
  color: var(--gray-900);
  border-color: var(--gold);
}

.btn-warning:hover {
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.35);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-outline-secondary {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-outline-secondary:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-400);
}

.btn-outline-primary {
  background: white;
  color: var(--primary);
  border-color: var(--primary-100);
}

.btn-outline-primary:hover {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-group .btn { border-radius: var(--radius-sm); }

/* ====================================================
   FORMULARIOS
   ==================================================== */

.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control, .form-select {
  font-family: inherit;
  font-size: 14.5px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  color: var(--gray-900);
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
  outline: none;
}

.form-control:hover:not(:focus), .form-select:hover:not(:focus) {
  border-color: var(--gray-300);
}

.form-control::placeholder { color: var(--gray-400); }
.form-control-lg, .form-select-lg { font-size: 15px; padding: 13px 16px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ====================================================
   TABLAS
   ==================================================== */

.table {
  margin: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  color: var(--gray-800);
}

.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: var(--primary-50); cursor: pointer; }
.table tbody tr:last-child td { border-bottom: none; }

/* ====================================================
   BADGES
   ==================================================== */

.badge {
  font-family: inherit;
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
}

.bg-secondary { background: #f3eefa !important; color: #6b5b8e !important; border-color: #e9dff5; }
.bg-info { background: rgba(6, 182, 212, 0.1) !important; color: #0e7490 !important; border-color: rgba(6, 182, 212, 0.2); }
.bg-primary { background: rgba(124, 58, 237, 0.1) !important; color: #6d28d9 !important; border-color: rgba(124, 58, 237, 0.2); }
.bg-warning { background: rgba(251, 191, 36, 0.15) !important; color: #92400e !important; border-color: rgba(251, 191, 36, 0.3); }
.bg-success { background: rgba(16, 185, 129, 0.1) !important; color: #065f46 !important; border-color: rgba(16, 185, 129, 0.2); }
.bg-danger { background: rgba(239, 68, 68, 0.1) !important; color: #991b1b !important; border-color: rgba(239, 68, 68, 0.2); }
.bg-dark { background: rgba(26, 16, 51, 0.1) !important; color: #1a1033 !important; border-color: rgba(26, 16, 51, 0.2); }

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

.status-dot-success { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.status-dot-warning { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.2); animation: pulse-glow 2s infinite; }
.status-dot-danger { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }
.status-dot-entrada { background: #10b981; }
.status-dot-salida { background: #ef4444; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0.1); }
}

/* ====================================================
   AVATARES MÍSTICOS
   ==================================================== */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 28px; }

.avatar-1 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.avatar-2 { background: linear-gradient(135deg, #fbbf24, #ec4899); }
.avatar-3 { background: linear-gradient(135deg, #06b6d4, #7c3aed); }
.avatar-4 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.avatar-5 { background: linear-gradient(135deg, #f59e0b, #7c3aed); }
.avatar-6 { background: linear-gradient(135deg, #a855f7, #1a1033); }
.avatar-7 { background: linear-gradient(135deg, #ec4899, #fbbf24); }
.avatar-8 { background: linear-gradient(135deg, #7c3aed, #06b6d4); }
.avatar-9 { background: linear-gradient(135deg, #fbbf24, #ef4444); }
.avatar-10 { background: linear-gradient(135deg, #1a1033, #7c3aed); }

/* ====================================================
   PROGRESS
   ==================================================== */

.progress {
  background: var(--gray-100);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  background: var(--gradient-primary);
  border-radius: 20px;
  transition: width 0.6s ease;
}

/* ====================================================
   TIMELINE
   ==================================================== */

.timeline-item {
  position: relative;
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: all 0.2s;
}

.timeline-item:hover {
  border-color: var(--primary-100);
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

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

.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.timeline-icon-nota { background: rgba(124,58,237,0.1); color: var(--primary); }
.timeline-icon-llamada { background: rgba(16,185,129,0.1); color: var(--success); }
.timeline-icon-whatsapp { background: rgba(34,197,94,0.1); color: #16a34a; }
.timeline-icon-email { background: rgba(6,182,212,0.1); color: var(--info); }
.timeline-icon-consulta_presencial { background: rgba(251,191,36,0.15); color: var(--gold-dark); }
.timeline-icon-consulta_online { background: rgba(236,72,153,0.1); color: var(--accent); }
.timeline-icon-cambio_estado { background: rgba(168,85,247,0.1); color: var(--primary-light); }

/* ====================================================
   ALERTAS
   ==================================================== */

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  display: flex;
  align-items: start;
  gap: 12px;
}

.alert-success { background: rgba(16, 185, 129, 0.08); color: #065f46; border-color: rgba(16, 185, 129, 0.2); }
.alert-danger { background: rgba(239, 68, 68, 0.08); color: #991b1b; border-color: rgba(239, 68, 68, 0.2); }
.alert-warning { background: rgba(251, 191, 36, 0.1); color: #92400e; border-color: rgba(251, 191, 36, 0.25); }
.alert-info { background: rgba(124, 58, 237, 0.08); color: #6d28d9; border-color: rgba(124, 58, 237, 0.2); }

/* ====================================================
   TABS
   ==================================================== */

.nav-tabs {
  border-bottom: 2px solid var(--gray-200);
  gap: 4px;
}

.nav-tabs .nav-link {
  color: var(--gray-500);
  font-weight: 600;
  font-size: 14px;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.2s;
}

.nav-tabs .nav-link:hover:not(.active) {
  color: var(--gray-700);
  background: var(--gray-50);
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  background: transparent;
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

.tab-content {
  background: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-top: none;
}

/* ====================================================
   MODALES
   ==================================================== */

.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
}

.modal-header {
  border-bottom: 1px solid var(--gray-100);
  padding: 20px 24px;
}

.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--gray-100); padding: 16px 24px; }

/* ====================================================
   BREADCRUMB Y PAGINATION
   ==================================================== */

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 18px;
  font-size: 13px;
}

.breadcrumb-item a {
  color: var(--gray-500);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--gray-700); font-weight: 600; }

.pagination { gap: 4px; }

.page-link {
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius) !important;
  padding: 6px 12px;
  background: white;
}

.page-link:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary);
}

.page-item.active .page-link {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: white;
}

/* ====================================================
   ANIMACIONES
   ==================================================== */

.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.slide-up { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.card { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }

/* ====================================================
   UTILIDADES
   ==================================================== */

.text-muted { color: var(--gray-500) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--gold-dark) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-gold { color: var(--gold-dark) !important; }

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

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

.divider { height: 1px; background: var(--gray-200); margin: 24px 0; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 64px;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.empty-state-text {
  color: var(--gray-500);
  font-size: 14px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14.5px;
  width: 100%;
  border: none;
  color: white;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.quick-action-btn:hover { transform: translateY(-2px); color: white; }

.quick-action-call {
  background: var(--gradient-success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.quick-action-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.quick-action-email {
  background: var(--gradient-info);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Lead profile header con tema místico */
.lead-profile-header {
  background: var(--gradient-mystic);
  color: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.lead-profile-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(251,191,36,0.2), transparent 70%);
  border-radius: 50%;
}

.lead-profile-header::after {
  content: '✨';
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  opacity: 0.3;
  animation: float-icon 4s ease-in-out infinite;
}

.lead-profile-header .avatar {
  border: 4px solid rgba(251,191,36,0.4);
  box-shadow: 0 0 30px rgba(251,191,36,0.3);
}

.search-box { position: relative; }
.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.search-box input { padding-left: 40px; }

.status-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 6px;
  border: 1.5px solid var(--gray-200);
  background: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.status-btn:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary-dark);
  transform: translateX(2px);
}

.status-btn-icon { font-size: 16px; }

@media print {
  .sidebar, .topbar, .btn { display: none !important; }
  .main-content { margin-left: 0; }
}

/* ====================================================
   TIMELINE PÚBLICO (estilo historial de caso)
   ==================================================== */

.public-body {
  background: var(--gray-50);
  min-height: 100vh;
}

.public-header {
  background: var(--gradient-cosmic);
  color: white;
  padding: 20px 0;
  box-shadow: var(--shadow-lg);
}

.public-brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-brand-icon {
  width: 42px; height: 42px;
  background: var(--gradient-gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(201,162,39,0.4);
}

/* Tarjeta de búsqueda */
.search-hero {
  background: var(--gradient-cosmic);
  color: white;
  padding: 60px 20px 90px;
  position: relative;
  overflow: hidden;
}
.search-hero::before {
  content: '⚖️';
  position: absolute;
  font-size: 280px;
  opacity: 0.04;
  right: -40px; top: 50%;
  transform: translateY(-50%);
}
.search-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  padding: 36px;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Línea de tiempo vertical */
.case-timeline {
  position: relative;
  padding-left: 8px;
}
.tl-item {
  position: relative;
  padding-left: 50px;
  padding-bottom: 28px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: 15px; top: 28px;
  bottom: -4px;
  width: 2px;
  background: var(--gray-200);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  position: absolute;
  left: 0; top: 2px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: white;
  border: 3px solid var(--gray-300);
  z-index: 1;
}
.tl-dot.done { border-color: var(--success); background: var(--success); color: white; }
.tl-dot.current {
  border-color: var(--gold);
  background: var(--gold);
  color: white;
  box-shadow: 0 0 0 5px rgba(201,162,39,0.2);
  animation: pulse-current 2s infinite;
}
@keyframes pulse-current {
  0%, 100% { box-shadow: 0 0 0 5px rgba(201,162,39,0.2); }
  50% { box-shadow: 0 0 0 10px rgba(201,162,39,0.05); }
}
.tl-content {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.tl-content:hover { box-shadow: var(--shadow-md); }
.tl-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tl-title { font-weight: 700; font-size: 15px; color: var(--gray-900); margin: 2px 0 4px; }
.tl-desc { font-size: 14px; color: var(--gray-600); line-height: 1.55; }

/* Barra de progreso de etapas (stepper horizontal) */
.stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 30px 0;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 18px; left: 5%; right: 5%;
  height: 3px;
  background: var(--gray-200);
  z-index: 0;
}
.stepper-fill {
  position: absolute;
  top: 18px; left: 5%;
  height: 3px;
  background: var(--gradient-gold);
  z-index: 1;
  transition: width 0.6s ease;
}
.step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}
.step-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  font-size: 16px;
  color: var(--gray-400);
}
.step.done .step-circle { border-color: var(--success); background: var(--success); color: white; }
.step.current .step-circle { border-color: var(--gold); background: var(--gold); color: white; box-shadow: 0 0 0 5px rgba(201,162,39,0.2); }
.step-label { font-size: 11px; font-weight: 600; color: var(--gray-500); line-height: 1.3; }
.step.done .step-label, .step.current .step-label { color: var(--gray-800); }

@media (max-width: 640px) {
  .step-label { display: none; }
  .search-card { padding: 24px; }
}

/* ====================================================
   GANAYA - Estilos públicos de rifa
   ==================================================== */

.public-body { background: var(--gray-50); min-height: 100vh; }

.pub-nav {
  background: var(--gradient-cosmic);
  color: white;
  padding: 14px 0;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-lg);
}
.pub-brand {
  font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Hero */
.rifa-hero {
  background: var(--gradient-cosmic);
  color: white;
  padding: 48px 0 60px;
  position: relative;
  overflow: hidden;
}
.rifa-hero::before, .rifa-hero::after {
  content: '🎉'; position: absolute; font-size: 120px; opacity: 0.08;
}
.rifa-hero::before { top: 10px; left: -20px; transform: rotate(-15deg); }
.rifa-hero::after { bottom: -20px; right: -10px; content: '🎁'; transform: rotate(15deg); }

.prize-badge {
  display: inline-block;
  background: var(--gradient-gold);
  color: #1a0b33;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 14px;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

.progress-ring {
  background: rgba(255,255,255,0.1);
  border-radius: 30px;
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.progress-ring-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 30px;
  transition: width 0.8s ease;
}

/* Botones grandes de modo */
.mode-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--gray-800);
  transition: all 0.25s;
  display: block;
  height: 100%;
}
.mode-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  color: var(--gray-900);
}
.mode-card-icon {
  font-size: 52px;
  margin-bottom: 12px;
  display: block;
}
.mode-card h4 { font-weight: 800; margin-bottom: 6px; }

/* Máquina de la suerte - números girando */
.lucky-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}
.lucky-digit {
  width: 68px; height: 90px;
  background: var(--gradient-cosmic);
  color: var(--gold-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 800;
  box-shadow: var(--shadow-lg), inset 0 -4px 12px rgba(0,0,0,0.3);
  border: 2px solid rgba(245,158,11,0.3);
}
.lucky-digit.spinning { animation: digit-spin 0.1s infinite; }
@keyframes digit-spin { 0%,100%{transform:translateY(-2px);} 50%{transform:translateY(2px);} }

/* Grilla / lista de números seleccionados */
.num-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-50);
  border: 1.5px solid var(--primary-100);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 18px;
  padding: 8px 14px;
  border-radius: var(--radius);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.num-chip.won { background: var(--gradient-gold); color: #1a0b33; border-color: var(--gold); }
.num-chip .rm { color: var(--danger); cursor: pointer; font-size: 14px; }

.num-big {
  font-size: 40px; font-weight: 800; letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

/* Ticket resultado */
.ticket-card {
  background: white;
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.ticket-card::before, .ticket-card::after {
  content: ''; position: absolute; width: 24px; height: 24px;
  background: var(--gray-50); border-radius: 50%; top: 50%; transform: translateY(-50%);
}
.ticket-card::before { left: -13px; }
.ticket-card::after { right: -13px; }

/* Payment box */
.pay-box {
  background: var(--gradient-cosmic);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  white-space: pre-line;
  font-size: 15px;
  line-height: 1.7;
}

/* Confetti (sutil, CSS puro) */
.confetti { position: fixed; top: -10px; width: 10px; height: 10px; opacity: 0.8; z-index: 9999; pointer-events: none; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0; } }

@media (max-width: 640px) {
  .lucky-digit { width: 54px; height: 72px; font-size: 36px; }
  .num-big { font-size: 32px; }
}

/* ====================================================
   GANAYA v2 - Diseño mejorado tipo rifa premium
   ==================================================== */

/* Hero mejorado */
.hero-v2 {
  background: var(--gradient-cosmic);
  position: relative;
  overflow: hidden;
  padding: 40px 0 50px;
}
.hero-v2::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(236,72,153,0.25), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(245,158,11,0.2), transparent 40%);
  pointer-events: none;
}
.hero-v2 .container { position: relative; z-index: 2; }

.prize-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 3px solid rgba(245,158,11,0.4);
}
.prize-image-wrap img { width: 100%; display: block; object-fit: cover; }
.prize-image-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--gradient-danger);
  color: white; font-weight: 800; font-size: 13px;
  padding: 6px 14px; border-radius: 30px;
  box-shadow: 0 6px 18px rgba(225,29,72,0.5);
  animation: badge-pulse 1.5s infinite;
}
@keyframes badge-pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.06);} }

/* Countdown */
.countdown {
  display: flex; gap: 10px; justify-content: center;
}
.cd-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-md);
  padding: 10px 6px; min-width: 66px; text-align: center;
  backdrop-filter: blur(4px);
}
.cd-num { font-size: 32px; font-weight: 800; color: var(--gold-light); line-height: 1; font-variant-numeric: tabular-nums; }
.cd-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; margin-top: 4px; }

/* Progreso grande con urgencia */
.progress-hot {
  height: 26px; border-radius: 30px; overflow: hidden;
  background: rgba(255,255,255,0.12); position: relative;
  border: 1px solid rgba(255,255,255,0.15);
}
.progress-hot-fill {
  height: 100%; border-radius: 30px;
  background: linear-gradient(90deg, #16a34a, #f59e0b, #e11d48);
  background-size: 200% 100%;
  animation: hot-shine 3s linear infinite;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 12px; color: white; font-weight: 800; font-size: 13px;
  transition: width 1s ease;
  min-width: 40px;
}
@keyframes hot-shine { to { background-position: 200% 0; } }

/* Paquetes de compra rápida */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.pkg-card {
  background: white; border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 22px 14px; text-align: center; text-decoration: none; color: var(--gray-800);
  transition: all 0.2s; position: relative; overflow: hidden;
}
.pkg-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-xl); color: var(--gray-900); }
.pkg-card.popular { border-color: var(--gold); box-shadow: 0 8px 30px rgba(245,158,11,0.25); }
.pkg-popular-tag {
  position: absolute; top: 0; right: 0;
  background: var(--gradient-gold); color: #1a0b33;
  font-size: 10px; font-weight: 800; padding: 3px 12px;
  border-bottom-left-radius: 10px;
}
.pkg-qty { font-size: 40px; font-weight: 800; color: var(--primary); line-height: 1; }
.pkg-qty-lbl { font-size: 13px; color: var(--gray-500); font-weight: 600; }
.pkg-price { margin-top: 8px; font-size: 18px; font-weight: 800; color: var(--gray-900); }
.pkg-card.popular .pkg-qty { color: var(--gold-dark); }

/* Sección confianza */
.trust-item {
  display: flex; align-items: center; gap: 14px;
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 16px;
}
.trust-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: var(--primary-50);
}

/* WhatsApp flotante */
.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: white; text-decoration: none;
  box-shadow: 0 8px 24px rgba(37,211,102,0.5);
  animation: wa-bounce 3s infinite;
}
.wa-float:hover { transform: scale(1.1); color: white; }
@keyframes wa-bounce { 0%,100%{transform:translateY(0);} 10%{transform:translateY(-6px);} 20%{transform:translateY(0);} }

/* Barra fija de total (jugar) */
.sticky-total {
  position: sticky; bottom: 0; z-index: 40;
  background: white; border-top: 2px solid var(--primary-100);
  box-shadow: 0 -6px 24px rgba(76,29,149,0.1);
  padding: 14px 0; margin-top: 20px;
}

/* FAQ */
.faq-item {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden;
}
.faq-q {
  padding: 16px 20px; font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-a { padding: 0 20px 16px; color: var(--gray-600); font-size: 14px; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-q .bi { transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-q .bi { transform: rotate(180deg); }

/* Números disponibles - mini stat pills en hero */
.hero-pill {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px; padding: 8px 18px; display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(4px);
}

/* ====================================================
   Combos + Video del premio
   ==================================================== */
.combo-card {
  background: white; border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 28px 22px; text-align: center; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.combo-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.combo-card-gold {
  border-color: var(--gold);
  box-shadow: 0 10px 40px rgba(245,158,11,0.28);
  background: linear-gradient(180deg, #fffdf7 0%, #ffffff 100%);
}
.combo-ribbon {
  position: absolute; top: 14px; right: -34px; transform: rotate(45deg);
  background: var(--gradient-gold); color: #1a0b33; font-weight: 800; font-size: 11px;
  padding: 4px 40px; box-shadow: 0 4px 10px rgba(245,158,11,0.4);
}
.combo-emoji { font-size: 52px; line-height: 1; margin-bottom: 6px; }
.combo-price { font-size: 2rem; font-weight: 800; color: var(--primary); margin: 4px 0 8px; }
.combo-card-gold .combo-price { color: var(--gold-dark); }
.combo-bonus-tag {
  background: linear-gradient(135deg, #fff7e6, #ffedd0);
  border: 1px dashed var(--gold); border-radius: var(--radius-md);
  padding: 10px 12px; font-size: 13px; color: #7a4b00; margin-bottom: 14px; line-height: 1.35;
}

/* Video responsivo 16:9 */
.video-wrap {
  position: relative; width: 100%; max-width: 760px;
  aspect-ratio: 16 / 9; border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 20px 50px rgba(76,29,149,0.25); background: #000;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Logo en el nav público */
.pub-logo { height: 40px; width: auto; display: block; }
@media (max-width: 576px){ .pub-logo { height: 32px; } }
