/* ============================================================
   SIDEBAR PRINCIPAL — nyvvo
   Layout operacional e navegação estável
   ============================================================ */

/* === Background & Structure === */
#sidebar {
  background: linear-gradient(180deg,
    #060c18 0%,
    #08111f 40%,
    #060c18 100%) !important;
  border-right: 1px solid rgba(46, 219, 127, 0.1) !important;
  position: relative;
  overflow: hidden;
}

/* Glow line on the right edge */
#sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(46, 219, 127, 0.35) 30%,
    rgba(0, 200, 212, 0.4) 60%,
    transparent 100%);
  pointer-events: none;
}

/* Ambient glow behind brand area */
#sidebar::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(46, 219, 127, 0.07) 0%, transparent 70%);
  pointer-events: none;
  animation: sidebar-ambient-pulse 4s ease-in-out infinite;
}

@keyframes sidebar-ambient-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.15); }
}

/* === Brand Container === */
.sidebar-brand-container {
  background: transparent !important;
  border-bottom: 1px solid rgba(46, 219, 127, 0.1) !important;
  padding: 0 14px !important;
  gap: 10px !important;
  position: relative;
  z-index: 1;
}

.brand-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.brand-icon svg {
  width: 38px !important;
  height: 38px !important;
  filter: drop-shadow(0 0 8px rgba(46,219,127,0.35));
  animation: brand-icon-glow 3s ease-in-out infinite !important;
}

@keyframes brand-icon-glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(46,219,127,0.3)); }
  50%       { filter: drop-shadow(0 0 14px rgba(46,219,127,0.55)); }
}

.brand-name {
  font-family: 'Inter', 'Space Grotesk', sans-serif !important;
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  background: linear-gradient(120deg, #2edb7f, #00c8d4, #3b82f6) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  min-height: unset !important;
}

.brand-slogan {
  font-size: 0.6rem !important;
  color: rgba(139, 163, 201, 0.6) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

/* === Toggle Button === */
#sidebar-toggle-btn {
  color: rgba(139, 163, 201, 0.6) !important;
  background: transparent !important;
}
#sidebar-toggle-btn:hover {
  color: #86efac !important;
  background: rgba(46, 219, 127, 0.1) !important;
}

/* === Nav List === */
#sidebar nav ul {
  padding: 0 8px !important;
}

/* Common nav link base */
#sidebar nav li a {
  border-radius: 10px !important;
  padding: 9px 10px !important;
  gap: 10px !important;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Ripple shimmer on hover */
#sidebar nav li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.03), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#sidebar nav li a:hover::before { opacity: 1; }

/* Icon base */
#sidebar nav li a .lucide {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  transition: transform 0.25s ease, filter 0.25s ease !important;
}

/* Text */
#sidebar nav li a span.sidebar-text {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

/* === Per-module accent colors === */

/* Dashboard — green (primary brand) */
#nav-li-dashboard a .lucide { color: #2edb7f !important; }
#nav-li-dashboard a:hover,
#nav-li-dashboard.active a {
  background: rgba(46, 219, 127, 0.09) !important;
  border-color: rgba(46, 219, 127, 0.2) !important;
  box-shadow: 0 0 12px rgba(46, 219, 127, 0.14), inset 0 0 0 1px rgba(46, 219, 127, 0.1) !important;
}
#nav-li-dashboard.active a { border-color: rgba(46, 219, 127, 0.35) !important; }
#nav-li-dashboard.active a .lucide { color: #86efac !important; filter: drop-shadow(0 0 6px rgba(46,219,127,0.8)); }
#nav-li-dashboard a:hover .lucide { color: #86efac !important; transform: scale(1.15) !important; }
#nav-li-dashboard a span.sidebar-text { color: #bbf7d0 !important; }

/* GPS — emerald */
#nav-li-gps a .lucide { color: #34d399 !important; }
#nav-li-gps a:hover,
#nav-li-gps.active a {
  background: rgba(52, 211, 153, 0.08) !important;
  border-color: rgba(52, 211, 153, 0.2) !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.12), inset 0 0 0 1px rgba(52, 211, 153, 0.1) !important;
}
#nav-li-gps.active a { border-color: rgba(52, 211, 153, 0.35) !important; }
#nav-li-gps.active a .lucide { color: #6ee7b7 !important; filter: drop-shadow(0 0 6px rgba(52,211,153,0.8)); }
#nav-li-gps a:hover .lucide { color: #6ee7b7 !important; transform: scale(1.15) !important; }
#nav-li-gps a span.sidebar-text { color: #a7f3d0 !important; }

/* Acompanhamento — cyan */
#nav-li-acompanhamento a .lucide { color: #22d3ee !important; }
#nav-li-acompanhamento a:hover,
#nav-li-acompanhamento.active a {
  background: rgba(34, 211, 238, 0.08) !important;
  border-color: rgba(34, 211, 238, 0.2) !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.12), inset 0 0 0 1px rgba(34, 211, 238, 0.1) !important;
}
#nav-li-acompanhamento.active a { border-color: rgba(34, 211, 238, 0.35) !important; }
#nav-li-acompanhamento.active a .lucide { color: #67e8f9 !important; filter: drop-shadow(0 0 6px rgba(34,211,238,0.8)); }
#nav-li-acompanhamento a:hover .lucide { color: #67e8f9 !important; transform: scale(1.15) !important; }
#nav-li-acompanhamento a span.sidebar-text { color: #a5f3fc !important; }

