.dashboard-shell {
  display: block;
  min-height: 100vh;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e4e9ef;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 60;
}

.sidebar-brand {
  height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid #e4e9ef;
  display: flex;
  align-items: center;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sidebar-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #d4dde7;
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
}

.sidebar-brand-kicker {
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1 1 auto;
  overflow: auto;
  padding: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-item,
.nav-group-toggle,
.nav-subitem {
  border-radius: 0;
  width: 100%;
  border: 0;
}

.nav-item,
.nav-group-toggle {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 16px;
  font-size: 13px;
  color: #4b5563;
}

.nav-item:hover,
.nav-group-toggle:hover,
.nav-subitem:hover {
  background: #f3f6fa;
}

.nav-item.is-active {
  background: #eef3f8;
  color: #111827;
  box-shadow: inset 3px 0 0 #3f4b5c;
}

.nav-group {
  display: grid;
  gap: 1px;
}

.nav-group-toggle {
  background: transparent;
  cursor: pointer;
  color: #4b5563;
}

.nav-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon {
  width: 14px;
  display: inline-flex;
  justify-content: center;
  color: #7a8594;
  font-size: 11px;
  font-weight: 700;
}

.nav-chevron {
  margin-left: auto;
  color: #8a94a4;
  transition: transform 0.22s ease;
}

.nav-group.is-open .nav-chevron {
  transform: rotate(90deg);
}

.nav-group.is-active-group > .nav-group-toggle {
  background: #eef3f8;
  color: #111827;
  box-shadow: inset 3px 0 0 #3f4b5c;
}

.nav-group-menu {
  display: grid;
  gap: 4px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.24s ease;
}

.nav-subitem {
  margin-left: 0;
  min-height: 31px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 38px;
  font-size: 12.5px;
  color: #5f6b7a;
  background: transparent;
}

.nav-subitem.is-active {
  background: #eef3f8;
  color: #111827;
  box-shadow: inset 3px 0 0 #3f4b5c;
}

.sidebar-foot {
  border-top: 1px solid #e4e9ef;
  padding: 10px 0;
}

.sidebar-logout {
  display: block;
  font-size: 13px;
  color: #5f6b7a;
  padding: 8px 16px;
  border-radius: 0;
}

.sidebar-logout:hover {
  background: #f3f6fa;
  color: #111827;
}

.dashboard-main {
  margin-left: 280px;
  min-width: 0;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid #e4e9ef;
  background: var(--bg-header);
}

.topbar-left-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.sidebar-mobile-toggle {
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #d2dae4;
  border-radius: 6px;
  background: #f8fafc;
  color: #374151;
  cursor: pointer;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: 0.02em;
}

.dashboard-content {
  padding: 12px 16px 16px;
  min-width: 0;
  overflow-x: hidden;
}

.content-head {
  margin-bottom: 12px;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.breadcrumbs a {
  color: #6b7280;
}

.breadcrumbs a:hover {
  color: #1f2937;
}

.content-title {
  margin: 0;
  font-size: clamp(22px, 1.3vw, 25px);
  line-height: 1.18;
  font-weight: 600;
  color: #1f2937;
}

.content-body {
  min-width: 0;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 55;
}

@media (max-width: 1200px) {
  .dashboard-content {
    padding: 12px 12px 14px;
  }
}

@media (max-width: 980px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    width: 270px;
  }

  .dashboard-main {
    margin-left: 0;
    grid-template-rows: 48px minmax(0, 1fr);
  }

  .sidebar-mobile-toggle {
    display: inline-flex;
  }

  .dashboard-content {
    padding: 12px 12px 16px;
  }

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

  body.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .dashboard-topbar {
    padding: 8px 10px;
  }

  .dashboard-sidebar {
    width: min(86vw, 300px);
  }

  .topbar-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-content {
    padding: 10px 8px 14px;
    overflow-x: visible;
  }

  .content-head {
    margin-bottom: 8px;
  }

  .breadcrumbs {
    font-size: 11px;
    gap: 5px;
  }

  .content-title {
    font-size: 21px;
  }
}
