/* Navigation Bar */
.main-navigation {
  background: #c0c0c0;
  border-bottom: 2px solid;
  border-bottom-color: #808080;
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 2px solid #fff;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  flex-shrink: 0;
}

.brand-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  color: #000;
}

.brand-link:visited {
  color: #000;
}

.brand-link:hover {
  color: #000;
}

.brand-name {
  color: #000;
}

/* Menu */
.nav-menu {
  display: flex;
  gap: 0;
}

.menu-item {
  position: relative;
}

.menu-label {
  display: block;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #000;
  cursor: default;
  background: transparent;
  border: 1px solid transparent;
}

.menu-item:hover .menu-label {
  background: #000080;
  color: #fff;
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  min-width: 500px;
  max-width: 550px;
  padding: 3px;
  margin-top: 0;
}

.menu-item:hover .dropdown-menu {
  display: block;
}

/* Dropdown Sections */
.dropdown-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.dropdown-section {
  display: flex;
  flex-direction: column;
}

.dropdown-section:not(:last-child) {
  border-right: 2px solid;
  border-right-color: #808080 #fff;
  padding-right: 2px;
}

.section-header {
  background: #c0c0c0;
  color: #000;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  text-align: left;
  border-bottom: 2px solid;
  border-bottom-color: #808080;
  border-top: 1px solid #fff;
}

.section-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Legacy grid support */
.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

/* Dropdown Items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #000;
  text-decoration: none;
  background: #c0c0c0;
  border: 1px solid transparent;
  position: relative;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #000080;
  color: #fff;
}

.dropdown-item.active {
  font-weight: bold;
}

.dropdown-item.disabled {
  color: #808080;
  cursor: not-allowed;
}

.dropdown-item.disabled:hover {
  background: #c0c0c0;
  color: #808080;
}

.item-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.item-text {
  font-size: 0.85rem;
  white-space: nowrap;
  flex: 1;
}

.item-badge {
  font-size: 0.7rem;
  color: #808080;
  margin-left: auto;
}

.dropdown-item:hover .item-badge {
  color: #fff;
}

/* User Navigation */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #000;
  text-decoration: none;
}

.nav-link:hover {
  background: #000080;
  color: #fff;
}

.nav-button {
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #000;
  text-decoration: none;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
}

.nav-button:hover {
  background: #d0d0d0;
}

.nav-button:active {
  border-color: #808080 #fff #fff #808080;
}

.user-menu-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-tier-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: bold;
}

.user-tier-badge.free {
  background: #808080;
  color: #fff;
}

.user-tier-badge.paid {
  background: #ffd700;
  color: #000;
}

.user-dropdown {
  min-width: 200px;
  max-width: 250px;
  right: 0;
}

.user-dropdown .dropdown-section {
  border-right: none;
  padding-right: 0;
}

.user-info {
  padding: 8px 10px;
  border-bottom: 2px solid;
  border-bottom-color: #808080;
  background: #d0d0d0;
}

.user-email {
  font-size: 0.85rem;
  font-weight: bold;
  color: #000;
  word-break: break-all;
}

.user-tier {
  font-size: 0.75rem;
  color: #444;
  margin-top: 4px;
}

/* Flash Messages */
.flash {
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 2px solid;
  font-size: 0.85rem;
}

.flash.notice {
  background: #90EE90;
  border-color: #228B22;
  color: #006400;
}

.flash.error, .flash.alert {
  background: #FFB6C1;
  border-color: #DC143C;
  color: #8B0000;
}

/* Navigation Responsive */
@media (max-width: 768px) {
  .dropdown-sections {
    grid-template-columns: 1fr;
  }
  
  .dropdown-grid {
    grid-template-columns: 1fr;
  }
  
  .dropdown-menu {
    min-width: 250px;
  }

  .nav-user {
    gap: 4px;
  }

  .nav-link, .nav-button {
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  .user-menu-label {
    font-size: 0.8rem;
  }

  .user-tier-badge {
    display: none;
  }
}
