/* === PRODUCT VIEW STYLES === */
/* Premium Products Dashboard Styling */
    .prod-page-container {
        padding: 16px 22px 35px 22px;
        margin: 0 auto;
        font-family: inherit;
    }

    /* Top White Header Card */
    .prod-header-card {
        background: #ffffff;
        border-radius: 14px;
        padding: 16px 22px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        margin-bottom: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 14px;
    }
    .prod-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .prod-header-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
        border: 1px solid #c7d2fe;
        color: #4f46e5;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }
    .prod-header-title {
        font-size: 20px;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .prod-header-desc {
        font-size: 12px;
        color: #64748b;
        margin-top: 3px;
        margin-bottom: 0;
    }
    .prod-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Buttons */
    .prod-btn-primary {
        background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
        color: #ffffff !important;
        font-weight: 700;
        font-size: 13px;
        padding: 9px 18px;
        border-radius: 10px;
        border: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
        transition: all 0.2s ease;
        text-decoration: none !important;
        cursor: pointer;
    }
    .prod-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
        color: #ffffff !important;
    }
    .prod-btn-secondary {
        background: #ffffff;
        color: #1e293b !important;
        font-weight: 700;
        font-size: 13px;
        padding: 8px 16px;
        border-radius: 10px;
        border: 1px solid #cbd5e1;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.15s ease;
        text-decoration: none !important;
        cursor: pointer;
    }
    .prod-btn-secondary:hover {
        background: #f8fafc;
        border-color: #94a3b8;
    }
    .prod-btn-filter-toggle {
        background: #f1f5f9;
        color: #334155 !important;
        font-weight: 700;
        font-size: 13px;
        padding: 8px 14px;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .prod-btn-filter-toggle:hover {
        background: #e2e8f0;
    }

    /* KPI Grid */
    .prod-kpi-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
        margin-bottom: 18px;
    }
    @media (max-width: 1200px) {
        .prod-kpi-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    @media (max-width: 768px) {
        .prod-kpi-grid {
            grid-template-columns: 1fr;
        }
    }

    .prod-kpi-card {
        background: #ffffff;
        border-radius: 12px;
        padding: 14px 16px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .prod-kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
        border-color: #cbd5e1;
    }
    .prod-kpi-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }
    .prod-kpi-label {
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    .prod-kpi-icon-wrap {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
    }
    .prod-kpi-val {
        font-size: 20px;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.2;
        display: flex;
        align-items: baseline;
        gap: 6px;
    }
    .prod-kpi-sub {
        font-size: 11px;
        color: #64748b;
        margin-top: 6px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* KPI Theme Colors */
    .prod-kpi-indigo .prod-kpi-icon-wrap { background: #eef2ff; color: #4f46e5; }
    .prod-kpi-emerald .prod-kpi-icon-wrap { background: #ecfdf5; color: #059669; }
    .prod-kpi-blue .prod-kpi-icon-wrap { background: #eff6ff; color: #2563eb; }
    .prod-kpi-purple .prod-kpi-icon-wrap { background: #f5f3ff; color: #7c3aed; }
    .prod-kpi-rose .prod-kpi-icon-wrap { background: #fff1f2; color: #e11d48; }

    /* Filter Drawer Panel */
    .prod-filter-card {
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        margin-bottom: 18px;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    .prod-filter-header {
        padding: 12px 18px;
        background: #f8fafc;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }
    .prod-filter-header:hover {
        background: #f1f5f9;
    }
    .prod-filter-title {
        font-size: 13px;
        font-weight: 700;
        color: #334155;
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }
    .prod-filter-body {
        padding: 16px 18px 8px 18px;
    }
    .prod-filter-body label {
        font-size: 12px;
        font-weight: 700;
        color: #475569;
        margin-bottom: 6px;
    }

    /* Main Table Container Card */
    .prod-table-card {
        background: #ffffff;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
        overflow: hidden;
    }
    .prod-tabs-header {
        padding: 12px 20px 0 20px;
        background: #fafbfc;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }
    .prod-nav-tabs {
        border-bottom: none !important;
        margin: 0 !important;
        display: flex;
        gap: 6px;
    }
    .prod-nav-tabs > li > a {
        border: 1px solid transparent !important;
        border-radius: 10px 10px 0 0 !important;
        font-weight: 700 !important;
        font-size: 13px !important;
        color: #64748b !important;
        padding: 10px 18px !important;
        display: flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        transition: all 0.15s ease;
    }
    .prod-nav-tabs > li.active > a,
    .prod-nav-tabs > li.active > a:hover,
    .prod-nav-tabs > li.active > a:focus {
        background: #ffffff !important;
        color: #4f46e5 !important;
        border-color: #e2e8f0 #e2e8f0 transparent #e2e8f0 !important;
        border-bottom: 2px solid #ffffff !important;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.03);
    }
    .prod-nav-tabs > li > a:hover {
        color: #1e293b !important;
        background: #f1f5f9;
    }

    /* Table styling tweaks */
    #product_table {
        margin: 0 !important;
        width: 100% !important;
    }
    #product_table thead th {
        background-color: #f8fafc !important;
        color: #475569 !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        padding: 12px 14px !important;
        border-bottom: 2px solid #e2e8f0 !important;
        white-space: nowrap;
    }
    #product_table tbody td {
        padding: 10px 14px !important;
        vertical-align: middle !important;
        font-size: 13px !important;
        color: #1e293b;
    }
    #product_table tbody tr:hover {
        background-color: #f8fafc !important;
    }

    /* Thumbnail Enhancements */
    .prod-thumb-box {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }
    .product-thumbnail-small {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
        object-fit: cover !important;
        border: 1px solid #e2e8f0 !important;
        background-color: #f8fafc !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        transition: transform 0.15s ease;
    }
    .product-thumbnail-small:hover {
        transform: scale(1.08);
    }
    .prod-no-img {
        width: 42px;
        height: 42px;
        border-radius: 8px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #94a3b8;
        font-size: 16px;
    }

    /* Current stock pill */
    .current_stock {
        font-weight: 800;
        color: #0f172a;
    }

    /* Actions dropdown button */
    .btn-group .tw-dw-btn-outline.tw-dw-btn-info {
        border-radius: 8px !important;
        font-weight: 700 !important;
        font-size: 11px !important;
        padding: 5px 10px !important;
        border-color: #cbd5e1 !important;
        color: #334155 !important;
    }
    .btn-group .tw-dw-btn-outline.tw-dw-btn-info:hover {
        background-color: #4f46e5 !important;
        border-color: #4f46e5 !important;
        color: #ffffff !important;
    }

    /* Mass actions footer bar */
    .prod-mass-footer {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        padding: 10px 4px;
    }

    /* ========================================================
       MODERN STOCK REPORT TABLE STYLING (NO DOUBLE BORDER & CLEAN FONT)
       ======================================================== */
    .stock-report-container {
        display: contents !important;
    }

    .stock-table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #stock_report_table {
        margin: 0 !important;
        width: 100% !important;
        min-width: 1680px !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        border: none !important;
    }

    #stock_report_table thead th {
        background-color: #f8fafc !important;
        color: #475569 !important;
        font-weight: 600 !important;
        font-size: 12px !important;
        padding: 12px 14px !important;
        border-bottom: 2px solid #e2e8f0 !important;
        border-top: none !important;
        border-left: 1px solid #f1f5f9 !important;
        border-right: none !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        text-align: center !important;
        line-height: 1.35 !important;
    }

    #stock_report_table thead th:last-child {
        border-left: none !important;
    }

    #stock_report_table thead th small {
        font-size: 10.5px !important;
        font-weight: 500 !important;
        color: #64748b !important;
        display: block !important;
        margin-top: 2px !important;
    }

    #stock_report_table thead th.col-stock-product,
    #stock_report_table thead th:nth-child(3) {
        text-align: right !important;
    }
    #stock_report_table thead th.col-stock-category,
    #stock_report_table thead th:nth-child(5) {
        text-align: right !important;
    }

    #stock_report_table tbody td {
        padding: 10px 14px !important;
        vertical-align: middle !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #334155 !important;
        border-top: 1px solid #f1f5f9 !important;
        border-left: 1px solid #f8fafc !important;
        border-right: none !important;
        border-bottom: none !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    #stock_report_table tbody td:last-child {
        border-left: none !important;
    }

    /* Product Name */
    #stock_report_table tbody td.col-stock-product,
    #stock_report_table tbody td:nth-child(3) {
        text-align: right !important;
        font-weight: 500 !important;
        color: #1e293b !important;
        white-space: normal !important;
        min-width: 260px !important;
        max-width: 380px !important;
        line-height: 1.4 !important;
    }

    /* Category */
    #stock_report_table tbody td.col-stock-category,
    #stock_report_table tbody td:nth-child(5) {
        text-align: right !important;
        color: #475569 !important;
        font-weight: 400 !important;
        white-space: normal !important;
        min-width: 150px !important;
        max-width: 220px !important;
        line-height: 1.35 !important;
    }

    /* SKU */
    #stock_report_table tbody td.col-stock-sku,
    #stock_report_table tbody td:nth-child(2) {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace !important;
        font-weight: 500 !important;
        color: #475569 !important;
        min-width: 95px !important;
    }

    /* Variation */
    #stock_report_table tbody td.col-stock-variation,
    #stock_report_table tbody td:nth-child(4) {
        color: #64748b !important;
        font-weight: 400 !important;
        min-width: 95px !important;
    }

    /* Location */
    #stock_report_table tbody td.col-stock-location,
    #stock_report_table tbody td:nth-child(6) {
        color: #64748b !important;
        font-weight: 400 !important;
        min-width: 110px !important;
    }

    /* Selling Price */
    #stock_report_table tbody td.col-stock-price,
    #stock_report_table tbody td:nth-child(7) {
        font-weight: 500 !important;
        color: #0f172a !important;
        min-width: 110px !important;
    }

    /* Current Stock */
    #stock_report_table tbody td.col-stock-qty,
    #stock_report_table tbody td:nth-child(8) {
        font-weight: 600 !important;
        color: #0284c7 !important;
        min-width: 115px !important;
    }

    /* Stock Value (Purchase) */
    #stock_report_table tbody td.col-stock-cost,
    #stock_report_table tbody td:nth-child(9) {
        color: #475569 !important;
        font-weight: 400 !important;
        min-width: 135px !important;
    }

    /* Stock Value (Sale) */
    #stock_report_table tbody td.col-stock-sale-val,
    #stock_report_table tbody td:nth-child(10) {
        font-weight: 500 !important;
        color: #0f172a !important;
        min-width: 135px !important;
    }

    /* Potential Profit */
    #stock_report_table tbody td.col-stock-profit,
    #stock_report_table tbody td:nth-child(11) {
        font-weight: 600 !important;
        color: #16a34a !important;
        min-width: 120px !important;
    }

    /* Units sold, transfered, adjusted */
    #stock_report_table tbody td.col-stock-sold,
    #stock_report_table tbody td.col-stock-trans,
    #stock_report_table tbody td.col-stock-adj {
        color: #475569 !important;
        font-weight: 400 !important;
        min-width: 115px !important;
    }

    /* Action pill button */
    #stock_report_table tbody td.col-stock-action,
    #stock_report_table tbody td:first-child {
        min-width: 150px !important;
        text-align: center !important;
    }

    #stock_report_table tbody td.col-stock-action a,
    #stock_report_table tbody td:first-child a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        border-radius: 9999px !important;
        padding: 5px 14px !important;
        font-size: 11.5px !important;
        font-weight: 500 !important;
        background: #eff6ff !important;
        border: 1px solid #bfdbfe !important;
        color: #1d4ed8 !important;
        transition: all 0.15s ease !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    #stock_report_table tbody td.col-stock-action a:hover,
    #stock_report_table tbody td:first-child a:hover {
        background: #2563eb !important;
        border-color: #2563eb !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
        transform: translateY(-1px) !important;
    }

    #stock_report_table tbody tr:hover {
        background-color: #f8fafc !important;
    }

    #stock_report_table tfoot tr {
        background-color: #f8fafc !important;
        border-top: 2px solid #e2e8f0 !important;
    }

    #stock_report_table tfoot td {
        padding: 12px 14px !important;
        font-weight: 600 !important;
        color: #0f172a !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        text-align: center !important;
        border: none !important;
    }

    /* Ensure currency symbols NEVER break onto separate line */
    #stock_report_table .display_currency,
    #stock_report_table span.display_currency,
    #stock_report_table .total_stock_price,
    #stock_report_table .stock_value_by_sale_price,
    #stock_report_table .potential_profit {
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        direction: ltr !important;
        font-weight: inherit !important;
    }

    /* Dark Mode */
    html[data-theme="dark"] .stock-table-responsive {
        background: #1e293b !important;
    }
    html[data-theme="dark"] #stock_report_table thead th {
        background-color: #0f172a !important;
        color: #cbd5e1 !important;
        border-color: #334155 !important;
    }
    html[data-theme="dark"] #stock_report_table tbody td {
        color: #cbd5e1 !important;
        border-color: #334155 !important;
    }
    html[data-theme="dark"] #stock_report_table tbody td.col-stock-product,
    html[data-theme="dark"] #stock_report_table tbody td:nth-child(3) {
        color: #f8fafc !important;
    }
    html[data-theme="dark"] #stock_report_table tbody tr:hover {
        background-color: #0f172a !important;
    }
    html[data-theme="dark"] #stock_report_table tfoot tr {
        background-color: #0f172a !important;
        border-color: #334155 !important;
    }
    html[data-theme="dark"] #stock_report_table tfoot td {
        color: #ffffff !important;
    }

