/* ==========================================================================
   OHMYPET - MÓDULO DE LISTADOS MODERNOS (CLIENTES, MASCOTAS, VETERINARIOS)
   Diseño UI/UX Premium, Vista Dual (Cards / Tabla), KPIs y 100% Responsivo
   ========================================================================== */

:root {
  --dir-primary: #0284c7;
  --dir-primary-hover: #0369a1;
  --dir-primary-light: #e0f2fe;
  --dir-cyan: #06b6d4;
  --dir-cyan-light: #ecfeff;
  --dir-emerald: #10b981;
  --dir-emerald-light: #ecfdf5;
  --dir-purple: #8b5cf6;
  --dir-purple-light: #f5f3ff;
  --dir-dark: #0f172a;
  --dir-gray: #64748b;
  --dir-gray-light: #f8fafc;
  --dir-border: #e2e8f0;
  --dir-card-bg: #ffffff;
  --dir-radius: 18px;
  --dir-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --dir-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --dir-shadow-lg: 0 14px 32px rgba(2, 132, 199, 0.12);
  --dir-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   1. HEADER MODERNO DE PÁGINA
   -------------------------------------------------------------------------- */
.directory-header {
  background: var(--dir-card-bg);
  border: 1px solid var(--dir-border);
  border-radius: var(--dir-radius);
  padding: 22px 28px;
  margin-bottom: 24px;
  box-shadow: var(--dir-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.directory-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.directory-header-icon {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25);
  transition: var(--dir-transition);
}

.directory-header-icon.bg-cliente {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
}

.directory-header-icon.bg-mascota {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.directory-header-icon.bg-veterinario {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.directory-header-titles h1,
.directory-header-titles h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--dir-dark);
  margin: 0 0 4px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.directory-header-titles p {
  font-size: 0.88rem;
  color: var(--dir-gray);
  margin: 0;
  font-weight: 500;
}

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

.btn-modern {
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--dir-transition);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
}

.btn-modern:hover {
  transform: translateY(-2px);
}

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

.btn-modern-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-modern-pdf {
  background: #ffffff;
  color: #dc2626 !important;
  border: 1px solid #fecaca;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.btn-modern-pdf:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c !important;
}

/* --------------------------------------------------------------------------
   2. TARJETAS KPI SUPERIORES (Resumen Rápido)
   -------------------------------------------------------------------------- */
.kpi-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--dir-card-bg);
  border: 1px solid var(--dir-border);
  border-radius: var(--dir-radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--dir-shadow-sm);
  transition: var(--dir-transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--dir-shadow-md);
}

.kpi-card-cyan {
  border-left: 5px solid var(--dir-cyan);
}
.kpi-card-cyan .kpi-icon-pill {
  background: var(--dir-cyan-light);
  color: #0891b2;
}

.kpi-card-emerald {
  border-left: 5px solid var(--dir-emerald);
}
.kpi-card-emerald .kpi-icon-pill {
  background: var(--dir-emerald-light);
  color: #059669;
}

