/* JBoat Arena — sidebar unificada (Bloco Sidebar) */
:root {
  --sidebar-w: 260px;
  --sidebar-collapsed: 68px;
}

#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border, #1e2d4a);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  overflow: hidden;
}

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

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 64px;
  border-bottom: 1px solid var(--border, #1e2d4a);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan, #06b6d4), var(--violet, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.logo-text {
  overflow: hidden;
  white-space: nowrap;
}

.logo-text h1 {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading, #f2f4f9);
}

.logo-text p {
  font-size: 10px;
  color: var(--muted, #7181a3);
  font-family: 'JetBrains Mono', monospace;
}

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

.nav-section {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(113, 129, 163, 0.5);
  text-transform: uppercase;
  padding: 14px 12px 4px;
  white-space: nowrap;
  overflow: hidden;
}

#sidebar.collapsed .nav-section {
  opacity: 0;
  height: 4px;
  padding: 0;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  color: var(--subtle, #8d96b5);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  font-family: inherit;
}

.nav-btn:hover {
  background: rgba(20, 29, 51, 0.6);
  color: var(--text, #dfe4ef);
}

.nav-btn.active {
  background: var(--surface, #141d33);
  color: var(--heading, #f2f4f9);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--cyan, #06b6d4);
  border-radius: 0 3px 3px 0;
}

.nav-btn.sp-top {
  margin-bottom: 4px;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.15);
}

.nav-btn.sp-top:hover {
  background: rgba(244, 63, 94, 0.12);
  color: var(--heading, #f2f4f9);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-label {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}

.nav-sub {
  padding-left: 32px;
}

.nav-sub .nav-label {
  font-size: 12px;
  color: var(--subtle, #8d96b5);
}

.nav-sub:hover .nav-label {
  color: var(--text, #dfe4ef);
}

.nav-sub .nav-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.sp-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--rose, #f43f5e);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.55);
}

#sidebar.collapsed .sp-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  margin: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
}

#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-tag,
#sidebar.collapsed .logo-text {
  display: none;
}

/* Protege sidebar de CSS genérico `nav {}` nas páginas legadas */
#sidebar .sidebar-nav,
#sidebar nav.sidebar-nav {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  border-bottom: none !important;
  background: transparent !important;
  z-index: auto !important;
}

#sidebar .nav-btn {
  width: 100% !important;
  flex-shrink: 0 !important;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border, #1e2d4a);
}

.sidebar-toggle {
  width: 100%;
  height: 32px;
  border-radius: 8px;
  background: var(--surface, #141d33);
  border: 1px solid var(--border, #1e2d4a);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted, #7181a3);
  transition: color 0.2s;
}

.sidebar-toggle:hover {
  color: var(--heading, #f2f4f9);
}

.chev-camp {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted, #7181a3);
  padding: 2px 5px;
  transform: rotate(-90deg);
  display: inline-block;
  transition: transform 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

/* Páginas admin legadas com sidebar Arena */
body.arena-with-sidebar .arena-shift {
  margin-left: var(--sidebar-w);
  transition: margin-left 0.3s ease;
}

body.arena-with-sidebar.sb-col .arena-shift {
  margin-left: var(--sidebar-collapsed);
}

body.arena-with-sidebar .topbar-fixed {
  left: var(--sidebar-w);
  transition: left 0.3s ease;
}

body.arena-with-sidebar.sb-col .topbar-fixed {
  left: var(--sidebar-collapsed);
}
