html:has(.work-page),
body:has(.work-page) {
  height: 100%;
  overflow: hidden;
}

.work-page {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: #f4f6f9;
}

.work-topbar {
  flex: 0 0 auto;
  z-index: 1030;
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--bs-border-color);
}

.work-topbar-row {
  min-height: 49px;
}

.work-topbar-brand .product-brand-logo {
  height: 1.5rem;
}

.work-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.work-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0b2d5c 0%, #1a3a5c 100%);
  color: #e8eef5;
}

.work-sidebar-desktop {
  flex: 0 0 260px;
  height: 100%;
  min-height: 0;
}

.work-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.work-sidebar.offcanvas {
  --bs-offcanvas-bg: transparent;
  background: linear-gradient(180deg, #0b2d5c 0%, #1a3a5c 100%);
  z-index: 1055;
}

.work-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background-color: #f4f6f9;
}

.app-nav {
  padding: 0.75rem;
}

.app-nav-link {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.95rem;
}

.app-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.app-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 600;
}

.app-nav-version {
  margin-top: auto;
  padding: 0.35rem 1.25rem 0.65rem 1.35rem;
  font-size: 0.625rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--bs-font-monospace);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  word-break: break-all;
}

.work-topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--bs-secondary-color);
}

.work-topbar-icon-btn:hover,
.work-topbar-icon-btn:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: var(--bs-body-color);
}

.work-topbar-icon-btn--notify {
  position: relative;
}

.work-topbar-notify-dot {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #20c997;
  border: 1px solid #fff;
}

.work-topbar-svg {
  width: 1.15rem;
  height: 1.15rem;
}

.work-topbar-action {
  position: relative;
  flex-shrink: 0;
}

.work-topbar--search-open {
  z-index: 1060;
}

.work-header-panel--search {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.work-search-panel-inner {
  width: min(33.333vw, 100%);
  margin: 0 auto;
  padding: 0 1rem;
}

.work-header-panel--popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 1050;
  min-width: 16rem;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.work-header-panel--notifications {
  width: 18rem;
}

.work-mini-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.5rem;
}

a.work-mini-menu-item {
  text-decoration: none;
}

a.work-mini-menu-item:hover {
  color: var(--bs-body-color);
}

.work-mini-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.5rem;
  padding: 0.35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  background: #f8f9fa;
  color: var(--bs-secondary-color);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.work-mini-menu-item-icon {
  font-size: 1rem;
  opacity: 0.65;
}

.work-notify-panel-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  border-bottom: 1px solid var(--bs-border-color);
}

.work-notify-panel-body {
  padding: 1.25rem 0.75rem;
  font-size: 0.8125rem;
  text-align: center;
}

.work-notify-panel-footer {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-top: 1px solid var(--bs-border-color);
}

.work-notify-panel-footer .btn-link {
  color: #20c997;
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.work-topbar-theme-btn .theme-icon-dark {
  display: none;
}

.work-topbar-theme-btn--dark {
  color: #ffc107;
}

.work-topbar-theme-btn--dark:hover,
.work-topbar-theme-btn--dark:focus-visible {
  color: #ffda6a;
}

.work-topbar-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
  box-shadow: none !important;
}

.work-topbar-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  font-size: 0.75rem;
  font-weight: 600;
}

.portal-stat {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
}

.portal-stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0b2d5c;
}

@media (min-width: 992px) {
  .offcanvas-backdrop {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .work-sidebar.offcanvas {
    --bs-offcanvas-width: min(320px, 92vw);
    width: var(--bs-offcanvas-width);
  }
}
