    /* General styling for graph containers (from your provided CSS) */
    .ff_graph_container,
    #mcag-graph-container {
        /* Added existing graph container ID for consistency */
        background-color: #f9f9f9;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        margin-bottom: 30px;
        overflow: hidden;
        /* Ensures content stays within bounds */
        cursor: pointer;
        border-radius: 8px;
        /* Added for a softer look */
    }

    /* Specific graph chart area responsive adjustments */
    #mcag-chart-area-container {
        position: relative;
        height: 35vh;
        /* Responsive height */
        width: 100%;
        margin-bottom: 20px;
    }

    /* Graph controls styling (from your provided CSS) */
    .mcag-graph-controls {
        text-align: center;
        padding-top: 0;
        padding-bottom: 15px;
        /* Add some padding at the bottom */
    }

    .mcag-control-group {
        margin-bottom: 8px;
        display: inline-block;
        margin-right: 15px;
    }

    .mcag-control-group:last-child {
        margin-bottom: 0;
        margin-right: 0;
    }

    .mcag-control-label {
        font-weight: normal;
        opacity: 0.7;
        font-size: 0.85em;
        margin-right: 8px;
        display: inline-block;
        vertical-align: middle;
    }

    .mcag-graph-controls button {
        padding: 6px 12px;
        margin: 3px 2px;
        border: 1px solid rgba(15, 27, 45, 0.3);
        /* Using rgba for dark blue */
        background-color: transparent;
        border-radius: 15px;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        font-size: 0.8em;
        line-height: 1.2;
        display: inline-block;
        vertical-align: middle;
        color: #0F1B2D;
        /* Default button text color */
    }

    .mcag-graph-controls button:hover {
        background-color: rgba(15, 27, 45, 0.05);
        border-color: rgba(15, 27, 45, 0.5);
    }

    .mcag-graph-controls button.active {
        background-color: #0F1B2D;
        color: white;
        /* White text on dark blue active button */
        border-color: #0F1B2D;
        font-weight: bold;
    }

    .mcag-graph-controls button:disabled {
        border-color: #e0e0e0;
        color: #ccc;
        cursor: not-allowed;
        opacity: 0.6;
    }

    .mcag-loading-message,
    .mcag-error-message {
        text-align: center;
        padding: 20px;
        font-style: italic;
        color: rgba(15, 27, 45, 0.7);
    }

    /* Responsive table styling - Consolidated */
    /* Wrapper for horizontal scrolling on small screens if table content overflows */
    .responsive-table-wrap,
    .wp-list-table-wrapper,
    /* Added for consistency with previous suggestion */
    .affwp-custom-list-wrapper {
        /* Added for consistency with previous suggestion */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
        margin-bottom: 20px;
    }

    /* Base table styles - applies to all tables with these classes */
    .wp-list-table,
    .affwp-custom-list table,
    .shop_table.woocommerce-orders-table,
    .form-table {
        /* Added form-table for admin forms */
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1em;
        background-color: #fff;
        border-radius: 5px;
        /* Slightly rounded corners for tables */
        overflow: hidden;
        /* Ensures border-radius works with borders */
    }

    /* Table cell padding and borders */
    .wp-list-table th,
    .wp-list-table td,
    .affwp-custom-list th,
    .affwp-custom-list td,
    .shop_table.woocommerce-orders-table th,
    .shop_table.woocommerce-orders-table td,
    .form-table th,
    .form-table td {
        padding: 12px 15px;
        /* Generous padding */
        border: 1px solid #e0e0e0;
        text-align: left;
        vertical-align: middle;
    }

    /* Table header specific styles */
    .wp-list-table thead th,
    .affwp-custom-list thead th,
    .shop_table.woocommerce-orders-table thead th {
        background-color: #0F1B2D;
        /* Dark Blue */
        color: #FFD94C;
        /* Gold */
        font-weight: bold;
        white-space: nowrap;
        /* Prevent headers from wrapping */
    }

    /* Zebra striping for table rows */
    .wp-list-table tbody tr:nth-child(even),
    .affwp-custom-list tbody tr:nth-child(even),
    .shop_table.woocommerce-orders-table tbody tr:nth-child(even) {
        background-color: #f8f8f8;
        /* Lighter stripe */
    }

    .wp-list-table tbody tr:hover,
    .affwp-custom-list tbody tr:hover,
    .shop_table.woocommerce-orders-table tbody tr:hover {
        background-color: #eef;
        /* Subtle hover effect */
    }


    /* Modal specific styles (from your provided CSS) */
    .ff_modal {
        display: none;
        position: fixed;
        z-index: 1051;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.7);
        padding-top: 60px;
    }

    .ff_modal-content {
        background-color: #fefefe;
        margin: 5% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 90%;
        max-width: 900px;
        border-radius: 8px;
        position: relative;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .ff_modal-close {
        color: #aaa;
        float: right;
        font-size: 32px;
        font-weight: bold;
        cursor: pointer;
    }

    .ff_modal-close:hover,
    .ff_modal-close:focus {
        color: #000;
        text-decoration: none;
        cursor: pointer;
    }

    .ff_modal-body {
        margin-top: 20px;
    }

    .ff_modal-body canvas {
        max-height: 50vh;
        width: 100% !important;
        height: auto !important;
    }

    .ff_modal-body .detailed-data-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    .ff_modal-body .detailed-data-table th,
    .ff_modal-body .detailed-data-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    .ff_modal-body .detailed-data-table th {
        background-color: #f2f2f2;
    }

    @media screen and (max-width: 768px) {
        .ff_modal-content {
            margin: 10% auto;
            width: 95%;
        }
    }

    /* Downline Tree Styles (from previous response, with !important removed where possible) */
    /* Style for the outer clickable span (cursor only) */
    .affwp-downline-tree span.toggle-level.clickable {
        cursor: pointer;
    }

    /* Style for the inner span containing name and count (default/closed state) */
    .affwp-downline-tree span.toggle-level.clickable .downline-name-count {
        color: #007CFF;
        /* Blue when closed */
        text-decoration: underline;
    }

    /* Style for the inner span when the parent outer span has 'is-open' class (open state) */
    .affwp-downline-tree span.toggle-level.clickable.is-open .downline-name-count {
        color: #0A1286;
        /* Darker blue when open */
        text-decoration: underline;
        /* Ensure underline remains */
    }

    /* Optional: Hover style for the inner span */
    .affwp-downline-tree span.toggle-level.clickable:hover .downline-name-count {
        text-decoration: underline;
    }

    /* General list styling */
    .affwp-downline-tree ul {
        list-style: none;
        padding-left: 20px;
        margin-top: 5px;
    }

    .affwp-downline-tree li {
        margin-bottom: 5px;
        position: relative;
    }
/*
 * Responsive Styles for CAS Shortcode Tables
 * -------------------------------------------------- */

@media screen and (max-width: 767px) {

    /* UPDATED: Added .aff-cas-dashboard .aff-cas-table to the selector list */
    .my-cas-leads-dashboard .aff-cas-table,
    .my-cas-clients-dashboard .aff-cas-table,
    .aff-cas-dashboard .aff-cas-table {
        border: 0;
    }

    /* UPDATED: Added .aff-cas-dashboard .aff-cas-table to the selector list */
    .my-cas-leads-dashboard .aff-cas-table thead,
    .my-cas-clients-dashboard .aff-cas-table thead,
    .aff-cas-dashboard .aff-cas-table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    /* UPDATED: Added .aff-cas-dashboard .aff-cas-table to the selector list */
    .my-cas-leads-dashboard .aff-cas-table tr,
    .my-cas-clients-dashboard .aff-cas-table tr,
    .aff-cas-dashboard .aff-cas-table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }

    /* UPDATED: Added .aff-cas-dashboard .aff-cas-table to the selector list */
    .my-cas-leads-dashboard .aff-cas-table td,
    .my-cas-clients-dashboard .aff-cas-table td,
    .aff-cas-dashboard .aff-cas-table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
    }

    /* UPDATED: Added .aff-cas-dashboard .aff-cas-table to the selector list */
    .my-cas-leads-dashboard .aff-cas-table td::before,
    .my-cas-clients-dashboard .aff-cas-table td::before,
    .aff-cas-dashboard .aff-cas-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }

    /* UPDATED: Added .aff-cas-dashboard .aff-cas-table to the selector list */
    .my-cas-leads-dashboard .aff-cas-table td:last-child,
    .my-cas-clients-dashboard .aff-cas-table td:last-child,
    .aff-cas-dashboard .aff-cas-table td:last-child {
        border-bottom: 0;
    }
}
/*
 * Fine-tuning for CAS Dashboard Table
 * -------------------------------------------------- */

