.side-nav {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  background: var(--card-bg);
  box-shadow: var(--shadow-xl);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.side-nav.active {
  left: 0;
}

.nav-header {
  background: var(--primary-gradient);
  color: white;
  padding: 28px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.nav-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

/* App language toggle under the user name (#143) */
.nav-lang-toggle {
  margin-top: 10px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.close-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: rotate(90deg);
}

.close-btn:active {
  transform: scale(0.95) rotate(90deg);
}

.nav-menu {
  padding: 12px 0;
}

.nav-menu a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition);
  font-size: 15px;
  font-weight: 500;
  border-left: 4px solid transparent;
  margin: 2px 8px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.nav-menu a:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.nav-menu a:active {
  background: var(--light-bg);
}

.nav-menu a.active {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.15), transparent);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.nav-icon {
  font-size: 20px;
  margin-right: 14px;
  width: 28px;
  text-align: center;
}
