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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-logo {
    height: 120px;
    width: auto;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 8px;
}

header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: white;
    color: #667eea;
    font-weight: bold;
}

main {
    padding: 30px;
}

.tab-content {
    display: none;
}

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

.tab-content h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Saldos dos Bancos - Visual Profissional */
.financeiro-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
    border: 1px solid #e8ecff;
}

.saldos-bancos {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.saldo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
    border: 2px solid #e8ecff;
    min-width: 160px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.saldo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.saldo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.saldo-item label {
    font-size: 12px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.saldo-item input {
    width: 130px;
    padding: 15px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.saldo-item input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #fafbff;
}

.saldo-item input:hover:not(:focus) {
    border-color: #b8c5ea;
}

.saldo-item:nth-child(1)::before {
    background: linear-gradient(90deg, #ff6b35, #f7931e);
}

.saldo-item:nth-child(2)::before {
    background: linear-gradient(90deg, #0066cc, #004499);
}

.saldo-item:nth-child(3)::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
    letter-spacing: 0.025em;
    transition: color 0.2s ease;
}

.form-group:focus-within label {
    color: #667eea;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fafbff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4c93 100%);
}

.financeiro-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 3px solid #eee;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sub-tab {
    background: none;
    border: none;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    border-bottom: 4px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.sub-tab:hover {
    background: #f8f9ff;
    color: #667eea;
}

.sub-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 700;
    background: #f8f9ff;
}

.sub-tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

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

.quartos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quarto-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.quarto-card:hover {
    transform: translateY(-2px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.despesas-tabela,
.recebimentos-tabela {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 25px;
}

.despesas-tabela table,
.recebimentos-tabela table {
    width: 100%;
    border-collapse: collapse;
}

.despesas-tabela th,
.recebimentos-tabela th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.despesas-tabela td,
.recebimentos-tabela td {
    padding: 15px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
}

.despesas-tabela tr:hover,
.recebimentos-tabela tr:hover {
    background: #f8f9ff;
}

.btn-acao {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.btn-acao:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-acao.excluir {
    background: #dc3545;
}

.btn-acao.excluir:hover {
    background: #c82333;
}

.pagamentos-tabela,
.visitas-tabela {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.pagamentos-tabela table,
.visitas-tabela table {
    width: 100%;
    border-collapse: collapse;
}

.pagamentos-tabela th,
.visitas-tabela th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.pagamentos-tabela td,
.visitas-tabela td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
}

.contas-receber-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e8ecff;
}

.contas-resumo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.resumo-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #667eea;
    transition: transform 0.2s ease;
}

.resumo-card:hover {
    transform: translateY(-2px);
}

.contas-receber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.conta-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #ddd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.conta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.status-badge.pago {
    background: #17a2b8;
    color: white;
}

.status-badge.vencido {
    background: #dc3545;
    color: white;
}

.status-badge.pendente {
    background: #ffc107;
    color: #212529;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

.quartos-background {
    background-image: url('../img/remover-numeros-imagem.a25e0077-90b2-4294-b1a4-bfa263508b81.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.quartos-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.quartos-background > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .financeiro-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 20px;
    }
    
    .saldos-bancos {
        justify-content: center;
        gap: 15px;
    }
    
    .saldo-item {
        flex: 1;
        min-width: 140px;
        padding: 20px 15px;
    }
    
    .saldo-item input {
        width: 120px;
        font-size: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quartos-grid {
        grid-template-columns: 1fr;
    }
    
    .contas-resumo {
        grid-template-columns: 1fr;
    }
    
    .contas-receber-grid {
        grid-template-columns: 1fr;
    }
    
    .financeiro-tabs {
        flex-wrap: wrap;
    }
    
    .sub-tab {
        flex: 1;
        min-width: 120px;
        font-size: 13px;
        padding: 15px 10px;
    }
}

/* Estilos para Relatórios */
.relatorio-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.cards-resumo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.card-resumo {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.card-resumo:hover {
    transform: translateY(-3px);
}

.card-resumo h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.card-resumo .valor {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-resumo .valor.receita {
    color: #28a745;
}

.card-resumo .valor.despesa {
    color: #dc3545;
}

.filtros-relatorio {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.filtros-relatorio h3 {
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.filtros-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filtro-item {
    display: flex;
    flex-direction: column;
}

.filtro-item label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.filtro-item select,
.filtro-item input {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

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

.btn-aplicar-filtros,
.btn-limpar-filtros {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-aplicar-filtros {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-aplicar-filtros:hover,
.btn-limpar-filtros:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-relatorio {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.section-relatorio h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.tabela-relatorio {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tabela-relatorio th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.tabela-relatorio td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.tabela-relatorio tr:hover {
    background: #f8f9ff;
}

.tabela-relatorio .receita {
    color: #28a745;
    font-weight: bold;
}

.tabela-relatorio .despesa {
    color: #dc3545;
    font-weight: bold;
}

.status-ok {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.status-pago {
    background: #17a2b8;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.saldos-relatorio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.saldo-banco {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e8ecff;
    transition: transform 0.2s ease;
}

.saldo-banco:hover {
    transform: translateY(-2px);
}

.saldo-banco h4 {
    margin-bottom: 10px;
    color: #667eea;
}

.valor-banco {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    .cards-resumo {
        grid-template-columns: 1fr;
    }
    
    .saldos-relatorio {
        grid-template-columns: 1fr;
    }
    
    .filtros-integrados {
        padding: 15px;
    }
    
    .filtros-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filtros-acoes {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-limpar-filtros,
    .btn-exportar {
        width: 100%;
        padding: 15px;
    }
    
    .tabela-container {
        overflow-x: auto;
    }
    
    .tabela-financeira {
        font-size: 12px;
        min-width: 700px;
    }
    
    .tabela-financeira th,
    .tabela-financeira td {
        padding: 8px 6px;
    }
    
    .categoria-badge,
    .banco-badge,
    .tipo-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* Estilos para Quartos */
.quartos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quarto-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.quarto-card:hover {
    transform: translateY(-2px);
}

.quarto-numero {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.quarto-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

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

.quarto-status.ocupado {
    background: #f8d7da;
    color: #721c24;
}

.quarto-moradores {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.morador-info {
    font-size: 14px;
    color: #495057;
    margin: 5px 0;
}

.quarto-itens {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.item-tag {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #495057;
}

.quarto-acoes {
    margin-top: 15px;
    text-align: center;
}

.adicionar-morador-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border: 2px dashed #28a745;
}

.adicionar-morador-section h3 {
    color: #28a745;
    margin-bottom: 20px;
}