
        /* Variáveis de Cores (Tema Claro Padrão) */
        :root {
            --bg: #f0f2f5;
            --panel-bg: #ffffff;
            --text-main: #5a5c69;
            --text-muted: #858796;
            --primary: #4e73df;
            --success: #1cc88a;
            --danger: #e74a3b;
            --warning: #f6c23e;
            --border: #e3e6f0;
            --input-bg: #ffffff;
        }

        /* Variáveis de Cores (Tema Escuro) */
        [data-theme="dark"] {
            --bg: #121212;
            --panel-bg: #1e1e1e;
            --text-main: #f8f9fa;
            --text-muted: #adb5bd;
            --primary: #375a7f;
            --success: #00bc8c;
            --danger: #e74c3c;
            --warning: #f39c12;
            --border: #333333;
            --input-bg: #2b2b2b;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; }
        body { background-color: var(--bg); color: var(--text-main); padding: 20px; transition: background-color 0.3s, color 0.3s; }
        .container { max-width: 1000px; margin: auto; }

        /* Cabeçalho e Controles */
        header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
        .header-title { display: flex; align-items: center; gap: 10px; color: var(--primary); font-size: 24px; font-weight: bold;}
        
        .controls { display: flex; align-items: center; gap: 15px; }
        .btn-pdf { background: var(--text-main); color: var(--panel-bg); border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; transition: 0.3s; }
        .btn-lang { background: transparent; color: var(--text-main); border: 2px solid var(--primary); padding: 5px 10px; border-radius: 5px; cursor: pointer; font-weight: bold; }

        /* Toggle Switch (Modo Escuro) */
        .theme-switch-wrapper { display: flex; align-items: center; }
        .theme-switch { position: relative; display: inline-block; width: 54px; height: 28px; }
        .theme-switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #999898; transition: .4s; border-radius: 34px; display: flex; justify-content: space-between; align-items: center; padding: 0 6px; font-size: 14px; }
        .slider .fa-moon { color: #f1c40f; }
        .slider .fa-sun { color: #f39c12; }
        .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; z-index: 2; }
        input:checked + .slider { background-color: var(--primary); }
        input:checked + .slider:before { transform: translateX(26px); }

        /* Filtro */
        .filter-section { background: var(--panel-bg); padding: 15px; border-radius: 10px; margin-bottom: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid var(--border); }
        input, select { padding: 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--input-bg); color: var(--text-main); }

        /* Dashboard */
        .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
        .card { background: var(--panel-bg); padding: 20px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-left: 5px solid var(--primary); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
        .card.income { border-left-color: var(--success); }
        .card.expense { border-left-color: var(--danger); }
        .card h4 { font-size: 12px; text-transform: uppercase; color: var(--text-muted); }
        .card p { font-size: 22px; font-weight: bold; margin-top: 5px; }

        /* Layout Principal */
        .main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        @media (max-width: 800px) { .main-grid { grid-template-columns: 1fr; } }
        .panel { background: var(--panel-bg); padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid var(--border); }
        h3 { margin-bottom: 20px; font-size: 18px; border-bottom: 2px solid var(--bg); padding-bottom: 10px; color: var(--text-main); }

        /* Formulário */
        .form-group { margin-bottom: 15px; }
        .form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
        .form-group input, .form-group select { width: 100%; }
        .btn-save { width: 100%; padding: 12px; border: none; border-radius: 5px; background: var(--primary); color: white; font-weight: bold; cursor: pointer; }
        .btn-cancel { width: 100%; padding: 8px; border: none; border-radius: 5px; background: var(--text-muted); color: white; margin-top: 5px; cursor: pointer; display: none; }

        /* Metas/Budgets */
        .budget-item { margin-bottom: 15px; }
        .budget-info { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
        .progress-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; border: 1px solid var(--border); }
        .progress-fill { height: 100%; transition: width 0.3s; }

        /* Lista */
        .transaction-list { list-style: none; max-height: 400px; overflow-y: auto; }
        .transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); transition: background 0.2s; }
        .transaction-item:hover { background: var(--bg); }
        .item-info div { font-size: 14px; font-weight: bold; }
        .item-info small { color: var(--text-muted); font-size: 11px; }
        .item-amount { font-weight: bold; display: flex; align-items: center; gap: 10px; }
        .actions i { cursor: pointer; margin-left: 10px; transition: color 0.2s; }
        .fa-edit { color: var(--primary); }
        .fa-trash { color: var(--danger); }

        /* Impressão */
        @media print {
            .controls, .filter-section, .form-panel, .btn-config-meta { display: none !important; }
            body { background: white; color: black; }
            .panel { box-shadow: none; border: 1px solid #eee; }
        }