:root {
    --bg-color: #f4f7f6;
    --text-color: #333;
    --primary: #4a90e2;
    --success: #2ecc71;
    --danger: #e74c3c;
    --card-bg: #fff;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
}

nav {
    background-color: var(--primary);
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-bottom: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(0,0,0,0.2);
}

main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 1;
}

.btn-success { background-color: var(--success); }
.btn-danger { background-color: var(--danger); }
.btn-warning { background-color: #f39c12; color: white; }
.btn-primary { background-color: var(--primary); }

.btn-small { 
    padding: 6px 12px; 
    font-size: 12px; 
    margin-top: 0; 
    font-weight: bold;
    border-radius: 4px;
}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.row { display: flex; gap: 15px; }
.row > div { flex: 1; }

.actions { display: flex; gap: 10px; }

table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
th { background-color: #f8f9fa; }

.entrada { color: var(--success); font-weight: bold; }
.saida { color: var(--danger); font-weight: bold; }

.badge-previsto { background: #f39c12; color: white; padding: 3px 8px; border-radius: 12px; font-size: 12px; }
.badge-efetivado { background: var(--success); color: white; padding: 3px 8px; border-radius: 12px; font-size: 12px; }

.chart-container { position: relative; height: 300px; width: 100%; }

/* Estilos dos Filtros */
.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.filtros-container > div {
    flex: 1;
    min-width: 150px;
}

.filtros-container label {
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
    font-weight: bold;
    color: #555;
}

.filtros-container input, .filtros-container select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

/* Estilos da Paginação */
.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.paginacao button {
    margin: 0;
    padding: 8px 15px;
    font-size: 14px;
}

.paginacao span {
    font-weight: bold;
    color: #555;
}

/* Estilos do Modal de Edição */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover, .close-modal:focus {
    color: black;
    text-decoration: none;
}