/* CSP-safe shell styles (no inline <style> in EJS).
   Do not set font-family on *::before / *::after — Remix Icon uses those. */
body {
  font-family: 'Inter', sans-serif;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
}

#app {
  opacity: 1;
  visibility: visible;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header is fixed; this row fills the viewport under it. */
#app > .admin-shell-body {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  min-height: 100dvh;
  box-sizing: border-box;
}

#app > .admin-shell-body > main.admin-shell-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: calc(100dvh - 4rem);
  min-width: 0;
  overflow-x: clip;
}

#app > .admin-shell-body > main.admin-shell-main > .dashboard-footer {
  margin-top: auto;
  flex-shrink: 0;
}

button:disabled,
input[type='submit']:disabled,
input[type='button']:disabled,
input[type='reset']:disabled,
[role='button'][aria-disabled='true'] {
  cursor: not-allowed;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

/* Mobile sidebar + overlay (CSP-safe; no inline styles) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  top: 4rem;
  z-index: 39;
  background: rgb(15 23 42 / 45%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#sidebar {
  z-index: 40;
  transition: transform 0.28s ease;
}

@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.sidebar--mobile-open {
    transform: translateX(0);
  }
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none;
  }

  #sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed #sidebar {
    transform: translateX(-100%);
  }
}
