:root {
    --sidebar-color: #4A8F43; /* Valor padrão, será substituído pelo PHP */
}

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

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-color);
    min-height: 100vh;
    padding-top: 20px;
    position: fixed;
    width: inherit;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
}

.logo-container {
    padding: 0 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 150;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-buttons {
    display: flex;
    align-items: center;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    background-color: var(--sidebar-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hamburger-menu:focus {
    outline: none;
}

/* Main Content */
.main-content {
    margin-left: 16.666667%;
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
}

/* Top Bar */
.top-bar {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.btn-orange {
    background-color: #9FD099;
    color: white;
}

.btn-outline-orange {
    border-color: #9FD099;
    color: #9FD099;
}

.btn-outline-orange:hover {
    background-color: #9FD099;
    color: white;
}

.user-avatar {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-weight: bold;
}

/* Cards */
.summary-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

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

.chart-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.chart-card .card-body {
    height: 300px;
}

.chart-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
}

/* Chart Legend */
.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 5px;
}

/* Content Header */
.content-header {
    margin: 20px 0;
}

/* Summary Icons */
.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bg-success-light {
    background-color: rgba(40, 167, 69, 0.1);
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}

.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-orange {
    background-color: #25D366;
    color: white;
}

/* Table Styles */
.table th {
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Modal Styles */
.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Empty State Styles */
.empty-state-container {
    padding: 30px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    color: #9FD099;
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Mobile Header */
    .mobile-header {
        display: flex;
    }
    
    /* Sidebar */
    .sidebar {
        position: fixed;
        min-height: 100vh;
        width: 250px;
        transform: translateX(-100%);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        top: 60px; /* Deixa espaço para o header mobile */
        z-index: 140;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Main Content */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 80px; /* Espaço para o header mobile */
    }
    
    /* Hamburger Menu */
    .hamburger-menu {
        display: block;
    }
    
    /* Ajuste para cards em telas pequenas */
    .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        margin-bottom: 15px;
    }
    
    /* Ajuste para gráficos em telas pequenas */
    .chart-card .card-body {
        height: 250px;
    }
    
    /* Ajuste para tabela responsiva */
    .table-responsive {
        overflow-x: auto;
    }
    
    /* Ajuste para o topo da página */
    .top-bar .row {
        flex-direction: column;
    }
    
    .top-bar .col-md-4 {
        display: none; /* Esconde os botões duplicados em dispositivos móveis */
    }
    
    /* Ajuste para o resumo financeiro em dispositivos móveis */
    .card .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card .d-flex.justify-content-between.align-items-center .btn-group {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    
    .card .d-flex.justify-content-between.align-items-center .btn-group .btn {
        flex: 1;
        margin: 0 2px;
        padding: 6px 0;
        font-size: 12px;
    }
    
    /* Overlay para quando o menu estiver aberto */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}
