/* Menu Mobile Simples - CSS */

/* Variáveis */
:root {
    --simple-mobile-height: 70px;
    --simple-mobile-bg: #ffffff;
    --simple-mobile-primary: #f15a22;
    --simple-mobile-text: #333333;
    --simple-mobile-border: #e0e0e0;
    --simple-mobile-overlay: rgba(0, 0, 0, 0.5);
    --simple-mobile-sidebar-width: 280px;
}

/* Header Mobile - SEMPRE VISÍVEL EM TELAS PEQUENAS */
.simple-mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--simple-mobile-height);
    background: var(--simple-mobile-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid var(--simple-mobile-border);
}

/* Mostrar APENAS em telas pequenas */
@media (max-width: 768px) {
    .simple-mobile-header {
        display: flex !important;
    }

    /* Esconder menu desktop */
    .custom-menu-container {
        display: none !important;
    }

    /* Adicionar padding ao body APENAS EM MOBILE */
    body {
        padding-top: var(--simple-mobile-height) !important;
    }
}

/* GARANTIR que desktop nunca tenha padding do menu mobile */
@media (min-width: 769px) {
    body {
        padding-top: 0 !important;
    }
}

/* Logo */
.simple-mobile-logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px; /* Espaçamento entre favicon e texto */
}

/* Favicon no logo mobile */
.logo-favicon-mobile {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Ações do header */
.simple-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.simple-mobile-search,
.simple-mobile-toggle {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--simple-mobile-text);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.simple-mobile-search:hover,
.simple-mobile-toggle:hover {
    background: rgba(241, 90, 34, 0.1);
    color: var(--simple-mobile-primary);
}

/* Sidebar */
.simple-mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--simple-mobile-sidebar-width);
    height: 100vh;
    background: var(--simple-mobile-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1055;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.simple-mobile-sidebar.active {
    left: 0;
}

/* Header da sidebar */
.simple-mobile-sidebar-header {
    height: var(--simple-mobile-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid var(--simple-mobile-border);
    font-weight: 600;
    color: var(--simple-mobile-text);
}

.simple-mobile-close {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--simple-mobile-text);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.simple-mobile-close:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Navegação */
.simple-mobile-nav {
    padding: 0;
}

/* Item do usuário no menu mobile */
.simple-mobile-user-item {
    padding: 0;
}

.simple-mobile-user-link {
    background: linear-gradient(135deg, var(--simple-mobile-primary), #d35400);
    color: white !important;
    padding: 1.2rem 1.5rem !important;
    display: flex;
    align-items: center;
    margin: 0;
    border-bottom: none;
}

.simple-mobile-user-link:hover {
    background: linear-gradient(135deg, #d35400, var(--simple-mobile-primary));
    color: white !important;
    padding-left: 1.5rem !important;
    transform: none;
}

.simple-mobile-user-link i {
    color: white !important;
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 24px;
}

.user-info-mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
    font-weight: 400;
}

.simple-mobile-separator {
    height: 1px;
    background: var(--simple-mobile-border);
    margin: 0;
}

/* Botão de logout no menu mobile */
.simple-mobile-logout-link {
    background: #e74c3c !important;
    color: white !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: none;
    margin: 0;
}

.simple-mobile-logout-link:hover {
    background: #c0392b !important;
    color: white !important;
    padding-left: 2rem !important;
}

.simple-mobile-logout-link i {
    color: white !important;
    font-size: 1rem;
    margin-right: 0.75rem;
    width: 20px;
}

/* Botão de login no menu mobile */
.simple-mobile-login-link {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    color: white !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: none;
    margin: 0;
    text-align: center;
    justify-content: center;
}

.simple-mobile-login-link:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d) !important;
    color: white !important;
    padding-left: 1.5rem !important;
    transform: none;
}

.simple-mobile-login-link i {
    color: white !important;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    width: 24px;
}

.simple-mobile-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--simple-mobile-text);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--simple-mobile-border);
    transition: all 0.2s ease;
}

.simple-mobile-link:hover {
    background: rgba(241, 90, 34, 0.1);
    color: var(--simple-mobile-primary);
    padding-left: 2rem;
}

.simple-mobile-link i {
    width: 20px;
    margin-right: 0.75rem;
    color: var(--simple-mobile-primary);
}

/* Overlay */
.simple-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--simple-mobile-overlay);
    z-index: 1054;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.simple-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevenção de scroll */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .simple-mobile-header {
        height: 60px;
    }

    .simple-mobile-logo {
        font-size: 1.25rem;
        font-weight: 500;
        color: #333333;
    }

    .logo-favicon-mobile {
        width: 20px;
        height: 20px;
    }
}

    .simple-mobile-sidebar {
        width: 85%;
        max-width: 300px;
    }

    body {
        padding-top: 60px !important;
    }
}

/* Desktop - garantir que nada apareça e sem padding */
@media (min-width: 769px) {
    .simple-mobile-header,
    .simple-mobile-sidebar,
    .simple-mobile-overlay {
        display: none !important;
    }

    /* FORÇAR padding zero no desktop com alta especificidade */
    html body {
        padding-top: 0 !important;
    }

    /* Backup com ainda mais especificidade */
    body.desktop,
    body:not(.mobile-menu-open) {
        padding-top: 0 !important;
    }
}