.kpi-card-purple {
  border-left: 5px solid var(--dir-purple);
}
.kpi-card-purple .kpi-icon-pill {
  background: var(--dir-purple-light);
  color: #7c3aed;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.kpi-icon-pill {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.kpi-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-badge-cyan { background: var(--dir-cyan-light); color: #0e7490; }
.kpi-badge-emerald { background: var(--dir-emerald-light); color: #047857; }
.kpi-badge-purple { background: var(--dir-purple-light); color: #6d28d9; }

.kpi-body {
  position: relative;
  z-index: 2;
}

.kpi-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--dir-dark);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.kpi-label {
  font-size: 0.88rem;
  color: var(--dir-gray);
  font-weight: 600;
  margin: 0;
}

.kpi-bg-icon {
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 96px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
  transition: var(--dir-transition);
}

.kpi-card:hover .kpi-bg-icon {
  transform: scale(1.08) rotate(-5deg);
  opacity: 0.12;
}

/* --------------------------------------------------------------------------
   3. TOOLBAR (Búsqueda y Alternador de Vista)
   -------------------------------------------------------------------------- */
.directory-toolbar {
  background: var(--dir-card-bg);
  border: 1px solid var(--dir-border);
  border-radius: var(--dir-radius);
  padding: 16px 22px;
  margin-bottom: 24px;
  box-shadow: var(--dir-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.search-form-modern {
  flex: 1;
  min-width: 280px;
  max-width: 540px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon-left {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}

.search-input-modern {
  width: 100%;
  height: 46px;
  padding: 10px 95px 10px 44px;
  border-radius: 12px;
  border: 1px solid var(--dir-border);
  background: #f8fafc;
  color: var(--dir-dark);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--dir-transition);
  outline: none;
}

.search-input-modern:focus {
  background: #ffffff;
  border-color: var(--dir-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.btn-search-submit {
  position: absolute;
  right: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: var(--dir-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--dir-transition);
}

.btn-search-submit:hover {
  background: var(--dir-primary-hover);
}

.toolbar-right-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-clear-filter {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--dir-transition);
  text-decoration: none !important;
}

.btn-clear-filter:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Toggle Buttons (Cards vs List) */
.view-toggle-container {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.view-toggle-btn {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--dir-transition);
}

.view-toggle-btn:hover {
  color: #0f172a;
}

.view-toggle-btn.active {
  background: #ffffff;
  color: var(--dir-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------------------------
   4. SISTEMA DE VISTA DUAL (Cards vs Listado) SIN PARPADEO
   -------------------------------------------------------------------------- */
[data-view="cards"] .cards-grid {
  display: grid !important;
}
[data-view="cards"] .list-view {
  display: none !important;
}

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

/* --------------------------------------------------------------------------
   5. GRID DE TARJETAS Y DISEÑO DE CARD (Card Mode)
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  width: 100%;
  margin-bottom: 24px;
}

.card-item {
  background: var(--dir-card-bg);
  border: 1px solid var(--dir-border);
  border-radius: var(--dir-radius);
  box-shadow: var(--dir-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  opacity: 0.9;
}

.card-item.card-type-mascota::before {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.card-item.card-type-vet::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--dir-shadow-lg);
}

.card-item-body {
  padding: 22px 20px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

/* Avatar circular con badge superpuesto */
.card-avatar-wrapper {
  position: relative;
  margin-bottom: 14px;
  display: inline-block;
}

.card-avatar-img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  background: #f8fafc;
}

.card-avatar-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid #ffffff;
}

.card-avatar-badge.badge-cyan { background: #0284c7; }
.card-avatar-badge.badge-green { background: #10b981; }
.card-avatar-badge.badge-purple { background: #8b5cf6; }

.card-item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dir-dark);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.card-item-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-item-title a:hover {
  color: var(--dir-primary);
}

/* Chips de datos clave */
.card-chips-wrapper {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

.card-chip.chip-primary {
  background: var(--dir-primary-light);
  color: #0369a1;
}

.card-chip.chip-emerald {
  background: var(--dir-emerald-light);
  color: #047857;
}

.card-chip.chip-purple {
  background: var(--dir-purple-light);
  color: #6d28d9;
}

/* Filas de Información */
.card-info-list {
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.card-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #475569;
}

.card-info-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: #f8fafc;
  color: #64748b;
}

.card-info-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer de Acciones de la Tarjeta */
.card-item-footer {
  background: #f8fafc;
  border-top: 1px solid var(--dir-border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-card-profile {
  width: 100%;
  height: 38px;
  background: #ffffff;
  color: var(--dir-primary) !important;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  transition: var(--dir-transition);
  white-space: nowrap;
}

.btn-card-profile:hover {
  background: var(--dir-primary);
  border-color: var(--dir-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transform: translateY(-2px);
}

.card-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.card-actions-toolbar .btn-card-icon,
.card-actions-toolbar .FormularioAjax {
  flex: 1;
  display: inline-flex;
}

.card-actions-toolbar .FormularioAjax {
  margin: 0;
  padding: 0;
}

.btn-card-icon {
  width: 100%;
  height: 36px;
  min-width: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--dir-transition);
  text-decoration: none !important;
  padding: 0;
  background: transparent;
}

.btn-card-icon:hover {
  transform: translateY(-2px);
}

.btn-card-whatsapp {
  background: #dcfce7;
  color: #16a34a !important;
  border-color: #bbf7d0;
}
.btn-card-whatsapp:hover {
  background: #22c55e;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-card-edit {
  background: #f1f5f9;
  color: #475569 !important;
  border-color: #e2e8f0;
}
.btn-card-edit:hover {
  background: #3b82f6;
  color: #ffffff !important;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-card-history {
  background: #fef2f2;
  color: #dc2626 !important;
  border-color: #fecaca;
}
.btn-card-history:hover {
  background: #dc2626;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-card-cita {
  background: #faf5ff;
  color: #9333ea !important;
  border-color: #f3e8ff;
}
.btn-card-cita:hover {
  background: #9333ea;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.btn-card-delete {
  background: #fee2e2;
  color: #ef4444 !important;
  border-color: #fecaca;
}
.btn-card-delete:hover {
  background: #ef4444;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.btn-card-delete {
  background: #fee2e2;
  color: #ef4444 !important;
  border-color: #fecaca;
}
.btn-card-delete:hover {
  background: #ef4444;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* --------------------------------------------------------------------------
   6. DISEÑO DE LA TABLA (List Mode)
   -------------------------------------------------------------------------- */
.table-modern-card {
  background: var(--dir-card-bg);
  border: 1px solid var(--dir-border);
  border-radius: var(--dir-radius);
  overflow: hidden;
  box-shadow: var(--dir-shadow-sm);
  margin-bottom: 24px;
}

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

.table-modern thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dir-border);
  border-top: none;
  white-space: nowrap;
}

.table-modern tbody tr {
  transition: background 0.18s ease;
}

.table-modern tbody tr:hover {
  background: #f8fafc;
}

.table-modern tbody td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 0.88rem;
}

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

.table-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-user-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.table-user-name {
  font-weight: 600;
  color: var(--dir-dark);
  line-height: 1.3;
}

.table-user-name a {
  color: inherit;
  text-decoration: none;
}
.table-user-name a:hover {
  color: var(--dir-primary);
}

.table-user-subtitle {
  font-size: 0.78rem;
  color: #64748b;
}

.table-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--dir-transition);
  text-decoration: none !important;
  background: #f8fafc;
  color: #64748b;
}

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

/* --------------------------------------------------------------------------
   7. PAGINACIÓN Y ESTADOS VACÍOS
   -------------------------------------------------------------------------- */
.directory-pagination-wrapper {
  background: var(--dir-card-bg);
  border: 1px solid var(--dir-border);
  border-radius: var(--dir-radius);
  padding: 16px 24px;
  box-shadow: var(--dir-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

.directory-pagination-info {
  font-size: 0.88rem;
  color: var(--dir-gray);
  font-weight: 500;
  margin: 0;
}

.directory-pagination-info strong {
  color: var(--dir-dark);
  font-weight: 700;
}

.directory-empty-state {
  background: var(--dir-card-bg);
  border: 1px dashed #cbd5e1;
  border-radius: var(--dir-radius);
  padding: 48px 24px;
  text-align: center;
  width: 100%;
}

.directory-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 16px;
}

.directory-empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dir-dark);
  margin-bottom: 6px;
}

.directory-empty-text {
  font-size: 0.9rem;
  color: var(--dir-gray);
  max-width: 440px;
  margin: 0 auto 20px auto;
}

/* --------------------------------------------------------------------------
   8. BREAKPOINTS RESPONSIVOS
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .kpi-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .kpi-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }
  .directory-header {
    flex-direction: column;
    align-items: stretch;
  }
  .directory-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .directory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-form-modern {
    max-width: 100%;
  }
  .toolbar-right-controls {
    justify-content: space-between;
    width: 100%;
  }
  .directory-pagination-wrapper {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .directory-header {
    padding: 16px;
  }
  .directory-header-left {
    flex-direction: column;
    text-align: center;
  }
  .directory-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .directory-header-actions .btn-modern {
    width: 100%;
  }
  .view-toggle-container {
    width: 100%;
  }
  .view-toggle-btn {
    flex: 1;
    justify-content: center;
  }
}



/* ==========================================================================
   DROPDOWNS DE NOTIFICACIONES Y ALERTAS MODERNAS (CAMPANA, VACUNA, INVENTARIO)
   Inspirado en el diseño de tarjetas modernas de veterinarios (listados-modernos)
   ========================================================================== */

/* Contenedor del Dropdown */
.dropdown-menu.citas-hoy,
.dropdown-menu.vacunas-prox,
.dropdown-menu.productos-vencido {
  width: 380px !important;
  max-width: 92vw !important;
  border-radius: 18px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14) !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  animation: alertFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-top: 10px !important;
}

@keyframes alertFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header del Dropdown */
.alert-dropdown-header {
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-dropdown-header-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-dropdown-header-title i {
  font-size: 1.1rem;
}

.alert-header-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* Cuerpo con scroll suave */
.alert-dropdown-body {
  max-height: 390px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-dropdown-body::-webkit-scrollbar {
  width: 6px;
}
.alert-dropdown-body::-webkit-scrollbar-track {
  background: transparent;
}
.alert-dropdown-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.alert-dropdown-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Tarjeta individual de Alerta */
.alert-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none !important;
  color: inherit !important;
}

.alert-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

/* Acentos laterales según tipo */
.alert-card-cita {
  border-left: 4px solid #0284c7 !important;
}
.alert-card-historia {
  border-left: 4px solid #8b5cf6 !important;
}
.alert-card-vacuna {
  border-left: 4px solid #10b981 !important;
}
.alert-card-vencido {
  border-left: 4px solid #ef4444 !important;
}

/* Avatar / Icono en la tarjeta */
.alert-card-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-card-icon-pill {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Contenido de la tarjeta */
.alert-card-content {
  flex: 1;
  min-width: 0;
}

.alert-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  margin: 0 0 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-card-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0 0 5px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-card-sub strong {
  color: #334155;
}

/* Pills de tags (hora, fecha, stock) */
.alert-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.alert-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.alert-pill-blue { background: #e0f2fe; color: #0284c7; }
.alert-pill-purple { background: #f5f3ff; color: #7c3aed; }
.alert-pill-green { background: #ecfdf5; color: #059669; }
.alert-pill-red { background: #fef2f2; color: #dc2626; }
.alert-pill-amber { background: #fffbeb; color: #d97706; }

/* Botón de acción WhatsApp */
.alert-wa-action {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  background: #25d366;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  text-decoration: none !important;
}

.alert-wa-action:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.45);
  background: #20ba59;
}

/* Tarjeta de estado vacío (Empty State) */
.alert-empty-card {
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  margin: 10px;
}

.alert-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
}

.alert-empty-title {
  font-weight: 800;
  font-size: 0.96rem;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.alert-empty-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  max-width: 260px;
  line-height: 1.4;
}

/* Footer del Dropdown */
.alert-dropdown-footer {
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.alert-dropdown-footer a {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.alert-dropdown-footer a:hover {
  color: #0369a1;
  transform: translateX(3px);
}
