:root {
    --primary-color: var(--cor-principal);
    --secondary-color: var(--cor-secundaria);
    --text-color: var(--cor-texto);
    --sidebar-width: 250px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
}

/* Sidebar */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--primary-color);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: var(--cor-secundaria);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.logo-container {
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    object-fit: contain;
    padding: 5px;
    background: #ffffff;
    border-radius: 5px;
}

.sidebar-logo.loaded {
    opacity: 1;
}

#sidebar .sidebar-header h3 {
    margin: 0;
    padding: 0;
    color: var(--text-color-light);
}

/* Estilos para a logo no sidebar */

/* Estilo para a logo no sidebar */
/* Estilo para a logo no sidebar */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 10px 20px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    background: var(--secondary-color);
}

#sidebar ul li.active > a {
    background: var(--secondary-color);
}

#sidebar ul li a i {
    margin-right: 10px;
}

/* Content */
#content {
    flex: 1;
    padding-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

/* Navbar */
.navbar {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

.navbar-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.navbar-title {
    color: var(--cor-texto) !important;
}

.config-page {
    color: var(--cor-terciaria) !important;
}

#sidebarCollapse {
    display: none;
}

/* Títulos */
.navbar-title,
.modal-title,
.card-title {
    color: #333;
}

/* Content Area */
.content-area {
    padding: 20px;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    margin-bottom: 20px;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-body {
    padding: 20px;
    position: relative;
}

.dashboard-card .card-title {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.dashboard-card .card-text {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.dashboard-card i {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.2;
}

/* Produtos */
.produto-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.tamanho-item {
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
    margin-bottom: 10px;
}

.tamanho-item:hover {
    background-color: #e9ecef;
}

.remover-tamanho {
    margin-top: 5px;
}

#tabelaProdutos img {
    transition: transform 0.2s;
    cursor: pointer;
}

#tabelaProdutos img:hover {
    transform: scale(3);
    z-index: 1000;
}

/* Estilo para a tabela de produtos */
.produto-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.tamanhos {
    font-weight: bold;
    color: #333;
}

.estoques {
    color: #666;
    font-size: 0.9em;
}

/* Espaçamento entre botões de ação */
.btn + .btn {
    margin-left: 5px;
}

.btn-group {
    display: flex;
    gap: 5px;
}

/* Botões */
.btn {
    font-weight: normal !important;
}

.btn i {
    margin-right: 5px;
}

/* Sobrescrevendo classes do Bootstrap */
.fw-bold {
    font-weight: normal !important;
}

/* DataTables Customization */
#tabelaCategorias_wrapper .dataTables_length,
#tabelaCategorias_wrapper .dataTables_filter,
#tabelaCategorias_wrapper .dataTables_info,
#tabelaCategorias_wrapper .dataTables_paginate {
    padding: 8px 0;
    text-align: left;
}

#tabelaCategorias_wrapper .dataTables_filter {
    display: flex;
    flex-direction: column;
}

#tabelaCategorias_wrapper .dataTables_filter label {
    width: 100%;
    text-align: left;
}

#tabelaCategorias_wrapper .dataTables_filter input {
    width: 60%;
    margin-left: 10px !important;
    margin-top: 4px;
}

#tabelaCategorias_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-start;
}

/* Estilos do Modal de Impressão */
#modalImpressao .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

#modalImpressao .modal-title {
    width: 100%;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#modalImpressao .modal-footer {
    border-top: none;
    padding-top: 0;
    gap: 1rem;
}

#modalImpressao .btn {
    min-width: 120px;
}

/* Sidebar Footer e Botão Sair */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
    padding: 0;
}

.btn-sair {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s;
    background: var(--secondary-color);
    width: 100%;
    font-weight: 500;
    border-radius: 0;
}

.btn-sair:hover {
    background: var(--cor-texto);
    color: #ffffff !important;
    text-decoration: none;
}

.btn-sair i {
    margin-right: 10px;
    font-size: 1.1em;
}

/* Garantir que o botão sair sempre apareça */
#sidebar .menu-container {
    flex: 1;
    overflow-y: auto;
}

#sidebar .components {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin-left: 0;
    }
    #content.active {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
}
