/* ========================================
   ESTILOS PERSONALIZADOS DEL DASHBOARD
   ======================================== */

/* Modal personalizado para alertas */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.custom-alert-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.custom-alert-box {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  position: relative;
}

.custom-alert-overlay.active .custom-alert-box {
  transform: scale(1);
}

.custom-alert-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
}

.custom-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.custom-alert-icon.info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.custom-alert-icon.success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.custom-alert-icon.warning {
  background: linear-gradient(135deg, #fdbe02 0%, #f59e0b 100%);
  color: white;
}

.custom-alert-icon.error {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
  color: white;
}

.custom-alert-content {
  flex: 1;
}

.custom-alert-title {
  font-family: 'Aristotelica Display Trial', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 6px 0;
}

.custom-alert-message {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5568;
  margin: 0;
}

.custom-alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.custom-alert-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-width: 90px;
}

.custom-alert-btn-primary {
  background: #fdbe02;
  color: #1a202c;
}

.custom-alert-btn-primary:hover {
  background: #e6a802;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(253, 190, 2, 0.4);
}

.custom-alert-btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.custom-alert-btn-secondary:hover {
  background: #cbd5e0;
}

/* Animación de entrada */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -60px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* ===== FILTERS HEADER MEJORADO ===== */
.date-filters-container {
  transition: all 0.3s ease;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.filters-header:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
  border-bottom-color: #cbd5e0;
}

.filters-header.active {
  background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
  border-bottom-color: #fdbe02;
}

.filters-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: 'Aristotelica Display Trial', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #2d3748;
  transition: color 0.3s ease;
}

.filters-header.active .filters-title {
  color: #1a202c;
}

.filters-title svg {
  width: 22px;
  height: 22px;
  color: #fdbe02;
  transition: transform 0.3s ease;
}

.filters-header:hover .filters-title svg {
  transform: scale(1.1);
}

.btn-toggle-filters {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-toggle-filters:hover {
  background: rgba(253, 190, 2, 0.1);
}

.btn-toggle-filters svg {
  width: 20px;
  height: 20px;
  color: #64748b;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-header.active .btn-toggle-filters svg {
  transform: rotate(180deg);
  color: #fdbe02;
}

/* Animación del contenido */
.filters-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 24px;
}

.filters-content.active {
  max-height: 2000px;
  opacity: 1;
  padding: 24px;
}

/* Badge de filtro activo */
.filter-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #fdbe02 0%, #f59e0b 100%);
  color: #1a202c;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .filters-header {
    padding: 16px 20px;
  }

  .filters-title {
    font-size: 16px;
    gap: 10px;
  }

  .filters-title svg {
    width: 20px;
    height: 20px;
  }

  .btn-toggle-filters svg {
    width: 18px;
    height: 18px;
  }

  .filters-content.active {
    padding: 20px;
  }

  .filter-active-badge {
    font-size: 11px;
    padding: 3px 10px;
    margin-left: 8px;
  }
}

@media (max-width: 640px) {
  .custom-alert-box {
    padding: 18px 20px;
    max-width: 92%;
  }

  .custom-alert-title {
    font-size: 16px;
  }

  .custom-alert-message {
    font-size: 13px;
  }

  .custom-alert-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .custom-alert-actions {
    margin-top: 14px;
    padding-top: 14px;
  }

  .custom-alert-btn {
    padding: 9px 18px;
    font-size: 13px;
  }

  .filters-header {
    padding: 14px 16px;
  }

  .filters-title {
    font-size: 15px;
  }

  .filter-active-badge {
    display: none;
  }
}
