       :root {
            /* paleta de cores */
            --bg-body: #f8fafc;
            --bg-card: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border-color: #e2e8f0;
            
            --primary: #3b82f6;
            --primary-hover: #2563eb;
            --success: #10b981;
            --danger: #ef4444;
            
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
            
            --radius-md: 12px;
            --radius-lg: 16px;
            --transition: all 0.2s ease-in-out;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
            -webkit-font-smoothing: antialiased;
        }

        body {
            background-color: var(--bg-body);
            color: var(--text-main);
            line-height: 1.5;
            overflow-x: hidden;
        }

        /* tipografia */
        h1, h2, h3 { font-weight: 600; color: var(--text-main); }
        .text-primary { color: var(--primary); }
        .text-success { color: var(--success); }
        .text-danger { color: var(--danger); }
        .text-muted { color: var(--text-muted); }

        /* layout principal */
        .app-container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 24px 16px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        /* navbar */
        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--bg-card);
            padding: 16px 24px;
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
        }

        .brand { 
            font-size: 1.25rem; 
            font-weight: 700; 
            display: flex; 
            align-items: center; 
            gap: 8px;
            color: var(--text-main);
        }

        .nav-actions { display: flex; gap: 12px; }

        /* cards base */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
            padding: 24px;
            transition: var(--transition);
        }

        .card:hover { box-shadow: var(--shadow-md); }

        /* botões */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: var(--bg-card);
            color: var(--text-main);
            border: 1px solid var(--border-color);
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .btn:hover { background: var(--bg-body); border-color: #cbd5e1; }

        .btn-primary {
            background: var(--primary);
            color: white;
            border: none;
        }
        
        .btn-primary:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
            box-shadow: var(--shadow-sm);
        }

        .btn-icon { padding: 10px; }

        /* dashboard grid */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 16px;
        }

        .stat-card {
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
        }

        .stat-header {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
            font-size: 0.875rem;
            font-weight: 500;
        }

        .stat-value { font-size: 1.75rem; font-weight: 700; }

        /* grid principal tabela e gráficos */
        .main-grid {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 24px;
        }

        /* controles da tabela */
        .controls-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            gap: 16px;
        }

        .input-group { display: flex; gap: 12px; flex: 1; justify-content: flex-end; }

        input, select {
            width: 100%;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 0.875rem;
            outline: none;
            transition: var(--transition);
        }

        input:focus, select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        /* tabela responsiva */
        .table-container { width: 100%; }
        table { width: 100%; border-collapse: collapse; text-align: left; }
        th, td { padding: 16px; border-bottom: 1px solid var(--border-color); font-size: 0.875rem; }
        th { font-weight: 600; color: var(--text-muted); background: var(--bg-body); border-radius: 4px; }
        tr:hover td { background-color: var(--bg-body); }
        tr:last-child td { border-bottom: none; }
        
        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
            background: var(--bg-body);
            color: var(--text-muted);
            border: 1px solid var(--border-color);
        }

        .action-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 1rem;
            transition: var(--transition);
            padding: 4px;
        }
        .action-btn:hover { color: var(--danger); }

        /* metas e progresso */
        .progress-container { margin-top: 16px; }
        .progress-header { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 8px; color: var(--text-muted); }
        .progress-bar-bg {
            width: 100%;
            height: 8px;
            background: var(--border-color);
            border-radius: 999px;
            overflow: hidden;
        }
        .progress-bar-fill {
            height: 100%;
            background: var(--primary);
            width: 0%;
            border-radius: 999px;
            transition: width 1s ease-out;
        }

        /* dicas */
        .tips-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
        .tip-item {
            font-size: 0.875rem;
            padding: 12px;
            background: var(--bg-body);
            border-left: 4px solid var(--primary);
            border-radius: 4px;
            color: var(--text-muted);
        }

        /* modal */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(4px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            padding: 16px;
        }
        .modal-overlay.active { opacity: 1; visibility: visible; }
        
        .modal-content {
            background: var(--bg-card);
            width: 100%;
            max-width: 400px;
            border-radius: var(--radius-lg);
            padding: 24px;
            transform: translateY(20px) scale(0.95);
            transition: var(--transition);
            box-shadow: var(--shadow-lg);
        }
        .modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
        
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .modal-header h2 { font-size: 1.25rem; }
        
        .form-group { margin-bottom: 16px; }
        .form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--text-main); }

        /* toast notifications */
        .toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
        .toast {
            background: var(--text-main);
            color: white;
            padding: 14px 20px;
            border-radius: 8px;
            box-shadow: var(--shadow-lg);
            font-size: 0.875rem;
            display: flex;
            align-items: center;
            gap: 12px;
            transform: translateY(100%);
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        .toast.show { transform: translateY(0); opacity: 1; }
        .toast.error { background: var(--danger); }

        /* PDF export - classes injetadas por JS */
        .pdf-export-mode {
            background: white !important;
            padding: 0 !important;
        }
        .pdf-export-mode .app-container {
            max-width: 100% !important;
            padding: 20px !important;
        }
        .pdf-export-mode .card {
            box-shadow: none !important;
            border: 1px solid #ddd !important;
            break-inside: avoid;
        }

        /* responsividade mobile */
        @media (max-width: 768px) {
            .navbar { flex-direction: column; gap: 16px; align-items: stretch; }
            .brand { justify-content: center; margin-bottom: 8px; }
            .nav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
            
            .main-grid { grid-template-columns: 1fr; }
            
            .controls-bar { flex-direction: column; align-items: stretch; gap: 12px; }
            .input-group { flex-direction: column; }

            /* transformação Tabela em Cards Mobile */
            table, thead, tbody, th, td, tr { display: block; width: 100%; }
            thead tr { position: absolute; top: -9999px; left: -9999px; } /* esconde cabeçalho */
            
            tr {
                border: 1px solid var(--border-color);
                border-radius: var(--radius-md);
                margin-bottom: 16px;
                background: var(--bg-card);
                padding: 8px 0;
            }
            
            td {
                border: none;
                border-bottom: 1px solid var(--bg-body);
                position: relative;
                padding: 12px 16px 12px 40%; 
                text-align: right;
                display: flex;
                justify-content: flex-end;
                align-items: center;
                min-height: 48px;
            }
            
            td:last-child { border-bottom: none; }
            
            /* injet rótulos lidos atributo data-label */
            td::before {
                content: attr(data-label);
                position: absolute;
                left: 16px;
                width: 35%;
                white-space: nowrap;
                text-align: left;
                font-weight: 500;
                color: var(--text-muted);
            }

            .toast-container { bottom: 16px; left: 16px; right: 16px; }
        }
       
       /* Rodapé */
        .footer {
            background-color: #000000;
            color: #ffffff;
            text-align: center;
            padding: 20px 0;
            font-family: Arial, sans-serif;
            font-size: 14px;
            width: 100%;
            position: relative;
            bottom: 0;
        }

        .footer p {
            margin: 2px 0;
        }

        .footer .copyright {
            font-weight: lighter;
            opacity: 0.8;
        }
