/* ==========================================
   CSS GLOBAL Y SISTEMA DE DISEÑO (DARK MODE)
   CRM Mohavision - Estilo Premium y Minimalista
   ========================================== */

:root {
  /* Paleta de Colores Metálica y Oscura */
  --bg-primary: #09090b;       /* Fondo oscuro profundo */
  --bg-secondary: #18181b;     /* Fondo de tarjetas y paneles */
  --bg-tertiary: #27272a;      /* Bordes y elementos de control */
  
  --text-primary: #f4f4f5;     /* Texto de alto contraste */
  --text-secondary: #a1a1aa;   /* Texto secundario/desvanecido */
  
  --accent-white: #ffffff;     /* Acento principal */
  --accent-gray: #3f3f46;      /* Acento secundario */

  /* Colores Semánticos Premium (Urgencia) */
  /* Activo (Verde) */
  --color-active-bg: rgba(6, 78, 59, 0.4);
  --color-active-border: #059669;
  --color-active-text: #a7f3d0;

  /* Por Vencer (Amarillo) */
  --color-warning-bg: rgba(120, 53, 15, 0.4);
  --color-warning-border: #d97706;
  --color-warning-text: #fef3c7;

  /* Vencido (Rojo) */
  --color-expired-bg: rgba(127, 29, 29, 0.4);
  --color-expired-border: #dc2626;
  --color-expired-text: #fecaca;

  /* VIP (Azul) y En Riesgo (Gris) */
  --color-vip-bg: rgba(30, 58, 138, 0.4);
  --color-vip-border: #3b82f6;
  --color-vip-text: #dbeafe;

  --color-risk-bg: rgba(63, 63, 70, 0.4);
  --color-risk-border: #71717a;
  --color-risk-text: #e4e4e7;

  /* Fuentes y Bordes */
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* --- Reseteo Estándar --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Quita el destello al tocar en móvil */
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Contenedor Principal (Límite de ancho para Desktop, fluido en Móvil) */
.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* --- Header Estilo Premium --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bg-tertiary);
  margin-bottom: 24px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.app-logo {
  height: 48px;
  object-fit: contain;
}

/* --- Botones --- */
button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  outline: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--accent-white);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.btn-primary:hover, .btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--bg-tertiary);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 500;
}

.btn-secondary:hover, .btn-secondary:active {
  background-color: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.btn-cancel {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  width: 100%;
}

.btn-cancel:hover {
  background-color: var(--accent-gray);
  color: var(--text-primary);
}

.btn-submit {
  background-color: var(--accent-white);
  color: var(--bg-primary);
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
}

.btn-submit:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  padding: 4px 8px;
}

/* --- Dashboard / Tarjetas de Métricas --- */
.dashboard-section {
  margin-bottom: 24px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
  gap: 12px;
}

@media (min-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columnas en desktop */
  }
}

.metric-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-gray);
}

.metric-card.highlight::before {
  background-color: var(--text-primary);
}

.metric-card.profit::before {
  background-color: var(--color-active-border);
}

.metric-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .metric-value {
    font-size: 1.8rem;
  }
}

.metric-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.metric-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.status-dot.green { background-color: var(--color-active-border); }
.status-dot.red { background-color: var(--color-expired-border); }

