/* ===================================
   ADIT SIDEBAR NAVIGATION
   Sistema de navegación lateral principal
   ================================= */

:root {
  --adit-sidebar-width: 260px;
  --adit-sidebar-collapsed-width: 70px;
  --adit-sidebar-bg: linear-gradient(180deg, #3d1a2a 0%, #2d1422 50%, #1f0d18 100%);
  --adit-sidebar-text: #d4c4cc;
  --adit-sidebar-text-active: #ffffff;
  --adit-sidebar-accent: #c41e4a;
  --adit-sidebar-accent-light: rgba(196, 30, 74, 0.2);
  --adit-sidebar-hover: rgba(196, 30, 74, 0.12);
  --adit-sidebar-active-bg: linear-gradient(90deg, rgba(196, 30, 74, 0.35) 0%, rgba(196, 30, 74, 0.08) 100%);
  --adit-topbar-height: 56px;
  --adit-sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --adit-sidebar-glow: 0 0 30px rgba(196, 30, 74, 0.15);
}

/* ===== SIDEBAR PRINCIPAL ===== */

/* Animación de entrada del sidebar */
@keyframes adit-sidebar-slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Animación de brillo para elementos activos */
@keyframes adit-sidebar-glow-pulse {
  0%, 100% { box-shadow: inset 3px 0 0 var(--adit-sidebar-accent), 0 0 10px rgba(196, 30, 74, 0.1); }
  50% { box-shadow: inset 3px 0 0 var(--adit-sidebar-accent), 0 0 20px rgba(196, 30, 74, 0.25); }
}

.adit-main-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--adit-sidebar-width);
  height: 100vh;
  background: var(--adit-sidebar-bg);
  z-index: 1100;
  transition: var(--adit-sidebar-transition);
  overflow: hidden;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3), inset -1px 0 0 rgba(255, 255, 255, 0.03);
  animation: adit-sidebar-slideIn 0.4s ease-out;
}

/* Efecto de borde brillante en la parte superior */
.adit-main-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 74, 0.5), var(--adit-sidebar-accent), rgba(196, 30, 74, 0.5), transparent);
  opacity: 0.8;
}

.adit-main-sidebar.collapsed {
  width: var(--adit-sidebar-collapsed-width);
}

.adit-sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ===== HEADER DEL SIDEBAR ===== */
.adit-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 60px;
  background: rgba(0, 0, 0, 0.15);
  position: relative;
}

.adit-sidebar-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 74, 0.4), transparent);
}

.adit-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.adit-sidebar-brand:hover {
  transform: scale(1.02);
}

.adit-sidebar-logo {
  width: 100%;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) brightness(1.2);
  transition: transform 0.3s ease, filter 0.3s ease;
  background-color: #301722;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.adit-sidebar-brand:hover .adit-sidebar-logo {
  filter: drop-shadow(0 0 8px rgba(255, 107, 138, 0.8)) drop-shadow(0 0 20px rgba(196, 30, 74, 0.6)) brightness(1.4);
  box-shadow: 0 0 20px rgba(196, 30, 74, 0.5), 0 0 40px rgba(255, 107, 138, 0.3), 0 0 0 2px rgba(255, 107, 138, 0.4);
}

.adit-sidebar-brand-text {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  white-space: nowrap;
  transition: opacity 0.2s ease, color 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.adit-sidebar-brand:hover .adit-sidebar-brand-text {
  color: #f0e6e8;
}

.adit-main-sidebar.collapsed .adit-sidebar-brand-text {
  opacity: 0;
  width: 0;
}

.adit-sidebar-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0aec0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.adit-sidebar-toggle:hover {
  background: var(--adit-sidebar-accent);
  border-color: var(--adit-sidebar-accent);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(196, 30, 74, 0.4);
}

.adit-sidebar-toggle:active {
  transform: scale(0.95);
}

.adit-main-sidebar.collapsed .adit-sidebar-toggle i {
  transform: rotate(180deg);
}

/* ===== NAVEGACIÓN ===== */

/* Animación de pulso para item activo */
@keyframes adit-nav-active-pulse {
  0%, 100% { 
    box-shadow: inset 3px 0 0 var(--adit-sidebar-accent), 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  50% { 
    box-shadow: inset 3px 0 0 var(--adit-sidebar-accent), 0 2px 12px rgba(196, 30, 74, 0.25);
  }
}

/* ===== ANIMACIÓN DE PARTÍCULAS ===== */
@keyframes adit-particle-float-1 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.3; }
  25% { transform: translateY(-30px) translateX(10px) scale(1.2); opacity: 0.6; }
  50% { transform: translateY(-60px) translateX(-5px) scale(0.8); opacity: 0.4; }
  75% { transform: translateY(-90px) translateX(15px) scale(1.1); opacity: 0.5; }
}

