/* static/css/02_shell.css
   Chrome layout only.
   Owns: topbar height, sidebar width, page padding, positioning.
   DOES NOT style buttons/icons/etc.
*/

:root{
  --nav-h: 56px;
  --sidebar-w: 260px;
  --content-pad: 18px;
}

/* layout safety */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{ margin: 0; }

/* App shell: column (topbar + body) */
.shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

/* Under the fixed topbar */
.shell-body{
  flex: 1;
  display: flex;
  align-items: stretch;

  padding-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

/* Sidebar: pinned under nav */
.shell-body > .sidebar{
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);

  height: calc(100vh - var(--nav-h));
  position: sticky;
  top: var(--nav-h);
  overflow: auto;

  border-right: 1px solid var(--border);
  background: var(--surface);
}

/* Main content */
.shell-main{
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--content-pad);
}

/* Mobile: sidebar becomes top section */
@media (max-width: 900px){
  .shell-body{
    display: block;
    padding-top: var(--nav-h);
  }

  .shell-body > .sidebar{
    width: 100%;
    flex: none;
    position: relative;
    top: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}
