/* Universal Navigation CSS for All Admin Pages */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Root Variables */
:root {
  --text: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --bg: #f9fafb;
  --line: #e5e7eb;
  --green: #059669;
  --amber: #d97706;
  --red: #dc2626;
  --blue: #2563eb;
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Universal Navigation */
.admin-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.brand-desc {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.nav-menu::-webkit-scrollbar {
  height: 4px;
}

.nav-menu::-webkit-scrollbar-track {
  background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 2px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-link:hover {
  color: #111827;
  background: #f9fafb;
}

.nav-link.active {
  color: #111827;
  background: #f3f4f6;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: #111827;
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-btn:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}

.btn-icon {
  font-size: 16px;
}

.btn-text {
  font-size: 14px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-user:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.user-role {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.user-menu-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 99999;
  position: relative;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: #6b7280;
  border-radius: 1px;
  transition: all 0.2s;
}

.mobile-menu-btn:hover span {
  background: #111827;
}

/* Adjust body padding for fixed nav */
body {
  padding-top: 72px !important;
}

/* Responsive Navigation */
@media (max-width: 1200px) {
  .nav-container {
    padding: 0 20px;
  }
  
  .nav-menu {
    gap: 2px;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 0;
    padding: 12px 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
    overflow-y: auto;
    max-height: calc(100vh - 73px);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
  }
  
  .nav-link.active::after {
    display: none;
  }
  
  .nav-link.active {
    background: #f9fafb;
    border-left: 3px solid #111827;
  }
  
  .btn-text {
    display: none;
  }
  
  .user-info {
    display: none;
  }
  
  .nav-container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .brand-desc {
    display: none;
  }
  
  .nav-actions {
    gap: 12px;
  }
  
  .nav-btn {
    padding: 8px 12px;
  }
  
  .nav-user {
    padding: 8px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* Focus states for accessibility */
.nav-link:focus,
.nav-btn:focus,
.mobile-menu-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .admin-nav {
    display: none;
  }
  
  body {
    padding-top: 0 !important;
  }
}
