/**
 * Clean Dashboard Navbar - Simplified styling
 * Consistent styling for dashboard navbar
 */

/* Base navbar structure */
.dashboard-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--navbar-bg, #1e2130);
  border-bottom: 1px solid var(--border-color, #2a2f42);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-left, .navbar-right, .navbar-center {
  display: flex;
  align-items: center;
}

/* Brand styling */
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background-color: var(--primary, #6366f1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  margin-right: 10px;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-text, white);
  letter-spacing: 0.5px;
}

.brand-tag {
  font-size: 10px;
  text-transform: uppercase;
  background-color: var(--primary, #6366f1);
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 5px;
  letter-spacing: 0.5px;
}

/* Search container */
.search-container {
  width: 350px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 40px;
  background-color: var(--search-bg, #252a3d);
  border: 1px solid var(--border-color, #2a2f42);
  border-radius: 8px;
  padding: 0 20px 0 40px;
  color: var(--search-text, #e2e8f0);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-input:focus {
  background-color: var(--search-focus-bg, #2c3250);
  border-color: var(--primary, #6366f1);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-input::placeholder {
  color: var(--placeholder, #64748b);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--icon-color, #64748b);
  font-size: 14px;
}

/* Navbar actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.navbar-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--btn-bg, #252a3d);
  border: 1px solid var(--border-color, #2a2f42);
  color: var(--btn-text, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.navbar-action-btn:hover {
  background-color: var(--btn-hover-bg, #2c3250);
  color: var(--btn-hover-text, #e2e8f0);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background-color: var(--badge-bg, #ef4444);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navbar-bg, #1e2130);
}

.navbar-divider {
  width: 1px;
  height: 30px;
  background-color: var(--divider-color, #2a2f42);
  margin: 0 10px;
}

/* User dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  background-color: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-dropdown-toggle:hover {
  background-color: var(--dropdown-hover, #252a3d);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--primary, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  overflow: hidden;
}

.user-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.user-name-display {
  color: var(--username-text, #e2e8f0);
  font-size: 14px;
  font-weight: 500;
  margin-right: 10px;
}

.dropdown-arrow {
  font-size: 12px;
  color: var(--icon-color, #64748b);
  transition: transform 0.2s ease;
}

.user-dropdown-toggle:hover .dropdown-arrow {
  color: var(--icon-hover, #e2e8f0);
}

/* Dropdown menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background-color: var(--dropdown-bg, #1e2130);
  border: 1px solid var(--border-color, #2a2f42);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user-header {
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #2a2f42);
  background-color: var(--dropdown-header-bg, #252a3d);
}

.dropdown-user-info {
  margin-left: 10px;
}

.dropdown-user-name {
  display: block;
  color: var(--username-text, #e2e8f0);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.dropdown-user-role {
  display: block;
  font-size: 12px;
  color: var(--role-color, #64748b);
}

.dropdown-menu-items {
  padding: 10px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--item-text, #e2e8f0);
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.dropdown-item:hover {
  background-color: var(--item-hover-bg, #252a3d);
  color: var(--item-hover-text, #e2e8f0);
}

.dropdown-item-icon {
  width: 20px;
  margin-right: 10px;
  font-size: 14px;
  color: var(--icon-color, #94a3b8);
}

.dropdown-item:hover .dropdown-item-icon {
  color: var(--primary, #6366f1);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--divider-color, #2a2f42);
  margin: 10px 0;
}

.text-danger {
  color: var(--danger-color, #f87171) !important;
}

.text-danger .dropdown-item-icon {
  color: var(--danger-color, #f87171);
}

/* Theme variables */
body.theme-dark {
  --navbar-bg: #1e2130;
  --border-color: #2a2f42;
  --brand-text: white;
  --search-bg: #252a3d;
  --search-text: #e2e8f0;
  --search-focus-bg: #2c3250;
  --placeholder: #64748b;
  --icon-color: #64748b;
  --btn-bg: #252a3d;
  --btn-text: #94a3b8;
  --btn-hover-bg: #2c3250;
  --btn-hover-text: #e2e8f0;
  --badge-bg: #ef4444;
  --divider-color: #2a2f42;
  --dropdown-hover: #252a3d;
  --username-text: #e2e8f0;
  --icon-hover: #e2e8f0;
  --dropdown-bg: #1e2130;
  --dropdown-header-bg: #252a3d;
  --role-color: #64748b;
  --item-text: #e2e8f0;
  --item-hover-bg: #252a3d;
  --item-hover-text: #ffffff;
  --danger-color: #f87171;
  --primary: #6366f1;
}

body.theme-light {
  --navbar-bg: #ffffff;
  --border-color: #e2e8f0;
  --brand-text: #1e293b;
  --search-bg: #f1f5f9;
  --search-text: #1e293b;
  --search-focus-bg: #e2e8f0;
  --placeholder: #64748b;
  --icon-color: #64748b;
  --btn-bg: #f1f5f9;
  --btn-text: #64748b;
  --btn-hover-bg: #e2e8f0;
  --btn-hover-text: #1e293b;
  --badge-bg: #ef4444;
  --divider-color: #e2e8f0;
  --dropdown-hover: #f1f5f9;
  --username-text: #1e293b;
  --icon-hover: #1e293b;
  --dropdown-bg: #ffffff;
  --dropdown-header-bg: #f8fafc;
  --role-color: #64748b;
  --item-text: #1e293b;
  --item-hover-bg: #f1f5f9;
  --item-hover-text: #1e293b;
  --danger-color: #ef4444;
  --primary: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .navbar-center {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .dashboard-navbar {
    padding: 0 15px;
  }
}

@media (max-width: 575.98px) {
  .navbar-actions {
    gap: 3px;
  }
  
  .navbar-action-btn {
    width: 36px;
    height: 36px;
  }
  
  .user-name-display {
    display: none;
  }
  
  .navbar-divider {
    margin: 0 5px;
  }
}