/*
 * Estilos Globais e Layout Principal
 */
html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa; /* Cor de fundo mais clara e neutra */
}

#wrapper {
    display: flex;
    flex: 1; /* Faz o wrapper crescer para preencher o espaço disponível */
}

#page-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-grow: 1;
}

main {
    flex: 1; /* Faz o conteúdo principal crescer */
}

.footer {
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 1rem 0;
    font-size: 0.9rem;
}

/*
 * Sidebar
 */
#sidebar-wrapper {
    width: 250px;
    transition: margin 0.25s ease-out;
    background-color: #ffffff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}

.sidebar-heading {
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.list-group-item {
    border: 0;
    padding: 1rem 1.5rem;
    color: #5a5a5a;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.list-group-item i {
    width: 20px; /* Alinha os ícones */
    text-align: center;
}

.list-group-item.active {
    background-color: #e9ecef;
    color: #0d6efd;
    font-weight: 600;
    border-left: 4px solid #0d6efd;
    padding-left: calc(1.5rem - 4px);
}

.list-group-item:not(.active):hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.upgrade-premium {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/*
 * Navbar Superior
 */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
}

#sidebarToggle {
    border: none;
}

/*
 * Conteúdo Principal e Cards
 */
.card {
    border: none;
    border-radius: 0.25rem; /* 4px */
    box-shadow: 0 4px 6px rgba(0,0,0,.05);
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0,0,0,.06);
}

.text-xs {
    font-size: 0.8rem;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #3a3b45 !important;
}

/*
 * Responsividade
 */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1029; /* Abaixo do sidebar, acima do conteúdo */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

#wrapper.toggled #sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -280px; /* Um pouco mais largo para melhor toque */
        width: 280px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1030;
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        width: 100%;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }

    .sidebar-header .btn-close {
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) {
    #sidebarToggle {
        display: none;
    }
}

/*
 * Estilos para Cropper.js (mantidos para a página de cadastro de criatório)
 */
.img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 65vh;
    background-color: #f7f7f7;
}

#imageToCrop {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* Correção para a máscara do Cropper.js não aparecer */
.cropper-container {
    z-index: 1056 !important; /* Acima do z-index do modal do Bootstrap (1055) */
}

.cropper-view-box {
    opacity: 1 !important;
    visibility: visible !important;
}

/*
 * Sidebar Navigation Scrolling
 */
.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
}

/*
 * Notification System
 */
.notification-unread {
    font-weight: bold;
    background-color: #eaf2ff; /* A light blue background */
}

.notification-unread:hover {
    background-color: #dce8ff; /* A slightly darker blue on hover */
}