/* 
   --------------------------------------------------
   MODERN TOP NAVIGATION STYLES
   --------------------------------------------------
*/

:root {
  --navbar-height: 64px;
  --navbar-bg: #151521; /* Matched to sidebar */
  --navbar-border: #1e1e2d;
  --navbar-text: #92929f;
  --navbar-text-muted: #5d5d6d;
  --navbar-hover-bg: rgba(255, 255, 255, 0.04);
  --accent-color: #3699ff;
  --navbar-font-size: 0.9rem;
}

.topnav,
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--navbar-bg) !important; /* Override Bootstrap bg-dark */
  color: var(--navbar-text);
  z-index: 1030;
  height: var(--navbar-height);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* Very light 3D shadow */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle highlight */
  padding: 0 1.5rem;
  backdrop-filter: blur(10px); /* Glassmorphism effect where supported */
  font-family: var(--navbar-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

/* --------------------------------------------------
   BRAND & LOGO
   -------------------------------------------------- */

.navbar-brand,
.topnav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navbar-text) !important;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topnav-brand img {
  height: 36px;
  width: auto;
}

/* --------------------------------------------------
   SEARCH BAR (Modern Pill Style)
   -------------------------------------------------- */

.search-container {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.8rem;
  border: 1px solid transparent;
  border-radius: 20px; /* Pill shape */
  font-size: var(--navbar-font-size, 0.9rem);
  background-color: #151521; /* Darker than navbar */
  color: var(--navbar-text);
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: var(--navbar-text-muted);
}

.search-input:focus {
  outline: none;
  background-color: #151521;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(54, 153, 255, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navbar-text-muted);
  pointer-events: none;
}

/* --------------------------------------------------
   ACTION BUTTONS (Notifications, Toggle)
   -------------------------------------------------- */

.btn-link.text-light,
.notification-btn,
.sidebar-toggle {
  color: var(--navbar-text-muted) !important;
  background: transparent;
  border: none;
  padding: 0.6rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.btn-link.text-light:hover,
.notification-btn:hover,
.sidebar-toggle:hover {
  color: var(--accent-color) !important;
  background-color: var(--navbar-hover-bg);
  transform: translateY(-1px);
}

/* Notification Badge */
.badge.bg-danger {
  background-color: #f64e60 !important; /* Modern softer red */
  box-shadow: 0 2px 4px rgba(246, 78, 96, 0.3);
  font-size: 0.65rem;
  padding: 0.35em 0.5em;
}

/* --------------------------------------------------
   USER PROFILE
   -------------------------------------------------- */

.user-menu,
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 30px; /* Pill shape */
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.user-menu:hover,
.dropdown-toggle:hover {
  background-color: var(--navbar-hover-bg);
}

.user-menu img,
.dropdown-toggle img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  object-fit: cover;
}

.user-menu span,
.dropdown-toggle span {
  font-weight: 600;
  font-size: var(--navbar-font-size, 0.9rem);
  color: var(--navbar-text);
}

/* --------------------------------------------------
   DROPDOWNS
   -------------------------------------------------- */

.dropdown-menu {
  margin-top: 0.5rem !important;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 0 50px 0 rgba(82, 63, 105, 0.15);
  background-color: #ffffff;
  padding: 1rem 0;
  min-width: 240px;
}

.dropdown-header {
  color: #7e8299;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 1.5rem 0.5rem;
}

.dropdown-item {
  padding: 0.7rem 1.5rem;
  color: #3f4254;
  font-weight: 500;
  font-size: var(--navbar-font-size, 0.9rem);
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.dropdown-item i {
  color: #b5b5c3;
  width: 20px;
  margin-right: 10px;
  text-align: center;
  transition: color 0.2s ease;
}

[dir="rtl"] .dropdown-item i {
  margin-right: 0;
  margin-left: 10px;
}

.dropdown-item:hover {
  background-color: #f3f6f9;
  color: var(--accent-color);
}

.dropdown-item:hover i {
  color: var(--accent-color);
}

.dropdown-divider {
  border-top-color: #ebedf3;
  margin: 0.5rem 0;
}

/* Dark Mode Support for Dropdowns (Optional, based on system preference) */
@media (prefers-color-scheme: dark) {
  /* You can enable this block if you want dropdowns to be dark in dark mode 
     or if the whole site is dark-only. For now, keeping white dropdowns for contrast 
     as seen in many modern dashboards, or we can make them dark. 
     Let's stick to a clean white dropdown for high contrast against the dark header 
     unless requested otherwise. */
}
