.container-fluid {
  padding-left: 0;
}

.shell-main .container,
.shell-main .container-fluid {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.shell-main > .container-fluid,
.shell-main > .container-fluid > .d-flex,
.shell-main .flex-grow-1.shell-main,
.shell-main main[role="main"] {
  width: 100%;
  min-width: 0;
}

#appSidebar {
  --bs-offcanvas-bg: var(--color-brand-stone);
  background-color: var(--color-brand-stone) !important;
  color: var(--color-brand-deep);
  display: flex;
  flex-direction: column;
}

#appSidebar .sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 68px;
}

#appSidebar .sidebar-logo a {
  color: var(--color-brand-deep);
}

#appSidebar .sidebar-logo img {
  width: 32px;
  height: 32px;
}

#appSidebar .sidebar-logo-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-brand-deep);
  font-size: 1.2rem;
}

#appSidebar .nav-link {
  border-radius: var(--radius-medium);
  color: var(--color-brand-deep);
  font-weight: 500;
  margin: 0.125rem 0;
  padding: 0.55rem 0.75rem;
}

#appSidebar .nav-link.active {
  background-color: var(--color-brand-deep) !important;
  color: #ffffff !important;
}

#appSidebar .nav-link:hover:not(.active) {
  background-color: var(--color-brand-deep) !important;
  color: #ffffff !important;
}

#appSidebar .sidebar-nav-list {
  gap: 0.125rem;
}

#appSidebar .sidebar-menu-heading {
  margin: 0.75rem 0.5rem 0.25rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#appSidebar .sidebar-subheading {
  cursor: default;
  font-weight: 700;
}

#appSidebar .sidebar-subheading:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.35) !important;
  color: var(--color-brand-deep) !important;
}

#appSidebar .sidebar-group summary {
  list-style: none;
}

#appSidebar .sidebar-group summary::-webkit-details-marker {
  display: none;
}

#appSidebar .sidebar-group-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#appSidebar .sidebar-group-caret {
  font-size: 0.8rem;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

#appSidebar .sidebar-group[open] .sidebar-group-caret {
  transform: rotate(180deg);
}

#appSidebar .sidebar-subnav {
  margin-left: 0.65rem;
}

#appSidebar .sidebar-subnav .nav-link {
  font-size: 0.92rem;
  background-color: rgba(255, 255, 255, 0.3);
}

#appSidebar .sidebar-nested-subnav {
  margin-left: 0.75rem;
}

#appSidebar .sidebar-userbox {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.85rem;
}

#appSidebar .sidebar-user-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 45, 50, 0.14);
}

#appSidebar .sidebar-user-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#appSidebar .sidebar-user-value {
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 190px;
}

#appSidebar .offcanvas-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#appSidebar nav {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#appSidebar .sidebar-scroll-area {
  position: relative;
}

#appSidebar .sidebar-scroll-area::before,
#appSidebar .sidebar-scroll-area::after {
  position: sticky;
  left: 0;
  right: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 2;
}

#appSidebar .sidebar-scroll-area::before {
  content: "";
  top: 0;
  height: 18px;
  margin: 0 -0.5rem;
  background: linear-gradient(to bottom, rgba(207, 203, 194, 0.95), rgba(207, 203, 194, 0));
}

#appSidebar .sidebar-scroll-area::after {
  content: "Bla for mer";
  bottom: 0;
  height: 30px;
  margin: 0 -0.5rem;
  background: linear-gradient(to top, rgba(207, 203, 194, 0.98), rgba(207, 203, 194, 0));
  color: rgba(0, 45, 50, 0.72);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 34px;
}

#appSidebar .sidebar-scroll-area.sidebar-scrollable:not(.sidebar-at-top)::before {
  opacity: 1;
}

#appSidebar .sidebar-scroll-area.sidebar-scrollable:not(.sidebar-at-bottom)::after {
  opacity: 1;
}

#appSidebar hr {
  margin: 0;
  border-color: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