/* --- Buscador y Chips de Filtro --- */
.controls-section {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .controls-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.search-bar-container {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-bar-container input {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-bar-container input:focus {
  border-color: var(--text-secondary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

#btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.filters-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 12px;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.filters-container::-webkit-scrollbar {
  display: none; /* Oculta la barra de scroll en Chrome/Safari/Safari iOS */
}

.filter-chip {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  white-space: nowrap;
}

.filter-chip.active {
  background-color: var(--accent-white);
  color: var(--bg-primary);
  border-color: var(--accent-white);
  font-weight: 600;
}

/* --- Listado de Clientes --- */
.content-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 16px;
  box-shadow: var(--shadow-premium);
  position: relative;
  min-height: 200px;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title-bar h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.badge-count {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 2px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Adaptación responsiva básica */
.clients-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Premium para la tabla */
.clients-wrapper::-webkit-scrollbar {
  height: 6px;
}
.clients-wrapper::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--border-radius-sm);
}
.clients-wrapper::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
}
.clients-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.clients-table {
  display: none; /* Se oculta en móvil */
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.clients-cards-list {
  display: flex; /* Se muestra en móvil */
  flex-direction: column;
  gap: 12px;
}

/* --- Vista Móvil (Tarjetas) --- */
.client-mobile-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
  position: relative;
}

.client-mobile-card.urgent-expired {
  border-left: 4px solid var(--color-expired-border);
}
.client-mobile-card.urgent-warning {
  border-left: 4px solid var(--color-warning-border);
}
.client-mobile-card.urgent-active {
  border-left: 4px solid var(--color-active-border);
}
.client-mobile-card.urgent-vip {
  border-left: 4px solid var(--color-vip-border);
}
.client-mobile-card.urgent-risk {
  border-left: 4px solid var(--color-risk-border);
  opacity: 0.55;
  filter: grayscale(30%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.client-mobile-card.urgent-risk:hover {
  opacity: 1;
  filter: none;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title-block {
  display: flex;
  flex-direction: column;
}

.card-client-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.card-client-code {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Badge del Estado */
.status-badge {
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge.active {
  background-color: var(--color-active-bg);
  border: 1px solid var(--color-active-border);
  color: var(--color-active-text);
}

.status-badge.warning {
  background-color: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning-text);
}

.status-badge.expired {
  background-color: var(--color-expired-bg);
  border: 1px solid var(--color-expired-border);
  color: var(--color-expired-text);
}

.status-badge.vip {
  background-color: var(--color-vip-bg);
  border: 1px solid var(--color-vip-border);
  color: var(--color-vip-text);
}

.status-badge.risk {
  background-color: var(--color-risk-bg);
  border: 1px solid var(--color-risk-border);
  color: var(--color-risk-text);
}

.link-whatsapp {
  color: #f97316; /* Naranja claro de Xhuba */
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.link-whatsapp:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.social-link-table {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.social-link-table:hover {
  text-decoration: underline;
  color: #f97316;
}

.social-text-table {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.card-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

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

.info-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.info-value {
  color: var(--text-primary);
  font-weight: 500;
}

.card-comments {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  border-left: 2px solid var(--accent-gray);
  margin-top: 2px;
  word-break: break-word;
}

.card-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

/* Botones de acción móvil */
.btn-action {
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--bg-tertiary);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-action:active {
  background-color: var(--bg-tertiary);
}

.btn-action.renew-btn {
  background-color: var(--accent-white);
  color: var(--bg-primary);
  border-color: var(--accent-white);
}

.btn-action.message-btn {
  background-color: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}

.btn-action.message-btn:active {
  background-color: rgba(37, 211, 102, 0.3);
}

.btn-action.visita-btn {
  background-color: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.3);
}

.btn-action.visita-btn:active {
  background-color: rgba(249, 115, 22, 0.3);
}

/* Selector múltiple de etiquetas de comida */
.tag-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--bg-tertiary);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  user-select: none;
}
.tag-pill:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.tag-pill.selected {
  background-color: rgba(249, 115, 22, 0.15);
  border-color: #f97316;
  color: #f97316;
}

/* --- Vista Desktop (Tabla) - Solo media query --- */
@media (min-width: 768px) {
  .clients-cards-list {
    display: none;
  }
  
  .clients-wrapper {
    transform: rotateX(180deg);
  }

  .clients-table {
    display: table;
    transform: rotateX(180deg);
  }
  
  .clients-table th {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    padding: 12px 10px;
    border-bottom: 1px solid var(--bg-tertiary);
  }
  
  .clients-table td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
    vertical-align: middle;
  }
  
  .clients-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
  }
  
  /* Filas con borde de color según vencimiento */
  .clients-table tr.urgent-expired td:first-child {
    border-left: 3px solid var(--color-expired-border);
  }
  .clients-table tr.urgent-warning td:first-child {
    border-left: 3px solid var(--color-warning-border);
  }
  .clients-table tr.urgent-active td:first-child {
    border-left: 3px solid var(--color-active-border);
  }
  .clients-table tr.urgent-vip td:first-child {
    border-left: 3px solid var(--color-vip-border);
  }
  .clients-table tr.urgent-risk td:first-child {
    border-left: 3px solid var(--color-risk-border);
  }
  .clients-table tr.urgent-risk {
    opacity: 0.55;
    filter: grayscale(30%);
    transition: opacity 0.3s ease, filter 0.3s ease;
  }
  .clients-table tr.urgent-risk:hover {
    opacity: 1;
    filter: none;
  }
  
  .table-client-info {
    display: flex;
    flex-direction: column;
  }
  
  .table-client-name {
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .table-client-comment {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .table-actions {
    display: flex;
    gap: 6px;
  }

  .table-actions .btn-action {
    width: 76px;
    padding: 6px 0;
    text-align: center;
    flex-shrink: 0;
  }

  .clients-table td:nth-child(2) code {
    display: inline-block;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  /* Columna de Cliente Fija (Sticky) al hacer Scroll Horizontal */
  .clients-table th:first-child,
  .clients-table td:first-child {
    position: sticky;
    left: 0;
    background-color: var(--bg-secondary);
    z-index: 10;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.25);
  }

  .clients-table th:first-child {
    z-index: 11;
  }

  /* Mantener el color de hover en la columna fija */
  .clients-table tr:hover td:first-child {
    background-color: #1e1e21;
  }

  /* Columna de Acciones Fija (Sticky) a la Derecha */
  .clients-table th:last-child,
  .clients-table td:last-child {
    position: sticky;
    right: 0;
    background-color: var(--bg-secondary);
    z-index: 10;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.25);
  }

  .clients-table th:last-child {
    z-index: 11;
  }

  /* Mantener el color de hover en la columna fija de acciones */
  .clients-table tr:hover td:last-child {
    background-color: #1e1e21;
  }
}

/* --- Estados de Carga y Vacíos --- */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--text-secondary);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-white);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state p {
  margin-bottom: 16px;
}

/* --- MODALES Y CAPA SUPERPUESTA --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Abre desde abajo en móvil estilo iOS sheet */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0; /* Bordes superiores en móvil */
  width: 100%;
  max-width: 550px;
  padding: 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center; /* Centrado en pantallas grandes */
  }
  
  .modal-card {
    border-radius: var(--border-radius-lg); /* Bordes completos */
    transform: scale(0.9);
  }
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-close-modal {
  background: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-secondary);
}

/* Formulario en Modal */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .form-group-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--text-secondary);
  outline: none;
}

