/* Estilos personalizados */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #e3f7ec 100%);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #222;
}

.navbar {
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
  background: #fff;
  min-height: 60px;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
  color: #198754 !important; /* Verde Bootstrap */
  white-space: nowrap;
}

/* Mejoras para el texto del usuario en el navbar */
.navbar-text {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  display: inline-block;
}

.navbar-text strong {
  font-weight: 600;
  color: #198754;
}

/* Mejoras para móvil - mostrar texto completo */
@media (max-width: 991.98px) {
  .navbar-text {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    max-width: none !important;
  }
}

.nav-link {
  border-radius: 1.5rem;
  margin: 0 0.2rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.nav-link.active, .nav-link:hover {
  background: #198754;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.2);
}

/* Mejoras para el contenedor del navbar */
.navbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* Menú principal con scroll horizontal si es necesario */
.navbar-nav:first-of-type {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: calc(100vw - 400px);
}

.navbar-nav:first-of-type::-webkit-scrollbar {
  display: none;
}

/* Sección derecha del navbar */
.navbar-nav.ms-auto {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto !important;
}

/* Icono de notificaciones mejorado */
.nav-item.position-relative .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  margin: 0 0.25rem;
}

.nav-item.position-relative .nav-link:hover {
  background: rgba(25, 135, 84, 0.1);
  transform: scale(1.05);
}

#notificationsBadge {
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  line-height: 16px;
  padding: 0;
  top: -2px;
  right: -2px;
}

.card {
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px 0 rgba(25,135,84,0.07);
  border: none;
}

.card-title {
  color: #111;
  font-weight: 600;
}

.form-control {
  border-radius: 1.5rem;
  border: 1px solid #d1d5db;
  padding: 0.75rem 1.25rem;
}

