/**
 * Estilos modernos para Alertas (SweetAlert2 & Toastr)
 * SystemVet - Modern UI
 */

/* ==========================================================================
   SweetAlert2 - Rediseño Moderno
   ========================================================================== */

/* Fondo oscuro con desenfoque suave */
.swal2-container.swal2-shown {
  background-color: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

/* Tarjeta / Modal Principal */
.swal2-popup {
  background: #ffffff !important;
  border-radius: 22px !important;
  padding: 2.2rem 2rem !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  max-width: 460px !important;
  border: none !important;
}

/* Título */
.swal2-title {
  color: #0f172a !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  margin: 0.75rem 0 0.5rem 0 !important;
  letter-spacing: -0.02em !important;
  text-align: center !important;
}

/* Contenido y Texto */
.swal2-content,
.swal2-html-container {
  color: #64748b !important;
  font-size: 0.98rem !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  margin-top: 0.25rem !important;
  text-align: center !important;
}

/* Iconos de SweetAlert2 */
.swal2-icon {
  margin: 0 auto 0.75rem auto !important;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.swal2-popup:hover .swal2-icon {
  transform: scale(1.02);
}

/* Icono: Pregunta */
.swal2-icon.swal2-question {
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.08) !important;
  box-shadow: 0 0 0 10px rgba(2, 132, 199, 0.06) !important;
}

/* Icono: Éxito */
.swal2-icon.swal2-success {
  border-color: #10b981 !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.06) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(16, 185, 129, 0.35) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #10b981 !important;
}

/* Icono: Error */
.swal2-icon.swal2-error {
  border-color: #f43f5e !important;
  color: #f43f5e !important;
  background: rgba(244, 63, 94, 0.08) !important;
  box-shadow: 0 0 0 10px rgba(244, 63, 94, 0.06) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  background-color: #f43f5e !important;
}

/* Icono: Advertencia */
.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.06) !important;
}

/* Icono: Info */
.swal2-icon.swal2-info {
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
  box-shadow: 0 0 0 10px rgba(59, 130, 246, 0.06) !important;
}

/* Contenedor de Botones */
.swal2-actions {
  margin-top: 1.75rem !important;
  gap: 12px !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

/* Botones Base */
.swal2-styled {
  margin: 0 !important;
  padding: 0.72rem 1.65rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  letter-spacing: 0.015em !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: none !important;
  outline: none !important;
}

/* Botón Confirmar (Gradiente Cyan/Azul Vet) */
.swal2-styled.swal2-confirm {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.38) !important;
}

.swal2-styled.swal2-confirm:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5) !important;
  transform: translateY(-2px) !important;
}

.swal2-styled.swal2-confirm:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

/* Botón Cancelar */
.swal2-styled.swal2-cancel {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.swal2-styled.swal2-cancel:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px) !important;
}

.swal2-styled.swal2-cancel:active {
  transform: translateY(0) !important;
}


/* ==========================================================================
   Toastr Notifications - Rediseño Moderno
   ========================================================================== */

#toast-container {
  position: fixed !important;
  z-index: 999999 !important;
}

#toast-container > div {
  opacity: 1 !important;
  border-radius: 14px !important;
  padding: 15px 20px 15px 50px !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  margin-bottom: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#toast-container > div:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24) !important;
}

#toast-container > .toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

#toast-container > .toast-error {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
}

#toast-container > .toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

#toast-container > .toast-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
}

#toast-container .toast-title {
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: -0.01em !important;
  color: #ffffff !important;
  margin-bottom: 2px !important;
}

#toast-container .toast-message {
  font-size: 0.88rem !important;
  color: rgba(255, 255, 255, 0.94) !important;
  line-height: 1.45 !important;
}

#toast-container .toast-progress {
  background-color: rgba(255, 255, 255, 0.6) !important;
  height: 3px !important;
  border-radius: 2px !important;
}

#toast-container .toast-close-button {
  color: #ffffff !important;
  opacity: 0.7 !important;
  text-shadow: none !important;
  font-size: 1.2rem !important;
  font-weight: 400 !important;
}

#toast-container .toast-close-button:hover {
  opacity: 1 !important;
}

/* ==========================================================================
   Topbar Notification Icons & Badges - Rediseño Moderno
   ========================================================================== */

.topbar .nav-item .topbar-icon-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.25rem;
}

.topbar .nav-item:hover .topbar-icon-wrapper {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.topbar .nav-item .badge.notification,
.topbar .nav-item .badge.badge-counter,
.notification {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 6px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 20px !important;
  text-align: center !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.5) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2;
}

.topbar .dropdown-menu.citas-hoy,
.topbar .dropdown-menu.vacunas-prox,
.topbar .dropdown-menu.productos-vencido,
.topbar .dropdown-menu {
  width: 350px !important;
  max-width: 90vw !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 1px rgba(15, 23, 42, 0.12) !important;
  padding: 0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
  margin-top: 10px !important;
}

/* Tarjeta individual de notificación */
.notif-item-card {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.notif-item-card:hover {
  background: #f8fafc;
}

.notif-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: inherit !important;
  flex-grow: 1;
  min-width: 0;
}

.notif-item-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
  background: #f1f5f9;
}

.notif-item-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notif-item-icon-box.tag-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.notif-item-icon-box.tag-historia {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.notif-item-info {
  flex-grow: 1;
  min-width: 0;
}

.notif-item-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: 3px;
}