@keyframes adit-particle-float-2 {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.2; }
  33% { transform: translateY(-40px) translateX(-15px) rotate(120deg); opacity: 0.5; }
  66% { transform: translateY(-80px) translateX(10px) rotate(240deg); opacity: 0.3; }
}

@keyframes adit-particle-float-3 {
  0%, 100% { transform: translateY(0) scale(0.5); opacity: 0.4; }
  50% { transform: translateY(-100px) scale(1.5); opacity: 0.1; }
}

@keyframes adit-particle-glow {
  0%, 100% { box-shadow: 0 0 2px rgba(196, 30, 74, 0.3); }
  50% { box-shadow: 0 0 8px rgba(196, 30, 74, 0.6), 0 0 15px rgba(255, 107, 138, 0.3); }
}

@keyframes adit-particle-drift {
  0% { transform: translateY(100%) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100%) translateX(20px); opacity: 0; }
}

.adit-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 0;
  position: relative;
}

/* Contenedor de partículas */
.adit-sidebar-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(196, 30, 74, 0.15) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 138, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(196, 30, 74, 0.12) 1.5px, transparent 1.5px),
    radial-gradient(circle at 60% 20%, rgba(255, 150, 180, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 10% 60%, rgba(196, 30, 74, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 90% 40%, rgba(255, 107, 138, 0.12) 1px, transparent 1px);
  background-size: 100% 100%;
  animation: adit-particles-ambient 8s ease-in-out infinite;
}

@keyframes adit-particles-ambient {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-5px); }
}

/* Partículas flotantes dinámicas */
.adit-particles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.adit-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.adit-particle-1 {
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(196, 30, 74, 0.8), transparent);
  left: 15%;
  bottom: 10%;
  animation: adit-particle-float-1 12s ease-in-out infinite, adit-particle-glow 3s ease-in-out infinite;
}

.adit-particle-2 {
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(255, 107, 138, 0.7), transparent);
  left: 75%;
  bottom: 30%;
  animation: adit-particle-float-2 15s ease-in-out infinite 1s, adit-particle-glow 4s ease-in-out infinite 0.5s;
}

.adit-particle-3 {
  width: 5px;
  height: 5px;
  background: radial-gradient(circle, rgba(196, 30, 74, 0.5), transparent);
  left: 40%;
  bottom: 50%;
  animation: adit-particle-float-3 18s ease-in-out infinite 2s;
}

.adit-particle-4 {
  width: 2px;
  height: 2px;
  background: rgba(255, 150, 180, 0.9);
  left: 25%;
  bottom: 70%;
  animation: adit-particle-float-1 10s ease-in-out infinite 3s, adit-particle-glow 2.5s ease-in-out infinite;
}

.adit-particle-5 {
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(255, 107, 138, 0.6), transparent);
  left: 85%;
  bottom: 15%;
  animation: adit-particle-float-2 14s ease-in-out infinite 4s;
}

.adit-particle-6 {
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(196, 30, 74, 0.7), transparent);
  left: 55%;
  bottom: 85%;
  animation: adit-particle-float-3 16s ease-in-out infinite 1.5s, adit-particle-glow 3.5s ease-in-out infinite;
}

.adit-particle-7 {
  width: 2px;
  height: 2px;
  background: rgba(255, 200, 210, 0.8);
  left: 10%;
  bottom: 45%;
  animation: adit-particle-drift 20s linear infinite;
}

.adit-particle-8 {
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(196, 30, 74, 0.6), transparent);
  left: 65%;
  bottom: 60%;
  animation: adit-particle-drift 25s linear infinite 5s;
}

.adit-sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.adit-sidebar-nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.adit-sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--adit-sidebar-accent), rgba(196, 30, 74, 0.5));
  border-radius: 10px;
}

.adit-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--adit-sidebar-accent);
}

.adit-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.adit-sidebar-item {
  margin: 2px 8px;
}

.adit-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--adit-sidebar-text);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

/* Efecto de fondo animado */
.adit-sidebar-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--adit-sidebar-accent-light) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.adit-sidebar-link:hover::before {
  opacity: 1;
}

