/**
 * Modern Navigation Styling
 * Enhances existing Bootstrap navigation with modern styling and icons
 * Maintains existing functionality and structure
 */

/* Modern Navbar Base */
.navbar-inverse {
  background: linear-gradient(135deg, #2899D5 0%, #1a7db8 100%);
  border: none;
  box-shadow: 0 2px 10px rgba(40, 153, 213, 0.2);
  min-height: 60px;
  transition: all 0.3s ease;
}

.navbar-inverse .navbar-inner {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Brand Styling */
.navbar-inverse .brand {
  color: white !important;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 18px 20px;
  transition: all 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.navbar-inverse .brand:hover {
  color: #fa920c !important;
  transform: translateX(3px);
  text-decoration: none;
}

/* Navigation Links */
.navbar-inverse .nav > li > a {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  padding: 18px 16px;
  transition: all 0.3s ease;
  border-radius: 6px;
  margin: 6px 2px;
  position: relative;
}

.navbar-inverse .nav > li > a:hover,
.navbar-inverse .nav > li > a:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  transform: translateY(-1px);
  text-decoration: none;
}

.navbar-inverse .nav .active > a,
.navbar-inverse .nav .active > a:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Add Icons to Navigation Items */
.navbar-inverse .nav > li > a::before {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 8px;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

/* Home Icon */
.navbar-inverse .nav > li > a[href*="/admin/"]:not([href*="management"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.707 1.5ZM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5 5 5Z'/%3E%3C/svg%3E");
}

/* System Management Icon */
.navbar-inverse .nav > li > a:contains("System Management")::before,
.navbar-inverse .nav > li:has(a:contains("System Management")) > a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z'/%3E%3C/svg%3E");
}

/* Orders Icon */
.navbar-inverse .nav > li:nth-child(3) > a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M0 2.5A.5.5 0 0 1 .5 2H2a.5.5 0 0 1 .485.379L2.89 4H14.5a.5.5 0 0 1 .485.621l-1.5 6A.5.5 0 0 1 13 11H4a.5.5 0 0 1-.485-.379L1.61 3H.5a.5.5 0 0 1-.5-.5zM3.14 5l1.25 5h8.22l1.25-5H3.14zM5 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm9-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0z'/%3E%3C/svg%3E");
}

/* Financial Icon */
.navbar-inverse .nav > li:nth-child(4) > a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 2A1.5 1.5 0 0 0 0 3.5v2h6a.5.5 0 0 1 .5.5c0 .253.08.644.306.958.207.288.557.542 1.194.542.637 0 .987-.254 1.194-.542.226-.314.306-.705.306-.958a.5.5 0 0 1 .5-.5h6v-2A1.5 1.5 0 0 0 14.5 2h-13z'/%3E%3Cpath d='M16 6.5h-5.551a2.678 2.678 0 0 1-.443 1.042C9.613 8.088 8.963 8.5 8 8.5c-.963 0-1.613-.412-2.006-.958A2.679 2.679 0 0 1 5.551 6.5H0v6A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-6z'/%3E%3C/svg%3E");
}

/* Reports Icon */
.navbar-inverse .nav > li:nth-child(5) > a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M4 11H2v3h2v-3zm5-4H7v7h2V7zm5-5v12h-2V2h2zm-2-1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1h-2zM6 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7zm-5 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-3z'/%3E%3C/svg%3E");
}

/* User Management Icon */
.navbar-inverse .nav.pull-right > li:last-child > a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E");
}

/* Modern Dropdown Menu */
.navbar-inverse .dropdown-menu {
  background: white;
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 8px;
  margin-top: 8px;
  min-width: 220px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-inverse .dropdown-menu > li > a {
  color: #495057 !important;
  padding: 10px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 400;
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-inverse .dropdown-menu > li > a:hover {
  background: linear-gradient(135deg, #fa920c 0%, #e8850b 100%);
  color: white !important;
  transform: translateX(4px);
  text-decoration: none;
}

/* User Details Styling */
.nav_user_details {
  color: white;
  padding: 18px 16px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  margin: 6px 8px;
  transition: all 0.3s ease;
}

.nav_user_details:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Modern Caret */
.navbar-inverse .caret {
  border-top-color: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.navbar-inverse .dropdown.open .caret {
  transform: rotate(180deg);
}

/* Mobile Responsive */
@media (max-width: 979px) {
  .navbar-inverse .nav-collapse.collapse {
    background: linear-gradient(135deg, #2899D5 0%, #1a7db8 100%);
    border-radius: 0 0 10px 10px;
    margin-top: 8px;
  }
  
  .navbar-inverse .nav > li > a {
    margin: 0;
    border-radius: 0;
  }
  
  .navbar-inverse .nav > li > a:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.15) !important;
  }
}

/* Smooth transitions for dropdowns */
.navbar-inverse .nav li.dropdown.open > .dropdown-toggle {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* Hover effect for icons */
.navbar-inverse .nav > li > a:hover::before {
  opacity: 1;
  transform: scale(1.1);
}