/* css/style.css */

/* Reset básico */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
    background-color: #f4f7f6; /* Fundo claro e minimalista */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-container p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #3498db; /* Azul para foco */
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background-color: #27ae60; /* Verde poupança */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #219150;
}

/* Estilo para mensagens de erro */
.erro-msg {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}
/* --- LAYOUT DO DASHBOARD --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    background-color: #f4f7f6;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar h2 { margin-bottom: 30px; text-align: center; color: #27ae60; }
.sidebar a { color: #ecf0f1; text-decoration: none; padding: 12px; margin-bottom: 8px; border-radius: 6px; transition: 0.3s; }
.sidebar a:hover { background-color: #34495e; }
.sidebar .logout { margin-top: auto; background-color: #c0392b; text-align: center; }
.sidebar .logout:hover { background-color: #e74c3c; }

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.card h3 { color: #7f8c8d; font-size: 14px; text-transform: uppercase; margin-bottom: 10px; }
.card .valor { font-size: 28px; font-weight: bold; color: #2c3e50; }
.card .valor.positivo { color: #27ae60; }
.card .valor.negativo { color: #e74c3c; }

/* --- MODAIS E BOTÕES (O visual TOP) --- */
.btn {
    padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer;
    font-weight: bold; font-size: 14px; transition: 0.3s; text-decoration: none; display: inline-block;
}
.btn-primary { background-color: #3498db; color: white; }
.btn-primary:hover { background-color: #2980b9; }
.btn-success { background-color: #27ae60; color: white; }
.btn-success:hover { background-color: #219150; }
.btn-danger { background-color: #e74c3c; color: white; }
.btn-danger:hover { background-color: #c0392b; }

/* Janela Modal */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
    justify-content: center; align-items: center;
}
.modal-content {
    background-color: white; padding: 30px; border-radius: 15px;
    width: 100%; max-width: 500px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-modal { float: right; font-size: 24px; cursor: pointer; color: #7f8c8d; }
.close-modal:hover { color: #e74c3c; }

/* Tabela Moderna */
.table-moderna { width: 100%; border-collapse: collapse; margin-top: 20px; }
.table-moderna th, .table-moderna td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.table-moderna th { background-color: #f8f9fa; color: #2c3e50; font-size: 14px; text-transform: uppercase; }
.badge { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; color: white; }

/* --- MVP: FORMULÁRIO RÁPIDO --- */
.tipo-toggle { display: flex; gap: 10px; margin-bottom: 20px; }
.tipo-btn { 
    flex: 1; padding: 15px; text-align: center; border: 2px solid #ecf0f1; 
    border-radius: 12px; cursor: pointer; font-weight: bold; color: #95a5a6; transition: 0.2s; 
}
.tipo-btn.active.despesa { border-color: #e74c3c; background-color: #fadbd8; color: #c0392b; }
.tipo-btn.active.receita { border-color: #27ae60; background-color: #d5f5e3; color: #1e8449; }
.esconder-radio { display: none; } /* Esconde a bolinha padrão do radio button */

.input-gigante { 
    font-size: 40px; font-weight: bold; text-align: center; border: none; 
    border-bottom: 2px solid #ecf0f1; width: 100%; padding: 10px; margin-bottom: 25px; 
    color: #2c3e50; outline: none; background: transparent;
}
.input-gigante:focus { border-bottom-color: #3498db; }

.linha-flex { display: flex; gap: 15px; margin-bottom: 25px; }
.input-clean { 
    flex: 1; padding: 12px; border: 1px solid #ecf0f1; border-radius: 8px; 
    font-size: 14px; outline: none; transition: 0.2s; background-color: #fdfdfd;
}
.input-clean:focus { border-color: #3498db; background-color: #fff; }

.categorias-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); 
    gap: 10px; margin-bottom: 25px; max-height: 150px; overflow-y: auto; padding-right: 5px;
}
.cat-item { 
    text-align: center; cursor: pointer; padding: 12px 5px; border-radius: 10px; 
    border: 1px solid #ecf0f1; transition: 0.2s; font-size: 12px; color: #7f8c8d;
}
.cat-item:hover { background-color: #f4f7f6; }
.cat-item.active { border-color: #3498db; background-color: #ebf5fb; font-weight: bold; color: #2c3e50; }
.cat-cor { width: 16px; height: 16px; border-radius: 50%; margin: 0 auto 8px auto; }