.adit-sidebar-link i {
  width: 22px;
  text-align: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.adit-sidebar-link span {
  position: relative;
  z-index: 1;
}

.adit-sidebar-link:hover {
  color: var(--adit-sidebar-text-active);
  text-decoration: none;
  transform: translateX(4px);
}

.adit-sidebar-link:hover i {
  color: #ff6b8a;
  transform: scale(1.15);
  text-shadow: 0 0 10px rgba(255, 107, 138, 0.5);
}

.adit-sidebar-link.active {
  background: var(--adit-sidebar-active-bg);
  color: var(--adit-sidebar-text-active);
  box-shadow: inset 3px 0 0 var(--adit-sidebar-accent), 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: adit-nav-active-pulse 3s ease-in-out infinite;
}

.adit-sidebar-link.active::before {
  opacity: 0;
}

.adit-sidebar-link.active i {
  color: #ff6b8a;
  filter: drop-shadow(0 0 6px rgba(255, 107, 138, 0.6));
}

/* Secciones y divisores */
.adit-sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 74, 0.3), rgba(255, 255, 255, 0.08), transparent);
  margin: 16px 20px;
}

.adit-sidebar-section-title {
  padding: 12px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #f0a0b0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

.adit-sidebar-section-title::before {
  content: '';
  width: 4px;
  height: 4px;
  background: #f0a0b0;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(240, 160, 176, 0.6);
}

.adit-main-sidebar.collapsed .adit-sidebar-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

.adit-main-sidebar.collapsed .adit-sidebar-link span {
  opacity: 0;
  width: 0;
}

/* ===== FOOTER DEL SIDEBAR ===== */
.adit-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px;
  margin-top: auto;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.adit-sidebar-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 74, 0.4), transparent);
}

.adit-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(196, 30, 74, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
  overflow: hidden;
  border: 1px solid rgba(196, 30, 74, 0.2);
  transition: all 0.3s ease;
}

.adit-sidebar-user:hover {
  background: linear-gradient(135deg, rgba(196, 30, 74, 0.25) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(196, 30, 74, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.adit-sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(196, 30, 74, 0.4);
  transition: all 0.3s ease;
}

.adit-sidebar-user:hover .adit-sidebar-avatar {
  border-color: var(--adit-sidebar-accent);
  box-shadow: 0 0 12px rgba(196, 30, 74, 0.4);
}

.adit-sidebar-avatar-default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--adit-sidebar-accent), #a01d45);
  color: white;
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.adit-sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.adit-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adit-sidebar-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: capitalize;
}

.adit-main-sidebar.collapsed .adit-sidebar-user-info {
  opacity: 0;
  width: 0;
}

.adit-sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  color: #f87171;
  text-decoration: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, 0.2);
  position: relative;
}

.adit-sidebar-logout::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.adit-sidebar-logout:hover::before {
  left: 100%;
}

.adit-sidebar-logout:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.15) 100%);
  color: #fca5a5;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
}

.adit-sidebar-logout:active {
  transform: translateY(0);
}

.adit-sidebar-logout i {
  transition: transform 0.3s ease;
}

.adit-sidebar-logout:hover i {
  transform: translateX(-3px);
}

.adit-main-sidebar.collapsed .adit-sidebar-logout span {
  display: none;
}

/* ===== OVERLAY MÓVIL ===== */
.adit-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.adit-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== TOPBAR PROFESIONAL ===== */

/* Animación de gradiente shimmer */
@keyframes adit-topbar-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animación de entrada del topbar */
@keyframes adit-topbar-slideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animación de pulso sutil para elementos interactivos */
@keyframes adit-pulse-subtle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Animación de glow */
@keyframes adit-glow {
  0%, 100% { box-shadow: 0 2px 10px rgba(74, 10, 30, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(196, 30, 74, 0.5); }
}

.adit-topbar {
  position: fixed;
  top: 0;
  left: var(--adit-sidebar-width);
  right: 0;
  height: var(--adit-topbar-height);
  background: linear-gradient(90deg, #4a0a1e 0%, #3351A6 25%, #3351A6 50%, #3351A6 75%, #4a0a1e 100%);
  background-size: 200% 100%;
  animation: adit-topbar-shimmer 8s ease-in-out infinite, adit-topbar-slideIn 0.4s ease-out;
  border-bottom: 1px solid rgba(196, 30, 74, 0.5);
  box-shadow: 0 2px 10px rgba(74, 10, 30, 0.3);
  z-index: 1001;
  transition: left 0.3s ease, box-shadow 0.3s ease;
}

.adit-topbar.sidebar-collapsed {
  left: var(--adit-sidebar-collapsed-width);
}

.adit-topbar:hover {
  box-shadow: 0 4px 20px rgba(196, 30, 74, 0.4);
}

.adit-topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
  transition: padding-left 0.3s ease;
}

.adit-topbar.sidebar-collapsed .adit-topbar-container {
  padding-left: 20px;
}

.adit-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.adit-topbar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 100%);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(107, 15, 42, 0.25);
}

