/* SOLUÇÃO DE EMERGÊNCIA - FORÇAR EXPANSÃO */
body, html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

#app, main {
    width: 100%;
    max-width: 100%;
}

#clientes {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: 100vw;
}

.clientes-grid {
    width: 100% !important;
    max-width: 100% !important;
}


:root {
    --azul-royal: #4169E1;
    --azul-royal-escuro: #2a4bc0;
    --cinza: #6c757d;
    --cinza-claro: #f8f9fa;
    --cinza-escuro: #495057;
    --branco: #ffffff;
    --verde: #28a745;
    --laranja: #fd7e14;
    --vermelho: #dc3545;
    --roxo: #6f42c1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--cinza-claro);
    color: var(--cinza-escuro);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--azul-royal), var(--azul-royal-escuro));
    color: var(--branco);
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
    border-radius: 8px;
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.search-bar {
    display: flex;
    margin: 10px 0;
}

.search-bar input {
    padding: 10px 15px;
    border: none;
    border-radius: 6px 0 0 6px;
    width: 280px;
    font-size: 16px;
}

.search-bar button {
    background-color: var(--cinza-escuro);
    color: var(--branco);
    border: none;
    padding: 10px 18px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: var(--cinza);
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

nav button {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--branco);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.section {
    display: none;
    background-color: var(--branco);
    border-radius: 10px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.active {
    display: block;
}

h2 {
    color: var(--azul-royal);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cinza-claro);
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    color: var(--cinza-escuro);
    margin: 25px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cinza-escuro);
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cinza);
    border-radius: 6px;
    font-size: 16px;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--azul-royal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button {
    background-color: var(--azul-royal);
    color: var(--branco);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

button:hover {
    background-color: var(--azul-royal-escuro);
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--verde);
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: var(--laranja);
}

.btn-warning:hover {
    background-color: #e06b10;
}

.btn-danger {
    background-color: var(--vermelho);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-cinza {
    background-color: var(--cinza);
}

.btn-cinza:hover {
    background-color: var(--cinza-escuro);
}

.btn-roxo {
    background-color: var(--roxo);
}

.btn-roxo:hover {
    background-color: #5a359a;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.cliente-card {
    background-color: var(--branco);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    border-left: 5px solid var(--azul-royal);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cliente-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--azul-royal), var(--azul-royal-escuro));
}

.cliente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

/* NOVO: Estilos para cards de Visita de Avaliação */
.cliente-card.visita {
    border-left-color: var(--roxo);
}

.cliente-card.visita::before {
    background: linear-gradient(90deg, var(--roxo), #8a6dcc);
}

.cliente-card.proposta {
    border-left-color: var(--laranja);
}

.cliente-card.proposta::before {
    background: linear-gradient(90deg, var(--laranja), #ff9d4d);
}

.cliente-card.pendente {
    border-left-color: var(--laranja);
}

.cliente-card.pendente::before {
    background: linear-gradient(90deg, var(--laranja), #ff9d4d);
}

.cliente-card.atrasado {
    border-left-color: var(--vermelho);
}

.cliente-card.atrasado::before {
    background: linear-gradient(90deg, var(--vermelho), #e35d6a);
}

.cliente-card h3 {
    color: var(--azul-royal);
    margin-bottom: 12px;
    font-size: 20px;
}

.cliente-info {
    margin-bottom: 15px;
}

.cliente-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cliente-info i {
    color: var(--azul-royal);
    margin-top: 3px;
    flex-shrink: 0;
}

.cliente-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cliente-actions button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
    background-color: var(--cinza-claro);
    padding: 15px;
    border-radius: 8px;
}

.filters label {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--cinza-escuro);
}

.filters select, .filters button {
    padding: 10px 15px;
}

.alertas-list {
    margin-top: 20px;
}

.alerta-item {
    background-color: var(--branco);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    border-left: 5px solid var(--azul-royal);
}

.alerta-item:hover {
    transform: translateX(5px);
}

.alerta-item.pendente {
    border-left-color: var(--laranja);
}

.alerta-item.atrasado {
    border-left-color: var(--vermelho);
}

.alerta-info h4 {
    margin-bottom: 8px;
    color: var(--azul-royal);
}

.alerta-info p {
    color: var(--cinza);
    font-size: 15px;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--cinza);
}

.empty-state i {
    font-size: 70px;
    margin-bottom: 20px;
    color: var(--cinza-claro);
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--cinza);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--branco);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-top: 4px solid var(--azul-royal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.stat-card h3 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--azul-royal);
}

.stat-card.total {
    border-top-color: var(--azul-royal);
}

.stat-card.pendentes {
    border-top-color: var(--laranja);
}

.stat-card.pendentes h3 {
    color: var(--laranja);
}

.stat-card.atrasados {
    border-top-color: var(--vermelho);
}

.stat-card.atrasados h3 {
    color: var(--vermelho);
}

.stat-card.propostas {
    border-top-color: var(--roxo);
}

.stat-card.propostas h3 {
    color: var(--roxo);
}

/* NOVO: Estilo para cards de visita no dashboard */
.stat-card.visitas {
    border-top-color: var(--roxo);
}

