/* NOTIFICACIONES - Animaciones */
@keyframes login-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bell-shake {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(12deg); }
  20%, 40%, 60%, 80% { transform: rotate(-12deg); }
}
@keyframes badge-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes sidebar-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes notif-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes notif-slide-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
.bell-shake { animation: bell-shake 0.5s ease-in-out; }
.badge-pulse { animation: badge-pulse 0.6s ease-in-out; }
.sidebar-badge-pulse { animation: sidebar-pulse 2s ease-in-out infinite; }

/* Apple-style notification dropdown */
#dropdown_notificaciones {
  background: rgba(28, 35, 48, 0.92) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5) !important;
  padding: 8px !important;
  max-height: 420px;
  overflow-y: auto;
  min-width: 320px;
}
#dropdown_notificaciones::-webkit-scrollbar { width: 4px; }
#dropdown_notificaciones::-webkit-scrollbar-track { background: transparent; }
#dropdown_notificaciones::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* Apple-style header */
.notif-apple-header {
  padding: 12px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
}
.notif-apple-header .title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.2px;
}
.notif-apple-header .title i {
  margin-right: 8px;
  color: rgba(255,255,255,0.4);
}
.notif-apple-header .count {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
  padding: 2px 10px;
  border-radius: 20px;
}

/* Apple-style notification item */
.notif-apple-item {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
}
.notif-apple-item:hover {
  background: rgba(255,255,255,0.09);
}
.notif-apple-item:last-child {
  margin-bottom: 0;
}

/* Icon circle */
.notif-apple-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #ffc107;
}

/* Content area */
.notif-apple-content {
  flex: 1;
  min-width: 0;
}
.notif-apple-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1px;
  line-height: 1.3;
}
.notif-apple-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.notif-apple-time {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  margin-top: 3px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Apple-style footer */
.notif-apple-footer {
  padding: 10px 14px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
}
.notif-apple-footer a {
  font-size: 0.75rem;
  color: #5ac8fa;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
  transition: opacity 0.2s;
}
.notif-apple-footer a:hover {
  opacity: 0.8;
  color: #5ac8fa;
}
.notif-apple-footer .mute-link {
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}
.notif-apple-footer .mute-link:hover {
  color: rgba(255,255,255,0.7);
}

/* Empty state */
.notif-apple-empty {
  padding: 28px 16px;
  text-align: center;
}
.notif-apple-empty i {
  font-size: 1.6rem;
  color: rgba(255,255,255,0.1);
  margin-bottom: 6px;
  display: block;
}
.notif-apple-empty span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* Apple-style floating banner (macOS) */
.notif-floating {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  background: rgba(28, 35, 48, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  max-width: 360px;
  animation: notif-slide-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.notif-floating-out {
  animation: notif-slide-out 0.3s ease-in forwards;
}
.notif-floating:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.notif-floating .float-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: #ffc107;
}
.notif-floating .float-content {
  flex: 1;
  min-width: 0;
}
.notif-floating .float-content .float-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}
.notif-floating .float-content .float-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
}

/* Sidebar visual polish */
.nav-sidebar .nav-header {
  letter-spacing: 0.5px;
  font-size: 0.6rem;
}
.nav-sidebar .nav-link {
  border-left: 3px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.nav-sidebar .nav-link:hover {
  background: rgba(255,255,255,0.08);
  border-left-color: rgba(255,255,255,0.35);
}
.nav-sidebar .nav-link i,
.nav-sidebar .nav-link p {
  transition: transform 0.15s;
  display: inline-block;
}
.nav-sidebar .nav-link:hover i {
  transform: translateX(4px) scale(1.15);
}
.nav-sidebar .nav-link:hover p {
  transform: translateX(4px);
}
.nav-sidebar .nav-link.bg-light {
  border-left-color: #ffc107;
}
.sidebar-logout {
  flex-shrink: 0;
}
.sidebar-logout a:hover {
  background: rgba(255,255,255,0.15) !important;
  text-decoration: none;
}
.main-sidebar {
  background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%) !important;
}
.main-header.navbar {
  background: linear-gradient(180deg, #2c3e50 0%, #1f2d3d 100%) !important;
}

/* Sidebar badges - menos agresivos */
.main-sidebar .badge-pill {
  opacity: 0.75;
}

/* Glassmorphism login / lock-screen */
.login-glass select option {
  background: #1a2a3a;
  color: #fff;
}
.login-glass .btn-submit:hover,
.btn-submit:hover {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.3) !important;
}

/* Lock-screen modal responsive */
#modal_bloquear_pantalla .modal-dialog {
  max-width: 310px;
}
@media (min-width: 768px) {
  #modal_bloquear_pantalla .modal-dialog {
    max-width: 400px;
  }
}

/* Sidebar responsive - evitar que icono se apile sobre el texto en mobile */
@media (max-width: 767.98px) {
  .main-sidebar {
    width: 280px !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }
  body.sidebar-open .main-sidebar {
    transform: translateX(0) !important;
  }
  .nav-sidebar .nav-link {
    flex-wrap: nowrap !important;
    white-space: nowrap;
  }
  .nav-sidebar .nav-link p {
    display: inline !important;
    white-space: nowrap;
  }
}
