.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  background: var(--bg-graphite);
  border-right: 1px solid var(--border-default);
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-section {
  margin-bottom: 6px;
}

.nav-section-title {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--bg-surface);
  color: var(--violet-bright);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--violet);
}

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }

.nav-item span:not(.nav-badge):not(.nav-status-dot) {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-faint);
  border-radius: 3px;
  flex-shrink: 0;
}

#nav-incidentes-count {
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.3);
  background: rgba(245, 166, 35, 0.08);
}

.nav-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.nav-status-dot.online {
  background: var(--green);
  box-shadow: 0 0 6px rgba(23, 232, 154, 0.5);
}
.nav-status-dot.attention {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(245, 166, 35, 0.5);
}
.nav-status-dot.critical {
  background: var(--red);
  box-shadow: 0 0 6px rgba(255, 59, 79, 0.5);
}
.nav-status-dot.offline {
  background: var(--text-dim);
}

/* SIDEBAR BOTTOM */
.sidebar-bottom {
  flex-shrink: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--border-faint);
  background: var(--bg-obsidian);
}

.sidebar-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 16px;
  gap: 6px;
}

.sidebar-core .oraculo-core {
  width: 180px;
  height: 180px;
  position: relative;
}

.sidebar-core-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sidebar-core-state {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 1px;
}

/* USER FOOTER */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid var(--border-faint);
}

.sidebar-user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-dim), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-user-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(23, 232, 154, 0.4);
  flex-shrink: 0;
}
