/* Universal Header Styles */
.universal-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 15px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border-bottom: 3px solid #667eea;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-branding h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 600;
}

.header-branding .subtitle {
  font-size: 14px;
  opacity: 0.8;
  margin: 0;
}

.header-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.header-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.header-btn-primary {
  background: #007bff;
  color: white;
}

.header-btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.header-btn-secondary {
  background: #6c757d;
  color: white;
}

.header-btn-secondary:hover {
  background: #545b62;
  transform: translateY(-1px);
}

.header-btn-info {
  background: #17a2b8;
  color: white;
}

.header-btn-info:hover {
  background: #117a8b;
  transform: translateY(-1px);
}

.header-btn-success {
  background: #28a745;
  color: white;
}

.header-btn-success:hover {
  background: #1e7e34;
  transform: translateY(-1px);
}

.header-btn-danger {
  background: #dc3545;
  color: white;
}

.header-btn-danger:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.header-btn-warning {
  background: #ffc107;
  color: #212529;
}

.header-btn-warning:hover {
  background: #e0a800;
  transform: translateY(-1px);
}

.header-btn-profile {
  background: #6f42c1;
  color: white;
}

.header-btn-profile:hover {
  background: #5a32a3;
  transform: translateY(-1px);
}

/* Profile Dropdown Styles */
.profile-dropdown {
  position: relative;
  display: inline-block;
}

.profile-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: white;
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 8px;
  z-index: 1001;
  border: 1px solid #ddd;
  overflow: hidden;
  top: 100%;
  margin-top: 5px;
}

.profile-dropdown-content.show {
  display: block;
}

.profile-info {
  padding: 15px;
  background: #f8f9fa;
  color: #495057;
  font-size: 13px;
  line-height: 1.4;
}

.profile-email {
  color: #007bff;
  font-weight: 600;
  word-break: break-all;
}

.profile-divider {
  margin: 0;
  border: none;
  border-top: 1px solid #dee2e6;
}

.profile-dropdown-item {
  display: block;
  padding: 12px 15px;
  color: #495057;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-size: 14px;
}

.profile-dropdown-item:hover {
  background-color: #f8f9fa;
  color: #007bff;
}

.profile-dropdown-item.logout-item {
  color: #dc3545;
  border-top: 1px solid #dee2e6;
}

.profile-dropdown-item.logout-item:hover {
  background-color: #f8f9fa;
  color: #c82333;
}

.logout-item {
  color: #dc3545 !important;
}

.logout-item:hover {
  background-color: #f8f9fa !important;
  color: #c82333 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .header-nav {
    justify-content: center;
    width: 100%;
  }
  
  .header-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Ensure page content accounts for sticky header */
body.has-universal-header {
  padding-top: 0;
}

.page-content {
  margin-top: 0;
}

/* Helper classes */
.header-btn-hidden {
  display: none !important;
}

.header-btn-visible {
  display: inline-flex !important;
}