/* Target the capacity columns for specific adjustments */
.aff-cas-dashboard .aff-cas-table .cas-capacity-cell {
    /* Force the text alignment to center */
    text-align: center !important;

    /* Reduce the vertical padding to make the rows smaller */
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Ensure the column headers are also centered */
.aff-cas-dashboard .aff-cas-table th:nth-child(2),
.aff-cas-dashboard .aff-cas-table th:nth-child(3) {
    text-align: center !important;
}

/* On mobile, revert text-align for the capacity cells to match the other stacked cells */
@media screen and (max-width: 767px) {
    .aff-cas-dashboard .aff-cas-table td.cas-capacity-cell {
        text-align: right !important;
    }
}
.aff-cas-dashboard .aff-cas-table .cas-clients-col {
    width: 20%;
    /* Adjust this percentage as needed */
}
/*
 * Center the "View" button in the Clients Acquired column
 * -------------------------------------------------- */

.aff-cas-dashboard .aff-cas-table .cas-clients-col {
    text-align: center;
}

/* On mobile, revert to the default right-alignment for the card layout */
@media screen and (max-width: 767px) {
    .aff-cas-dashboard .aff-cas-table td.cas-clients-col {
        text-align: right;
    }
}
/*
 * Styles for CAS Summary Shortcode
 * -------------------------------------------------- */

.aff-cas-summary {
    /* Basic Styling */
    border: 1px solid #e0e0e0;
    padding: 15px 20px;
    margin-bottom: 25px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);

    /* Centering Styles */
    max-width: 550px;
    /* Adjust as needed */
    margin-left: auto;
    margin-right: auto;
}

