* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

header p {
    opacity: 0.9;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

.system-status {
    margin-top: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

main {
    padding: 30px;
}

/* Sistema de Abas */
.tabs-navigation {
    display: flex;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
    padding: 5px;
    margin-bottom: 0;
    border: 2px solid #dee2e6;
    border-bottom: none;
}

.tab-button {
    flex: 1;
    padding: 15px 25px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}

.tab-content {
    display: none;
}

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

/* Aba de Encargos e Rescisão */
.encargos-form, .rescisao-form {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 0 0 12px 12px;
    border: 2px solid #e9ecef;
    border-top: none;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.encargos-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.funcionario-dados {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.parametros-encargos {
    margin-bottom: 30px;
}

.parametros-encargos h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parametros-encargos h3::before {
    content: '⚙️';
    font-size: 1.2rem;
}

.parametros-encargos h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 35px;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 2px;
}

.parametros-grid, .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

/* Estilos específicos para rescisão */
.funcionario-dados-rescisao {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(45deg, #fff3e0, #fce4ec);
    border-radius: 10px;
    border-left: 4px solid #ff9800;
}

.tipo-rescisao {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(45deg, #f3e5f5, #e8f5e8);
    border-radius: 10px;
    border-left: 4px solid #9c27b0;
}

.tipo-rescisao-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.1);
    transform: translateY(-2px);
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #9c27b0;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #9c27b0;
}

.informacoes-adicionais {
    padding: 20px;
    background: linear-gradient(45deg, #e3f2fd, #f1f8e9);
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    margin-bottom: 20px;
}

.resultado-rescisao {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Estilos para resultado de rescisão */
.resultado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.tipo-rescisao-badge {
    background: linear-gradient(45deg, #9c27b0, #673ab7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tempo-servico {
    background: linear-gradient(45deg, #e8f5e8, #f3e5f5);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.tempo-servico h5 {
    margin: 0 0 8px 0;
    color: #2e7d32;
}

.verbas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.verba-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border-left: 3px solid #2196f3;
}

.verba-item.destacado {
    border-left-color: #ff9800;
    background: linear-gradient(45deg, #fff3e0, #fce4ec);
}

.verba-item .label {
    font-weight: 500;
    color: #424242;
}

.verba-item .value {
    font-weight: 600;
    color: #1976d2;
}

.verba-item .value.desconto {
    color: #d32f2f;
}

.descontos-section {
    background: linear-gradient(45deg, #ffebee, #fce4ec);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #f44336;
}

.descontos-section h5 {
    margin: 0 0 10px 0;
    color: #c62828;
}

.totais-section {
    background: linear-gradient(45deg, #e8f5e8, #f1f8e9);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.total-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.total-item:last-child {
    border-bottom: none;
}

.total-item.total-liquido {
    font-size: 18px;
    font-weight: 700;
    color: #2e7d32;
    border-top: 2px solid #4caf50;
    margin-top: 10px;
    padding-top: 15px;
}

.observacoes {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.observacoes h5 {
    margin: 0 0 10px 0;
    color: #1565c0;
}

.observacoes ul {
    margin: 0;
    padding-left: 20px;
}

.observacoes li {
    margin-bottom: 5px;
    color: #424242;
}

.parametros-grid .form-group input[type="number"] {
    text-align: center;
    font-weight: 600;
    color: #28a745;
}

.parametros-grid small {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

.resultado-encargos {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.resultado-encargos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
    border-radius: 12px 12px 0 0;
}

.resultado-encargos h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resultado-encargos h3::before {
    content: '💰';
    font-size: 1.2rem;
}

.resultado-encargos h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 35px;
    width: 90px;
    height: 3px;
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
    border-radius: 2px;
}

.resultado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.resultado-card {
    background: linear-gradient(145deg, #ffffff 0%, #f1f3f4 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.resultado-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resultado-valor {
    font-size: 1.4rem;
    font-weight: 700;
    color: #28a745;
    margin: 10px 0;
}

.resultado-detalhes {
    font-size: 14px;
    color: #6c757d;
    margin-top: 10px;
}

.total-encargos {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.total-encargos h4 {
    color: white;
    font-size: 1.4rem;
}

.total-encargos .resultado-valor {
    color: white;
    font-size: 2rem;
}

.balancete-form {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 2px solid #e9ecef;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.balancete-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.balancete-form h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.balancete-form h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.lancamentos-section {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    border: 2px solid #dee2e6;
    position: relative;
}

.lancamentos-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 12px 12px 0 0;
}

.lancamentos-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lancamentos-section h3::before {
    content: '📊';
    font-size: 1.2rem;
}

.lancamentos-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 35px;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 2px;
}

.lancamento-item {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    position: relative;
    transition: all 0.3s ease;
}

.lancamento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 0 0 12px;
}

.lancamento-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #d1ecf1;
}

.lancamento-main {
    display: grid;
    grid-template-columns: 130px 1fr 160px 50px;
    gap: 15px;
    align-items: center;
    margin-left: 8px;
}

.descricao-separator {
    margin: 18px 8px 12px 8px;
    border: none;
    border-top: 2px solid #e9ecef;
    position: relative;
    opacity: 0.8;
}

.descricao-separator::before {
    content: '📝';
    position: absolute;
    top: -12px;
    left: 0;
    background: white;
    padding: 0 8px;
    font-size: 12px;
    color: #6c757d;
}

.descricao-container {
    margin: 12px 8px 0 8px;
    position: relative;
}

.descricao-container .descricao {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.descricao-container .descricao:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.lancamento-item input,
.lancamento-item select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.conta-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.conta-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    width: 100%;
}

.conta-input:focus {
    border-color: #3498db;
    outline: none;
}

.sugestoes-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sugestoes-lista {
    padding: 0;
}

.sugestao-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.sugestao-item:hover,
.sugestao-item.ativo {
    background-color: #3498db;
    color: white;
}

.sugestao-item:last-child {
    border-bottom: none;
}

.sugestao-match {
    font-weight: bold;
    color: #e74c3c;
}

.sugestao-item:hover .sugestao-match,
.sugestao-item.ativo .sugestao-match {
    color: #fff;
}

.lancamento-item select {
    cursor: pointer;
}

.remove-lancamento {
    background: #ea1b04;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.remove-lancamento:hover {
    background: #c0392b;
}

#addLancamento {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

#addLancamento:hover {
    background: #219a52;
}

.balance-info {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.balance-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fd7e14 0%, #ffc107 100%);
    border-radius: 12px 12px 0 0;
}

.totals {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.totals span {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f1f3f4 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.balance-status {
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-status.balanced {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.balance-status.unbalanced {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.form-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.form-actions button[type="submit"] {
    background: #3498db;
    color: white;
}

.form-actions button[type="submit"]:enabled:hover {
    background: #2980b9;
}

.form-actions button[type="submit"]:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.form-actions button[type="button"]:first-of-type {
    background: #f39c12;
    color: white;
}

.form-actions button[type="button"]:first-of-type:hover {
    background: #d68910;
}

.form-actions button[type="button"]:last-of-type {
    background: #95a5a6;
    color: white;
}

.form-actions button[type="button"]:last-of-type:hover {
    background: #7f8c8d;
}

.historico-section {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    border: 2px solid #dee2e6;
    position: relative;
}

.historico-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6f42c1 0%, #e83e8c 100%);
    border-radius: 12px 12px 0 0;
}

.historico-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.historico-section h2::before {
    content: '📚';
    font-size: 1.5rem;
}

.historico-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 45px;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #6f42c1 0%, #e83e8c 100%);
    border-radius: 2px;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 25px;
    background: linear-gradient(145deg, #ffffff 0%, #f1f3f4 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.clear-cache-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.exportar-todos-btn {
    background: #c5b4dd;    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.exportar-pdf-btn {
    background: #c5b4dd;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.clear-cache-btn:hover {
    background: #c0392b;
}

.empty-state {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Grupos de Data */
.grupo-data {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grupo-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.grupo-header:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-1px);
}

.grupo-header.data-hoje {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse-hoje 2s infinite;
}

.grupo-header.data-hoje:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

@keyframes pulse-hoje {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.grupo-titulo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grupo-data-text {
    font-size: 16px;
    font-weight: 600;
    text-transform: capitalize;
}

.grupo-contador {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

.grupo-resumo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
}

.grupo-total {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.grupo-seta {
    font-size: 14px;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.grupo-conteudo {
    padding: 15px;
    background: #f8f9fa;
}

.grupo-conteudo .balancete-card {
    margin-bottom: 15px;
    background: white;
    border: 1px solid #e1e8ed;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.grupo-conteudo .balancete-card:last-child {
    margin-bottom: 0;
}

.balancete-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.balancete-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Resumo do Balancete */
.balancete-resumo {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.resumo-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.resumo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.resumo-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.resumo-item .label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.resumo-item .value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.toggle-detalhes {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.toggle-detalhes:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: scale(1.05);
}

.lancamentos-detalhados {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f1f3f4;
    display: none;
}

.lancamentos-detalhados.expandido {
    display: block;
    animation: expandir 0.3s ease-out;
}

@keyframes expandir {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.balancete-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.balancete-date {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.balancete-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-balanced {
    background: #d4edda;
    color: #155724;
}

.lancamentos-list {
    margin-bottom: 15px;
}

.lancamento-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid transparent;
}

.lancamento-display.debito {
    border-left-color: #e74c3c;
}

.lancamento-display.credito {
    border-left-color: #27ae60;
}

.lancamento-info {
    flex: 1;
}

.lancamento-descricao {
    font-weight: 600;
    color: #2c3e50;
}

.lancamento-tipo {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-top: 2px;
}

.lancamento-valor {
    font-weight: 600;
    font-size: 16px;
}

.lancamento-valor.debito {
    color: #e74c3c;
}

.lancamento-valor.credito {
    color: #27ae60;
}

.balancete-totals {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
    font-weight: 600;
}

.total-debitos {
    color: #e74c3c;
}

.total-creditos {
    color: #27ae60;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 5px;
    }
    
    main {
        padding: 15px;
    }
    
    .lancamento-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .totals {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        min-width: auto;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .grupo-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .grupo-resumo {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 11px;
    }
    
    .grupo-data-text {
        font-size: 14px;
    }
    
    .grupo-conteudo {
        padding: 10px;
        gap: 10px;
        text-align: center;
    }
    
    .funcionario-dados {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .parametros-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .resultado-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs-navigation {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        padding: 12px 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }

    .conta-selector {
        width: 100%;
    }
    
    .conta {
        font-size: 12px;
    }
}

/* Melhorias no design simples */
.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.form-actions button[type="submit"] {
    background: #27ae60;
    color: white;
}

.form-actions button[type="submit"]:enabled:hover {
    background: #219a52;
}

.form-actions button[type="submit"]:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.form-actions button[type="button"]:first-of-type {
    background: #f39c12;
    color: white;
}

.form-actions button[type="button"]:first-of-type:hover {
    background: #d68910;
}

.form-actions button[type="button"]:last-of-type {
    background: #95a5a6;
    color: white;
}

.form-actions button[type="button"]:last-of-type:hover {
    background: #7f8c8d;
}

.balance-info {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #ddd;
}

.historico-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* Estilos do Popup de Relatórios */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90%;
    overflow: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.popup-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.btn-fechar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.btn-fechar:hover {
    background: #e9ecef;
    color: #000;
}

.popup-body {
    padding: 20px;
}

.filtros-relatorio {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filtro-grupo {
    margin-bottom: 15px;
}

.filtro-grupo label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.filtro-grupo select,
.filtro-grupo input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.filtro-grupo select:focus,
.filtro-grupo input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.opcoes-relatorio {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.opcao-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.opcao-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.opcao-btn small {
    display: block;
    font-weight: normal;
    color: #666;
    margin-top: 5px;
    font-size: 14px;
}

.gerar-relatorio-btn, .exportar-todos-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gerar-relatorio-btn:hover, .exportar-todos-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.exportar-pdf-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.exportar-pdf-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.exportar-pdf-btn:hover {
    background: #219a52;
}
