/* ===== VARIÁVEIS DE CORES ===== */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a0ca3;
    --primary-light: #4cc9f0;
    --secondary-color: #7209b7;
    --accent-color: #f72585;
    --success-color: #4bb543;
    --warning-color: #ff9e00;
    --error-color: #ff6b6b;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== ESTILOS GLOBAIS ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* ===== SIDEBAR COM GRADIENTE DO LOGIN ===== */
/*
.main-sidebar {
    background: linear-gradient(180deg, var(--primary-dark), var(--secondary-color)) !important;
    border: none;
}

.brand-link {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-link .brand-icon {
    font-size: 1.8rem;
    color: white;
}

.brand-link .brand-text {
    color: white;
    font-weight: 600;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    margin: 5px 10px;
    transition: var(--transition);
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.user-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-panel .info a {
    color: white;
    font-weight: 600;
}

.user-panel .info small {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar .nav-sidebar .nav-link p {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar .nav-sidebar .nav-link i {
    color: rgba(255, 255, 255, 0.8);
}
*/

/* ===== NAVBAR MODERNA ===== */
.navbar-white {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
}

.navbar-white .nav-link {
    color: var(--dark-color) !important;
}

.user-menu .user-avatar {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-menu .dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: none;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.content-wrapper {
    background: #f8f9fa;
}

.content-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.content-header h1 {
    color: var(--dark-color);
    font-weight: 700;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

/* ===== CARDS MODERNOS ===== */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 20px;
}

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

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-header .card-title {
    color: var(--dark-color);
    font-weight: 600;
}

/* ===== CARDS DE ESTATÍSTICAS ===== */
.small-box {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: none;
    overflow: hidden;
}

.small-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.small-box .icon {
    font-size: 2.5rem;
    opacity: 0.3;
    transition: var(--transition);
}

.small-box:hover .icon {
    opacity: 0.5;
    transform: scale(1.1);
}

/* ===== TABELAS MODERNAS ===== */
/*
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody td {
    padding: 12px 15px;
    border-color: #f8f9fa;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}
*/

/* ===== BADGES MODERNOS ===== */
.badge {
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ===== FOOTER ===== */
.main-footer {
    background: white !important;
    border-top: 1px solid #e9ecef;
    color: var(--dark-color);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .main-sidebar {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .small-box .inner h3 {
        font-size: 1.8rem;
    }
    
    .small-box .icon {
        font-size: 2rem;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* ===== SISTEMA DE NOTIFICAÇÕES ===== */
.notificacoes-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 350px;
    max-width: 500px;
}

.notificacoes-top-right {
    position: relative;
}

.notificacao {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.notificacao:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.notificacao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.notificacao-titulo {
    flex-grow: 1;
    margin: 0;
    font-size: 0.95rem;
}

.notificacao-mensagem {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Animações */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notificacao.fade:not(.show) {
    animation: slideOutRight 0.3s ease-in;
}

/* Responsividade */
@media (max-width: 768px) {
    .notificacoes-container {
        top: 60px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .notificacao {
        margin-bottom: 10px;
    }
}

/* Inicio - Configuraçoes mais utilizadas na tela de Configurações */
.config-category {
    margin-bottom: 2rem;
}
.config-card {
    border-left: 4px solid #007bff;
}
.config-card.security {
    border-left-color: #28a745;
}
.config-card.email {
    border-left-color: #6f42c1;
}
.config-card.times {
    border-left-color: #fd7e14;
}
.param-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}
.param-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.param-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 5px;
}
.param-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 5px;
}
.param-allowed {
    color: #28a745;
    font-size: 0.8rem;
    font-weight: 500;
}
.form-control:read-only {
    background-color: #e9ecef;
    opacity: 1;
}
.tab-pane {
    padding: 20px 0;
}
.save-btn {
    min-width: 120px;
}
.reset-btn {
    min-width: 100px;
}
.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.value-badge {
    font-size: 0.8rem;
    margin-left: 10px;
}

/* Tornar o container de alerta fixo */
#alertContainer {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
}

/* Estilo para os alertas */
#alertContainer .alert {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    border: none;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* Fim - Configuraçoes mais utilizadas na tela de Configurações */

/* INICIO - Estilos para a tela de estoque atualizada */
.info-box .progress {
    height: 5px;
    background: rgba(0,0,0,0.1);
}

.info-box .progress-bar {
    background: rgba(255,255,255,0.7);
}

.progress-description {
    font-size: 0.8rem;
    margin-top: 5px;
}

.table td small.text-muted {
    font-size: 0.75rem;
}

/* Estilo para as barras de progresso na tabela */
.progress.progress-sm {
    height: 6px;
    margin-top: 5px;
}

/* Destaque para linhas com estoque baixo */
.table tbody tr[style*="background-color: #fff5f5"]:hover {
    background-color: #ffe6e6 !important;
}
/* FIM - Estilos para a tela de estoque atualizada */

/* Estilos para a tela de estoque atualizada */
.auto-refresh-container {
    position: relative;
}

.auto-refresh-container .progress {
    margin-bottom: 2px;
}

.auto-refresh-container small {
    font-size: 0.7rem;
}

/* Cursor pointer para ordenação */
.table th[style*="cursor: pointer"]:hover {
    background-color: #e9ecef;
}

/* Destaque para coluna ordenada */
.table th[style*="cursor: pointer"] {
    user-select: none;
    -webkit-user-select: none;
}

/* Estilo para estoque zerado */
.table tbody tr[style*="background-color: #f8f9fa"] {
    opacity: 0.7;
}

.table tbody tr[style*="background-color: #f8f9fa"]:hover {
    opacity: 1;
    background-color: #e9ecef !important;
}

/* Ajustes de layout responsivo */
@media (max-width: 768px) {
    .card-body .row .col-md-3 {
        margin-bottom: 10px;
    }
    
    .auto-refresh-container {
        margin-top: 10px;
    }
}

/* Melhorias na tabela */
.table td small.text-muted {
    font-size: 0.7rem;
}

.progress.progress-sm {
    height: 6px;
    margin-top: 5px;
}

.table-estoque thead th:hover {
    cursor: pointer;
    background-color: #7c9195 !important;
}

/* Estilos para a tela de pedidos */
.sort-active {
    background-color: #3b9dff !important
}

.table th[style*="cursor: pointer"]:hover {
    background-color: #dee2e6 !important;
}

.badge-success {
    background-color: #28a745 !important;
}

.badge-danger {
    background-color: #dc3545 !important;
}

.badge-info {
    background-color: #17a2b8 !important;
}

/* Ajustes para a tabela de pedidos */
.table td code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
}

/* Melhorias na paginação */
.input-group.input-group-sm {
    width: 120px !important;
}

.btn-group .form-control-sm {
    width: 80px !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table td, .table th {
        padding: 8px !important;
    }
    
    .input-group.input-group-sm {
        width: 100px !important;
    }
}

/* Estilos para busca automática */
.auto-search-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: fadeIn 0.5s ease-out;
}

.auto-search-notice i {
    margin-right: 8px;
}

/* Animação para entrada suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Destaque para o status selecionado automaticamente */
#filtroStatus option[value="Aprovado"] {
    font-weight: bold;
    color: #28a745;
}

/* Garantir que os itens do menu tenham o display correto quando visíveis */
.nav-sidebar .nav-item {
    width: 100%;
}

/* Quando um item do menu estiver visível */
.nav-sidebar .nav-item[style*="display: block"] {
    display: block !important;
}

.nav-sidebar .nav-item[style*="display: flex"] {
    display: flex !important;
}


/* Estilos para o carrossel de imagens */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev-btn {
    left: 10px;
}

.carousel-btn.next-btn {
    right: 10px;
}

.thumbnail-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #007bff;
}

.thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}


/* Rodapé do sidebar para exibir a versão */
.sidebar-footer {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    font-size: 0.7rem;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin: 0 10px;
}

/* Ajuste para o sidebar ter position relative para o footer absoluto */
.main-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
}

.sidebar {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 50px; /* Espaço para o footer */
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}