/* Progresso — yellow/amber */
#nav-li-progresso a .lucide { color: #facc15 !important; }
#nav-li-progresso a:hover,
#nav-li-progresso.active a {
  background: rgba(250, 204, 21, 0.07) !important;
  border-color: rgba(250, 204, 21, 0.2) !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.12), inset 0 0 0 1px rgba(250, 204, 21, 0.1) !important;
}
#nav-li-progresso.active a { border-color: rgba(250, 204, 21, 0.35) !important; }
#nav-li-progresso.active a .lucide { color: #fde047 !important; filter: drop-shadow(0 0 6px rgba(250,204,21,0.8)); }
#nav-li-progresso a:hover .lucide { color: #fde047 !important; transform: scale(1.15) !important; }
#nav-li-progresso a span.sidebar-text { color: #fef08a !important; }

/* Mapa / Plano & Provas — orange */
#nav-li-mapa-esforco a .lucide { color: #fb923c !important; }
#nav-li-mapa-esforco a:hover,
#nav-li-mapa-esforco.active a {
  background: rgba(251, 146, 60, 0.08) !important;
  border-color: rgba(251, 146, 60, 0.2) !important;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.12), inset 0 0 0 1px rgba(251, 146, 60, 0.1) !important;
}
#nav-li-mapa-esforco.active a { border-color: rgba(251, 146, 60, 0.35) !important; }
#nav-li-mapa-esforco.active a .lucide { color: #fdba74 !important; filter: drop-shadow(0 0 6px rgba(251,146,60,0.8)); }
#nav-li-mapa-esforco a:hover .lucide { color: #fdba74 !important; transform: scale(1.15) !important; }
#nav-li-mapa-esforco a span.sidebar-text { color: #fed7aa !important; }

/* Kanban — teal/blue */
#nav-li-kanban a .lucide { color: #5df4ff !important; }
#nav-li-kanban a:hover,
#nav-li-kanban.active a {
  background: rgba(0, 200, 212, 0.08) !important;
  border-color: rgba(0, 200, 212, 0.2) !important;
  box-shadow: 0 0 12px rgba(0, 200, 212, 0.12), inset 0 0 0 1px rgba(0, 200, 212, 0.1) !important;
}
#nav-li-kanban.active a { border-color: rgba(0, 200, 212, 0.35) !important; }
#nav-li-kanban.active a .lucide { color: #9df4ff !important; filter: drop-shadow(0 0 6px rgba(0,200,212,0.7)); }
#nav-li-kanban a:hover .lucide { color: #9df4ff !important; transform: scale(1.15) !important; }
#nav-li-kanban a span.sidebar-text { color: #c7fbff !important; }


/* Admin — red (same as before) */
#admin-menu-item a { color: #fca5a5 !important; }

/* === All nav text color override === */
#sidebar nav li a {
  color: rgba(148, 163, 184, 0.85) !important;
}
#sidebar nav li a:hover { color: #e2e8f0 !important; }
#sidebar nav li.active a { color: #f1f5f9 !important; }

/* === Divider between nav groups === */
li.sidebar-nav-divider,
.sidebar-nav-divider {
  height: 1px !important;
  min-height: 1px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  margin: 6px 10px !important;
  padding: 0 !important;
  list-style: none !important;
  pointer-events: none;
}

li.sidebar-nav-section-label,
.sidebar-nav-section-label {
  font-size: 0.55rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: rgba(148, 163, 184, 0.35) !important;
  padding: 8px 14px 2px !important;
  list-style: none !important;
  pointer-events: none;
}

/* Collapsed: hide section labels */
#sidebar.collapsed li.sidebar-nav-section-label,
#sidebar.collapsed .sidebar-nav-section-label,
#sidebar.collapsed li.sidebar-nav-divider,
#sidebar.collapsed .sidebar-nav-divider {
  display: none !important;
}

/* === Admin menu item (keep red look but fix padding) === */
#admin-menu-item a {
  border-radius: 10px !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}
#admin-menu-item a:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

/* === Ghost mode container === */
#ghost-mode-container {
  margin: 0 8px;
  border-radius: 10px !important;
  border: 1px solid rgba(167, 139, 250, 0.4) !important;
}

/* === Collapsed sidebar nav item layout === */
#sidebar.collapsed nav li a {
  justify-content: center !important;
  padding: 10px 0 !important;
}
#sidebar.collapsed nav li a .lucide {
  margin: 0 !important;
}
#sidebar.collapsed nav li a span.sidebar-text {
  display: none !important;
}
/* === Scrollbar inside nav === */
#sidebar nav::-webkit-scrollbar { width: 3px; }
#sidebar nav::-webkit-scrollbar-track { background: transparent; }
#sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(46, 219, 127, 0.2);
  border-radius: 10px;
}
