/* OME MIRON Streams — final clipping correction.
   Visual-only overrides; no API, auth, RBAC or business logic changes. */

/* Lock the desktop shell to one explicit sidebar column and one fluid workspace. */
.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 292px;
  min-width: 292px;
  max-width: 292px;
  height: 100vh;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 20;
}

/* Keep the brand visible even when the sidebar itself is scrolled. */
.brand-block {
  position: sticky;
  top: 0;
  z-index: 25;
  margin-top: 0;
  background:
    linear-gradient(180deg, rgba(8, 14, 21, 1) 0%, rgba(8, 14, 21, 0.98) 82%, rgba(8, 14, 21, 0.92) 100%);
}

.main-content {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-left: 36px;
  overflow-x: clip;
}

/* Prevent the first card/icon from touching or slipping under the sidebar edge. */
.page-heading,
.overview-grid,
.monitoring-layout,
.activity-grid,
.admin-dashboard-grid {
  min-width: 0;
  margin-left: 0;
}

.overview-grid,
.monitoring-layout {
  padding-left: 2px;
}

.metric-card,
.toolbar,
.empty-state,
.stream-card,
.info-panel {
  min-width: 0;
}

@media (max-width: 1250px) {
  .app-shell {
    grid-template-columns: 264px minmax(0, 1fr);
  }

  .sidebar {
    width: 264px;
    min-width: 264px;
    max-width: 264px;
  }

  .main-content {
    padding-left: 30px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    overflow-x: hidden;
  }

  .sidebar {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .brand-block {
    position: relative;
  }

  .main-content {
    width: 100%;
    padding-left: 14px;
  }
}