.field-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  margin-top: 12px;
}

/* Controles de renovación */
.renewal-client-summary {
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.renewal-client-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.renewal-client-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.renewal-client-dates {
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 6px;
}

.price-badge-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
}

.price-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.price-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- Cabecera: Acciones Agrupadas --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botón de Finanzas PWA "$" */
.btn-icon-finance {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--bg-tertiary);
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-md);
  font-size: 1.25rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.btn-icon-finance:hover, .btn-icon-finance:active {
  background-color: var(--bg-tertiary);
  border-color: var(--text-secondary);
  transform: scale(1.05);
}

/* --- Estado Suspendido (Opaco al final) --- */
.status-badge.suspended {
  background-color: rgba(63, 63, 70, 0.4);
  border: 1px solid #71717a;
  color: #d4d4d8;
}

.client-mobile-card.urgent-suspended {
  border-left: 4px solid #71717a;
  opacity: 0.5;
  filter: grayscale(40%);
}

@media (min-width: 768px) {
  .clients-table tr.urgent-suspended td {
    opacity: 0.55;
  }
  .clients-table tr.urgent-suspended td:first-child {
    border-left: 3px solid #71717a;
  }
}

/* --- Botón de Eliminar (Basura) --- */
.btn-action.delete-btn {
  background-color: rgba(220, 38, 38, 0.1);
  color: #ef4444;
  border-color: rgba(220, 38, 38, 0.2);
}

.btn-action.delete-btn:active {
  background-color: rgba(220, 38, 38, 0.25);
}

/* --- Historial Financiero Modal --- */
.finanzas-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.finanzas-month-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finanzas-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.finanzas-month-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-transform: capitalize;
}

.finanzas-profit-badge {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
}

.finanzas-profit-badge.positive {
  background-color: var(--color-active-bg);
  color: var(--color-active-text);
}

.finanzas-profit-badge.negative {
  background-color: var(--color-expired-bg);
  color: var(--color-expired-text);
}

.finanzas-month-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.finanzas-detail-box {
  display: flex;
  flex-direction: column;
}

.finanzas-detail-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.finanzas-detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.finanzas-detail-value.highlight-green {
  color: var(--color-active-border);
}

