/* css/style.css */
:root {
    --primary-color: #2c7873;
    --secondary-color: #6fb98f;
    --accent-color: #4d8c57;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --border-color: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-bottom: 30px;
}

.tab-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid var(--primary-color);
}

.tabs li {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #e9e9e9;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    margin-right: 5px;
}

.tabs li.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-top: none;
}

.tab-content.active {
    display: block;
}

h1, h2, h3 {
    color: var(--primary-color);
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 15px;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--secondary-color);
    color: white;
}

table tr:nth-child(even) {
    background-color: var(--light-bg);
}

table tr:hover {
    background-color: #eee;
}

.table-footer {
    font-weight: bold;
    background-color: #eee;
}

/* Resumos */
.resumo-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.resumo-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.resumo-titulo {
    font-weight: bold;
    margin-bottom: 5px;
}

.resumo-valor {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.resumo-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.resumo-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
}

.barra-progresso {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.progresso {
    height: 100%;
    background-color: var(--secondary-color);
}

/* Formulários */
input, select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

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

button:hover, .btn:hover {
    background-color: var(--accent-color);
}

.btn-danger {
    background-color: #d9534f;
}

.btn-danger:hover {
    background-color: #c9302c;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Utilitários */
.mt-4 {
    margin-top: 20px;
}

.mb-4 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.btn-editar {
    background-color: #0275d8;
}

.btn-excluir {
    background-color: #d9534f;
}

/* Empréstimos */
.emprestimo-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.info-label {
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Responsividade */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .tabs li {
        margin-right: 0;
        margin-bottom: 2px;
        border-radius: 0;
    }
    
    table {
        font-size: 14px;
    }
    
    table th, table td {
        padding: 8px 5px;
    }
    
    .resumo-section {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
}