/* =========================================================
   HEADER GERAL
   ========================================================= */

.plexo-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}


/* =========================================================
   MOBILE HEADER
   ========================================================= */

.mobile-header-inner {
    height: 68px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.mobile-logo img {
    max-height: 58px;
    width: auto;
    object-fit: contain;
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    display: grid;
    place-content: center;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background: #111;
    border-radius: 999px;
    display: block;
}


/* =========================================================
   MOBILE MENU OVERLAY
   ========================================================= */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .32);
    opacity: 0;
    pointer-events: none;
    transition: .25s ease;
    z-index: 1001;
}

.mobile-side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 84vw);
    height: 100vh;
    background: #fff;
    z-index: 1002;
    transform: translateX(100%);
    transition: .28s ease;
    padding: 28px;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
    overflow-y: auto;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.menu-open .mobile-side-menu {
    transform: translateX(0);
}


/* =========================================================
   MOBILE MENU TOPO / PERFIL
   ========================================================= */

.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 26px;
    border-bottom: 1px solid #e5e7eb;
}

.menu-profile {
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
}

.menu-profile:hover {
    opacity: .88;
    transform: translateY(-1px);
}

.mobile-menu-top .menu-profile {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    border: 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--plexo-orange-soft, #fff3e8);
    color: var(--plexo-orange, #ff6b1a);
    font-size: 24px;
    font-weight: 900;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    min-width: 0;
}

.profile-info strong,
.profile-info span {
    display: block;
}

.profile-info strong {
    color: #1f2933;
    font-family: var(--font-display, inherit);
    font-size: 19px;
    line-height: 1.2;
}

.profile-info span {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 14px;
    word-break: break-word;
}

.mobile-close-btn {
    position: static;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #2f2f2f;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}


/* =========================================================
   MOBILE MENU LINKS
   ========================================================= */

.mobile-side-menu nav {
    display: grid;
}

.mobile-side-menu nav a,
.mobile-logout-form button {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #222;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    font-family: var(--font-ui, inherit);
}

.mobile-side-menu nav a:hover,
.mobile-side-menu nav a.is-active,
.mobile-logout-form button:hover {
    color: var(--plexo-orange, #ff6b1a);
}

.mobile-side-menu nav a svg,
.mobile-logout-form svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.mobile-logout-form {
    margin: 0;
}

.mobile-logout-form button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}


/* =========================================================
   DESKTOP HEADER
   ========================================================= */

.desktop-header {
    display: none;
}

.desktop-header-inner {
    max-width: 1200px;
    margin: 0 auto;

    /* Header mais baixo */
    padding: 0 20px;
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.desktop-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.desktop-logo img {
    height: 72px;
    width: auto;
    display: block;
    object-fit: contain;
}


/* =========================================================
   DESKTOP NAV
   ========================================================= */

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.desktop-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #222;
    font-family: var(--font-ui, inherit);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--plexo-orange, #ff6b1a);
}

.desktop-nav a svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}


/* =========================================================
   DESKTOP USER AREA
   ========================================================= */

.desktop-user {
    display: flex;
    align-items: center;
}

.desktop-user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 17px;
    color: #111;
}

.user-name {
    font-weight: 800;
    font-size: 17px;
    color: #111;
    white-space: nowrap;
}


/* =========================================================
   DESKTOP AVATAR
   ========================================================= */

.avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: #ff6b1a;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: 900;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================================
   DESKTOP DROPDOWN
   ========================================================= */

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 60px;

    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 10px;
    min-width: 180px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.desktop-user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-menu a,
.dropdown-menu .logout-form button {
    display: block;
    width: 100%;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    font: inherit;
    text-align: left;
}

.dropdown-menu a:hover,
.dropdown-menu .logout-form button:hover {
    background: #f5f5f5;
    color: var(--plexo-orange, #ff6b1a);
}

.logout-form {
    margin: 0;
}

.logout-form button {
    border: 0;
    background: transparent;
    cursor: pointer;
}


/* =========================================================
   DESKTOP AUTH BUTTONS
   ========================================================= */

.desktop-auth {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-login {
    padding: 10px 18px;
    border-radius: 10px;
    color: #5b35d5;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}

.btn-login:hover {
    color: var(--plexo-orange, #ff6b1a);
}

.btn-register {
    padding: 12px 22px;
    border-radius: 10px;
    background: #5b35d5;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}

.btn-register:hover {
    background: var(--plexo-orange, #ff6b1a);
    color: #fff;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width: 768px) {
    .mobile-header-inner,
    .mobile-side-menu,
    .mobile-menu-overlay {
        display: none;
    }

    .desktop-header {
        display: block;
        background: #fff;
    }
}

@media (min-width: 900px) {
    .mobile-header-inner {
        max-width: 1180px;
        margin: 0 auto;
    }
}


/* =========================================================
   AJUSTE PARA TELAS MENORES NO DESKTOP
   ========================================================= */

@media (min-width: 768px) and (max-width: 1050px) {
    .desktop-header-inner {
        padding: 0 16px;
    }

    .desktop-logo img {
        height: 66px;
    }

    .desktop-nav {
        gap: 20px;
    }

    .desktop-nav a {
        font-size: 18px;
    }

    .user-name {
        font-size: 15px;
    }

    .avatar {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .btn-login,
    .btn-register {
        font-size: 15px;
    }
}
