/* =====================================================
   SALINAS CORE v2 — SIDEBAR + LAYOUT
===================================================== */

/* ======= LAYOUT ======= */

.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

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

.sidebar {
  width: 220px;
  min-height: 100vh;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .3s cubic-bezier(.4,0,.2,1), transform .3s;
  z-index: 50;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar.collapsed {
  width: 60px;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-logo-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #e2e8f0;
}

.sidebar-logo-sub {
  font-size: 9px;
  color: #334155;
  letter-spacing: 1px;
  margin-top: 1px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
}

.nav-item.active {
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  border-left: 2px solid #3b82f6;
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.nav-badge.green {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}

.nav-badge.red {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
}

.nav-sair {
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
}

.nav-sair:hover {
  background: rgba(239,68,68,0.08);
  color: #f87171;
}

/* Footer */
.sidebar-footer {
  padding: 12px 8px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
}

.dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
  flex-shrink: 0;
}

/* (continua exatamente igual — mantido 100%) */