.adit-topbar-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 15, 42, 0.35);
}

.adit-topbar-toggle:active {
  transform: translateY(0);
}

/* Logo móvil */
.adit-topbar-brand-mobile {
  display: none;
}

.adit-topbar-logo-sm {
  height: 32px;
  width: auto;
}

/* Breadcrumb mejorado */
.adit-topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
  min-width: 0;
}

.adit-breadcrumb-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.adit-breadcrumb-home:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.adit-breadcrumb-home:active {
  transform: translateY(0) scale(0.98);
}

.adit-breadcrumb-separator {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.adit-breadcrumb-current {
  font-weight: 600;
  color: #ffffff;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.adit-breadcrumb-current i {
  margin-right: 5px;
  font-size: 12px;
  opacity: 0.85;
}

.adit-breadcrumb-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: inline-flex;
  align-items: center;
}

.adit-breadcrumb-link i {
  margin-right: 5px;
  font-size: 11px;
  opacity: 0.7;
}

.adit-breadcrumb-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.adit-breadcrumb-link:active {
  transform: translateY(0);
}

.adit-breadcrumb-text {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: 5px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: inline-flex;
  align-items: center;
}

.adit-breadcrumb-text i {
  margin-right: 5px;
  font-size: 11px;
  opacity: 0.6;
}

.adit-breadcrumb-action {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  white-space: nowrap;
}

/* Responsive: colapsar breadcrumbs largos en móvil */
@media (max-width: 768px) {
  .adit-topbar-breadcrumb {
    gap: 4px;
    font-size: 12px;
  }
  
  .adit-breadcrumb-link,
  .adit-breadcrumb-current,
  .adit-breadcrumb-text {
    max-width: 120px;
    padding: 4px 8px;
  }
  
  .adit-breadcrumb-link i,
  .adit-breadcrumb-current i,
  .adit-breadcrumb-text i {
    display: none;
  }
}

@media (max-width: 480px) {
  .adit-breadcrumb-link,
  .adit-breadcrumb-current,
  .adit-breadcrumb-text {
    max-width: 90px;
  }
}

/* Lado derecho del topbar */
.adit-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Acciones del topbar */
.adit-topbar-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.adit-topbar-search {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: visible;
}

.adit-topbar-action::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.adit-topbar-action:hover::before {
  width: 150%;
  height: 150%;
}

.adit-topbar-search:hover,
.adit-topbar-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.adit-topbar-search:active,
.adit-topbar-action:active {
  transform: translateY(0) scale(0.95);
}

/* Animación de icono en hover */
.adit-topbar-search:hover #adit-search-icon,
.adit-topbar-action:hover i {
  animation: adit-pulse-subtle 0.4s ease;
}

/* Barra de búsqueda expandida */
.adit-topbar-search.expanded {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0 6px;
}

.adit-topbar-search #adit-search-icon {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  flex-shrink: 0;
}

.adit-topbar-search:hover #adit-search-icon {
  color: #ffffff;
}

.adit-topbar-search #adit-global-search-input {
  width: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #ffffff;
  transition: all 0.3s ease;
  margin-left: 0;
  opacity: 0;
}

.adit-topbar-search #adit-global-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.adit-topbar-search #adit-global-search-input.expanded {
  width: 220px;
  padding: 4px 8px;
  margin-left: 8px;
  opacity: 1;
}

/* Atajo de teclado badge */
.adit-search-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}

.adit-topbar-search:hover .adit-search-shortcut {
  opacity: 0.6;
}

.adit-search-shortcut kbd {
  font-size: 10px;
  padding: 1px 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  border: 1px solid rgba(255,255,255,0.2);
}

.adit-topbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 8px;
}

/* Usuario en topbar */
.adit-topbar-user-wrapper {
  position: relative;
}

.adit-topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.adit-topbar-user::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.adit-topbar-user:hover::after {
  left: 100%;
}

.adit-topbar-user:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.adit-topbar-avatar-container {
  position: relative;
}

.adit-topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.adit-topbar-avatar-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

@keyframes adit-status-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
  }
}

.adit-topbar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid rgba(107, 15, 42, 0.8);
  border-radius: 50%;
  animation: adit-status-pulse 2s ease-in-out infinite;
}

