/* Global Header Styles for AgriConnectHub Dashboard */

/* Header Styles - Matching main.html */
.header { 
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%); 
  padding: 1rem 2rem; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .logo { 
  color: white; 
  font-size: 1.5rem; 
  font-weight: 700; 
  text-decoration: none; 
}

.header-buttons { 
  display: flex; 
  gap: 0.8rem; 
  align-items: center; 
}

.header-buttons a, .header-buttons button { 
  background: rgba(255,255,255,0.15); 
  color: white; 
  padding: 0.45rem 0.7rem; 
  border-radius: 8px; 
  border: 1px solid rgba(255,255,255,0.2); 
  transition: all 0.3s; 
  font-size: 0.75rem; 
  text-decoration: none; 
  cursor: pointer; 
  font-weight: 600; 
  font-family: inherit;
}

.header-buttons a:hover, .header-buttons button:hover { 
  background: rgba(255,255,255,0.25); 
  transform: translateY(-2px); 
}

.apps-dropdown { 
  position: relative; 
}

.apps-btn { 
  background: rgba(255,255,255,0.15); 
  color: white; 
  padding: 0.6rem 1rem; 
  border-radius: 8px; 
  border: 1px solid rgba(255,255,255,0.2); 
  cursor: pointer; 
  font-size: 0.9rem; 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  transition: all 0.3s; 
  font-family: inherit;
}

.apps-btn:hover { 
  background: rgba(255,255,255,0.25); 
  transform: translateY(-2px); 
}

.dropdown-menu { 
  position: fixed; 
  top: 75px; 
  right: 1.5rem; 
  background: white; 
  border-radius: 8px; 
  box-shadow: 0 8px 24px rgba(0,0,0,0.2); 
  min-width: 300px; 
  max-height: 450px; 
  overflow-y: auto; 
  z-index: 1005; 
  display: none; 
}

.dropdown-menu.show { 
  display: block; 
}

.dropdown-menu a { 
  display: flex; 
  align-items: center; 
  gap: 0.8rem; 
  padding: 0.8rem 1rem; 
  color: #333; 
  text-decoration: none; 
  transition: all 0.2s; 
  border-bottom: 1px solid #f0f0f0; 
}

.dropdown-menu a:last-child { 
  border-bottom: none; 
}

.dropdown-menu a:hover { 
  background: #f5f5f5; 
  padding-left: 1.2rem; 
}

.dropdown-menu a span { 
  font-size: 1.2rem; 
  min-width: 1.5rem; 
}

.dropdown-category { 
  padding: 0.8rem 1rem; 
  font-weight: 600; 
  font-size: 0.8rem; 
  color: #666; 
  text-transform: uppercase; 
  background: #f9f9f9; 
  border-bottom: 1px solid #e0e0e0; 
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-buttons { 
    gap: 0.5rem; 
  }
  
  .header-buttons a, .header-buttons button { 
    padding: 0.5rem 0.8rem; 
    font-size: 0.8rem; 
  }
  
  .dropdown-menu { 
    top: 65px; 
    right: 1rem; 
    min-width: 250px; 
  }
}

@media (max-width: 480px) {
  .header-buttons a { 
    display: none; 
  }
  
  .header-buttons a:nth-child(1), .header-buttons a:nth-child(3) { 
    display: block; 
  }
  
  .dropdown-menu { 
    top: 60px; 
    right: 0.5rem; 
    min-width: 220px; 
  }
}

/* Theme Support */
.theme-toggle { 
  background: none; 
  border: none; 
  color: white; 
  cursor: pointer; 
  font-size: 1.2rem; 
}

.sun-icon { 
  display: inline; 
}

.moon-icon { 
  display: none; 
}

[data-theme="dark"] .sun-icon { 
  display: none; 
}

[data-theme="dark"] .moon-icon { 
  display: inline; 
}

/* Body and main content adjustments */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

main {
  margin-top: 0;
  padding: 1.5rem;
}

/* Dark theme support */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
.header-buttons a:focus,
.header-buttons button:focus,
.apps-btn:focus,
.dropdown-menu a:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}