html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
}

/* ---------- App shell: sidebar + content ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Compact icon-only sidebar. No overflow set on purpose: dropdowns/tooltips must not be clipped. */
.app-sidebar {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: .75rem .5rem;
  background: var(--sl-sidebar-bg, var(--bs-tertiary-bg));
  border-right: 1px solid var(--bs-border-color);
}

.app-sidebar-offcanvas {
  width: 17rem;
  background: var(--sl-sidebar-bg, var(--bs-tertiary-bg));
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: .5rem 1rem;
  background: var(--sl-sidebar-bg, var(--bs-tertiary-bg));
  border-bottom: 1px solid var(--bs-border-color);
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1 0 auto;
  padding: 1.5rem;
}

.app-footer {
  padding: 1rem 1.5rem;
}

@media (max-width: 767.98px) {
  .app-shell {
    flex-direction: column;
  }

  .app-main {
    padding: 1rem;
  }
}

/* ---------- Sidebar details ---------- */
.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-emphasis-color);
}

.app-sidebar .nav-link:not(.active),
.app-sidebar-offcanvas .nav-link:not(.active) {
  color: var(--bs-body-color);
}

.app-sidebar .nav-link:not(.active):hover,
.app-sidebar-offcanvas .nav-link:not(.active):hover {
  color: var(--bs-link-hover-color);
  background: var(--bs-secondary-bg);
}

.sidebar-bottom .nav-link {
  padding: .4rem .75rem;
}

/* Compact mode: icons only (text is shown as a tooltip, see site.js) */
.sidebar-compact .nav-label {
  display: none;
}

.sidebar-compact .nav-link {
  padding: .6rem 0;
  text-align: center;
  font-size: 1.25rem;
}

.sidebar-compact .sidebar-brand {
  font-size: 1.6rem;
}

/* ---------- Filter bar on the resource list: one wrapping row ---------- */
.filter-field {
  flex: 1 1 9rem;
  min-width: 0;
}

.filter-field-wide {
  flex: 2 1 13rem;
}

.filter-field-date {
  flex: 1 1 8.5rem;
}

/* ---------- Embedded resources (iframe keeps its own colors, so give it a neutral frame) ---------- */
.sl-embed iframe {
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  background: #fff;
}
