/* layout.css — sidebar + header + main shell */

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

/* ── Sidebar ── */
#app-sidebar {
  width: 256px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-border2);
}

.sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border2);
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  color: var(--color-primary-l);
  flex-shrink: 0;
}
.sidebar-logo span {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(90deg, #fff 0%, var(--color-primary-l) 120%);
  -webkit-background-clip: text;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-group p {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-dim);
  padding: 0 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-group p svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-group ul { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.nav-link:hover {
  background: rgba(20,184,166,0.08);
  color: #fff;
}
.nav-link.active {
  background: var(--color-primary-bg);
  color: var(--color-primary-l);
  box-shadow: inset 3px 0 0 var(--color-primary);
}
.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; }

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

#app-header {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: linear-gradient(180deg, var(--color-header-bg) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border2);
  backdrop-filter: blur(8px);
  position: relative;
}
#app-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0.6;
}
#app-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

#app-page {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--color-bg);
}

/* ── Page title row ── */
.page-header {
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.page-header p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ── Responsive: collapse sidebar on narrow screens ── */
@media (max-width: 768px) {
  #app-sidebar { width: 56px; }
  .sidebar-logo span { display: none; }
  .nav-link span { display: none; }
  .nav-group p span { display: none; }
  #app-page { padding: 16px; }
}
