/* style.css - Estilos Profissionais para Sistema Financeiro */

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* HEADER */
header {
    background: linear-gradient(135deg,#007BFF,#0056b3);
    color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 { font-size: 1.5em; }

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.2s;
}

nav a:hover { background: rgba(255,255,255,0.3); }

/* TÍTULOS */
h2 {
    color: #007BFF;
    margin-bottom: 15px;
    text-align: center;
}

/* FORMULÁRIO */
.form-container { padding: 15px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(4,1fr); /* 4 COLUNAS FIXAS NO DESKTOP */
    gap: 15px;
    margin-bottom: 15px;
}

.form-row.full {
    grid-template-columns: 1fr; /* LINHA INTEIRA */
}

.form-field label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #444;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

.form-field input:focus,
.form-field select:focus {
    border-color: #007BFF;
}

/* TOTAL */
.total-display {
    background: #d4edda;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    color: #155724;
}

/* BOTÕES */
.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn, button {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    color: white;
    text-decoration: none;
    background: #007BFF;
}

.btn:hover { background: #0056b3; }
.btn-success { background: #28a745; }
.btn-success:hover { background: #1e7e34; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #b71c24; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #545b62; }

/* TABELA */
.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th, td {
    padding: 10px;
    white-space: nowrap;
    border-bottom: 1px solid #ddd;
}

th {
    background: #007BFF;
    color: white;
    position: sticky;
    top: 0;
}

tr:hover { background: #f4f4f4; }

/* MENSAGENS */
.success, .error {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.success {
    background: #d4edda;
    color: #155724;
}

.error {
    background: #f8d7da;
    color: #721c24;
}

/* RESPONSIVO */
@media (max-width: 992px) {
    .form-row {
        grid-template-columns: repeat(2,1fr); /* 2 colunas no tablet */
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr; /* 1 coluna no mobile */
    }
    table { min-width: 700px; }
}
