/* ============================================================
   SIDEBAR — Fixed left navigation panel
   ============================================================ */

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}

.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #00c896, #388bfd);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}

.logo-text       { font-size: 13px; font-weight: 700; line-height: 1.2; }
.logo-text span  { color: var(--accent); }

/* --- Nav --- */
/* <a> tags used as nav items must not look like links */
.nav a { text-decoration: none; color: inherit; display: block; }

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

.nav-group { padding: 4px 0 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  user-select: none;
}
.nav-item:hover                { background: var(--bg3); color: var(--text); }
.nav-item.active               { background: rgba(0, 200, 150, 0.1); color: var(--accent); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item .icon        { width: 18px; text-align: center; font-size: 15px; }
.nav-toggle-icon       { margin-left: auto; color: var(--text3); font-size: 11px; }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  font-family: var(--font-mono);
}

/* --- Sub-nav --- */
.nav-sub { padding-left: 36px; }
.nav-sub .nav-item {
  font-size: 12.5px;
  padding: 7px 20px 7px 0;
  color: var(--text3);
}
.nav-sub .nav-item:hover { color: var(--text2); }

/* --- Footer --- */
.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.sidebar-user           { flex: 1; min-width: 0; }
.sidebar-user-name      { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role      { font-size: 11px; color: var(--text3); }
