/* ==========================================================================
   Top App Bar & Navigation
   ========================================================================== */

.md-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  min-height: 60px;
  background: var(--md-appbar);
  color: #ffffff;
  box-shadow: var(--md-elev-2);
  flex-shrink: 0;
  z-index: 40;
}

.appbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.brand-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.brand-icon {
  font-size: 22px;
  color: #ff9800;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-left: auto;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
}

.nav-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-item.active {
  background: var(--md-primary);
  color: #ffffff;
}

.nav-item.active:hover {
  background: var(--md-primary-dark);
  color: #ffffff;
}

.nav-item .caret {
  margin-left: -2px;
}

/* Material Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 270px;
  padding: 6px 0;
  background: var(--md-surface);
  border-radius: 6px;
  box-shadow: var(--md-elev-4);
  display: none;
  flex-direction: column;
  z-index: 60;
}

.nav-dropdown.open .dropdown-menu {
  display: flex;
  animation: md-fade 0.16s ease;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  color: var(--md-text);
  cursor: pointer;
  transition: background 0.12s ease;
}

.dropdown-item .material-symbols-outlined {
  color: var(--md-text-secondary);
  margin-top: 2px;
}

.dropdown-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--md-text);
}

.dropdown-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--md-text-secondary);
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item.active {
  background: var(--md-primary-soft);
}

.dropdown-item.active strong,
.dropdown-item.active .material-symbols-outlined {
  color: var(--md-primary);
}

.kg-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff9800;
}