.notif-item-tag.tag-cita {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.notif-item-tag.tag-vacuna {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

.notif-item-tag.tag-historia {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.notif-item-tag.tag-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.notif-item-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.notif-item-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.notif-wsp-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.notif-wsp-btn:hover {
  background: #10b981;
  color: #ffffff !important;
  transform: scale(1.08);
}

/* Estado Vacío de Notificaciones */
.notif-empty-state {
  padding: 32px 20px;
  text-align: center;
  background: #ffffff;
}

.notif-empty-state i {
  font-size: 2.2rem;
  color: #94a3b8;
  margin-bottom: 10px;
  display: inline-block;
}

.notif-empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.notif-empty-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}

/* Pie de página del Dropdown */
.dropdown-footer-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0284c7 !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.dropdown-footer-custom:hover {
  background: #f1f5f9;
  color: #0369a1 !important;
}

/* ==========================================================================
   Optimizaciones para Modo Móvil (Smartphones y Tablets)
   ========================================================================== */

@media (max-width: 576px) {
  /* SweetAlert2 en Pantallas Móviles */
  .swal2-popup {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    padding: 1.6rem 1.25rem !important;
    border-radius: 18px !important;
    margin: 0 auto !important;
  }

  .swal2-title {
    font-size: 1.2rem !important;
    margin: 0.5rem 0 0.25rem 0 !important;
  }

  .swal2-content,
  .swal2-html-container {
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
  }

  .swal2-icon {
    transform: scale(0.85) !important;
    margin-bottom: 0.4rem !important;
  }

  .swal2-actions {
    flex-direction: column-reverse !important;
    width: 100% !important;
    gap: 8px !important;
    margin-top: 1.4rem !important;
  }

  .swal2-styled {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    min-height: 44px !important; /* Facilidad táctil */
  }

  /* Toastr en Móvil */
  #toast-container {
    left: 12px !important;
    right: 12px !important;
    top: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
  }

  #toast-container > div {
    width: 100% !important;
    border-radius: 12px !important;
    padding: 12px 14px 12px 46px !important;
    font-size: 0.88rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
  }

  /* Topbar Botones e Iconos en Móvil */
  .topbar .nav-item {
    margin: 0 2px !important;
  }

  .topbar .nav-item .topbar-icon-wrapper {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.1rem !important;
    border-radius: 10px !important;
  }

  .topbar .nav-item .badge.notification,
  .topbar .nav-item .badge.badge-counter,
  .notification {
    top: -6px !important;
    right: -6px !important;
    min-width: 20px !important;
    height: 20px !important;
    font-size: 11px !important;
    line-height: 16px !important;
    padding: 0 4px !important;
  }

  /* Menús Desplegables de Notificación en Móvil (Flotante Centrado y Accesible) */
  .topbar .dropdown-menu.citas-hoy,
  .topbar .dropdown-menu.vacunas-prox,
  .topbar .dropdown-menu.productos-vencido,
  .topbar .dropdown-menu {
    position: fixed !important;
    top: 60px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.9) !important;
    z-index: 1060 !important;
  }

  .notif-item-card {
    padding: 10px 12px !important;
  }

  .notif-item-img,
  .notif-item-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }

  .notif-item-title {
    font-size: 0.84rem !important;
  }

  .notif-item-subtitle {
    font-size: 0.74rem !important;
  }

  .notif-wsp-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.15rem !important;
  }

  .notif-empty-state {
    padding: 24px 16px !important;
  }

  .notif-empty-state i {
    font-size: 1.8rem !important;
  }

  .notif-empty-title {
    font-size: 0.88rem !important;
  }
}

/* ==========================================================================
   Botones Modernos de Acción para Tablas
   ========================================================================== */

.table-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none !important;
  margin: 0 2px;
  cursor: pointer;
}

.table-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.table-action-btn.btn-profile {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}
.table-action-btn.btn-profile:hover {
  background: #0284c7;
  color: #ffffff;
}

.table-action-btn.btn-edit {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.25);
}
.table-action-btn.btn-edit:hover {
  background: #8b5cf6;
  color: #ffffff;
}

.table-action-btn.btn-wsp {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
}
.table-action-btn.btn-wsp:hover {
  background: #10b981;
  color: #ffffff;
}

.table-action-btn.btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}
.table-action-btn.btn-delete:hover {
  background: #ef4444;
  color: #ffffff;
}

.table-action-btn.btn-pet {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.25);
}
.table-action-btn.btn-pet:hover {
  background: #0284c7;
  color: #ffffff;
}

.table-action-btn.btn-history {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.25);
}
.table-action-btn.btn-history:hover {
  background: #f43f5e;
  color: #ffffff;
}

.table-action-btn.btn-calendar {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.25);
}
.table-action-btn.btn-calendar:hover {
  background: #8b5cf6;
  color: #ffffff;
}

/* ==========================================================================
   Modern List Pages & Design System
   ========================================================================== */

/* Header de Página */
.modern-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 6px 0 16px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.modern-page-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modern-page-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(2, 132, 199, 0.25) 100%);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
  flex-shrink: 0;
}

.modern-page-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.modern-page-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  margin: 2px 0 0 0;
  font-weight: 500;
}

.modern-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botones Principales */
.btn-modern-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 0.65rem 1.35rem !important;
  border-radius: 12px !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
}

.btn-modern-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45) !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
}

.btn-modern-secondary {
  background: #ffffff !important;
  color: #334155 !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 0.65rem 1.25rem !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
}

.btn-modern-secondary:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.btn-modern-pdf {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 0.65rem 1.25rem !important;
  border-radius: 12px !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.25s ease !important;
  text-decoration: none !important;
}

.btn-modern-pdf:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

/* Tarjeta Contenedora de Tabla y Filtros */
.modern-card-container {
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 0 1px rgba(15, 23, 42, 0.08) !important;
  padding: 24px !important;
  margin-bottom: 30px !important;
  overflow: hidden !important;
}

/* Barra de Búsqueda Moderna */
.modern-search-bar {
  display: flex !important;
  align-items: center !important;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 4px 6px 4px 16px !important;
  transition: all 0.25s ease !important;
  max-width: 440px !important;
  width: 100% !important;
}

.modern-search-bar:focus-within {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.15) !important;
}

.modern-search-bar input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.92rem !important;
  color: #1e293b !important;
  flex-grow: 1 !important;
  padding: 8px 6px !important;
  margin: 0 !important;
}

.modern-search-bar input::placeholder {
  color: #94a3b8 !important;
}

.modern-search-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.modern-search-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  transform: scale(1.04) !important;
}

.btn-show-all {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 7px 12px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.btn-show-all:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Tabla Moderna */
.table-responsive {
  border-radius: 14px !important;
  overflow-x: auto !important;
}

.modern-card-container .table {
  margin-bottom: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

.modern-card-container .table thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  border-top: none !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  padding: 14px 16px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.modern-card-container .table tbody tr {
  transition: background 0.15s ease !important;
}

.modern-card-container .table tbody tr:hover {
  background: #f8fafc !important;
}

.modern-card-container .table tbody td {
  padding: 13px 16px !important;
  vertical-align: middle !important;
  border-top: 1px solid #f1f5f9 !important;
  color: #334155 !important;
  font-size: 0.88rem !important;
}

/* Botones de DataTables Exportación */
.dt-buttons {
  margin-bottom: 16px !important;
  display: inline-flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.dt-buttons .btn {
  border-radius: 10px !important;
  padding: 8px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dt-buttons .btn:hover {
  transform: translateY(-2px) scale(1.02) !important;
}

.dt-buttons .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.dt-buttons .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
}

.dt-buttons .btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4) !important;
}

.dataTables_filter {
  margin-bottom: 16px !important;
}

.dataTables_filter input {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 7px 14px !important;
  outline: none !important;
  background: #f8fafc !important;
  font-size: 0.88rem !important;
  margin-left: 8px !important;
  transition: all 0.2s ease !important;
}

.dataTables_filter input:focus {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* Paginador Moderno */
.pagination {
  margin-top: 18px !important;
  gap: 4px !important;
  justify-content: flex-end !important;
}

.page-item .page-link {
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 0.86rem !important;
  padding: 6px 14px !important;
  margin: 0 2px !important;
  transition: all 0.2s ease !important;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
}

.page-item .page-link:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   Tarjetas KPI / Estadísticas Rápidas
   ========================================================================== */

.kpi-stat-card {
  position: relative;
  border-radius: 16px;
  padding: 18px 20px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.kpi-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.2);
}

.kpi-stat-card.kpi-cyan {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.kpi-stat-card.kpi-emerald {
  background: linear-gradient(135deg, #1dd1a1 0%, #10ac84 100%);
}

.kpi-stat-card.kpi-purple {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

.kpi-stat-card.kpi-pink {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kpi-stat-card.kpi-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.kpi-stat-card.kpi-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.kpi-stat-card.kpi-orange {
  background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.kpi-stat-card .kpi-bg-icon {
  position: absolute;
  top: -12px;
  right: -12px;
  font-size: 5.5rem;
  opacity: 0.18;
  pointer-events: none;
}

.kpi-stat-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  opacity: 0.92;
}

.kpi-stat-value {
  font-size: 1.85rem;
  font-weight: 900;
  margin: 4px 0 0 0;
  line-height: 1;
}

.kpi-stat-desc {
  font-size: 0.76rem;
  margin: 6px 0 0 0;
  opacity: 0.88;
}

/* Chip de WhatsApp Directo en Tabla */
.wsp-direct-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.15) 100%);
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.wsp-direct-chip:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.wsp-direct-chip i {
  font-size: 0.95rem;
}

/* Chip de DNI */
.dni-chip {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  font-weight: 800;
  border: 1px solid #7dd3fc;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* Botones de Acción con Degradados Vivos y Efecto Glow */
.table-action-btn.btn-profile {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.35) !important;
}

.table-action-btn.btn-edit {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.35) !important;
}

.table-action-btn.btn-wsp {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35) !important;
}

.table-action-btn.btn-delete {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35) !important;
}

