/* Estilos gerais */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}


/* Estilo para contratos atrasados */
.atrasado {
    background-color: #ffdddd !important;
}

/* Melhorias nos cards de resumo */
.card {
    text-align: center;
}

.card p:first-of-type {
    font-size: 24px;
    margin: 10px 0 5px;
}

.card p:last-of-type {
    font-size: 18px;
    color: #27ae60;
    margin: 0;
}

/* Ajustes na tabela */
.tabela th {
    position: sticky;
    top: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #2c3e50;
}

.voltar {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
}

.voltar:hover {
    text-decoration: underline;
}

/* Menu */
.menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.menu-item {
    padding: 20px;
    background: #3498db;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.menu-item:hover {
    background: #2980b9;
}

/* Formulários */
.form-cadastro, .form-emprestimo {
    margin-top: 20px;
}

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

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

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-warning {
    background: #e67e22;
}

.btn-warning:hover {
    background: #d35400;
}

/* Alertas */
.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.erro {
    background: #ffdddd;
    color: #c0392b;
    border: 1px solid #c0392b;
}

.sucesso {
    background: #ddffdd;
    color: #27ae60;
    border: 1px solid #27ae60;
}

/* Tabelas */
.tabela {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabela th, .tabela td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.tabela th {
    background: #3498db;
    color: white;
}

.tabela tr:nth-child(even) {
    background: #f2f2f2;
}

.tabela tr:hover {
    background: #e6e6e6;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 5px;
}

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

.close:hover {
    color: black;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: #f1f1f1;
    border: none;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

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

/* Cards */
.resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h3 {
    margin-top: 0;
    font-size: 16px;
}

.card p {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 0;
}

/* Nome do cliente selecionado */
.nome-cliente {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Filtro mês */
.filtro-mes {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtro-mes label {
    margin-bottom: 0;
}

.filtro-mes input {
    width: auto;
}