/* ── Menu fixo ──────────────────────────────────────────────── */
.menu-fixo {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: #1a1a2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    height: 72px;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14.5px;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(0,0,0,.4);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ── Lado esquerdo ─────────────────────────────────────────── */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Logo ──────────────────────────────────────────────────── */
.imagemlogo {
    height: 46px;
    width: auto;
    display: block;
    transition: opacity .2s;
}
.imagemlogo:hover { opacity: .85; }

/* ── Nav links (desktop: barra horizontal antiga) ──────────── */
.menu-links {
    display: flex;
    gap: 2px;
    align-items: center;
}

.menu-links > a {
    position: relative;
    color: rgba(255,255,255,.72);
    text-decoration: none;
    padding: 8px 13px;
    border-radius: 7px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .18s, background .18s;
}

.menu-links > a::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 13px; right: 13px;
    height: 2px;
    background: #ff9800;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform .2s ease;
}

.menu-links > a:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
}

.menu-links > a:hover::after { transform: scaleX(1); }

/* ── Botões Entrar / Cadastrar ─────────────────────────────── */
.btn-login {
    color: #ff9800 !important;
    border: 1.5px solid rgba(255,152,0,.6) !important;
    border-radius: 7px !important;
    font-weight: 600 !important;
    transition: background .18s, border-color .18s !important;
}
.btn-login::after { display: none !important; }
.btn-login:hover {
    background: rgba(255,152,0,.15) !important;
    border-color: #ff9800 !important;
    color: #ff9800 !important;
}

.btn-cadastro {
    background: #ff9800 !important;
    color: #fff !important;
    border-radius: 7px !important;
    font-weight: 700 !important;
    margin-left: 4px;
    transition: background .18s, transform .15s !important;
}
.btn-cadastro::after { display: none !important; }
.btn-cadastro:hover {
    background: #e65100 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ── Badge de papel ────────────────────────────────────────── */
.role-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    vertical-align: middle;
}
.role-admin        { background: #c62828; color: #fff; }
.role-proprietario { background: #1565c0; color: #fff; }
.role-cliente      { background: #2e7d32; color: #fff; }

/* ── Wrapper do dropdown ───────────────────────────────────── */
.menu-hover { position: relative; }

.profile-container {
    display: block;
    position: relative;
    cursor: pointer;
}

/* ── Botão de perfil ───────────────────────────────────────── */
.profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 8px;
    color: rgba(255,255,255,.88);
    font-weight: 600;
    font-size: 14px;
    transition: background .18s;
    user-select: none;
}

.profile-button:hover,
.profile-container.aberto .profile-button {
    background: rgba(255,255,255,.1);
}

.profile-button > span:not(.role-badge) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-badge { flex-shrink: 0; }

.profile-avatar {
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.2);
    object-fit: cover;
    background: #e0e0e0;
}

.profile-avatar-custom {
    border: 2px solid rgba(255,255,255,.55);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.profile-chevron {
    width: 16px; height: 16px;
    margin-left: 2px;
    opacity: .6;
    transition: transform .22s ease;
    flex-shrink: 0;
}

.profile-container.aberto .profile-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* ── Dropdown ──────────────────────────────────────────────── */
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    min-width: 210px;
    border-radius: 12px;
    box-shadow: 0 10px 36px rgba(0,0,0,.22);
    overflow: hidden;
    z-index: 2000;
}

.profile-container.aberto .profile-dropdown {
    display: block;
    animation: dropdownIn .18s ease forwards;
}

/* Cabeçalho do dropdown */
.dropdown-nome {
    background: linear-gradient(135deg, #1a1a2e 0%, #2c2c54 100%);
    color: #fff !important;
    padding: 14px 18px 12px;
    font-size: 13.5px;
}
.dropdown-nome strong { color: #ff9800; display: block; font-size: 14.5px; margin-bottom: 1px; }
.dropdown-nome small  { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 400; }

/* Itens */
.profile-dropdown .dd-item {
    padding: 0;
    border-bottom: 1px solid #f3f3f3;
}
.profile-dropdown .dd-item:last-child { border-bottom: none; }

.profile-dropdown .dd-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: #333 !important;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background .14s, color .14s, padding-left .14s;
    background: none !important;
}

.profile-dropdown .dd-item a:hover {
    background: #f7f7f7 !important;
    color: #ff9800 !important;
    padding-left: 22px;
}

.dd-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    opacity: .75;
}

/* Sair */
.dd-sair a {
    color: #c62828 !important;
    font-weight: 600 !important;
}
.dd-sair a:hover {
    background: #fff5f5 !important;
    color: #c62828 !important;
}

/* ── Botão sidebar (hamburger lateral) ─────────────────────── */
.topbar-sidebar-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 7px;
    transition: background .18s;
    flex-shrink: 0;
}
.topbar-sidebar-btn:hover { background: rgba(255,255,255,.1); }
.topbar-sidebar-btn span {
    display: block;
    width: 20px; height: 2px;
    background: rgba(255,255,255,.8);
    border-radius: 2px;
    transition: transform .28s, opacity .28s, width .28s;
}
.topbar-sidebar-btn.ativo span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar-sidebar-btn.ativo span:nth-child(2) { opacity: 0; width: 0; }
.topbar-sidebar-btn.ativo span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hamburger (ícone de navegação — só mobile/tablet) ─────── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px;
    border-radius: 7px;
    transition: background .18s;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.hamburger:hover { background: rgba(255,255,255,.08); }

.hamburger span {
    display: block;
    width: 24px; height: 2.5px;
    background: rgba(255,255,255,.85);
    border-radius: 3px;
    transition: transform .28s, opacity .28s;
}

.hamburger.ativo span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.ativo span:nth-child(2) { opacity: 0; }
.hamburger.ativo span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── Mobile / tablet: nav em modo dropdown (hamburger) ─────── */
@media (max-width: 1024px) {
    .topbar-left {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .hamburger { display: flex; }

    .menu-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: #12122a;
        position: absolute;
        top: 72px; left: 0;
        padding: 10px 16px 18px;
        gap: 2px;
        box-shadow: 0 10px 24px rgba(0,0,0,.35);
        border-top: 1px solid rgba(255,255,255,.06);
    }

    .menu-links.aberto { display: flex; }

    .menu-links > a { padding: 10px 14px; }
    .menu-links > a::after { display: none; }

    .menu-hover { width: 100%; }

    .profile-container  { width: 100%; }
    .profile-button     { width: 100%; justify-content: space-between; }

    .profile-dropdown {
        position: static;
        box-shadow: none;
        border-radius: 8px;
        margin-top: 4px;
        animation: none !important;
    }
}

/* ── Utilitário ────────────────────────────────────────────── */
.dot-bg {
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
}