/* --- Ajustes Responsivos para Cabecera --- */
@media (max-width: 480px) {
  .app-logo {
    height: 38px;
  }
  
  .btn-primary {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .btn-icon-finance {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .btn-icon-hamburger {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    border-radius: 0;
    margin-right: 8px; /* Margen adicional para pantallas curvas */
  }
  
  .header-actions {
    gap: 8px;
  }
  
  .app-header {
    padding-bottom: 14px;
    margin-bottom: 18px;
  }
}

/* ==========================================================================
   NUEVOS ESTILOS: MENÚ HAMBURGUESA, DRAWER Y DASHBOARD DE DEPORTES DC9
   ========================================================================== */

/* Logo DC9 en Cabecera */
.app-logo-dc9 {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-family);
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: -2px;
  line-height: 1;
  transform: skewX(-12deg);
  user-select: none;
  height: 48px;
  padding: 0 4px;
}

.logo-dc9-dc {
  color: var(--text-primary);
}

.logo-dc9-nine {
  color: #00d4ff;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

@media (max-width: 480px) {
  .app-logo-dc9 {
    font-size: 1.8rem;
    height: 38px;
  }
}

/* Botón Hamburguesa Global */
.btn-icon-hamburger {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--bg-tertiary);
  width: 44px;
  height: 44px;
  border-radius: 0; /* Cuadrado perfecto */
  font-size: 1.25rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.btn-icon-hamburger:hover, .btn-icon-hamburger:active {
  background-color: var(--bg-tertiary);
  border-color: var(--text-secondary);
  transform: scale(1.05);
}

/* Menú Drawer Deslizante */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: flex-end;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content {
  background-color: rgba(24, 24, 27, 0.85); /* Fondo glassmorphism */
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 320px;
  height: 100vh;
  padding: 24px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-overlay.open .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.btn-close-drawer {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close-drawer:hover {
  color: var(--text-primary);
}

.drawer-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.menu-item.active .menu-label {
  color: var(--text-primary);
  font-weight: 600;
}

.menu-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.menu-item.disabled:hover {
  background-color: transparent;
  border-color: transparent;
}

.menu-icon {
  font-size: 1.25rem;
}

.menu-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Estilos para el Dashboard de Analíticas DC9 */
.dc9-detailed-analytics {
  margin-bottom: 24px;
}

.dc9-analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .dc9-analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dc9-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 20px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dc9-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.dc9-chart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dc9-chart-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dc9-chart-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dc9-chart-name {
  color: var(--text-primary);
}

.dc9-chart-bar-container {
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.03);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dc9-chart-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-gray) 0%, var(--text-secondary) 100%);
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Degradados semánticos de barras */
.dc9-chart-item:nth-child(1) .dc9-chart-bar-fill {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}
.dc9-chart-item:nth-child(2) .dc9-chart-bar-fill {
  background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
}
.dc9-chart-item:nth-child(3) .dc9-chart-bar-fill {
  background: linear-gradient(90deg, #ec4899 0%, #f472b6 100%);
}
.dc9-chart-item:nth-child(4) .dc9-chart-bar-fill {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}
.dc9-chart-item:nth-child(5) .dc9-chart-bar-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.dc9-empty-chart {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 20px 0;
  font-style: italic;
}

/* --- DC9 Métricas grid ampliada (8 tarjetas) --- */
.dc9-metrics-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .dc9-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- DC9 Card Description --- */
.dc9-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: -8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* --- DC9 Card Full Width --- */
.dc9-card-full {
  grid-column: 1 / -1;
}

/* ============================================
   DC9 PITCH SECTION (Executive Summary)
   ============================================ */
.dc9-pitch-section {
  margin-top: 24px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: 0 0 40px -10px rgba(139, 92, 246, 0.15);
}

.dc9-pitch-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.dc9-pitch-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dc9-pitch-subtitle {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.dc9-pitch-badge {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.dc9-pitch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 600px) {
  .dc9-pitch-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dc9-pitch-kpi {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  transition: var(--transition-smooth);
}

.dc9-pitch-kpi:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(139, 92, 246, 0.3);
}

.dc9-pitch-kpi-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.dc9-pitch-kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.dc9-pitch-kpi-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 2px;
}

/* ============================================
   DC9 PEAK INSIGHT Section
   ============================================ */
.dc9-peak-insight {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}

@media (min-width: 600px) {
  .dc9-peak-insight {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dc9-peak-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
}

.dc9-peak-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.dc9-peak-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1.2;
}

.dc9-peak-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ==========================================
   GUÍA DE INSTALACIÓN PWA (ANDROID E IOS)
   ========================================== */

/* Banner de Android / General Chrome */
.pwa-banner {
  position: fixed;
  bottom: -120px; /* Oculto inicialmente */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 450px;
  background: rgba(24, 24, 27, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.9);
  z-index: 99999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-banner.active {
  bottom: 20px; /* Se muestra con deslizamiento hacia arriba */
}

.pwa-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-icon img {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  display: block;
}

.pwa-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.pwa-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.pwa-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-pwa-install {
  background-color: #f97316; /* Naranja de Xhuba */
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-pwa-install:hover {
  background-color: #ea580c;
  transform: translateY(-1px);
}

.btn-pwa-close {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.btn-pwa-close:hover {
  color: var(--text-primary);
}

/* Modal de tutorial de iOS */
.ios-tutorial {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ios-tutorial.active {
  opacity: 1;
  pointer-events: auto;
}

.ios-card {
  width: 88%;
  max-width: 380px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-premium);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-tutorial.active .ios-card {
  transform: scale(1);
}

.ios-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 8px;
  text-align: center;
}

.ios-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.ios-icon {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

/* Botón de estadísticas en la cabecera */
.btn-stats {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--bg-tertiary);
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-stats:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

/* Modal de Estadísticas */
.modal-card-stats {
  width: 95%;
  max-width: 1100px;
  max-height: 90vh;
}

/* Pestañas (Tabs) */
.stats-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--bg-tertiary);
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stats-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.stats-tab-btn:hover {
  color: var(--text-primary);
}

.stats-tab-btn.active {
  color: var(--accent-white);
  border-bottom-color: #f97316; /* Naranja Xhuba */
  font-weight: 600;
}

/* Contenido de Pestañas */
.stats-tab-content {
  display: none;
}

.stats-tab-content.active {
  display: block;
}

/* Tarjetas de estadísticas */
.stats-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 20px;
}

.stats-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.stats-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

/* Contenedor de Gráficos de Barra Pura CSS */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-label {
  width: 90px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-bar-bg {
  flex: 1;
  height: 20px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.chart-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0; /* Animado en JS */
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

.chart-bar-fill.orange {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.15), rgba(249, 115, 22, 0.8));
  border-right: 2px solid #f97316;
}

.chart-bar-fill.green {
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.15), rgba(16, 185, 129, 0.8));
  border-right: 2px solid #10b981;
}

.chart-bar-fill.blue {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.8));
  border-right: 2px solid #3b82f6;
}

.chart-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-white);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Grilla de Columnas para Estadísticas */
.stats-grid-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .stats-grid-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablas de Ticket Promedio */
.table-container-stats {
  overflow-x: auto;
  margin-top: 8px;
}

