/* Side navigation: fixed rail, expand on hover when unpinned, pin with hamburger */
.layout-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #F5F1E8 0%, #FFFFFF 100%);
  border-right: 1px solid #D6D0C4;
  box-sizing: border-box;
  width: 72px;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.22s ease, box-shadow 0.22s ease;
}

.layout-sidebar.sidebar-pinned {
  width: 240px;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

.layout-sidebar.sidebar-unpinned:hover {
  width: 240px;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

.sidebar-brand-block {
  padding: 14px 10px 12px;
  border-bottom: 1px solid #D6D0C4;
  flex-shrink: 0;
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  flex: 1;
  min-height: 0;
}

.sidebar-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #1E2D2A;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  border-bottom: 2px solid transparent;
}

.sidebar-nav-btn:hover {
  background: #E8F3F0;
  color: #155447;
}

.sidebar-nav-btn.active {
  background: rgba(31, 111, 95, 0.12);
  color: #155447;
  border-bottom-color: #1F6F5F;
}

.sidebar-nav-btn .bi {
  font-size: 1.15rem;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.layout-sidebar.sidebar-unpinned:not(:hover):not(.sidebar-pinned) .nav-item-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.layout-sidebar.sidebar-unpinned:hover .nav-item-label,
.layout-sidebar.sidebar-pinned .nav-item-label {
  opacity: 1;
  width: auto;
  transition: opacity 0.15s ease 0.05s;
}

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid #D6D0C4;
  flex-shrink: 0;
}

.sidebar-hamburger {
  width: 100%;
  padding: 10px;
  border: 1px solid #D6D0C4;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: #1E2D2A;
}

.sidebar-hamburger:hover {
  background: #E8F3F0;
}

.layout-main-column {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

.layout-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
  background: linear-gradient(135deg, #F6B95E 0%, #7BC7B5 100%);
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid #D6D0C4;
  margin-bottom: 12px;
}

/* dcc.Loading: keep spinner viewport-centered while inner content scrolls */
#tab-loading.tab-loading-fixed-host {
  flex: 1;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  position: relative;
}

#tab-loading.tab-loading-fixed-host ._dash-loading-callback {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 150 !important;
}
