.sidebar {
  width: var(--sidebar-w);
  background: #1e1b18;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.04);
  color: #DCD4C2;
}

.sidebar-logo {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: 600;
  color: #FAFAF6;
  line-height: 1;
}

.sidebar-logo-text em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

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

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

.sidebar-section-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(220,212,194,0.4);
  padding: 10px 10px 6px;
  letter-spacing: 0.02em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 13px;
  color: rgba(220,212,194,0.7);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-decoration: none;
  margin-bottom: 2px;
  user-select: none;
}

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

.nav-item.active {
  color: #FAFAF6;
  background: rgba(184,92,0,0.15);
}

.nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-arrow {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.3;
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(221,58,31,0.2);
  color: #FF6B5B;
  flex-shrink: 0;
}

.sidebar-utility {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-site-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.sidebar-site-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(220,212,194,0.4);
}

#sidebar-site-select {
  width: 100%;
  padding: 9px 10px;
  background: rgba(255,255,255,0.04);
  color: #DCD4C2;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

#sidebar-site-select:hover {
  border-color: var(--accent);
}

#sidebar-site-select option {
  background: #1a1a1a;
  color: #DCD4C2;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #FAFAF6;
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(220,212,194,0.5);
}

.sidebar-actions {
  display: grid;
  gap: 8px;
}

.sidebar-pwd,
.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.16);
  color: #DCD4C2;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.sidebar-pwd:hover,
.sidebar-logout:hover {
  border-color: var(--accent);
  color: #FAFAF6;
  background: rgba(184,92,0,0.12);
}

.sidebar-logout-mark {
  font-size: 13px;
  letter-spacing: 0;
  opacity: 0.7;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.sidebar-logout:hover .sidebar-logout-mark {
  transform: translate(2px, -2px);
  opacity: 1;
}

.sidebar,
.main {
  visibility: hidden;
}

body.is-authed .sidebar,
body.is-authed .main {
  visibility: visible;
}
