[x-cloak] { display: none !important; }
        html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
        body { font-feature-settings: "cv02","cv03","cv04","cv11"; letter-spacing: -0.01em; }
        
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
        .dark ::-webkit-scrollbar-thumb { background: #334155; }
        .dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

        .progress-shine { background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%); background-size: 200% 100%; animation: shine 2s infinite; }
        @keyframes shine { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
        
        .texture-done { background-image: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255,255,255,0.1) 4px, rgba(255,255,255,0.1) 8px); }
        .texture-ahead { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.1) 8px, transparent 8px, transparent 16px); background-size: 22px 22px; animation: move-texture 1.5s linear infinite; }
        .texture-hazard { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.15), rgba(0,0,0,0.15) 8px, transparent 8px, transparent 16px); }
        .dark .texture-hazard { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.15), rgba(255,255,255,0.15) 8px, transparent 8px, transparent 16px); }
        @keyframes move-texture { 0% { background-position: 0 0; } 100% { background-position: 22px 0; } }
        
        .animate-trend-up { animation: trend-bounce 2s ease-in-out infinite; }
        @keyframes trend-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

        input:focus, button:focus, [contenteditable]:focus, select:focus, textarea:focus { outline: none; }
        .focus-ring:focus-visible { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); border-color: #2563eb; }
        
        input:disabled, select:disabled, textarea:disabled { opacity: 0.7; cursor: not-allowed; background-color: transparent !important; }

        /* CORREÇÃO DO MODO ESCURO */
        .dark input:-webkit-autofill,
        .dark input:-webkit-autofill:hover,
        .dark input:-webkit-autofill:focus,
        .dark input:-webkit-autofill:active,
        .dark textarea:-webkit-autofill,
        .dark textarea:-webkit-autofill:hover,
        .dark textarea:-webkit-autofill:focus,
        .dark select:-webkit-autofill,
        .dark select:-webkit-autofill:hover,
        .dark select:-webkit-autofill:focus {
            -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
            -webkit-text-fill-color: white !important;
            transition: background-color 5000s ease-in-out 0s;
        }

        /* Estilos Restritos para Exportação PDF (Gantt) */
        .pdf-export-mode { padding: var(--export-pad-y, 40px) var(--export-pad-x, 40px) !important; width: var(--total-width) !important; min-width: var(--total-width) !important; max-width: var(--total-width) !important; box-sizing: border-box !important; }
        html:not(.dark) .pdf-export-mode { background: #ffffff !important; }
        html.dark .pdf-export-mode { background: #0f172a !important; }
        
        html:not(.dark) .pdf-export-mode * { color: #0f172a !important; border-color: #e2e8f0 !important; }
        html:not(.dark) .pdf-export-mode .bg-slate-900, html:not(.dark) .pdf-export-mode .dark\:bg-slate-900 { background: #f8fafc !important; }
        html:not(.dark) .pdf-export-mode .text-white, html:not(.dark) .pdf-export-mode .dark\:text-white { color: #0f172a !important; }
        
        .pdf-export-mode > div { width: var(--content-width) !important; min-width: var(--content-width) !important; max-width: var(--content-width) !important; flex-shrink: 0 !important; margin: 0 auto !important; }
        .pdf-export-mode .sticky { position: relative !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; transform: none !important; }

        /* Estilos Restritos para Exportação PDF (Relatório Executivo) */
        .pdf-report-mode { 
            width: 794px !important; 
            max-width: 794px !important; 
            min-width: 794px !important; 
            margin: 0 auto !important; 
            padding: 0 !important; 
            box-sizing: border-box !important; 
            border: none !important; 
            box-shadow: none !important; 
        }
        html:not(.dark) .pdf-report-mode { background: #ffffff !important; color: #0f172a !important; }
        html.dark .pdf-report-mode { background: #0f172a !important; color: #f8fafc !important; }
        
        .pdf-report-mode * { box-shadow: none !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
        .pdf-report-mode .export-page { padding: 48px !important; }
        .pdf-report-mode .report-hide { display: none !important; }
        .pdf-report-mode .report-show { display: block !important; }
        .pdf-report-mode .break-avoid { page-break-inside: avoid !important; break-inside: avoid !important; }
        .pdf-report-mode tr { page-break-inside: avoid !important; break-inside: avoid !important; }
        .pdf-report-mode .break-before { page-break-before: always !important; break-before: page !important; }
        .pdf-report-mode textarea { resize: none !important; overflow: hidden !important; border: none !important; background: transparent !important; color: inherit !important; }
        .report-show { display: none; }
        
        .glass-panel { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(226, 232, 240, 0.8); }
        .dark .glass-panel { background: rgba(15, 23, 42, 0.85); border-bottom: 1px solid rgba(51, 65, 85, 0.8); }

        .table-input { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px; transition: all 0.2s; color: inherit; }
        .table-input:not(:disabled):hover { border-color: #e2e8f0; background: #f8fafc; color: #0f172a; }
        .dark .table-input:not(:disabled):hover { border-color: #334155; background: #1e293b; color: #ffffff; }
        .table-input:not(:disabled):focus { border-color: #2563eb; background: #ffffff; color: #0f172a; box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1); }
        .dark .table-input:not(:disabled):focus { border-color: #3b82f6; background: #0f172a; color: #ffffff; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2); }

        input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.5; cursor: pointer; transition: 0.2s; }
        input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

        /* Navegação por âncora: compensa a altura do header fixo ao saltar entre seções */
        .anchor-section { scroll-margin-top: 96px; }

        /* Link "Pular para o conteúdo" — acessível via teclado, some visualmente até receber foco */
        .skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 300; transition: top 0.2s ease; }
        .skip-link:focus { top: 1rem; }

        /* Cabeçalho da tabela analítica permanece visível durante a rolagem vertical da lista */
        .table-scroll-area { max-height: 70vh; overflow-y: auto; }
        .table-scroll-area .table-head-sticky { position: sticky; top: 0; z-index: 30; }

        /* Botão "voltar ao topo" */
        .back-to-top-btn { transition: opacity 0.2s ease, transform 0.2s ease; }