    /* --- MODERN THEME START --- */
    :root {
        --vnix-red: #E63946;
        --vnix-red-light: #fff0f1;
        --vnix-dark: #1D3557;
    }

    body { 
        font-family: 'Kanit', sans-serif; 
        background-color: #f8f9fa;
        overflow-x: hidden;
    }

    /* Layout */
    #wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
    }

    #page-content-wrapper {
        flex: 1 1 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .main-navbar {
        background: var(--vnix-dark); 
        color: white;
        padding: 0.6rem 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .navbar-brand-text {
        align-items: center;
        display: inline-flex;
        flex: 0 0 auto;
        font-weight: 600;
        font-size: 1.1rem;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }
    
    .main-navbar .nav-link { 
        color: rgba(255,255,255,0.85) !important; 
        font-weight: 400;
        padding: 0.5rem 1rem !important;
        border-radius: 8px;
        transition: all 0.2s;
    }
    .main-navbar .nav-link:hover, 
    .main-navbar .nav-link.active {
        color: white !important;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(5px);
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-radius: 12px;
        padding: 8px;
        margin-top: 10px;
    }
    .dropdown-item { border-radius: 8px; padding: 8px 16px; margin-bottom: 2px;}
    .dropdown-item:hover { background-color: #f1f5f9; color: var(--vnix-dark); font-weight: 500;}

    /* Content Area */
    main { background-color: #f8f9fa; }

    /* Fix Input Visibility */
    main label, main .form-label, main .control-label, main .form-text {
        color: #334155 !important; font-weight: 500;
    }
    main .form-control, main .form-select, main .input-group-text {
        border: 1px solid #cbd5e1 !important;
        background-color: #fff !important;
        color: #1e293b !important;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
    }
    main .form-control:focus, main .form-select:focus {
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    }
    main input[type="file"]::file-selector-button {
        background-color: #f1f5f9 !important;
        color: #334155 !important;
        border: 0 !important;
        border-right: 1px solid #cbd5e1 !important;
        margin-right: 10px;
    }
    main .input-group .form-control, main .input-group .form-select, main .input-group .btn {
        border: 1px solid #cbd5e1 !important;
    }

        /* ===== Nested Dropdown (Submenu) ===== */
        .dropdown-submenu { position: relative; }

        /* ซ่อนเมนูชั้น 2 ไว้ก่อน */
        .dropdown-submenu > .dropdown-menu {
            top: 0;
            left: 100%;
            margin-top: -6px;
            margin-left: 8px;
            display: none;
        }

        /* เปิดเมื่อ JS ใส่ class show */
        .dropdown-submenu > .dropdown-menu.show {
            display: block;
        }

        /* Desktop: เลื่อนเมาส์ชี้แล้วเปิดได้เลย */
        @media (min-width: 992px) {
            .dropdown-submenu:hover > .dropdown-menu {
                display: block;
            }
        }

        /* Mobile: ให้เมนูชั้น 2 แสดงแบบต่อบรรทัด (ไม่ลอยออกข้าง) */
        @media (max-width: 1199.98px) {
            .dropdown-submenu > .dropdown-menu {
                position: static;
                margin: 6px 0 0 0;
                display: none;
            }
            .dropdown-submenu > .dropdown-menu.show {
                display: block;
            }
        }

        /* (เสริม) ให้แถว submenu ดูคลิกได้ชัด */
        .dropdown-item.submenu-toggle {
            user-select: none;
        }

    /* --- MODERN THEME END --- */

    /* === 9-Tab Navigation === */
    .main-navbar .navbar-nav { gap: 2px; }
    .main-navbar .nav-link {
        font-size: 0.85rem;
        padding: 0.45rem 0.75rem !important;
        border-bottom: 2px solid transparent;
        border-radius: 6px 6px 0 0;
    }
    .main-navbar .nav-link.active,
    .main-navbar .nav-link.tab-active {
        background: rgba(255,255,255,0.10);
        border-bottom-color: var(--vnix-red);
        color: #fff !important;
    }
    .main-navbar .nav-link:hover {
        background: rgba(255,255,255,0.12);
        border-radius: 6px 6px 0 0;
    }
    .main-navbar .nav-link .lucide { width: 16px; height: 16px; stroke-width: 1.5; vertical-align: -2px; margin-right: 4px; }
    .main-navbar .navbar-utilities {
        flex: 0 1 auto;
        min-width: 0;
    }
    .main-navbar .navbar-user-name {
        display: inline-block;
        line-height: 1.1;
        max-width: 14rem;
        overflow-wrap: anywhere;
        vertical-align: middle;
        white-space: normal;
    }
    .dropdown-item.coming-soon { color: #94a3b8 !important; cursor: default; font-style: italic; font-size: 0.85rem; }
    .dropdown-item.coming-soon:hover { background: transparent; color: #94a3b8 !important; font-weight: 400; }
    .coming-soon-badge { font-size: 0.65rem; background: #e2e8f0; color: #64748b; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
    .acc-finance-menu {
        width: min(1080px, calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
        max-height: var(--acc-finance-max-height, calc(100dvh - 5.5rem));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(var(--acc-finance-shift-x, 0));
    }
    .acc-finance-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .75rem;
        padding: .25rem;
    }
    .acc-finance-section {
        min-width: 0;
        padding: .15rem .25rem;
    }
    .acc-finance-section + .acc-finance-section {
        border-left: 1px solid #e2e8f0;
    }
    .acc-finance-section-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .acc-finance-section .dropdown-header {
        color: #64748b;
        font-size: .76rem;
        font-weight: 600;
        letter-spacing: .02em;
        padding: .45rem .75rem .35rem;
    }
    .acc-finance-section .dropdown-header:not(:first-child) {
        border-top: 1px solid #e2e8f0;
        margin-top: .55rem;
        padding-top: .75rem;
    }
    .acc-finance-section .dropdown-item {
        align-items: flex-start;
        display: flex;
        font-size: .86rem;
        line-height: 1.35;
        min-height: 2.35rem;
        padding: .55rem .75rem;
        white-space: normal;
    }
    .acc-finance-section .dropdown-item > i {
        flex: 0 0 1.15rem;
        margin-top: .08rem;
    }
    .dropdown-item.sell-nav-doc {
        align-items: center;
        display: flex;
        gap: 0;
        position: relative;
    }
    .dropdown-item.sell-nav-doc::before {
        border-radius: 999px;
        content: "";
        height: 22px;
        margin-right: 8px;
        width: 4px;
    }
    .dropdown-item.sell-nav-quote::before { background: #2563eb; }
    .dropdown-item.sell-nav-so::before { background: #059669; }
    .dropdown-item.sell-nav-online::before { background: #7c3aed; }
    .dropdown-item.sell-nav-quote.active,
    .dropdown-item.sell-nav-quote:hover {
        background: #eff6ff;
        color: #1d4ed8;
    }
    .dropdown-item.sell-nav-so.active,
    .dropdown-item.sell-nav-so:hover {
        background: #ecfdf5;
        color: #047857;
    }
    .dropdown-item.sell-nav-online.active,
    .dropdown-item.sell-nav-online:hover {
        background: #f5f3ff;
        color: #6d28d9;
    }
    .dropdown-item.coming-soon.sell-nav-so {
        background: #ecfdf5;
        color: #047857 !important;
        font-style: normal;
        opacity: .82;
    }
    .dropdown-item.coming-soon.sell-nav-so:hover {
        background: #ecfdf5;
        color: #047857 !important;
    }
    .dropdown-item.sell-nav-so .coming-soon-badge {
        background: #d1fae5;
        color: #047857;
    }
    .hr-nav-menu { min-width: 260px; }
    .hr-nav-header { font-size: 0.72rem; letter-spacing: .02em; }
    .wh-nav-header { font-size: .76rem; letter-spacing: .08em; color: #7b879b; padding-top: .4rem; padding-bottom: .2rem; margin: 0; }
    .wh-nav-menu { max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; }
    .data-nav-menu { max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; }
    .hr-nav-count { font-size: 0.65rem; }
    @media (min-width: 1200px) and (max-width: 1599.98px) {
        .main-navbar .container-fluid {
            align-items: center;
            flex-wrap: nowrap;
            gap: .35rem;
            min-width: 0;
        }
        .main-navbar .navbar-brand-text {
            margin-right: .65rem !important;
        }
        .main-navbar .navbar-collapse {
            flex-basis: auto;
            gap: .35rem;
            max-width: 100%;
            min-width: 0;
            overflow-x: visible;
            overflow-y: visible;
            padding-top: 0;
        }
        .main-navbar .navbar-nav {
            flex: 1 1 auto;
            flex-wrap: nowrap;
            min-width: 0;
        }
        .main-navbar .nav-link {
            font-size: .78rem;
            padding: .4rem .48rem !important;
            white-space: nowrap;
        }
        .main-navbar .navbar-utilities {
            flex: 0 0 auto;
            gap: .55rem !important;
            margin-left: .35rem;
        }
    }
    @media (min-width: 1200px) and (max-width: 1350px) {
        .main-navbar .navbar-utilities > .text-white-50 {
            display: none !important;
        }
    }
    @media (max-width: 1199.98px) {
        .main-navbar .navbar-nav { flex-wrap: wrap; }
        .main-navbar .navbar-collapse {
            overflow-x: visible;
        }
        .main-navbar .navbar-nav {
            min-width: 0;
        }
        .acc-finance-menu {
            width: min(760px, 100%);
            max-width: 100%;
            max-height: var(--acc-finance-max-height, calc(100dvh - 5rem));
        }
        .acc-finance-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .acc-finance-section:nth-child(odd) {
            border-left: 0;
        }
    }
    @media (max-width: 767.98px) {
        .acc-finance-menu {
            width: 100%;
            max-width: 100%;
            max-height: var(--acc-finance-max-height, calc(100dvh - 4.5rem));
        }
        .acc-finance-grid {
            grid-template-columns: minmax(0, 1fr);
            gap: .35rem;
        }
        .acc-finance-section + .acc-finance-section {
            border-left: 0;
            border-top: 1px solid #e2e8f0;
            padding-top: .55rem;
        }
    }

    .vnix-data-grid-shell {
        width: 100%;
    }
    .vnix-top-scrollbar {
        display: none;
        overflow-x: auto;
        overflow-y: hidden;
        max-width: 100%;
        height: 14px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
        scrollbar-width: thin;
        scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
    }
    .vnix-top-scrollbar.is-visible {
        display: block;
    }
    .vnix-top-scrollbar-spacer {
        height: 1px;
    }
    .vnix-top-scrollbar::-webkit-scrollbar {
        height: 10px;
    }
    .vnix-top-scrollbar::-webkit-scrollbar-track {
        background: rgba(226, 232, 240, 0.55);
        border-radius: 999px;
    }
    .vnix-top-scrollbar::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.45);
        border-radius: 999px;
    }
    .vnix-top-scrollbar::-webkit-scrollbar-thumb:hover {
        background: rgba(71, 85, 105, 0.62);
    }
