/* =============================================================================
   FNC Dashboard Styles
   Estilos especificos para o Dashboard Financeiro
   ============================================================================= */

/* =========================================================================
   DASHBOARD CONTAINER
   ========================================================================= */
.dashboard-fnc {
    padding-bottom: 80px; /* Space for fixed totalizer */
}

/* =========================================================================
   COMPACT FILTER (TOP BAR)
   ========================================================================= */
.fnc-filtro-compacto {
    background: white;
    border-radius: var(--fnc-radius-lg);
    border: 1px solid var(--fnc-neutral-200);
}

.fnc-filtro-compacto .btn-atualizar {
    min-width: 120px;
}

/* =========================================================================
   HERO KPI SECTION
   ========================================================================= */
.fnc-hero-kpi {
    background: var(--fnc-hero-gradient);
    border-radius: var(--fnc-radius-lg);
    overflow: hidden;
    box-shadow: var(--fnc-shadow-lg);
}

.fnc-hero-kpi .fnc-hero-gradient {
    padding: 24px;
    color: white;
}

.fnc-hero-kpi .fnc-hero-main {
    display: flex;
    flex-direction: column;
}

.fnc-hero-kpi .fnc-hero-label {
    font-size: 11px;
    font-weight: var(--fnc-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fnc-white-alpha-70);
}

.fnc-hero-kpi .fnc-hero-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

.fnc-hero-kpi .fnc-hero-value .currency {
    font-size: 18px;
    font-weight: var(--fnc-font-weight-medium);
    opacity: 0.9;
}

.fnc-hero-kpi .fnc-hero-value .amount {
    font-size: 36px;
    font-weight: var(--fnc-font-weight-bold);
    letter-spacing: -1px;
}

/* Projecao badges */
.fnc-projecao-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--fnc-white-alpha-20);
    border-radius: var(--fnc-radius-full);
    font-size: 12px;
    font-weight: var(--fnc-font-weight-medium);
}

.fnc-projecao-badge .fnc-projecao-label {
    opacity: 0.8;
}

.fnc-projecao-badge .fnc-projecao-valor {
    font-weight: var(--fnc-font-weight-bold);
}

/* =========================================================================
   KPI CARDS GRID (6 cards)
   ========================================================================= */
.fnc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .fnc-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fnc-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================================
   AGING SECTION
   ========================================================================= */
.fnc-aging-section {
    background: white;
    border-radius: var(--fnc-radius-lg);
    padding: 20px;
    border: 1px solid var(--fnc-neutral-200);
}

.fnc-aging-section .fnc-aging-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.fnc-aging-section .fnc-aging-title {
    font-size: 14px;
    font-weight: var(--fnc-font-weight-semibold);
    color: var(--fnc-neutral-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fnc-aging-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fnc-aging-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fnc-aging-row .fnc-aging-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fnc-aging-row .fnc-aging-label-text {
    font-size: 12px;
    font-weight: var(--fnc-font-weight-medium);
    color: var(--fnc-neutral-700);
}

.fnc-aging-row .fnc-aging-label-valor {
    font-size: 14px;
    font-weight: var(--fnc-font-weight-bold);
}

/* Aging legend */
.fnc-aging-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--fnc-neutral-200);
}

.fnc-aging-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--fnc-neutral-600);
}

.fnc-aging-legend-item .fnc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* =========================================================================
   CASH FLOW CHART SECTION
   ========================================================================= */
.fnc-fluxo-section {
    background: white;
    border-radius: var(--fnc-radius-lg);
    padding: 20px;
    border: 1px solid var(--fnc-neutral-200);
    height: 100%;
}

.fnc-fluxo-section .fnc-fluxo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fnc-fluxo-section .fnc-fluxo-title {
    font-size: 14px;
    font-weight: var(--fnc-font-weight-semibold);
    color: var(--fnc-neutral-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fnc-fluxo-chart-container {
    height: 280px;
    position: relative;
}

/* Fluxo summary cards */
.fnc-fluxo-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--fnc-neutral-200);
}

.fnc-fluxo-summary-item {
    text-align: center;
}

.fnc-fluxo-summary-item .fnc-summary-label {
    font-size: 11px;
    color: var(--fnc-neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fnc-fluxo-summary-item .fnc-summary-valor {
    font-size: 16px;
    font-weight: var(--fnc-font-weight-bold);
    margin-top: 4px;
}

.fnc-fluxo-summary-item .fnc-summary-valor.entrada {
    color: var(--fnc-entrada);
}

.fnc-fluxo-summary-item .fnc-summary-valor.saida {
    color: var(--fnc-saida);
}

.fnc-fluxo-summary-item .fnc-summary-valor.saldo {
    color: var(--fnc-primary);
}

/* =========================================================================
   RANKING SECTION
   ========================================================================= */
.fnc-ranking-section {
    background: white;
    border-radius: var(--fnc-radius-lg);
    padding: 20px;
    border: 1px solid var(--fnc-neutral-200);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fnc-ranking-section .fnc-ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fnc-ranking-section .fnc-ranking-title {
    font-size: 14px;
    font-weight: var(--fnc-font-weight-semibold);
    color: var(--fnc-neutral-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fnc-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

/* =========================================================================
   ALERTS SECTION
   ========================================================================= */
.fnc-alertas-section {
    background: white;
    border-radius: var(--fnc-radius-lg);
    padding: 20px;
    border: 1px solid var(--fnc-neutral-200);
}

.fnc-alertas-section .fnc-alertas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fnc-alertas-section .fnc-alertas-title {
    font-size: 14px;
    font-weight: var(--fnc-font-weight-semibold);
    color: var(--fnc-neutral-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fnc-alertas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

/* =========================================================================
   SECONDARY METRICS
   ========================================================================= */
.fnc-metricas-secundarias {
    background: var(--fnc-neutral-50);
    border-radius: var(--fnc-radius-md);
    padding: 16px;
}

.fnc-metricas-secundarias .fnc-metrica-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fnc-metricas-secundarias .fnc-metrica-label {
    font-size: 11px;
    color: var(--fnc-neutral-500);
}

.fnc-metricas-secundarias .fnc-metrica-valor {
    font-size: 18px;
    font-weight: var(--fnc-font-weight-bold);
    color: var(--fnc-primary);
}

/* =========================================================================
   DASHBOARD FOOTER
   ========================================================================= */
.fnc-dashboard-footer {
    background: var(--fnc-neutral-100);
    border-radius: var(--fnc-radius-md);
    padding: 12px 16px;
}

.fnc-dashboard-footer .fnc-footer-text {
    font-size: 12px;
    color: var(--fnc-neutral-500);
}

/* =========================================================================
   SKELETON LOADING
   ========================================================================= */
.fnc-skeleton {
    background: linear-gradient(90deg, var(--fnc-neutral-200) 25%, var(--fnc-neutral-100) 50%, var(--fnc-neutral-200) 75%);
    background-size: 200% 100%;
    animation: fnc-skeleton-loading 1.5s infinite;
    border-radius: var(--fnc-radius-sm);
}

@keyframes fnc-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.fnc-skeleton-card {
    height: 100px;
    border-radius: var(--fnc-radius-md);
}

.fnc-skeleton-hero {
    height: 200px;
    border-radius: var(--fnc-radius-lg);
}

.fnc-skeleton-chart {
    height: 300px;
    border-radius: var(--fnc-radius-lg);
}
