/* ==========================================================================
   Neo-Fintech Design System - Finanzas
   Inspirado no visual arrojado e tecnológico de Nubank, Revolut e Linear
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Superfícies e Fundos */
    --bg-base: #0B0F19;
    --bg-surface: #111827;
    --bg-card: #141E33;
    --bg-card-hover: #1A2742;
    --bg-elevated: #1E2B48;

    /* Cores de Destaque */
    --primary-500: #8B5CF6;
    --primary-600: #7C3AED;
    --primary-gradient: linear-gradient(135deg, #8B5CF6 0%, #6366F1 50%, #4F46E5 100%);
    --emerald-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --rose-gradient: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
    --cyan-gradient: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);

    /* Bordas e Sombras */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(139, 92, 246, 0.4);
    
    /* Tipografia */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
}

/* Reset e Base */
body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.12) 0px, transparent 45%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Alinhamento perfeito de valores monetários */
.tabular-nums, .amount-val {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.font-mono-amount {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(11, 15, 25, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.4);
}

/* Componente: Cartão Neo-Fintech */
.neo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.neo-card-hover:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6);
}

/* Glassmorphism Refinado */
.neo-glass {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
}

/* Efeitos de Glow */
.glow-purple {
    box-shadow: 0 0 30px -5px rgba(139, 92, 246, 0.3);
}
.glow-emerald {
    box-shadow: 0 0 30px -5px rgba(16, 185, 129, 0.25);
}
.glow-rose {
    box-shadow: 0 0 30px -5px rgba(244, 63, 94, 0.25);
}

/* Componente: Formulários e Inputs */
.neo-input {
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: 0.875rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    width: 100%;
    outline: none;
}
.neo-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(17, 24, 39, 0.9);
}
.neo-input::placeholder {
    color: var(--text-dim);
}

/* Botões Neo-Fintech */
.neo-btn-primary {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    border-radius: 0.875rem;
    padding: 0.75rem 1.5rem;
    border: none;
    box-shadow: 0 4px 20px -2px rgba(124, 58, 237, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.neo-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px -2px rgba(124, 58, 237, 0.5);
    filter: brightness(1.08);
}
.neo-btn-primary:active {
    transform: translateY(0);
}

.neo-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-weight: 500;
    border-radius: 0.875rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.neo-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: white;
}

/* Badges e Pílulas */
.neo-badge-income {
    background: rgba(16, 185, 129, 0.12);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.neo-badge-income::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.neo-badge-expense {
    background: rgba(244, 63, 94, 0.12);
    color: #FB7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.neo-badge-expense::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #F43F5E;
    box-shadow: 0 0 8px #F43F5E;
}

/* Sidebar e Navegação */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    gap: 0.875rem;
    position: relative;
}
.sidebar-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}
.sidebar-link.active {
    color: #FFFFFF;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 3px solid #8B5CF6;
    font-weight: 600;
}
.sidebar-link.active i {
    color: #A78BFA;
}

/* Animações */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}
.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* Compatibilidade com classes anteriores para transição limpa */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
/* ==========================================================================
   Regras de Impressão e Exportação PDF (@media print)
   ========================================================================== */
@media print {
    aside,
    header,
    footer,
    .sidebar-link,
    button,
    form,
    #reportFilterForm,
    .no-print,
    .export-actions {
        display: none !important;
    }

    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        background-image: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Remover recuo da sidebar no desktop */
    .md\:pl-72, [class*="md:pl-72"] {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    main {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .neo-card {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        margin-bottom: 15px !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
        color: #0f172a !important;
        font-size: 11px !important;
    }

    th {
        background: #f1f5f9 !important;
        color: #1e293b !important;
        border-bottom: 2px solid #cbd5e1 !important;
        padding: 6px 8px !important;
    }

    td {
        color: #0f172a !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 6px 8px !important;
    }

    tfoot tr {
        background: #e2e8f0 !important;
        font-weight: bold !important;
    }

    .text-white, .text-slate-100, .text-slate-200, .text-slate-300, .text-slate-400 {
        color: #0f172a !important;
    }

    .text-emerald-400 {
        color: #15803d !important;
    }

    .text-rose-400 {
        color: #be123c !important;
    }

    .text-cyan-300 {
        color: #0f172a !important;
    }

    .print-header {
        display: block !important;
        background: transparent !important;
        color: #0f172a !important;
        border-bottom: 2px solid #6366f1 !important;
        padding-bottom: 10px !important;
        margin-bottom: 15px !important;
    }
}
