.app {
  min-height: 100vh;
}

.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    gap: 0;
  }
}

.nav-title {
  font-size: 1.25rem;
  font-weight: bold;
}

.nav-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-account-label {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 700;
}

.nav-account-select {
  width: auto;
  min-width: 180px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
}

.nav-account-select option {
  color: #111;
}

.nav-user-switcher {
  position: relative;
}

.nav-user-switch-btn {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  outline: none;
  transition: background-color 0.2s;
}

.nav-user-switch-btn:hover {
  background: rgba(255,255,255,0.15);
}

.nav-user-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
  max-width: 300px;
  z-index: 1000;
  overflow: hidden;
}

.popover-header {
  padding: 12px 16px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.popover-list {
  max-height: 300px;
  overflow-y: auto;
}

.popover-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.popover-item:hover {
  background: #f5f5f5;
}

.popover-item.active {
  background: #e3f2fd;
}

.popover-item:last-child {
  border-bottom: none;
}

.popover-item-name {
  font-weight: 500;
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.popover-item-meta {
  font-size: 12px;
  color: #666;
}

@media (min-width: 768px) {
  .nav-title {
    font-size: 1.5rem;
  }
  .nav-left {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .nav-links {
    width: auto;
    gap: 2rem;
  }
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-size: 0.9rem;
  display: block;
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .nav-links a {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
}

.nav-links a:hover {
  background-color: #34495e;
}

.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: default;
  font-size: 0.9rem;
  display: inline-block;
}
@media (min-width: 768px) {
  .nav-dropdown-trigger { font-size: 1rem; }
}
.nav-dropdown:hover .nav-dropdown-trigger {
  background-color: #34495e;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
  min-width: 140px;
  background: #2c3e50;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 0.25rem 0;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background-color: #34495e;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user-name {
  font-size: 0.9rem;
  opacity: 0.9;
}

.nav-logout {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.nav-logout:hover {
  background: rgba(255, 255, 255, 0.14);
}

.main-content {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  .main-content {
    margin: 2rem auto;
    padding: 0 2rem;
  }
}
