<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://akcount.in/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://akcount.in/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://akcount.in/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://akcount.in/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://akcount.in/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>

    <style id="akcount-universal-gold-css">
        @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

        /* TOP-LEFT BRAND & AK TRADING BADGE */
        .akcount-brand, .sidebar-header img, a[href*="accounts-portal"] img {
            max-height: 42px !important;
            width: auto !important;
        }
        .sma-entity-badge, .active-entity-card, div[class*="entity"], .sidebar div:has(> .rounded-full) {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
            border: 1.5px solid #cbd5e1 !important;
            border-radius: 10px !important;
            padding: 10px 12px !important;
            margin: 10px 8px 14px 8px !important;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06) !important;
        }
        .sma-entity-badge .rounded-full, .sidebar .rounded-full {
            width: 38px !important;
            height: 38px !important;
            font-size: 15px !important;
            font-weight: 800 !important;
            background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
            color: #ffffff !important;
        }
        .sma-entity-badge strong, .active-entity-name, div[class*="entity"] span:first-of-type {
            font-size: 16.5px !important;
            font-weight: 800 !important;
            color: #0f172a !important;
        }

        /* LEFT SIDEBAR NAVIGATION: 15px BOLD */
        #adminmenu > li > a.menu-top, .akcount-sidebar a, .portal-nav a, .sidebar a {
            font-family: "Inter", sans-serif !important;
            font-size: 15px !important;
            font-weight: 700 !important;
            letter-spacing: -0.015em !important;
        }

        /* HIDE PHP WARNINGS */
        div:contains("class-sma-admin.php on line 411"),
        .notice-warning:contains("Undefined variable $purchase") {
            display: none !important;
        }
    </style>

    <script id="akcount-universal-gold-js">
    (function() {
        function runAkcountFixes() {
            // A. Clean textarea PHP notices
            document.querySelectorAll("textarea").forEach(function(tx) {
                if (tx.value.includes("Deprecated") || tx.value.includes("htmlspecialchars()")) {
                    tx.value = "";
                }
            });

            // B. Find inputs regardless of markup variations
            var gstinInput = document.querySelector("input[name*='gstin' i], input[placeholder*='GSTIN' i]");
            var panInput = document.querySelector("input[name*='pan' i], input[placeholder*='AACAI' i], input[placeholder*='PAN' i]");
            var cityInput = document.querySelector("input[name*='city' i], #city");
            var stateSelect = document.querySelector("select[name*='state' i], #state");

            // C. Auto-extract PAN from GSTIN (3rd to 12th character)
            function extractPan() {
                if (gstinInput && gstinInput.value) {
                    var val = gstinInput.value.trim().toUpperCase();
                    gstinInput.value = val;
                    if (val.length === 15) {
                        var panVal = val.substring(2, 12);
                        if (panInput && (!panInput.value || panInput.value.length < 10)) {
                            panInput.value = panVal;
                            panInput.dispatchEvent(new Event("input", { bubbles: true }));
                            panInput.dispatchEvent(new Event("change", { bubbles: true }));
                        }
                        if (stateSelect && val.substring(0,2) === "10") {
                            for (var i = 0; i < stateSelect.options.length; i++) {
                                if (stateSelect.options[i].text.indexOf("10") !== -1 || stateSelect.options[i].text.indexOf("Bihar") !== -1) {
                                    stateSelect.selectedIndex = i;
                                    break;
                                }
                            }
                        }
                    }
                }
            }

            if (gstinInput) {
                gstinInput.addEventListener("input", extractPan);
                gstinInput.addEventListener("blur", extractPan);
                extractPan();
            }

            // D. Fix the blocked "Continue to Bank Account" button
            var forms = document.querySelectorAll("form");
            forms.forEach(function(form) {
                form.setAttribute("novalidate", "novalidate"); // Stop silent HTML5 blockage

                form.addEventListener("submit", function(e) {
                    extractPan();

                    // If City was filled with full address, clean it to "Patna" or first word
                    if (cityInput && cityInput.value && (cityInput.value.includes(",") || cityInput.value.includes("-"))) {
                        var parts = cityInput.value.split(",");
                        cityInput.value = (parts[parts.length - 2] || "Patna").replace(/[^a-zA-Z]/g, "").trim();
                    }
                });
            });

            // E. Ensure button is always enabled
            document.querySelectorAll("button").forEach(function(btn) {
                if (btn.textContent.includes("Continue to Bank Account") || btn.textContent.includes("Continue")) {
                    btn.removeAttribute("disabled");
                    btn.style.pointerEvents = "auto";
                    btn.style.opacity = "1";

                    btn.addEventListener("click", function() {
                        extractPan();
                        if (cityInput && cityInput.value && cityInput.value.includes(",")) {
                            cityInput.value = "Patna";
                        }
                    });
                }
            });
        }

        if (document.readyState === "loading") {
            document.addEventListener("DOMContentLoaded", runAkcountFixes);
        } else {
            runAkcountFixes();
        }
        setInterval(runAkcountFixes, 800); // Guarantees execution on dynamic tabs
    })();
    </script>
    