.table-action-btn.btn-pet {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35) !important;
}

.table-action-btn.btn-history {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(244, 63, 94, 0.35) !important;
}

.table-action-btn.btn-calendar {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.35) !important;
}

.table-action-btn:hover {
  transform: translateY(-2px) scale(1.08) !important;
}

/* ==========================================================================
   Perfil Cliente & Perfil Mascota Modernos
   ========================================================================== */

.profile-hero-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
}

.profile-hero-banner {
  height: 110px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #2575fc 100%);
  position: relative;
  overflow: hidden;
}

.profile-hero-banner .banner-icon-bg {
  position: absolute;
  top: -15px;
  right: 15px;
  font-size: 8rem;
  opacity: 0.15;
  color: #ffffff;
  pointer-events: none;
}

.profile-hero-content {
  padding: 0 28px 28px 28px;
  position: relative;
}

.profile-avatar-wrapper {
  margin-top: -55px;
  display: inline-block;
  position: relative;
}

.profile-avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background: #ffffff;
}

.profile-info-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  height: 100%;
}

.profile-info-tile:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-info-tile-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-info-tile-value {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  word-break: break-word;
}

.pet-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pet-item-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.1);
}

/* ==========================================================================
   Modales Modernos
   ========================================================================== */

.modal-content {
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
}

.modal-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border-bottom: none !important;
  padding: 16px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.modal-header .modal-title {
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.modal-header .close {
  color: #ffffff !important;
  opacity: 0.85 !important;
  text-shadow: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.2s ease !important;
  font-size: 1.35rem !important;
}

.modal-header .close:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.2) !important;
  transform: rotate(90deg) !important;
}

.modal-body {
  padding: 22px !important;
  background: #ffffff !important;
}

.modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 14px 22px !important;
}

.modal-pet-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  height: 100%;
}

/* ==========================================================================
   Citas de Mascota & Tabs Modernos
   ========================================================================== */

.appointment-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.appointment-item-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.12);
}

.modern-tabs-nav {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 6px;
  display: flex;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.modern-tabs-nav .nav-item {
  margin: 0 !important;
}

.modern-tabs-nav .nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  color: #64748b !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.modern-tabs-nav .nav-link:hover {
  color: #0284c7 !important;
  background: rgba(14, 165, 233, 0.06) !important;
}

.modern-tabs-nav .nav-link.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
}

.modern-tabs-nav .nav-link.active .badge-tab {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.badge-tab {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.2s ease;
}

.gallery-modern-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-modern-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.12);
}

.gallery-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-modern-card:hover .gallery-card-img {
  transform: scale(1.04);
}







/* ============================================================
   ALTERNADOR DE VISTA — TARJETAS / LISTADO (listaCliente)
   ============================================================ */

.client-view-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.client-view-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  gap: 3px;
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
}

.btn-view-toggle:hover {
  color: #0096c7;
  background: rgba(0, 198, 255, 0.1);
}

.btn-view-toggle.active {
  background: linear-gradient(135deg, #00c6ff 0%, #0096c7 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 150, 199, 0.4);
}

.btn-view-toggle i {
  font-size: 0.95rem;
}

/* ============================================================
   GRID DE TARJETAS DE CLIENTES
   ============================================================ */

.client-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 4px 0 8px 0;
}

/* ============================================================
   TARJETA INDIVIDUAL DE CLIENTE
   ============================================================ */

.client-card-item {
  background: #ffffff;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.client-card-item:hover {
  transform: translateY(-5px);
  border-color: #7de8ff;
  box-shadow: 0 14px 32px rgba(0, 150, 199, 0.18);
}

/* Franja superior de acento */
.client-card-item::before {
  content: '';
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #00c6ff 0%, #0096c7 100%);
  border-radius: 18px 18px 0 0;
  position: absolute;
  top: 0;
  left: 0;
}

.client-card-body {
  padding: 24px 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar */
.client-card-avatar-wrap {
  position: relative;
  margin-bottom: 14px;
  margin-top: 6px;
}

.client-card-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3.5px #00c6ff, 0 6px 18px rgba(0, 150, 199, 0.3);
  display: block;
  transition: box-shadow 0.25s ease;
}

.client-card-item:hover .client-card-avatar {
  box-shadow: 0 0 0 3.5px #0072c6, 0 8px 22px rgba(0, 114, 198, 0.25);
}

/* Badge de mascotas encima del avatar */
.client-card-pets-badge {
  position: absolute;
  bottom: -4px;
  right: -8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  border: 2px solid #ffffff;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(109, 40, 217, 0.3);
}

/* Nombre */
.client-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.25;
  text-decoration: none;
  display: block;
  transition: color 0.18s ease;
}

.client-card-name:hover {
  color: #0096c7;
  text-decoration: none;
}

/* DNI chip */
.client-card-dni {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e0f9ff;
  border: 1px solid #7de8ff;
  color: #006d94;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* Datos de contacto */
.client-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 4px;
}

.client-card-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
  text-align: left;
  min-height: 22px;
}

