:root {
  --navy: #1E2761;
  --navy-deep: #141B4D;
  --ice: #CADCFC;
}

body {
  background: #F7F7F5;
  font-family: "Segoe UI", Arial, sans-serif;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.1rem 1.2rem;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-nav {
  padding: .6rem 0 2rem;
}

.nav-group { margin: 2px 8px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  color: var(--ice);
  padding: .55rem .8rem;
  border-radius: 8px;
  font-size: .92rem;
  text-align: left;
  border: none;
  background: transparent;
  text-decoration: none;
}

.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.14); color: #fff; }

.nav-parent .chevron {
  margin-left: auto;
  font-size: .75rem;
  transition: transform .15s;
}
.nav-parent[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.nav-children { padding-left: 1.9rem; }
.nav-child { font-size: .87rem; padding: .4rem .8rem; }

/* ---- Main column ---- */
.main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #E4E2D8;
}

.topbar-title { font-weight: 600; color: var(--navy); }
.topbar-user { margin-left: auto; color: #5B5B54; font-size: .9rem; }

.content { padding: 1.6rem 1.8rem 3rem; }

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.requirement-list { padding-left: 1.2rem; }
.requirement-list li { margin-bottom: .45rem; line-height: 1.5; }

/* ---- Mobile sidebar ---- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
}