/* === CUSTOMER GROUP VIEW STYLES === */
/* Clean, Professional & Compact Dashboard */
    .cg-page-wrapper {
        padding: 15px 22px 30px 22px;
        margin: 0 auto;
        font-family: inherit;
    }
    
    /* White Header Banner */
    .cg-header-card {
        background: #ffffff;
        border-radius: 12px;
        padding: 14px 20px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }
    .cg-header-title {
        font-size: 20px;
        font-weight: 800;
        color: #0f172a;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
    }
    .cg-header-icon {
        width: 36px;
        height: 36px;
        background: #eef2ff;
        border: 1px solid #c7d2fe;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #4f46e5;
        font-size: 16px;
    }
    .cg-header-desc {
        color: #64748b;
        font-size: 12px;
        margin-top: 3px;
        margin-bottom: 0;
    }
    .cg-btn-add {
        background: #4f46e5;
        color: #ffffff !important;
        font-weight: 700;
        font-size: 13px;
        padding: 8px 18px;
        border-radius: 8px;
        border: none;
        box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.15s ease;
        text-decoration: none !important;
        cursor: pointer;
    }
    .cg-btn-add:hover {
        background: #4338ca;
        box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
        color: #ffffff !important;
    }

    /* KPI Grid - Compact */
    .cg-kpi-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }
    @media (max-width: 1200px) {
        .cg-kpi-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    @media (max-width: 768px) {
        .cg-kpi-grid {
            grid-template-columns: 1fr;
        }
    }

    .cg-kpi-card {
        background: #ffffff;
        border-radius: 12px;
        padding: 12px 16px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .cg-kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }
    .cg-kpi-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }
    .cg-kpi-label {
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    .cg-kpi-icon-wrap {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }
    .cg-kpi-val {
        font-size: 20px;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.2;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .cg-kpi-badge {
        font-size: 11px;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 6px;
    }
    .cg-kpi-sub {
        font-size: 11px;
        color: #64748b;
        margin-top: 6px;
    }

    /* KPI Theme Colors */
    .cg-kpi-indigo .cg-kpi-icon-wrap { background: #eef2ff; color: #4f46e5; }
    .cg-kpi-emerald .cg-kpi-icon-wrap { background: #ecfdf5; color: #059669; }
    .cg-kpi-amber .cg-kpi-icon-wrap { background: #fffbeb; color: #d97706; }
    .cg-kpi-blue .cg-kpi-icon-wrap { background: #eff6ff; color: #2563eb; }
    .cg-kpi-rose .cg-kpi-icon-wrap { background: #fff1f2; color: #e11d48; }

    /* Table Container Card */
    .cg-table-card {
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        overflow: hidden;
    }
    .cg-table-header {
        padding: 14px 20px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        background: #ffffff;
    }
    .cg-table-title {
        font-size: 15px;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .cg-table-count-badge {
        font-size: 11px;
        font-weight: 700;
        background: #eef2ff;
        color: #4f46e5;
        padding: 2px 8px;
        border-radius: 12px;
        border: 1px solid #c7d2fe;
    }

    /* Table Styles */
    .table-modern {
        margin: 0 !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    .table-modern thead th {
        background-color: #f8fafc !important;
        color: #475569 !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        padding: 11px 14px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        border-top: none !important;
        white-space: nowrap;
    }
    .table-modern tbody tr:hover {
        background-color: #f8fafc !important;
    }
    .table-modern tbody td {
        padding: 10px 14px !important;
        vertical-align: middle !important;
        border-top: 1px solid #f1f5f9 !important;
        border-bottom: none !important;
        font-size: 13px !important;
        color: #1e293b;
    }

    /* Name Cell */
    .cg-name-cell {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .cg-name-avatar {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: #eef2ff;
        color: #4f46e5;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        border: 1px solid #c7d2fe;
    }
    .cg-name-main {
        font-weight: 700;
        color: #0f172a;
        font-size: 13px;
    }
    .cg-name-sub {
        font-size: 10px;
        color: #94a3b8;
        font-weight: 600;
    }

    /* Calculation Badges */
    .cg-calc-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 8px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 11px;
    }
    .cg-calc-pct-pos { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
    .cg-calc-pct-neg { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
    .cg-calc-spg { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
    .cg-null-cell { color: #cbd5e1; font-weight: 700; }

    /* Members Pill */
    .cg-members-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 10px;
        border-radius: 16px;
        font-weight: 700;
        font-size: 11px;
        background: #eef2ff;
        color: #4338ca;
        border: 1px solid #c7d2fe;
        text-decoration: none !important;
        transition: all 0.15s ease;
    }
    .cg-members-pill:hover {
        background: #4338ca;
        color: #ffffff !important;
    }
    .cg-ext-icon { font-size: 9px; opacity: 0.7; }

    /* Finance Badges */
    .cg-finance-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 8px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 11px;
    }
    .cg-sales-pill { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
    .cg-due-has { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
    .cg-due-zero { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

    /* Action Buttons Group */
    .cg-action-group {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: nowrap;
    }
    .cg-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 5px 10px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 11px;
        border: 1px solid transparent;
        cursor: pointer;
        text-decoration: none !important;
        transition: all 0.15s ease;
        line-height: 1.2;
    }
    .cg-btn-whatsapp {
        background: #ecfdf5;
        color: #047857 !important;
        border-color: #a7f3d0;
    }
    .cg-btn-whatsapp:hover {
        background: #059669;
        color: #ffffff !important;
        border-color: #059669;
    }
    .cg-btn-export {
        background: #f1f5f9;
        color: #334155 !important;
        border-color: #cbd5e1;
    }
    .cg-btn-export:hover {
        background: #334155;
        color: #ffffff !important;
        border-color: #334155;
    }
    .cg-btn-edit {
        background: #eef2ff;
        color: #4338ca !important;
        border-color: #c7d2fe;
        padding: 5px 8px;
    }
    .cg-btn-edit:hover {
        background: #4338ca;
        color: #ffffff !important;
    }
    .cg-btn-delete {
        background: #fff1f2;
        color: #e11d48 !important;
        border-color: #fecdd3;
        padding: 5px 8px;
    }
    .cg-btn-delete:hover {
        background: #e11d48;
        color: #ffffff !important;
    }

    .cg-table-loader {
        padding: 15px;
        text-align: center;
        color: #4f46e5;
        font-weight: 700;
        font-size: 13px;
    }

/* === CONTACT VIEW STYLES === */
/* Modern DataTables processing indicator */
    .vp-contact-card .dataTables_processing {
        background: rgba(15, 23, 42, 0.92) !important;
        color: #60a5fa !important;
        border: 1px solid #2563eb !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
        border-radius: 12px !important;
        padding: 12px 28px !important;
        font-weight: 700 !important;
        font-size: 13.5px !important;
        z-index: 1050 !important;
    }

    .contact-hero-banner {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 22px 26px;
        margin-bottom: 22px;
        box-shadow: 0 4px 16px -2px rgba(15,23,42,0.04);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 16px;
    }
    .contact-kpi-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 16px 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.02);
        display: flex;
        align-items: center;
        gap: 16px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .contact-kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px -4px rgba(0,0,0,0.06);
    }
    .bulk-action-bar-active {
        display: flex !important;
        animation: fadeInSlide 0.25s ease-out;
    }
    @keyframes fadeInSlide {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .group-mode-tab {
        transition: all 0.2s ease;
    }
    .group-mode-tab.active {
        background: #ffffff !important;
        color: #2563eb !important;
        box-shadow: 0 2px 6px rgba(37,99,235,0.12) !important;
    }

    /* ==========================================================================
       Modern Table & Action Buttons Design System
       ========================================================================== */
    .vp-contact-card {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 18px !important;
        box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04) !important;
        padding: 22px 24px !important;
        margin-bottom: 30px !important;
        overflow: hidden !important;
    }

    /* 1. Modern Toolbar Layout */
    .vp-contact-card .vp-dt-toolbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 14px !important;
        margin-bottom: 20px !important;
        padding-bottom: 16px !important;
        border-bottom: 1px solid #f1f5f9 !important;
        width: 100% !important;
    }
    .vp-contact-card .vp-dt-right {
        display: flex !important;
        align-items: center !important;
    }
    .vp-contact-card .vp-dt-center {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    .vp-contact-card .vp-dt-left {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    /* 2. Action Buttons (CSV, Excel, PDF, Print, ColVis) */
    .vp-contact-card .dt-buttons {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        flex-wrap: wrap !important;
        direction: rtl !important;
    }
    .vp-contact-card .dt-buttons ~ .dt-buttons {
        display: none !important;
    }
    .vp-contact-card .vp-dt-btn,
    .vp-contact-card .dt-buttons button,
    .vp-contact-card .dt-buttons a,
    .vp-contact-card .dt-buttons .btn,
    .vp-contact-card .dt-buttons .dt-button {
        font-family: 'Cairo', 'Inter', -apple-system, sans-serif !important;
        font-size: 12.5px !important;
        font-weight: 700 !important;
        padding: 7px 16px !important;
        border-radius: 10px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        cursor: pointer !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        outline: none !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
        margin: 0 !important;
        text-decoration: none !important;
        direction: rtl !important;
        height: 38px !important;
    }
    .vp-contact-card .dt-buttons button > span,
    .vp-contact-card .dt-buttons a > span,
    .vp-contact-card .dt-buttons .btn > span,
    .vp-contact-card .dt-buttons .dt-button > span,
    .vp-contact-card .vp-dt-btn > span {
        display: inline-flex !important;
        flex-direction: row-reverse !important;
        align-items: center !important;
        gap: 7px !important;
        direction: rtl !important;
    }
    .vp-contact-card .dt-buttons button i,
    .vp-contact-card .dt-buttons a i,
    .vp-contact-card .dt-buttons .btn i,
    .vp-contact-card .dt-buttons .dt-button i,
    .vp-contact-card .vp-dt-btn i {
        font-size: 13.5px !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 1. CSV Button */
    .vp-contact-card .buttons-csv {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        color: #334155 !important;
    }
    .vp-contact-card .buttons-csv i { color: #475569 !important; }
    .vp-contact-card .buttons-csv:hover {
        background: #f1f5f9 !important;
        border-color: #94a3b8 !important;
        color: #0f172a !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(51, 65, 85, 0.12) !important;
    }

    /* 2. Excel Button */
    .vp-contact-card .buttons-excel {
        background: #ecfdf5 !important;
        border: 1px solid #a7f3d0 !important;
        color: #047857 !important;
    }
    .vp-contact-card .buttons-excel i { color: #059669 !important; }
    .vp-contact-card .buttons-excel:hover {
        background: #d1fae5 !important;
        border-color: #059669 !important;
        color: #065f46 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22) !important;
    }

    /* 3. PDF Button */
    .vp-contact-card .buttons-pdf,
    .vp-contact-card .vp-btn-pdf {
        background: #fff1f2 !important;
        border: 1px solid #fecdd3 !important;
        color: #be123c !important;
    }
    .vp-contact-card .buttons-pdf i,
    .vp-contact-card .vp-btn-pdf i { color: #e11d48 !important; }
    .vp-contact-card .buttons-pdf:hover,
    .vp-contact-card .vp-btn-pdf:hover {
        background: #ffe4e6 !important;
        border-color: #e11d48 !important;
        color: #9f1239 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 14px rgba(225, 29, 72, 0.22) !important;
    }

    /* 4. Print Button */
    .vp-contact-card .buttons-print {
        background: #f0f9ff !important;
        border: 1px solid #bae6fd !important;
        color: #0369a1 !important;
    }
    .vp-contact-card .buttons-print i { color: #0284c7 !important; }
    .vp-contact-card .buttons-print:hover {
        background: #e0f2fe !important;
        border-color: #0284c7 !important;
        color: #075985 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22) !important;
    }

    /* 5. Column Visibility Button */
    .vp-contact-card .buttons-colvis,
    .vp-contact-card .vp-btn-colvis {
        background: #eff6ff !important;
        border: 1px solid #bfdbfe !important;
        color: #1d4ed8 !important;
    }
    .vp-contact-card .buttons-colvis i,
    .vp-contact-card .vp-btn-colvis i { color: #2563eb !important; }
    .vp-contact-card .buttons-colvis:hover,
    .vp-contact-card .vp-btn-colvis:hover {
        background: #dbeafe !important;
        border-color: #2563eb !important;
        color: #1e40af !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22) !important;
    }

    /* 3. Length Select & Search Input Styling */
    .vp-contact-card .dataTables_length {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        float: none !important;
    }
    .vp-contact-card .dataTables_length label {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #475569 !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        padding: 0 14px !important;
        border-radius: 12px !important;
        white-space: nowrap !important;
        direction: rtl !important;
        height: 38px !important;
        box-sizing: border-box !important;
    }
    .vp-contact-card .dataTables_length select {
        margin: 0 6px !important;
        height: 28px !important;
        border-radius: 8px !important;
        padding: 0 8px !important;
        border: 1px solid #cbd5e1 !important;
        background: #ffffff !important;
        color: #2563eb !important;
        font-weight: 800 !important;
        font-size: 13px !important;
        outline: none !important;
        cursor: pointer !important;
    }
    .vp-contact-card .dataTables_filter {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        float: none !important;
    }
    .vp-contact-card .dataTables_filter label {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        position: relative !important;
        width: auto !important;
    }
    .vp-contact-card .dataTables_filter input {
        height: 38px !important;
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
        background: #f8fafc !important;
        color: #0f172a !important;
        padding: 0 38px 0 16px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        outline: none !important;
        transition: all 0.2s ease !important;
        width: 240px !important;
        margin: 0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    }
    .vp-contact-card .dataTables_filter input:focus {
        border-color: #2563eb !important;
        background: #ffffff !important;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
        width: 270px !important;
    }
    .vp-contact-card .dataTables_filter .vp-search-icon {
        position: absolute !important;
        right: 13px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #94a3b8 !important;
        font-size: 14px !important;
        pointer-events: none !important;
    }

    /* 4. Organized Data Table - Centered with Clear Column Divider Lines */
    .vp-contact-card .table-responsive {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        overflow: visible !important;
        margin-bottom: 0 !important;
    }
    .vp-contact-card .vp-table-responsive {
        border: 1px solid #cbd5e1 !important;
        border-radius: 14px !important;
        overflow-x: auto !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
        margin-top: 14px !important;
        margin-bottom: 18px !important;
    }
    .vp-contact-card #contact_table,
    .vp-contact-card table.dataTable {
        border-collapse: collapse !important;
        width: 100% !important;
        margin: 0 !important;
        font-family: 'Cairo', 'Inter', -apple-system, sans-serif !important;
        border: 1px solid #cbd5e1 !important;
    }
    .vp-contact-card #contact_table thead th,
    .vp-contact-card table.dataTable thead th {
        background: #f8fafc !important;
        color: #1e293b !important;
        font-weight: 800 !important;
        font-size: 13px !important;
        letter-spacing: 0.2px !important;
        padding: 13px 14px !important;
        border: 1px solid #cbd5e1 !important;
        border-bottom: 2px solid #94a3b8 !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        text-align: center !important;
    }
    .vp-contact-card #contact_table tbody td,
    .vp-contact-card table.dataTable tbody td {
        padding: 11px 14px !important;
        vertical-align: middle !important;
        border: 1px solid #e2e8f0 !important;
        color: #1e293b !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        background: #ffffff !important;
        text-align: center !important;
        transition: background 0.15s ease !important;
    }
    .vp-contact-card #contact_table tbody tr:nth-child(even) td,
    .vp-contact-card table.dataTable tbody tr:nth-child(even) td {
        background: #f8fafc !important;
    }
    .vp-contact-card #contact_table tbody tr:hover td,
    .vp-contact-card table.dataTable tbody tr:hover td {
        background: #eff6ff !important;
    }
    .vp-contact-card #contact_table tfoot tr,
    .vp-contact-card table.dataTable tfoot tr {
        background: #f8fafc !important;
    }
    .vp-contact-card #contact_table tfoot td,
    .vp-contact-card table.dataTable tfoot td {
        padding: 13px 14px !important;
        font-size: 13.5px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
        border-top: 2px solid #94a3b8 !important;
        vertical-align: middle !important;
        text-align: center !important;
    }

    /* Centering internal cell elements (buttons, checkboxes, badges, currency) */
    .vp-contact-card table.dataTable tbody td .btn-group {
        display: inline-flex !important;
        justify-content: center !important;
        margin: 0 auto !important;
        float: none !important;
    }
    .vp-contact-card table.dataTable thead th input[type="checkbox"],
    .vp-contact-card table.dataTable tbody td input[type="checkbox"] {
        margin: 0 auto !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }
    .vp-contact-card table.dataTable tbody td a,
    .vp-contact-card table.dataTable tbody td span,
    .vp-contact-card table.dataTable tbody td .display_currency {
        text-align: center !important;
        display: inline-block !important;
    }

    /* Actions dropdown in table */
    .vp-contact-card .btn-group .tw-dw-btn,
    .vp-contact-card .btn-group .btn {
        background: #eff6ff !important;
        color: #2563eb !important;
        border: 1px solid #bfdbfe !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        padding: 5px 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        transition: all 0.2s ease !important;
        box-shadow: none !important;
    }
    .vp-contact-card .btn-group .tw-dw-btn:hover,
    .vp-contact-card .btn-group .btn:hover {
        background: #2563eb !important;
        color: #ffffff !important;
        border-color: #2563eb !important;
    }
    .vp-contact-card .btn-group .dropdown-menu {
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1) !important;
        padding: 6px 0 !important;
        min-width: 170px !important;
    }
    .vp-contact-card .btn-group .dropdown-menu > li > a {
        padding: 8px 16px !important;
        font-size: 12.5px !important;
        font-weight: 600 !important;
        color: #334155 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .vp-contact-card .btn-group .dropdown-menu > li > a:hover {
        background: #eff6ff !important;
        color: #2563eb !important;
    }

    /* 5. Pagination & Footer Info */
    .vp-contact-card .vp-dt-footer {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 14px !important;
        margin-top: 18px !important;
        padding-top: 14px !important;
        border-top: 1px solid #f1f5f9 !important;
        width: 100% !important;
    }
    .vp-contact-card .dataTables_info {
        font-size: 13px !important;
        color: #64748b !important;
        font-weight: 600 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .vp-contact-card .dataTables_paginate .pagination {
        margin: 0 !important;
        display: flex !important;
        gap: 4px !important;
    }
    .vp-contact-card .dataTables_paginate .pagination > li > a,
    .vp-contact-card .dataTables_paginate .pagination > li > span {
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        color: #334155 !important;
        font-weight: 700 !important;
        font-size: 12.5px !important;
        padding: 6px 12px !important;
        background: #ffffff !important;
    }
    .vp-contact-card .dataTables_paginate .pagination > .active > a,
    .vp-contact-card .dataTables_paginate .pagination > .active > span {
        background: #2563eb !important;
        border-color: #2563eb !important;
        color: #ffffff !important;
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25) !important;
    }

    /* 6. Column Visibility Modal Styling */
    .vp-colvis-modal .modal-content {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 20px !important;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
        overflow: hidden !important;
    }
    .vp-colvis-modal .modal-header {
        background: #f8fafc !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 18px 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .vp-colvis-modal .modal-title {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .vp-colvis-modal .modal-title i {
        color: #2563eb !important;
    }
    .vp-colvis-modal .modal-body {
        padding: 22px !important;
        max-height: 65vh !important;
        overflow-y: auto !important;
    }
    .vp-colvis-toolbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin-bottom: 18px !important;
        padding-bottom: 14px !important;
        border-bottom: 1px dashed #e2e8f0 !important;
    }
    .vp-colvis-hint {
        font-size: 12.5px !important;
        color: #475569 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }
    .vp-colvis-quick-btns {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .vp-quick-btn {
        font-size: 11.5px !important;
        font-weight: 700 !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        color: #334155 !important;
        cursor: pointer !important;
        transition: all 0.18s ease !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
    }
    .vp-quick-btn:hover {
        background: #e2e8f0 !important;
        color: #2563eb !important;
        border-color: #94a3b8 !important;
    }
    .vp-cols-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 10px !important;
    }
    .vp-col-item-card {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 10px 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        cursor: pointer !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        user-select: none !important;
        margin: 0 !important;
    }
    .vp-col-item-card:hover {
        border-color: #cbd5e1 !important;
        background: #f1f5f9 !important;
        transform: translateY(-1px) !important;
    }
    .vp-col-item-card.is-active {
        background: rgba(37, 99, 235, 0.08) !important;
        border-color: rgba(37, 99, 235, 0.35) !important;
    }
    .vp-col-item-card input[type="checkbox"] {
        display: none !important;
    }
    .vp-col-checkbox-custom {
        width: 20px !important;
        height: 20px !important;
        border-radius: 6px !important;
        border: 2px solid #cbd5e1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
        background: #ffffff !important;
    }
    .vp-col-checkbox-custom i {
        display: none !important;
        font-size: 11px !important;
        color: #ffffff !important;
        line-height: 1 !important;
    }
    .vp-col-item-card.is-active .vp-col-checkbox-custom {
        background: #2563eb !important;
        border-color: #2563eb !important;
    }
    .vp-col-item-card.is-active .vp-col-checkbox-custom i {
        display: inline-block !important;
    }
    .vp-col-item-text {
        font-size: 12.5px !important;
        font-weight: 700 !important;
        color: #64748b !important;
        transition: color 0.15s ease !important;
    }
    .vp-col-item-card.is-active .vp-col-item-text {
        color: #1d4ed8 !important;
    }

    /* Base classes for contact components */
    .contact-hero-title { color: #0f172a; }
    .contact-hero-subtitle { color: #64748b; }
    .btn-hero-secondary {
        background: #f8fafc !important;
        color: #334155 !important;
        border: 1px solid #cbd5e1 !important;
    }
    .btn-hero-secondary:hover {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border-color: #94a3b8 !important;
    }
    .contact-kpi-label { color: #64748b; }
    .contact-kpi-val { color: #0f172a; }
    .contact-bulk-bar {
        background: #ffffff;
        border: 1px solid #93c5fd;
        border-radius: 14px;
        box-shadow: 0 10px 25px -5px rgba(37,99,235,0.12);
    }
    .vp-contact-card .box-header {
        background: #ffffff;
        border-bottom: 1px solid #f1f5f9;
    }
    .vp-contact-card .box-title { color: #0f172a; }

    /* ==========================================================================
       DARK MODE OVERRIDES (html[data-theme="dark"])
       ========================================================================== */
    html[data-theme="dark"] .contact-hero-banner {
        background: #111c2a !important;
        border: 1px solid #1e293b !important;
        box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
        color: #f8fafc !important;
    }
    html[data-theme="dark"] .contact-hero-icon {
        background: rgba(37, 99, 235, 0.15) !important;
        border-color: rgba(37, 99, 235, 0.35) !important;
    }
    html[data-theme="dark"] .contact-hero-icon i {
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .contact-hero-title,
    html[data-theme="dark"] .contact-hero-banner h3 {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .contact-hero-subtitle,
    html[data-theme="dark"] .contact-hero-banner p {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .btn-hero-secondary {
        background: #162234 !important;
        border-color: #334155 !important;
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .btn-hero-secondary:hover {
        background: #1e293b !important;
        border-color: #475569 !important;
        color: #ffffff !important;
    }

    /* KPI Cards in Dark Mode */
    html[data-theme="dark"] .contact-kpi-card {
        background: #111c2a !important;
        border: 1px solid #1e293b !important;
        box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.35) !important;
    }
    html[data-theme="dark"] .contact-kpi-card:hover {
        border-color: #334155 !important;
        box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5) !important;
    }
    html[data-theme="dark"] .contact-kpi-label {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .contact-kpi-val {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-blue {
        background: rgba(37, 99, 235, 0.18) !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-blue i {
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-green {
        background: rgba(16, 185, 129, 0.18) !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-green i,
    html[data-theme="dark"] .contact-kpi-val.kpi-val-green {
        color: #34d399 !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-purple {
        background: rgba(99, 102, 241, 0.18) !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-purple i,
    html[data-theme="dark"] .contact-kpi-val.kpi-val-purple {
        color: #a5b4fc !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-amber {
        background: rgba(245, 158, 11, 0.18) !important;
    }
    html[data-theme="dark"] .contact-kpi-icon.kpi-amber i,
    html[data-theme="dark"] .contact-kpi-val.kpi-val-amber {
        color: #fbbf24 !important;
    }

    /* Bulk Action Bar in Dark Mode */
    html[data-theme="dark"] #bulk_customer_action_bar,
    html[data-theme="dark"] .contact-bulk-bar {
        background: #111c2a !important;
        border-color: #2563eb !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
        color: #f8fafc !important;
    }
    html[data-theme="dark"] #bulk_customer_action_bar span {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] #bulk_customer_action_bar span span.badge {
        background: #2563eb !important;
        color: #ffffff !important;
    }
    html[data-theme="dark"] #btn_clear_selection {
        background: #162234 !important;
        border-color: #334155 !important;
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] #btn_clear_selection:hover {
        background: #1e293b !important;
        color: #ffffff !important;
    }

    /* Main Card in Dark Mode */
    html[data-theme="dark"] .vp-contact-card {
        background: #111c2a !important;
        border: 1px solid #1e293b !important;
        box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.4) !important;
    }
    html[data-theme="dark"] .vp-contact-card .box-header {
        background: #111c2a !important;
        border-bottom-color: #1e293b !important;
    }
    html[data-theme="dark"] .vp-contact-card .box-title {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .vp-contact-card .box-title i {
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .vp-table-preloader {
        background: #111c2a !important;
        border-color: #1e293b !important;
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .vp-table-preloader span {
        color: #cbd5e1 !important;
    }

    /* Toolbar Layout in Dark Mode */
    html[data-theme="dark"] .vp-contact-card .vp-dt-toolbar {
        border-bottom-color: #1e293b !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_length label {
        background: #162234 !important;
        border-color: #1e293b !important;
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_length select {
        background: #0d1522 !important;
        border-color: #334155 !important;
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_filter input {
        background: #0d1522 !important;
        border-color: #1e293b !important;
        color: #f8fafc !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_filter input:focus {
        background: #111c2a !important;
        border-color: #2563eb !important;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_filter .vp-search-icon {
        color: #64748b !important;
    }

    /* Action Buttons in Dark Mode */
    html[data-theme="dark"] .vp-contact-card .buttons-csv {
        background: #162234 !important;
        border-color: #334155 !important;
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-csv i {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-csv:hover {
        background: #1e293b !important;
        border-color: #475569 !important;
        color: #ffffff !important;
    }

    html[data-theme="dark"] .vp-contact-card .buttons-excel {
        background: rgba(16, 185, 129, 0.15) !important;
        border-color: rgba(16, 185, 129, 0.35) !important;
        color: #34d399 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-excel i {
        color: #34d399 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-excel:hover {
        background: rgba(16, 185, 129, 0.25) !important;
        border-color: #34d399 !important;
        color: #6ee7b7 !important;
    }

    html[data-theme="dark"] .vp-contact-card .buttons-pdf,
    html[data-theme="dark"] .vp-contact-card .vp-btn-pdf {
        background: rgba(225, 29, 72, 0.15) !important;
        border-color: rgba(225, 29, 72, 0.35) !important;
        color: #fb7185 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-pdf i,
    html[data-theme="dark"] .vp-contact-card .vp-btn-pdf i {
        color: #fb7185 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-pdf:hover,
    html[data-theme="dark"] .vp-contact-card .vp-btn-pdf:hover {
        background: rgba(225, 29, 72, 0.25) !important;
        border-color: #fb7185 !important;
        color: #fda4af !important;
    }

    html[data-theme="dark"] .vp-contact-card .buttons-print {
        background: rgba(2, 132, 199, 0.15) !important;
        border-color: rgba(2, 132, 199, 0.35) !important;
        color: #38bdf8 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-print i {
        color: #38bdf8 !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-print:hover {
        background: rgba(2, 132, 199, 0.25) !important;
        border-color: #38bdf8 !important;
        color: #7dd3fc !important;
    }

    html[data-theme="dark"] .vp-contact-card .buttons-colvis,
    html[data-theme="dark"] .vp-contact-card .vp-btn-colvis {
        background: rgba(37, 99, 235, 0.18) !important;
        border-color: rgba(37, 99, 235, 0.4) !important;
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-colvis i,
    html[data-theme="dark"] .vp-contact-card .vp-btn-colvis i {
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .vp-contact-card .buttons-colvis:hover,
    html[data-theme="dark"] .vp-contact-card .vp-btn-colvis:hover {
        background: rgba(37, 99, 235, 0.3) !important;
        border-color: #60a5fa !important;
        color: #93c5fd !important;
    }

    /* Table Container & Table Cells in Dark Mode */
    html[data-theme="dark"] .vp-contact-card .vp-table-responsive {
        background: #0d1522 !important;
        border: 1px solid #1e293b !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table,
    html[data-theme="dark"] .vp-contact-card table.dataTable {
        border-color: #1e293b !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table thead th,
    html[data-theme="dark"] .vp-contact-card table.dataTable thead th {
        background: #162234 !important;
        color: #f1f5f9 !important;
        border: 1px solid #1e293b !important;
        border-bottom: 2px solid #334155 !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table tbody td,
    html[data-theme="dark"] .vp-contact-card table.dataTable tbody td {
        background: #111c2a !important;
        color: #cbd5e1 !important;
        border: 1px solid #1e293b !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table tbody tr:nth-child(even) td,
    html[data-theme="dark"] .vp-contact-card table.dataTable tbody tr:nth-child(even) td {
        background: #0d1522 !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table tbody tr:hover td,
    html[data-theme="dark"] .vp-contact-card table.dataTable tbody tr:hover td {
        background: #1e293b !important;
        color: #ffffff !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table tfoot tr,
    html[data-theme="dark"] .vp-contact-card table.dataTable tfoot tr {
        background: #162234 !important;
    }
    html[data-theme="dark"] .vp-contact-card #contact_table tfoot td,
    html[data-theme="dark"] .vp-contact-card table.dataTable tfoot td {
        background: #162234 !important;
        color: #f1f5f9 !important;
        border: 1px solid #1e293b !important;
        border-top: 2px solid #334155 !important;
    }

    /* Action button & Dropdown in Table Rows */
    html[data-theme="dark"] .vp-contact-card .btn-group .tw-dw-btn,
    html[data-theme="dark"] .vp-contact-card .btn-group .btn {
        background: #162234 !important;
        color: #60a5fa !important;
        border-color: #2563eb !important;
    }
    html[data-theme="dark"] .vp-contact-card .btn-group .tw-dw-btn:hover,
    html[data-theme="dark"] .vp-contact-card .btn-group .btn:hover {
        background: #2563eb !important;
        color: #ffffff !important;
    }
    html[data-theme="dark"] .vp-contact-card .btn-group .dropdown-menu {
        background: #111c2a !important;
        border: 1px solid #1e293b !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    }
    html[data-theme="dark"] .vp-contact-card .btn-group .dropdown-menu > li > a {
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .vp-contact-card .btn-group .dropdown-menu > li > a:hover {
        background: #1e293b !important;
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .vp-contact-card .btn-group .dropdown-menu .divider {
        background: #1e293b !important;
    }

    /* Footer / Pagination in Dark Mode */
    html[data-theme="dark"] .vp-contact-card .vp-dt-footer {
        border-top-color: #1e293b !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_info {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > li > a,
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > li > span {
        background: #162234 !important;
        border-color: #1e293b !important;
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > li > a:hover {
        background: #1e293b !important;
        color: #ffffff !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > .active > a,
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > .active > span {
        background: #2563eb !important;
        border-color: #2563eb !important;
        color: #ffffff !important;
    }
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > .disabled > a,
    html[data-theme="dark"] .vp-contact-card .dataTables_paginate .pagination > .disabled > span {
        background: #0d1522 !important;
        border-color: #1e293b !important;
        color: #475569 !important;
    }

    /* Modals in Dark Mode */
    html[data-theme="dark"] .vp-colvis-modal .modal-content,
    html[data-theme="dark"] #modal_assign_customer_group .modal-content {
        background: #111c2a !important;
        border: 1px solid #1e293b !important;
        color: #f8fafc !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
    }
    html[data-theme="dark"] .vp-colvis-modal .modal-header,
    html[data-theme="dark"] #modal_assign_customer_group .modal-header {
        background: #162234 !important;
        border-bottom: 1px solid #1e293b !important;
    }
    html[data-theme="dark"] .vp-colvis-modal .modal-title,
    html[data-theme="dark"] #modal_assign_customer_group .modal-title {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .vp-colvis-modal .modal-footer,
    html[data-theme="dark"] #modal_assign_customer_group .modal-footer {
        background: #162234 !important;
        border-top: 1px solid #1e293b !important;
    }
    html[data-theme="dark"] .vp-colvis-modal .modal-footer .btn-default,
    html[data-theme="dark"] #modal_assign_customer_group .modal-footer .btn-default {
        background: #1e293b !important;
        border-color: #334155 !important;
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .vp-colvis-toolbar {
        border-bottom-color: #1e293b !important;
    }
    html[data-theme="dark"] .vp-colvis-hint {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .vp-quick-btn {
        background: #162234 !important;
        border-color: #334155 !important;
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .vp-quick-btn:hover {
        background: #1e293b !important;
        color: #60a5fa !important;
        border-color: #2563eb !important;
    }
    html[data-theme="dark"] .vp-col-item-card {
        background: #162234 !important;
        border-color: #1e293b !important;
    }
    html[data-theme="dark"] .vp-col-item-card:hover {
        background: #1e293b !important;
        border-color: #334155 !important;
    }
    html[data-theme="dark"] .vp-col-item-card.is-active {
        background: rgba(37, 99, 235, 0.2) !important;
        border-color: #2563eb !important;
    }
    html[data-theme="dark"] .vp-col-item-text {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] .vp-col-item-card.is-active .vp-col-item-text {
        color: #60a5fa !important;
    }
    html[data-theme="dark"] .vp-col-checkbox-custom {
        background: #0d1522 !important;
        border-color: #334155 !important;
    }
    html[data-theme="dark"] .vp-col-item-card.is-active .vp-col-checkbox-custom {
        background: #2563eb !important;
        border-color: #2563eb !important;
    }

    /* Group assignment modal in Dark Mode */
    html[data-theme="dark"] #modal_assign_customer_group .nav-pills {
        background: #162234 !important;
    }
    html[data-theme="dark"] #modal_assign_customer_group .group-mode-tab {
        color: #94a3b8 !important;
    }
    html[data-theme="dark"] #modal_assign_customer_group .group-mode-tab.active {
        background: #2563eb !important;
        color: #ffffff !important;
    }
    html[data-theme="dark"] #modal_assign_customer_group label {
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] #modal_assign_customer_group .form-control {
        background: #0d1522 !important;
        border-color: #334155 !important;
        color: #f8fafc !important;
    }
    html[data-theme="dark"] #modal_assign_customer_group .help-block {
        color: #64748b !important;
    }

    /* Filters Box in Dark Mode */
    html[data-theme="dark"] .box-solid,
    html[data-theme="dark"] .box:not(.vp-contact-card) {
        background: #111c2a !important;
        border: 1px solid #1e293b !important;
        color: #e2e8f0 !important;
    }
    html[data-theme="dark"] .box:not(.vp-contact-card) .box-header {
        background: #111c2a !important;
        border-bottom-color: #1e293b !important;
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .box:not(.vp-contact-card) .box-title {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .box:not(.vp-contact-card) label {
        color: #cbd5e1 !important;
    }
    html[data-theme="dark"] .box:not(.vp-contact-card) .form-control {
        background: #0d1522 !important;
        border-color: #334155 !important;
        color: #f8fafc !important;
    }
    html[data-theme="dark"] .select2-container--default .select2-selection--single {
        background: #0d1522 !important;
        border-color: #334155 !important;
    }
    html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #f8fafc !important;
    }