/* Reset Básico e Padrões do Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #1a2b47; /* Alterado de #f4f7f6 para a cor do menu */
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #e7f1ff; /* Alterado de #fff para azul claro */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-grow: 1;
}

/* Cabeçalho e Navegação */
.main-header {
    background-color: #1a2b47;
    color: white;
    padding: 10px 0; /* Alterado de 10px 5% para 10px 0 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-links a {
    color: #f0f0f0;
    text-decoration: none;
    margin-left: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.navbar-links a:hover {
    background-color: #2c4a7e;
}

/* Mensagens Flash */
.flash-messages {
    padding: 0;
    margin-bottom: 20px;
    list-style: none;
}

.flash {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid transparent;
}

.flash-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.flash-danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.flash-info { background-color: #cce5ff; color: #004085; border-color: #b8daff; }
.flash-warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }


/* Rodapé */
.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: auto;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.9em;
}

/* Estilos para Formulários de Autenticação */
.auth-form-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.auth-form-container h1 {
    text-align: center;
    color: #1a2b47;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #0056b3;
}

.auth-switch-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}
/* --- CORREÇÃO DO MENU --- */
.navbar-links {
    display: flex;
    align-items: center;
}

/* --- ESTILOS PARA PÁGINA DE CLIENTES E SIMILARES --- */
.top-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.import-section, .filter-form {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.import-section h2, .filter-form h2 {
    margin-top: 0;
    color: #1a2b47;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.bulk-actions-top {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background-color: #f0f8ff;
    border: 1px solid #bde0ff;
    border-radius: 8px;
    padding: 10px;
}

/* Estilos para botões (melhoria) *//* Estilos para botões (melhoria) */
.btn {
    padding: 8px 15px;
    text-decoration: none;
    color: white;
    border-radius: 5px;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.2s, opacity 0.2s;
    text-align: center;
}
.btn:hover {
    opacity: 0.9;
}
.btn-sm {
    padding: 5px 10px;
    font-size: 0.8em;
}
.btn-primary { background-color: #007bff; }
.btn-secondary { background-color: #6c757d; }
.btn-success { background-color: #28a745; }
.btn-danger { background-color: #dc3545; }
.btn-info { background-color: #17a2b8; }
.btn-light { background-color: #f8f9fa; color: #333; border: 1px solid #ddd; }

/* --- ESTILOS ESPECÍFICOS DO DASHBOARD --- */
.top-bar-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    gap: 20px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.account-details {
    font-size: 0.9em;
    color: #333;
}

.account-details .separator {
    margin: 0 10px;
    color: #ddd;
}

.account-balance {
    text-align: right;
}

.account-balance small {
    font-size: 0.8em;
    color: #6c757d;
}

.account-balance .balance-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #1a2b47;
    margin: 0;
}

.account-balance .error-text, .account-details.error-text {
    color: #dc3545;
    font-size: 0.9em;
}

.type-badge {
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    font-size: 0.75em;
    font-weight: bold;
}

.type-prod { background-color: #dc3545; }
.type-test { background-color: #007bff; }

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h3 {
    margin-top: 0;
    color: #6c757d;
    font-size: 1em;
}

.card .stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #1a2b47;
}

.balance-toggle-icon {
    cursor: pointer;
    margin-left: 10px;
    color: #6c757d;
    font-size: 1.2em;
    vertical-align: middle;
}
.balance-toggle-icon:hover {
    color: #1a2b47;
}

.cards-container a.card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-left: 5px solid transparent; /* Base para a borda colorida */
}

.cards-container a.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Cores das bordas dos cards */
.card.customers { border-left-color: #007bff; }
.card.issued { border-left-color: #17a2b8; }
.card.due-soon { border-left-color: #ffc107; }
.card.overdue { border-left-color: #dc3545; }
.card.paid-count { border-left-color: #28a745; }
.card.paid-sum { border-left-color: #20c997; }

/* --- ESTILOS PARA TABELAS PADRONIZADAS --- */
.table-standard {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.table-standard thead tr {
    background-color: #1a2b47;
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.table-standard th,
.table-standard td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.table-standard tbody tr {
    border-bottom: 1px solid #dddddd;
}

.table-standard tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.table-standard tbody tr:last-of-type {
    border-bottom: 2px solid #1a2b47;
}

.table-standard tbody tr:hover {
    background-color: #dbeaff;
}

.table-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}
.table-actions form {
    margin: 0;
}
/* --- ESTILOS PARA TAGS DE STATUS --- */
.status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    color: white;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    min-width: 75px; /* Largura mínima para consistência */
}
.status-open { background-color: #ffc107; color: #212529; }
.status-late { background-color: #fd7e14; }
.status-paid { background-color: #28a745; }
.status-cancelled { background-color: #dc3545; }
.status-created { background-color: #17a2b8; }