/* Bhu-Naksha top header navigation menu */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
}

body {
  padding-top: var(--app-header-h, 0px);
}

.header-nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0 20px;
  min-height: 48px;
  background: #2c3e50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
}

.header-nav-menu li {
  margin: 0;
  padding: 0;
}

.nav-menu-link {
  display: inline-block;
  padding: 14px 20px;
  color: #ecf0f1;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.nav-menu-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-menu-link.active {
  background-color: rgb(154, 207, 80);
  color: #1a1a1a;
  font-weight: 600;
}

.nav-menu-link.active:hover {
  background-color: rgb(140, 190, 70);
  color: #1a1a1a;
}

.nav-user-display {
  color: #ecf0f1;
  padding: 0 12px;
  margin: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: #ffffff;
  max-width: 240px;
  overflow: hidden;
}

.user-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-desg {
  font-size: 14px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-state {
  font-size: 13px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 230px;
  background: #111827;
  color: #e5e7eb;
  padding: 8px 0 12px;
  flex-shrink: 0;
  position: fixed;
  top: var(--app-header-h, 0px);
  left: 0;
  height: calc(100vh - var(--app-header-h, 0px));
  overflow-y: auto;
  z-index: 1500;
}

.app-shell > #sidebarContainer {
  width: 230px;
  flex-shrink: 0;
}

.app-shell > #sidebarContainer:empty {
  width: 0;
}

.main-content,
.page-main {
  flex: 1;
  min-width: 0;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
}

.sidebar-menu li {
  margin: 0;
}

.sidebar-link,
.sidebar-sublink,
.sidebar-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}

.sidebar-link:hover,
.sidebar-sublink:hover,
.sidebar-toggle:hover {
  background: #1f2937;
  color: #ffffff;
}

.sidebar-link.active,
.sidebar-sublink.active {
  background: rgb(154, 207, 80);
  color: #111827;
  font-weight: 600;
}

.sidebar-submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 10px;
  display: none;
}

.sidebar-submenu.open {
  display: block;
}

.sidebar-sublink {
  font-size: 13px;
  padding-left: 26px;
}

.toggle-icon {
  font-size: 11px;
  opacity: 0.8;
}

/* Hamburger (mobile) */
.header-right-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sidebar-hamburger {
  width: 42px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.sidebar-hamburger span {
  width: 18px;
  height: 2px;
  background: #111827;
  display: block;
  border-radius: 2px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1400;
}

@media (max-width: 768px) {
  .sidebar-hamburger {
    display: inline-flex;
  }

  .app-shell {
    flex-direction: column;
  }

  .app-shell > #sidebarContainer {
    width: 0;
  }

  .app-sidebar {
    width: 260px;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
  }

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

  body.sidebar-open .sidebar-overlay {
    display: block;
  }
}

@media (max-width: 640px) {
  .header-nav-menu {
    padding: 0 10px;
  }
  .nav-menu-link {
    padding: 12px 12px;
    font-size: 14px;
  }
}