#appSidebar .dropdown {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-default);
  background-color: var(--bg-surface);
  flex-shrink: 0;
  position: relative;
}

#appSidebar .dropdown a {
  color: var(--color-brand-deep);
}

#appSidebar .dropdown-menu {
  position: absolute !important;
  bottom: 100% !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  margin: 0 !important;
  width: 100% !important;
  border-radius: 0.75rem 0.75rem 0 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: none;
  margin-bottom: 0.125rem;
  background-color: #ffffff;
  color: var(--text-main);
}

#appSidebar .dropdown-menu .dropdown-item {
  padding: 0.5rem 1rem;
  color: var(--text-main);
}

#appSidebar .dropdown-menu .dropdown-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
}

#appSidebar .dropdown-menu .dropdown-divider {
  margin: 0.25rem 0;
  border-color: var(--border-default);
}

@media (min-width: 992px) {
  #appSidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

.shell-main {
  background-color: var(--bg-canvas);
}

.tenant-top-menu {
  min-height: 4.5rem;
  padding: 0 1.25rem;
  margin: 0;
  background-color: var(--color-brand-stone);
  border-radius: 0 !important;
  border: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
}

.tenant-top-menu__content {
  width: 100%;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.tenant-top-menu__filters {
  width: 100%;
  min-height: 4.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tenant-top-menu__filter {
  min-width: 200px;
}

.tenant-top-menu__filter--inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tenant-top-menu__inline-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(0, 45, 50, 0.78);
  white-space: nowrap;
}

.tenant-top-menu__filter--inline .form-select {
  min-width: 180px;
  height: 2.65rem;
  border-color: rgba(0, 45, 50, 0.12);
  background-color: #ffffff;
}

@media (min-width: 768px) {
  .tenant-top-menu__filters {
    width: auto;
  }
}

.tenant-top-menu-sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: var(--color-brand-stone);
  border-bottom: 1px solid rgba(0, 45, 50, 0.08);
  margin-left: -1px;
  width: calc(100% + 1px);
}

@media (max-width: 767.98px) {
  .tenant-top-menu {
    min-height: 0;
    padding: 0.8rem 1rem;
  }

  .tenant-top-menu__content,
  .tenant-top-menu__filters {
    min-height: 0;
  }

  .tenant-top-menu__filters {
    align-items: stretch;
    justify-content: stretch;
  }

  .tenant-top-menu__filter {
    width: 100%;
    min-width: 0;
  }

  .tenant-top-menu__filter--inline .form-select {
    min-width: 0;
    flex: 1 1 auto;
  }
}

.shell-mobile-header,
.shell-topbar {
  background-color: var(--color-brand-deep);
}

.shell-sidebar {
  --bs-offcanvas-width: 280px;
  background-color: var(--color-brand-stone);
}

.shell-footer {
  border-color: var(--border-default) !important;
  color: var(--text-muted);
}

.shell-footer-link {
  color: inherit;
}

.shell-user-truncate {
  max-width: 200px;
}

.impersonation-current-email {
  max-width: 180px;
}

.impersonation-widget {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.impersonation-widget__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.impersonation-widget__details,
.impersonation-widget__action {
  padding-left: 1.5rem;
}

.impersonation-status-badge {
  font-size: 0.7rem;
}

.impersonation-user-list {
  max-height: 300px;
  overflow-y: auto;
}

.impersonation-user-list__item {
  padding: 0;
}

.impersonation-user-list__button {
  width: 100%;
  padding: 0.5rem;
}

.auth-page {
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
}

.auth-page__footer.fixed-bottom {
  height: 48px;
}

.auth-page__card {
  min-width: 320px;
  max-width: 420px;
  width: 100%;
}

.error-page__card {
  min-width: 320px;
  max-width: 500px;
  width: 100%;
}

.auth-page__icon {
  font-size: 3rem;
}

.app-brand-text {
  letter-spacing: 0.03em;
}