.btn-success, .btn-primary {
  border-radius: 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px 0 rgba(25,135,84,0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-success:hover, .btn-primary:hover {
  filter: brightness(0.95);
  box-shadow: 0 4px 16px 0 rgba(25,135,84,0.12);
}

::-webkit-scrollbar {
  width: 8px;
  background: #e3f7ec;
}
::-webkit-scrollbar-thumb {
  background: #b6e6c3;
  border-radius: 4px;
}

/* Mejoras responsive para navbar */

/* Para pantallas grandes (escritorio) */
@media (min-width: 1200px) {
  .navbar-text {
    max-width: 300px;
    font-size: 0.95rem;
  }
  
  .nav-link {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    margin: 0 0.3rem;
  }
}

/* Para pantallas medianas (tablets landscape, laptops pequeños) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar-text {
    max-width: 200px;
    font-size: 0.85rem;
  }
  
  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    margin: 0 0.15rem;
  }
  
  .navbar-nav:first-of-type {
    max-width: calc(100vw - 350px);
  }
}

/* Navegación móvil personalizada */
.mobile-menu-toggle {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Botón hamburguesa visible en todas las pantallas */
.mobile-menu-toggle {
  display: flex !important;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #198754;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu-overlay.active {
  transform: translateX(0);
}

.mobile-menu-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  padding: 2rem 1.5rem;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-user-info {
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 1.5rem;
}

.mobile-user-text {
  color: #198754;
  font-size: 1rem;
  line-height: 1.4;
}

.mobile-user-text strong {
  color: #212529;
  font-weight: 600;
}

.mobile-nav-items {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.mobile-nav-items .nav-item {
  margin-bottom: 0.5rem;
}

.mobile-nav-items .nav-link {
  display: block;
  padding: 1rem 1.25rem;
  color: #212529;
  text-decoration: none;
  border-radius: 1rem;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-weight: 500;
  border: 2px solid transparent;
}

.mobile-nav-items .nav-link:hover,
.mobile-nav-items .nav-link.active {
  background: linear-gradient(135deg, #198754, #20c997);
  color: #fff;
  transform: translateX(8px);
  border-color: rgba(255,255,255,0.3);
}

.mobile-actions {
  border-top: 1px solid #e9ecef;
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.mobile-action-btn {
  display: block;
  padding: 1rem 1.25rem;
  color: #212529;
  text-decoration: none;
  border-radius: 1rem;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  border: 2px solid transparent;
}

.mobile-action-btn:hover {
  background: #f8f9fa;
  color: #198754;
  transform: translateX(4px);
}

.mobile-action-btn.logout:hover {
  background: #dc3545;
  color: #fff;
}

/* Layout del header reorganizado */
.navbar-header {
  position: relative;
  padding: 0.5rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 2;
}

.mobile-menu-toggle {
  z-index: 10;
  position: relative;
  grid-column: 1;
}

/* Estilos para header actions */
.header-actions {
  gap: 0.5rem;
  z-index: 10;
  position: relative;
  grid-column: 3;
  justify-self: end;
}

.header-actions .nav-link {
  color: #198754;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions .nav-link:hover {
  background: rgba(25, 135, 84, 0.1);
  color: #198754;
  transform: scale(1.1);
}

/* Responsive para móvil */
@media (max-width: 768px) {
  .navbar-text {
    display: none !important;
  }
  
  /* Hide notification and logout buttons on mobile since they're in sidebar */
  .header-actions {
    display: none !important;
  }
}
  
  .navbar-text {
    margin-left: 0.5rem;
    margin-bottom: 1rem;
    display: block;
    text-align: left;
    max-width: none;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(25,135,84,0.05);
    border-radius: 1.5rem;
    border: 1px solid rgba(25,135,84,0.1);
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-wrap: break-word;
    line-height: 1.4;
  }
  
  .navbar-nav.ms-auto {
    margin-top: 1.5rem;
    text-align: center;
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(25,135,84,0.1);
    padding-top: 1.5rem;
  }
  
  .navbar-nav.ms-auto .nav-item {
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  .navbar-nav.ms-auto .nav-link {
    width: 100%;
    justify-content: center;
  }
  
  .navbar .container-fluid {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar img[alt="Logo"] {
    margin-bottom: 0 !important;
    margin-right: 0.5rem !important;
    height: 24px;
  }
  
  .navbar-toggler {
    margin-left: 0 !important;
    margin-right: 0 !important;
    order: 2;
    align-self: center;
    border: 2px solid rgba(25,135,84,0.2);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(25,135,84,0.25);
  }
  
  .navbar-brand {
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    font-size: 1.1rem;
  }
  
  /* Icono de notificaciones en móvil */
  .nav-item.position-relative .nav-link {
    width: auto;
    height: auto;
    border-radius: 1.5rem;
    padding: 0.75rem 1.25rem;
  }

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
  .card-title {
    font-size: 1.1rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  .card {
    border-radius: 0.75rem;
  }
  
  .navbar-text {
    font-size: 0.9rem;
  }
  
  .navbar img[alt="Logo"] {
    height: 20px;
  }
}

/* Mejoras adicionales para navbar */
.navbar-nav .nav-item:last-child .nav-link {
  margin-right: 0;
}

.navbar-nav .nav-item:first-child .nav-link {
  margin-left: 0;
}

/* Animación suave para el colapso del navbar */
.navbar-collapse {
  transition: all 0.4s ease-in-out;
}

.navbar-collapse.collapsing {
  transition: height 0.4s ease-in-out;
}

/* Mejora visual para el botón hamburguesa */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2825, 135, 84, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Scroll suave para el menú horizontal en desktop */
.navbar-nav:first-of-type {
  scroll-behavior: smooth;
}

/* Indicador visual de overflow en el menú */
.navbar-nav:first-of-type::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (min-width: 992px) {
  .navbar-nav:first-of-type::-webkit-scrollbar {
    display: none;
  }
  
  .navbar-nav:first-of-type.overflowing::after {
    opacity: 1;
  }
}

.notification-item .card-body .d-flex.align-items-start.gap-3 > div {
  max-width: 500px;
  word-break: break-word;
}
@media (max-width: 600px) {
  .notification-item .card-body .d-flex.align-items-start.gap-3 > div {
    max-width: 220px;
  }
}

/* Mejoras específicas para el modal de notificaciones */
.notifications-modal {
  --bs-modal-width: 90vw;
}

.notifications-container {
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Estilos mejorados para las notificaciones */
.notification-item {
  transition: all 0.3s ease;
  border-radius: 0 !important;
  position: relative;
}

/* Estados de notificaciones */
.notification-item.notification-unread {
  background-color: #ffffff !important;
  border: 1px solid #e9ecef !important;
}

.notification-item.notification-read {
  background-color: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
}

.notification-item:hover {
  background-color: #e3f7ec !important;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15) !important;
}

.notification-item .card-body {
  padding: 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.notification-item:last-child .card-body {
  border-bottom: none;
}

/* Estilos de texto mejorados */
.notification-title.unread {
  color: #212529 !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

.notification-title.read {
  color: #6c757d !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
}

.notification-body.unread {
  color: #495057 !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}

.notification-body.read {
  color: #6c757d !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
}

.notification-meta.unread {
  color: #6c757d !important;
  font-size: 0.8rem !important;
}

.notification-meta.read {
  color: #adb5bd !important;
  font-size: 0.75rem !important;
}

/* Iconos de notificaciones */
.notification-item .bi {
  opacity: 1 !important;
}

.notification-unread .bi {
  filter: brightness(1) !important;
}

.notification-read .bi {
  filter: brightness(0.7) !important;
}

/* Mejoras para badges y botones */
.notification-item .badge {
  font-weight: 600 !important;
  padding: 0.4em 0.6em !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
}

.notification-item .btn-success {
  background-color: #198754 !important;
  border-color: #146c43 !important;
  font-weight: 600 !important;
}

.notification-item .btn-success:hover {
  background-color: #146c43 !important;
  border-color: #0f5132 !important;
  transform: scale(1.05) !important;
}

/* Estado vacío mejorado */
#notificationsEmpty {
  background-color: #f8f9fa !important;
  color: #495057 !important;
}

#notificationsEmpty .text-success {
  color: #198754 !important;
}

#notificationsEmpty h6 {
  color: #212529 !important;
  font-weight: 600 !important;
}

#notificationsEmpty p {
  color: #6c757d !important;
}

/* Touch targets mejorados */
.notification-item .btn {
  min-height: 44px;
  min-width: 44px;
  transition: all 0.2s ease;
}

.notification-item .btn:hover {
  transform: scale(1.05);
}

.notification-item .btn-sm {
  min-height: 40px;
  min-width: 40px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Swipe indicator */
.notification-item.swipe-enabled {
  position: relative;
  overflow: hidden;
}

.notification-item.swipe-enabled::after {
  content: '→';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  color: #28a745;
  font-size: 1.5rem;
  font-weight: bold;
  transition: right 0.3s ease;
}

.notification-item.swiping::after {
  right: 10px;
}

/* Loading state animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-item {
  animation: fadeInUp 0.4s ease;
}

.notification-item:nth-child(odd) {
  animation-delay: 0.1s;
}

.notification-item:nth-child(even) {
  animation-delay: 0.2s;
}

/* Mejoras para móviles pequeños */
@media (max-width: 576px) {
  .notifications-modal {
    --bs-modal-width: 95vw;
  }
  
  .modal-dialog.notifications-modal {
    margin: 0.25rem;
    max-width: calc(100vw - 0.5rem);
  }
  
  .modal-content {
    max-height: 95vh;
    border-radius: 1rem;
  }
  
  .notifications-container {
    max-height: 70vh;
  }
  
  .notification-item .card-body {
    padding: 1rem 0.75rem;
  }
  
  .notification-item .d-flex.align-items-start.gap-3 {
    gap: 0.75rem !important;
  }
  
  .modal-header {
    padding: 1rem 0.75rem;
    border-radius: 1rem 1rem 0 0;
  }
  
  .modal-title {
    font-size: 1.1rem;
  }
  
  .modal-footer {
    padding: 0.75rem;
    border-radius: 0 0 1rem 1rem;
  }
  
  /* Botón de cerrar más grande para touch */
  .modal-header .btn-close {
    padding: 1rem;
    font-size: 1.4rem;
    margin: -0.5rem -0.25rem -0.5rem auto;
  }
  
  /* Texto de notificación más legible */
  .notification-item .fw-semibold {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .notification-item .small {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Iconos más grandes */
  .notification-item .bi {
    font-size: 1.25rem !important;
  }
  
  /* Mejor contraste en mobile */
  .notification-title.unread {
    color: #000000 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
  }
  
  .notification-title.read {
    color: #495057 !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
  }
  
  /* Contenedores de toast específicos para mobile */
  .toast-container-top-center {
    position: fixed !important;
    top: 80px !important; /* Debajo del navbar */
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1060 !important;
    max-width: calc(100vw - 1rem) !important;
    width: auto !important;
  }
  
  .toast-container-bottom-right {
    position: fixed !important;
    bottom: 1rem !important;
    right: 1rem !important;
    z-index: 1060 !important;
    max-width: calc(100vw - 2rem) !important;
  }
  
  .toast-container-bottom-left {
    position: fixed !important;
    bottom: 1rem !important;
    left: 1rem !important;
    z-index: 1060 !important;
    max-width: calc(100vw - 2rem) !important;
  }
  
  /* Toast mejorados para mobile */
  .toast.enhanced {
    min-width: 280px !important;
    max-width: calc(100vw - 2rem) !important;
    font-size: 0.9rem !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
  }
  
  .toast.enhanced .toast-body {
    padding: 1rem !important;
    line-height: 1.5 !important;
  }
  
  .toast.enhanced .toast-body strong {
    font-size: 1rem !important;
    margin-bottom: 0.25rem !important;
    display: block !important;
  }
  
  .toast.enhanced .toast-body .small {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }
  
  /* Botón cerrar más accesible en toast mobile */
  .toast.enhanced .btn-close {
    padding: 0.75rem !important;
    margin: -0.25rem -0.25rem -0.25rem 0.5rem !important;
    font-size: 1.2rem !important;
  }
  
  /* Iconos en toast mobile */
  .toast.enhanced .bi {
    font-size: 1.2rem !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
  }
  
  .notification-body.unread {
    color: #212529 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
  }
  
  .notification-body.read {
    color: #495057 !important;
    font-size: 0.95rem !important;
  }
  
  .notification-meta.unread {
    color: #495057 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
  }
  
  .notification-meta.read {
    color: #6c757d !important;
    font-size: 0.85rem !important;
  }
  
  /* Mejor hover en mobile */
  .notification-item:hover {
    background-color: #d1e7dd !important;
  }
}

@media (max-width: 768px) and (min-width: 577px) {
  /* Tabletas y móviles medianos */
  .modal-dialog.modal-lg {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }
  
  .modal-body {
    max-height: 60vh !important;
  }
  
  .notification-item .card-body {
    padding: 1rem 0.75rem;
  }
  
  /* Toast containers para tablets */
  .toast-container-top-center {
    position: fixed !important;
    top: 70px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1060 !important;
    max-width: calc(100vw - 2rem) !important;
  }
  
  .toast-container-bottom-right {
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 1060 !important;
    max-width: calc(100vw - 3rem) !important;
  }
  
  .toast-container-bottom-left {
    position: fixed !important;
    bottom: 1.5rem !important;
    left: 1.5rem !important;
    z-index: 1060 !important;
    max-width: calc(100vw - 3rem) !important;
  }
  
  /* Toast mejorados para tablets */
  .toast.enhanced {
    min-width: 320px !important;
    max-width: calc(100vw - 3rem) !important;
    font-size: 0.95rem !important;
  }
}

/* Mejoras de accesibilidad táctil */
.notification-item .btn {
  min-height: 44px; /* Tamaño mínimo recomendado para touch */
  min-width: 44px;
}

.notification-item .btn-sm {
  min-height: 38px;
  min-width: 38px;
  padding: 0.375rem 0.5rem;
}

/* Centrar el modal verticalmente en pantallas grandes */
@media (min-width: 769px) {
  .modal-dialog-scrollable.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
  }
}

/* Mejoras para notificaciones clickeables */
.notification-item[style*="cursor: pointer"] {
  position: relative;
  transition: all 0.2s ease;
}

.notification-item[style*="cursor: pointer"]:hover {
  background-color: #f8f9fa !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.notification-item[style*="cursor: pointer"]:hover .card-body {
  background-color: transparent;
}

.notification-item[style*="cursor: pointer"]:active {
  transform: translateY(0);
}

/* Indicador visual para notificaciones clickeables */
.notification-item[style*="cursor: pointer"]::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid #198754;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.notification-item[style*="cursor: pointer"]:hover::after {
  opacity: 1;
}

/* Estilos para botones de acción dentro de notificaciones */
.notification-item .btn-link {
  transition: transform 0.2s ease;
}

.notification-item .btn-link:hover {
  transform: scale(1.2);
}

/* Mejorar el aspecto de botones que previenen propagación */
.notification-item .btn[onclick*="stopPropagation"] {
  z-index: 10;
  position: relative;
}

/* Animación de carga para navegación */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.notification-loading {
  animation: fadeIn 0.3s ease;
}

/* Toast mejorado para feedback de navegación */
.toast.navigation-feedback {
  border-left: 4px solid #198754;
}

/* Mejoras para desktop */
@media (min-width: 992px) {
  .notifications-modal {
    --bs-modal-width: 75vw;
    max-width: 900px;
  }
  
  .notifications-container {
    max-height: 80vh;
  }
  
  .notification-item .card-body {
    padding: 1.5rem;
  }
  
  .notification-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  }
  
  /* Mejor aprovechamiento del espacio en desktop */
  .notification-item .d-flex.align-items-start.gap-3 {
    gap: 1.5rem !important;
  }
  
  /* Teclado navigation hints */
  .notification-item[tabindex]:focus {
    outline: 2px solid #198754;
    outline-offset: 2px;
    background-color: #e3f7ec !important;
  }
}

/* Mejoras para tablets */
@media (min-width: 769px) and (max-width: 991px) {
  .notifications-modal {
    --bs-modal-width: 85vw;
  }
  
  .notifications-container {
    max-height: 75vh;
  }
}

/* Toast positions variadas para desktop */
.toast-container-top-right {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
}

.toast-container-bottom-left {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 9999;
}

.toast-container-top-center {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}

/* Mejoras para toasts */
.toast.enhanced {
  min-width: 350px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

.toast.priority-high {
  border-left: 4px solid #dc3545;
  background-color: #dc3545 !important;
  color: white !important;
  animation: pulse 2s infinite;
}

.toast.priority-medium {
  border-left: 4px solid #198754;
  background-color: #198754 !important;
  color: white !important;
}

.toast.priority-low {
  border-left: 4px solid #6c757d;
  background-color: #6c757d !important;
  color: white !important;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Mejoras de responsividad para toasts */
@media (max-width: 576px) {
  .toast-container-top-right,
  .toast-container-bottom-left,
  .toast-container-top-center,
  #notification-toast-container {
    right: 0.5rem !important;
    left: 0.5rem !important;
    top: 0.5rem !important;
    transform: none !important;
  }
  
  .toast, .toast.enhanced {
    width: 100% !important;
    max-width: none !important;
    min-width: auto !important;
  }
}

/* Animaciones para toasts */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-container-top-right .toast.enhanced,
.toast-container-bottom-right .toast.enhanced {
  animation: slideInRight 0.4s ease-out;
}

.toast-container-top-left .toast.enhanced,
.toast-container-bottom-left .toast.enhanced {
  animation: slideInLeft 0.4s ease-out;
}

.toast-container-top-center .toast.enhanced {
  animation: slideInDown 0.4s ease-out;
}

.toast-container-bottom-center .toast.enhanced {
  animation: slideInUp 0.4s ease-out;
}

/* Responsividad adicional para toasts */
@media (max-width: 480px) {
  .toast.enhanced {
    min-width: 260px;
    max-width: calc(100vw - 20px);
  }
}

/* Estilos adicionales para mejorar la experiencia móvil */
@media (max-width: 768px) {
  /* Navbar mobile mejorado */
  .navbar {
    min-height: 60px !important;
    padding: 0.5rem 1rem !important;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0 !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    touch-action: manipulation !important;
  }
  
  /* Alertas mobile friendly */
  .alert {
    margin: 0.5rem !important;
    border-radius: 1rem !important;
    padding: 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }
  
  .alert .btn-close {
    padding: 1rem !important;
    font-size: 1.2rem !important;
  }
  
  /* Mejoras para notificaciones prioritarias */
  .notification-item.notification-unread.border-start.border-4.priority-high {
    border-left-width: 6px !important;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.2) !important;
  }
  
  .notification-item.notification-unread.border-start.border-4.priority-medium {
    border-left-width: 5px !important;
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.2) !important;
  }
  
  .notification-item.notification-unread.border-start.border-4.priority-low {
    border-left-width: 4px !important;
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.2) !important;
  }
  
  /* Feedback visual mejorado para touch */
  .notification-item:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease !important;
  }
  
  .btn:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
  }
  
  /* Mejor separación entre elementos */
  .notification-item + .notification-item {
    margin-top: 0.75rem !important;
  }
  
  /* Scroll suave en containers de notificaciones */
  .notifications-container {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* Estilos específicos para móviles muy pequeños */
@media (max-width: 360px) {
  .navbar-brand {
    font-size: 0.9rem !important;
  }
  
  .navbar-text {
    font-size: 0.8rem !important;
    max-width: 150px !important;
  }
  
  .toast.enhanced {
    min-width: 260px !important;
    max-width: calc(100vw - 1rem) !important;
  }
  
  .toast.enhanced .toast-body {
    padding: 0.75rem !important;
    font-size: 0.85rem !important;
  }
  
  /* Modal de notificaciones para móviles muy pequeños */
  .modal-content {
    margin: 0.25rem !important;
    border-radius: 0.75rem !important;
  }
  
  .modal-body {
    padding: 0.75rem !important;
  }
  
  .notification-item .card-body {
    padding: 0.75rem 0.5rem !important;
  }
}
