/*
 * Admin shell — the console frame: dark command rail + work column. Layout
 * holder for c-rail (sidebar) and the top bar + scrolling content.
 */

.c-shell {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
}

.c-shell__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.c-shell__scroll {
  flex: 1;
  padding: var(--space-lg) var(--space-xl);
}

.c-shell__overlay { display: none; }

/* ≤880px — single column; the rail (its own file) becomes an off-canvas
   drawer, and the overlay backs it. */
@media (max-width: 880px) {
  .c-shell { grid-template-columns: 1fr; }

  .c-shell__overlay {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--rail) 45%, transparent);
    z-index: var(--z-rail);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
  }
  .c-shell.is-rail-open .c-shell__overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .c-shell__scroll { padding: var(--space-md); }
}

body.is-rail-locked { overflow: hidden; }