.adit-topbar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.adit-topbar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.adit-topbar-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.adit-topbar-user-arrow {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  transition: transform 0.2s ease;
}

.adit-topbar-user-wrapper:hover .adit-topbar-user-arrow {
  transform: rotate(180deg);
}

/* Dropdown del usuario con animaciones */
@keyframes adit-dropdown-slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.adit-topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transform-origin: top right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
}

.adit-topbar-user-wrapper:hover .adit-topbar-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: adit-dropdown-slideIn 0.3s ease-out;
}

.adit-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.adit-dropdown-avatar,
.adit-dropdown-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.adit-dropdown-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
}

.adit-dropdown-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.adit-dropdown-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adit-dropdown-user-role {
  font-size: 12px;
  color: #64748b;
}

.adit-user-dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0;
}

.adit-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.adit-user-dropdown-item i {
  width: 18px;
  font-size: 14px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.adit-user-dropdown-item:hover {
  background: #f8fafc;
  color: #1e293b;
}

.adit-user-dropdown-item:hover i {
  color: #3351A6;
}

.adit-logout-item {
  color: #dc2626;
}

.adit-logout-item i {
  color: #dc2626;
}

.adit-logout-item:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.adit-logout-item:hover i {
  color: #b91c1c;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.adit-main-content {
  margin-left: var(--adit-sidebar-width);
  margin-top: var(--adit-topbar-height);
  min-height: calc(100vh - var(--adit-topbar-height));
  transition: margin-left 0.3s ease;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 50%, #f0f2f5 100%);
}

.adit-main-content.sidebar-collapsed {
  margin-left: var(--adit-sidebar-collapsed-width);
}

.adit-main-content-inner {
  padding: 0;
}

/* ===== TOOLBAR STICKY PREMIUM ===== */
.adit-toolbar {
  position: fixed;
  top: var(--adit-topbar-height);
  left: var(--adit-sidebar-width);
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Fondo premium: degradado sutil con tinte metálico */
  background:
    linear-gradient(
      168deg,
      rgba(255,255,255,0.92) 0%,
      rgba(248,246,252,0.88) 30%,
      rgba(240,237,248,0.85) 55%,
      rgba(245,243,250,0.90) 75%,
      rgba(255,255,255,0.92) 100%
    );
  border-bottom: 1px solid rgba(107, 15, 42, 0.07);
  padding: 14px 28px;
  z-index: 990;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow:
    0 1px 2px rgba(45, 11, 31, 0.04),
    0 4px 12px rgba(45, 11, 31, 0.03),
    0 8px 28px rgba(107, 15, 42, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease;
}

/* Línea decorativa superior con shimmer animado */
.adit-toolbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    #2F2D38   0%,
    #3351A6  15%,
    #3351A6  30%,
    #C41E4A  45%,
    #e8507a  50%,
    #C41E4A  55%,
    #3351A6  70%,
    #3351A6  85%,
    #2F2D38 100%);
  background-size: 200% 100%;
  animation: adit-toolbar-shimmer 6s ease-in-out infinite;
  opacity: 0.9;
}

/* Reflejo / brillo glassmorphism inferior */
.adit-toolbar::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 50%;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.15) 40%,
      transparent 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* Shimmer de la línea superior */
@keyframes adit-toolbar-shimmer {
  0%   { background-position: 200% 0; }
  50%  { background-position: 0%  0; }
  100% { background-position: 200% 0; }
}

/* Ajuste cuando el sidebar está colapsado */
.sidebar-collapsed ~ .adit-main-content .adit-toolbar,
.adit-main-content.sidebar-collapsed .adit-toolbar {
  left: var(--adit-sidebar-collapsed-width);
}



.adit-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.adit-toolbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
  padding: 0;
  background: none;
  border-radius: 0;
  border: none;
}

