/* ---- Light Theme ---- */
:root {
  --bg-main: #f8f9fa;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e1e5eb;
  --text: #212529;
  --muted: #6c757d;
  --accent: #0d6efd;
  --hover: #f1f3f5;
  --active: #e9f2ff;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-main);
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  box-shadow: 1px 0 4px rgba(0,0,0,0.05);
}

.brand {
  padding: 18px 20px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--accent);
  border-bottom: 1px solid var(--sidebar-border);
  background: #fdfdfd;
}

.nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: var(--hover);
}

.nav-link.active {
  background: var(--active);
  border-left: 3px solid var(--accent);
  font-weight: 600;
}

/* Content */
.content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 32px;
  background: var(--bg-main);
  min-height: 100vh;
}

h1 {
  color: var(--accent);
  margin-top: 0;
}

p, li {
  color: var(--text);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .content { margin-left: 0; width: 100%; }
}

/* =========================
   Molecular submenu (same style, indented)
   ========================= */

/* Molecular header: same as nav-link, just caret alignment */
#molToggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#molToggle .mol-caret {
  font-size: 12px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

#molToggle.open .mol-caret {
  transform: rotate(180deg);
}

/* Submenu container: acts like nav (same gap) */
.mol-submenu {
  display: none;
  flex-direction: column;
  gap: 4px;     /* << same as .nav gap */
  margin: 0;
  padding: 0;
}

/* Show submenu */
.mol-submenu.show {
  display: flex;
}

/* Sublinks: identical style to nav-link, only indented */
.nav-link.mol-sublink {
  padding-left: 34px !important; /* base 14px + 14px indentation */
}
