/**
 * Layout - Sidebar, main content, header, page container
 */

/* Sidebar - Figma: 371px, gradient */
.sidebar {
  width: 371px;
  min-width: 371px;
  background: var(--sidebar-bg);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo i {
  font-size: 1.5rem;
  opacity: 0.95;
}

.logo-img {
  width: 38px;
  height: 39px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  margin-left: 34px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border-radius: 100px;
  margin-bottom: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.85);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
}

.nav-item.logout {
  margin-top: auto;
  margin-bottom: 20px;
}

/* Logout form (POST required by Django LogoutView) */
.sidebar-logout-form {
  padding: 0 12px 16px;
  margin-top: auto;
}
.sidebar-logout-form .nav-item.logout {
  width: 100%;
  margin-bottom: 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
}
.sidebar-logout-form .nav-item.logout:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: 371px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  background: var(--white);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.header-title .page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: capitalize;
}

.header-title .page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: capitalize;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-accent);
  font-size: 24px;
  font-weight: 700;
}

.header-user i {
  font-size: 32px;
}

/* Page container */
.page {
  display: none;
  padding: 24px 32px 40px;
  flex: 1;
}

.page.active {
  display: block;
}

/* Page-specific header (when page has its own .header-title) */
#page-users .header-title,
#page-courses .header-title,
#page-live-classes .header-title,
#page-assessments .header-title,
#page-analytics .header-title,
#page-payments .header-title,
#page-plans .header-title,
#page-notifications .header-title {
  margin-bottom: 0;
}