.adit-toolbar-title > i:first-child {
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 50%, #A0183C 100%);
  padding: 9px;
  border-radius: 10px;
  box-shadow: 
    0 2px 8px rgba(107, 15, 42, 0.25),
    0 4px 16px rgba(107, 15, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  min-width: 35px;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.adit-toolbar-title:hover > i:first-child {
  transform: scale(1.06);
  box-shadow:
    0 3px 10px rgba(107, 15, 42, 0.30),
    0 6px 20px rgba(107, 15, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.adit-toolbar-title span:first-of-type {
  color: #1e293b;
  -webkit-text-fill-color: #1e293b;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.adit-toolbar-status {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: none;
  animation: none;
  position: relative;
}

.adit-status-info {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.adit-status-success {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.15);
}

.adit-status-warning {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.adit-status-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Botones de la toolbar */
.adit-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.1px;
}

.adit-toolbar-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.adit-toolbar-btn:hover::before {
  left: 100%;
}

.adit-toolbar-btn i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.adit-toolbar-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.adit-toolbar-btn:hover i {
  transform: scale(1.08);
}

.adit-toolbar-btn:active {
  transform: translateY(0) scale(0.98);
}

.adit-btn-primary {
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 100%);
  color: white;
  box-shadow: 
    0 1px 2px rgba(107, 15, 42, 0.15),
    0 4px 12px rgba(107, 15, 42, 0.15);
}

.adit-btn-primary:hover {
  background: linear-gradient(135deg, #5a0d24 0%, #7a1230 100%);
  color: white;
  box-shadow: 
    0 2px 4px rgba(107, 15, 42, 0.2),
    0 8px 20px rgba(107, 15, 42, 0.25);
}

/* Botón Regresar - discreto y limpio */
.adit-btn-back {
  background: transparent !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 9px;
  transition: all 0.2s ease;
}

.adit-btn-back:hover {
  background: #f8fafc !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  transform: translateX(-2px);
}

.adit-btn-back i {
  color: #94a3b8;
  margin-right: 4px;
  transition: all 0.2s ease;
}

.adit-btn-back:hover i {
  color: #3351A6;
  transform: translateX(-2px);
}

.adit-btn-secondary {
  background: #ffffff !important;
  color: #3351A6 !important;
  border: 1.5px solid rgba(107, 15, 42, 0.18) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.adit-btn-secondary:hover {
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 100%) !important;
  color: #ffffff !important;
  border-color: #3351A6 !important;
  box-shadow: 0 4px 12px rgba(107, 15, 42, 0.2);
}

.adit-btn-secondary i {
  color: #3351A6;
  transition: color 0.2s ease;
}

.adit-btn-secondary:hover i {
  color: #ffffff !important;
}

.adit-btn-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  box-shadow: 
    0 1px 2px rgba(5, 150, 105, 0.15),
    0 4px 12px rgba(5, 150, 105, 0.15);
}

.adit-btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: white;
  box-shadow: 
    0 2px 4px rgba(5, 150, 105, 0.2),
    0 8px 20px rgba(5, 150, 105, 0.25);
}

.adit-btn-info {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 
    0 1px 2px rgba(37, 99, 235, 0.15),
    0 4px 12px rgba(37, 99, 235, 0.15);
}

.adit-btn-info:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: white;
  box-shadow: 
    0 2px 4px rgba(37, 99, 235, 0.2),
    0 8px 20px rgba(37, 99, 235, 0.25);
}

.adit-btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  box-shadow: 
    0 1px 2px rgba(220, 38, 38, 0.15),
    0 4px 12px rgba(220, 38, 38, 0.15);
}

.adit-btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  color: white;
  box-shadow: 
    0 2px 4px rgba(220, 38, 38, 0.2),
    0 8px 20px rgba(220, 38, 38, 0.25);
}

.adit-btn-block {
  width: 100%;
  justify-content: center;
}

/* Dropdown en la toolbar */
.adit-toolbar-dropdown {
  position: relative;
  display: inline-block;
}

.adit-dropdown-arrow {
  font-size: 9px !important;
  margin-left: 5px;
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.adit-toolbar-dropdown:hover .adit-dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* ===== CUSTOM DROPDOWN (sin dependencia de Bootstrap) ===== */
.adit-custom-dropdown {
  position: relative;
}

.adit-custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  padding: 0;
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.adit-custom-dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3351A6, #3351A6, #B91C4A);
  opacity: 0.85;
}

.adit-custom-dropdown.open .adit-custom-dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.adit-custom-dropdown.open .adit-dropdown-arrow {
  transform: rotate(180deg);
}

.adit-toolbar-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 320px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  margin-top: 8px;
  padding: 0;
  display: none;
  animation: dropdownSlide 0.2s ease;
  overflow: hidden;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.adit-toolbar-dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3351A6, #3351A6, #B91C4A);
  opacity: 0.85;
}

.adit-toolbar-dropdown-menu.show {
  display: block;
}

.adit-dropdown-form {
  padding: 22px;
}