.aff-cas-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.aff-cas-summary ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.aff-cas-summary ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.aff-cas-summary ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.aff-cas-summary ul li strong {
    font-weight: 600;
}
/*
 * Styles for sortable table headers
 * -------------------------------------------------- */

.aff-cas-table .cas-sortable-column a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.aff-cas-table .cas-sortable-column a .dashicons {
    font-size: 16px;
    height: 16px;
    width: 16px;
    line-height: inherit;
    margin-left: 5px;
}
/*
 * Styles for the My Acquired Clients Shortcode Table
 * -------------------------------------------------- */

.my-cas-clients-dashboard .aff-cas-table th,
.my-cas-clients-dashboard .aff-cas-table td {
    text-align: center;
    vertical-align: middle;
}

/* On mobile, override centering for the card layout to look good */
@media screen and (max-width: 767px) {
    .my-cas-clients-dashboard .aff-cas-table td {
        text-align: right;
    }
}
/* General modal styles */
.cas-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1050;
    /* Sit on top, higher than standard admin elements */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6);
    /* Black w/ opacity */
}

.cas-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    /* 10% from the top and centered horizontally */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /* Could be more or less, depending on screen size */
    max-width: 600px;
    /* Max width for larger screens */
    border-radius: 5px;
    /* Slightly rounded corners */
    position: relative;
    /* Needed for absolute positioning of close button */
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.cas-modal-close {
    color: #aaa;
    /* float: right; This is okay, but position absolute is more robust */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    /* Use absolute positioning relative to .cas-modal-content for precise placement */
    position: absolute;
    right: 15px;
    top: 5px;
}

.cas-modal-close:hover,
.cas-modal-close:focus {
    color: black;
    text-decoration: none;
}

/* Add this if your modal body content can get very long and needs its own scroll */
.cas-modal-content .modal-body-scrollable {
    max-height: 70vh;
    /* Adjust as needed */
    overflow-y: auto;
    padding-right: 15px;
    /* To prevent scrollbar from overlapping content */
}

