/* ── HEADER ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
header .brand-logo { height: 36px; width: auto; display: block; margin-left: 44px; }
#header-right { display: flex; align-items: center; gap: 10px; }
#user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
}
#user-chip .username { font-weight: 600; }
#user-chip .role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
#user-chip .role-badge.admin { background: rgba(79,110,247,.2); color: var(--accent); }
#user-chip .role-badge.user  { background: rgba(62,207,142,.15); color: var(--success); }
#btn-usuarios {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
#btn-usuarios:hover { border-color: var(--accent); color: var(--accent); }
#btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
#btn-logout:hover { border-color: var(--danger); color: var(--danger); }
#btn-new {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
#btn-new:hover { background: var(--accent-hover); }


/* ── SIDE NAV ── */
#sidenav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 150;
}
#sidenav-backdrop.open { display: block; }

#sidenav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .25s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.10);
}
#sidenav.open { transform: translateX(0); }

#sidenav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#sidenav-logo { height: 30px; width: auto; display: block; }
#sidenav-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
}
#sidenav-close:hover { background: var(--surface2); color: var(--text); }

#sidenav nav { flex: 1; overflow-y: auto; padding: 10px 0; }

.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  padding: 14px 18px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  color: var(--accent);
  background: rgba(79,110,247,.08);
  border-left-color: var(--accent);
  font-weight: 600;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-soon-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

#sidenav-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Toggle button — always visible, fixed */
#btn-sidenav-toggle {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 140;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}
#btn-sidenav-toggle:hover { background: var(--surface2); border-color: var(--accent); }
#btn-sidenav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background .15s;
}
#btn-sidenav-toggle:hover span { background: var(--accent); }