.adit-dropdown-title {
  margin: 0 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(107, 15, 42, 0.08);
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

.adit-dropdown-title i {
  color: #fff;
  background: linear-gradient(135deg, #3351A6 0%, #3351A6 100%);
  padding: 7px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(107, 15, 42, 0.2);
}

.adit-dropdown-field {
  margin-bottom: 16px;
}

.adit-dropdown-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.adit-dropdown-field label i {
  color: #3351A6;
  font-size: 11px;
}

.adit-dropdown-field .form-control {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fafbfc;
}

.adit-dropdown-field .form-control:focus {
  border-color: #3351A6;
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.08);
  outline: none;
  background: #ffffff;
}

.adit-dropdown-field .input-group {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  transition: all 0.2s ease;
}

.adit-dropdown-field .input-group:focus-within {
  border-color: #3351A6;
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.08);
}

.adit-dropdown-field .input-group-addon {
  background: #f1f5f9;
  border: none;
  padding: 10px 14px;
  display: flex;
  align-items: center;
}

.adit-dropdown-field .input-group-addon i {
  color: #3351A6;
}

.adit-dropdown-field .input-group .form-control {
  border: none;
  border-radius: 0;
  background: #fafbfc;
}

.adit-dropdown-field label i {
  margin-right: 6px;
  color: #3351A6;
}

.adit-dropdown-field .form-control {
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  padding: 10px 12px;
  font-size: 14px;
  background: #fafbfc;
}

.adit-dropdown-field .form-control:focus {
  border-color: #3351A6;
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.08);
  background: #ffffff;
}

.adit-dropdown-field .input-group-addon {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: #3351A6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
  .adit-main-sidebar {
    transform: translateX(-100%);
  }
  
  .adit-main-sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .adit-topbar-container {
    padding-left: 20px;
  }
  
  .adit-topbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .adit-topbar-brand-mobile {
    display: block;
  }
  
  .adit-main-content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .adit-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }
  
  .adit-toolbar-left,
  .adit-toolbar-right {
    justify-content: center;
  }
  
  .adit-toolbar-btn span {
    display: none;
  }
  
  .adit-toolbar-btn {
    padding: 9px 12px;
  }
  
  .adit-toolbar-dropdown-menu {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 90%;
    max-width: 350px;
  }
  
  /* Topbar responsive */
  .adit-topbar-search {
    display: none;
  }
  
  .adit-topbar-user-info {
    display: none;
  }
  
  .adit-topbar-user-arrow {
    display: none;
  }
  
  .adit-topbar-user {
    padding: 4px;
    border-radius: 10px;
  }
  
  .adit-breadcrumb-current,
  .adit-breadcrumb-action,
  .adit-breadcrumb-link,
  .adit-breadcrumb-text,
  .adit-breadcrumb-separator {
    display: none;
  }
  
  .adit-topbar-user-dropdown {
    right: -10px;
    width: 260px;
  }
}

@media (max-width: 576px) {
  .adit-toolbar-title span {
    display: none;
  }
  
  .adit-toolbar-status {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .adit-sidebar-header {
    padding: 12px;
  }
  
  .adit-sidebar-logo {
    width: 30px;
    height: 30px;
  }
}

/* ===== CONTENIDO DE PÁGINA ===== */
.adit-page-content {
  padding: 24px 28px;
  padding-bottom: 60px; /* Espacio para el footer */
  min-height: calc(100vh - var(--adit-topbar-height) - 80px);
}

.adit-alerts-container {
  margin-bottom: 20px;
}

/* Header compacto */
.adit-header-compact {
  padding: 20px 24px;
  margin-bottom: 20px;
}

.adit-header-compact .adit-header-main {
  margin-bottom: 0;
}

/* Ajustes para secciones de información */
.adit-info-section {
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

/* Línea decorativa superior para secciones */
.adit-info-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(107, 15, 42, 0.3) 20%,
    #3351A6 50%,
    rgba(107, 15, 42, 0.3) 80%,
    transparent 100%);
}

/* ===== ESTADO DE LA TOOLBAR ===== */
.adit-status-abierta,
.adit-status-activa,
.adit-status-activo,
.adit-status-en-proceso {
  background: linear-gradient(315deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.25) 100%);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.adit-status-terminada,
.adit-status-terminado,
.adit-status-completado {
  background: linear-gradient(315deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.25) 100%);
  color: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.adit-status-cancelada,
.adit-status-cancelado {
  background: linear-gradient(315deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.25) 100%);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.adit-status-pendiente {
  background: linear-gradient(315deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.25) 100%);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ===== UTILIDADES ADIT (Reemplazo de Bootstrap) ===== */

