/* -------------------------------------------------- */
/* BASE / FONTES                                       */
/* -------------------------------------------------- */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f6fa;
}



/* -------------------------------------------------- */
/* BOTÕES                                              */
/* -------------------------------------------------- */

.btn-greensales {
    background-color: #082A3D !important;
    border-color: #082A3D !important;
    color: #fff !important;
}

.btn-greensales:hover {
    background-color: #0a3a54 !important;
    border-color: #0a3a54 !important;
}

/* Centralizar ícones nos botões de exportar e reduzir altura */
.btn-outline-success.btn-sm,
.btn-outline-danger.btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    height: 32px;
    min-height: 32px;
}

.btn-outline-success.btn-sm i,
.btn-outline-danger.btn-sm i {
    margin: 0;
    line-height: 1;
}

/* Reduzir altura do botão Nova Equipa/Novo Utilizador */
.btn-greensales {
    height: 32px;
    min-height: 32px;
    padding: 0.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* -------------------------------------------------- */
/* SIDEBAR — DESKTOP                                   */
/* -------------------------------------------------- */

#sidebar {
    width: 260px;
    background: #082A3D;
    color: white;
    min-height: calc(100vh - 72px); /* header tem ~72px */
    transition: transform .25s ease-out;
}

#sidebar .nav-link {
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 4px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    font-weight: 600;
}



/* -------------------------------------------------- */
/* SIDEBAR — MOBILE                                    */
/* -------------------------------------------------- */

@media(max-width: 992px) {

    /* Sidebar fica escondida */
    #sidebar {
        position: fixed;
        top: 0px;
        left: 0;
        width: 260px;
        height: calc(100vh - 32px);
        transform: translateX(-260px);
        z-index: 9999;
    }

    /* Sidebar aberta */
    #sidebar.active {
        transform: translateX(0);
    }

    /* Overlay ativo */
    #sidebar-overlay.active {
        display: block;
    }
}



/* -------------------------------------------------- */
/* OVERLAY PARA MOBILE                                 */
/* -------------------------------------------------- */

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
}



/* -------------------------------------------------- */
/* HEADER                                              */
/* -------------------------------------------------- */

header {
    background: white;
    border-bottom: 1px solid #dee2e6;
}



/* -------------------------------------------------- */
/* CONTENT                                              */
/* -------------------------------------------------- */

#content {
    flex-grow: 1;
    min-height: calc(100vh - 32px);
    background: #fff;
    overflow-x: hidden;
    padding: 20px;
    padding-bottom: 50px !important;
}



/* -------------------------------------------------- */
/* FOOTER                                              */
/* -------------------------------------------------- */

footer {
    background: white;
}

/* HEADER FIXO */
#app-header {
    height: 50px;
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 2000;
}

/* FOOTER FIXO */
#app-footer {
    height: 40px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    text-align: center;
    line-height: 40px;
    z-index: 2000;
}

/* WRAPPER ENTRE HEADER E FOOTER */
#app-wrapper {
    position: relative;
    top: 0px;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    overflow: hidden;
}

/* SIDEBAR FIXA */
#sidebar {
    width: 260px;
    background: #082A3D;
    overflow-y: auto;
    padding-top: 20px;
}

/* CONTENT SCROLLA NO MEIO */
#content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    padding: 20px;
    padding-bottom: 50px !important; /* Mais espaço para o footer - evita sobreposição com última linha */
}
