/* ============================================================
   Layout — Sidebar + Content Grid
   ============================================================ */

.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* === Main Content Area === */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--misa-bg-white);
  transition: margin-left var(--sidebar-transition);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--misa-space-10) var(--misa-space-20);
  border-bottom: 1px solid #e5e7eb;
  background: var(--misa-bg-white);
  min-height: 48px;
  flex-shrink: 0;
}

.content-header h1 {
  font-size: var(--misa-text-md);
  font-weight: var(--misa-fw-semibold);
  color: var(--misa-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* === Page Views === */
.page-view {
  display: none;
  height: 100%;
  flex-direction: column;
}
.page-view.active {
  display: flex;
}

/* === Overlay (mobile sidebar) === */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: calc(var(--z-sidebar) - 1);
}
.sidebar-overlay.visible {
  display: block;
}

/* === Responsive === */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0 !important;
  }
}
