.root {
    --primary-color: #156322;
    accent-color: #156322;
    color-scheme: light;
}

body { background-color: #f0f2f5; }
.stats-card { border: none; border-radius: 10px; transition: transform 0.2s; cursor: pointer; }
.stats-card:hover { transform: translateY(-5px); }
.table-container { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }

.nav-pills .nav-link.active { background-color: #156322 !important; }
.nav-link { color: #333; transition: color 0.2s; }
.nav-link:hover { color: #156322; }

.view-section { display: none; }
.view-section.active { display: block; }
.nav-link i { margin-right: 10px; }

.offcanvas, .offcanvas-lg { width: 280px !important; border-right: 1px solid #dee2e6; }
#login-container { max-width: 400px; margin: 100px auto; }
#main-content { display: none; }

/* Layout principal compatível com Navbar Fixa */
.main-content { padding-top: 70px; padding-bottom: 40px; }

@media (min-width: 992px) {
    .offcanvas-lg { 
        position: fixed;
        top: 56px; 
        left: 0; 
        overflow-y: auto;
        height: calc(100vh - 56px); 
        visibility: visible !important;
        transform: none !important;
        display: flex;
        flex-direction: column;
        z-index: 1020;
    }
    .main-content { margin-left: 280px; padding-top: 80px; }
    .navbar-toggler { display: none; }
}

.navbar-logo { max-height: 50px; margin-right: 12px; border-radius: 5px; margin-top: -5px; margin-bottom: -5px; filter: drop-shadow(0px 0px 1px rgb(255, 255, 255));}
.bg-primary { background-color: #156322 !important; }

.btn-primary { 
    background-color: #156322 !important; 
    border-color: #156322 !important; 
}
.btn-primary:hover { background-color: #114d1a !important; border-color: #114d1a !important; }
.btn-outline-primary {
    color: #156322 !important;
    border-color: #156322 !important;
}
.btn-outline-primary:hover { background-color: #156322 !important; color: white !important; }

/* Otimizações para dispositivos móveis e WebView */
@media (max-width: 768px) {
    #login-container { margin: 40px auto; padding: 20px; }
    
    .navbar-logo { max-height: 40px; }
    
    .table-container {
        padding: 15px 10px;
        background-color: transparent;
        box-shadow: none;
    }

    /* Transforma tabelas com a classe .table-mobile-responsive em lista de cards */
    .table-mobile-responsive thead { display: none; }
    .table-mobile-responsive tbody tr {
        display: block;
        background: white;
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border: 1px solid #eee;
    }
    .table-mobile-responsive tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        font-size: 0.875rem;
        border: none;
        border-bottom: 1px solid #f8f9fa;
    }
    .table-mobile-responsive tbody td:last-child { border-bottom: none; }
    .table-mobile-responsive tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        text-align: left;
        color: #156322;
        margin-right: 15px;
    }

    /* Garante que botões de ação em grupo não quebrem linha */
    .table-mobile-responsive tbody td .btn { margin-left: 4px; }
    .table-mobile-responsive tbody td:last-child { justify-content: flex-end; }
}