/* Layout principal */
body {
    padding-top: 56px; /* Altura da navbar */
}

/* Navbar fixa */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px; /* Mesma altura do padding-top do body */
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto; /* Permite rolagem se o conteúdo for maior que a altura */
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link:hover {
    color: #0d6efd;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Ajuste do conteúdo principal */
main {
    margin-left: 16.66667%; /* col-md-2 = 2/12 * 100 */
}

/* Cards módulo emendas lado a lado */
.emendas-cards-row {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    margin: 0 -0.5rem;
}

.emendas-card {
    flex: 1;
    padding: 0 0.5rem;
    min-width: 0; /* Evita overflow em telas pequenas */
}

.emendas-card .card {
    height: 100%;
    margin-bottom: 0;
}

/* Responsividade */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    main {
        margin-left: 0;
    }

    .emendas-cards-row {
        flex-direction: column;
        gap: 1rem;
    }

    .emendas-card {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Custom color scheme overrides */
body {
    background-color: #e6f2e6 !important; /* very light green */
    padding-top: 70px !important; /* increase padding to avoid overlap with fixed navbar */
}

.navbar.bg-primary {
    background-color: #004d00 !important; /* dark green */
}

.btn-primary {
    background-color: #004d00 !important;
    border-color: #004d00 !important;
}

.btn-primary,
.btn-primary:focus,
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary:disabled {
    background-color: #004d00 !important;
    border-color: #004d00 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #003300 !important;
    border-color: #003300 !important;
}

.btn-outline-primary {
    color: #004d00 !important;
    border-color: #004d00 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #004d00 !important;
    color: #fff !important;
    border-color: #004d00 !important;
}

/* Override Bootstrap card background colors */
.bg-primary {
    background-color: #004d00 !important; /* dark green */
}

.bg-success {
    background-color: #006600 !important; /* medium dark green */
}

.bg-warning {
    background-color: #99cc99 !important; /* light green */
    color: #004d00 !important;
}

.bg-info {
    background-color: #66b266 !important; /* medium light green */
    color: #004d00 !important;
}
