:root {
  --header-height: 140px;   /* 3 rows combined */
  --footer-height: 50px;
  --sidebar-width: 260px;
}

/* Lock the page */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

/* HEADER */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #fff;
  z-index: 1030;
  border-bottom: 1px solid #dee2e6;
}

/* FOOTER */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: #fff;
  z-index: 1030;
  border-top: 1px solid #dee2e6;
}

/* SIDEBAR (desktop only) */
.app-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow-y: auto;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
}

/* MAIN CONTENT */
.app-main {
  position: fixed;
  top: var(--header-height);
  left: var(--sidebar-width);
  right: 0;
  bottom: var(--footer-height);
  overflow: auto;
  padding: 1rem;
  background: #f1f3f5;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 767px) {
  .app-main {
    left: 0;
  }
}