.client-card-info-row i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.client-card-info-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Footer de acciones */
.client-card-footer {
  padding: 14px 20px 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Botón de perfil (acción principal) */
.btn-card-profile {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00c6ff 0%, #0096c7 100%);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 3px 10px rgba(0, 150, 199, 0.35);
  min-width: 0;
}

.btn-card-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 150, 199, 0.45);
  color: #ffffff !important;
  background: linear-gradient(135deg, #0096c7 0%, #0072c6 100%);
}

/* Botón WhatsApp en card */
.btn-card-wsp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.1);
  color: #16a34a !important;
  font-size: 1rem;
  text-decoration: none !important;
  border: 1px solid rgba(37, 211, 102, 0.25);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-card-wsp:hover {
  background: #25d366;
  color: #ffffff !important;
  border-color: #25d366;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Botones de editar y eliminar en card */
.btn-card-edit,
.btn-card-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.85rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-card-edit {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-card-edit:hover {
  background: #f59e0b;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transform: scale(1.08);
}

.btn-card-delete {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-card-delete:hover {
  background: #ef4444;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transform: scale(1.08);
}

/* ============================================================
   CONTROL DE VISIBILIDAD — DATA ATTRIBUTE EN CONTENEDOR
   ============================================================ */

/* Vista Cards por defecto */
[data-client-view="cards"] .client-cards-grid { display: grid !important; }
[data-client-view="cards"] .client-list-view  { display: none !important; }

/* Vista Listado */
[data-client-view="list"] .client-cards-grid { display: none !important; }
[data-client-view="list"] .client-list-view  { display: block !important; }

/* Estado vacío */
.client-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.client-empty-state i {
  font-size: 3.5rem;
  margin-bottom: 14px;
  display: block;
  opacity: 0.5;
}

.client-empty-state p {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

/* ============================================================
   RESPONSIVE CARDS
   ============================================================ */

@media (max-width: 1200px) {
  .client-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

@media (max-width: 768px) {
  .client-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
  .client-view-toolbar {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .client-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .client-card-body {
    padding: 18px 14px 12px;
  }
  .client-card-avatar {
    width: 62px;
    height: 62px;
  }
  .client-card-name {
    font-size: 0.88rem;
  }
  }
  .client-card-body {
    padding: 18px 14px 12px;
  }
  .client-card-avatar {
    width: 62px;
    height: 62px;
  }
  .client-card-name {
    font-size: 0.88rem;
  }
}


/* ============================================================
   TARJETAS DE MASCOTAS — pet-card
   SOLUCIÓN ESTRUCTURA UNIFORME:
   - body con altura mínima fija
   - texto truncado con ellipsis + title tooltip
   - filas siempre presentes (vacías muestran placeholder "—")
   ============================================================ */

/* ============================================================
   TARJETAS DE MASCOTAS — PET CARD DESIGN SYSTEM (VETFUTURISTA)
   ============================================================ */

.pet-cards-grid,
#petViewWrapper .pet-cards-grid,
[data-pet-view="cards"] .pet-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 20px !important;
  padding: 8px 0 20px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.pet-card-item {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  min-height: 410px !important;
}

.pet-card-item:hover {
  transform: translateY(-5px) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.16) !important;
}

/* Franja superior gradiente */
.pet-card-item::before {
  content: '';
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #818cf8 100%);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.pet-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  border-bottom: 1px solid #f8fafc;
}

.pet-card-code {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 2px 8px;
  border-radius: 12px;
}

.pet-card-body {
  padding: 12px 18px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pet-card-avatar-wrap {
  position: relative;
  margin-bottom: 8px;
}

.pet-card-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px #0284c7, 0 6px 18px rgba(2, 132, 199, 0.22);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pet-card-item:hover .pet-card-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 0 3.5px #0369a1, 0 8px 22px rgba(2, 132, 199, 0.35);
}

.pet-card-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #0f172a;
  margin: 4px 0;
  line-height: 1.25;
  text-decoration: none !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.pet-card-name:hover {
  color: #0284c7 !important;
}

.pet-card-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  max-width: 100%;
  overflow: hidden;
}

.pet-card-owner img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #94a3b8;
  flex-shrink: 0;
}

.pet-card-owner span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pet-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-bottom: 10px;
}

.pet-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 14px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pet-badge-especie { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.pet-badge-raza    { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.pet-badge-macho   { background: #e0f7fa; color: #00838f; border: 1px solid #b2ebf2; }
.pet-badge-hembra  { background: #fce4ec; color: #c2185b; border: 1px solid #f8bbd0; }
.pet-badge-castrado{ background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.pet-badge-empty   { background: #f1f5f9; color: #64748b; }

.pet-card-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
}

.pet-meta-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

.pet-meta-box i {
  font-size: 0.82rem;
}

.pet-meta-box span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pet-card-footer {
  padding: 12px 14px 14px;
  background: #fafcff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-pet-profile {
  width: 100%;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.22s ease;
}

.btn-pet-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.pet-card-actions-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.btn-pet-action {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pet-history { background: #eff6ff; color: #2563eb !important; border: 1px solid #bfdbfe; }
.btn-pet-history:hover { background: #2563eb; color: #ffffff !important; transform: scale(1.05); }

.btn-pet-cita { background: #f5f3ff; color: #7c3aed !important; border: 1px solid #ddd6fe; }
.btn-pet-cita:hover { background: #7c3aed; color: #ffffff !important; transform: scale(1.05); }

.btn-pet-edit { background: #fffbeb; color: #d97706 !important; border: 1px solid #fde68a; }
.btn-pet-edit:hover { background: #d97706; color: #ffffff !important; transform: scale(1.05); }

.btn-pet-delete { background: #fef2f2; color: #dc2626 !important; border: 1px solid #fecaca; }
.btn-pet-delete:hover { background: #dc2626; color: #ffffff !important; transform: scale(1.05); }

/* ============================================================
   CONTROL VISIBILIDAD MASCOTA — data-pet-view
   ============================================================ */
[data-pet-view="cards"] .pet-cards-grid  { display: grid !important; }
[data-pet-view="cards"] .pet-list-view   { display: none !important; }
[data-pet-view="list"]  .pet-cards-grid  { display: none !important; }
[data-pet-view="list"]  .pet-list-view   { display: block !important; }

@media (min-width: 1400px) {
  .pet-cards-grid,
  #petViewWrapper .pet-cards-grid,
  [data-pet-view="cards"] .pet-cards-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 22px !important;
  }
}

@media (min-width: 992px) and (max-width: 1399px) {
  .pet-cards-grid,
  #petViewWrapper .pet-cards-grid,
  [data-pet-view="cards"] .pet-cards-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px !important;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .pet-cards-grid,
  #petViewWrapper .pet-cards-grid,
  [data-pet-view="cards"] .pet-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 599px) {
  .pet-cards-grid,
  #petViewWrapper .pet-cards-grid,
  [data-pet-view="cards"] .pet-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* ============================================================
   SISTEMA DE DISEÑO: REGISTRO Y EDICIÓN DE CITAS & CITAS MÚLTIPLES
   ============================================================ */

.modern-cita-wrapper {
  max-width: 1100px;
  margin: 0 auto 30px auto;
}

.modern-cita-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.07), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
  overflow: hidden;
  transition: all 0.3s ease;
}

.modern-cita-header {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.modern-cita-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.01em;
}

.modern-cita-title i {
  background: rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.1rem;
}

.modern-cita-body {
  padding: 28px;
}

.btn-cita-header-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cita-header-action:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .modern-cita-body {
    padding: 18px 14px;
  }
  .modern-cita-header {
    padding: 16px 18px;
  }
}

/* Form Groups & Controls */
.modern-form-group {
  margin-bottom: 20px;
  position: relative;
}

.modern-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.modern-label i {
  color: #0284c7;
  font-size: 0.95rem;
}

.modern-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-input {
  width: 100%;
  height: 46px;
  padding: 10px 16px 10px 42px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.modern-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
  outline: none;
}

.modern-input-wrap .input-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s;
}

.modern-input:focus + .input-icon-left,
.modern-input-wrap:focus-within .input-icon-left {
  color: #0284c7;
}

.modern-textarea {
  width: 100%;
  min-height: 85px;
  padding: 12px 16px 12px 42px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
  transition: all 0.25s ease;
  resize: vertical;
}

.modern-textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
  outline: none;
}

/* Motivo Quick Chips */
.motivo-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.motivo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.motivo-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.motivo-chip.active {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

/* Toggle Switch WhatsApp */
.modern-switch-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-switch-wrap:hover {
  background: #dcfce7;
}

.modern-switch-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #16a34a;
  cursor: pointer;
}

.modern-switch-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Color Swatches Selector Box */
.cita-color-picker-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 46px;
  padding: 4px 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
  gap: 6px;
}

.cita-color-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.cita-color-swatch {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #ffffff;
  font-size: 10px;
}

.cita-color-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.cita-color-swatch.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0f172a;
  transform: scale(1.05);
}

.cita-color-custom-btn {
  position: relative;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.cita-color-custom-btn:hover {
  background: #e2e8f0;
  border-color: #64748b;
  transform: scale(1.1);
}

.cita-color-custom-btn i {
  font-size: 11px;
  color: #64748b;
  pointer-events: none;
}

.cita-color-custom-btn .cita-custom-color-input {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 50px;
  height: 50px;
  opacity: 0;
  cursor: pointer;
}

/* ============================================================
   MÓDULO PROFESIONAL DE CITAS MÚLTIPLES
   ============================================================ */
.citas-multiples-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 22px;
  margin-top: 15px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.citas-multiples-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.citas-multiples-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.citas-multiples-title i {
  color: #6366f1;
  font-size: 1.15rem;
}

/* Guía Clínica */
.citas-guia-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #0284c7;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.citas-guia-icon {
  color: #0284c7;
  font-size: 1.25rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.citas-guia-content h6 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0369a1;
  margin: 0 0 3px 0;
}

.citas-guia-content p {
  font-size: 0.83rem;
  color: #334155;
  margin: 0;
  line-height: 1.45;
}

/* Chips de Ejemplos Clínicos (Presets) */
.citas-ejemplos-wrapper {
  margin-bottom: 18px;
}

.citas-ejemplos-label {
  font-size: 0.83rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.citas-ejemplos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.cita-ejemplo-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: all 0.22s ease;
  user-select: none;
}

.cita-ejemplo-btn:hover {
  border-color: #6366f1;
  background: #f5f3ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.cita-ejemplo-btn.active {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 2px #c7d2fe;
}

.cita-ejemplo-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.cita-ejemplo-info strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e1b4b;
  line-height: 1.25;
}

.cita-ejemplo-info small {
  font-size: 0.76rem;
  color: #6b7280;
  display: block;
  margin-top: 2px;
}

/* Configuración de repetición */
.citas-config-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}

/* Previsualizador en Vivo (Live Preview) */
.citas-preview-box {
  background: #ffffff;
  border: 1.5px solid #e0e7ff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.05);
}

.citas-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.citas-preview-header strong {
  font-size: 0.88rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.citas-badge-total {
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #c7d2fe;
}

.citas-timeline-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px;
}

.citas-timeline-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.citas-timeline-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.citas-timeline-item.first-cita {
  border-color: #86efac;
  background: #f0fdf4;
}

.citas-item-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.citas-timeline-item.first-cita .citas-item-badge {
  background: #22c55e;
  color: #ffffff;
}

.citas-item-info {
  line-height: 1.25;
}

.citas-item-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
}

.citas-item-sub {
  font-size: 0.74rem;
  color: #64748b;
  display: block;
}

/* Modal Enhancements */
.modal-dialog-cita {
  max-width: 820px !important;
  margin: 1.75rem auto;
}

.modal-content-cita {
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden;
}

.modal-header-cita {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 18px 24px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-cita-edit {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.modal-header-cita .modal-title {
  color: #ffffff !important;
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header-cita .close {
  color: #ffffff !important;
  opacity: 0.85;
  font-size: 1.5rem;
  transition: opacity 0.2s;
  padding: 0;
  margin: 0;
}

.modal-header-cita .close:hover {
  opacity: 1;
}

.modal-body-cita {
  padding: 24px;
  background: #ffffff;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.modal-footer-cita {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Info Cards for Client / Pet Display */
.cita-info-card-fixed {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cita-info-avatar-fixed {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0284c7;
}

.cita-info-meta {
  line-height: 1.3;
}

.cita-info-name-fixed {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.cita-info-sub-fixed {
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

/* Action Buttons */
.btn-cita-action {
  border-radius: 12px !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.btn-cita-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}

.btn-cita-secondary {
  border-radius: 12px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
}

.btn-cita-secondary:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  transform: translateY(-1px);
}

/* Datepicker Dropdown en Modales */
.datepicker-dropdown {
  z-index: 1065 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

/* ============================================================
   SISTEMA DE CABECERAS Y TARJETAS FLUIDAS (PROYECTO COMPLETO)
   ============================================================ */
.titulo-linea {
  background: transparent !important;
  border: none !important;
  margin-top: 6px !important;
  margin-bottom: 20px !important;
  padding: 4px 2px !important;
}

.titulo-linea h2 {
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
}

.titulo-linea h2 i,
.titulo-linea > i {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 1.2rem !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.titulo-linea h2 i[class^="flaticon-"],
.titulo-linea > i[class^="flaticon-"] {
  font-size: 1.4rem !important;
}

/* Eliminar líneas divisorias duras entre cabecera y contenido */
.titulo-linea hr.sidebar-divider,
.titulo-linea hr {
  display: none !important;
}

/* Modernización de Contenedores de Formulario y Listas (.intro) */
.intro {
  padding: 24px 28px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.02) !important;
  transition: all 0.3s ease !important;
}

/* Subtítulos de sección limpios y modernos */
.sub-titulo-panel {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  letter-spacing: -0.01em !important;
  line-height: normal !important;
  margin-bottom: 16px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.sub-titulo-panel i {
  font-size: 1.25rem !important;
  color: #0284c7 !important;
  margin: 0 !important;
}

.sub-titulo-panel i.fas {
  font-size: 1.15rem !important;
  color: #0284c7 !important;
  margin: 0 !important;
}

/* ============================================================
   TOPBAR TRANSPARENTE Y FLUIDA (SIN LÍNEAS DE SEPARACIÓN)
   ============================================================ */
.topbar,
nav.topbar,
.navbar.topbar,
#wrapper #content-wrapper .topbar {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  border-bottom: none !important;
  margin-bottom: 0.5rem !important;
  padding: 0.5rem 1.5rem !important;
}

/* Fondo continuo para el contenedor principal de todas las vistas */
#wrapper #content-wrapper {
  background-color: #f4f6fb !important;
  position: relative;
  overflow-x: hidden;
}

/* 5 Huellas Naturales de Fondo Distribuidas Estratégicamente */
.content-paws-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.content-paw {
  position: absolute;
  color: #1e3c72;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

/* Huella 1: Espacio superior (arriba del título en cabecera) */
.cpaw-1 { top: 30px; left: 45%; font-size: 85px; transform: rotate(-22deg); opacity: 0.048; }

/* Huella 2: Esquina superior derecha */
.cpaw-2 { top: 90px; right: 3%; font-size: 135px; transform: rotate(26deg); opacity: 0.04; }

/* Huella 3: Espacio amplio inferior izquierdo (debajo de tablas/formularios) */
.cpaw-3 { top: 56%; left: 18%; font-size: 165px; transform: rotate(-26deg); opacity: 0.052; }

/* Huella 4: Parte inferior derecha */
.cpaw-4 { bottom: 45px; right: 14%; font-size: 130px; transform: rotate(18deg); opacity: 0.042; }

/* Huella 5: Parte inferior centro */
.cpaw-5 { bottom: 12%; left: 52%; font-size: 110px; transform: rotate(-12deg); opacity: 0.038; }

#wrapper #content-wrapper #content {
  background-color: transparent !important;
}

#content > .container-fluid {
  padding-top: 0.25rem !important;
  min-height: calc(100vh - 120px);
}

/* Corrección de apilamiento y visibilidad para Modales Bootstrap */
.modal {
  z-index: 1060 !important;
}
.modal-backdrop {
  z-index: 1050 !important;
}
.modal-backdrop.show {
  opacity: 0.5 !important;
}

/* Iconos de notificaciones limpios flotando en la barra superior */
.topbar .topbar-icon-wrapper {
  background: #ffffff !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.2s ease !important;
}

.topbar .topbar-icon-wrapper:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
}

/* Botón de acción rápida WhatsApp en listas y tablas (Verde sólido permanente) */
.btn-whatsapp-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #25d366 !important;
  color: #ffffff !important;
  font-size: 1.15rem !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.4) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.btn-whatsapp-action i {
  color: #ffffff !important;
}

.btn-whatsapp-action:hover {
  background: #1ebd59 !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.06) !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6) !important;
  text-decoration: none !important;
}

/* ============================================================
   PANEL Y PERFIL 360° DE VETERINARIO (KPIS & ACTIVIDADES)
   ============================================================ */
.vet-profile-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.vet-avatar-box {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.vet-kpi-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  padding: 18px 20px;
  box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s ease;
  height: 100%;
}

.vet-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px -4px rgba(15, 23, 42, 0.1);
}

.vet-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.vet-kpi-vacunas .vet-kpi-icon {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

.vet-kpi-historias .vet-kpi-icon {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.vet-kpi-citas .vet-kpi-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.vet-kpi-grooming .vet-kpi-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.vet-kpi-info h4 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.1;
}

.vet-kpi-info span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.vet-nav-pills-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.vet-nav-pills-container::-webkit-scrollbar {
  height: 4px;
}

.vet-nav-pills-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.vet-nav-pills {
  background: #f1f5f9;
  border-radius: 14px;
  padding: 6px;
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.vet-nav-pills .nav-link {
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #64748b;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.vet-nav-pills .nav-link.active {
  background: #ffffff !important;
  color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.vet-table-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.vet-table-card .table {
  min-width: 720px;
}

.vet-table-card .table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-top: none;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 14px 18px;
}

.vet-table-card .table td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  color: #1e293b;
}

.vet-table-card .table tr:hover {
  background-color: #f8fafc;
}

/* ============================================================
   RESPONSIVIDAD PERFIL VETERINARIO (< 992px, < 768px, < 576px)
   ============================================================ */
@media (max-width: 991px) {
  .vet-profile-card {
    padding: 20px;
  }
  
  .vet-kpi-card {
    padding: 16px;
    gap: 12px;
  }
  
  .vet-kpi-icon {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }

  .vet-kpi-info h4 {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .vet-profile-card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .vet-profile-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }

  .vet-profile-left {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 14px !important;
  }

  .vet-avatar-box {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }

  .vet-meta-list {
    justify-content: center !important;
    gap: 10px !important;
    font-size: 0.84rem !important;
  }

  .vet-profile-actions {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .vet-profile-actions .btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }

  .vet-nav-pills {
    width: 100%;
  }

  .vet-nav-pills .nav-link {
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  .vet-table-card .table td,
  .vet-table-card .table th {
    padding: 10px 12px;
    font-size: 0.86rem;
  }
}

@media (max-width: 576px) {
  .vet-kpi-card {
    padding: 12px 10px;
    gap: 8px;
    border-radius: 14px;
  }

  .vet-kpi-icon {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  .vet-kpi-info h4 {
    font-size: 1.15rem;
  }

  .vet-kpi-info span {
    font-size: 0.74rem;
  }

  .vet-profile-actions {
    flex-direction: column !important;
  }
}

/* ============================================================
   SISTEMA DE DISEÑO: DIRECTORIO DE VETERINARIOS (CARDS & LIST)
   ============================================================ */
[data-vet-view="cards"] .vet-cards-grid { display: grid !important; }
[data-vet-view="cards"] .vet-list-view  { display: none !important; }
[data-vet-view="list"]  .vet-cards-grid { display: none !important; }
[data-vet-view="list"]  .vet-list-view  { display: block !important; }

.vet-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 4px 0 10px 0;
}

.vet-card-item {
  background: #ffffff;
  border: 1px solid #e8edf4;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.vet-card-item:hover {
  transform: translateY(-5px);
  border-color: #7dd3fc;
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.15);
}

.vet-card-item::before {
  content: '';
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
  border-radius: 20px 20px 0 0;
  position: absolute;
  top: 0;
  left: 0;
}

.vet-card-body {
  padding: 24px 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vet-card-avatar-wrap {
  position: relative;
  margin-bottom: 14px;
  margin-top: 6px;
}

.vet-card-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid #ffffff;
  box-shadow: 0 0 0 3px #0284c7, 0 6px 20px rgba(2, 132, 199, 0.25);
  background: linear-gradient(145deg, #f8fafc, #f0f9ff);
  display: block;
  transition: all 0.25s ease;
}

.vet-card-item:hover .vet-card-avatar {
  box-shadow: 0 0 0 3.5px #0369a1, 0 8px 24px rgba(2, 132, 199, 0.35);
  transform: scale(1.04);
}

.vet-card-spec-badge {
  position: absolute;
  bottom: -4px;
  right: -10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  border: 2px solid #ffffff;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35);
}

.vet-card-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.25;
  text-decoration: none !important;
  display: block;
  transition: color 0.18s ease;
}

.vet-card-name:hover {
  color: #0284c7;
}

.vet-card-dni {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

/* Badge código colegiado en tarjeta veterinario */
.vet-card-colegiado {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.vet-card-colegiado i { font-size: 0.7rem; }

/* Cajas de subida firma/sello digital en formularios veterinario */
.firma-upload-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.firma-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-align: left;
}
.firma-preview-wrap {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Badge suave primario para tabla veterinario */
.badge-soft-primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}


.vet-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.vet-card-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
  text-align: left;
  min-height: 22px;
}

.vet-card-info-row i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.82rem;
  color: #0284c7;
}

.vet-card-info-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.vet-card-stats-row {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.vet-card-stat-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vet-stat-vac { background: #e0f2fe; color: #0369a1; }
.vet-stat-his { background: #f3e8ff; color: #7e22ce; }
.vet-stat-cit { background: #dcfce7; color: #15803d; }

.vet-card-footer {
  padding: 14px 18px 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafcff;
}

.btn-card-vet-profile {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

.btn-card-vet-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

@media (max-width: 992px) {
  .vet-cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
}
@media (max-width: 576px) {
  .vet-cards-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   ESTILOS VETFUTURISTA PARA EL SIDEBAR (.sidebar / #accordionSidebar)
   ============================================================ */
.sidebar,
ul.sidebar,
#accordionSidebar {
  background: 
    radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.22) 0%, transparent 50%),
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(175deg, #77708b 0%, #1b8dd3 45%, #637293 100%) !important;
  background-size: auto, auto, 28px 28px, 28px 28px, auto !important;
  border-right: 1px solid rgba(56, 189, 248, 0.16) !important;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.35) !important;
  position: relative;
  z-index: 100;
  overflow: visible !important;
}

/* Contenedor de Huellitas en Marca de Agua */
.sidebar-paws-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.sidebar-paw {
  position: absolute;
  color: rgba(255, 255, 255, 0.16);
  user-select: none;
  pointer-events: none;
  z-index: 0;
  transition: all 0.5s ease;
}

.paw-s1 { top: 3%; left: 8%; font-size: 80px; transform: rotate(-22deg); color: rgba(255, 255, 255, 0.18); }
.paw-s2 { top: 24%; right: -18px; font-size: 110px; transform: rotate(26deg); color: rgba(255, 255, 255, 0.22); }
.paw-s3 { top: 48%; left: -22px; font-size: 120px; transform: rotate(-18deg); color: rgba(255, 255, 255, 0.17); }
.paw-s4 { top: 70%; right: -15px; font-size: 98px; transform: rotate(34deg); color: rgba(255, 255, 255, 0.20); }
.paw-s5 { bottom: 2%; left: 12%; font-size: 105px; transform: rotate(-12deg); color: rgba(255, 255, 255, 0.18); }

/* Marca del Sidebar */
.sidebar .sidebar-brand {
  position: relative !important;
  z-index: 2 !important;
  height: 4.8rem !important;
  text-decoration: none !important;
  padding: 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1) !important;
}

.sidebar .sidebar-brand .sidebar-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .sidebar-brand .sidebar-brand-icon img {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  transition: transform 0.3s ease;
}

.sidebar .sidebar-brand:hover .sidebar-brand-icon img {
  transform: scale(1.06);
}

.sidebar .sidebar-brand .sidebar-brand-text {
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.92rem !important;
  letter-spacing: 0.5px;
}

.sidebar .sidebar-brand .sidebar-brand-text sup {
  color: #38bdf8 !important;
  font-weight: 800;
  margin-left: 2px;
}

/* Divisores */
.sidebar hr.sidebar-divider {
  position: relative !important;
  z-index: 2 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  margin: 8px 14px !important;
}

/* Encabezados de Sección */
.sidebar .sidebar-heading {
  position: relative !important;
  z-index: 2 !important;
  color: #64748b !important;
  font-weight: 800 !important;
  font-size: 0.68rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  padding: 8px 16px 4px !important;
}

/* Enlaces de Navegación */
.sidebar .nav-item {
  position: relative !important;
  z-index: 2 !important;
  margin: 2px 8px !important;
}

.sidebar .nav-item .nav-link {
  color: #cbd5e1 !important;
  padding: 0.7rem 0.9rem !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  transition: all 0.25s ease !important;
  border-left: 3px solid transparent !important;
}

.sidebar .nav-item .nav-link img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.25s ease;
}

.sidebar .nav-item .nav-link span {
  color: inherit !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
}

.sidebar .nav-item .nav-link:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  color: #38bdf8 !important;
  transform: translateX(3px);
}

.sidebar .nav-item .nav-link:hover img {
  transform: scale(1.12);
}

/* Estado Activo */
.sidebar .nav-item.active .nav-link {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.28) 0%, rgba(79, 70, 229, 0.16) 100%) !important;
  border-left: 3.5px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2) !important;
}

.sidebar .nav-item.active .nav-link span {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* Flechas de acordeón */
.sidebar .nav-item .nav-link[data-toggle="collapse"]::after {
  color: #64748b !important;
  transition: transform 0.25s ease, color 0.25s ease;
}

.sidebar .nav-item .nav-link[data-toggle="collapse"]:hover::after,
.sidebar .nav-item .nav-link[data-toggle="collapse"]:not(.collapsed)::after {
  color: #38bdf8 !important;
}

/* ============================================================
   SUBMENÚS DESPLEGABLES (COLLAPSES)
   1. MODO EXPANDIDO (ESCRITORIO): Acordeón Integrado Interno (Fondo Blanco)
   2. MODO COMPACTO (.toggled) / MÓVIL: Tarjeta Flotante a la Derecha
   ============================================================ */

/* Modo Expandido: Acordeón interno integrado */
.sidebar:not(.toggled) .nav-item .collapse,
.sidebar:not(.toggled) .nav-item .collapsing {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  margin: 6px 0 !important;
  box-shadow: none !important;
  z-index: 10 !important;
}

.sidebar:not(.toggled) .nav-item .collapse .collapse-inner,
.sidebar:not(.toggled) .nav-item .collapsing .collapse-inner {
  display: block !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15) !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  backdrop-filter: none !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Huellita decorativa de fondo para todos los submenús */
.sidebar .nav-item .collapse .collapse-inner::after,
.sidebar .nav-item .collapsing .collapse-inner::after {
  content: '\f1b0' !important;
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 900 !important;
  position: absolute !important;
  right: -6px !important;
  bottom: -8px !important;
  font-size: 4.2rem !important;
  opacity: 0.16 !important;
  color: #1e3c72 !important;
  pointer-events: none !important;
  transform: rotate(-15deg) !important;
  z-index: 1 !important;
}

.sidebar:not(.toggled) .nav-item .collapse .collapse-item,
.sidebar:not(.toggled) .nav-item .collapsing .collapse-item {
  color: #1e293b !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 8px 10px !important;
  margin: 2px 0 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  z-index: 2 !important;
}

.sidebar:not(.toggled) .nav-item .collapse .collapse-item img,
.sidebar:not(.toggled) .nav-item .collapsing .collapse-item img {
  width: 24px !important;
  height: auto !important;
}

.sidebar:not(.toggled) .nav-item .collapse .collapse-item:hover,
.sidebar:not(.toggled) .nav-item .collapsing .collapse-item:hover {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  transform: translateX(3px) !important;
}

/* Modo Compacto / Toggled: Tarjeta Flotante a la Derecha */
.sidebar.toggled .nav-item .collapse,
.sidebar.toggled .nav-item .collapsing {
  position: absolute !important;
  left: calc(6rem + 4px) !important;
  top: 0 !important;
  z-index: 9999 !important;
  min-width: 13.5rem !important;
  margin: 0 !important;
  pointer-events: auto !important;
}

.sidebar.toggled .nav-item .collapse .collapse-inner,
.sidebar.toggled .nav-item .collapsing .collapse-inner {
  display: block !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28) !important;
  padding: 8px !important;
  pointer-events: auto !important;
  position: relative !important;
  overflow: hidden !important;
}

.sidebar.toggled .nav-item .collapse .collapse-item,
.sidebar.toggled .nav-item .collapsing .collapse-item {
  color: #1e293b !important;
  font-weight: 700 !important;
  font-size: 0.86rem !important;
  padding: 9px 12px !important;
  margin: 2px 0 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
}

.sidebar.toggled .nav-item .collapse .collapse-item:hover,
.sidebar.toggled .nav-item .collapsing .collapse-item:hover {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  transform: translateX(3px) !important;
}

/* ============================================================
   RESPONSIVE MÓVIL (PANTALLAS <= 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Cuando está CERRADA (toggled por defecto en móvil): Ocultar completamente */
  .sidebar.toggled,
  body.sidebar-toggled .sidebar.toggled,
  body.sidebar-toggled .sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  /* Cuando se presiona el botón hamburguesa (3 rayas): Mostrar Sidebar Compacta (6rem) */
  .sidebar:not(.toggled),
  body.sidebar-open-mobile .sidebar {
    display: flex !important;
    flex-direction: column !important;
    width: 6rem !important;
    min-width: 6rem !important;
    max-width: 6rem !important;
    position: relative !important;
    z-index: 1040 !important;
    overflow: visible !important;
  }

  .sidebar .sidebar-brand {
    padding: 0.6rem 0.2rem !important;
    height: 4rem !important;
    justify-content: center !important;
  }

  .sidebar .sidebar-brand .sidebar-brand-text {
    display: none !important;
  }

  .sidebar .sidebar-brand .sidebar-brand-icon img {
    max-height: 34px !important;
    max-width: 34px !important;
  }

  .sidebar .sidebar-heading {
    display: none !important;
  }

  .sidebar hr.sidebar-divider {
    margin: 4px 6px !important;
  }

  .sidebar .nav-item {
    margin: 3px 2px !important;
    position: relative !important;
  }

  .sidebar .nav-item .nav-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.55rem 0.15rem !important;
    width: 100% !important;
    gap: 4px !important;
    text-align: center !important;
    border-left: 3.5px solid transparent !important;
    border-radius: 8px !important;
  }

  .sidebar .nav-item .nav-link img {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)) !important;
  }

  .sidebar .nav-item .nav-link span {
    display: block !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    color: #ffffff !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 2px !important;
  }

  .sidebar .nav-item .nav-link[data-toggle="collapse"]::after {
    display: none !important;
  }

  .sidebar .nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left: 3.5px solid #a855f7 !important;
    border-radius: 0 8px 8px 0 !important;
    box-shadow: inset 3px 0 10px rgba(168, 85, 247, 0.3) !important;
  }

  .sidebar .nav-item.active .nav-link span {
    color: #ffffff !important;
    font-weight: 700 !important;
  }

  .sidebar .nav-item .collapse,
  .sidebar .nav-item .collapsing {
    position: absolute !important;
    left: calc(6rem + 2px) !important;
    top: 0 !important;
    z-index: 9999 !important;
    min-width: 13.5rem !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  .sidebar .nav-item .collapse .collapse-inner {
    display: block !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25) !important;
    padding: 8px !important;
    pointer-events: auto !important;
  }

  .sidebar .nav-item .collapse .collapse-item {
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 0.86rem !important;
    padding: 9px 12px !important;
    margin: 2px 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
  }

  .sidebar .nav-item .collapse .collapse-item:hover {
    background: #f1f5f9 !important;
    color: #0284c7 !important;
    transform: translateX(3px) !important;
  }

  /* Content Wrapper Ajustable */
  #content-wrapper,
  body.sidebar-toggled #content-wrapper,
  .sidebar.toggled ~ #content-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    overflow-x: hidden !important;
  }

  .sidebar:not(.toggled) ~ #content-wrapper,
  body.sidebar-open-mobile #content-wrapper {
    width: calc(100% - 6rem) !important;
    min-width: 0 !important;
  }

  /* --- ADAPTACIONES RESPONSIVAS PARA CAJA CHICA, GROOMING Y VISTAS GENERALES --- */
  .modern-page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }

  .modern-page-title-group {
    width: 100% !important;
  }

  .modern-page-title {
    font-size: 1.15rem !important;
  }

  .modern-page-subtitle {
    font-size: 0.8rem !important;
  }

  .modern-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }

  .modern-header-actions a,
  .modern-header-actions button {
    flex: 1 1 auto !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .modern-card-container {
    padding: 14px !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
  }

  /* Filtros en una sola columna en móvil */
  .modern-card-container form .d-flex.flex-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .modern-card-container form .d-flex.flex-wrap > div {
    width: 100% !important;
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }

  .modern-search-bar {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tablas responsivas con scroll táctil suave */
  .table-responsive {
    border-radius: 12px !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 15px !important;
  }

  /* Grid de Desglose de Caja Chica */
  .caja-resumen-grid,
  .caja-breakdown-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Modales en Móvil */
  .modal-dialog {
    max-width: calc(100vw - 20px) !important;
    margin: 10px auto !important;
  }
}










