/* === Topbar unificada y responsiva === */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #009879, #007a62);
    color: white;
    padding: 0 20px;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1000;
}

body {
  padding-top: 70px; /* siempre igual a la altura de la barra */
}

/* Logo + marca */
.topbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar .brand img {
    height: 50px;
    width: auto;
    display: block;
}
.topbar .brand a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
}

/* Menú */
.topbar .menu {
    display: flex;
    align-items: center;
    gap: 20px;
}
.topbar .menu a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
}
.topbar .menu a:hover {
    background: rgba(255,255,255,0.15);
}

/* Dropdown usuario */
.topbar .user-dropdown {
    position: relative;
}
.topbar .user-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
}
.topbar .user-btn:hover {
    background: rgba(255,255,255,0.15);
}
.topbar .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    color: black;
    min-width: 180px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    border-radius: 6px;
    overflow: hidden;
}
.topbar .dropdown-content a {
    display: block;
    padding: 10px 14px;
    color: black;
    text-decoration: none;
}
.topbar .dropdown-content a:hover {
    background: #f4f4f4;
}
.topbar .user-dropdown:hover .dropdown-content {
    display: block;
}

/* === Responsive === */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
  }
  .topbar .menu {
    flex-basis: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
  }
  .topbar .brand img {
    height: 40px;
  }
}
