﻿{"id":8634,"date":"2026-01-26T08:17:21","date_gmt":"2026-01-26T11:17:21","guid":{"rendered":"https:\/\/investe360.com\/?page_id=8634"},"modified":"2026-01-26T19:24:09","modified_gmt":"2026-01-26T22:24:09","slug":"calcular-preco-teto","status":"publish","type":"page","link":"https:\/\/investe360.com\/en\/calcular-preco-teto\/","title":{"rendered":"Calcular Pre\u00e7o Teto"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"8634\" class=\"elementor elementor-8634\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"has-el-gap el-gap-default elementor-section elementor-top-section elementor-element elementor-element-29e235c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"29e235c\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cf8ae37\" data-id=\"cf8ae37\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d39797c elementor-widget elementor-widget-shortcode\" data-id=\"d39797c\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\r\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/apexcharts\"><\/script>\r\n    <style>\r\n        \/* =========================================\r\n                           VALUATION COMBO STYLES (PREMIUM DARK) - STRICT\r\n                           ========================================= *\/\r\n        #valuation-n8n-plugin-container {\r\n            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;\r\n            color: #333 !important;\r\n            line-height: 1.6 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container * {\r\n            box-sizing: border-box !important;\r\n        }\r\n\r\n        .valuation-wrapper {\r\n            max-width: 900px;\r\n            margin: 40px auto;\r\n        }\r\n\r\n        \/* --- CALCULATOR CARD --- *\/\r\n        #valuation-n8n-plugin-container .valuation-calculator {\r\n            background: #fff !important;\r\n            border-radius: 12px;\r\n            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;\r\n            overflow: hidden;\r\n            margin-bottom: 30px;\r\n            border: 1px solid #e0e0e0 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-calculator h2 {\r\n            background-color: #1a1a1a !important;\r\n            color: #fff !important;\r\n            margin: 0 !important;\r\n            padding: 25px !important;\r\n            text-align: center !important;\r\n            font-size: 1.5rem !important;\r\n            font-weight: 600 !important;\r\n            border-bottom: 4px solid #d93025 !important;\r\n            text-transform: none !important;\r\n            letter-spacing: normal !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-form-group {\r\n            padding: 30px 30px 10px !important;\r\n            position: relative;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-form-group label {\r\n            display: block !important;\r\n            font-weight: bold !important;\r\n            margin-bottom: 8px !important;\r\n            color: #555 !important;\r\n            font-size: 0.95rem !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-input {\r\n            width: 100% !important;\r\n            padding: 15px !important;\r\n            font-size: 1.1rem !important;\r\n            border: 2px solid #eee !important;\r\n            border-radius: 8px !important;\r\n            text-transform: uppercase !important;\r\n            background: #fdfdfd !important;\r\n            color: #333 !important;\r\n            box-shadow: none !important;\r\n            height: auto !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-input:focus {\r\n            border-color: #d93025 !important;\r\n            background: #fff !important;\r\n            outline: none !important;\r\n            box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.1) !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-btn {\r\n            display: block !important;\r\n            width: calc(100% - 60px) !important;\r\n            margin: 20px 30px 40px !important;\r\n            background-color: #d93025 !important;\r\n            color: #fff !important;\r\n            border: none !important;\r\n            padding: 16px !important;\r\n            font-size: 1.1rem !important;\r\n            font-weight: 700 !important;\r\n            text-transform: uppercase !important;\r\n            border-radius: 8px !important;\r\n            cursor: pointer !important;\r\n            transition: background 0.3s !important;\r\n            letter-spacing: 0.5px !important;\r\n            height: auto !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .valuation-btn:hover {\r\n            background-color: #b71c1c !important;\r\n            transform: translateY(-1px);\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .loading-msg {\r\n            display: none;\r\n            text-align: center;\r\n            padding-bottom: 20px;\r\n            color: #666;\r\n            font-style: italic;\r\n        }\r\n\r\n        \/* --- AUTOCOMPLETE --- *\/\r\n        #valuation-n8n-plugin-container .autocomplete-list {\r\n            position: absolute;\r\n            border: 1px solid #ddd;\r\n            border-top: none;\r\n            z-index: 9999 !important;\r\n            top: 100px;\r\n            left: 30px;\r\n            right: 30px;\r\n            background-color: #fff !important;\r\n            border-radius: 0 0 8px 8px;\r\n            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\r\n            max-height: 200px;\r\n            overflow-y: auto;\r\n            display: none;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .autocomplete-item {\r\n            padding: 12px;\r\n            cursor: pointer;\r\n            font-size: 0.95rem;\r\n            border-bottom: 1px solid #f0f0f0;\r\n            color: #333;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .autocomplete-item:hover {\r\n            background-color: #f9f9f9 !important;\r\n            color: #d93025 !important;\r\n        }\r\n\r\n        \/* --- RESULT GRID (SIDE BY SIDE) --- *\/\r\n        #valuation-n8n-plugin-container .valuation-result {\r\n            padding: 0 30px 40px !important;\r\n            animation: fadeIn 0.5s ease;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .result-header {\r\n            display: flex !important;\r\n            justify-content: space-between !important;\r\n            align-items: center !important;\r\n            background: #f4f6f8 !important;\r\n            padding: 15px 20px !important;\r\n            border-radius: 8px !important;\r\n            margin-bottom: 25px !important;\r\n            border-left: 5px solid #2c3e50 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .folder-ticker {\r\n            font-size: 1.4rem !important;\r\n            font-weight: 800 !important;\r\n            color: #2c3e50 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .folder-price {\r\n            font-size: 1.1rem !important;\r\n            color: #555 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .methods-grid {\r\n            display: grid !important;\r\n            grid-template-columns: 1fr 1fr !important;\r\n            gap: 20px !important;\r\n            margin-bottom: 30px !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .method-card {\r\n            background: #fff !important;\r\n            border: 1px solid #e0e0e0 !important;\r\n            border-radius: 8px !important;\r\n            padding: 20px !important;\r\n            text-align: center !important;\r\n            position: relative;\r\n            overflow: hidden;\r\n            box-shadow: none !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .method-card::before {\r\n            content: '';\r\n            position: absolute;\r\n            top: 0;\r\n            left: 0;\r\n            width: 100%;\r\n            height: 4px;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .method-card.graham::before {\r\n            background: #2980b9 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .method-card.bazin::before {\r\n            background: #27ae60 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .method-title {\r\n            font-size: 0.9rem !important;\r\n            text-transform: uppercase !important;\r\n            letter-spacing: 1px !important;\r\n            color: #7f8c8d !important;\r\n            margin-bottom: 15px !important;\r\n            font-weight: 600 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .price-display {\r\n            font-size: 1.8rem !important;\r\n            font-weight: 800 !important;\r\n            color: #2c3e50 !important;\r\n            margin: 10px 0 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .upside-tag {\r\n            display: inline-block !important;\r\n            padding: 4px 12px !important;\r\n            border-radius: 20px !important;\r\n            font-size: 0.85rem !important;\r\n            font-weight: 700 !important;\r\n            background: #f1f1f1 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .upside-positive {\r\n            background-color: #e8f5e9 !important;\r\n            color: #2e7d32 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .upside-negative {\r\n            background-color: #ffebee !important;\r\n            color: #c62828 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .extra-info {\r\n            font-size: 0.8rem;\r\n            color: #999;\r\n            margin-top: 10px;\r\n        }\r\n\r\n        \/* --- ADVANCED FEATURES: TABLES & INPUTS --- *\/\r\n        #valuation-n8n-plugin-container .details-section h4 {\r\n            font-size: 1.1rem !important;\r\n            color: #2c3e50 !important;\r\n            margin-bottom: 15px !important;\r\n            border-left: 4px solid #d93025 !important;\r\n            padding-left: 10px !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container table.bazin-table {\r\n            width: 100% !important;\r\n            border-collapse: collapse !important;\r\n            margin-bottom: 20px !important;\r\n            font-size: 0.9rem !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container table.bazin-table th,\r\n        #valuation-n8n-plugin-container table.bazin-table td {\r\n            padding: 10px !important;\r\n            border: 1px solid #eee !important;\r\n            text-align: center !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container table.bazin-table th {\r\n            background: #f9f9f9 !important;\r\n            font-weight: 600 !important;\r\n            color: #555 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .badge-buy {\r\n            background: #27ae60 !important;\r\n            color: #fff !important;\r\n            padding: 3px 8px !important;\r\n            border-radius: 4px !important;\r\n            font-size: 0.75rem !important;\r\n            font-weight: bold !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .badge-wait {\r\n            background: #e74c3c !important;\r\n            color: #fff !important;\r\n            padding: 3px 8px !important;\r\n            border-radius: 4px !important;\r\n            font-size: 0.75rem !important;\r\n            font-weight: bold !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .graham-controls {\r\n            background: #fdfdfd !important;\r\n            padding: 15px !important;\r\n            border: 1px solid #eee !important;\r\n            border-radius: 8px !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .control-group {\r\n            display: flex !important;\r\n            justify-content: space-between !important;\r\n            margin-bottom: 10px !important;\r\n            align-items: center !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .control-group label {\r\n            font-size: 0.9rem !important;\r\n            color: #666 !important;\r\n            margin: 0 !important;\r\n        }\r\n\r\n        #valuation-n8n-plugin-container .control-input {\r\n            width: 70px !important;\r\n            padding: 5px !important;\r\n            border: 1px solid #ddd !important;\r\n            border-radius: 4px !important;\r\n            text-align: center !important;\r\n        }\r\n\r\n        @keyframes fadeIn {\r\n            from {\r\n                opacity: 0;\r\n                transform: translateY(10px);\r\n            }\r\n\r\n            to {\r\n                opacity: 1;\r\n                transform: translateY(0);\r\n            }\r\n        }\r\n\r\n        \/* Mobile Responsive *\/\r\n        @media (max-width: 600px) {\r\n            #valuation-n8n-plugin-container .methods-grid {\r\n                grid-template-columns: 1fr !important;\r\n            }\r\n\r\n            #valuation-n8n-plugin-container .result-header {\r\n                flex-direction: column !important;\r\n                align-items: flex-start !important;\r\n                gap: 5px !important;\r\n            }\r\n        }\r\n\r\n        \/* =========================================\r\n               DARK MODE SUPPORT (SmartMag: .s-dark)\r\n               ========================================= *\/\r\n        html.s-dark #valuation-n8n-plugin-container .valuation-calculator,\r\n        html.site-s-dark #valuation-n8n-plugin-container .valuation-calculator {\r\n            background: #1e1e1e !important;\r\n            border-color: #333 !important;\r\n            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .valuation-calculator h2,\r\n        html.site-s-dark #valuation-n8n-plugin-container .valuation-calculator h2 {\r\n            background-color: #000 !important;\r\n            color: #fff !important;\r\n            border-bottom-color: #d93025 !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .valuation-form-group label,\r\n        html.site-s-dark #valuation-n8n-plugin-container .valuation-form-group label {\r\n            color: #ccc !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .valuation-input,\r\n        html.site-s-dark #valuation-n8n-plugin-container .valuation-input {\r\n            background: #2b2b2b !important;\r\n            border-color: #444 !important;\r\n            color: #fff !important;\r\n            box-shadow: none !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .valuation-input:focus,\r\n        html.site-s-dark #valuation-n8n-plugin-container .valuation-input:focus {\r\n            background: #333 !important;\r\n            border-color: #d93025 !important;\r\n        }\r\n\r\n        \/* Results *\/\r\n        html.s-dark #valuation-n8n-plugin-container .result-header,\r\n        html.site-s-dark #valuation-n8n-plugin-container .result-header {\r\n            background: #2b2b2b !important;\r\n            border-left-color: #d93025 !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .folder-ticker,\r\n        html.site-s-dark #valuation-n8n-plugin-container .folder-ticker {\r\n            color: #fff !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .folder-price,\r\n        html.site-s-dark #valuation-n8n-plugin-container .folder-price {\r\n            color: #aaa !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .method-card,\r\n        html.site-s-dark #valuation-n8n-plugin-container .method-card {\r\n            background: #2b2b2b !important;\r\n            border-color: #444 !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .method-title,\r\n        html.site-s-dark #valuation-n8n-plugin-container .method-title {\r\n            color: #aaa !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .price-display,\r\n        html.site-s-dark #valuation-n8n-plugin-container .price-display {\r\n            color: #fff !important;\r\n        }\r\n\r\n        \/* Autocomplete *\/\r\n        html.s-dark #valuation-n8n-plugin-container .autocomplete-list,\r\n        html.site-s-dark #valuation-n8n-plugin-container .autocomplete-list {\r\n            background-color: #2b2b2b !important;\r\n            border-color: #444 !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .autocomplete-item,\r\n        html.site-s-dark #valuation-n8n-plugin-container .autocomplete-item {\r\n            border-bottom-color: #333 !important;\r\n            color: #eee !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .autocomplete-item:hover,\r\n        html.site-s-dark #valuation-n8n-plugin-container .autocomplete-item:hover {\r\n            background-color: #333 !important;\r\n            color: #d93025 !important;\r\n        }\r\n\r\n        \/* Tables and Controls *\/\r\n        html.s-dark #valuation-n8n-plugin-container .details-section h4,\r\n        html.site-s-dark #valuation-n8n-plugin-container .details-section h4 {\r\n            color: #eee !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container table.bazin-table th,\r\n        html.site-s-dark #valuation-n8n-plugin-container table.bazin-table th {\r\n            background: #333 !important;\r\n            color: #ccc !important;\r\n            border-color: #444 !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container table.bazin-table td,\r\n        html.site-s-dark #valuation-n8n-plugin-container table.bazin-table td {\r\n            border-color: #444 !important;\r\n            color: #eee !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .graham-controls,\r\n        html.site-s-dark #valuation-n8n-plugin-container .graham-controls {\r\n            background: #2b2b2b !important;\r\n            border-color: #444 !important;\r\n        }\r\n\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .control-group label,\r\n        html.site-s-dark #valuation-n8n-plugin-container .control-group label {\r\n            color: #ccc !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .control-group strong,\r\n        html.site-s-dark #valuation-n8n-plugin-container .control-group strong {\r\n            color: #e0e0e0 !important;\r\n        }\r\n\r\n        html.s-dark #valuation-n8n-plugin-container .control-input,\r\n        html.site-s-dark #valuation-n8n-plugin-container .control-input {\r\n            background: #333 !important;\r\n            color: #fff !important;\r\n            border-color: #555 !important;\r\n        }\r\n    <\/style>\r\n\r\n    <div id=\"valuation-n8n-plugin-container\">\r\n        <div class=\"valuation-wrapper\">\r\n            <div class=\"valuation-calculator\">\r\n                <h2>Calculador Pre\u00e7o Teto<\/h2>\r\n\r\n                <div class=\"valuation-form-group\">\r\n                    <label>Digite o c\u00f3digo da a\u00e7\u00e3o:<\/label>\r\n                    <input type=\"text\" id=\"comboTicker\" class=\"valuation-input\" placeholder=\"Ex: BBAS3, VALE3...\"\r\n                        autocomplete=\"off\">\r\n                    <div id=\"comboAutocomplete\" class=\"autocomplete-list\"><\/div>\r\n                <\/div>\r\n\r\n                <button id=\"comboBtn\" class=\"valuation-btn\">CALCULAR AGORA<\/button>\r\n\r\n                <div id=\"comboLoading\" class=\"loading-msg\">Processando Graham e Bazin...<\/div>\r\n\r\n                <div id=\"comboResult\" class=\"valuation-result\" style=\"display:none;\"><\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        document.addEventListener(\"DOMContentLoaded\", function () {\r\n            const tickers = [\"PETR4\",\"PETR3\",\"ITUB3\",\"ITUB4\",\"VALE5\",\"VALE3\",\"BBAS3\",\"BBDC3\",\"BBDC4\",\"AXIA3\",\"AXIA6\",\"ELET5\",\"SANB3\",\"SANB11\",\"SANB4\",\"ITSA3\",\"ITSA4\",\"ABEV3\",\"BPAC5\",\"BPAC11\",\"BPAC3\",\"VIVT3\",\"VIVT4\",\"GGBR3\",\"GGBR4\",\"HAPV3\",\"SUZB6\",\"SUZB5\",\"SUZB3\",\"JBSS3\",\"TEFC11\",\"SBSP3\",\"NEOE3\",\"AMBV4\",\"AMBV3\",\"CMIG4\",\"CMIG3\",\"PRIO3\",\"EQTL3\",\"RENT3\",\"CPLE11\",\"CPLE5\",\"CPLE6\",\"CPLE3\",\"TPRC6\",\"TPRC3\",\"TCSL4\",\"TIMP3\",\"CPFE3\",\"CRFB3\",\"ISAE4\",\"ISAE3\",\"VBBR3\",\"USIM6\",\"USIM5\",\"USIM3\",\"TMAR6\",\"TMAR5\",\"TMAR3\",\"ENEV3\",\"RDOR3\",\"ENGI4\",\"ENGI11\",\"ENGI3\",\"EMBJ3\",\"GOAU3\",\"GOAU4\",\"WEGE4\",\"WEGE3\",\"B3SA3\",\"MOTV3\",\"BNBR4\",\"BNBR3\",\"PSSA3\",\"UGPA4\",\"UGPA3\",\"NTCO3\",\"VCPA4\",\"FIBR3\",\"HYPE3\",\"ALLL11\",\"ALLL4\",\"ALLL3\",\"RAIL3\",\"TNLP4\",\"TNLP3\",\"BRFS3\",\"PRGA4\",\"CXSE3\",\"BELG4\",\"BELG3\",\"ARCE3\",\"COGN3\",\"KROT4\",\"KROT11\",\"ALOS3\",\"TNCP4\",\"TNCP3\",\"NATU3\",\"CSNA3\",\"TBLE6\",\"TBLE5\",\"EGIE3\",\"DAGB33\",\"AURE3\",\"SAPR4\",\"SAPR11\",\"SAPR3\",\"BRML3\",\"BRAV3\",\"SUZA4\",\"LATM11\",\"MBRF3\",\"MGLU3\",\"BRSR4\",\"BRSR6\",\"BRSR5\",\"BRSR3\",\"VNET3\",\"CIEL3\",\"ENBR3\",\"LCAM3\",\"EBTP3\",\"EBTP4\",\"LREN4\",\"LREN3\",\"BBSE3\",\"GMAT3\",\"UBBR4\",\"UBBR11\",\"UBBR3\",\"CYRE4\",\"CYRE3\",\"CBEE3\",\"TSPP4\",\"TSPP3\",\"VIVO3\",\"VIVO4\",\"ALUP4\",\"ALUP11\",\"ALUP3\",\"MRSA6\",\"MRSA5\",\"MRSA3\",\"CSMG3\",\"CSTB3\",\"CSTB4\",\"SULA11\",\"SULA3\",\"SULA4\",\"BIDI3\",\"BIDI4\",\"BIDI11\",\"MDIA3\",\"CEEB5\",\"CEEB3\",\"AZZA3\",\"KLBN3\",\"KLBN11\",\"KLBN4\",\"BPNM3\",\"BPAN4\",\"BRAP3\",\"BRAP4\",\"TAEE3\",\"TAEE11\",\"TAEE4\",\"ELPL4\",\"ELPL6\",\"ELPL5\",\"ELPL3\",\"RADL3\",\"SMTO3\",\"BAZA3\",\"GNDI3\",\"DASA3\",\"DXCO3\",\"PLIM4\",\"NETC3\",\"NETC4\",\"ABCB3\",\"ABCB4\",\"JHSF3\",\"CMIN3\",\"LAME4\",\"LAME3\",\"MULT3\",\"AESL3\",\"AESL4\",\"FFTL3\",\"FFTL4\",\"REDE4\",\"REDE3\",\"ELCA4\",\"ELCA3\",\"ASAI3\",\"SOMA3\",\"CZLT33\",\"SMFT3\",\"COCE5\",\"COCE6\",\"COCE3\",\"SRNA3\",\"LIGH3\",\"LIGT3\",\"RIAA3\",\"GUAR4\",\"MRVE3\",\"CSAN3\",\"BRTP3\",\"BRTP4\",\"IRBR3\",\"OMGE3\",\"BESP3\",\"BESP4\",\"EQPA6\",\"EQPA3\",\"EQPA7\",\"EQPA5\",\"TOTS3\",\"SLCE3\",\"EZTC3\",\"FLRY3\",\"CESP4\",\"CESP5\",\"CESP6\",\"CESP3\",\"AMER3\",\"TTEN3\",\"IGTI3\",\"IGTI11\",\"MLFT4\",\"CPRE3\",\"SIMH3\",\"ENAT3\",\"EQMA5\",\"EQMA6\",\"EQMA3\",\"RECV3\",\"CBAV3\",\"AESB3\",\"ECOR3\",\"MYPK3\",\"MYPK4\",\"BSLI3\",\"BSLI4\",\"CLSC6\",\"CLSC5\",\"CLSC3\",\"CLSC4\",\"GGPS3\",\"ENMT3\",\"ENMT4\",\"IGTA3\",\"BMGB4\",\"BMGB11\",\"PALF11\",\"PALF5\",\"PALF3\",\"POMO3\",\"POMO4\",\"ARTR3\",\"CEAB3\",\"TERI3\",\"GETT4\",\"GETT3\",\"LOGG3\",\"EEEL4\",\"EEEL3\",\"CAML3\",\"VSPT3\",\"VSPT4\",\"ALPA3\",\"ALPA4\",\"FESA4\",\"FESA3\",\"CPFG4\",\"CPFG3\",\"RAPT4\",\"RAPT3\",\"GRND3\",\"ACES4\",\"ACES3\",\"PGMN3\",\"BNCA3\",\"SBFG3\",\"DAYC3\",\"DAYC4\",\"INTB3\",\"MLAS3\",\"MOVI3\",\"VIVA3\",\"ESTC4\",\"ESTC11\",\"YDUQ3\",\"VTRU3\",\"CMET4\",\"TCOC4\",\"TCOC3\",\"GLOB4\",\"VVAR11\",\"VVAR4\",\"BHIA3\",\"EUCA4\",\"EUCA3\",\"PORT3\",\"BMEF3\",\"CEPE5\",\"CEPE6\",\"CEPE3\",\"CASN3\",\"ALSC3\",\"VAMO3\",\"MSAN4\",\"MSAN3\",\"RLOG3\",\"TUPY4\",\"TUPY3\",\"LWSA3\",\"FRAS4\",\"FRAS3\",\"VULC3\",\"VULC4\",\"AEDU11\",\"AEDU3\",\"BEES3\",\"BEES4\",\"ANIM3\",\"BOAS3\",\"BMEB3\",\"BMEB4\",\"EKTR4\",\"EKTR3\",\"BLAU3\",\"MAGG3\",\"BPAR3\",\"TIET11\",\"TIET3\",\"TIET4\",\"PRML3\",\"TAMM4\",\"TAMM3\",\"TANC4\",\"HBSA3\",\"GVTT3\",\"WSON33\",\"CSPC3\",\"CSPC4\",\"PCAR4\",\"PCAR5\",\"PCAR3\",\"AGRO3\",\"JALL3\",\"TSEP4\",\"TSEP3\",\"CEGR3\",\"AMOB3\",\"VVEO3\",\"ARCZ3\",\"ARCZ6\",\"DIRR3\",\"RGEG3\",\"EVEN3\",\"AGEI3\",\"CRUZ3\",\"BFIT4\",\"BFIT3\",\"BOVH3\",\"HBRE3\",\"MTBR3\",\"MTBR4\",\"WHRL3\",\"WHRL4\",\"CSRN3\",\"CSRN5\",\"CSRN6\",\"UNIP3\",\"UNIP5\",\"UNIP6\",\"TMCP3\",\"TMCP4\",\"DURA4\",\"DURA3\",\"BISA3\",\"RCTB42\",\"RCTB41\",\"RCTB31\",\"RCTB33\",\"TELB4\",\"TELB3\",\"PTQS4\",\"PETZ3\",\"VLID3\",\"HGTX4\",\"HGTX3\",\"OBTC3\",\"BRIV4\",\"BRIV3\",\"ESCE3\",\"CPSL3\",\"LINX3\",\"RDCD3\",\"GETI3\",\"GETI4\",\"VIGR3\",\"CSED3\",\"POSI3\",\"MILS3\",\"BRIT3\",\"CNFB4\",\"ALLD3\",\"EMAE4\",\"BRST3\",\"GFSA3\",\"INHA3\",\"AMIL3\",\"MDNE3\",\"ZAMP3\",\"SHUL4\",\"LAVV3\",\"CTIP3\",\"RANI4\",\"RANI3\",\"MATD3\",\"AURA33\",\"TRIS3\",\"HBOR3\",\"ORVR3\",\"CGAS3\",\"CGAS5\",\"DESK3\",\"PINE3\",\"PINE4\",\"CURY3\",\"PFRM3\",\"SEER3\",\"SOJA3\",\"JSLG3\",\"BRGE6\",\"BRGE7\",\"BRGE8\",\"BRGE11\",\"BRGE5\",\"BRGE12\",\"BRGE3\",\"GPIV33\",\"BEEF3\",\"AUTM3\",\"QUAL3\",\"PNVL3\",\"PNVL4\",\"ODPV3\",\"ARML3\",\"PRBC3\",\"PRBC4\",\"TASA4\",\"TASA3\",\"ROMI3\",\"ROMI4\",\"CRTP5\",\"CRTP3\",\"PTPA3\",\"PTPA4\",\"TEND3\",\"RNEW11\",\"RNEW3\",\"RNEW4\",\"RPSA4\",\"TMGC12\",\"TMGC7\",\"TMGC11\",\"TMGC13\",\"TMGC3\",\"MODL3\",\"MODL11\",\"MODL4\",\"CZRS3\",\"CZRS4\",\"BRPR3\",\"ENER5\",\"ENER3\",\"ENER6\",\"VINE3\",\"VINE5\",\"FIQE3\",\"AVIL3\",\"AMBP3\",\"LOGN3\",\"IVTT3\",\"BHGR3\",\"STBP11\",\"STBP3\",\"AUAU3\",\"SCAR4\",\"SCAR3\",\"AALR3\",\"VSTE3\",\"MELK3\",\"CRIV4\",\"CRIV3\",\"BMTO4\",\"BMTO3\",\"AGIN3\",\"EBEN4\",\"PLPL3\",\"PARD3\",\"RPAD6\",\"RPAD3\",\"RPAD5\",\"OPCT3\",\"CLAN3\",\"CLAN4\",\"UOLL4\",\"MTRE3\",\"DEXP3\",\"DEXP4\",\"POWE3\",\"ELMD3\",\"EGGY3\",\"UCOP4\",\"TNEP3\",\"TNEP4\",\"BMOB3\",\"BICB4\",\"BICB3\",\"MOAR3\",\"IMCH3\",\"DMVF3\",\"CEBR5\",\"CEBR6\",\"CEBR3\",\"PEAB4\",\"PEAB3\",\"BGIP4\",\"BGIP3\",\"ONCO3\",\"CGRA4\",\"CGRA3\",\"BPAT33\",\"TGMA3\",\"LEVE3\",\"LEVE4\",\"MEAL3\",\"PQUN3\",\"PQUN4\",\"ESPA3\",\"TESA3\",\"MAGS3\",\"ETER3\",\"ETER4\",\"GBIO33\",\"EBCO4\",\"EBCO3\",\"CRBM3\",\"CRBM7\",\"MSPA3\",\"MSPA4\",\"OFSA3\",\"BRBI11\",\"WLMM4\",\"WLMM3\",\"KEPL3\",\"DXTG4\",\"PATI3\",\"PATI4\",\"SFSA3\",\"SFSA4\",\"MARI3\",\"DOHL4\",\"DOHL3\",\"WIZC3\",\"SZPQ4\",\"LATS3\",\"SMLS3\",\"TARP11\",\"SYNE3\",\"MOSI3\",\"APER3\",\"CCIM3\",\"LAND3\",\"ILMD3\",\"ILMD4\",\"SQIA3\",\"CPFP4\",\"CLSA3\",\"VITT3\",\"HBTS5\",\"SULT4\",\"SULT3\",\"RAIA3\",\"JOPA4\",\"JOPA3\",\"GPAR3\",\"MERC3\",\"MERC4\",\"ODER3\",\"ODER4\",\"CRPG3\",\"CRPG6\",\"CRPG5\",\"TFCO4\",\"TDBH4\",\"TDBH3\",\"KSSA3\",\"POPR4\",\"DPPI4\",\"DPPI3\",\"SUBA3\",\"PRVI3\",\"SMLE3\",\"ASTA4\",\"TPIS3\",\"CASH3\",\"DMFN3\",\"RDTR3\",\"ELEV3\",\"PRNR3\",\"CVCB3\",\"SALM3\",\"SALM4\",\"WDCN3\",\"CSUD3\",\"SDIA4\",\"SDIA3\",\"BEMA3\",\"MTSA4\",\"CGOS3\",\"CGOS4\",\"ELUM3\",\"ELUM4\",\"TOKY3\",\"NGRD3\",\"FLCL6\",\"FLCL3\",\"FLCL5\",\"PTNT3\",\"PTNT4\",\"TECN3\",\"MEDI3\",\"KRSA3\",\"SEDU3\",\"LJQQ3\",\"CPNY3\",\"FRIO3\",\"REPA3\",\"REPA4\",\"MRSL4\",\"MRSL3\",\"ALPK3\",\"EALT4\",\"EALT3\",\"ALBA3\",\"IFCM3\",\"NAFG3\",\"NAFG4\",\"TVIT3\",\"BIOM4\",\"BIOM3\",\"CAMB4\",\"CAMB3\",\"ENJU3\",\"CIQU4\",\"CIQU3\",\"ABYA3\",\"PLDN4\",\"TKNO4\",\"TCSA3\",\"AHEB3\",\"AHEB6\",\"AHEB5\",\"CEDO3\",\"CEDO4\",\"RSUL4\",\"RHDS3\",\"RHDS4\",\"TLCP3\",\"TLCP4\",\"MMAQ4\",\"MMAQ3\",\"AFLT3\",\"MPLU3\",\"AZTE3\",\"APTI4\",\"AMPI3\",\"IDVL11\",\"IDVL4\",\"IDVL3\",\"DSUL3\",\"LPSB3\",\"LIPR3\",\"ELEK3\",\"ELEK4\",\"AMAR3\",\"WEST3\",\"FBRA4\",\"BSCT3\",\"BSCT6\",\"BSCT5\",\"WMBY3\",\"CSAB3\",\"CSAB4\",\"BMKS3\",\"CREM4\",\"CREM3\",\"MNPR3\",\"MNPR4\",\"FIGE3\",\"FIGE4\",\"CALI3\",\"CALI4\",\"UCAS3\",\"LUXM4\",\"LUXM3\",\"PNOR5\",\"PNOR6\",\"SGEN4\",\"SGEN3\",\"BALM4\",\"BALM3\",\"SEBB3\",\"SEBB4\",\"SEBB11\",\"VVAX3\",\"VVAX4\",\"BMIN4\",\"BMIN3\",\"BAUH4\",\"ECPR4\",\"ECPR3\",\"TEMP3\",\"VGOR4\",\"VGOR3\",\"MNDL3\",\"MNDL4\",\"RVEE3\",\"CTSA8\",\"ECIS3\",\"ECIS4\",\"SEMP3\",\"ARND3\",\"CTAX3\",\"TRAD3\",\"AZEV3\",\"AZEV4\",\"FCAP3\",\"FCAP4\",\"LECO4\",\"LECO3\",\"SHOW3\",\"CTSA3\",\"CTSA4\",\"BECE3\",\"BECE4\",\"GRNL4\",\"CCTU4\",\"BPIA3\",\"TRFO3\",\"TRFO4\",\"CTKA4\",\"CTKA3\",\"RDNI3\",\"LUPA3\",\"FIEI3\",\"SOND3\",\"SOND5\",\"SOND6\",\"RSIP3\",\"RSIP4\",\"RNPT4\",\"RNPT3\",\"IMBI3\",\"IMBI4\",\"CFLU4\",\"TRPN3\",\"FICT3\",\"BLUT3\",\"BLUT4\",\"JBDU3\",\"IENG3\",\"IENG5\",\"LFFE4\",\"LFFE3\",\"NUTR3\",\"MGEL4\",\"MGEL3\",\"MLPA3\",\"MLPA12\",\"MLPA4\",\"AFLU5\",\"AFLU3\",\"EPAR4\",\"EPAR3\",\"PTBL4\",\"PTBL3\",\"SPRI6\",\"SPRI3\",\"SPRI5\",\"PORP4\",\"ITEC3\",\"BAHI4\",\"BAHI5\",\"BIED3\",\"BAHI11\",\"ATED3\",\"RJCP3\",\"LIXC3\",\"LIXC4\",\"BERG3\",\"MWET4\",\"MWET3\",\"LGLO4\",\"CORR3\",\"CORR4\",\"DJON4\",\"CTPC4\",\"CTPC3\",\"VPSC4\",\"VPSC3\",\"DFVA3\",\"DFVA4\",\"DTCY3\",\"CTWR3\",\"PDTC3\",\"BBTG12\",\"BBTG13\",\"PLTO6\",\"PLTO5\",\"PITI4\",\"GEPA3\",\"CCTY3\",\"TIMS3\",\"DUFB11\",\"BSGR3\",\"GEPA4\",\"SLCP3\",\"BBTG11\",\"SASG3\",\"ICPI3\",\"ADMF3\",\"AELP3\",\"TCNO3\",\"TCNO4\",\"MAPT4\",\"MAPT3\",\"DUQE3\",\"DUQE4\",\"MTIG4\",\"MTIG3\",\"MNSA4\",\"MNSA3\",\"ASSM4\",\"ASSM3\",\"JFAB4\",\"CELM3\",\"STRP4\",\"ARPS3\",\"ARPS4\",\"TOYB4\",\"TOYB3\",\"ILLS4\",\"PRTX3\",\"ADHM3\",\"VTLM3\",\"RCSL4\",\"RCSL3\",\"ARLA4\",\"ARLA3\",\"HOOT4\",\"ARTE3\",\"ARTE4\",\"VIVR3\",\"RIPI3\",\"RIPI4\",\"HAGA4\",\"HAGA3\",\"CCXC3\",\"OGXP3\",\"LETO5\",\"LETO3\",\"GALO4\",\"GALO3\",\"FBMC3\",\"FBMC4\",\"FRTA3\",\"CMMA4\",\"GAFP3\",\"GAFP4\",\"GAZO4\",\"GAZO3\",\"NEXP3\",\"BUET3\",\"BUET4\",\"SCLO3\",\"SCLO4\",\"FTRX3\",\"FTRX4\",\"PTIP4\",\"PTIP3\",\"CCHI3\",\"CCHI4\",\"TENE7\",\"TENE5\",\"IGUA3\",\"IGUA6\",\"IGUA5\",\"NORD3\",\"AGXY3\",\"AVLL3\",\"SJOS3\",\"SJOS4\",\"ESTR3\",\"ESTR4\",\"WISA4\",\"WISA3\",\"FGUI3\",\"FGUI4\",\"BDLL3\",\"BDLL4\",\"DOTZ3\",\"JFEN3\",\"PMET3\",\"PMET5\",\"BCAL6\",\"PMET6\",\"BPHA3\",\"HETA4\",\"HETA3\",\"REEM4\",\"CTNM3\",\"CTNM4\",\"CAFE4\",\"CAFE3\",\"LCSA4\",\"LCSA3\",\"SLED4\",\"SLED3\",\"DOCA3\",\"DOCA4\",\"TXRX3\",\"TXRX4\",\"DHBI3\",\"DHBI4\",\"MILK33\",\"DMMO3\",\"SEQL3\",\"IGBR5\",\"IGBR6\",\"IGBR3\",\"AERI3\",\"PLAS3\",\"OSAO4\",\"RSID3\",\"SGPS3\",\"MMXM3\",\"BSEV3\",\"VPTA4\",\"VPTA3\",\"RIOS3\",\"AGEN33\",\"FHER3\",\"GSHP3\",\"BOBR4\",\"BOBR3\",\"RAIZ4\",\"INEP4\",\"INEP3\",\"TROR3\",\"TROR4\",\"TEKA3\",\"TEKA4\",\"SNSY5\",\"PDGR3\",\"CEED4\",\"CEED3\",\"RPMG3\",\"RPMG4\",\"PMAM4\",\"PMAM3\",\"VAGV3\",\"VAGV4\",\"OSXB3\",\"OIBR4\",\"OIBR3\",\"BRKM5\",\"BRKM3\",\"BRKM6\",\"MEND6\",\"MEND5\",\"GOLL4\",\"AZUL4\",\"CBMA3\",\"CBMA4\"];\r\n            const input = document.getElementById(\"comboTicker\");\r\n            const list = document.getElementById(\"comboAutocomplete\");\r\n            const btn = document.getElementById(\"comboBtn\");\r\n            const resultArea = document.getElementById(\"comboResult\");\r\n            const loading = document.getElementById(\"comboLoading\");\r\n\r\n            \/\/ Variables for Graham Simulation\r\n            let grahamLPA = 0;\r\n            let grahamVPA = 0;\r\n\r\n            \/\/ Autocomplete\r\n            input.addEventListener(\"input\", function () {\r\n                const val = this.value.toUpperCase();\r\n                list.innerHTML = '';\r\n                list.style.display = 'none';\r\n                if (!val) return;\r\n                let matches = tickers.filter(t => t.startsWith(val)).slice(0, 8);\r\n                if (matches.length > 0) {\r\n                    list.style.display = 'block';\r\n                    matches.forEach(ticker => {\r\n                        const item = document.createElement(\"div\");\r\n                        item.className = \"autocomplete-item\";\r\n                        item.innerHTML = \"<strong>\" + ticker.substr(0, val.length) + \"<\/strong>\" + ticker.substr(val.length);\r\n                        item.addEventListener(\"click\", () => { input.value = ticker; list.style.display = 'none'; });\r\n                        list.appendChild(item);\r\n                    });\r\n                }\r\n            });\r\n            document.addEventListener(\"click\", (e) => { if (e.target !== input) list.style.display = 'none'; });\r\n\r\n            \/\/ C\u00e1lculo\r\n            btn.addEventListener(\"click\", function () {\r\n                const ticker = input.value.toUpperCase();\r\n                if (!ticker) { alert(\"Digite um ticker!\"); return; }\r\n\r\n                resultArea.style.display = 'none';\r\n                loading.style.display = 'block';\r\n\r\n                \/\/ URL DO SEU WEBHOOK N8N\r\n                const webhookUrl = 'https:\/\/n8n.bitclique.com.br\/webhook\/valuation';\r\n\r\n                fetch(webhookUrl, {\r\n                    method: 'POST',\r\n                    headers: { 'Content-Type': 'application\/json' },\r\n                    body: JSON.stringify({ ticker: ticker })\r\n                })\r\n                    .then(res => res.json())\r\n                    .then(raw => {\r\n                        loading.style.display = 'none';\r\n                        const data = Array.isArray(raw) ? raw[0] : raw;\r\n                        resultArea.style.display = 'block';\r\n\r\n                        if (data.error) {\r\n                            resultArea.innerHTML = `<p style=\"color:red; text-align:center;\">${data.error}<\/p>`;\r\n                            return;\r\n                        }\r\n\r\n                        \/\/ Store values for Graham Simulation\r\n                        grahamLPA = parseFloat(data.graham ? (data.graham.lpa || data.lpa) : (data.lpa || 0));\r\n                        grahamVPA = parseFloat(data.graham ? (data.graham.vpa || data.vpa) : (data.vpa || 0));\r\n\r\n                        \/\/ Fix: Ensure preco_atual is treated as string before replace, or skip if number \r\n                        const precoClean = String(data.preco_atual).replace('R$ ', '').replace(',', '.');\r\n                        const currentPrice = parseFloat(data.preco_atual_raw || precoClean);\r\n                        const div12m = parseFloat(data.bazin ? data.bazin.dividendos : 0);\r\n\r\n                        \/\/ Monta o HTML\r\n                        resultArea.innerHTML = `\r\n                    <div class=\"result-header\">\r\n                        <span class=\"folder-ticker\">${data.ticker}<\/span>\r\n                        <span class=\"folder-price\">Atual: <strong>R$ ${data.preco_atual}<\/strong><\/span>\r\n                    <\/div>\r\n\r\n                    <!-- CHART CONTAINER -->\r\n                    <div id=\"price-chart\" style=\"margin-bottom: 30px; min-height: 300px;\"><\/div>\r\n\r\n                    <div class=\"methods-grid\">\r\n                        <!-- Card Graham -->\r\n                        <div class=\"method-card graham\">\r\n                            <div class=\"method-title\">M\u00e9todo de Graham<\/div>\r\n                            <div id=\"graham-display-area\">\r\n                                ${getCardContent(data.graham.preco_justo, data.preco_atual, data.graham.msg)}\r\n                            <\/div>\r\n                        <\/div>\r\n\r\n                        <!-- Card Bazin -->\r\n                        <div class=\"method-card bazin\">\r\n                            <div class=\"method-title\">M\u00e9todo de Bazin<\/div>\r\n                            ${getCardContent(data.bazin.preco_justo, data.preco_atual, data.bazin.msg)}\r\n                            ${div12m > 0 ? `<div class=\"extra-info\">Div. 12m: R$ ${div12m.toFixed(2)} (${data.bazin.dy_percent ? data.bazin.dy_percent + '%' : ((div12m \/ currentPrice) * 100).toFixed(2) + '%'})<\/div>` : ''}\r\n                        <\/div>\r\n                    <\/div>\r\n\r\n                    <!-- ADVANCED DETAILS SECTION -->\r\n                    <div class=\"methods-grid\">\r\n                        \r\n                        <!-- Graham Simulator -->\r\n                        <div class=\"details-section\">\r\n                            <h4>\u2699\ufe0f Simula\u00e7\u00e3o Graham<\/h4>\r\n                            <div class=\"graham-controls\">\r\n                                <div class=\"control-group\">\r\n                                    <label>LPA (Lucro):<\/label>\r\n                                    <strong>R$ ${grahamLPA ? grahamLPA.toFixed(2) : '-'}<\/strong>\r\n                                <\/div>\r\n                                <div class=\"control-group\">\r\n                                    <label>VPA (Patrim.):<\/label>\r\n                                    <strong>R$ ${grahamVPA ? grahamVPA.toFixed(2) : '-'}<\/strong>\r\n                                <\/div>\r\n                                <hr style=\"border-top:1px dashed #ddd; margin: 10px 0;\">\r\n                                <div class=\"control-group\">\r\n                                    <label>P\/L M\u00e1x:<\/label>\r\n                                    <input type=\"number\" id=\"inputPL\" class=\"control-input\" value=\"15\" step=\"0.5\">\r\n                                <\/div>\r\n                                <div class=\"control-group\">\r\n                                    <label>P\/VPA M\u00e1x:<\/label>\r\n                                    <input type=\"number\" id=\"inputPVPA\" class=\"control-input\" value=\"1.5\" step=\"0.1\">\r\n                                <\/div>\r\n                            <\/div>\r\n                        <\/div>\r\n\r\n                        <!-- Bazin Yield Table -->\r\n                        <div class=\"details-section\">\r\n                            <h4>\ud83d\udcca An\u00e1lise de Yield (Bazin)<\/h4>\r\n                            ${generateBazinTable(div12m, currentPrice)}\r\n                        <\/div>\r\n\r\n                    <\/div>\r\n                `;\r\n\r\n                        \/\/ Render Chart if history exists\r\n                        if (data.history && data.history.length > 0) {\r\n                            renderChart(data.history);\r\n                        }\r\n\r\n                        \/\/ Add Event Listeners for Graham\r\n                        if (document.getElementById('inputPL')) {\r\n                            document.getElementById('inputPL').addEventListener('input', updateGraham);\r\n                            document.getElementById('inputPVPA').addEventListener('input', updateGraham);\r\n                        }\r\n\r\n                        function updateGraham() {\r\n                            const pl = parseFloat(document.getElementById('inputPL').value) || 0;\r\n                            const pvpa = parseFloat(document.getElementById('inputPVPA').value) || 0;\r\n\r\n                            if (grahamLPA > 0 && grahamVPA > 0) {\r\n                                \/\/ Graham Formula: Sqrt(PL * PVPA * LPA * VPA)\r\n                                const val = Math.sqrt(pl * pvpa * grahamLPA * grahamVPA);\r\n                                const fairPrice = val;\r\n\r\n                                \/\/ Update Display\r\n                                document.getElementById('graham-display-area').innerHTML = getCardContent(fairPrice.toFixed(2), data.preco_atual, null);\r\n                            }\r\n                        }\r\n\r\n                        function generateBazinTable(dividend, price) {\r\n                            if (!dividend || dividend <= 0) return '<div style=\"color:#666; font-style:italic;\">Sem hist\u00f3rico de dividendos suficientes.<\/div>';\r\n\r\n                            let html = `<table class=\"bazin-table\">\r\n                                <thead><tr><th>DY Alvo<\/th><th>Teto<\/th><th>Recomenda\u00e7\u00e3o<\/th><\/tr><\/thead>\r\n                                <tbody>`;\r\n\r\n                            const targets = [6, 7, 8, 9, 10];\r\n                            targets.forEach(y => {\r\n                                const teto = dividend \/ (y \/ 100);\r\n                                const isBuy = teto >= price;\r\n                                const badge = isBuy ? '<span class=\"badge-buy\">COMPRAR<\/span>' : '<span class=\"badge-wait\">AGUARDAR<\/span>';\r\n                                html += `<tr>\r\n                                    <td>${y}%<\/td>\r\n                                    <td>R$ ${teto.toFixed(2)}<\/td>\r\n                                    <td>${badge}<\/td>\r\n                                <\/tr>`;\r\n                            });\r\n\r\n                            html += `<\/tbody><\/table>`;\r\n                            return html;\r\n                        }\r\n\r\n                        function getCardContent(justo, atual, msgErro) {\r\n                            if (msgErro) return `<div style=\"color:#e67e22; padding:10px; font-size:0.9rem;\">${msgErro}<\/div>`;\r\n\r\n                            \/\/ Convert string price to float if needed\r\n                            let atualClean = String(atual).replace('R$ ', '').replace(',', '.');\r\n                            let justoClean = String(justo).replace(',', '.');\r\n\r\n                            let atualVal = parseFloat(atualClean);\r\n                            let justoVal = parseFloat(justoClean);\r\n\r\n                            let up = ((justoVal - atualVal) \/ atualVal) * 100;\r\n                            let upClass = up > 0 ? 'upside-positive' : 'upside-negative';\r\n                            let upTxt = up > 0 ? 'Potencial: +' : 'Potencial: ';\r\n\r\n                            \/\/ Check if NaN\r\n                            if (isNaN(up)) return '';\r\n\r\n                            return `\r\n                        <div class=\"price-display\">R$ ${justoVal.toFixed(2)}<\/div>\r\n                        <div class=\"upside-tag ${upClass}\">\r\n                            ${upTxt}${up.toFixed(2)}%\r\n                        <\/div>\r\n                    `;\r\n                        }\r\n\r\n                        function renderChart(history) {\r\n                            const isDark = document.documentElement.classList.contains('s-dark') || \r\n                                         document.documentElement.classList.contains('site-s-dark') ||\r\n                                         document.body.classList.contains('s-dark');\r\n                            \r\n                            const axisColor = isDark ? '#ccc' : '#333';\r\n                            const gridColor = isDark ? '#444' : '#f1f1f1';\r\n\r\n                            var options = {\r\n                                series: [{\r\n                                    name: 'Pre\u00e7o Fechamento',\r\n                                    data: history.map(item => ({ x: item.x, y: item.y }))\r\n                                }],\r\n                                chart: {\r\n                                    type: 'area',\r\n                                    height: 350,\r\n                                    toolbar: { show: false },\r\n                                    animations: { enabled: true },\r\n                                    background: 'transparent'\r\n                                },\r\n                                theme: {\r\n                                    mode: isDark ? 'dark' : 'light'\r\n                                },\r\n                                dataLabels: { enabled: false },\r\n                                stroke: { curve: 'smooth', width: 2, colors: ['#d93025'] },\r\n                                fill: {\r\n                                    type: 'gradient',\r\n                                    gradient: {\r\n                                        shadeIntensity: 1,\r\n                                        opacityFrom: 0.7,\r\n                                        opacityTo: 0.1,\r\n                                        stops: [0, 90, 100],\r\n                                        colorStops: [{ offset: 0, color: '#d93025', opacity: 0.5 }, { offset: 100, color: '#d93025', opacity: 0 }]\r\n                                    }\r\n                                },\r\n                                colors: ['#d93025'],\r\n                                xaxis: {\r\n                                    type: 'datetime',\r\n                                    tooltip: { enabled: false },\r\n                                    labels: {\r\n                                        style: { colors: axisColor }\r\n                                    },\r\n                                    axisBorder: { show: false },\r\n                                    axisTicks: { color: axisColor }\r\n                                },\r\n                                yaxis: {\r\n                                    labels: {\r\n                                        formatter: function (value) { return \"R$ \" + value.toFixed(2); },\r\n                                        style: { colors: axisColor }\r\n                                    }\r\n                                },\r\n                                tooltip: {\r\n                                    theme: isDark ? 'dark' : 'light',\r\n                                    x: { format: 'dd MMM yyyy' },\r\n                                    y: { formatter: function (val) { return \"R$ \" + val } }\r\n                                },\r\n                                grid: {\r\n                                    borderColor: gridColor,\r\n                                }\r\n                            };\r\n\r\n                            var chart = new ApexCharts(document.querySelector(\"#price-chart\"), options);\r\n                            chart.render();\r\n                        }\r\n                    })\r\n                    .catch(err => {\r\n                        loading.style.display = 'none';\r\n                        resultArea.style.display = 'block';\r\n                        resultArea.innerHTML = '<p style=\"color:red\">Erro: ' + err.message + '<\/p>';\r\n                        console.error(err);\r\n                    });\r\n            });\r\n        });\r\n    <\/script>\r\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/no-wrapper.php","meta":{"footnotes":""},"class_list":["post-8634","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/pages\/8634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/comments?post=8634"}],"version-history":[{"count":15,"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/pages\/8634\/revisions"}],"predecessor-version":[{"id":8649,"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/pages\/8634\/revisions\/8649"}],"wp:attachment":[{"href":"https:\/\/investe360.com\/en\/wp-json\/wp\/v2\/media?parent=8634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}