/* =========================
   MODERN DASHBOARD HEADER
   US Flag Color Theme
========================= */

/* Remove default body margin that might affect header */
body.dashboard-body {
  margin: 0 !important;
  padding: 0 !important;
}

/* Main Header Container */
.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  height: 60px;
  display: flex;
  align-items: center;
  /* Optional: Add subtle red accent at very top */
  border-top: 2px solid #dc2626; /* Thin red stripe at top - US flag reference */
}

/* Header Content Wrapper */
.dashboard-header-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

/* =========================
   LEFT: LOGO SECTION
========================= */
.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Logo Image - Fixed Square, No Red Border */
.dashboard-logo {
  width: 40px;
  height: 40px;
  object-fit: cover; /* Changed from contain to cover for better fit */
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05); /* Subtle shadow instead of red border */
  transition: all 0.2s ease;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

.dashboard-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Project Title - Larger, More Prominent */
.project-title {
  font-size: 20px; /* Increased from 16px */
  font-weight: 600;
  color: #0f172a; /* Navy text */
  letter-spacing: -0.02em; /* Tighter spacing */
  white-space: nowrap;
  line-height: 1.2;
}

/* =========================
   RIGHT: USER SECTION
========================= */
.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* User Avatar Button - Modern Circle */
.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); /* Blue gradient */
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #e5e7eb, 0 2px 4px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  white-space: nowrap;

}

.user-avatar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px #e5e7eb, 0 4px 8px rgba(0, 0, 0, 0.12);
}

.user-avatar-btn:active {
  transform: translateY(0);
}

/* Optional: Online Status Indicator */
.user-avatar-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #16a34a; /* Green for online */
  border: 2px solid #ffffff;
  border-radius: 50%;
}

/* =========================
   DROPDOWN MENU
========================= */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown User Info Section */
.dropdown-user-info {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.dropdown-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.dropdown-role {
  font-size: 13px;
  color: #64748b;
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 4px;
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0;
}

/* Dropdown Items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #475569;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Logout Button - Red Accent */
.dropdown-item.logout {
  color: #dc2626; /* Red */
  border-top: 1px solid #f1f5f9;
}

.dropdown-item.logout:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

/* Tablet */
@media (max-width: 768px) {
  .dashboard-header-content {
    padding: 0 16px;
  }
  
  .project-title {
    font-size: 18px; /* Slightly smaller but still prominent */
  }
  
  .dashboard-logo {
    width: 38px;
    height: 38px;
  }
  
  .logo-section {
    gap: 12px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .dashboard-header {
    height: 56px;
  }
  
  .dashboard-header-content {
    padding: 0 12px;
    gap: 12px;
  }
  
  .logo-section {
    gap: 10px;
  }
  
  .project-title {
    font-size: 16px; /* Keep visible on mobile */
  }
  
  .dashboard-logo {
    width: 36px;
    height: 36px;
  }
  
  .user-avatar-btn {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  
  .user-dropdown-menu {
    min-width: 200px;
    right: -12px;
  }
}

/* Extra small screens - hide title only if really needed */
@media (max-width: 400px) {
  .project-title {
    display: none;
  }
}

/* =========================
   OPTIONAL: ADDITIONAL ICONS
   (Notifications, Search, etc.)
========================= */

/* Add this section if you want to include notification/search icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.header-icon-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* Notification Badge - Red */
.header-icon-btn .notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #dc2626; /* Red dot */
  border: 2px solid #ffffff;
  border-radius: 50%;
}

/* Hide icons on mobile */
@media (max-width: 576px) {
  .header-icons {
    display: none;
  }
}

/* =========================
   SMOOTH ANIMATIONS
========================= */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure dropdown appears above everything */
.user-dropdown-menu {
  pointer-events: none;
}

.user-dropdown-menu.show {
  pointer-events: auto;
}