.stat-card.visitas h3 {
    color: var(--roxo);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions button {
    flex: 1;
}

.tipo-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* NOVO: Badge para Visita de Avaliação */
.badge-visita {
    background-color: var(--roxo);
    color: white;
}

.badge-proposta {
    background-color: var(--laranja);
    color: white;
}

.badge-servico {
    background-color: var(--verde);
    color: white;
}

/* NOVO: Campos específicos para visita */
.campos-visita {
    background-color: rgba(111, 66, 193, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--roxo);
    margin-bottom: 20px;
}

/* Responsividade */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-bar {
        width: 100%;
        margin: 15px 0;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    nav {
        justify-content: flex-start;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .clientes-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filters > div {
        width: 100%;
    }
    
    .filters select {
        width: 100%;
    }
    
    .alerta-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alerta-actions {
        margin-top: 15px;
        width: 100%;
        display: flex;
        gap: 10px;
    }
    
    .alerta-actions button {
        flex: 1;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 15px;
    }
    
    .section {
        padding: 20px;
    }
    
    .cliente-actions {
        flex-direction: column;
    }
    
    .logo-text h1 {
        font-size: 24px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    nav button {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Estilos para Histórico */
.historico-list {
    margin-top: 20px;
}

.contato-item {
    background-color: var(--branco);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-left: 4px solid var(--azul-royal);
    transition: all 0.3s;
}

.contato-item:hover {
    transform: translateX(5px);
}

.contato-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.contato-info h4 {
    margin-bottom: 5px;
    color: var(--azul-royal);
}

.contato-meta {
    color: var(--cinza);
    font-size: 14px;
    margin-bottom: 10px;
}

.contato-observacoes {
    color: var(--cinza-escuro);
    line-height: 1.5;
}

.contato-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.contato-actions button {
    padding: 6px 12px;
    font-size: 13px;
}

/* Badges para tipos de contato */
.badge-contato {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.badge-telefone { background-color: #17a2b8; color: white; }
.badge-email { background-color: #6f42c1; color: white; }
.badge-whatsapp { background-color: #28a745; color: white; }
.badge-visita { background-color: #fd7e14; color: white; }
.badge-proposta { background-color: #e83e8c; color: white; }

/* 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);
}

.modal-content {
    background-color: var(--branco);
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--azul-royal), var(--azul-royal-escuro));
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
}

/* Botão flutuante para adicionar contato */
.btn-flutuante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--azul-royal);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 100;
}

.btn-flutuante:hover {
    background-color: var(--azul-royal-escuro);
    transform: scale(1.1);
}

/* Estilos para Relatórios */
.export-actions {
    text-align: center;
}

.export-actions button {
    margin-bottom: 10px;
}

.estatisticas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.estatistica-item {
    background: var(--cinza-claro);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--azul-royal);
}

.estatistica-item.destaque {
    background: var(--verde);
    color: white;
    border-left-color: var(--verde);
}

.estatistica-item h3 {
    margin: 0;
    font-size: 24px;
    color: inherit;
}

.estatistica-item p {
    margin: 5px 0 0 0;
    font-size: 12px;
    font-weight: 600;
}

.estatistica-item small {
    font-size: 10px;
    opacity: 0.8;
}

.relatorio-header {
    background: var(--cinza-claro);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.relatorio-info {
    margin-top: 10px;
}

.relatorio-info .badge {
    margin-right: 8px;
    margin-bottom: 5px;
}

.badge-info {
    background-color: var(--azul-royal);
    color: white;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--cinza-claro);
}

.table th {
    background-color: var(--azul-royal);
    color: white;
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsividade para relatórios */
@media (max-width: 768px) {
    .estatisticas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-responsive {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
    }
}

/* ESTILOS GLOBAIS PARA TODOS OS MODAIS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #4169E1;
}

.modal-body {
    padding: 20px;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modais específicos */
#modalContato .modal-content {
    max-width: 600px;
    margin: 2% auto;
    max-height: 90vh;
    overflow-y: auto;
}

#modalWhatsApp .modal-content {
    max-width: 500px;
    margin: 2% auto;
    max-height: 90vh;
    overflow-y: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    #modalContato .modal-content,
    #modalWhatsApp .modal-content {
        margin: 5% auto;
        max-width: 95%;
        max-height: 85vh;
    }
    
    .form-row {
        flex-direction: column !important;
    }
}

/* Dashboard Avançado */
.stats-grid {
    margin-bottom: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #4169E1;
}

.metric-card.positive {
    border-left-color: #28a745;
}

.metric-card.negative {
    border-left-color: #dc3545;
}

.metric-icon {
    font-size: 2rem;
    color: #4169E1;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.metric-title {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Grid de Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chart-card {
    padding: 1.5rem;
}

.chart-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================= */
/* DASHBOARD AVANÇADO - CORREÇÕES */
/* ============================================= */

.stats-grid {
    margin-bottom: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #4169E1;
    min-height: 100px;
}

.metric-card.positive {
    border-left-color: #28a745;
}

.metric-card.negative {
    border-left-color: #dc3545;
}

.metric-icon {
    font-size: 2rem;
    color: #4169E1;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
}

.metric-title {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Grid de Gráficos - CORRIGIDO */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 300px; /* ALTURA FIXA */
    display: flex;
    flex-direction: column;
}

.chart-card {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* IMPORTANTE para flexbox */
}

.chart-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0; /* Não encolher o título */
}

/* Container do canvas - CORRIGIDO */
.chart-card canvas {
    flex: 1; /* Ocupa todo espaço restante */
    min-height: 0; /* IMPORTANTE para flexbox */
    width: 100% !important; /* Forçar largura total */
    height: 100% !important; /* Forçar altura total */
}

/* Responsivo */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        height: 280px; /* Altura menor em mobile */
    }
    
    .metric-card {
        padding: 1rem;
        min-height: 80px;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .metric-icon {
        font-size: 1.5rem;
    }
}

/* Garantir que os gráficos não vazem */
.chartjs-render-monitor {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Mensagens de erro */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* ============================================= */
/* DASHBOARD - LAYOUT CORRIGIDO */
/* ============================================= */

.stats-grid {
    margin-bottom: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Layout corrigido para 2 cards na segunda linha */
.stats-row:last-child {
    grid-template-columns: repeat(2, 1fr);
    max-width: 50%;
    margin: 0 auto;
}

/* Cards de métricas - VERSÃO CORRIGIDA */
.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 5px solid #4169E1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100px;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.metric-card.positive {
    border-left-color: #28a745;
}

.metric-card.negative {
    border-left-color: #dc3545;
}

.metric-icon {
    font-size: 2.5rem;
    color: #4169E1;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(65, 105, 225, 0.1);
    border-radius: 10px;
}

.metric-card.positive .metric-icon {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.metric-card.negative .metric-icon {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.metric-title {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid de Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chart-card {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chart-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chart-card canvas {
    flex: 1;
    min-height: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Responsivo */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-row:last-child {
        max-width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .stats-row:last-child {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        height: 280px;
    }
    
    .metric-card {
        padding: 1.2rem;
        min-height: 90px;
    }
    
    .metric-value {
        font-size: 1.7rem;
    }
    
    .metric-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .metric-card {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        padding: 1rem;
    }
    
    .metric-icon {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* Garantir que os gráficos não vazem */
.chartjs-render-monitor {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* ============================================= */
/* DASHBOARD - LAYOUT SIMPLIFICADO */
/* ============================================= */

.dashboard-metrics {
    margin-bottom: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 5px solid #4169E1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100px;
}

.metric-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    font-size: 2.5rem;
    color: #4169E1;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(65, 105, 225, 0.1);
    border-radius: 10px;
}

.metric-info {
    flex: 1;
    min-width: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.metric-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid de Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chart-card {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chart-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chart-card canvas {
    flex: 1;
    min-height: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Responsivo */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        height: 280px;
    }
    
    .metric-item {
        padding: 1.2rem;
        min-height: 90px;
    }
    
    .metric-value {
        font-size: 1.7rem;
    }
    
    .metric-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .metric-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        padding: 1rem;
    }
    
    .metric-icon {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* Garantir que os gráficos não vazem */
.chartjs-render-monitor {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Estilos para o funil triangular */
.chart-container .funil-connector {
    stroke: #999;
    stroke-width: 2;
    stroke-dasharray: 5, 5;
}

/* Efeito visual para as barras do funil */
.metric-funil {
    background: linear-gradient(135deg, #4169E1, #FFC107, #28a745);
    border-radius: 0 0 10px 10px;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}

/* Container do funil */
.funil-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px 0;
}

.funil-camada {
    background: #4169E1;
    color: white;
    padding: 15px 30px;
    text-align: center;
    font-weight: bold;
    position: relative;
    min-width: 200px;
}

.funil-camada.visitas { 
    background: #4169E1; 
    width: 300px;
}
.funil-camada.propostas { 
    background: #FFC107; 
    color: #333;
    width: 200px;
}
.funil-camada.servicos { 
    background: #28a745; 
    width: 100px;
}

.funil-camada::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid inherit;
}

/* Botão Flutuante - Atualizado */
.btn-flutuante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4169E1, #2196F3);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(65, 105, 225, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-flutuante:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(65, 105, 225, 0.6);
    background: linear-gradient(135deg, #2196F3, #4169E1);
}

.btn-flutuante:active {
    transform: scale(1.05);
}

/* Tooltip do botão flutuante */
.btn-flutuante::after {
    content: 'Cadastrar Novo Cliente';
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.btn-flutuante:hover::after {
    opacity: 1;
}

/* CORREÇÕES CRÍTICAS PARA MODAIS MOBILE */
@media (max-width: 768px) {
    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
    }
    
    .modal-body .form-row {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .modal-body .btn-actions {
        flex-direction: column !important;
    }
    
    .btn-success, .btn-cinza {
        width: 100% !important;
        padding: 16px !important;
        font-size: 16px !important;
    }
    
    .modal-body input,
    .modal-body select,
    .modal-body textarea {
        font-size: 16px !important;
        padding: 14px 12px !important;
        min-height: 44px !important;
    }
}

/* ============================================= */
/* CAMPOS EM LINHA - CORREÇÃO MOBILE */
/* ============================================= */

/* Container dos campos em linha */
.modal-body .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-body .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Labels dos campos */
.modal-body label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

/* Campos individuais */
.modal-body input,
.modal-body select {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

.modal-body input:focus,
.modal-body select:focus {
    border-color: #4169E1;
    outline: none;
    background: white;
}

/* ============================================= */
/* RESPONSIVIDADE - CAMPOS EM LINHA */
/* ============================================= */

/* Desktop - Campos lado a lado */
@media (min-width: 769px) {
    .modal-body .form-row {
        flex-direction: row;
    }
    
    .modal-body .form-group {
        flex: 1;
    }
}

/* Mobile - Campos empilhados */
@media (max-width: 768px) {
    .modal-body .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .modal-body .form-group {
        width: 100%;
    }
}

/* ============================================= */
/* CORREÇÃO ESPECÍFICA PARA O MODAL DE CONTATO */
/* ============================================= */

/* Garante que os campos fiquem corretos no modal de contato */
#modalContato .modal-body [style*="display: flex"] {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

#modalContato .modal-body [style*="flex: 1"] {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Responsividade para o modal de contato */
@media (min-width: 769px) {
    #modalContato .modal-body [style*="display: flex"] {
        flex-direction: row !important;
    }
}

@media (max-width: 768px) {
    #modalContato .modal-body [style*="display: flex"] {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    #modalContato .modal-body [style*="flex: 1"] {
        width: 100% !important;
    }
}

/* ============================================= */
/* MELHORIAS PARA CAMPOS DE DATA E SELECT */
/* ============================================= */

/* Campos de data - melhor para mobile */
.modal-body input[type="date"],
.modal-body input[type="datetime-local"] {
    min-height: 44px;
}

/* Select customizado */
.modal-body select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}

/* ============================================= */
/* VERSÃO ALTERNATIVA - SOBRESCREVENDO ESTILOS INLINE */
/* ============================================= */

/* Se os estilos inline estiverem causando problemas, use estes: */
@media (min-width: 769px) {
    #modalContato .modal-body > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }
    
    #modalContato .modal-body > div:first-child > div {
        flex: 1 !important;
    }
}

@media (max-width: 768px) {
    #modalContato .modal-body > div:first-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        margin-bottom: 20px !important;
    }
    
    #modalContato .modal-body > div:first-child > div {
        width: 100% !important;
    }
}

/* SOLUÇÃO RÁPIDA - SCROLL + CAMPO DATA */
@media (max-width: 768px) {
    /* 1. Corrige scroll */
    .modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 2. Corrige campo data */
    #modalContato .modal-content {
        width: 95vw !important;
        margin: 10px auto !important;
    }
    
    #modalContato .modal-body > div:first-child {
        display: block !important;
    }
    
    #modalContato .modal-body > div:first-child > div {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    #dataContato {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* CENTRALIZAÇÃO TOPBAR MOBILE - VERSÃO SIMPLES */
@media (max-width: 768px) {
    /* Header completo centralizado */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    /* Logo centralizada e empilhada */
    .logo {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    
    .logo-text {
        text-align: center;
    }
    
    .logo-text h1,
    .logo-text p {
        text-align: center;
    }
    
    /* Barra de pesquisa largura total */
    .search-bar {
        width: 100%;
        margin: 0;
    }
    
    /* Navegação em coluna centralizada */
    nav {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    nav button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ============================================= */
/* BARRA DE PESQUISA - PÁGINA DE CLIENTES */
/* ============================================= */

.search-bar-container {
    margin: 20px 0;
    width: 100%;
}

.search-bar {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #4169E1;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    background: white;
}

.search-bar input:focus {
    background: #f8f9fa;
}

.search-bar button {
    padding: 15px 25px;
    background: #4169E1;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background: #3151b9;
}

/* Responsividade */
@media (max-width: 768px) {
    .search-bar-container {
        margin: 15px 0;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .search-bar input {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .search-bar button {
        padding: 12px 20px;
    }
}

/* Alternativa 2 - Gradiente Azul Royal */
header {
    background: linear-gradient(135deg, #4169E1, #1E40AF);
    border-bottom: 3px solid #1E3A8A;
}

/* ============================================= */
/* PWA - MOBILE APP STYLES */
/* ============================================= */

/* Modo standalone (quando instalado) */
@media all and (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    header {
        padding-top: max(15px, env(safe-area-inset-top));
    }
}

/* Banner de instalação */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    animation: slideUp 0.3s ease;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.pwa-banner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pwa-banner-info i {
    font-size: 24px;
    color: #4169E1;
}

.pwa-banner-info div {
    display: flex;
    flex-direction: column;
}

.pwa-banner-info strong {
    font-size: 14px;
    color: #333;
}

.pwa-banner-info span {
    font-size: 12px;
    color: #666;
}

.pwa-banner-actions {
    display: flex;
    gap: 8px;
}

.pwa-btn-install, .pwa-btn-cancel {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-btn-install {
    background: #4169E1;
    color: white;
}

.pwa-btn-install:hover {
    background: #3151b9;
}

.pwa-btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.pwa-btn-cancel:hover {
    background: #e9ecef;
}

/* Notificações PWA */
.pwa-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10001;
    max-width: 350px;
    animation: slideInRight 0.3s ease;
}

.pwa-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}

.pwa-notification-info {
    border-left: 4px solid #2196F3;
}

.pwa-notification-success {
    border-left: 4px solid #4CAF50;
}

.pwa-notification-warning {
    border-left: 4px solid #FF9800;
}

.pwa-notification-error {
    border-left: 4px solid #F44336;
}

.pwa-notification button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.pwa-notification button:hover {
    background: #f5f5f5;
}

/* Notificação de atualização */
.pwa-update-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #FF9800;
    color: white;
    z-index: 10002;
    padding: 12px 16px;
}

.pwa-update-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pwa-update-content i {
    font-size: 18px;
}

.pwa-update-content div {
    flex: 1;
}

.pwa-update-content strong {
    display: block;
    font-size: 14px;
}

.pwa-update-content span {
    font-size: 12px;
    opacity: 0.9;
}

.pwa-btn-update {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-btn-update:hover {
    background: rgba(255,255,255,0.3);
}

/* Indicador de conexão */
[data-connection="offline"] .connection-indicator {
    display: block !important;
}

.connection-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #F44336;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    z-index: 9999;
}

/* Botão de instalação flutuante */
#installButton {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #4169E1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    box-shadow: 0 4px 20px rgba(65, 105, 225, 0.4);
    cursor: pointer;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

#installButton:hover {
    transform: scale(1.1);
    background: #3151b9;
}

/* Animações */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Touch improvements */
@media (max-width: 768px) {
    button, .btn-flutuante, nav button {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* Splash screen para PWA */
@media all and (display-mode: standalone) {
    .pwa-splash {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #4169E1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 100000;
        color: white;
    }
    
    .pwa-splash-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
        animation: pulse 1.5s infinite;
    }
    
    .pwa-splash-text {
        font-size: 18px;
        font-weight: 500;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================================= */
/* BOTÕES FLUTUANTES COM ÍCONES MAIORES */
/* ============================================= */

/* Botão de instalação PWA - MAIOR */
.btn-install-pwa {
    position: fixed;
    bottom: 100px; /* Mais espaço acima do botão de cadastro */
    right: 20px;
    width: 64px;  /* Aumentado */
    height: 64px; /* Aumentado */
    background: linear-gradient(135deg, #FF6B35, #FF8E53);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-install 2s infinite;
    z-index: 1001;
}

/* Botão de cadastro - MAIOR */
.btn-flutuante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;  /* Aumentado */
    height: 60px; /* Aumentado */
    background: linear-gradient(135deg, #4169E1, #2196F3);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(65, 105, 225, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Ajustar tooltips para nova posição */
.btn-install-pwa-tooltip {
    bottom: 110px; /* Ajustado para nova posição */
}

.btn-flutuante-tooltip {
    bottom: 30px;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .btn-install-pwa {
        bottom: 90px;
        right: 15px;
        width: 60px;
        height: 60px;
    }
    
    .btn-flutuante {
        bottom: 15px;
        right: 15px;
        width: 56px;
        height: 56px;
    }
    
    .btn-install-pwa-tooltip {
        bottom: 100px;
        right: 65px;
    }
    
    .btn-flutuante-tooltip {
        bottom: 25px;
        right: 65px;
    }
}

@media (max-width: 480px) {
    .btn-install-pwa {
        bottom: 80px;
        right: 10px;
        width: 56px;
        height: 56px;
    }
    
    .btn-flutuante {
        bottom: 10px;
        right: 10px;
        width: 52px;
        height: 52px;
    }
    
    .btn-install-pwa-tooltip {
        bottom: 90px;
        right: 60px;
    }
    
    .btn-flutuante-tooltip {
        bottom: 20px;
        right: 60px;
    }
}

/* ============================================= */
/* ESTILOS PARA USUÁRIO LOGADO */
/* ============================================= */

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.user-welcome i {
    font-size: 18px;
    color: #e0e7ff;
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* Ajuste no header-content para incluir user-info */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .user-info {
        position: absolute;
        top: 10px;
        right: 15px;
    }
    
    .user-welcome span {
        display: none;
    }
    
    .header-content {
        padding-bottom: 50px; /* Espaço para o user-info */
    }
}

/* ESTILOS PARA COMPROMISSOS */
.compromissos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compromisso-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.compromisso-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.compromisso-item.hoje {
    border-left: 4px solid #4CAF50;
    background: #f8fff8;
}

.compromisso-item.passado {
    opacity: 0.7;
    background: #f5f5f5;
}

.compromisso-info {
    flex: 1;
}

.compromisso-titulo {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.compromisso-descricao {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.compromisso-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.compromisso-acoes {
    display: flex;
    gap: 5px;
}

/* ESTILOS PARA FINANÇAS */
.resumo-financeiro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.resumo-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resumo-valor {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.resumo-label {
    font-size: 14px;
    color: #666;
}

.financas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.financa-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.financa-item.vencida {
    border-left: 4px solid #f44336;
    background: #fff5f5;
}

.financa-item.paga {
    opacity: 0.7;
    background: #f8fff8;
}

.financa-info {
    flex: 1;
}

.financa-descricao {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.financa-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.financa-valor {
    font-weight: bold;
    color: #333;
}

.financa-data.vencida {
    color: #f44336;
    font-weight: bold;
}

.financa-acoes {
    display: flex;
    gap: 5px;
}

.btn-pago {
    background: #e8f5e8;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.btn-pago.ativo {
    background: #4CAF50;
    color: white;
}

/* BOTÕES GERAIS */
.btn-editar {
    background: #fff3e0;
    color: #ff9800;
    border: 1px solid #ff9800;
}

.btn-excluir {
    background: #ffebee;
    color: #f44336;
    border: 1px solid #f44336;
}

.btn-editar:hover, .btn-excluir:hover, .btn-pago:hover {
    opacity: 0.8;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .compromisso-item, .financa-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .compromisso-acoes, .financa-acoes {
        align-self: flex-end;
    }
    
    .resumo-financeiro {
        grid-template-columns: 1fr;
    }
    
    .compromisso-meta, .financa-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* ===== ESTILOS PARA COMPROMISSOS ===== */
.compromissos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compromisso-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.compromisso-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.compromisso-item.hoje {
    border-left: 4px solid #4CAF50;
    background: #f8fff8;
}

.compromisso-item.passado {
    opacity: 0.7;
    background: #f5f5f5;
}

.compromisso-info {
    flex: 1;
}

.compromisso-titulo {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.compromisso-descricao {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.compromisso-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.compromisso-acoes {
    display: flex;
    gap: 5px;
}

/* ===== ESTILOS PARA FINANÇAS ===== */
.resumo-financeiro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.resumo-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resumo-valor {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.resumo-label {
    font-size: 14px;
    color: #666;
}

.financas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.financa-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.financa-item.vencida {
    border-left: 4px solid #f44336;
    background: #fff5f5;
}

.financa-item.paga {
    opacity: 0.7;
    background: #f8fff8;
}

.financa-info {
    flex: 1;
}

.financa-descricao {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.financa-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.financa-valor {
    font-weight: bold;
    color: #333;
}

.financa-data.vencida {
    color: #f44336;
    font-weight: bold;
}

.financa-acoes {
    display: flex;
    gap: 5px;
}

/* ===== BOTÕES GERAIS ===== */
.btn-pago {
    background: #e8f5e8;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-pago.ativo {
    background: #4CAF50;
    color: white;
}

.btn-editar {
    background: #fff3e0;
    color: #ff9800;
    border: 1px solid #ff9800;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-excluir {
    background: #ffebee;
    color: #f44336;
    border: 1px solid #f44336;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-editar:hover, .btn-excluir:hover, .btn-pago:hover {
    opacity: 0.8;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .compromisso-item, .financa-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .compromisso-acoes, .financa-acoes {
        align-self: flex-end;
    }
    
    .resumo-financeiro {
        grid-template-columns: 1fr;
    }
    
    .compromisso-meta, .financa-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    nav {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    nav button {
        white-space: nowrap;
    }
}

/* ===== ESTILOS PARA COMPROMISSOS ===== */
.compromissos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compromisso-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.compromisso-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.compromisso-item.hoje {
    border-left: 4px solid #4CAF50;
    background: #f8fff8;
}

.compromisso-item.passado {
    opacity: 0.7;
    background: #f5f5f5;
}

.compromisso-info {
    flex: 1;
}

.compromisso-titulo {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.compromisso-descricao {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.compromisso-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.compromisso-acoes {
    display: flex;
    gap: 5px;
}

/* ===== ESTILOS PARA FINANÇAS ===== */
.resumo-financeiro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.resumo-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resumo-valor {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.resumo-label {
    font-size: 14px;
    color: #666;
}

.financas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.financa-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.financa-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.financa-item.vencida {
    border-left: 4px solid #f44336;
    background: #fff5f5;
}

.financa-item.hoje {
    border-left: 4px solid #ff9800;
    background: #fffbf0;
}

.financa-item.paga {
    opacity: 0.7;
    background: #f8fff8;
}

.financa-info {
    flex: 1;
}

.financa-descricao {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.financa-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.financa-valor {
    font-weight: bold;
    color: #333;
}

.financa-data.vencida {
    color: #f44336;
    font-weight: bold;
}

.financa-acoes {
    display: flex;
    gap: 5px;
}

/* ===== BOTÕES GERAIS ===== */
.btn-pago {
    background: #e8f5e8;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-pago.ativo {
    background: #4CAF50;
    color: white;
}

.btn-pago:hover {
    opacity: 0.8;
}

.btn-editar {
    background: #fff3e0;
    color: #ff9800;
    border: 1px solid #ff9800;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-excluir {
    background: #ffebee;
    color: #f44336;
    border: 1px solid #f44336;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-editar:hover, .btn-excluir:hover {
    opacity: 0.8;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .compromisso-item, .financa-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .compromisso-acoes, .financa-acoes {
        align-self: flex-end;
    }
    
    .resumo-financeiro {
        grid-template-columns: 1fr;
    }
    
    .compromisso-meta, .financa-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* ===== ESTILOS PARA FINANÇAS ===== */
.resumo-financeiro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.resumo-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #4CAF50;
}

.resumo-item:nth-child(2) {
    border-left-color: #ff9800;
}

.resumo-item:nth-child(3) {
    border-left-color: #f44336;
}

.resumo-valor {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.resumo-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.financas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.financa-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.financa-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.financa-item.vencida {
    border-left: 4px solid #f44336;
    background: #fff5f5;
}

.financa-item.hoje {
    border-left: 4px solid #ff9800;
    background: #fffbf0;
}

.financa-item.paga {
    opacity: 0.7;
    background: #f8fff8;
}

.financa-item.recorrente {
    border-left: 4px solid #2196F3;
    background: #f0f8ff;
}

.financa-info {
    flex: 1;
}

.financa-descricao {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recorrente-badge {
    background: #2196F3;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tipo-recorencia {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
}

.financa-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.financa-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.financa-valor {
    font-weight: bold;
    color: #333;
}

.financa-data.vencida {
    color: #f44336;
    font-weight: bold;
}

.financa-acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ===== BOTÕES GERAIS ===== */
.btn-pago {
    background: #e8f5e8;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-pago.ativo {
    background: #4CAF50;
    color: white;
}

.btn-pago:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.btn-editar {
    background: #fff3e0;
    color: #ff9800;
    border: 1px solid #ff9800;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-excluir {
    background: #ffebee;
    color: #f44336;
    border: 1px solid #f44336;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-editar:hover, .btn-excluir:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* ===== FORMULÁRIO DE FINANÇAS ===== */
#formFinanca {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

#formFinanca .form-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

#formFinanca .form-group {
    flex: 1;
}

#formFinanca label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

#formFinanca input, 
#formFinanca select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

#formFinanca input:focus, 
#formFinanca select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Opções de Recorrência */
#opcoesRecorrencia {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #4CAF50;
}

#recorrenteCheck {
    margin-right: 8px;
}

/* ===== RESPONSIVIDADE ===== */
@media (min-width: 768px) {
    .resumo-financeiro {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .resumo-item {
        padding: 20px;
    }
    
    .resumo-valor {
        font-size: 20px;
    }
    
    .resumo-label {
        font-size: 14px;
    }
    
    .financa-item {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    
    .financa-meta {
        flex-direction: row;
        gap: 20px;
    }
    
    .financa-meta-item {
        font-size: 14px;
    }
    
    #formFinanca .form-row {
        flex-direction: row;
        gap: 20px;
    }
    
    .financa-acoes {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .resumo-financeiro {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .resumo-item {
        padding: 12px;
    }
    
    .resumo-valor {
        font-size: 16px;
    }
    
    .financa-descricao {
        font-size: 14px;
    }
    
    .financa-meta-item {
        font-size: 12px;
    }
    
    .financa-acoes {
        justify-content: space-between;
    }
    
    .btn-pago,
    .btn-editar,
    .btn-excluir {
        flex: 1;
        min-width: auto;
    }
}

/* Estados vazios */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Estilos para as categorias de despesas */
.resumo-financeiro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.resumo-categoria {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.resumo-categoria:nth-child(1) {
    border-left-color: #007bff; /* Azul para empresa */
}

.resumo-categoria:nth-child(2) {
    border-left-color: #28a745; /* Verde para pessoal */
}

.resumo-categoria h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.categoria-section {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.categoria-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categoria-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .resumo-financeiro {
        grid-template-columns: 1fr;
    }
}

/* ===== ESTILOS PROFISSIONAIS PARA FINANÇAS ===== */

/* Container de Métricas por Categoria */
.metric-category {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Cards de Métricas */
.metric-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.metric-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.metric-info {
    flex: 1;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Formulário Profissional */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #eaeaea;
}

.form-card {
    padding: 30px;
}

.form-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.form-subsection {
    margin-top: 15px;
    padding: 20px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Checkbox Moderno */
.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #ced4da;
    cursor: pointer;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}

.form-help-text {
    color: #6c757d;
    font-size: 13px;
    margin-top: 5px;
}

/* Container da Lista de Finanças */
.financas-container {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
    overflow: hidden;
}

/* Seções de Categoria na Lista */
.categoria-section {
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid #eaeaea;
}

.categoria-section:last-child {
    border-bottom: none;
}

.categoria-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    border: none;
}

.categoria-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.categoria-header .badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Itens da Lista */
.financa-item {
    padding: 20px 25px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.financa-item:hover {
    background-color: #f8f9fa;
}

.financa-item:last-child {
    border-bottom: none;
}

.financa-item.vencida {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.financa-item.hoje {
    border-left: 4px solid #ffc107;
    background: #fffbf0;
}

.financa-item.paga {
    border-left: 4px solid #28a745;
    background: #f8fff9;
    opacity: 0.8;
}

/* Responsividade */
@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
    
    .metric-category {
        padding: 20px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* Estados dos Botões */
.btn-ned {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-ned:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== ESTILOS PROFISSIONAIS PARA FINANÇAS ===== */

/* Container principal */
.financas-container {
    padding: 20px 0;
}

/* Seções de categoria */
.categoria-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.categoria-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f8f9fa;
}

.categoria-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.categoria-header h3 i {
    color: #6c757d;
    font-size: 1.1em;
}

.badge {
    background: #e9ecef;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Itens de despesa */
.financa-item {
    display: flex;
    justify-content: between;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.financa-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d0d7de;
    transform: translateY(-1px);
}

.financa-item.vencida {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, #fff8f8 0%, #fff 100%);
}

.financa-item.hoje {
    border-left: 4px solid #ffc107;
    background: linear-gradient(90deg, #fffdf0 0%, #fff 100%);
}

.financa-item.paga {
    border-left: 4px solid #28a745;
    background: linear-gradient(90deg, #f8fff9 0%, #fff 100%);
    opacity: 0.8;
}

.financa-item.recorrente {
    border-right: 4px solid #17a2b8;
}

/* Informações da despesa */
.financa-info {
    flex: 1;
    min-width: 0;
}

.financa-descricao {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.financa-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.financa-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #6c757d;
}

.financa-meta-item i {
    width: 16px;
    text-align: center;
    color: #adb5bd;
}

.financa-valor {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.financa-meta-item.vencida {
    color: #dc3545;
    font-weight: 500;
}

/* Badges */
.recorrente-badge {
    background: #17a2b8;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tipo-recorencia {
    background: #6f42c1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Ações */
.financa-acoes {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.btn-pago, .btn-editar, .btn-excluir {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-pago {
    background: #e9ecef;
    color: #6c757d;
}

.btn-pago.ativo {
    background: #28a745;
    color: white;
}

.btn-pago:hover {
    background: #28a745;
    color: white;
    transform: scale(1.05);
}

.btn-editar {
    background: #fff3cd;
    color: #856404;
}

.btn-editar:hover {
    background: #ffeaa7;
    transform: scale(1.05);
}

.btn-excluir {
    background: #f8d7da;
    color: #721c24;
}

.btn-excluir:hover {
    background: #f1b0b7;
    transform: scale(1.05);
}

/* Estados vazios */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Formulário de finanças */
.form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.form-card {
    padding: 0;
}

.form-card h3 {
    padding: 24px 24px 16px;
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-card h3 i {
    color: #6c757d;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i {
    color: #6c757d;
    width: 16px;
}

.form-help-text {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Checkbox personalizado */
.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #adb5bd;
    cursor: pointer;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.form-checkbox-label i {
    color: #17a2b8;
}

/* Seções do formulário */
.form-section {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.form-subsection {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Métricas do dashboard */
.metric-category {
    margin-bottom: 24px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f8f9fa;
}

.category-title i {
    color: #6c757d;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Responsividade */
@media (max-width: 768px) {
    .financa-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .financa-acoes {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    
    .financa-meta {
        gap: 12px;
    }
    
    .metrics-row {
        grid-template-columns: 1fr;
    }
    
    .categoria-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .financa-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-card {
        padding: 16px;
    }
    
    .categoria-section {
        padding: 16px;
    }
}

/* Animações suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.financa-item {
    animation: fadeIn 0.3s ease;
}

/* Estados de loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   DESIGN PROFISSIONAL PARA FINANÇAS
   ============================================ */

/* CONTAINER PRINCIPAL DAS FINANÇAS */
.financas-container {
    display: block;
    width: 100%;
    min-height: 400px;
    margin-top: 30px;
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f7;
    transition: all 0.3s ease;
}

/* CABEÇALHO DA SEÇÃO FINANÇAS */
#financas .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f4f8;
}

/* SEÇÃO DE CATEGORIA */
.categoria-section-financas {
    display: block !important;
    width: 100% !important;
    min-height: 200px !important;
    background: white !important;
    padding: 25px !important;
    border-radius: 10px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #ddd !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.categoria-header-financas {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #f0f0f0 !important;
}

.categoria-header-financas h3 {
    margin: 0 !important;
    color: #2c3e50 !important;
    font-size: 1.3rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.badge-categoria {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

/* GRADE DE DESPESAS */
.financas-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
    min-height: 150px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* CARTÃO DE DESPESA - DESIGN ELEGANTE */
.cartao-despesa {
    background: white;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    animation: slideInUp 0.4s ease;
}

.cartao-despesa:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.cartao-despesa::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: #4299e1;
    border-radius: 6px 0 0 6px;
}

/* STATUS DE DESPESA */
.cartao-despesa.vencida::before {
    background: #f56565;
}

.cartao-despesa.hoje::before {
    background: #ed8936;
}

.cartao-despesa.paga::before {
    background: #38b2ac;
}

.cartao-despesa.recorrente::before {
    background: #9f7aea;
}

/* CABEÇALHO DO CARTÃO */
.cartao-despesa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cartao-despesa-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cartao-despesa-titulo i {
    color: #718096;
    font-size: 0.9rem;
}

/* BADGES DE STATUS */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-recorrente {
    background: linear-gradient(135deg, #d6bcfa, #b794f4);
    color: #553c9a;
}

.badge-vencida {
    background: linear-gradient(135deg, #fed7d7, #fc8181);
    color: #c53030;
}

.badge-hoje {
    background: linear-gradient(135deg, #feebc8, #ed8936);
    color: #9c4221;
}

.badge-paga {
    background: linear-gradient(135deg, #c6f6d5, #48bb78);
    color: #276749;
}

/* INFORMAÇÕES DA DESPESA */
.cartao-despesa-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 18px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-size: 0.95rem;
}

.info-item i {
    color: #718096;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.info-item .valor {
    font-weight: 700;
    color: #38a169;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.info-item .data {
    font-weight: 600;
    color: #2d3748;
}

.info-item .categoria {
    background: #edf2f7;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

/* TIPO DE DESPESA */
.tipo-despesa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tipo-empresa {
    background: #ebf8ff;
    color: #2c5282;
}

.tipo-pessoal {
    background: #faf5ff;
    color: #6b46c1;
}

/* OBSERVAÇÕES */
.cartao-despesa-observacoes {
    margin-top: 15px;
    padding: 14px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #a0aec0;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cartao-despesa-observacoes i {
    color: #718096;
    margin-top: 2px;
    flex-shrink: 0;
}

/* AÇÕES DO CARTÃO - DESIGN MODERNO */
.cartao-despesa-acoes {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.btn-acao {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.btn-pagar {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-pagar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(72, 187, 120, 0.3);
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.btn-pagar.ativo {
    background: linear-gradient(135deg, #2f855a, #276749);
    transform: scale(1.05);
}

.btn-editar-despesa {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn-editar-despesa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(66, 153, 225, 0.3);
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
}

.btn-excluir-despesa {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-excluir-despesa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(245, 101, 101, 0.3);
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

/* ESTADO VAZIO */
.empty-state-financas {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    opacity: 0.8;
    animation: fadeIn 0.5s ease;
}

.empty-state-financas i {
    font-size: 4.5rem;
    margin-bottom: 20px;
    color: #a0aec0;
    opacity: 0.6;
}

.empty-state-financas h3 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.4rem;
    font-weight: 600;
}

.empty-state-financas p {
    color: #718096;
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ESTILOS PARA VALORES */
.valor-destaque {
    font-weight: 800;
    font-size: 1.2rem;
    color: #38a169;
    letter-spacing: 0.5px;
}

.valor-destaque.vencido {
    color: #f56565;
}

/* ICONS COLORIDOS */
.icon-empresa {
    color: #4299e1;
}

.icon-pessoal {
    color: #9f7aea;
}

.icon-recorencia {
    color: #ed8936;
}

.icon-calendario {
    color: #38b2ac;
}

.icon-categoria {
    color: #718096;
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .financas-container {
        padding: 20px;
    }
    
    .cartao-despesa-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cartao-despesa-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cartao-despesa-acoes {
        justify-content: center;
    }
}

/* ESTILOS PARA OS BADGES - ADICIONE AO SEU CSS */
.tipo-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    text-transform: uppercase;
}

.badge-visita {
    background-color: #4CAF50;
    color: white;
}

.badge-proposta {
    background-color: #FF9800;
    color: white;
}

.badge-servico {
    background-color: #2196F3;
    color: white;
}

.badge-contato {
    background-color: #9C27B0;
    color: white;
}

.badge-default {
    background-color: #757575;
    color: white;
}

/* ============================================= */
/* ESTILOS PARA OS BADGES - ADICIONE AO SEU CSS */
/* ============================================= */

.tipo-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-visita {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.badge-proposta {
    background-color: #FF9800;
    color: white;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.badge-servico {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.badge-contato {
    background-color: #9C27B0;
    color: white;
    box-shadow: 0 2px 4px rgba(156, 39, 176, 0.3);
}

.badge-default {
    background-color: #757575;
    color: white;
    box-shadow: 0 2px 4px rgba(117, 117, 117, 0.3);
}

/* Classes de status para os cards */
.cliente-card.atrasado {
    border-left: 4px solid #e74c3c;
}

.cliente-card.hoje {
    border-left: 4px solid #f39c12;
}

.cliente-card.proximo {
    border-left: 4px solid #f1c40f;
}

.cliente-card.em-dia {
    border-left: 4px solid #2ecc71;
}

.cliente-card.sem-data {
    border-left: 4px solid #95a5a6;
}

/* =========================================== */
/* ESTILOS NED PARA CLIENTES - VERSÃO FINAL */
/* =========================================== */

/* Cores NED */
:root {
    --ned-azul: #0f2e80;
    --ned-azul-claro: #1e4fd8;
    --ned-branco: #ffffff;
    --ned-cinza-claro: #f8f9fa;
    --ned-cinza: #6c757d;
    --ned-sucesso: #28a745;
    --ned-alerta: #ffc107;
    --ned-perigo: #dc3545;
    --ned-info: #17a2b8;
}

/* Grid de clientes - AJUSTADO PARA 3 POR LINHA */
.clientes-grid-ned {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colunas no computador */
    gap: 20px;
    margin-top: 25px;
    width: 100%;
}

/* Card principal */
.cliente-card-ned {
    background: var(--ned-branco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(15, 46, 128, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.cliente-card-ned:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(15, 46, 128, 0.15);
}

/* Cabeçalho do card */
.cliente-header-ned {
    padding: 15px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.tipo-cliente-ned {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.tipo-cliente-ned i {
    font-size: 16px;
}

.header-actions-ned {
    display: flex;
    gap: 8px;
}

.btn-header-ned {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-header-ned:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Corpo do card */
.cliente-body-ned {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cliente-nome-ned {
    margin: 0 0 15px 0;
    color: var(--ned-azul);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ned-cinza-claro);
}

.cliente-nome-ned i {
    color: var(--ned-azul-claro);
}

.cliente-info-ned {
    margin-bottom: 15px;
    flex-grow: 1;
}

.info-item-ned {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #495057;
}

.info-item-ned i {
    width: 14px;
    margin-top: 2px;
    color: var(--ned-azul);
}

.info-item-ned strong {
    color: var(--ned-azul);
    min-width: 110px;
    font-size: 13px;
}

.servico-destaque-ned {
    background: var(--ned-cinza-claro);
    padding: 3px 8px;
    border-radius: 15px;
    color: var(--ned-azul);
    font-weight: 500;
    font-size: 12px;
    border: 1px solid rgba(15, 46, 128, 0.1);
}

.data-importante-ned {
    background: linear-gradient(135deg, rgba(15, 46, 128, 0.05), rgba(30, 79, 216, 0.05));
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--ned-azul-claro);
    margin-top: 8px;
    font-size: 12px;
}

/* Observações */
.cliente-observacoes-ned {
    background: var(--ned-cinza-claro);
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.observacoes-header-ned {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ned-azul);
    font-size: 13px;
    margin-bottom: 5px;
}

.observacoes-header-ned i {
    color: var(--ned-azul-claro);
    font-size: 12px;
}

.observacoes-texto-ned {
    font-size: 12px;
    line-height: 1.4;
    color: var(--ned-cinza);
    max-height: 80px;
    overflow-y: auto;
}


.status-badge-ned.status-atrasado {
    background: #fff5f5;
    color: var(--ned-perigo);
    border: 1px solid #f5c6cb;
}

.status-badge-ned.status-hoje {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge-ned.status-proximo {
    background: #fff3e0;
    color: var(--ned-alerta);
    border: 1px solid #ffe0b2;
}

.status-badge-ned.status-semana {
    background: #e3f2fd;
    color: var(--ned-azul-claro);
    border: 1px solid #bbdefb;
}

.status-badge-ned.status-normal {
    background: #e8f5e9;
    color: var(--ned-sucesso);
    border: 1px solid #c8e6c9;
}

/* Rodapé do card */
.cliente-footer-ned {
    padding: 12px 20px;
    background: var(--ned-cinza-claro);
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    margin-top: auto;
}

.metadata-ned {
    margin-bottom: 12px;
}

.metadata-ned small {
    font-size: 10px;
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-actions-ned {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.btn-action-ned {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action-ned:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-editar-ned {
    background: #e3f2fd;
    color: var(--ned-azul-claro);
}

.btn-editar-ned:hover {
    background: var(--ned-azul-claro);
    color: white;
}

.btn-whatsapp-ned {
    background: #e8f5e9;
    color: #25d366;
}

.btn-whatsapp-ned:hover {
    background: #25d366;
    color: white;
}

.btn-historico-ned {
    background: #f3e5f5;
    color: #7b1fa2;
}

.btn-historico-ned:hover {
    background: #7b1fa2;
    color: white;
}

.btn-excluir-ned {
    background: #fdeaea;
    color: var(--ned-perigo);
}

.btn-excluir-ned:hover {
    background: var(--ned-perigo);
    color: white;
}

/* Filtros NED */
.filters {
    background: var(--ned-branco);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(15, 46, 128, 0.08);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.filters > div {
    display: flex;
    flex-direction: column;
}

.filters label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--ned-azul);
    font-size: 14px;
}

.filters select {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: var(--ned-branco);
    color: #495057;
    transition: all 0.2s ease;
}

.filters select:focus {
    outline: none;
    border-color: var(--ned-azul-claro);
    box-shadow: 0 0 0 3px rgba(30, 79, 216, 0.1);
}

.btn-cinza {
    background: var(--ned-cinza);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    justify-self: start;
    margin-top: 25px;
}

.btn-cinza:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Estado vazio */
.empty-state-ned {
    text-align: center;
    padding: 60px 40px;
    background: var(--ned-branco);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(15, 46, 128, 0.08);
    grid-column: 1 / -1;
    border: 2px dashed #dee2e6;
}

.empty-state-ned i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--ned-azul);
}

.empty-state-ned h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--ned-azul);
}

.empty-state-ned p {
    font-size: 15px;
    color: var(--ned-cinza);
    margin-bottom: 20px;
}

/* Botão NED */
.btn-ned {
    background: linear-gradient(135deg, var(--ned-azul), var(--ned-azul-claro));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(15, 46, 128, 0.2);
}

.btn-ned:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(15, 46, 128, 0.3);
}

/* Animações */
@keyframes slideInRightNED {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRightNED {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* ============================================
   CORREÇÃO EXCLUSIVA PARA ABA DE CLIENTES
   ============================================ */

/* Container principal dos clientes */
#listaClientes {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Remove qualquer limitação de largura na seção de clientes */
#clientes {
    width: 100% !important;
    max-width: 100% !important;
}

/* Remove container duplicado se existir */
#listaClientes > .clientes-grid {
    display: contents !important;
}

/* Responsividade */
@media (max-width: 768px) {
    #listaClientes {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)) !important;
    }
}

/* ============================================
   CSS ESPECÍFICO PARA ABA DE CLIENTES
   NÃO AFETA OUTRAS PARTES DO SISTEMA
   ============================================ */

/* Grid de clientes - CORREÇÃO DEFINITIVA */
#listaClientes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Remove qualquer container duplicado dentro */
#listaClientes > .clientes-grid {
    display: contents;
}

/* Ajusta os cards para ocupar 100% */
#listaClientes .cliente-card-ned {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Responsividade APENAS para clientes */
@media (max-width: 1200px) {
    #listaClientes {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    #listaClientes {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    #listaClientes {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 20px;
    }
}

/* ============================================
   MELHOR ORGANIZAÇÃO DO CARD DE CLIENTE
   ============================================ */

.cliente-card-ned {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

/* Corpo do card ocupa espaço disponível */
.cliente-body-ned {
    flex: 1;
    padding-bottom: 50px; /* Espaço para a badge */
    position: relative;
}


/* Rodapé sempre visível e na frente */
.cliente-footer-ned {
    margin-top: auto;
    position: relative;
    z-index: 10;
    background: white;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Cabeçalho na frente */
.cliente-header-ned {
    position: relative;
    z-index: 10;
}

/* Responsividade para os botões */
@media (max-width: 768px) {
    .cliente-card-ned .footer-actions-ned {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-action-ned {
        flex: 1;
        min-width: calc(50% - 10px);
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .status-badge-ned {
        font-size: 10px;
        padding: 4px 8px;
        bottom: 8px;
        right: 8px;
    }
}

/* ============================================
   BADGE MINIMALISTA (SUPER COMPACTA)
   ============================================ */

.status-badge-ned {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    z-index: 1 !important;
    padding: 3px 6px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    opacity: 0.85 !important;
    max-width: 90px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background: white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    border: 1px solid #e2e8f0 !important ;
}

/* Badge com apenas ícone (modo ultra compacto) */
.status-badge-ned.compact {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.status-badge-ned.compact span {
    display: none !important;
}

.status-badge-ned.compact i {
    margin: 0 !important;
    font-size: 11px !important;
}

/* ============================================
   AJUSTE FINAL DO LAYOUT DO CARD
   ============================================ */

.cliente-card-ned {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 250px; /* Altura mínima consistente */
}

.cliente-body-ned {
    flex: 1;
    position: relative;
    padding-bottom: 25px; /* Espaço suficiente para badge pequena */
}

/* Garante que o conteúdo não seja coberto */
.cliente-info-ned {
    margin-bottom: 10px;
}

/* Rodapé sempre no final */
.cliente-footer-ned {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f1f1;
}

/* ============================================
   ESTILO DO MODAL COMO POP-UP (OBRIGATÓRIO)
   ============================================ */
#modalFinanca {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
    justify-content: center !important;
    align-items: center !important;
}

#modalFinanca .modal-conteudo-financas {
    width: 500px !important;
    max-width: 90% !important;
    background: white !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    animation: modalAparece 0.3s ease !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

@keyframes modalAparece {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Garantir que formulário embutido fique escondido */
#formFinanca {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Garantir que lista de despesas fique visível */
#listaFinancas {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================
   MODAL DE FINANÇAS - ESTILO PROFISSIONAL
   ============================================ */

#modalFinanca {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

#modalFinanca .modal-conteudo-financas {
    width: 500px;
    max-width: 90%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

#modalFinanca .modal-cabecalho-financas {
    background: linear-gradient(135deg, #0f2e80, #1e4fd8);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#modalFinanca .modal-cabecalho-financas h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#modalFinanca .btn-fechar-modal-financas {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

#modalFinanca .btn-fechar-modal-financas:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#modalFinanca .modal-corpo-financas {
    padding: 25px;
}

#modalFinanca .form-card {
    background: white;
}

#modalFinanca .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#modalFinanca .form-group {
    flex: 1;
}

#modalFinanca .form-input,
#modalFinanca .form-select,
#modalFinanca .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

#modalFinanca .form-input:focus,
#modalFinanca .form-select:focus,
#modalFinanca .form-textarea:focus {
    border-color: #1e4fd8;
    box-shadow: 0 0 0 3px rgba(30, 79, 216, 0.1);
    outline: none;
}

#modalFinanca .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#modalFinanca .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#modalFinanca .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    flex: 1;
    justify-content: center;
}

#modalFinanca .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

#modalFinanca .btn-cinza {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    flex: 1;
    justify-content: center;
}

#modalFinanca .btn-cinza:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsivo */
@media (max-width: 600px) {
    #modalFinanca .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    #modalFinanca .form-actions {
        flex-direction: column;
    }
}

/* ============================================
   CORREÇÃO DA COR DO TÍTULO DO MODAL
   ============================================ */
#modalFinanca .modal-cabecalho-financas h3 {
    color: white !important;
}

#modalFinanca .modal-cabecalho-financas span#modalFinancaTitulo {
    color: white !important;
}

/* ============================================
   ESTILOS PARA COMPROMISSOS AVANÇADOS
   ============================================ */

/* DASHBOARD */
.compromissos-dashboard {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.metric-info {
    flex: 1;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.metric-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* CALENDÁRIO PREVIEW */
.calendar-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.calendar-preview h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.day-card.has-events {
    border-color: #007bff;
    background: #e7f3ff;
}

.day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.day-week {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.day-number {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.day-events {
    font-size: 14px;
    color: #666;
}

.event-count {
    background: #007bff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* LISTA DE COMPROMISSOS */
.compromissos-dia {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.dia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.dia-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-dia {
    background: #6c757d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* CARDS DE COMPROMISSO */
.compromissos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.compromisso-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.compromisso-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.compromisso-card.atrasado {
    border-left: 4px solid #dc3545;
}

.compromisso-card.hoje {
    border-left: 4px solid #28a745;
}

.compromisso-card.concluido {
    opacity: 0.8;
    background: #f8f9fa;
}

.card-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-titulo {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-titulo i {
    color: #6c757d;
    font-size: 20px;
}

.card-titulo h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    line-height: 1.4;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-hoje {
    background: #d4edda;
    color: #155724;
}

.badge-amanha {
    background: #fff3cd;
    color: #856404;
}

.badge-atrasado {
    background: #f8d7da;
    color: #721c24;
}

.badge-concluido {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-prioridade {
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.info-item i {
    color: #6c757d;
    width: 16px;
}

.card-descricao {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 3px solid #6c757d;
}

.card-descricao p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.btn-concluir, .btn-editar, .btn-excluir {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.btn-concluir {
    background: #e8f5e8;
    color: #28a745;
}

.btn-concluir.ativo {
    background: #28a745;
    color: white;
}

.btn-editar {
    background: #e3f2fd;
    color: #2196f3;
}

.btn-excluir {
    background: #ffebee;
    color: #f44336;
}

.btn-concluir:hover, .btn-editar:hover, .btn-excluir:hover {
    transform: scale(1.1);
}

.footer-meta {
    font-size: 12px;
    color: #888;
}

.lembrete-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* MODAL DE COMPROMISSOS */
.modal-compromissos {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.modal-conteudo-compromissos {
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-cabecalho-compromissos {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-cabecalho-compromissos h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-fechar-modal {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-fechar-modal:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-corpo-compromissos {
    padding: 25px;
}

/* FILTROS */
.filtros-compromissos {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.filtros-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filtro-group {
    flex: 1;
    min-width: 200px;
}

.filtro-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.filtro-group select,
.filtro-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.filtro-group select:focus,
.filtro-group input:focus {
    border-color: #4e54c8;
    outline: none;
}

.filtro-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ESTADO VAZIO */
.empty-state-compromissos {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state-compromissos i {
    font-size: 64px;
    color: #6c757d;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-compromissos h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 24px;
}

.empty-state-compromissos p {
    margin: 0;
    font-size: 16px;
}

/* ANIMAÇÕES */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .dashboard-metrics {
        grid-template-columns: 1fr 1fr;
    }
    
    .days-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .compromissos-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-row {
        flex-direction: column;
    }
    
    .filtro-group {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
    
    .days-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .card-badges {
        width: 100%;
        justify-content: flex-start;
    }
}