/* Display utilities */
.adit-d-none { display: none !important; }
.adit-d-block { display: block !important; }
.adit-d-flex { display: flex !important; }
.adit-d-inline-flex { display: inline-flex !important; }

/* Flex utilities */
.adit-flex-column { flex-direction: column !important; }
.adit-flex-row { flex-direction: row !important; }
.adit-flex-wrap { flex-wrap: wrap !important; }
.adit-align-items-center { align-items: center !important; }
.adit-justify-content-center { justify-content: center !important; }
.adit-justify-content-between { justify-content: space-between !important; }
.adit-gap-1 { gap: 4px !important; }
.adit-gap-2 { gap: 8px !important; }
.adit-gap-3 { gap: 12px !important; }
.adit-gap-4 { gap: 16px !important; }

/* Text utilities */
.adit-text-center { text-align: center !important; }
.adit-text-left { text-align: left !important; }
.adit-text-right { text-align: right !important; }
.adit-text-muted { color: #6c757d !important; }
.adit-text-primary { color: #3351A6 !important; }
.adit-text-success { color: #16a34a !important; }
.adit-text-danger { color: #dc2626 !important; }
.adit-text-white { color: #ffffff !important; }
.adit-fw-normal { font-weight: 400 !important; }
.adit-fw-medium { font-weight: 500 !important; }
.adit-fw-semibold { font-weight: 600 !important; }
.adit-fw-bold { font-weight: 700 !important; }
.adit-fs-sm { font-size: 12px !important; }
.adit-fs-md { font-size: 14px !important; }
.adit-fs-lg { font-size: 16px !important; }

/* Spacing utilities */
.adit-m-0 { margin: 0 !important; }
.adit-mt-1 { margin-top: 4px !important; }
.adit-mt-2 { margin-top: 8px !important; }
.adit-mt-3 { margin-top: 12px !important; }
.adit-mt-4 { margin-top: 16px !important; }
.adit-mb-1 { margin-bottom: 4px !important; }
.adit-mb-2 { margin-bottom: 8px !important; }
.adit-mb-3 { margin-bottom: 12px !important; }
.adit-mb-4 { margin-bottom: 16px !important; }
.adit-p-0 { padding: 0 !important; }
.adit-p-2 { padding: 8px !important; }
.adit-p-3 { padding: 12px !important; }
.adit-p-4 { padding: 16px !important; }

/* Border utilities */
.adit-rounded { border-radius: 8px !important; }
.adit-rounded-lg { border-radius: 12px !important; }
.adit-rounded-full { border-radius: 50% !important; }
.adit-border { border: 1px solid #e5e7eb !important; }
.adit-border-0 { border: 0 !important; }

/* Shadow utilities */
.adit-shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; }
.adit-shadow { box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important; }
.adit-shadow-lg { box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important; }

/* Width/Height utilities */
.adit-w-100 { width: 100% !important; }
.adit-h-100 { height: 100% !important; }

/* Responsive display */
@media (min-width: 768px) {
  .adit-d-md-none { display: none !important; }
  .adit-d-md-block { display: block !important; }
  .adit-d-md-flex { display: flex !important; }
  .adit-d-md-inline { display: inline !important; }
}

@media (max-width: 767px) {
  .adit-d-sm-none { display: none !important; }
  .adit-topbar-user-info {
    display: none;
  }
}

/* ===== AJUSTES ADICIONALES ===== */

/* Asegurar que el sidebar no tenga conflictos con Bootstrap */
.adit-main-sidebar *,
.adit-topbar *,
.adit-toolbar * {
  box-sizing: border-box;
}

/* Reset de algunos estilos de Bootstrap que pueden interferir */
.adit-main-sidebar .nav,
.adit-main-sidebar .navbar {
  all: unset;
}

.adit-main-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Mejora visual del contenido principal */
.adit-main-content {
  background: #f5f7fa;
}

.adit-main-content-inner {
  min-height: calc(100vh - var(--adit-topbar-height) - 60px);
}

/* Scrollbar personalizada para el contenido */
.adit-main-content::-webkit-scrollbar {
  width: 8px;
}

.adit-main-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.adit-main-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.adit-main-content::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Animación suave para transiciones */
.adit-main-sidebar,
.adit-topbar,
.adit-main-content {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Z-index hierarchy */
.adit-topbar { z-index: 1001; }
.adit-main-sidebar { z-index: 1000; }
.adit-sidebar-overlay { z-index: 999; }
.adit-toolbar { z-index: 100; }
.adit-toolbar-dropdown-menu { z-index: 1050; }
