/* Estilos para o Mockup do Sistema Financeiro */
/* Forçar cores específicas para sobrescrever Tailwind */

/* Força cores neutras nos cards financeiros */
.financeiro-card.receitas,
.financeiro-card.receitas * {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: white !important;
}

.financeiro-card.despesas,
.financeiro-card.despesas * {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: white !important;
}

.financeiro-card.saldo,
.financeiro-card.saldo * {
    background: linear-gradient(135deg, #52525b 0%, #3f3f46 100%) !important;
    color: white !important;
}

/* Força cores nas barras de progresso */
.progress-fill.receita {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
}

.progress-fill.despesa {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%) !important;
}

/* Força cores no mini gráfico */
.bar {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
}

.bar:hover {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%) !important;
}

/* Override para financeiro-mockup-container dentro de modal-mockup-wrapper */
.modal-mockup-wrapper .financeiro-mockup-container {
    max-width: 100% !important;
    perspective: none !important;
    z-index: auto !important;
}

.financeiro-mockup-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    perspective: 1000px;
    z-index: 10;
}

/* Override para modal-mockup-wrapper no contexto financeiro */
.modal-mockup-wrapper .financeiro-mockup-container .financeiro-mockup-wrapper {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    animation: none !important;
}

.modal-mockup-wrapper .financeiro-mockup-container .financeiro-mockup-wrapper:hover {
    transform: none !important;
}

.financeiro-mockup-wrapper {
    position: relative;
    transform: rotateX(5deg) rotateY(-10deg);
    transition: transform 0.4s ease;
    animation: floatFinanceiro 4s ease-in-out infinite;
}

.financeiro-mockup-wrapper:hover {
    transform: rotateX(0deg) rotateY(0deg) scale(1.02);
}

@keyframes floatFinanceiro {
    0%, 100% { transform: rotateX(5deg) rotateY(-10deg) translateY(0px); }
    50% { transform: rotateX(5deg) rotateY(-10deg) translateY(-8px); }
}

.financeiro-dashboard-mockup {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.financeiro-dashboard-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    border-radius: 16px 16px 0 0;
}

/* Header do Dashboard */
.financeiro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.financeiro-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
}

.financeiro-icon {
    font-size: 16px;
    margin-right: 8px;
}

.financeiro-refresh {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.financeiro-refresh:hover {
    background: #e2e8f0;
    transform: rotate(180deg);
}

/* Grid de Cards */
.financeiro-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.financeiro-card {
    border-radius: 12px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.financeiro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.financeiro-card.receitas {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.financeiro-card.despesas {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.financeiro-card.saldo {
    background: linear-gradient(135deg, #52525b 0%, #3f3f46 100%);
    color: white;
    grid-column: span 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-icon {
    font-size: 14px;
}

.card-period {
    font-size: 9px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
}

.card-title {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.9;
}

.card-value {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.card-value.positive {
    color: #10b981;
}

.card-trend {
    font-size: 8px;
    opacity: 0.8;
}

.card-trend.positive {
    color: rgba(16, 185, 129, 0.9);
}

.card-trend.negative {
    color: rgba(248, 113, 113, 0.9);
}

/* Seção de Metas */
.financeiro-metas-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.metas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.metas-title {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
}

.add-meta-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-meta-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.meta-item {
    background: white;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.meta-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.meta-name {
    font-size: 9px;
    font-weight: 600;
    color: #374151;
}

.meta-values {
    font-size: 8px;
    color: #6b7280;
    font-weight: 500;
}

.meta-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill.receita {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    animation: shimmerReceita 2s ease-in-out infinite;
}

.progress-fill.despesa {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    animation: shimmerDespesa 2s ease-in-out infinite;
}

@keyframes shimmerReceita {
    0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.7); }
}

@keyframes shimmerDespesa {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.7); }
}

.progress-percent {
    font-size: 8px;
    font-weight: 700;
    color: #374151;
    min-width: 25px;
}

.meta-status {
    font-size: 8px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
}

.meta-status.success {
    background: #dcfce7;
    color: #166534;
    animation: successPulse 2s ease-in-out infinite;
}

.meta-status.good {
    background: #fef3c7;
    color: #92400e;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mini Gráfico */
.financeiro-chart-mini {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.chart-title {
    font-size: 10px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    text-align: center;
}

.mini-chart {
    text-align: center;
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: end;
    height: 40px;
    margin-bottom: 4px;
    gap: 2px;
}

.bar {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 2px 2px 0 0;
    flex: 1;
    min-height: 8px;
    animation: growBar 1.5s ease-out;
    transition: all 0.3s ease;
}

.bar:hover {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
    transform: scaleY(1.1);
}

@keyframes growBar {
    0% { height: 0; opacity: 0; }
    100% { opacity: 1; }
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 2px;
}

.chart-labels span {
    font-size: 7px;
    color: #6b7280;
    font-weight: 500;
    flex: 1;
}

/* Elementos Flutuantes Decorativos */
.financeiro-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 16px;
}

.floating-element {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.6;
    animation: floatAround 8s linear infinite;
}

.floating-element.green {
    background: #3b82f6;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.floating-element.blue {
    background: #6366f1;
    top: 70%;
    right: 10%;
    animation-delay: -2s;
}

.floating-element.purple {
    background: #8b5cf6;
    bottom: 20%;
    left: 15%;
    animation-delay: -4s;
}

@keyframes floatAround {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    25% { transform: translateY(-10px) translateX(5px) rotate(90deg); }
    50% { transform: translateY(0px) translateX(10px) rotate(180deg); }
    75% { transform: translateY(10px) translateX(5px) rotate(270deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

/* Responsividade */
@media (max-width: 768px) {
    .financeiro-mockup-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .financeiro-mockup-wrapper {
        transform: rotateX(2deg) rotateY(5deg);
    }
    
    .financeiro-dashboard-mockup {
        padding: 12px;
    }
    
    .financeiro-cards-grid {
        gap: 6px;
    }
    
    .card-value {
        font-size: 12px;
    }
    
    .chart-bars {
        height: 30px;
    }
}

/* Animação de entrada */
.financeiro-mockup-container {
    animation: slideInFinanceiro 1s ease-out;
}

@keyframes slideInFinanceiro {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Efeitos de hover interativos */
.financeiro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.financeiro-card:hover::before {
    left: 100%;
}

/* Animações sutis para elementos ativos */
.add-meta-btn,
.financeiro-refresh {
    position: relative;
    overflow: hidden;
}

.add-meta-btn::after,
.financeiro-refresh::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.add-meta-btn:active::after,
.financeiro-refresh:active::after {
    width: 120%;
    height: 120%;
}