.table-stats {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.table-stats th {
  padding: 8px 10px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--bg-tertiary);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.table-stats td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.table-stats tr:last-child td {
  border-bottom: none;
}

/* Nube de Etiquetas / Platillos */
.tag-cloud-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-cloud-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #f97316; /* Naranja Xhuba default */
}

/* Grilla de Redes Sociales */
.social-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.social-stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-icon-stats {
  font-size: 2rem;
  margin-bottom: 8px;
}

.social-count-stats {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.social-label-stats {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==========================================
   GRÁFICOS VERTICALES (PARA AFLUENCIA)
   ========================================== */

/* Contenedor del gráfico vertical */
.chart-vertical-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 220px;
  padding: 20px 0 35px 0;
  position: relative;
  border-bottom: 1px solid var(--bg-tertiary);
  margin-top: 10px;
  gap: 8px;
}

/* Columna del gráfico vertical */
.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

/* Barra vertical background */
.chart-bar-vertical-bg {
  width: 100%;
  max-width: 36px;
  background-color: var(--bg-secondary);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  height: 100%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.chart-bar-vertical-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  height: 0; /* Animación JS */
  transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  display: flex;
  justify-content: center;
}

.chart-bar-vertical-fill.orange {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.95), rgba(234, 88, 12, 0.15));
  border-top: 2px solid #f97316;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.2);
}

.chart-bar-vertical-fill.green {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.15));
  border-top: 2px solid #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.chart-bar-vertical-fill.blue {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.15));
  border-top: 2px solid #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

/* Valor flotante arriba de la columna */
.chart-col-value {
  position: absolute;
  top: -24px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Eje X etiqueta */
.chart-col-label {
  position: absolute;
  bottom: -26px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

