/* ========================================
   Page layout — mobile-first
   ----------------------------------------
   On mobile the sidebar is hidden and replaced by the bottom-tab
   (see components/bottom-tab.css). Main content reserves space for
   that bar via .main.-with-bottom-tab. From 720px the sidebar
   appears collapsed; from 1024px it expands to its full width.
   ======================================== */
.page-layout {
  display: flex;
  min-height: 100vh;
  overflow-x: clip; /* keep nested overflow from forcing a horizontal
                       scrollbar on the page (the fixed sidebar +
                       margin-left dance occasionally causes one) */
}

.page-layout > .main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  margin-left: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 200ms ease;
}

.page-layout > .main.-with-bottom-tab {
  padding-bottom: var(--bottom-tab-height);
}

.page-layout > .main > .content {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--content-pad);
}

.page-layout > .main > .footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px var(--content-pad);
  border-top: 1px dashed var(--line-strong);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.page-layout > .main > .footer .footer-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
}
.page-layout > .main > .footer .footer-legal {
  justify-self: center;
}
.page-layout > .main > .footer .footer-version {
  justify-self: end;
}
.page-layout > .main > .footer .footer-stamp > .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}
.page-layout > .main > .footer .footer-version {
  color: var(--muted);
  opacity: 0.7;
}

/* The footer is for marketing / credibility on public pages — drop
   it from mobile entirely. The bottom-tab is the bottom UI element. */
@media (max-width: 719px) {
  .page-layout > .main > .footer { display: none; }
}

@media (min-width: 720px) {
  .page-layout > .main {
    margin-left: var(--sidebar-width-collapsed);
  }
  .page-layout > .main.-no-sidebar {
    margin-left: 0;
  }
  .page-layout > .main.-with-bottom-tab {
    padding-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .page-layout > .main {
    margin-left: var(--sidebar-width);
  }
  .page-layout > .main.-no-sidebar {
    margin-left: 0;
  }
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header > .title {
  font-size: 2rem;
}

.page-header > .subtitle {
  color: var(--text-2);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* .section-label moved to components/_primitives.css with boletería styling. */
