:root {
    --primary-color: #228B22;
    --secondary-color: #32CD32;
    --light-color: #ffffff;
    --dark-color: #333333;
    --hover-color: #2E8B57;
    --border-color: #ddd;
}

body {
    background-color: var(--light-color);
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    display: flex;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar {
    background: var(--primary-color);
    min-height: 100vh;
    padding: 20px;
    color: var(--light-color);
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transition: background-color 0.3s;
}

.sidebar img,
.sidebar h4,
.sidebar .nav-link,
.sidebar .nav-link i {
    color: var(--light-color);
    transition: color 0.3s;
}

.dashboard-filter-form {
    max-width: 600px;
    width: 100%;
}

.dashboard-filter-form select {
    max-width: 300px;
    min-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link.nav-anim {
    display: flex;
    align-items: center;
    transition: background-color 0.3s, transform 0.2s;
}

.nav-link.nav-anim:hover {
    background-color: var(--hover-color);
    color: var(--light-color);
    transform: translateX(3px);
}

.nav-link.nav-anim i.icon-anim {
    transition: transform 0.3s ease-in-out;
}

.nav-link.nav-anim:hover i.icon-anim {
    transform: rotate(-5deg) scale(1.1);
}

body.login-page {
    background-image: url('bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

.sidebar.enhanced-sidebar {
    max-height: 100vh;       /* Altura máxima igual à altura da tela */
    overflow-y: auto;        /* Adiciona scroll vertical se necessário */
    scrollbar-width: thin;   /* Firefox */
}

.sidebar.enhanced-sidebar::-webkit-scrollbar {
    width: 8px;
  }
  
  .sidebar.enhanced-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);  /* cor da barra */
    border-radius: 10px;
  }
  
  .sidebar.enhanced-sidebar::-webkit-scrollbar-track {
    background-color: transparent;
  }

.background-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.452);
    z-index: 0;
}


.login-container {
    position: relative;
    z-index: 1;
}

.sidebar-btn {
    background-color: #27693b; /* Cor do botão */
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    color: white;
    transition: background-color 0.3s, transform 0.2s;
}

.sidebar-btn:hover {
    background-color: #1abc9c;
    transform: scale(1.02);
    text-decoration: none;
}

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

.sidebar h3 {
    color: var(--light-color);
    font-weight: bold;
    margin-top: 10px;
}

.sidebar .nav-link {
    transition: all 0.2s ease-in-out;
    border-radius: 0.5rem;
    padding: 8px 12px;
    color: var(--light-color);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--secondary-color);
    color: var(--light-color);
}

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

.sidebar .nav-link i,
.sidebar .nav-link .bi-chevron-down,
.sidebar .nav-link .bi-chevron-up {
    color: var(--light-color);
}

.navbar {
    position: fixed;
    top: 0;
    left: 250px;
    width: calc(100% - 250px);
    z-index: 1000;
    background: var(--light-color);
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

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

.main-content {
    margin-left: 250px;
    margin-top: 80px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - 250px);
}

.row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.stat-card {
    background: var(--light-color);
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    width: 100%;
    transition: 0.3s;
    color: var(--dark-color);
}

.stat-card:hover {
    transform: scale(1.05);
}

.table-custom {
    width: 100%;
    max-width: 1200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: var(--light-color);
    border: 1px solid var(--border-color);
    padding: 15px;
}

.dataTable thead {
    background: #2e7d32;
    color: #ffffff !important;
    border: none;
}

.dataTable thead th {
    background: #2e7d32 !important;
    color: #ffffff !important;
    border: none;
}

.buttonEdit  {
    background-color: #1e7e34; /* azul claro */
    color: white;
}

.dataTable {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #f4faf4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dataTable th, 
.dataTable td {
    padding: 12px 16px;
    border: none;
    vertical-align: middle;
    font-size: 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(34, 139, 34, 0.05);
    transition: background-color 0.2s ease;
}

.dataTable tbody tr {
    background-color: #e8f5e9;
}


.dataTable tbody tr:hover {
    background-color: var(--hover-row-color);
    border-left: 4px solid var(--hover-border-color);
}

td.dt-nowrap {
    white-space: normal !important;
    word-wrap: break-word;
    max-width: 250px;
}

.item-select {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-container--default .select2-selection--single {
    height: 38px;
    padding: 5px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--light-color);
    color: var(--dark-color);
}

.select2-dropdown {
    font-size: 14px;
    background: var(--light-color);
    color: var(--dark-color);
}

.select2-container .select2-selection--single .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dark-color);
}

.select2-results__option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--dark-color);
}

.logo-sidebar {   
    max-width: 140px;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 5px;
}

.sub-menu {
    display: none;
    padding-left: 20px;
}

.sub-menu.show {
    display: block;
}

.toggle-menu {
    cursor: pointer;
    font-weight: bold;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    padding: 10px;
    background: var(--light-color);
    font-size: 14px;
    color: var(--dark-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 25px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
    margin: 5px;
    transition: 0.3s;
    padding: 8px 15px;
    font-weight: bold;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--hover-color);
    color: white;
}

.dataTables_length select {
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    padding: 8px;
    background: var(--light-color);
    color: var(--dark-color);
}

.w-100 {
    width: 100%;
    max-width: 1200px;
}

.item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: block;
    margin: auto;
    background: var(--light-color);
}

.dataTable tbody td:empty::after {
    content: "—";
    color: #999;
    font-style: italic;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    .navbar {
        left: 0;
        width: 100%;
    }
    .main-content {
        margin-left: 0;
        margin-top: 70px;
        width: 100%;
        padding: 20px;
    }
    .table-custom {
        width: 100%;
        max-width: 100%;
    }
}

.relatorios-container .card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    padding: 25px 30px;
    transition: 0.3s ease;
    background: #fdfdfd;
}

.relatorios-container .card-title {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.relatorios-container .card-title i {
    font-size: 1.6rem;
}

.relatorios-container .text-muted {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.relatorios-container .btn {
    padding: 10px 25px;
    font-weight: 600;
}

.relatorios-container .btn-success {
    background-color: var(--primary-color);
    border: none;
}

.relatorios-container .btn-success:hover {
    background-color: var(--hover-color);
}

.relatorios-container .form-label {
    font-weight: 600;
}

.relatorios-container .card + .card {
    margin-top: 30px;
}

.card input[type="file"]::file-selector-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
}