/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* ========================================
   CRM PAGE ISOLATION - HIDE THEME ELEMENTS
   ======================================== 
   This section hides unwanted theme elements (cart widgets, 
   accessibility menus, floating buttons, WooCommerce elements, etc.)
   that are injected by wp_head() and wp_footer() on CRM pages.
   ======================================== */

/* Target all container-fluid elements that have CRM-specific classes */
.container-fluid[class*="container-crm"],
.container-fluid[class*="container-task"],
.container-fluid[class*="container-sales"],
.container-fluid[class*="container-expense"],
.container-fluid[class*="container-profit"],
.container-fluid[class*="container-marketing"],
.container-fluid[class*="container-warehouse"],
.container-fluid[class*="container-inventory"],
.container-fluid[class*="container-procurement"],
.container-fluid[class*="container-analytics"],
.container-fluid[class*="container-orders"],
.container-fluid[class*="container-customer"],
.container-fluid[class*="container-zigzag"],
.container-fluid[class*="container-split"],
.container-fluid[class*="container-assign"],
.container-fluid[class*="container-translate"],
.container-fluid[class*="container-factory"],
.container-fluid[class*="container-shipping"],
.container-fluid[class*="container-wati"],
.container-fluid[class*="container-b2b"] {
    /* Ensure CRM containers are properly isolated */
    position: relative;
    z-index: 1;
}

/* Hide ALL common theme floating elements on CRM pages */
body:has(.container-fluid[class*="container-crm"]),
body:has(.container-fluid[class*="container-task"]),
body:has(.container-fluid[class*="container-sales"]),
body:has(.container-fluid[class*="container-expense"]),
body:has(.container-fluid[class*="container-profit"]),
body:has(.container-fluid[class*="container-marketing"]),
body:has(.container-fluid[class*="container-warehouse"]),
body:has(.container-fluid[class*="container-inventory"]),
body:has(.container-fluid[class*="container-procurement"]),
body:has(.container-fluid[class*="container-analytics"]),
body:has(.container-fluid[class*="container-orders"]),
body:has(.container-fluid[class*="container-customer"]),
body:has(.container-fluid[class*="container-zigzag"]),
body:has(.container-fluid[class*="container-split"]),
body:has(.container-fluid[class*="container-assign"]),
body:has(.container-fluid[class*="container-translate"]),
body:has(.container-fluid[class*="container-factory"]),
body:has(.container-fluid[class*="container-shipping"]),
body:has(.container-fluid[class*="container-wati"]),
body:has(.container-fluid[class*="container-b2b"]) {
    /* Hide site header/navigation */
    & > header,
    & > .site-header,
    & > #masthead,
    & > .main-header,
    & > nav.navbar:not(.acom-navbar),
    & > .navigation-wrapper {
        display: none !important;
    }
    
    /* Hide site footer */
    & > footer:not(.acom-footer),
    & > .site-footer,
    & > #colophon,
    & > .main-footer {
        display: none !important;
    }
}

/* =====================================================
   AGGRESSIVE FOOTER HIDING ON ALL CRM PAGES
   Hides any theme/plugin footer that might sneak through wp_footer()
   ===================================================== */
html body.acom-crm-page footer:not(.modal-footer):not(.acom-modal-footer):not(.b2b-modal__footer):not(.sha-modal__footer):not(.sp-modal-footer):not([class*="modal"]),
html body.acom-crm-page .site-footer,
html body.acom-crm-page .footer-widgets,
html body.acom-crm-page .footer-bottom,
html body.acom-crm-page .footer-main,
html body.acom-crm-page .wd-footer,
html body.acom-crm-page .woodmart-footer,
html body.acom-crm-page .elementor-location-footer,
html body.acom-crm-page #footer,
html body.acom-crm-page #site-footer,
html body.acom-crm-page #colophon,
html body.acom-crm-page .whb-footer,
html body.acom-crm-page .website-footer,
html body.acom-crm-page [class*="footer-wrapper"],
html body.acom-crm-page [class*="footer-container"],
html body.acom-crm-page [id*="footer"]:not([id*="modal"]):not(.modal-footer) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Common floating elements to hide - using multiple selectors for broad coverage */
body:has(.container-fluid[class*="container-"]):not(:has(.container-fluid.container-product)):not(:has(.container-fluid.container-shop)) {
    /* Accessibility widgets */
    & .pojo-a11y-toolbar-toggle,
    & .pojo-a11y-toolbar,
    & #pojo-a11y-toolbar,
    & .accessibility-toolbar,
    & [class*="accessibility"],
    & [id*="accessibility"] {
        display: none !important;
    }
    
    /* Cart widgets and WooCommerce floating elements */
    & .xoo-wsc-container,
    & .xoo-wsc-modal,
    & .xoo-wsc-basket,
    & .xoo-wsc-items-count,
    & .xoo-wsc-cart,
    & [class*="xoo-wsc"],
    & .mini-cart-wrapper,
    & .cart-flyout,
    & .floating-cart,
    & .wc-cart-widget,
    & .widget_shopping_cart,
    & .cart-sidebar,
    & .cart-drawer,
    & .woocommerce-mini-cart,
    & .cart-widget-side-drawer,
    & .woofc-wrapper,
    & .woofc-area,
    & .woofc-inner,
    & [class*="woofc-"] {
        display: none !important;
    }
    
    /* Free shipping bars */
    & .free-shipping-bar,
    & .shipping-progress-bar,
    & [class*="free-shipping"],
    & [class*="shipping-bar"],
    & .woocommerce-shipping-totals,
    & .wc-free-shipping-notice {
        display: none !important;
    }
    
    /* Cookie notices and consent banners */
    & .cookie-notice,
    & .cookie-consent,
    & .gdpr-notice,
    & .consent-banner,
    & [class*="cookie"],
    & [id*="cookie"] {
        display: none !important;
    }
    
    /* Chat widgets and support buttons */
    & .crisp-client,
    & .intercom-lightweight-app,
    & .intercom-container,
    & .fb-customerchat,
    & .tawk-widget,
    & [class*="chat-widget"],
    & [class*="live-chat"],
    & .chat-button,
    & .support-button {
        display: none !important;
    }
    
    /* Newsletter popups and modals */
    & .newsletter-popup,
    & .subscribe-popup,
    & .mailchimp-popup,
    & [class*="newsletter"],
    & [class*="popup-modal"] {
        display: none !important;
    }
    
    /* Social sharing buttons */
    & .social-share-floating,
    & .floating-social,
    & [class*="social-share"] {
        display: none !important;
    }
    
    /* Back to top buttons */
    & .back-to-top,
    & .scroll-to-top,
    & #scrollTop,
    & [class*="back-to-top"],
    & [class*="scroll-top"] {
        display: none !important;
    }
    
    /* WooCommerce notices */
    & .woocommerce-store-notice,
    & .demo-store,
    & .store-notice,
    & .woocommerce-message,
    & .woocommerce-error,
    & .woocommerce-info:not(.acom-woocommerce-info) {
        display: none !important;
    }
    
    /* Theme-specific floating elements */
    & .woodmart-sticky-btn,
    & .wd-sticky,
    & .flatsome-sticky,
    & .porto-sticky,
    & .astra-sticky,
    & [class*="sticky-header"],
    & [class*="sticky-nav"],
    & [class*="fixed-header"]:not(.acom-fixed-header) {
        display: none !important;
    }
    
    /* Mobile menu toggles from themes */
    & .mobile-menu-toggle:not(.acom-menu-toggle),
    & .hamburger-menu:not(.acom-hamburger),
    & .menu-toggle-btn:not(.acom-toggle) {
        display: none !important;
    }
    
    /* Elementor specific widgets */
    & .elementor-widget-woocommerce-cart,
    & .elementor-widget-woocommerce-menu-cart {
        display: none !important;
    }
    
    /* Generic floating/fixed elements that aren't ours */
    & [style*="position: fixed"]:not(.acom-fixed):not(.acom-modal):not(.acom-loader):not([class*="acom-"]):not([class*="taskboard"]):not([class*="swal"]):not(.modal):not([class*="bootstrap"]):not([class*="bs-"]),
    & [style*="position:fixed"]:not(.acom-fixed):not(.acom-modal):not(.acom-loader):not([class*="acom-"]):not([class*="taskboard"]):not([class*="swal"]):not(.modal):not([class*="bootstrap"]):not([class*="bs-"]) {
        /* Be careful with this - only hide clearly floating elements */
    }
}

/* Additional aggressive hiding for known problematic elements */
html:has(body .container-fluid[class*="container-crm"]),
html:has(body .container-fluid[class*="container-task"]),
html:has(body .container-fluid[class*="container-sales"]),
html:has(body .container-fluid[class*="container-expense"]),
html:has(body .container-fluid[class*="container-profit"]) {
    /* WooCommerce side cart (common plugin) */
    & .xoo-wsc-container,
    & #xoo-wsc-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Accessibility toolbars */
    & #pojo-a11y-toolbar,
    & .pojo-a11y-toolbar-toggle {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Fallback: Hide by common ID patterns */
#xoo-wsc-container,
#woofc-container,
#pojo-a11y-toolbar,
#accessibility-toolbar,
#cookie-notice,
#cookie-law-info-bar {
    body:has(.container-fluid[class*="container-crm"]) &,
    body:has(.container-fluid[class*="container-task"]) &,
    body:has(.container-fluid[class*="container-sales"]) &,
    body:has(.container-fluid[class*="container-expense"]) &,
    body:has(.container-fluid[class*="container-profit"]) & {
        display: none !important;
    }
}

/* ========================================
   CRM PAGE ISOLATION - HIDE THEME ELEMENTS
   ======================================== 
   Hide ALL unwanted theme elements on CRM pages.
   Uses body.acom-crm-page class added in header.php
   ======================================== */

/* Ensure body has proper styling on CRM pages */
body.acom-crm-page {
    overflow-x: hidden;
}

/* Hide site header and footer from theme */
body.acom-crm-page > header:not(.navbar),
body.acom-crm-page > .site-header,
body.acom-crm-page > #masthead,
body.acom-crm-page > .main-header,
body.acom-crm-page > footer:not(.acom-footer),
body.acom-crm-page > .site-footer,
body.acom-crm-page > #colophon,
body.acom-crm-page > .main-footer,
body.acom-crm-page .site-footer,
body.acom-crm-page .footer-widgets,
body.acom-crm-page .footer-bottom,
body.acom-crm-page #footer,
body.acom-crm-page .wd-footer,
body.acom-crm-page .woodmart-footer,
body.acom-crm-page .elementor-location-footer,
body.acom-crm-page footer.footer {
    display: none !important;
    visibility: hidden !important;
}

/* Hide accessibility widgets */
body.acom-crm-page .pojo-a11y-toolbar-toggle,
body.acom-crm-page .pojo-a11y-toolbar,
body.acom-crm-page #pojo-a11y-toolbar,
body.acom-crm-page .accessibility-toolbar,
body.acom-crm-page [id*="accessibility"],
body.acom-crm-page .a11y-toolbar {
    display: none !important;
    visibility: hidden !important;
}

/* Hide cart widgets and WooCommerce floating elements */
body.acom-crm-page .xoo-wsc-container,
body.acom-crm-page .xoo-wsc-modal,
body.acom-crm-page .xoo-wsc-basket,
body.acom-crm-page .xoo-wsc-items-count,
body.acom-crm-page .xoo-wsc-cart,
body.acom-crm-page #xoo-wsc-container,
body.acom-crm-page .mini-cart-wrapper,
body.acom-crm-page .cart-flyout,
body.acom-crm-page .floating-cart,
body.acom-crm-page .wc-cart-widget,
body.acom-crm-page .widget_shopping_cart,
body.acom-crm-page .cart-sidebar,
body.acom-crm-page .cart-drawer,
body.acom-crm-page .woocommerce-mini-cart,
body.acom-crm-page .cart-widget-side-drawer,
body.acom-crm-page .woofc-wrapper,
body.acom-crm-page .woofc-area,
body.acom-crm-page .woofc-inner,
body.acom-crm-page #woofc-container,
body.acom-crm-page .wd-cart,
body.acom-crm-page .wd-cart-widget,
body.acom-crm-page .woodmart-cart-design,
body.acom-crm-page .cart-widget-opener {
    display: none !important;
    visibility: hidden !important;
}

/* Hide free shipping bars */
body.acom-crm-page .free-shipping-bar,
body.acom-crm-page .shipping-progress-bar,
body.acom-crm-page .woocommerce-shipping-totals,
body.acom-crm-page .wc-free-shipping-notice,
body.acom-crm-page .wd-free-shipping,
body.acom-crm-page .woodmart-free-shipping {
    display: none !important;
}

/* Hide cookie notices */
body.acom-crm-page .cookie-notice,
body.acom-crm-page .cookie-consent,
body.acom-crm-page .gdpr-notice,
body.acom-crm-page .consent-banner,
body.acom-crm-page #cookie-notice,
body.acom-crm-page #cookie-law-info-bar {
    display: none !important;
}

/* Hide chat widgets */
body.acom-crm-page .crisp-client,
body.acom-crm-page .intercom-lightweight-app,
body.acom-crm-page .intercom-container,
body.acom-crm-page .fb-customerchat,
body.acom-crm-page .tawk-widget {
    display: none !important;
}

/* Hide newsletter popups */
body.acom-crm-page .newsletter-popup,
body.acom-crm-page .subscribe-popup,
body.acom-crm-page .mailchimp-popup {
    display: none !important;
}

/* Hide social sharing */
body.acom-crm-page .social-share-floating,
body.acom-crm-page .floating-social {
    display: none !important;
}

/* Hide back to top */
body.acom-crm-page .back-to-top,
body.acom-crm-page .scroll-to-top,
body.acom-crm-page #scrollTop,
body.acom-crm-page .scrollToTop {
    display: none !important;
}

/* Hide WooCommerce notices */
body.acom-crm-page .woocommerce-store-notice,
body.acom-crm-page .demo-store,
body.acom-crm-page .store-notice {
    display: none !important;
}

/* Hide theme sticky elements */
body.acom-crm-page .woodmart-sticky-btn,
body.acom-crm-page .wd-sticky,
body.acom-crm-page .flatsome-sticky,
body.acom-crm-page .porto-sticky,
body.acom-crm-page .astra-sticky {
    display: none !important;
}

/* Hide Elementor widgets */
body.acom-crm-page .elementor-widget-woocommerce-cart,
body.acom-crm-page .elementor-widget-woocommerce-menu-cart {
    display: none !important;
}

/* Hide WooCommerce related products / upsells that might appear */
body.acom-crm-page .related.products,
body.acom-crm-page .upsells.products,
body.acom-crm-page .cross-sells,
body.acom-crm-page .products.columns-4,
body.acom-crm-page section.products,
body.acom-crm-page .woocommerce-products-header {
    display: none !important;
}

/* Query Monitor - keep visible for debugging (commented out)
body.acom-crm-page #query-monitor-main,
body.acom-crm-page #qm,
body.acom-crm-page .qm-resizer,
body.acom-crm-page #qm-fatal {
    display: none !important;
}
*/

/* Hide Woodmart specific elements */
body.acom-crm-page .wd-header,
body.acom-crm-page .woodmart-header,
body.acom-crm-page .wd-sticky-holder,
body.acom-crm-page .whb-header,
body.acom-crm-page .whb-main-header,
body.acom-crm-page .whb-clone,
body.acom-crm-page .wd-prefooter,
body.acom-crm-page .copyrights-wrapper,
body.acom-crm-page .wd-recently-viewed,
body.acom-crm-page .recently-viewed-products {
    display: none !important;
}

/* Direct ID selectors for highest specificity */
body.acom-crm-page #xoo-wsc-container,
body.acom-crm-page #woofc-container,
body.acom-crm-page #pojo-a11y-toolbar,
body.acom-crm-page #accessibility-toolbar,
body.acom-crm-page #cookie-notice,
body.acom-crm-page #cookie-law-info-bar,
body.acom-crm-page .pojo-a11y-toolbar-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ========================================
   END CRM PAGE ISOLATION
   ======================================== */

 :root {
    --yellow: #F8BC32;
    --black: #374149;
    --floral: #B47EE5;
}

/* Order Number Link Styling */
.order-number-link {
    text-decoration: none;
    color: var(--black);
    transition: color 0.2s ease;
}
.order-number-link:hover {
    color: var(--yellow);
}
.order-number-link .order-number {
    font-weight: 600;
}

.acom-primary{
    background-color: var(--yellow) !important;
    color: #fff !important;
}
.acom-green{
    background-color: #10b981 !important;
    color: #fff !important;
}
.acom-floral{
    background-color: var(--floral) !important;
    color: #fff !important;
}
.acom-black{
    background-color: var(--black) !important;
    color: #fff !important;
}
.btn-acom-primary{
    background-color: var(--yellow) !important;
    color: #fff !important;
}
.pagination .page-item a,
.pagination .page-item a:hover{
    color: var(--yellow) !important;
}

.pagination .active a{
    background-color: var(--yellow) !important;
    color: #fff !important;
}

.nav .nav-link {
    color: #6D6C6C;
}

/* Sidebar Menu Styles */
#sidebarMenu .nav-link {
    color: #6D6C6C;
    transition: all 0.2s ease;
}

#sidebarMenu .nav-link:hover,
#sidebarMenu .nav-link:hover .menu-icon,
#sidebarMenu .nav-link:hover span,
#sidebarMenu .nav .nav-link:hover {
    color: #F8BC32 !important;
}

/* Active Menu Item - Yellow theme for text and icon */
#sidebarMenu .nav-link.active {
    color: #F8BC32 !important;
    font-weight: 600;
}

/* Sidebar Menu Icons - All gray by default, colored on hover/active */
#sidebarMenu .nav-link .menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #6D6C6C;
    transition: color 0.2s ease;
}

#sidebarMenu .nav-link:hover .menu-icon,
#sidebarMenu .nav-link:focus .menu-icon,
#sidebarMenu .nav-link.active .menu-icon {
    color: #F8BC32;
}

/* Dashboard Cards - Equal Sizing */
.row-cols-md-4 {
    display: flex;
    flex-wrap: wrap;
}

.row-cols-md-4 > .col {
    display: flex;
}

.card-stat {
    width: 100%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.card-stat .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 15px;
}

.card-stat .card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.card-stat .card-body .badge {
    font-size: 26px;
    margin-top: auto;
}

.card-stat .card-body a {
    text-decoration: none;
}

.statistic-card-image {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
}

.pp-shipment-tracking-status{
    display: block;
}
.acom-top-header-dashboard{
    padding:20px 0;
    border-bottom: 1px solid gray;
}
#acom-search-filter{
    margin-top: 20px;
    margin-bottom: 20px;
}
.acom-main-inside-container{
    padding:20px;
}
.container-select-agent{
    margin: 20px 0;
}
.filter-card-by-agent{
    background: var(--yellow);
    border-color: var(--yellow);
    border: none;
    color: white;
}
.ym-logo img{
    width:50%;
    display:block;
}

.send-to-make-btn {
    background-color: #ffffff;
    color: #F7BC30;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Rubik', sans-serif;
}

.send-to-make-btn:hover {
    background-color: #ffffff;
    color: #F7BC20;
    transform: translateY(-2px);
}

.make-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    color: #2d2d2d;
    padding: 30px;
    border-radius: 20px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    font-family: 'Rubik', sans-serif;
    text-align: center;
    max-height: 80vh; /* Adjust this as needed */
    overflow: auto; /* Enable scrolling */
}

.make-popup h2 {
    margin-top: 0;
    font-size: 22px;
    color: #2d2d2d;
    font-weight: 500;
}

.make-popup .close-popup,
.make-popup .retry-orders {
     background-color: #ffffff;
    color: #F7BC30;
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 20px;
    margin-right: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: 'Rubik', sans-serif;
}

.make-popup .close-popup:hover,
.make-popup .retry-orders:hover {
background-color: #ffffff;
    color: #F7BC20;
    transform: translateY(-2px);            }

.make-popup .order-status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 16px;
    text-align: left;
}

.make-popup .order-status.success {
    background-color: #ffffff;
    color: #4CAF50;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.make-popup .order-status.failed {
    background-color: #ffffff;
    color: #FF0000;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.make-popup .order-status.pending {
      background-color: #ffffff;
    color: #A9A7A6;
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.make-popup .manual-notice {
    background-color: #FF0000;
    color: #ffffff;
    font-size: 16px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
}

.order-progress {
    margin: 10px 0;
    margin-top: 60px;

    text-align: center;
    padding: 10px;
    border-radius: 10px;
    border: 0.5px solid #ddd;
    background-color: #f9f9f9;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.order-progress .order-info {
    font-weight: 400;
font-size: 1.3rem;
text-align: center;
    margin-bottom: 5px;
}

.order-progress .progress-loader {
    width: 100%;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.order-progress .progress-bar {
    height: 100%;
    width: 0;
    background-color: #FF0000; /* Initial color is red */
    transition: width 2s ease, background-color 2s ease; /* Slowed down */
}

.logo-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.logo-pulse {
    animation: pulse 1.5s infinite;
    max-width: 200px;
}

/* ========================================
   Desktop Layout - Sidebar & Main Content
   ======================================== */

/* Base container setup */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.container-fluid > .row {
    margin-left: 0;
    margin-right: 0;
    min-height: calc(100vh - 56px);
}

/* Hide mobile menu that's rendered OUTSIDE the sidebar on desktop */
/* The mobile menu is rendered after header, not inside .sidebar container */
@media (min-width: 768px) {
    /* Hide the offcanvas menu that's a direct sibling of header (outside container) */
    body > .offcanvas-md,
    body > #sidebarMenu,
    header + .offcanvas-md,
    header + #sidebarMenu,
    header ~ .offcanvas-md:not(.sidebar .offcanvas-md),
    body > div.offcanvas-md:not(.container-fluid .offcanvas-md) {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

/* Desktop Sidebar - md+ screens */
@media (min-width: 768px) {
    /* Main row flex container */
    .container-fluid > .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
    }
    
    /* Sidebar column - override Bootstrap col classes */
    .sidebar,
    .sidebar.col-md-3,
    .sidebar.col-lg-2 {
        display: block !important;
        position: relative !important;
        flex: 0 0 200px !important;
        width: 200px !important;
        max-width: 200px !important;
        min-width: 200px !important;
        padding: 0 !important;
        border-right: 1px solid #e5e7eb !important;
        border-left: none !important;
        background: #f9fafb !important;
        min-height: calc(100vh - 56px);
    }
    
    /* Critical: Override Bootstrap's offcanvas-md behavior on desktop */
    .sidebar .offcanvas-md,
    .sidebar .offcanvas-md.offcanvas-start {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100%;
        background: transparent !important;
        border: none !important;
        z-index: auto !important;
        flex-grow: 0 !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
    }
    
    /* Hide offcanvas header on desktop */
    .sidebar .offcanvas-md .offcanvas-header {
        display: none !important;
    }
    
    /* Offcanvas body styling on desktop */
    .sidebar .offcanvas-md .offcanvas-body {
        display: block !important;
        padding: 1rem 0 !important;
        overflow-y: visible !important;
        background: transparent !important;
    }
    
    /* Main content area - override ms-sm-auto margin */
    main.col-md-9,
    main.col-lg-10,
    main.ms-sm-auto {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: calc(100% - 200px) !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 20px 24px !important;
        overflow-x: hidden;
    }
}

/* Large screens - wider sidebar */
@media (min-width: 992px) {
    .sidebar,
    .sidebar.col-md-3,
    .sidebar.col-lg-2 {
        flex: 0 0 220px !important;
        width: 220px !important;
        max-width: 220px !important;
        min-width: 220px !important;
    }
    
    main.col-md-9,
    main.col-lg-10,
    main.ms-sm-auto {
        max-width: calc(100% - 220px) !important;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .sidebar,
    .sidebar.col-md-3,
    .sidebar.col-lg-2 {
        flex: 0 0 240px !important;
        width: 240px !important;
        max-width: 240px !important;
        min-width: 240px !important;
    }
    
    main.col-md-9,
    main.col-lg-10,
    main.ms-sm-auto {
        max-width: calc(100% - 240px) !important;
    }
}

.bulk-action-containers{
    display: none;
    margin-top: 20px;
}

/* Warehouse Page Styles */
.warehouse-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.warehouse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.warehouse-header h1,
.warehouse-header h3 {
    color: #1f2937;
    font-weight: 600;
    margin: 0;
    font-size: 1.2rem;
}

.warehouse-stock-worth {
    background: linear-gradient(135deg, #F8BC32 0%, #f59e0b 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(248, 188, 50, 0.3);
}

.warehouse-stock-worth span {
    font-size: 15px;
    font-weight: 700;
    margin-left: 6px;
}

/* Warehouse Filter */
#acom-warehouse-filter {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}

#acom-warehouse-filter label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    font-size: 12px;
}

#acom-warehouse-filter .form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#acom-warehouse-filter .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

#acom-warehouse-filter select.form-control {
    cursor: pointer;
    appearance: auto;
}

#acom-warehouse-filter .custom-date-field input {
    margin-bottom: 0;
}

/* Warehouse Table */
.warehouse-table-wrapper {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    z-index: 10;
}

.warehouse-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.warehouse-table thead {
    background: #1f2937;
    position: sticky;
    top: 0;
    z-index: 100;
}

.warehouse-table thead th {
    color: #f9fafb;
    font-weight: 500;
    padding: 14px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    background: #1f2937;
}

.warehouse-table tbody tr {
    background: #fff;
    transition: background-color 0.15s ease;
}

.warehouse-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.warehouse-table tbody tr:hover {
    background: #f3f4f6;
}

.warehouse-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 13px;
    color: #374151;
}

.warehouse-table tbody td:first-child {
    font-weight: 600;
    color: #4f46e5;
}

.warehouse-table tbody td a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.warehouse-table tbody td a:hover {
    color: #4338ca;
    text-decoration: underline;
}

.warehouse-table .product-image,
.warehouse-table .crm-images,
.warehouse-table img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    max-width: 56px !important;
    max-height: 56px !important;
}

.warehouse-table .product-image:hover,
.warehouse-table .crm-images:hover,
.warehouse-table img:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.warehouse-table .cogs-info {
    background: #f3f4f6;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
}

.warehouse-table .cogs-info p {
    margin: 4px 0;
    color: #4b5563;
}

.warehouse-table .cogs-info strong {
    color: #374151;
}

.warehouse-table .stock-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.warehouse-table .stock-badge.in-stock {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.warehouse-table .stock-badge.low-stock {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.warehouse-table .stock-badge.out-of-stock {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Supplier Column Styles */
.warehouse-table .wh-col-supplier {
    min-width: 120px;
}

.supplier-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(248, 188, 50, 0.1);
    color: #F8BC32;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(248, 188, 50, 0.3);
    text-decoration: none;
    transition: all 0.2s ease;
}

.supplier-link-badge:hover {
    background: rgba(248, 188, 50, 0.2);
    text-decoration: none;
    color: #d9a529;
}

.supplier-link-badge i {
    font-size: 10px;
}

.supplier-cost-hint {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* Incoming Stock Column Styles */
.warehouse-table .wh-col-incoming {
    min-width: 100px;
}

.incoming-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 2px;
}

.incoming-stock-badge.on_order {
    background: rgba(248, 188, 50, 0.1);
    color: #F8BC32;
    border: 1px solid rgba(248, 188, 50, 0.3);
}

.incoming-stock-badge.in_transit {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.incoming-stock-badge.arrived {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Stock Edit Styling */
.stock-info {
    display: inline-block;
}

.stock-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-edit-btn {
    color: #94a3b8;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.stock-info:hover .stock-edit-btn,
.stock-display:hover .stock-edit-btn {
    opacity: 1;
}

.stock-edit-btn:hover {
    color: #4f46e5;
}

.stock-edit-form .input-group {
    width: fit-content;
}

.stock-edit-form .stock-input {
    width: 70px !important;
    text-align: center;
    font-size: 13px;
    border-color: #d1d5db;
}

.stock-edit-form .stock-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.stock-edit-form .btn {
    padding: 0.25rem 0.5rem;
}

.stock-edit-form .btn-success {
    background: #10b981;
    border-color: #10b981;
}

.stock-edit-form .btn-success:hover {
    background: #059669;
    border-color: #059669;
}

/* Low Stock Warning - Days Out of Stock less than 90 */
.warehouse-table tr.low-stock-warning {
    background-color: #fefce8 !important;
}

.warehouse-table tr.low-stock-warning:hover {
    background-color: #fef9c3 !important;
}

.warehouse-table tr.low-stock-warning td {
    border-color: #fbbf24;
    color: #713f12;
}

/* Out of Stock / Negative Stock - Critical warning */
.warehouse-table tr.out-of-stock-row {
    background-color: #fef2f2 !important;
}

.warehouse-table tr.out-of-stock-row:hover {
    background-color: #fee2e2 !important;
}

.warehouse-table tr.out-of-stock-row td {
    border-color: #f87171;
    color: #7f1d1d;
}

/* Variable Product Toggle Button */
.variation-toggle-btn {
    color: #fff;
    background: #6366f1;
    transition: all 0.15s ease;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.variation-toggle-btn:hover {
    background: #4f46e5;
    transform: scale(1.05);
}

.variation-toggle-btn .toggle-icon {
    transition: transform 0.15s ease;
}

.variation-toggle-btn.expanded {
    background: #1f2937;
}

.variation-toggle-btn.expanded .toggle-icon {
    transform: rotate(90deg);
}

/* Make parent row clickable */
.warehouse-table tr.has-variations {
    cursor: pointer;
}

.warehouse-table tr.has-variations:hover {
    background: #f3f4f6 !important;
}

.warehouse-table tr.has-variations > td:first-child {
    color: #374151;
}

/* Variation Row Styles */
.warehouse-table tr.variation-row {
    background-color: #f8fafc !important;
    border-left: 3px solid #6366f1;
}

.warehouse-table tr.variation-row:hover {
    background-color: #f1f5f9 !important;
}

.warehouse-table tr.variation-row td {
    padding: 12px 12px;
    font-size: 12px;
    color: #64748b;
}

.warehouse-table tr.variation-row.out-of-stock-row {
    background-color: #fef2f2 !important;
    border-left-color: #ef4444;
}

.warehouse-table tr.variation-row.out-of-stock-row:hover {
    background-color: #fee2e2 !important;
}

.warehouse-table tr.variation-row.out-of-stock-row td {
    color: #7f1d1d;
}

.warehouse-table tr.variation-row.low-stock-warning {
    background-color: #fefce8 !important;
    border-left: 3px solid #eab308;
}

.warehouse-table tr.variation-row.low-stock-warning:hover {
    background-color: #fef9c3 !important;
}

.warehouse-table tr.variation-row.low-stock-warning td {
    color: #713f12;
}

.variation-indent {
    display: inline-block;
    width: 20px;
    margin-left: 10px;
    position: relative;
}

.variation-indent::before {
    content: "└";
    color: #cbd5e1;
    font-size: 14px;
    position: absolute;
    left: 0;
    top: -2px;
}

.variation-label {
    font-weight: 500;
    color: #475569;
}

.variation-sku {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 8px;
    color: #64748b;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.variation-image {
    max-width: 40px !important;
    max-height: 40px !important;
    width: 40px !important;
    height: 40px !important;
    margin-top: 5px;
}

/* Variation count badge on product name */
.warehouse-table .badge {
    font-size: 10px;
    padding: 3px 8px;
    vertical-align: middle;
    background: #e0e7ff !important;
    color: #4338ca !important;
    font-weight: 500;
}

/* Summary COGS for variable products (non-editable) */
.warehouse-table .cogs-summary {
    background: #f0f9ff;
    border: 1px dashed #93c5fd;
}

.warehouse-table .cogs-summary small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: #64748b;
}

/* Pagination Styles */
.warehouse-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.warehouse-pagination .pagination {
    gap: 4px;
}

.warehouse-pagination .page-link {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    color: #374151;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s ease;
}

.warehouse-pagination .page-link:hover {
    background: #f3f4f6;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.warehouse-pagination .page-item.active .page-link {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* Empty State */
.warehouse-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.warehouse-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #cbd5e1;
}

/* Product Count Button */
.product-count-btn {
    display: inline-block;
    background: #1f2937;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.product-count-btn:hover {
    background: #111827;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* COGS Edit Functionality */
.cogs-info {
    min-width: 140px;
}

.cogs-info p {
    margin-bottom: 5px;
    font-size: 12px;
}

.cogs-display {
    position: relative;
}

.cogs-edit-btn {
    margin-top: 8px;
    font-size: 12px;
    padding: 4px 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cogs-info:hover .cogs-edit-btn,
.cogs-display:hover .cogs-edit-btn {
    opacity: 1;
}

.cogs-edit-form {
    padding: 5px 0;
}

.cogs-edit-form .input-group {
    max-width: 150px;
}

.cogs-edit-form .form-control {
    font-size: 13px;
}

.cogs-edit-form .btn-group {
    display: flex;
    gap: 5px;
}

.cogs-edit-form .btn {
    font-size: 12px;
    padding: 4px 10px;
}

.cogs-message {
    font-size: 12px;
    padding: 3px 0;
}

/* COGS FIFO Options */
.cogs-fifo-options {
    font-size: 11px;
    background: #f8f9fa;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cogs-fifo-options .form-check-inline {
    margin-right: 12px;
}

.cogs-fifo-options .form-check-label {
    font-size: 11px;
    color: #495057;
    cursor: pointer;
}

.cogs-fifo-options .form-check-input:checked + .form-check-label {
    color: #198754;
    font-weight: 500;
}

.cogs-fifo-qty-wrapper {
    vertical-align: middle;
}

.cogs-fifo-qty-wrapper .cogs-fifo-qty {
    display: inline-block;
    width: 60px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

.cogs-fifo-qty-wrapper .text-muted {
    font-size: 10px;
    margin-left: 3px;
}

/* COGS Update Options */
.cogs-update-options {
    font-size: 11px;
    background: #f8f9fa;
    padding: 6px 8px;
    border-radius: 4px;
}

.cogs-update-options .form-check {
    margin-bottom: 0;
}

.cogs-update-options .form-check-label {
    font-size: 11px;
    color: #495057;
}

.cogs-retro-days {
    padding: 4px 0;
}

.cogs-retro-days .input-group {
    max-width: 160px;
}

.cogs-retro-days .input-group-text {
    font-size: 11px;
    padding: 2px 6px;
}

.cogs-retro-days .form-control {
    font-size: 12px;
    padding: 2px 6px;
}

.cogs-actions {
    margin-top: 6px;
}

.cogs-history-btn {
    padding: 3px 6px;
    font-size: 11px;
}

/* COGS History Modal */
#cogsHistoryModal .table {
    font-size: 13px;
}

#cogsHistoryModal .card-header {
    padding: 10px 15px;
    font-size: 14px;
}

#cogsHistoryModal .apply-po-cost-btn {
    font-size: 11px;
    padding: 2px 8px;
}

/* ========================================
   Filter Search UI Improvements
   ======================================== */

#acom-search-filter {
    padding: 8px 0;
}

/* Compact Top Header */
.acom-top-header-dashboard.compact {
    padding: 10px 0 5px 0;
}

.acom-top-header-dashboard.compact h2 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

/* Filter Card */
.filter-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 6px;
    overflow: visible;
}

.filter-card.compact-filters .filter-card-header {
    border-radius: 10px;
}

.filter-card.compact-filters .filter-card-header[aria-expanded="true"] {
    border-radius: 10px 10px 0 0;
}

.filter-card-header {
    background: linear-gradient(135deg, #374149 0%, #4a5568 100%);
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-radius 0.2s;
}

.filter-toggle-icon {
    color: #fff;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.filter-card-header[aria-expanded="true"] .filter-toggle-icon,
.filter-toggle-icon.rotated {
    transform: rotate(180deg);
}

.filter-card-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-card-title i {
    font-size: 14px;
}

.filter-card-body {
    padding: 12px 16px;
}

/* Filter Labels */
.filter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #374149;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Select Styling */
#acom-search-filter .form-select-sm {
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    padding: 6px 10px;
    font-size: 12px;
    transition: all 0.2s ease;
    background-color: #fff;
}

#acom-search-filter .form-select-sm:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.15);
}

#acom-search-filter .form-select-sm:hover {
    border-color: #cbd5e0;
}

/* Date Range Inputs */
#acom-search-filter .input-group-sm .form-control {
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    padding: 6px 10px;
    font-size: 12px;
    transition: all 0.2s ease;
}

#acom-search-filter .input-group-sm .form-control:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

#acom-search-filter .input-group-sm .form-control:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#acom-search-filter .input-group-sm .form-control:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.15);
    z-index: 2;
}

/* Stock Attributes Section */
.stock-attributes-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Stock Attributes Inline Dropdown */
.stock-attributes-inline {
    position: relative;
}

.stock-dropdown {
    width: 100%;
}

.stock-dropdown .dropdown-toggle {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #5a6878;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    height: 38px;
    padding: 0 14px;
    color: #fff;
    width: 100%;
    font-weight: 500;
}

.stock-dropdown .dropdown-toggle:hover,
.stock-dropdown .dropdown-toggle:focus {
    background: #4a5868;
    box-shadow: 0 0 0 3px rgba(90, 104, 120, 0.2);
}

.stock-dropdown .dropdown-toggle::after {
    margin-left: auto;
    border-top-color: #fff;
}

.stock-dropdown.show .dropdown-toggle {
    border-radius: 8px 8px 0 0;
}

.stock-dropdown-menu {
    min-width: 100%;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--yellow);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 0 !important;
    z-index: 1050;
    position: absolute !important;
    background: #fff;
}

.stock-dropdown-menu .form-check {
    padding: 8px 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-dropdown-menu .form-check:hover {
    background: #fff7e6;
}

.stock-dropdown-menu .form-check:first-child {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 4px;
}

.stock-dropdown-menu .form-check-input {
    margin: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    flex-shrink: 0;
}

.stock-dropdown-menu .form-check-input:checked {
    background-color: var(--yellow);
    border-color: var(--yellow);
}

.stock-dropdown-menu .form-check-label {
    font-size: 13px;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.stock-selected-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Date Range Picker */
.date-range-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input-wrapper {
    position: relative;
    flex: 1;
}

.date-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.date-input-wrapper .date-input {
    padding-left: 36px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    height: 38px;
    background: #fff;
    transition: all 0.2s ease;
}

.date-input-wrapper .date-input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.15);
    outline: none;
}

.date-input-wrapper .date-input::placeholder {
    color: #94a3b8;
}

.date-separator {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

/* jQuery UI Datepicker Styling */
.ui-datepicker {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 15px;
    font-family: inherit;
    width: 300px;
    z-index: 100 !important;
}

.ui-datepicker-header {
    background: none;
    border: none;
    padding: 10px 5px 15px;
}

.ui-datepicker-title {
    font-weight: 600;
    color: #374149;
}

.ui-datepicker-title select {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    margin: 0 3px;
    background: #fff;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    top: 10px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: var(--yellow);
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
    background-image: none;
    text-indent: 0;
    color: #374149;
    font-weight: bold;
}

.ui-datepicker-prev span::before {
    content: "‹";
    font-size: 18px;
}

.ui-datepicker-next span::before {
    content: "›";
    font-size: 18px;
}

.ui-datepicker th {
    color: #64748b;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    padding: 8px 0;
}

.ui-datepicker td {
    padding: 2px;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
    color: #374149;
    text-align: center;
    background: none;
    border: none;
    transition: all 0.15s ease;
}

.ui-datepicker td a:hover {
    background: #f1f5f9;
}

.ui-datepicker .ui-state-active {
    background: var(--yellow) !important;
    color: #fff !important;
    font-weight: 600;
}

.ui-datepicker .ui-state-highlight {
    background: #e0f2fe;
    color: #0284c7;
}

.stock-toggle-btn {
    color: #374149;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-toggle-btn:hover {
    color: var(--yellow);
    text-decoration: none;
}

.stock-toggle-btn .bi-chevron-down {
    transition: transform 0.2s ease;
}

.stock-toggle-btn[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.stock-attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    margin-top: 6px;
    max-height: 150px;
    overflow-y: auto;
}

.stock-attributes-grid .form-check {
    margin: 0;
    padding: 6px 10px 6px 26px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stock-attributes-grid .form-check:hover {
    border-color: var(--yellow);
    background: #fffbf0;
}

.stock-attributes-grid .form-check-input {
    margin-left: -18px;
}

.stock-attributes-grid .form-check-label {
    font-size: 11px;
    cursor: pointer;
}

/* Filter Actions */
.filter-actions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.filter-actions .btn {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-actions .btn-acom-primary {
    box-shadow: 0 2px 8px rgba(248, 188, 50, 0.3);
}

.filter-actions .btn-acom-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.4);
}

.filter-actions .btn-outline-secondary {
    border: 1.5px solid #cbd5e0;
    color: #64748b;
}

.filter-actions .btn-outline-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Actions Bar */
.actions-bar {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 10px 16px;
    margin-bottom: 6px;
}

.action-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-action-group,
.search-group {
    width: 100%;
}

/* Search Input Group */
.search-group .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.search-group .input-group-text {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-right: none;
    color: #64748b;
    padding: 10px 14px;
}

.search-group .form-control {
    border: 1.5px solid #e2e8f0;
    border-left: none;
    border-right: none;
    padding: 10px 14px;
    font-size: 13px;
}

.search-group .form-control:focus {
    box-shadow: none;
    border-color: #e2e8f0;
}

.search-group .form-control::placeholder {
    color: #94a3b8;
}

.search-group .btn {
    border-radius: 0 8px 8px 0;
    padding: 10px 20px;
    font-weight: 600;
}

/* Bulk Action Containers */
#acom-bulk-actions-container {
    margin-top: 15px;
}

.bulk-action-containers {
    display: none;
    margin-bottom: 10px;
}

.bulk-action-containers.active {
    display: block;
}

/* Bulk Action Wrapper */
.bulk-action-wrapper {
    width: 100%;
}

.bulk-action-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulk-action-select {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.bulk-action-select .form-select-sm {
    border: 1.5px solid #e2e8f0;
    border-right: none;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px 0 0 8px;
    min-width: 180px;
}

.bulk-action-select .form-select-sm:focus {
    border-color: var(--yellow);
    box-shadow: none;
}

.bulk-action-select .btn {
    border-radius: 0 8px 8px 0;
    padding: 10px 20px;
    font-weight: 600;
}

.btn-open-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #374149;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-open-tabs:hover {
    background: #4a5568;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(55, 65, 73, 0.3);
}

.btn-open-tabs i {
    font-size: 14px;
}

/* Make Popup Styles */
.make-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
}

.make-popup.active {
    display: block;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-pulse {
    max-width: 120px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.close-popup {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #374149;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.close-popup:hover {
    background: #4a5568;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .filter-card-body .row > [class*="col-"] {
        margin-bottom: 15px;
    }
    
    .stock-attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .stock-attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-bar .row > [class*="col-"] {
        margin-bottom: 15px;
    }
}

/* ========================================
   Orders List UI Improvements
   ======================================== */

/* Search Order Box */
.acom-search-order {
    margin-bottom: 20px;
}

.acom-search-order input[type="text"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

.acom-search-order input[type="text"]:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px rgba(248, 188, 50, 0.15);
}

.acom-search-order input[type="text"]::placeholder {
    color: #94a3b8;
}

/* Orders List Container */
.orders-list-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header Section */
.orders-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #374149 0%, #4a5568 100%);
    border-bottom: 1px solid #e2e8f0;
}

.orders-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.orders-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.orders-count-badge {
    background: var(--yellow);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Header Open Selected Button */
button.btn-header-open-tabs,
.btn.btn-header-open-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

button.btn-header-open-tabs:hover,
.btn.btn-header-open-tabs:hover {
    background: #f3f4f6 !important;
    color: #1f2937 !important;
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-header-open-tabs i {
    font-size: 13px;
}

/* Status Text (no colors) */
.status-text {
    font-weight: 500;
    color: #374149;
    text-transform: capitalize;
}

.orders-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-per-page-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-label {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.view-select {
    width: auto;
    min-width: 70px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 6px 12px;
}

.view-select option {
    color: #374149;
}

/* Table Wrapper */
.orders-table-wrapper {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.orders-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.orders-table thead th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.orders-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    height: auto;
    max-height: none;
}

.orders-table tbody tr:hover {
    background: #fafbfc;
}

.orders-table tbody tr.parent-order {
    background: linear-gradient(90deg, #fff9e6 0%, #fff 100%);
}

.orders-table tbody tr.parent-order:hover {
    background: linear-gradient(90deg, #fff3cc 0%, #fafbfc 100%);
}

/* Urgent Order Highlighting - Purple */
.orders-table tbody tr.urgent-order {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #7c3aed 100%);
}

.orders-table tbody tr.urgent-order:hover {
    background: linear-gradient(90deg, #6d28d9 0%, #9333ea 50%, #6d28d9 100%);
}

.orders-table tbody tr.urgent-order td {
    color: #fff;
    height: auto;
}

.orders-table tbody tr.urgent-order .order-number,
.orders-table tbody tr.urgent-order .customer-name,
.orders-table tbody tr.urgent-order .agent-name,
.orders-table tbody tr.urgent-order .address-text,
.orders-table tbody tr.urgent-order .date-text,
.orders-table tbody tr.urgent-order .status-text {
    color: #fff;
}

.orders-table tbody tr.urgent-order .year-text {
    color: rgba(255,255,255,0.7);
}

.orders-table tbody tr.urgent-order .sku-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.orders-table tbody tr.urgent-order .btn-manage-order {
    background: #fff;
    color: #581c87;
}

.orders-table tbody tr.urgent-order .btn-manage-order:hover {
    background: #f3e8ff;
}

/* Urgent Tag Cells */
.urgent-tag-cell {
    padding: 0 !important;
    width: 22px;
    min-width: 22px;
    max-width: 22px;
}

.urgent-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: #a855f7;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 3px;
    height: auto;
    min-height: 50px;
}

.orders-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

/* Order ID Cell */
.order-id-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--yellow);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-number {
    font-weight: 700;
    color: #374149;
    font-size: 14px;
}

.parent-badge {
    display: inline-block;
    background: #374149;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Date Cell */
.col-date {
    white-space: nowrap;
}

.date-text {
    display: block;
    font-weight: 600;
    color: #374149;
}

.year-text {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

/* Tracking Cell */
.tracking-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tracking-provider {
    display: inline-block;
    background: #374149;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.tracking-number {
    font-size: 12px;
    color: #0ea5e9;
    font-weight: 500;
}

.tracking-cell a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
}

.tracking-cell a:hover {
    text-decoration: underline;
}

/* Add Tracking Button */
.btn-add-tracking {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #F7BC33 0%, #e5a520 100%);
    color: #1a1a2e;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(247, 188, 51, 0.3);
}

.btn-add-tracking:hover {
    background: linear-gradient(135deg, #e5a520 0%, #d49510 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(247, 188, 51, 0.4);
}

.btn-add-tracking:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(247, 188, 51, 0.3);
}

.btn-add-tracking i {
    font-size: 12px;
}

/* Add Tracking Modal Styles */
#addTrackingModal .modal-header {
    border-bottom: none;
}

#addTrackingModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

#addTrackingModal .form-label {
    color: #374149;
}

#addTrackingModal .form-text {
    font-size: 11px;
    color: #94a3b8;
}

/* SKU Cell */
.sku-cell {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 180px;
}

.sku-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    width: fit-content;
}

/* Image Cell */
.image-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.image-cell img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-cell img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    position: relative;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-badge.status-processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.status-completed,
.status-badge.status-shipped-collected {
    background: #dcfce7;
    color: #15803d;
}

.status-badge.status-delivered {
    background: #10b981;
    color: #ffffff;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.status-on-hold {
    background: #fce7f3;
    color: #be185d;
}

.status-badge.status-cancelled,
.status-badge.status-failed {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.status-refunded {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-badge.status-processing-split {
    background: #e0e7ff;
    color: #4338ca;
}

.status-badge.status-partial-shipped {
    background: #fef9c3;
    color: #a16207;
}

/* Shipment Cell */
.shipment-cell {
    font-size: 12px;
}

.shipment-cell .pp-tracking-icon {
    margin-right: 5px;
}

/* Ship To Cell */
.shipto-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 200px;
}

.address-text {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}

.shipping-method-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    max-width: fit-content;
}

/* Customer Name */
.customer-name {
    font-weight: 500;
    color: #374149;
}

/* Agent Name */
.agent-name {
    font-weight: 500;
    color: #64748b;
}

/* Actions Cell */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quick View Button */
.btn-quick-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-quick-view:hover {
    background: #e2e8f0;
    color: #374149;
    transform: translateY(-1px);
}

.btn-quick-view i {
    font-size: 16px;
}

/* ==========================================
   Order Quick View Modal
   ========================================== */
body.acom-modal-open {
    overflow: hidden;
}

.acom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.acom-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.acom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.acom-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.acom-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.acom-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.acom-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.acom-modal-loading {
    text-align: center;
    padding: 60px 20px;
}

.acom-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #F8BC32;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.acom-modal-loading p {
    color: #6b7280;
    margin: 0;
}

.acom-modal-status-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.acom-order-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.acom-order-status.status-processing { background: #dbeafe; color: #1e40af; }
.acom-order-status.status-completed { background: #d1fae5; color: #065f46; }
.acom-order-status.status-on-hold { background: #fef3c7; color: #92400e; }
.acom-order-status.status-pending { background: #e5e7eb; color: #374151; }
.acom-order-status.status-cancelled { background: #fee2e2; color: #991b1b; }
.acom-order-status.status-refunded { background: #ede9fe; color: #5b21b6; }
.acom-order-status.status-failed { background: #fee2e2; color: #991b1b; }
.acom-order-status.status-fac { background: #d1fae5; color: #065f46; }

.acom-order-date {
    color: #6b7280;
    font-size: 14px;
}

.acom-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.acom-modal-section h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

.acom-modal-section p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #374151;
}

.acom-modal-section a {
    color: #F8BC32;
    text-decoration: none;
}

.acom-modal-section a:hover {
    text-decoration: underline;
}

.acom-address {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.acom-modal-row {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.acom-modal-items {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.acom-modal-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
    flex-wrap: wrap;
}

.acom-modal-item:last-child {
    border-bottom: none;
}

.acom-item-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.acom-item-placeholder {
    background: #f3f4f6;
}

.acom-item-details {
    flex: 1;
    min-width: 0;
}

.acom-item-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acom-item-sku {
    display: block;
    font-size: 12px;
    color: #9ca3af;
}

/* Production fields in modal */
.acom-item-production {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.acom-item-production .form-field {
    margin-bottom: 6px;
    font-size: 13px;
}

.acom-item-production .form-field-wide {
    display: block;
    width: 100%;
}

.acom-item-production .form-field label {
    font-weight: 600;
    color: #4b5563;
    margin-right: 8px;
}

.acom-item-production .form-field span {
    color: #1f2937;
}

.acom-item-production .form-field p {
    margin: 4px 0 0 0;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #F8BC32;
    font-size: 13px;
    color: #374151;
}

.acom-item-production .design_print_meta_box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
}

.acom-item-production .design_print_meta_box label {
    color: #0369a1;
}

.acom-item-production .design_print_meta_box p {
    border-left-color: #0284c7;
    background: #fff;
}

.acom-item-production .production_notes_meta_box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
}

.acom-item-production .production_notes_meta_box label {
    color: #92400e;
}

.acom-item-production .production_notes_meta_box p {
    border-left-color: #d97706;
    background: #fff;
}

.acom-item-qty {
    font-size: 14px;
    color: #6b7280;
    padding: 0 12px;
}

.acom-item-total {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

.acom-modal-totals {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.acom-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.acom-total-final {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 12px;
}

.acom-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.acom-modal-footer .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Production Notes in Modal */
.acom-production-notes-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pn-section {
    margin-bottom: 20px;
}

.pn-section h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0 10px;
}

.pn-notes-list {
    margin-bottom: 10px;
}

.pn-note {
    position: relative;
    transition: opacity 0.2s ease;
}

.pn-note p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.pn-delete-note-btn:hover {
    color: #c00 !important;
}

.pn-add-note-form textarea {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
}

.pn-add-note-form textarea:focus {
    border-color: #F7BC33;
    outline: none;
}

.pn-add-note-btn {
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.pn-add-note-btn:hover {
    opacity: 0.9;
}

.pn-add-note-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pn-no-notes {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    text-align: center;
}

/* Manage Order Button */
.btn-manage-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--yellow);
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-manage-order:hover {
    background: #e5a82e;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.4);
}

.btn-manage-order i {
    font-size: 14px;
}

/* Pagination Section */
.orders-pagination {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.orders-pagination .pagination {
    margin: 0;
    justify-content: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .orders-table {
        font-size: 12px;
    }
    
    .orders-table thead th,
    .orders-table tbody td {
        padding: 10px 8px;
    }
    
    .image-cell img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 991px) {
    .orders-list-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .orders-header-right {
        width: 100%;
    }
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */

/* Tablet Breakpoint */
@media (max-width: 991px) {
    /* Filter Card */
    .filter-card-body {
        padding: 15px;
    }
    
    .filter-card-body .row > [class*="col-"] {
        margin-bottom: 12px;
    }
    
    /* Date Range Picker */
    .date-range-picker {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-separator {
        display: none;
    }
    
    .date-input-wrapper {
        width: 100%;
    }
    
    /* Stock Attributes */
    .stock-attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Filter Actions */
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    /* Actions Bar */
    .actions-bar .row > [class*="col-"] {
        margin-bottom: 12px;
    }
    
    /* Bulk Action */
    .bulk-action-row {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .bulk-action-select {
        width: 100%;
    }
    
    .bulk-action-select .form-select-sm {
        flex: 1;
    }
    
    /* Orders Header */
    .orders-header-left {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .btn-header-open-tabs {
        width: 100%;
        justify-content: center;
    }
    
    /* View Per Page Control */
    .view-per-page-control {
        width: 100%;
    }
    
    .view-per-page-control form {
        width: 100%;
        justify-content: space-between;
    }
}

/* Mobile Breakpoint */
@media (max-width: 767px) {
    /* General */
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    #acom-search-filter {
        padding: 10px 0;
    }
    
    /* Filter Card */
    .filter-card {
        border-radius: 10px;
        margin-bottom: 10px;
    }
    
    .filter-card-header {
        padding: 10px 15px;
    }
    
    .filter-card-title {
        font-size: 13px;
    }
    
    .filter-card-body {
        padding: 12px;
    }
    
    .filter-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    #acom-search-filter .form-select-sm,
    #acom-search-filter .form-control {
        padding: 10px 12px;
        font-size: 14px; /* Prevents zoom on iOS */
    }
    
    /* Stock Attributes */
    .stock-attributes-section {
        margin-top: 15px;
        padding-top: 12px;
    }
    
    .stock-toggle-btn {
        font-size: 12px;
    }
    
    .stock-attributes-grid {
        grid-template-columns: 1fr;
        max-height: 150px;
        padding: 10px;
        gap: 8px;
    }
    
    .stock-attributes-grid .form-check {
        padding: 10px 12px 10px 32px;
    }
    
    /* Actions Bar */
    .actions-bar {
        padding: 12px;
        margin-bottom: 10px;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .actions-bar .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .actions-bar .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
    
    .action-label {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    /* Search Group */
    .search-group {
        width: 100%;
    }
    
    .search-group .input-group {
        flex-direction: column;
        border-radius: 8px;
        width: 100%;
    }
    
    .search-group .input-group-text {
        display: none;
    }
    
    .search-group .form-control {
        border-radius: 8px 8px 0 0;
        border: 1.5px solid #e2e8f0;
        width: 100%;
        min-width: 0;
    }
    
    .search-group .btn {
        border-radius: 0 0 8px 8px;
        width: 100%;
    }
    
    /* Orders List Container */
    .orders-list-container {
        border-radius: 10px;
    }
    
    /* Orders Header */
    .orders-list-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
    }
    
    .orders-header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .orders-title {
        font-size: 16px;
    }
    
    .orders-count-badge {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .btn-header-open-tabs {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }
    
    .orders-header-right {
        width: 100%;
    }
    
    .view-per-page-control form {
        width: 100%;
    }
    
    .view-select {
        flex: 1;
    }
    
    /* Orders Table - Hide table, show card view */
    .orders-table-wrapper {
        overflow-x: visible;
    }
    
    .orders-table {
        display: block;
        min-width: unset;
    }
    
    .orders-table thead {
        display: none;
    }
    
    .orders-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .orders-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 12px;
        gap: 8px;
        position: relative;
    }
    
    .orders-table tbody tr.urgent-order {
        border: 2px solid #7c3aed;
        background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%);
    }
    
    .orders-table tbody tr.parent-order {
        background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
        border-color: #fbbf24;
    }
    
    .orders-table tbody td {
        padding: 0;
        border: none;
        background: transparent !important;
    }
    
    /* Hide urgent tag cells on mobile - we'll show indicator differently */
    .orders-table tbody td.urgent-tag-cell {
        display: none;
    }
    
    /* Mobile Card Layout */
    .orders-table tbody td.col-order {
        width: 100%;
        order: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 4px;
    }
    
    .orders-table tbody td.col-order .order-id-cell {
        flex-direction: row;
        align-items: center;
    }
    
    .orders-table tbody td.col-order .order-number {
        font-size: 16px;
        font-weight: 700;
    }
    
    .orders-table tbody td.col-date {
        order: 2;
        position: absolute;
        top: 12px;
        right: 12px;
        text-align: right;
    }
    
    .orders-table tbody td.col-image {
        width: 60px;
        order: 3;
    }
    
    .orders-table tbody td.col-image .image-cell {
        flex-direction: column;
    }
    
    .orders-table tbody td.col-image .image-cell img {
        width: 55px;
        height: 55px;
    }
    
    .orders-table tbody td.col-sku {
        flex: 1;
        order: 4;
        min-width: 0;
    }
    
    .orders-table tbody td.col-sku .sku-cell {
        max-width: 100%;
        justify-content: flex-start;
    }
    
    .orders-table tbody td.col-status {
        order: 5;
        width: auto;
    }
    
    .orders-table tbody td.col-status .status-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .orders-table tbody td.col-tracking {
        width: 50%;
        order: 6;
    }
    
    .orders-table tbody td.col-tracking::before {
        content: 'Tracking: ';
        font-size: 10px;
        color: #6b7280;
        font-weight: 500;
    }
    
    .orders-table tbody td.col-shipment {
        width: 50%;
        order: 7;
    }
    
    .orders-table tbody td.col-shipment::before {
        content: 'Shipment: ';
        font-size: 10px;
        color: #6b7280;
        font-weight: 500;
        display: block;
    }
    
    .orders-table tbody td.col-shipto {
        width: 100%;
        order: 8;
        padding-top: 8px;
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
    }
    
    .orders-table tbody td.col-shipto .shipto-cell {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .orders-table tbody td.col-shipto .address-text {
        font-size: 12px;
        flex: 1;
    }
    
    .orders-table tbody td.col-customer {
        width: 50%;
        order: 9;
    }
    
    .orders-table tbody td.col-customer::before {
        content: 'Customer: ';
        font-size: 10px;
        color: #6b7280;
        font-weight: 500;
    }
    
    .orders-table tbody td.col-agent {
        width: 50%;
        order: 10;
    }
    
    .orders-table tbody td.col-agent::before {
        content: 'Agent: ';
        font-size: 10px;
        color: #6b7280;
        font-weight: 500;
    }
    
    .orders-table tbody td.col-actions {
        width: 100%;
        order: 11;
        padding-top: 10px;
        margin-top: 4px;
    }
    
    .orders-table tbody td.col-actions .btn-manage-order {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 13px;
    }
    
    .orders-table tbody td.col-actions .btn-manage-order i {
        display: inline-block;
    }
    
    /* Urgent indicator for mobile */
    .orders-table tbody tr.urgent-order::before {
        content: '⚡ URGENT';
        position: absolute;
        top: -10px;
        left: 12px;
        background: linear-gradient(135deg, #7c3aed, #a855f7);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 4px;
        letter-spacing: 0.5px;
    }
    
    .orders-table tbody tr.urgent-order {
        margin-top: 8px;
    }
    
    /* Image Cell */
    .image-cell img {
        width: 45px;
        height: 45px;
    }
    
    /* Manage Button */
    .btn-manage-order {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Status Badge */
    .status-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* SKU Tags */
    .sku-cell {
        max-width: 120px;
    }
    
    .sku-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* Ship To Cell */
    .shipto-cell {
        max-width: 150px;
    }
    
    .address-text {
        font-size: 11px;
    }
    
    .shipping-method-badge {
        font-size: 9px;
    }
    
    /* Urgent Tags */
    .urgent-tag-cell {
        width: 20px;
        min-width: 20px;
    }
    
    .urgent-tag {
        font-size: 8px;
        padding: 6px 3px;
    }
    
    /* Pagination */
    .orders-pagination {
        padding: 15px;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Date Picker Popup */
    .ui-datepicker {
        width: 280px;
        padding: 12px;
    }
    
    .ui-datepicker td a,
    .ui-datepicker td span {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    /* Filter Card */
    .filter-card-body {
        padding: 10px;
    }
    
    #acom-search-filter .form-select-sm {
        min-width: 100%;
    }
    
    /* Orders Card adjustments */
    .orders-table tbody tr {
        padding: 10px;
    }
    
    .orders-table tbody td.col-order .order-number {
        font-size: 14px;
    }
    
    .orders-table tbody td.col-image .image-cell img {
        width: 45px;
        height: 45px;
    }
    
    .orders-table tbody td.col-tracking,
    .orders-table tbody td.col-shipment,
    .orders-table tbody td.col-customer,
    .orders-table tbody td.col-agent {
        width: 100%;
    }
    
    /* Bulk Actions */
    .bulk-action-select {
        flex-direction: column;
    }
    
    .bulk-action-select .form-select-sm {
        border-radius: 8px 8px 0 0;
        border-right: 1.5px solid #e2e8f0;
    }
    
    .bulk-action-select .btn {
        border-radius: 0 0 8px 8px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .order-checkbox {
        width: 22px;
        height: 22px;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
    }
    
    .btn-manage-order {
        padding: 10px 14px;
    }
    
    .status-badge {
        padding: 6px 10px;
    }
    
    /* Remove hover effects that cause sticky states on touch */
    .orders-table tbody tr:hover {
        background: transparent;
    }
    
    .orders-table tbody tr.parent-order:hover {
        background: linear-gradient(90deg, #fff9e6 0%, #fff 100%);
    }
    
    .orders-table tbody tr.urgent-order:hover {
        background: linear-gradient(90deg, #581c87 0%, #7c3aed 50%, #581c87 100%);
    }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .orders-list-header {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .orders-header-left {
        flex-direction: row;
        align-items: center;
    }
    
    .btn-header-open-tabs {
        width: auto;
    }
}

/* Dashboard Cards Mobile */
@media (max-width: 767px) {
    .row-cols-md-4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .row-cols-md-4 > .col {
        padding: 0;
    }
    
    .card-stat {
        min-height: 100px;
        border-radius: 8px;
    }
    
    .card-stat .card-body {
        padding: 10px;
    }
    
    .card-stat .card-title {
        font-size: 11px;
        min-height: 28px;
    }
    
    .card-stat .card-body .badge {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .row-cols-md-4 {
        grid-template-columns: 1fr;
    }
    
    .card-stat {
        min-height: 80px;
    }
    
    .card-stat .card-title {
        min-height: auto;
    }
}

/* Warehouse Page Mobile */
@media (max-width: 767px) {
    .warehouse-filter-form .row > [class*="col-"] {
        margin-bottom: 10px;
    }
    
    .warehouse-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0 5px;
    }
    
    .warehouse-header h1 {
        font-size: 20px;
    }
    
    /* Warehouse Table - Card View on Mobile */
    .warehouse-table-wrapper {
        overflow-x: visible;
    }
    
    .warehouse-table {
        display: block;
        min-width: unset;
    }
    
    .warehouse-table thead {
        display: none;
    }
    
    .warehouse-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .warehouse-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 12px;
        gap: 6px;
        position: relative;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .warehouse-table tbody tr.low-stock-warning {
        background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
        border-color: #fbbf24;
    }
    
    .warehouse-table tbody td {
        padding: 4px 0;
        border: none;
        background: transparent !important;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .warehouse-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        color: #6b7280;
        min-width: 70px;
        flex-shrink: 0;
    }
    
    /* Name/Image - Full width header */
    .warehouse-table tbody td.wh-col-name {
        width: 100%;
        order: 1;
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 10px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 6px;
    }
    
    .warehouse-table tbody td.wh-col-name::before {
        display: none;
    }
    
    .warehouse-table tbody td.wh-col-name strong {
        font-size: 15px;
        color: #1f2937;
    }
    
    .warehouse-table tbody td.wh-col-name img {
        width: 60px !important;
        height: 60px !important;
        max-width: 60px !important;
        max-height: 60px !important;
        object-fit: cover;
        border-radius: 8px;
        margin-top: 8px;
    }
    
    /* ID - Top right corner */
    .warehouse-table tbody td.wh-col-id {
        position: absolute;
        top: 12px;
        right: 12px;
        order: 0;
        font-size: 11px;
        color: #9ca3af;
    }
    
    .warehouse-table tbody td.wh-col-id::before {
        content: '#';
        min-width: auto;
    }
    
    /* Stock and COGS - Important, wider */
    .warehouse-table tbody td.wh-col-stock {
        width: 50%;
        order: 2;
    }
    
    .warehouse-table tbody td.wh-col-cogs {
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
    }
    
    .warehouse-table tbody td.wh-col-cogs::before {
        margin-bottom: 4px;
    }
    
    .warehouse-table tbody td.wh-col-cogs .cogs-info {
        width: 100%;
    }
    
    .warehouse-table tbody td.wh-col-cogs .cogs-display {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }
    
    .warehouse-table tbody td.wh-col-cogs .cogs-display p {
        margin: 0;
    }
    
    .warehouse-table tbody td.wh-col-cogs .cogs-edit-btn {
        opacity: 1;
    }
    
    /* Factory */
    .warehouse-table tbody td.wh-col-factory {
        width: 50%;
        order: 4;
    }
    
    /* Stats row */
    .warehouse-table tbody td.wh-col-office,
    .warehouse-table tbody td.wh-col-warehouse {
        width: 50%;
        order: 5;
    }
    
    .warehouse-table tbody td.wh-col-count {
        width: 50%;
        order: 6;
    }
    
    .warehouse-table tbody td.wh-col-avg {
        width: 50%;
        order: 7;
    }
    
    .warehouse-table tbody td.wh-col-days {
        width: 50%;
        order: 8;
    }
    
    .warehouse-table tbody td.wh-col-sales {
        width: 50%;
        order: 9;
    }
    
    /* Stock badge */
    .warehouse-table tbody .stock-badge {
        font-size: 14px;
        padding: 4px 12px;
    }
    
    /* Edit forms on mobile */
    .warehouse-table tbody .stock-edit-form,
    .warehouse-table tbody .cogs-edit-form {
        width: 100%;
    }
    
    .warehouse-table tbody .stock-edit-form .input-group,
    .warehouse-table tbody .cogs-edit-form .input-group {
        max-width: 100%;
    }
    
    /* Product count button */
    .warehouse-table tbody .product-count-btn {
        font-size: 13px;
    }
    
    /* COGS Edit Form Mobile */
    .cogs-edit-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .cogs-edit-form .form-control {
        max-width: 100%;
    }
    
    .cogs-edit-form .btn-group {
        justify-content: flex-end;
    }
    
    /* Pagination mobile */
    .warehouse-pagination {
        padding: 15px 10px;
    }
    
    .warehouse-pagination .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
}

/* ========================================
   Global Mobile Layout Improvements
   ======================================== */

/* Mobile Offcanvas Menu Styling (when offcanvas is active on small screens) */
@media (max-width: 767px) {
    #sidebarMenu.offcanvas-md {
        position: fixed !important;
        width: 280px;
        max-width: 85vw;
        z-index: 1055 !important;
    }
    
    /* When offcanvas is showing or shown, ensure it's above everything */
    #sidebarMenu.offcanvas-md.show,
    #sidebarMenu.offcanvas-md.showing {
        z-index: 1055 !important;
    }
    
    /* Ensure main content and cards stay below the mobile menu */
    main.col-md-9,
    main.col-lg-10,
    main.ms-sm-auto,
    .acom-main-inside-container {
        position: relative;
        z-index: 1;
    }
    
    /* Dashboard cards - ensure they don't create high stacking context */
    .card-stat,
    .row-cols-md-4 > .col {
        position: relative;
        z-index: 1;
    }
    
    /* Prevent transform from creating stacking context issues with menu */
    .card-stat:hover {
        z-index: 2;
    }
}

/* Desktop: Ensure offcanvas-md displays inline within sidebar */
@media (min-width: 768px) {
    #sidebarMenu.offcanvas-md.offcanvas-start {
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        width: 100% !important;
        border: none !important;
    }
}

#sidebarMenu .offcanvas-header {
    background: #1f2937;
    color: #fff;
    padding: 16px 20px;
}

#sidebarMenu .offcanvas-title {
    font-weight: 600;
    font-size: 18px;
}

#sidebarMenu .offcanvas-header .btn-close {
    filter: invert(1);
}

#sidebarMenu .offcanvas-body {
    padding: 0;
    background: #f9fafb;
}

#sidebarMenu .nav {
    padding: 12px 0;
}

#sidebarMenu .nav-link {
    padding: 14px 20px;
    font-size: 15px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
}

#sidebarMenu .nav-link:hover,
#sidebarMenu .nav-link:focus {
    background: #fff;
    color: #1f2937;
}

#sidebarMenu .nav-link img {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    filter: grayscale(100%) brightness(0.6);
    transition: filter 0.2s ease;
}

#sidebarMenu .nav-link:hover img,
#sidebarMenu .nav-link:focus img,
#sidebarMenu .nav-link.active img {
    filter: none;
}

/* Sidebar - Hidden on mobile (offcanvas handles it), shown on md+ */
@media (max-width: 767px) {
    .sidebar {
        display: block !important;
        position: fixed;
        width: 0;
        height: 0;
        overflow: hidden;
        padding: 0 !important;
        border: none !important;
    }
    
    main.col-md-9 {
        padding: 10px !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100%;
    }
    
    .container-fluid > .row {
        flex-wrap: nowrap;
    }
}

/* Header Mobile */
@media (max-width: 767px) {
    header.navbar {
        padding: 8px 0;
    }
    
    header.navbar .nav-link {
        padding: 10px 15px;
    }
    
    header.navbar .bi-list,
    header.navbar .bi-search {
        font-size: 20px;
    }
    
    #navbarSearch .form-control {
        padding: 12px 15px;
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* Order Management Page Mobile */
@media (max-width: 767px) {
    /* Warehouse Header */
    .warehouse-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .warehouse-header h1 {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    .warehouse-stock-worth {
        font-size: 13px;
    }
    
    /* Warehouse Table */
    .warehouse-table {
        font-size: 12px;
        min-width: 900px;
    }
    
    .warehouse-table th,
    .warehouse-table td {
        padding: 8px 6px;
    }
    
    /* Low Stock Warning */
    .low-stock-warning {
        background: #fef2f2 !important;
    }
    
    /* Warehouse Pagination */
    .warehouse-pagination {
        padding: 15px 10px;
    }
    
    .warehouse-pagination .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .warehouse-pagination .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Manage Order Page Mobile */
@media (max-width: 767px) {
    .order-detail-container {
        padding: 10px;
    }
    
    .order-detail-card {
        border-radius: 10px;
        margin-bottom: 15px;
    }
    
    .order-detail-card .card-header {
        padding: 12px 15px;
    }
    
    .order-detail-card .card-body {
        padding: 15px;
    }
    
    /* Order Notes */
    .order-notes-container {
        max-height: 300px;
    }
    
    .order-note-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .order-note-item .note-content {
        font-size: 13px;
    }
    
    /* Order Actions */
    .order-actions-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .order-actions-row .btn {
        width: 100%;
    }
    
    /* Order Images */
    .order-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .order-images-grid img {
        border-radius: 8px;
    }
}

/* Modals Mobile */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Forms Mobile */
@media (max-width: 767px) {
    .form-control,
    .form-select {
        padding: 12px;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
}

/* Buttons Mobile */
@media (max-width: 767px) {
    .btn-lg {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
}

/* Tables Mobile */
@media (max-width: 767px) {
    table.table-responsive-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table.table-responsive-mobile thead,
    table.table-responsive-mobile tbody,
    table.table-responsive-mobile th,
    table.table-responsive-mobile td,
    table.table-responsive-mobile tr {
        display: block;
    }
    
    table.table-responsive-mobile thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    table.table-responsive-mobile tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
        background: #fff;
    }
    
    table.table-responsive-mobile td {
        border: none;
        padding: 8px 0;
        position: relative;
        padding-left: 50%;
        text-align: left;
    }
    
    table.table-responsive-mobile td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        font-weight: 600;
        font-size: 12px;
        color: #6b7280;
    }
}

/* Split Orders Mobile */
@media (max-width: 767px) {
    .child-order-row {
        padding-left: 10px !important;
    }
    
    .child-order-row::before {
        width: 4px;
    }
    
    .child-order-indicator {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Dashboard Mobile */
@media (max-width: 767px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Utility Classes Mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .full-width-mobile {
        width: 100% !important;
    }
    
    .mb-mobile-3 {
        margin-bottom: 1rem !important;
    }
    
    .p-mobile-2 {
        padding: 0.5rem !important;
    }
}

/* Pending Production Badge Styles */
.pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    cursor: help;
}

.pending-badge.has-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Print Styles - Hide unnecessary elements */
@media print {
    .sidebar,
    header.navbar,
    .filter-card,
    .actions-bar,
    .orders-list-header,
    .warehouse-pagination,
    .orders-pagination,
    .btn,
    .form-control,
    .form-select {
        display: none !important;
    }
    
    main.col-md-9 {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .orders-table,
    .warehouse-table {
        min-width: 100% !important;
        font-size: 10px !important;
    }
    
    .orders-table th,
    .orders-table td,
    .warehouse-table th,
    .warehouse-table td {
        padding: 4px !important;
    }
}/**
 * Procurement Module Styles
 * Suppliers, Purchase Orders, Cost Analytics
 * Using CRM Theme: Yellow (#F8BC32)
 */

:root {
    --procurement-primary: #F8BC32;
    --procurement-primary-hover: #e5a82a;
    --procurement-primary-light: rgba(248, 188, 50, 0.1);
    --procurement-success: #10b981;
    --procurement-danger: #ef4444;
    --procurement-warning: #f59e0b;
    --procurement-info: #06b6d4;
    --procurement-dark: #374149;
    --procurement-gray: #6b7280;
    --procurement-gray-light: #f3f4f6;
    --procurement-border: #e5e7eb;
}

/* ========================================
   Base Container & Layout
   ======================================== */
.procurement-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ========================================
   Header Section
   ======================================== */
.procurement-container .procurement-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--procurement-primary);
}

.procurement-container .procurement-header h1 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--procurement-dark) !important;
}

.procurement-container .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 16px;
    flex-wrap: wrap;
}

.procurement-container .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    flex-wrap: wrap;
}

.procurement-container .header-stats {
    display: flex !important;
    gap: 8px;
}

.procurement-container .stat-badge {
    display: inline-block !important;
    padding: 4px 12px !important;
    background: var(--procurement-gray-light) !important;
    color: var(--procurement-gray) !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.procurement-container .stat-badge.stat-active {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.procurement-container .stat-badge.stat-pending {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* ========================================
   Reliability Score Badges
   ======================================== */
.procurement-container .reliability-score {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

.procurement-container .reliability-score small {
    font-weight: 500 !important;
    opacity: 0.8;
}

.procurement-container .reliability-score.grade-a {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.procurement-container .reliability-score.grade-b {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
}

.procurement-container .reliability-score.grade-c {
    background: linear-gradient(135deg, #F8BC32 0%, #f59e0b 100%) !important;
    color: white !important;
}

.procurement-container .reliability-score.grade-d {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: white !important;
}

.procurement-container .reliability-score.grade-f {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
}

.procurement-container .reliability-score.grade-n\/a {
    background: var(--procurement-gray-light) !important;
    color: var(--procurement-gray) !important;
}

/* ========================================
   Status Tabs
   ======================================== */
.procurement-container .status-tabs {
    display: flex !important;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: none !important;
}

.procurement-container .status-tab {
    padding: 8px 16px !important;
    background: var(--procurement-gray-light) !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--procurement-gray) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.procurement-container .status-tab:hover {
    background: #e5e7eb !important;
    color: var(--procurement-dark) !important;
}

.procurement-container .status-tab.active {
    background: var(--procurement-primary) !important;
    color: white !important;
}

.procurement-container .status-tab[data-status]:not(.active):hover {
    background: var(--status-color, #e5e7eb) !important;
    color: white !important;
}

/* ========================================
   Filters Section
   ======================================== */
.procurement-container .procurement-filters {
    background: #f9fafb !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 20px;
    border: 1px solid var(--procurement-border) !important;
}

.procurement-container .filter-row {
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
}

.procurement-container .filter-group {
    flex: 1;
    min-width: 200px;
}

.procurement-container .filter-group .form-control,
.procurement-container .filter-group .form-select {
    border-radius: 8px;
    border-color: #d1d5db;
    height: 42px;
}

.procurement-container .filter-group .form-control:focus,
.procurement-container .filter-group .form-select:focus {
    border-color: var(--procurement-primary);
    box-shadow: 0 0 0 3px var(--procurement-primary-light);
}

/* ========================================
   Tables
   ======================================== */
.procurement-container .procurement-table-wrapper {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
    border: 1px solid var(--procurement-border) !important;
}

.procurement-container .procurement-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 14px !important;
    background: white !important;
}

.procurement-container .procurement-table thead {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
}

.procurement-container .procurement-table th {
    padding: 14px 16px !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: var(--procurement-dark) !important;
    border-bottom: 2px solid var(--procurement-primary) !important;
    white-space: nowrap;
    background: transparent !important;
}

.procurement-container .procurement-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.procurement-container .procurement-table th.sortable:hover {
    background: rgba(248, 188, 50, 0.1) !important;
}

.procurement-container .procurement-table td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    color: #1f2937 !important;
    vertical-align: middle !important;
    background: transparent !important;
}

.procurement-container .procurement-table tbody tr:hover {
    background: rgba(248, 188, 50, 0.05) !important;
}

.procurement-table .supplier-name strong {
    color: var(--procurement-dark);
}

.procurement-table .supplier-contact {
    font-size: 13px;
}

.procurement-table .contact-name {
    font-weight: 500;
}

.procurement-table .contact-email a {
    color: var(--procurement-primary);
    text-decoration: none;
    font-weight: 500;
}

.procurement-table .contact-email a:hover {
    text-decoration: underline;
}

.procurement-table .contact-phone {
    color: var(--procurement-gray);
}

.procurement-table .po-number a {
    color: var(--procurement-primary);
    text-decoration: none;
    font-weight: 600;
}

.procurement-table .po-number a:hover {
    text-decoration: underline;
}

/* ========================================
   Status Badges
   ======================================== */
.procurement-container .status-badge {
    display: inline-block !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: capitalize;
}

.procurement-container .status-badge.status-active {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.procurement-container .status-badge.status-inactive {
    background: var(--procurement-gray-light) !important;
    color: var(--procurement-gray) !important;
}

/* Status dot for dropdown */
.procurement-container .status-dot {
    display: inline-block !important;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

/* ========================================
   Action Buttons
   ======================================== */
.procurement-container .procurement-table .actions {
    white-space: nowrap;
}

.procurement-container .procurement-table .actions .btn {
    padding: 6px 10px !important;
}

.procurement-container .procurement-table .btn-group {
    display: flex !important;
    gap: 4px;
}

/* ========================================
   Empty State
   ======================================== */
.procurement-container .empty-state {
    text-align: center !important;
    padding: 60px 20px !important;
    color: var(--procurement-gray) !important;
    background: white !important;
}

.procurement-container .empty-state i {
    font-size: 48px !important;
    margin-bottom: 16px;
    opacity: 0.5;
    color: var(--procurement-primary) !important;
}

.procurement-container .empty-state p {
    font-size: 16px !important;
    margin-bottom: 20px;
}

/* ========================================
   Modals
   ======================================== */
.procurement-container .modal-header {
    border-bottom: 2px solid var(--procurement-primary) !important;
    padding: 16px 24px !important;
    background: linear-gradient(135deg, #fff 0%, #fefdf9 100%) !important;
}

.procurement-container .modal-title {
    font-weight: 600 !important;
    color: var(--procurement-dark) !important;
}

.procurement-container .modal-body {
    padding: 24px !important;
    background: white !important;
}

.procurement-container .modal-footer {
    border-top: 1px solid var(--procurement-border) !important;
    padding: 16px 24px !important;
    background: #f9fafb !important;
}

/* ========================================
   Form Styles (in modals)
   ======================================== */
.procurement-container .form-label {
    font-weight: 500 !important;
    color: var(--procurement-dark) !important;
    margin-bottom: 6px;
}

.procurement-container .form-control,
.procurement-container .form-select {
    border-radius: 8px !important;
    border-color: #d1d5db !important;
}

.procurement-container .form-control:focus,
.procurement-container .form-select:focus {
    border-color: var(--procurement-primary) !important;
    box-shadow: 0 0 0 3px var(--procurement-primary-light) !important;
}

/* ========================================
   PO Items Section
   ======================================== */
.procurement-container .po-items-section {
    border-top: 1px solid var(--procurement-border) !important;
    padding-top: 20px;
}

.procurement-container .po-items-section h5 {
    font-weight: 600 !important;
    margin-bottom: 16px;
    color: var(--procurement-dark) !important;
}

.procurement-container .product-search-row {
    position: relative;
}

.procurement-container .search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white !important;
    border: 1px solid var(--procurement-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.procurement-container .search-result-item {
    padding: 12px 16px !important;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6 !important;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: rgba(248, 188, 50, 0.1);
}

.procurement-container .search-result-item:last-child {
    border-bottom: none;
}

.procurement-container #po-items-table {
    margin-bottom: 0;
    background: white !important;
}

.procurement-container #po-items-table thead th {
    background: #f9fafb !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
}

.procurement-container #po-items-table tbody td {
    padding: 10px 12px !important;
    vertical-align: middle !important;
    background: white !important;
}

.procurement-container #po-items-table tfoot td {
    padding: 10px 12px !important;
    font-size: 14px !important;
}

.procurement-container .no-items td {
    padding: 30px !important;
}

/* ========================================
   Supplier Details (in view modal)
   ======================================== */
.procurement-container .supplier-details h4 {
    margin-bottom: 16px;
    color: var(--procurement-dark) !important;
}

.procurement-container .supplier-stats-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.procurement-container .stat-card {
    background: linear-gradient(135deg, #f9fafb 0%, #fff 100%) !important;
    border-radius: 10px !important;
    padding: 16px !important;
    text-align: center;
    border: 1px solid var(--procurement-border) !important;
}

.procurement-container .stat-card .stat-value {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--procurement-primary) !important;
}

.procurement-container .stat-card .stat-label {
    font-size: 12px !important;
    color: var(--procurement-gray) !important;
    margin-top: 4px;
}

.procurement-container .products-list {
    margin-top: 8px;
}

/* ========================================
   Enhanced Supplier Details View
   ======================================== */
.supplier-details-enhanced {
    padding: 0;
}

.supplier-details-enhanced .supplier-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 24px;
    margin: -16px -16px 20px -16px;
    border-bottom: 1px solid #e2e8f0;
}

.supplier-details-enhanced .hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.supplier-details-enhanced .supplier-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.supplier-details-enhanced .supplier-main-info {
    flex: 1;
    min-width: 200px;
}

.supplier-details-enhanced .supplier-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1e293b;
}

.supplier-details-enhanced .supplier-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #64748b;
}

.supplier-details-enhanced .supplier-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.supplier-details-enhanced .status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.supplier-details-enhanced .status-badge.active {
    background: #dcfce7;
    color: #15803d;
}

.supplier-details-enhanced .status-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.supplier-details-enhanced .status-badge i {
    font-size: 8px;
}

.supplier-details-enhanced .supplier-quick-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Stats Grid */
.supplier-details-enhanced .stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .supplier-details-enhanced .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .supplier-details-enhanced .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.supplier-details-enhanced .stat-box {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
}

.supplier-details-enhanced .stat-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.supplier-details-enhanced .stat-box.has-balance {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border-color: #f59e0b;
}

.supplier-details-enhanced .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.supplier-details-enhanced .stat-icon.orders {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    color: #2563eb;
}

.supplier-details-enhanced .stat-icon.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    color: #d97706;
}

.supplier-details-enhanced .stat-icon.spent {
    background: linear-gradient(135deg, #e0e7ff 0%, #eef2ff 100%);
    color: #4f46e5;
}

.supplier-details-enhanced .stat-icon.paid {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    color: #16a34a;
}

.supplier-details-enhanced .stat-icon.balance {
    background: linear-gradient(135deg, #fed7aa 0%, #fff7ed 100%);
    color: #ea580c;
}

.supplier-details-enhanced .stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.supplier-details-enhanced .stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Tabs */
.supplier-details-enhanced .supplier-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
}

.supplier-details-enhanced .supplier-tabs .nav-link {
    border: none;
    color: #64748b;
    padding: 12px 20px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.supplier-details-enhanced .supplier-tabs .nav-link:hover {
    color: #3b82f6;
    background: transparent;
}

.supplier-details-enhanced .supplier-tabs .nav-link.active {
    color: #3b82f6;
    background: transparent;
    border-bottom-color: #3b82f6;
}

.supplier-details-enhanced .supplier-tabs .badge {
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.supplier-details-enhanced .supplier-tab-content {
    padding: 20px 0;
}

/* Info Cards */
.supplier-details-enhanced .info-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.supplier-details-enhanced .info-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.supplier-details-enhanced .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.supplier-details-enhanced .info-row:last-child {
    border-bottom: none;
}

.supplier-details-enhanced .info-label {
    color: #64748b;
    font-size: 13px;
}

.supplier-details-enhanced .info-value {
    color: #1e293b;
    font-weight: 500;
    font-size: 13px;
    text-align: right;
}

.supplier-details-enhanced .info-value a {
    color: #3b82f6;
}

/* Products Grid */
.supplier-details-enhanced .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.supplier-details-enhanced .supplier-product-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.supplier-details-enhanced .supplier-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.supplier-details-enhanced .supplier-product-card .product-image {
    height: 120px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.supplier-details-enhanced .supplier-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supplier-details-enhanced .supplier-product-card .product-image i {
    font-size: 36px;
    color: #cbd5e1;
}

.supplier-details-enhanced .supplier-product-card .primary-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f59e0b;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.supplier-details-enhanced .supplier-product-card .product-info {
    padding: 12px;
}

.supplier-details-enhanced .supplier-product-card .product-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.supplier-details-enhanced .supplier-product-card .product-sku {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.supplier-details-enhanced .supplier-product-card .product-details {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.supplier-details-enhanced .supplier-product-card .stock.in-stock {
    color: #16a34a;
}

.supplier-details-enhanced .supplier-product-card .stock.out-stock {
    color: #dc2626;
}

.supplier-details-enhanced .supplier-product-card .cost {
    color: #4f46e5;
    font-weight: 600;
}

/* Orders List */
.supplier-details-enhanced .orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supplier-details-enhanced .order-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.supplier-details-enhanced .order-row:hover {
    background: #f8fafc;
    border-color: #3b82f6;
}

.supplier-details-enhanced .order-number .po-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.supplier-details-enhanced .order-number .po-link:hover {
    text-decoration: underline;
}

.supplier-details-enhanced .order-date {
    color: #64748b;
    font-size: 13px;
}

.supplier-details-enhanced .order-total {
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

/* Documents List */
.supplier-details-enhanced .documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supplier-details-enhanced .document-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.supplier-details-enhanced .document-row:hover {
    background: #f8fafc;
    border-color: #3b82f6;
}

.supplier-details-enhanced .doc-icon {
    width: 40px;
    height: 40px;
    background: #e0e7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    font-size: 18px;
    flex-shrink: 0;
}

.supplier-details-enhanced .doc-info {
    flex: 1;
}

.supplier-details-enhanced .doc-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.supplier-details-enhanced .doc-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* ========================================
   PO Details View
   ======================================== */
.procurement-container .po-details h6 {
    font-weight: 600 !important;
    color: var(--procurement-dark) !important;
    margin-bottom: 12px;
    margin-top: 20px;
}

.procurement-container .po-details h6:first-child {
    margin-top: 0;
}

.procurement-container .payment-summary {
    background: linear-gradient(135deg, #f9fafb 0%, #fefdf9 100%) !important;
    border-radius: 10px !important;
    padding: 16px !important;
    border: 1px solid var(--procurement-border) !important;
}

.procurement-container .payment-summary p {
    margin-bottom: 8px;
}

/* ========================================
   Analytics Page
   ======================================== */
.procurement-container .analytics-cards {
    margin-bottom: 24px;
}

.procurement-container .analytics-card {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    padding: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    border: 1px solid var(--procurement-border) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 16px;
}

.procurement-container .analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.procurement-container .analytics-card .card-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    color: white !important;
    flex-shrink: 0;
}

.procurement-container .analytics-card .card-icon.bg-primary {
    background: linear-gradient(135deg, var(--procurement-primary) 0%, #e5a82a 100%) !important;
}

.procurement-container .analytics-card .card-icon.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.procurement-container .analytics-card .card-icon.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.procurement-container .analytics-card .card-icon.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.procurement-container .analytics-card .card-icon.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.procurement-container .analytics-card .card-icon.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.procurement-container .analytics-card .card-content {
    flex: 1;
    min-width: 0;
}

.procurement-container .analytics-card .card-value {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--procurement-dark) !important;
    line-height: 1.2 !important;
    background: none !important;
}

.procurement-container .analytics-card .card-label {
    font-size: 13px !important;
    color: var(--procurement-gray) !important;
    background: none !important;
}

.procurement-container .analytics-panel {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    padding: 20px !important;
    height: 100%;
    border: 1px solid var(--procurement-border) !important;
}

.procurement-container .analytics-panel h5 {
    font-weight: 600 !important;
    color: var(--procurement-dark) !important;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--procurement-primary) !important;
    background: none !important;
}

.procurement-container .chart-container {
    height: 300px;
    position: relative;
}

/* ========================================
   Product Cost Lookup
   ======================================== */
.procurement-container .product-cost-item {
    background: linear-gradient(135deg, #f9fafb 0%, #fff 100%) !important;
    padding: 12px 16px !important;
    margin-bottom: 8px;
    border-radius: 8px !important;
    border: 1px solid var(--procurement-border) !important;
}

.procurement-container .product-cost-item:hover {
    border-color: var(--procurement-primary) !important;
}

/* ========================================
   Pagination
   ======================================== */
.procurement-container .procurement-pagination {
    display: flex !important;
    justify-content: center !important;
    padding: 20px !important;
    gap: 8px;
    background: none !important;
}

.procurement-container .procurement-pagination .page-btn {
    padding: 8px 14px !important;
    border: 1px solid var(--procurement-border) !important;
    background: white !important;
    border-radius: 6px !important;
    cursor: pointer;
    font-size: 14px !important;
    color: var(--procurement-dark) !important;
    transition: all 0.15s ease;
}

.procurement-container .procurement-pagination .page-btn:hover {
    background: rgba(248, 188, 50, 0.1) !important;
    border-color: var(--procurement-primary) !important;
}

.procurement-container .procurement-pagination .page-btn.active {
    background: var(--procurement-primary) !important;
    border-color: var(--procurement-primary) !important;
    color: white !important;
}

.procurement-container .procurement-pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .procurement-container .procurement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .procurement-container .header-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .procurement-container .filter-row {
        flex-direction: column;
    }

    .procurement-container .filter-group {
        min-width: 100%;
    }

    .procurement-container .procurement-table-wrapper {
        overflow-x: auto;
    }

    .procurement-container .status-tabs {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .procurement-container .supplier-stats-cards {
        grid-template-columns: 1fr;
    }

    .procurement-container .analytics-card {
        flex-direction: column !important;
        text-align: center;
    }
    
    .procurement-container .analytics-card .card-icon {
        margin: 0 auto 12px auto;
    }
}

/* ========================================
   CRM-Themed Buttons
   ======================================== */
.procurement-container .btn-primary,
.procurement-container .btn-acom-primary {
    background: var(--procurement-primary) !important;
    border-color: var(--procurement-primary) !important;
    color: #fff !important;
}

.procurement-container .btn-primary:hover,
.procurement-container .btn-acom-primary:hover {
    background: var(--procurement-primary-hover) !important;
    border-color: var(--procurement-primary-hover) !important;
}

.procurement-container .btn-outline-primary {
    color: var(--procurement-primary);
    border-color: var(--procurement-primary);
    background: transparent;
}

.procurement-container .btn-outline-primary:hover {
    background: var(--procurement-primary);
    border-color: var(--procurement-primary);
    color: white;
}

/* ========================================
   Spinner
   ======================================== */
.procurement-container .spinner-border {
    color: var(--procurement-primary);
}

/* ========================================
   Text Utilities
   ======================================== */
.text-success {
    color: var(--procurement-success) !important;
}

.text-danger {
    color: var(--procurement-danger) !important;
}

.text-warning {
    color: var(--procurement-warning) !important;
}

.text-muted {
    color: var(--procurement-gray) !important;
}

.text-primary {
    color: var(--procurement-primary) !important;
}

/* ========================================
   Supplier Link Badge (for Warehouse)
   ======================================== */
.supplier-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(248, 188, 50, 0.1);
    color: var(--procurement-primary);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(248, 188, 50, 0.3);
    text-decoration: none;
}

.supplier-link-badge:hover {
    background: rgba(248, 188, 50, 0.2);
    text-decoration: none;
    color: var(--procurement-primary);
}

.supplier-link-badge i {
    font-size: 10px;
}

/* ========================================
   Stock Status in Warehouse
   ======================================== */
.incoming-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--procurement-info);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.incoming-stock-badge.in-transit {
    background: rgba(245, 158, 11, 0.1);
    color: var(--procurement-warning);
}

.incoming-stock-badge.on-order {
    background: rgba(248, 188, 50, 0.1);
    color: var(--procurement-primary);
}

/* ========================================
   Quick Action Floating Button
   ======================================== */
.quick-actions {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.quick-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--procurement-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(248, 188, 50, 0.5);
}

/* ========================================
   Alert Customizations
   ======================================== */
.alert-primary {
    background: rgba(248, 188, 50, 0.1);
    border-color: rgba(248, 188, 50, 0.3);
    color: var(--procurement-dark);
}

/* ========================================
   Loading Overlay
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--procurement-gray-light);
    border-top-color: var(--procurement-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Nav Tabs for Modal
   ======================================== */
.nav-tabs .nav-link {
    color: var(--procurement-gray);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
}

.nav-tabs .nav-link:hover {
    color: var(--procurement-dark);
    border-bottom-color: var(--procurement-primary);
}

.nav-tabs .nav-link.active {
    color: var(--procurement-primary);
    background: transparent;
    border-bottom: 2px solid var(--procurement-primary);
}

/* ========================================
   Cost History List
   ======================================== */
.cost-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.cost-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 6px;
}

.cost-history-item:hover {
    background: rgba(248, 188, 50, 0.05);
}

.cost-history-item .cost-value {
    font-weight: 600;
    color: var(--procurement-dark);
}

.cost-history-item .cost-date {
    font-size: 12px;
    color: var(--procurement-gray);
}
/* ========================================
   Insight Panels
   ======================================== */
.procurement-container .insight-panel {
    border-left: 4px solid var(--procurement-primary) !important;
}

.procurement-container .insight-panel h5 {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 4px !important;
}

/* ========================================
   Enhanced Analytics Card Icons
   ======================================== */
.procurement-container .analytics-card .card-icon.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.procurement-container .analytics-card .card-icon.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* ========================================
   Progress Bars in Tables
   ======================================== */
.table .progress {
    margin: 0;
    background: #e5e7eb;
    overflow: visible;
}

.table .progress-bar.bg-success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
}

.table .progress-bar.bg-info {
    background: linear-gradient(90deg, #06b6d4 0%, #0891b2 100%) !important;
}

/* ========================================
   KPI Cards (Dashboard Style)
   ======================================== */
.procurement-container .kpi-row {
    display: flex !important;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.procurement-container .kpi-card {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
    background: white !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--procurement-border) !important;
    position: relative;
    overflow: hidden;
}

.procurement-container .kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--procurement-primary);
}

.procurement-container .kpi-card.kpi-success::before {
    background: var(--procurement-success);
}

.procurement-container .kpi-card.kpi-danger::before {
    background: var(--procurement-danger);
}

.procurement-container .kpi-card.kpi-warning::before {
    background: var(--procurement-warning);
}

.procurement-container .kpi-card.kpi-info::before {
    background: var(--procurement-info);
}

.procurement-container .kpi-card h6 {
    margin: 0 0 4px 0;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--procurement-gray) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none !important;
}

.procurement-container .kpi-card .kpi-value {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--procurement-dark) !important;
    line-height: 1.2;
}

.procurement-container .kpi-card .kpi-delta {
    font-size: 12px !important;
    margin-top: 4px;
}

.procurement-container .kpi-card .kpi-delta.positive {
    color: var(--procurement-success) !important;
}

.procurement-container .kpi-card .kpi-delta.negative {
    color: var(--procurement-danger) !important;
}

/* ========================================
   Alert Cards in Headers
   ======================================== */
.alert-card {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.alert-card.alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
}

.alert-card.alert-info {
    background: #ecfeff;
    border-color: #67e8f9;
}

.alert-card.alert-success {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.alert-card h6 {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 14px;
}

.alert-card .badge {
    font-weight: 500;
}

/* ========================================
   Top Performers Section
   ======================================== */
.top-performers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.performer-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--procurement-border);
    text-align: center;
    transition: all 0.2s ease;
}

.performer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--procurement-primary);
}

.performer-card .rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
}

.performer-card .rank.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.performer-card .rank.rank-2 {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: white;
}

.performer-card .rank.rank-3 {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
}

.performer-card .supplier-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.performer-card .supplier-score {
    font-size: 12px;
    color: var(--procurement-gray);
}

/* ========================================
   Toast Notifications
   ======================================== */
.procurement-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.procurement-notice.notice-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.procurement-notice.notice-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.procurement-notice.notice-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.procurement-notice.notice-info {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    color: #0e7490;
    border: 1px solid #67e8f9;
}

.procurement-notice i {
    font-size: 18px;
}

.procurement-notice .notice-close {
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.procurement-notice .notice-close:hover {
    opacity: 1;
}

/* ========================================
   Loading States
   ======================================== */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--procurement-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Product Cost Results
   ======================================== */
.product-cost-results {
    border: 1px solid var(--procurement-border);
    border-radius: 8px;
    overflow: hidden;
}

.product-cost-results .product-cost-item {
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--procurement-border);
}

.product-cost-results .product-cost-item:last-child {
    border-bottom: none;
}

/* ========================================
   Procurement Modal Overrides
   ======================================== */
#supplier-modal .modal-content,
#purchase-order-modal .modal-content,
#view-supplier-modal .modal-content,
#view-po-modal .modal-content {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
}

#supplier-modal .modal-header,
#purchase-order-modal .modal-header,
#view-supplier-modal .modal-header,
#view-po-modal .modal-header {
    background: linear-gradient(135deg, #fff 0%, #fefdf9 100%) !important;
    border-bottom: 2px solid #F8BC32 !important;
    padding: 16px 24px !important;
    border-radius: 12px 12px 0 0 !important;
}

#supplier-modal .modal-title,
#purchase-order-modal .modal-title,
#view-supplier-modal .modal-title,
#view-po-modal .modal-title {
    font-weight: 600 !important;
    color: #374149 !important;
    font-size: 1.25rem !important;
}

#supplier-modal .modal-body,
#purchase-order-modal .modal-body,
#view-supplier-modal .modal-body,
#view-po-modal .modal-body {
    padding: 24px !important;
    background: white !important;
}

#supplier-modal .modal-footer,
#purchase-order-modal .modal-footer,
#view-supplier-modal .modal-footer,
#view-po-modal .modal-footer {
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 16px 24px !important;
    border-radius: 0 0 12px 12px !important;
}

#supplier-modal .form-label,
#purchase-order-modal .form-label {
    font-weight: 500 !important;
    color: #374149 !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
}

#supplier-modal .form-control,
#supplier-modal .form-select,
#purchase-order-modal .form-control,
#purchase-order-modal .form-select {
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

#supplier-modal .form-control:focus,
#supplier-modal .form-select:focus,
#purchase-order-modal .form-control:focus,
#purchase-order-modal .form-select:focus {
    border-color: #F8BC32 !important;
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.15) !important;
    outline: none !important;
}

#supplier-modal .btn-primary,
#purchase-order-modal .btn-primary {
    background: #F8BC32 !important;
    border-color: #F8BC32 !important;
    color: white !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
}

#supplier-modal .btn-primary:hover,
#purchase-order-modal .btn-primary:hover {
    background: #e5a82a !important;
    border-color: #e5a82a !important;
}

#supplier-modal .btn-secondary,
#purchase-order-modal .btn-secondary {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: white !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
}

#supplier-modal .btn-close,
#purchase-order-modal .btn-close,
#view-supplier-modal .btn-close,
#view-po-modal .btn-close {
    opacity: 0.6 !important;
}

#supplier-modal .btn-close:hover,
#purchase-order-modal .btn-close:hover,
#view-supplier-modal .btn-close:hover,
#view-po-modal .btn-close:hover {
    opacity: 1 !important;
}

/* Modal row spacing */
#supplier-modal .row,
#purchase-order-modal .row {
    margin-bottom: 0 !important;
}

#supplier-modal .mb-3,
#purchase-order-modal .mb-3 {
    margin-bottom: 1rem !important;
}

/* ========================================
   Sidebar Dropdown Menu Styles
   ======================================== */
.menu-dropdown {
    position: relative;
}

.menu-dropdown .dropdown-toggle-custom {
    cursor: pointer;
    position: relative;
}

.menu-dropdown .dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.menu-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.menu-dropdown .dropdown-submenu {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    margin: 4px 8px 4px 16px;
    padding: 4px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.menu-dropdown .dropdown-submenu .nav-item {
    margin: 0;
}

.menu-dropdown .dropdown-submenu .submenu-item {
    padding: 8px 12px 8px 16px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.menu-dropdown .dropdown-submenu .submenu-item:hover {
    background: rgba(248, 188, 50, 0.1);
    color: #F8BC32;
    border-left-color: #F8BC32;
}

.menu-dropdown .dropdown-submenu .submenu-item i.bi-dot {
    font-size: 20px;
    margin-right: -4px;
    color: #999;
}

.menu-dropdown .dropdown-submenu .submenu-item:hover i.bi-dot {
    color: #F8BC32;
}

/* Inventory Management specific styling */
.menu-dropdown .dropdown-toggle-custom {
    font-weight: 500;
    background: transparent;
    border-radius: 8px;
    margin: 2px 8px;
    padding: 10px 12px !important;
}

.menu-dropdown .dropdown-toggle-custom:hover {
    background: rgba(248, 188, 50, 0.08);
    color: #F8BC32 !important;
}

.menu-dropdown .dropdown-toggle-custom:hover .menu-icon,
.menu-dropdown .dropdown-toggle-custom:hover .dropdown-arrow {
    color: #F8BC32 !important;
}

.menu-dropdown.open .dropdown-toggle-custom {
    background: rgba(248, 188, 50, 0.12);
    color: #F8BC32;
}

.menu-dropdown.open .dropdown-toggle-custom .menu-icon {
    color: #F8BC32;
}

/* ========================================
   Enhanced Purchase Order Modal Styles
   ======================================== */

/* Modal Container */
.po-modal-enhanced {
    border-radius: 16px !important;
    overflow: hidden;
    border: none !important;
}

/* Modal Header */
.po-modal-header {
    background: linear-gradient(135deg, #fff 0%, #fefdf9 100%) !important;
    border-bottom: 3px solid #F8BC32 !important;
    padding: 14px 24px !important;
}

.po-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.3);
}

.po-modal-header .modal-title {
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    color: #1f2937 !important;
}

/* Step Progress Indicator */
.po-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    gap: 0;
}

.po-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.po-step.active {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.3);
}

.po-step.active .step-number {
    background: white;
    color: #F8BC32;
}

.po-step.active .step-label {
    color: white;
    font-weight: 600;
}

.po-step.completed {
    background: #ecfdf5;
}

.po-step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.po-step-connector {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
}

/* Form Sections */
.po-form-section {
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.po-form-section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #fafafa;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.section-header i {
    color: #F8BC32;
    font-size: 16px;
}

.items-count-badge {
    margin-left: auto;
    background: #F8BC32;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.section-body {
    padding: 16px 24px;
    background: white;
}

/* Form Floating Enhancements */
.po-modal-enhanced .form-floating > label {
    color: #6b7280;
    font-size: 14px;
}

.po-modal-enhanced .form-floating > .form-control:focus ~ label,
.po-modal-enhanced .form-floating > .form-select:focus ~ label,
.po-modal-enhanced .form-floating > .form-control:not(:placeholder-shown) ~ label,
.po-modal-enhanced .form-floating > .form-select:not([value=""]) ~ label {
    color: #F8BC32;
}

.po-modal-enhanced .form-control:focus,
.po-modal-enhanced .form-select:focus {
    border-color: #F8BC32 !important;
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.15) !important;
}

/* Supplier Quick Info */
.supplier-quick-info {
    padding: 8px 12px;
    background: #fffbeb;
    border-radius: 8px;
    border-left: 3px solid #F8BC32;
}

/* Enhanced Product Search */
.product-search-container {
    position: relative;
    margin-bottom: 20px;
}

/* Supplier Products Suggestions Panel */
.supplier-products-panel {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.supplier-products-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 13px;
    color: #166534;
}

.supplier-products-panel .panel-header .btn {
    padding: 2px 8px;
    font-size: 11px;
}

.supplier-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.supplier-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.supplier-product-card:hover {
    border-color: #4ade80;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
    transform: translateY(-2px);
}

.supplier-product-card.added {
    background: #dcfce7;
    border-color: #4ade80;
}

.supplier-product-card .product-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.supplier-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supplier-product-card .product-image i {
    color: #9ca3af;
    font-size: 18px;
}

.supplier-product-card .product-info {
    flex: 1;
    min-width: 0;
}

.supplier-product-card .product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supplier-product-card .product-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #6b7280;
}

.supplier-product-card .product-meta .out-of-stock {
    color: #ef4444;
}

.supplier-product-card .add-icon {
    color: #22c55e;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.supplier-product-card:hover .add-icon {
    opacity: 1;
}

.supplier-products-loading,
.no-products-message {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

@keyframes flash-highlight {
    0% { background-color: #fef3c7; }
    100% { background-color: transparent; }
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    z-index: 1;
}

.search-input-wrapper .search-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.product-search-container #product-search {
    padding-left: 48px;
    padding-right: 48px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 15px;
    transition: all 0.2s ease;
}

.product-search-container #product-search:focus {
    border-color: #F8BC32;
    box-shadow: 0 0 0 4px rgba(248, 188, 50, 0.1);
}

.product-search-container #product-search::placeholder {
    color: #9ca3af;
}

/* Search Results Dropdown */
.product-search-container .search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.product-search-container .search-result-item {
    padding: 14px 18px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.product-search-container .search-result-item:last-child {
    border-bottom: none;
}

.product-search-container .search-result-item:hover {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.product-search-container .search-result-item .product-info {
    flex: 1;
}

.product-search-container .search-result-item .product-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.product-search-container .search-result-item .product-sku {
    font-size: 12px;
    color: #6b7280;
}

.product-search-container .search-result-item .product-cost {
    font-weight: 600;
    color: #F8BC32;
    background: rgba(248, 188, 50, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
}

/* Items Table Wrapper */
.po-items-table-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.po-items-table {
    margin-bottom: 0;
}

.po-items-table thead {
    background: #f8fafc;
}

.po-items-table thead th {
    font-weight: 600;
    color: #4b5563;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid #e5e7eb;
}

.po-items-table .col-product { width: auto; }
.po-items-table .col-qty { width: 100px; text-align: center; }
.po-items-table .col-cost { width: 120px; text-align: right; }
.po-items-table .col-total { width: 120px; text-align: right; }
.po-items-table .col-action { width: 50px; text-align: center; }

.po-items-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

.po-items-table tbody tr {
    transition: background 0.15s ease;
}

.po-items-table tbody tr:hover {
    background: #fafafa;
}

.po-items-table .item-name {
    font-weight: 600;
    color: #1f2937;
}

.po-items-table .item-sku {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.po-items-table .item-qty-input,
.po-items-table .item-cost-input {
    text-align: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 8px;
    font-weight: 500;
    width: 100%;
}

.po-items-table .item-qty-input:focus,
.po-items-table .item-cost-input:focus {
    border-color: #F8BC32;
    box-shadow: 0 0 0 2px rgba(248, 188, 50, 0.15);
    outline: none;
}

.po-items-table .item-total {
    font-weight: 700;
    color: #1f2937;
}

.po-items-table .remove-item-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #fef2f2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.po-items-table .remove-item-btn:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

/* Empty Items State */
.empty-items-state {
    padding: 50px 20px;
    text-align: center;
}

.empty-items-state i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-items-state p {
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.empty-items-state small {
    color: #9ca3af;
}

/* Totals Card */
.po-totals-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #4b5563;
}

.totals-row .value {
    font-weight: 600;
    color: #1f2937;
}

.totals-row.shipping-row .shipping-input {
    width: 80px;
    text-align: right;
    border-radius: 6px;
    padding: 4px 8px;
}

.totals-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.totals-row.total-row {
    font-size: 16px;
}

.totals-row.total-row .total-value {
    font-size: 22px;
    font-weight: 700;
    color: #F8BC32;
}

/* Modal Footer - Sticky at bottom for all zoom levels */
.po-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px !important;
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb !important;
    flex-shrink: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* Fix modal content to ensure footer is always visible with scrollable body */
.po-modal-enhanced {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.po-modal-enhanced .modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.po-modal-footer .footer-left,
.po-modal-footer .footer-right {
    display: flex;
    gap: 12px;
}

.po-modal-footer .btn-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%) !important;
    border: none !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.3);
    transition: all 0.2s ease;
}

.po-modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(248, 188, 50, 0.4);
}

.po-modal-footer .btn-secondary {
    border-radius: 10px !important;
}

.po-modal-footer .btn-outline-secondary {
    border-radius: 10px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .po-steps-indicator {
        padding: 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .po-step-connector {
        display: none;
    }
    
    .section-body {
        padding: 16px;
    }
    
    .po-modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .po-modal-footer .footer-left,
    .po-modal-footer .footer-right {
        width: 100%;
        justify-content: center;
    }
}

/* Enhanced Search Results */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s ease;
}

.search-result-item:hover {
    background-color: #f0f9ff;
}

.product-result-image {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.product-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-result-image i {
    font-size: 20px;
    color: #aaa;
}

.product-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-result-name {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-result-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.product-result-sku {
    font-size: 12px;
    color: #888;
}

.product-result-stock {
    color: #28a745;
}

.product-result-stock.out-of-stock {
    color: #dc3545;
}

.product-result-price {
    font-weight: 600;
    color: #28a745;
    white-space: nowrap;
}

.product-result-price .no-price {
    color: #888;
    font-weight: normal;
    font-size: 12px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.search-no-results i {
    font-size: 24px;
    opacity: 0.5;
}

/* Enhanced Item Rows */
.item-row {
    transition: background-color 0.2s ease;
}

.item-row:hover {
    background-color: #f8f9fa;
}

.item-info-cell {
    min-width: 200px;
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.item-sku {
    font-size: 12px;
    color: #888;
}

.item-qty-cell,
.item-cost-cell {
    width: 120px;
}

.item-total-cell {
    font-weight: 600;
    color: #333;
    text-align: right;
    white-space: nowrap;
}

.item-action-cell {
    width: 50px;
    text-align: center;
}

.cost-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cost-currency {
    color: #888;
    font-size: 14px;
}

.item-qty-input,
.item-cost-input {
    text-align: center;
    font-weight: 500;
}

.remove-item-btn {
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.remove-item-btn:hover {
    opacity: 1;
}

.item-row:hover .remove-item-btn {
    opacity: 1;
}

/* Empty State Animation */
.po-items-empty td {
    padding: 0 !important;
}

.empty-items-message {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.empty-items-message i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 12px;
}

.empty-items-message h6 {
    margin: 0 0 4px 0;
    color: #666;
}

.empty-items-message p {
    margin: 0;
    font-size: 13px;
}

/* Items Count Badge */
#items-count-badge {
    display: none;
    background: #F8BC32;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

/* PO Modal Scrollable Content - Ensures footer always visible */
.po-modal-enhanced .modal-body {
    max-height: none;
    overflow-y: auto;
    padding: 0;
    flex: 1 1 auto;
}

/* Make modal dialog fit better on screen at any zoom level */
#po-modal .modal-dialog {
    max-height: 95vh;
    margin: 1.5rem auto;
}

#po-modal .modal-content {
    max-height: calc(95vh - 3rem);
    display: flex;
    flex-direction: column;
}

/* Ensure form inside modal also uses flex layout for proper footer positioning */
#po-modal .modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#po-modal .modal-content form .modal-body {
    flex: 1;
    overflow-y: auto;
}

/* Totals Separator */
.po-totals-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #F8BC32, transparent);
    border-radius: 2px;
}

/* Variations Issues List in Modal */
.variations-issues-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.variation-issue-item {
    transition: background-color 0.2s ease;
}

.variation-issue-item:hover {
    background-color: #fff !important;
}

.variation-issue-item .variation-name {
    font-size: 14px;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.variation-issue-item .variation-status {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.variation-issue-item .badge {
    font-size: 11px;
    font-weight: 600;
}

#stockWarningModal .modal-dialog {
    max-width: 550px;
}

#stockWarningModal .modal-body {
    padding: 1.5rem;
}

/* ============================================
   Product Assignment UI for Supplier Modal
   ============================================ */
.product-assignment-container {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.product-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
}

.product-search-results .list-group-item {
    padding: 10px 15px;
    cursor: pointer;
    border-left: none;
    border-right: none;
}

.product-search-results .list-group-item:first-child {
    border-top: none;
}

.product-search-results .list-group-item:last-child {
    border-bottom: none;
}

.product-search-results .list-group-item.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.assigned-products-list {
    max-height: 200px;
    overflow-y: auto;
}

.assigned-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assigned-product-item {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 4px 10px 4px 4px;
    font-size: 13px;
    gap: 8px;
}

.assigned-product-item .product-thumb-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.assigned-product-item .product-thumb-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.assigned-product-item .product-thumb-small i {
    font-size: 14px;
    color: #adb5bd;
}

.assigned-product-item .product-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assigned-product-item .remove-product-btn {
    padding: 0 0 0 5px;
    margin: 0;
    line-height: 1;
}

.assigned-product-item .remove-product-btn:hover {
    color: #c82333 !important;
}

/* Supplier Form Website Field Icon */
.supplier-website-link {
    display: inline-flex;
    align-items: center;
    color: #0d6efd;
    text-decoration: none;
}

.supplier-website-link:hover {
    text-decoration: underline;
}

/* Payment Method Badge Styling */
.payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.payment-method-badge.paypal {
    background: #003087;
    color: #fff;
}

.payment-method-badge.alibaba {
    background: #ff6a00;
    color: #fff;
}

.payment-method-badge.bank_transfer {
    background: #198754;
    color: #fff;
}

.payment-method-badge.wise {
    background: #9fe870;
    color: #163300;
}

.payment-method-badge.western_union {
    background: #ffdd00;
    color: #000;
}

.payment-method-badge.credit_card {
    background: #6c757d;
    color: #fff;
}

.payment-method-badge.other {
    background: #6c757d;
    color: #fff;
}

/* ============================================
   Warehouse Supplier Dropdown
   ============================================ */
.supplier-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-dropdown-wrapper .supplier-select {
    min-width: 140px;
    max-width: 180px;
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
}

.supplier-dropdown-wrapper .supplier-save-indicator {
    font-size: 16px;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wh-col-supplier {
    min-width: 160px;
}
/* ============================================
   UNIFIED MODAL SYSTEM - Consistent Design
   ============================================ 
   
   Apply class "acom-modal" to modal-content for unified styling.
   Use with:
   - .acom-modal-header (inside modal-header)
   - .acom-modal-icon (icon container in header)
   - .acom-section (form sections)
   - .acom-section-header / .acom-section-body
   
   Color variants:
   - Default: Gold (#F8BC32)
   - .acom-modal--green: Green gradient
   - .acom-modal--blue: Blue gradient
   - .acom-modal--purple: Purple gradient
   - .acom-modal--red: Red/danger gradient
   - .acom-modal--dark: Dark slate gradient
   ============================================ */

/* Base Modal Container */
.acom-modal {
    border-radius: 16px !important;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Modal Header - Base */
.acom-modal .modal-header {
    background: linear-gradient(135deg, #fff 0%, #fefdf9 100%) !important;
    border-bottom: 3px solid #F8BC32 !important;
    padding: 16px 24px !important;
}

.acom-modal .modal-header .modal-title {
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    color: #1f2937 !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.acom-modal .modal-header .modal-title .modal-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 2px;
}

/* Modal Icon */
.acom-modal-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.3);
}

/* Modal Body */
.acom-modal .modal-body {
    padding: 0 !important;
    background: #fafbfc;
}

.acom-modal .modal-body.with-padding {
    padding: 24px !important;
}

/* Modal Footer */
.acom-modal .modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb !important;
    padding: 16px 24px !important;
}

/* Section Structure */
.acom-section {
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.acom-section:last-of-type {
    border-bottom: none;
}

.acom-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #f5f5f5;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #ebebeb;
}

.acom-section-header i {
    color: #F8BC32;
    font-size: 16px;
}

.acom-section-header .section-badge {
    margin-left: auto;
    background: #F8BC32;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.acom-section-body {
    padding: 20px 24px;
    background: white;
}

/* Form Enhancements */
.acom-modal .form-floating > label {
    color: #6b7280;
    font-size: 14px;
}

.acom-modal .form-label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}

.acom-modal .form-control,
.acom-modal .form-select {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.acom-modal .form-control:focus,
.acom-modal .form-select:focus {
    border-color: #F8BC32 !important;
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.15) !important;
}

.acom-modal .form-floating > .form-control:focus ~ label,
.acom-modal .form-floating > .form-select:focus ~ label {
    color: #F8BC32;
}

.acom-modal .form-text {
    font-size: 11px;
    color: #9ca3af;
}

/* Button Styles */
.acom-modal .btn-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.25);
}

.acom-modal .btn-primary:hover {
    background: linear-gradient(135deg, #e5a82a 0%, #d49a24 100%);
    box-shadow: 0 6px 16px rgba(248, 188, 50, 0.35);
}

.acom-modal .btn-secondary {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    font-weight: 500;
    border-radius: 8px;
}

.acom-modal .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Info/Tip Box */
.acom-info-box {
    padding: 12px 16px;
    background: #fffbeb;
    border-radius: 8px;
    border-left: 4px solid #F8BC32;
    font-size: 13px;
    color: #92400e;
}

.acom-info-box i {
    color: #F8BC32;
    margin-right: 8px;
}

/* Empty State */
.acom-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.acom-empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.acom-empty-state h6 {
    color: #6b7280;
    margin-bottom: 4px;
}

.acom-empty-state p {
    font-size: 13px;
    margin: 0;
}

/* Table in Modal */
.acom-modal .table {
    margin: 0;
}

.acom-modal .table thead th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 16px;
}

.acom-modal .table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.acom-modal .table tbody tr:last-child td {
    border-bottom: none;
}

.acom-modal .table tbody tr:hover {
    background: #fafbfc;
}

/* ---- Color Variants ---- */

/* Green Variant */
.acom-modal--green .modal-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border-bottom-color: #22c55e !important;
}

.acom-modal--green .acom-modal-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.acom-modal--green .acom-section-header i {
    color: #22c55e;
}

.acom-modal--green .acom-section-header .section-badge {
    background: #22c55e;
}

.acom-modal--green .form-control:focus,
.acom-modal--green .form-select:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
}

.acom-modal--green .btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

/* Blue Variant */
.acom-modal--blue .modal-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-bottom-color: #3b82f6 !important;
}

.acom-modal--blue .acom-modal-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.acom-modal--blue .acom-section-header i {
    color: #3b82f6;
}

.acom-modal--blue .acom-section-header .section-badge {
    background: #3b82f6;
}

.acom-modal--blue .form-control:focus,
.acom-modal--blue .form-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.acom-modal--blue .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Purple Variant */
.acom-modal--purple .modal-header {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
    border-bottom-color: #8b5cf6 !important;
}

.acom-modal--purple .acom-modal-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.acom-modal--purple .acom-section-header i {
    color: #8b5cf6;
}

.acom-modal--purple .acom-section-header .section-badge {
    background: #8b5cf6;
}

.acom-modal--purple .form-control:focus,
.acom-modal--purple .form-select:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}

.acom-modal--purple .btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* Red/Danger Variant */
.acom-modal--red .modal-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border-bottom-color: #ef4444 !important;
}

.acom-modal--red .acom-modal-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.acom-modal--red .acom-section-header i {
    color: #ef4444;
}

.acom-modal--red .acom-section-header .section-badge {
    background: #ef4444;
}

.acom-modal--red .form-control:focus,
.acom-modal--red .form-select:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.acom-modal--red .btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Dark Variant */
.acom-modal--dark .modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border-bottom-color: #475569 !important;
}

.acom-modal--dark .modal-header .modal-title {
    color: white !important;
}

.acom-modal--dark .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.acom-modal--dark .acom-modal-icon {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
}

.acom-modal--dark .acom-section-header i {
    color: #64748b;
}

.acom-modal--dark .acom-section-header .section-badge {
    background: #475569;
}

.acom-modal--dark .btn-primary {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

/* Loading State */
.acom-modal .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
}

.acom-modal .loading-state .spinner-border {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #F8BC32;
}

/* Step Progress Indicator (for multi-step modals) */
.acom-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    gap: 0;
}

.acom-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.acom-step.active {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.3);
}

.acom-step.active .acom-step-number {
    background: white;
    color: #F8BC32;
}

.acom-step.active .acom-step-label {
    color: white;
    font-weight: 600;
}

.acom-step.completed {
    background: #ecfdf5;
}

.acom-step.completed .acom-step-number {
    background: #10b981;
    color: white;
}

.acom-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.acom-step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.acom-step-connector {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
}

/* Tabs in Modal */
.acom-modal-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
}

.acom-modal-tab {
    padding: 12px 20px;
    font-weight: 500;
    font-size: 13px;
    color: #6b7280;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.acom-modal-tab:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.02);
}

.acom-modal-tab.active {
    color: #F8BC32;
    border-bottom-color: #F8BC32;
}

.acom-modal-tab i {
    margin-right: 6px;
}

/* KPI Cards in Modal */
.acom-modal-kpi {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.acom-modal-kpi .kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 10px;
}

.acom-modal-kpi .kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.acom-modal-kpi .kpi-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* ============================================
   GLOBAL YELLOW THEME OVERRIDE
   Apply yellow theme to all procurement/inventory buttons
   ============================================ */

/* Override Bootstrap btn-primary in procurement pages */
.procurement-container .btn-primary,
.procurement-dashboard .btn-primary,
.warehouse-view .btn-primary,
.warehouse-container .btn-primary,
.acom-modal .btn-primary,
.procurement-filters .btn-primary,
#supplier-modal .btn-primary,
#po-modal .btn-primary,
#receive-modal .btn-primary,
#payment-modal .btn-primary,
#document-upload-modal .btn-primary,
#create-shipment-prompt-modal .btn-primary,
#mergePosModal .btn-primary,
.shipments-container .btn-primary,
.cost-analytics-container .btn-primary,
.documents-center .btn-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(248, 188, 50, 0.25);
}

.procurement-container .btn-primary:hover,
.procurement-dashboard .btn-primary:hover,
.warehouse-view .btn-primary:hover,
.warehouse-container .btn-primary:hover,
.acom-modal .btn-primary:hover,
.procurement-filters .btn-primary:hover,
#supplier-modal .btn-primary:hover,
#po-modal .btn-primary:hover,
#receive-modal .btn-primary:hover,
#payment-modal .btn-primary:hover,
#document-upload-modal .btn-primary:hover,
#create-shipment-prompt-modal .btn-primary:hover,
#mergePosModal .btn-primary:hover,
.shipments-container .btn-primary:hover,
.cost-analytics-container .btn-primary:hover,
.documents-center .btn-primary:hover {
    background: linear-gradient(135deg, #e5a82a 0%, #d49a24 100%) !important;
    box-shadow: 0 6px 16px rgba(248, 188, 50, 0.35);
}

.procurement-container .btn-primary:focus,
.procurement-dashboard .btn-primary:focus,
.warehouse-view .btn-primary:focus,
.warehouse-container .btn-primary:focus,
.acom-modal .btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.25) !important;
}

/* Override btn-outline-primary to yellow */
.procurement-container .btn-outline-primary,
.procurement-dashboard .btn-outline-primary,
.warehouse-view .btn-outline-primary,
.warehouse-container .btn-outline-primary,
.shipments-container .btn-outline-primary,
.cost-analytics-container .btn-outline-primary,
.documents-center .btn-outline-primary {
    color: #F8BC32 !important;
    border-color: #F8BC32 !important;
    background: transparent !important;
}

.procurement-container .btn-outline-primary:hover,
.procurement-dashboard .btn-outline-primary:hover,
.warehouse-view .btn-outline-primary:hover,
.warehouse-container .btn-outline-primary:hover,
.shipments-container .btn-outline-primary:hover,
.cost-analytics-container .btn-outline-primary:hover,
.documents-center .btn-outline-primary:hover {
    background: #F8BC32 !important;
    color: white !important;
}

/* Override btn-info to yellow */
.procurement-container .btn-info,
.procurement-container .btn-outline-info,
.warehouse-view .btn-info,
.warehouse-view .btn-outline-info,
.warehouse-container .btn-info,
.warehouse-container .btn-outline-info {
    color: #F8BC32 !important;
    border-color: #F8BC32 !important;
    background: transparent !important;
}

.procurement-container .btn-info:hover,
.procurement-container .btn-outline-info:hover,
.warehouse-view .btn-info:hover,
.warehouse-view .btn-outline-info:hover,
.warehouse-container .btn-info:hover,
.warehouse-container .btn-outline-info:hover {
    background: #F8BC32 !important;
    color: white !important;
}

/* Table header accent */
.procurement-container table thead,
.warehouse-view table thead,
.warehouse-container table thead {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.procurement-container table thead th,
.warehouse-view table thead th,
.warehouse-container table thead th {
    border-bottom: 2px solid #F8BC32 !important;
}

/* Links in procurement pages */
.procurement-container a:not(.btn):not(.dropdown-item),
.warehouse-view a:not(.btn):not(.dropdown-item),
.warehouse-container a:not(.btn):not(.dropdown-item) {
    color: #d49a24;
}

.procurement-container a:not(.btn):not(.dropdown-item):hover,
.warehouse-view a:not(.btn):not(.dropdown-item):hover,
.warehouse-container a:not(.btn):not(.dropdown-item):hover {
    color: #F8BC32;
}

/* Info badges to yellow */
.procurement-container .badge.bg-info,
.warehouse-view .badge.bg-info,
.warehouse-container .badge.bg-info {
    background: #F8BC32 !important;
    color: white !important;
}

/* Accent borders */
.procurement-container .border-primary,
.warehouse-view .border-primary,
.warehouse-container .border-primary {
    border-color: #F8BC32 !important;
}

/* Progress bars */
.procurement-container .progress-bar,
.warehouse-view .progress-bar,
.warehouse-container .progress-bar {
    background: linear-gradient(90deg, #F8BC32, #e5a82a) !important;
}

/* Card accents */
.procurement-container .card-header,
.warehouse-view .card-header,
.warehouse-container .card-header {
    border-bottom: 2px solid #F8BC32;
}

/* Active nav items */
.procurement-container .nav-link.active,
.warehouse-view .nav-link.active,
.warehouse-container .nav-link.active {
    color: #F8BC32 !important;
    border-color: #F8BC32 !important;
}

/* ==========================================================================
   PROFIT CALCULATOR STYLES
   ========================================================================== */

/* Login Container */
.profit-calc-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.profit-calc-login-box {
    background: #fff;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.profit-calc-login-box .login-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.profit-calc-login-box h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.profit-calc-login-box .login-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.profit-calc-login-box .login-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.profit-calc-login-box .login-input-group input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.profit-calc-login-box .login-input-group input:focus {
    outline: none;
    border-color: #F8BC32;
}

.profit-calc-login-box .login-hint {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

/* Main Calculator Container */
.profit-calculator-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.profit-calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.profit-calc-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3a5f;
    font-size: 28px;
    margin: 0;
}

.profit-calc-header .header-actions {
    display: flex;
    gap: 10px;
}

.profit-calc-header .header-actions .btn,
.profit-calc-header .header-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
}

.profit-calc-header .header-actions .btn:hover,
.profit-calc-header .header-actions .button:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.profit-calc-header .header-actions .btn-primary,
.profit-calc-header .header-actions .button-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    border-color: #F8BC32;
    color: #fff;
}

.profit-calc-header .header-actions .btn-primary:hover,
.profit-calc-header .header-actions .button-primary:hover {
    background: linear-gradient(135deg, #e5a82a 0%, #d49a24 100%);
    border-color: #e5a82a;
}

.profit-calc-header .header-actions .btn-secondary,
.profit-calc-header .header-actions .button-secondary {
    background: #fff;
    border-color: #ef4444;
    color: #ef4444;
}

.profit-calc-header .header-actions .btn-secondary:hover,
.profit-calc-header .header-actions .button-secondary:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Calculator Grid */
.profit-calc-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    .profit-calc-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .profit-calc-container {
        grid-template-columns: 1fr;
    }
}

/* Section Cards */
.profit-calculator-wrap .calc-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.profit-calculator-wrap .calc-section h2 {
    color: #1e3a5f;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F8BC32;
}

.profit-calculator-wrap .calc-section h3 {
    color: #4a5568;
    font-size: 14px;
    margin: 15px 0 10px;
    font-weight: 600;
}

/* Input Row - for side by side inputs */
.profit-calculator-wrap .input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.profit-calculator-wrap .input-row .input-group {
    margin-bottom: 0;
}

.profit-calculator-wrap .input-group.half {
    flex: 1;
}

/* Input Groups */
.profit-calculator-wrap .input-group {
    margin-bottom: 15px;
}

.profit-calculator-wrap .input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.profit-calculator-wrap .input-group input[type="number"],
.profit-calculator-wrap .input-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profit-calculator-wrap .input-group input:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.1);
}

.profit-calculator-wrap .input-with-currency,
.profit-calculator-wrap .input-with-percent {
    position: relative;
}

.profit-calculator-wrap .input-with-currency .currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
}

.profit-calculator-wrap .input-with-currency input {
    padding-left: 35px;
}

.profit-calculator-wrap .input-with-percent .percent {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
}

.profit-calculator-wrap .input-with-percent input {
    padding-left: 35px;
    text-align: left;
}

/* Calculated Values */
.profit-calculator-wrap .input-group.calculated {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.profit-calculator-wrap .calculated-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Section Divider */
.profit-calculator-wrap .section-divider {
    border: none;
    border-top: 1px dashed #d1d5db;
    margin: 20px 0;
}

/* Custom Expenses */
.profit-calculator-wrap .custom-expenses-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.profit-calculator-wrap .custom-expense-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.profit-calculator-wrap .custom-expense-item input[type="text"] {
    flex: 1;
}

.profit-calculator-wrap .custom-expense-item input[type="number"] {
    width: 120px;
}

.profit-calculator-wrap .custom-expense-item .remove-expense-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add Expense Button */
.profit-calculator-wrap .btn-add-expense {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.profit-calculator-wrap .btn-add-expense:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.profit-calculator-wrap .btn-add-expense .btn-icon {
    font-size: 16px;
}

/* Expense Manager Link */
.profit-calculator-wrap .expense-manager-link {
    font-size: 16px;
    text-decoration: none;
    margin-right: 8px;
}

/* Results Section */
.profit-calculator-wrap .calc-results {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
}

.profit-calculator-wrap .calc-results h2 {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.profit-calculator-wrap .result-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.profit-calculator-wrap .result-card .result-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.profit-calculator-wrap .result-card .result-value {
    font-size: 20px;
    font-weight: 700;
}

.profit-calculator-wrap .result-card.roas {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
}

.profit-calculator-wrap .result-card.roas .result-value,
.profit-calculator-wrap .result-card.roas .result-label {
    color: #fff;
}

.profit-calculator-wrap .result-card.roas .result-value {
    font-size: 32px;
}

.profit-calculator-wrap .result-card.highlight {
    background: rgba(248, 188, 50, 0.3);
    border: 1px solid rgba(248, 188, 50, 0.5);
}

.profit-calculator-wrap .result-card.highlight .result-value,
.profit-calculator-wrap .result-card.highlight .result-label {
    color: #fff;
}

.profit-calculator-wrap .result-card.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.profit-calculator-wrap .result-card.success .result-value,
.profit-calculator-wrap .result-card.success .result-label {
    color: #fff;
}

.profit-calculator-wrap .result-card.cpa-target {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.profit-calculator-wrap .result-card.cpa-target .result-value,
.profit-calculator-wrap .result-card.cpa-target .result-label {
    color: #fff;
}

.profit-calculator-wrap .result-card.info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.profit-calculator-wrap .result-card.info .result-value,
.profit-calculator-wrap .result-card.info .result-label {
    color: #fff;
}

/* Summary Table */
.profit-calculator-wrap .summary-table-wrap {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.profit-calculator-wrap .summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.profit-calculator-wrap .summary-table th,
.profit-calculator-wrap .summary-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profit-calculator-wrap .summary-table th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
}

.profit-calculator-wrap .summary-table td {
    color: #fff;
}

.profit-calculator-wrap .summary-table .row-revenue {
    background: rgba(248, 188, 50, 0.2);
}

.profit-calculator-wrap .summary-table .row-revenue td {
    font-weight: 600;
    color: #F8BC32;
}

.profit-calculator-wrap .summary-table .row-expense td {
    color: rgba(255, 255, 255, 0.9);
}

.profit-calculator-wrap .summary-table .row-profit {
    background: rgba(16, 185, 129, 0.2);
}

.profit-calculator-wrap .summary-table .row-profit td {
    color: #10b981;
}

.profit-calculator-wrap .summary-table .row-profit-net {
    background: rgba(16, 185, 129, 0.3);
}

.profit-calculator-wrap .summary-table .row-profit-net td {
    color: #34d399;
}

.profit-calculator-wrap .summary-table .row-orders {
    background: rgba(59, 130, 246, 0.2);
}

.profit-calculator-wrap .summary-table .row-orders td {
    color: #60a5fa;
    font-weight: 600;
}

.profit-calculator-wrap .result-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

/* Actions */
.profit-calc-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.profit-calc-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
}

.profit-calc-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profit-calc-actions .btn-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    border-color: #F8BC32;
    color: #fff;
}

.profit-calc-actions .btn-primary:hover {
    background: linear-gradient(135deg, #e5a82a 0%, #d49a24 100%);
}

/* Scenario Comparison Section */
.scenario-comparison-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F8BC32;
}

.scenario-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e3a5f;
}

.scenario-actions {
    display: flex;
    gap: 10px;
}

.scenario-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: all 0.2s;
}

.scenario-actions .btn-add-scenario {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #fff;
}

.scenario-actions .btn-add-scenario:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.scenarios-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.scenarios-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
}

.scenario-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.scenario-card.active {
    border-color: #F8BC32;
    box-shadow: 0 4px 16px rgba(248, 188, 50, 0.3);
}

.scenario-card-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-card-header .scenario-name {
    font-weight: 600;
    font-size: 14px;
}

.scenario-header-actions {
    display: flex;
    gap: 6px;
}

.scenario-card-header .scenario-load,
.scenario-card-header .scenario-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.scenario-card-header .scenario-load:hover {
    background: rgba(16, 185, 129, 0.8);
}

.scenario-card-header .scenario-remove:hover {
    background: rgba(239, 68, 68, 0.8);
}

.scenario-card-body {
    padding: 15px;
}

.scenario-card-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.scenario-card-body table td {
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}

.scenario-card-body table td:first-child {
    color: #6b7280;
    width: 60px;
}

.scenario-card-body table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
}

.scenario-card-body table td.scenario-pct {
    text-align: left;
    font-size: 11px;
    color: #9ca3af;
    width: 50px;
}

.scenario-card-body table tr.expense-row td.scenario-pct {
    color: #ef4444;
}

.scenario-card-body .profit-pct {
    font-size: 12px;
    margin-top: 3px;
    opacity: 0.9;
}

.scenario-card-body .scenario-highlight {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    margin: -15px -15px 10px -15px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-card-body .scenario-highlight .label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
}

.scenario-card-body .scenario-highlight .value {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.scenario-card-body .scenario-profit {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.scenario-card-body .scenario-profit.positive {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.scenario-card-body .scenario-profit.negative {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.scenario-card-body .scenario-profit .profit-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 3px;
}

.scenario-card-body .scenario-profit .profit-value {
    font-size: 18px;
    font-weight: 700;
}

.scenario-card-body .scenario-profit.positive .profit-value {
    color: #10b981;
}

.scenario-card-body .scenario-profit.negative .profit-value {
    color: #ef4444;
}

/* Scenario Inline Edit Form */
.scenario-card.editing {
    border-color: #F8BC32;
    box-shadow: 0 4px 16px rgba(248, 188, 50, 0.3);
}

.scenario-edit-form {
    padding: 10px 0;
}

.scenario-edit-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.scenario-edit-row label {
    flex: 0 0 70px;
    font-size: 12px;
    color: #6b7280;
}

.scenario-edit-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
}

.scenario-edit-row input:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 2px rgba(248, 188, 50, 0.2);
}

.scenario-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.scenario-edit-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

.scenario-save-edit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    border-color: #10b981 !important;
}

/* Modal */
.profit-calc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.profit-calc-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profit-calc-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.profit-calc-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.profit-calc-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

.profit-calc-modal .modal-body {
    padding: 25px;
}

/* Integrated Expenses */
.profit-calculator-wrap .integrated-expenses-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border-radius: 8px;
    border-top: 2px solid #F8BC32;
}

.profit-calculator-wrap .integrated-expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
}

.profit-calculator-wrap .integrated-expense-item.total {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
    margin-top: 12px;
}

.profit-calculator-wrap .integrated-expense-item.total .expense-label,
.profit-calculator-wrap .integrated-expense-item.total .expense-value {
    color: #fff;
    font-weight: 700;
}

/* Positive/Negative values */
.profit-calculator-wrap .positive {
    color: #10b981 !important;
}

.profit-calculator-wrap .negative {
    color: #ef4444 !important;
}

/* ==========================================================================
   EXPENSE MANAGER STYLES
   ========================================================================== */

/* Header */
.expense-manager-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.expense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.expense-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3a5f;
    font-size: 28px;
    margin: 0;
}

/* Header Search Box - Manual Search Input */
.expense-header .header-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.expense-header .header-manual-search-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.expense-header .header-manual-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.expense-header .header-manual-search-input::placeholder {
    color: #9ca3af;
}

.expense-header #header-search-btn {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expense-header #header-search-btn .dashicons {
    margin: 0;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.expense-header .header-actions {
    display: flex;
    gap: 10px;
}

/* Summary Cards */
.expense-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 1200px) {
    .expense-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .expense-summary-cards {
        grid-template-columns: 1fr;
    }
}

.expense-manager-wrap .summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.expense-manager-wrap .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.expense-manager-wrap .summary-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.expense-manager-wrap .summary-card.total-monthly .card-icon {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a82a 100%);
}

.expense-manager-wrap .summary-card.total-salaries .card-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.expense-manager-wrap .summary-card.total-subscriptions .card-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.expense-manager-wrap .summary-card.total-other .card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.expense-manager-wrap .summary-card .card-content {
    flex: 1;
}

.expense-manager-wrap .summary-card .card-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.expense-manager-wrap .summary-card .card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Filters */
.expense-filters {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.expense-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.expense-filters .filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.expense-filters .filter-group select,
.expense-filters .filter-group input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

/* Table */
.expense-table-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.expense-table {
    width: 100%;
    border-collapse: collapse;
}

.expense-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    padding: 15px 12px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-align: right;
}

.expense-table tbody td {
    padding: 15px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.expense-table tbody tr:hover {
    background: #f8fafc;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.category-badge.subscription { background: #dbeafe; color: #1e40af; }
.category-badge.salary { background: #d1fae5; color: #065f46; }
.category-badge.rent { background: #fef3c7; color: #92400e; }
.category-badge.utilities { background: #e0e7ff; color: #3730a3; }
.category-badge.marketing { background: #fce7f3; color: #9d174d; }
.category-badge.insurance { background: #cffafe; color: #0e7490; }
.category-badge.accounting { background: #f3e8ff; color: #6b21a8; }
.category-badge.legal { background: #fef9c3; color: #854d0e; }
.category-badge.office { background: #f1f5f9; color: #475569; }
.category-badge.travel { background: #ffedd5; color: #9a3412; }
.category-badge.other { background: #f3f4f6; color: #4b5563; }

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active { background: #d1fae5; color: #065f46; }
.status-badge.inactive, .status-badge.expired { background: #fee2e2; color: #991b1b; }

/* Frequency badge */
.frequency-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #f3f4f6;
    color: #4b5563;
}

.frequency-badge.one_time { background: #fef3c7; color: #92400e; }

/* Actions */
.expense-actions {
    display: flex;
    gap: 5px;
}

.expense-actions .btn-action {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expense-actions .btn-action:hover { background: #f3f4f6; }
.expense-actions .btn-action.btn-edit:hover { background: #dbeafe; border-color: #3b82f6; color: #3b82f6; }
.expense-actions .btn-action.btn-delete:hover { background: #fee2e2; border-color: #ef4444; color: #ef4444; }

/* Modal */
.expense-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    padding: 20px;
}

.expense-modal .modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.expense-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.expense-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e3a5f;
}

.expense-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

.expense-modal .modal-body {
    padding: 25px;
}

/* Form */
.expense-modal .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.expense-modal .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.expense-modal .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.expense-modal .form-group input,
.expense-modal .form-group select,
.expense-modal .form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.expense-modal .form-group input:focus,
.expense-modal .form-group select:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 3px rgba(248, 188, 50, 0.1);
}

.expense-modal .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .expense-header,
    .profit-calc-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .expense-header .header-search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
    
    .expense-modal .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* ==========================================================================
   SALES ANALYTICS PRO STYLES
   ========================================================================== */

.sa-wrap {
    --sa-primary: #F8BC32;
    --sa-primary-hover: #e5a820;
    --sa-primary-light: #fef7e6;
    --sa-success: #10b981;
    --sa-success-light: #d1fae5;
    --sa-warning: #f59e0b;
    --sa-warning-light: #fef3c7;
    --sa-danger: #ef4444;
    --sa-danger-light: #fee2e2;
    --sa-info: #3b82f6;
    --sa-info-light: #dbeafe;
    --sa-gray-50: #f9fafb;
    --sa-gray-100: #f3f4f6;
    --sa-gray-200: #e5e7eb;
    --sa-gray-300: #d1d5db;
    --sa-gray-400: #9ca3af;
    --sa-gray-500: #6b7280;
    --sa-gray-600: #4b5563;
    --sa-gray-700: #374151;
    --sa-gray-800: #1f2937;
    --sa-gray-900: #111827;
    --sa-radius: 12px;
    --sa-radius-sm: 8px;
    --sa-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --sa-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --sa-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --sa-transition: all 0.2s ease;
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--sa-gray-800);
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.sa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.sa-header__main {
    flex: 1;
}

.sa-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--sa-gray-900);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sa-title__icon {
    font-size: 32px;
}

.sa-description {
    color: var(--sa-gray-500);
    font-size: 14px;
    margin: 0;
    max-width: 500px;
}

.sa-description b {
    color: var(--sa-gray-700);
}

.sa-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sa-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--sa-gray-100);
    color: var(--sa-gray-600);
}

.sa-badge--primary {
    background: var(--sa-primary);
    color: #fff;
}

.sa-badge--success {
    background: var(--sa-success);
    color: #fff;
}

.sa-badge--info {
    background: var(--sa-info);
    color: #fff;
}

.sa-filters {
    background: white;
    border-radius: var(--sa-radius);
    box-shadow: var(--sa-shadow);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--sa-gray-200);
}

.sa-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.sa-filters__row--secondary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--sa-gray-100);
}

.sa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.sa-field--wide {
    min-width: 280px;
    flex: 1;
}

.sa-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sa-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sa-select,
.sa-input {
    padding: 10px 14px;
    border: 1px solid var(--sa-gray-300);
    border-radius: var(--sa-radius-sm);
    font-size: 14px;
    background: white;
    color: var(--sa-gray-800);
    transition: var(--sa-transition);
    appearance: none;
    cursor: pointer;
}

.sa-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 36px;
}

.sa-select:focus,
.sa-input:focus {
    outline: none;
    border-color: var(--sa-primary);
    box-shadow: 0 0 0 3px var(--sa-primary-light);
}

.sa-select[multiple] {
    background-image: none;
    padding: 8px;
    min-height: 100px;
}

.sa-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sa-to {
    color: var(--sa-gray-400);
    font-size: 14px;
}

.sa-help {
    font-size: 11px;
    color: var(--sa-gray-400);
    margin-top: 2px;
}

.sa-dates {
    display: none;
}

.sa-actions {
    display: flex;
    flex-direction: row !important;
    gap: 8px !important;
    margin-left: auto;
}

.sa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--sa-radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--sa-transition);
    white-space: nowrap;
}

.sa-btn__icon {
    font-size: 16px;
}

.sa-btn--primary {
    background: var(--sa-primary);
    color: white;
}

.sa-btn--primary:hover {
    background: var(--sa-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--sa-shadow-md);
}

.sa-btn--secondary {
    background: var(--sa-gray-100);
    color: var(--sa-gray-700);
    border: 1px solid var(--sa-gray-200);
}

.sa-btn--secondary:hover {
    background: var(--sa-gray-200);
}

.sa-btn--ghost {
    background: transparent;
    color: var(--sa-gray-500);
    padding: 8px;
}

.sa-btn--ghost:hover {
    background: var(--sa-gray-100);
    color: var(--sa-gray-700);
}

.sa-card {
    background: white;
    border-radius: var(--sa-radius);
    box-shadow: var(--sa-shadow);
    margin-bottom: 24px;
    border: 1px solid var(--sa-gray-200);
    overflow: hidden;
}

.sa-card__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sa-gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sa-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--sa-gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sa-card__sub {
    font-size: 13px;
    color: var(--sa-gray-500);
}

.sa-card__body {
    padding: 20px;
}

.sa-canvas-wrap {
    position: relative;
    max-height: 400px;
}

.sa-period-hint {
    font-size: 13px;
    color: var(--sa-gray-500);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--sa-gray-50);
    border-radius: var(--sa-radius-sm);
    border: 1px solid var(--sa-gray-100);
}

.sa-period-hint:empty {
    display: none;
}

.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sa-table th,
.sa-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--sa-gray-100);
}

.sa-table th {
    background: var(--sa-gray-50);
    font-weight: 600;
    color: var(--sa-gray-600);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sa-table tbody tr:hover {
    background: var(--sa-gray-50);
}

.sa-table tbody tr:last-child td {
    border-bottom: none;
}

.sa-up {
    color: var(--sa-success);
}

.sa-down {
    color: var(--sa-danger);
}

.sa-flat {
    color: var(--sa-gray-400);
}

.sa-drill__row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sa-drill__hint {
    font-size: 13px;
    color: var(--sa-gray-500);
}

.sa-orders {
    width: 100%;
    font-size: 13px;
}

.sa-orders th,
.sa-orders td {
    padding: 12px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--sa-gray-100);
}

.sa-orders th {
    background: var(--sa-gray-50);
    font-weight: 600;
    color: var(--sa-gray-600);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sa-orders tbody tr:hover {
    background: var(--sa-gray-50);
}

.sa-order-remake {
    background: var(--sa-warning-light) !important;
}

.sa-order-remake:hover {
    background: #fde68a !important;
}

.sa-item {
    padding: 8px 0;
    border-bottom: 1px dashed var(--sa-gray-200);
}

.sa-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sa-item:first-child {
    padding-top: 0;
}

.sa-item-main {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 4px;
}

.sa-item-name {
    font-weight: 500;
    color: var(--sa-gray-800);
}

.sa-item-qty {
    color: var(--sa-gray-500);
    font-size: 12px;
}

.sa-item-line {
    color: var(--sa-success);
    font-weight: 500;
    margin-left: auto;
}

.sa-item-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--sa-gray-500);
}

.sa-item-meta b {
    color: var(--sa-gray-600);
}

.sa-remake-stats {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--sa-warning-light) 0%, #fff7ed 100%);
    border-radius: var(--sa-radius-sm);
    margin-bottom: 16px;
    border: 1px solid #fdba74;
}

.sa-remake-stats--ok {
    background: linear-gradient(135deg, var(--sa-success-light) 0%, #ecfdf5 100%);
    border-color: #6ee7b7;
}

.sa-remake-stats__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sa-remake-stats__label {
    font-size: 11px;
    color: var(--sa-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sa-remake-stats__value {
    font-size: 18px;
    font-weight: 600;
    color: var(--sa-gray-800);
}

.sa-remake-stats__pct {
    color: var(--sa-warning);
}

.sa-remake-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--sa-warning);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 8px;
}

.sa-remake-high {
    color: var(--sa-danger);
    font-weight: 600;
}

.sa-remake-warn {
    color: var(--sa-warning);
    font-weight: 500;
}

.sa-remake-ok {
    color: var(--sa-success);
}

.sa-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sa-modal__panel {
    position: relative;
    background: white;
    border-radius: var(--sa-radius);
    box-shadow: var(--sa-shadow-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sa-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sa-gray-100);
}

.sa-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sa-gray-800);
}

.sa-modal__body {
    padding: 20px;
    overflow-y: auto;
}

.sa-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .sa-grid2 {
        grid-template-columns: 1fr;
    }
}

.sa-h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--sa-gray-800);
    margin: 0 0 16px 0;
}

.sa-formrow {
    margin-bottom: 16px;
}

.sa-formrow .sa-input {
    width: 100%;
}

.sa-termgrid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--sa-gray-200);
    border-radius: var(--sa-radius-sm);
    background: var(--sa-gray-50);
}

.sa-termchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--sa-gray-200);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--sa-transition);
}

.sa-termchip:hover {
    border-color: var(--sa-primary);
    background: var(--sa-primary-light);
}

.sa-termchip input {
    accent-color: var(--sa-primary);
}

.sa-termchip input:checked + span {
    color: var(--sa-primary);
    font-weight: 500;
}

.sa-msg {
    margin-top: 12px;
    font-size: 13px;
    color: var(--sa-success);
}

.sa-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sa-groupcard {
    background: var(--sa-gray-50);
    border: 1px solid var(--sa-gray-200);
    border-radius: var(--sa-radius-sm);
    padding: 12px 16px;
    transition: var(--sa-transition);
}

.sa-groupcard:hover {
    border-color: var(--sa-gray-300);
    box-shadow: var(--sa-shadow);
}

.sa-groupcard__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sa-groupcard__name {
    font-weight: 600;
    color: var(--sa-gray-800);
    margin-bottom: 4px;
}

.sa-groupcard__terms {
    font-size: 12px;
    color: var(--sa-gray-500);
}

.sa-group-actions {
    display: flex;
    gap: 8px;
}

.sa-group-actions .sa-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.sa-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--sa-gray-800);
    color: white;
    border-radius: var(--sa-radius-sm);
    box-shadow: var(--sa-shadow-lg);
    font-size: 14px;
    z-index: 100001;
    animation: sa-slideIn 0.3s ease;
}

.sa-toast--error {
    background: var(--sa-danger);
}

.sa-toast--success {
    background: var(--sa-success);
}

@keyframes sa-slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sa-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--sa-gray-500);
    font-size: 14px;
}

.sa-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--sa-gray-200);
    border-top-color: var(--sa-primary);
    border-radius: 50%;
    margin-right: 12px;
    animation: sa-spin 0.8s linear infinite;
}

@keyframes sa-spin {
    to { transform: rotate(360deg); }
}

.sa-empty {
    text-align: center;
    padding: 40px;
    color: var(--sa-gray-500);
    font-size: 14px;
}

.sa-warn {
    padding: 12px 16px;
    background: var(--sa-warning-light);
    border: 1px solid #fcd34d;
    border-radius: var(--sa-radius-sm);
    color: var(--sa-gray-700);
    font-size: 13px;
    margin-bottom: 16px;
}

.sa-notice {
    padding: 14px 18px;
    border-radius: var(--sa-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.sa-notice--error {
    background: var(--sa-danger-light);
    border: 1px solid var(--sa-danger);
    color: var(--sa-danger);
}

.sa-notice--warning {
    background: var(--sa-warning-light);
    border: 1px solid var(--sa-warning);
    color: #92400e;
}

@media (max-width: 1024px) {
    .sa-wrap {
        padding: 16px;
    }
    
    .sa-filters__row {
        gap: 12px;
    }
    
    .sa-field {
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .sa-header {
        flex-direction: column;
    }
    
    .sa-badges {
        order: -1;
    }
    
    .sa-filters__row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sa-field {
        width: 100%;
    }
    
    .sa-actions {
        flex-direction: column !important;
        width: 100%;
    }
    
    .sa-actions .sa-btn {
        width: 100%;
    }
    
    .sa-orders th:nth-child(n+5),
    .sa-orders td:nth-child(n+5) {
        display: none;
    }
}

/* ============================================
   B2B CRM STYLES
   ============================================ */

:root {
    --b2b-primary: #3b82f6;
    --b2b-primary-dark: #2563eb;
    --b2b-secondary: #6b7280;
    --b2b-success: #10b981;
    --b2b-warning: #f59e0b;
    --b2b-danger: #ef4444;
    --b2b-info: #06b6d4;
    --b2b-light: #f3f4f6;
    --b2b-dark: #1f2937;
    --b2b-white: #ffffff;
    --b2b-gray-50: #f9fafb;
    --b2b-gray-100: #f3f4f6;
    --b2b-gray-200: #e5e7eb;
    --b2b-gray-300: #d1d5db;
    --b2b-gray-400: #9ca3af;
    --b2b-gray-500: #6b7280;
    --b2b-gray-600: #4b5563;
    --b2b-gray-700: #374151;
    --b2b-gray-800: #1f2937;
    --b2b-radius: 8px;
    --b2b-radius-lg: 12px;
    --b2b-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --b2b-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --b2b-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.b2b-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--b2b-gray-50);
    min-height: 100vh;
}

/* Header */
.b2b-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.b2b-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--b2b-dark);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.b2b-title__icon {
    font-size: 32px;
}

.b2b-description {
    color: var(--b2b-gray-500);
    margin: 0;
    font-size: 14px;
}

.b2b-header__actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.b2b-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--b2b-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.b2b-btn--primary {
    background: var(--b2b-primary);
    color: var(--b2b-white);
}

.b2b-btn--primary:hover {
    background: var(--b2b-primary-dark);
}

.b2b-btn--secondary {
    background: var(--b2b-gray-200);
    color: var(--b2b-gray-700);
}

.b2b-btn--secondary:hover {
    background: var(--b2b-gray-300);
}

.b2b-btn--ghost {
    background: transparent;
    color: var(--b2b-gray-600);
}

.b2b-btn--ghost:hover {
    background: var(--b2b-gray-100);
}

.b2b-btn--danger {
    background: var(--b2b-danger);
    color: var(--b2b-white);
}

.b2b-btn--danger:hover {
    background: #dc2626;
}

.b2b-btn--sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Stats Dashboard */
.b2b-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.b2b-stat {
    background: var(--b2b-white);
    padding: 20px;
    border-radius: var(--b2b-radius-lg);
    box-shadow: var(--b2b-shadow);
    text-align: center;
}

.b2b-stat__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--b2b-dark);
    margin-bottom: 4px;
}

.b2b-stat__label {
    font-size: 13px;
    color: var(--b2b-gray-500);
}

/* View Toggle */
.b2b-view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.b2b-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--b2b-gray-300);
    background: var(--b2b-white);
    border-radius: var(--b2b-radius);
    font-size: 13px;
    cursor: pointer;
    color: var(--b2b-gray-600);
    transition: all 0.2s;
}

.b2b-view-btn.active {
    background: var(--b2b-primary);
    color: var(--b2b-white);
    border-color: var(--b2b-primary);
}

/* Filters */
.b2b-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.b2b-filter label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--b2b-gray-600);
    margin-bottom: 4px;
}

.b2b-input,
.b2b-select,
.b2b-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--b2b-gray-300);
    border-radius: var(--b2b-radius);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.b2b-input:focus,
.b2b-select:focus,
.b2b-textarea:focus {
    outline: none;
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.b2b-select {
    min-width: 180px;
}

/* Pipeline Kanban */
.b2b-pipeline {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 500px;
}

.b2b-pipeline__column {
    flex: 0 0 280px;
    min-width: 280px;
    background: var(--b2b-gray-100);
    border-radius: var(--b2b-radius-lg);
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.b2b-pipeline__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
    background: var(--b2b-white);
    border-radius: var(--b2b-radius);
    border-top: 3px solid;
}

.b2b-pipeline__title {
    font-weight: 600;
    font-size: 14px;
    color: var(--b2b-dark);
}

.b2b-pipeline__count {
    background: var(--b2b-gray-200);
    color: var(--b2b-gray-600);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.b2b-pipeline__cards {
    flex: 1;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Client Cards */
.b2b-card {
    background: var(--b2b-white);
    border-radius: var(--b2b-radius);
    padding: 14px;
    box-shadow: var(--b2b-shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.b2b-card:hover {
    box-shadow: var(--b2b-shadow-md);
    transform: translateY(-2px);
}

.b2b-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.b2b-card__company {
    font-weight: 600;
    font-size: 14px;
    color: var(--b2b-dark);
    line-height: 1.3;
}

.b2b-card__number {
    display: inline-block;
    background: var(--b2b-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

.b2b-card__priority {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
}

.b2b-card__contact {
    font-size: 12px;
    color: var(--b2b-gray-500);
    margin-bottom: 6px;
}

.b2b-card__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-success);
    margin-bottom: 6px;
}

.b2b-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.b2b-tag {
    background: var(--b2b-gray-100);
    color: var(--b2b-gray-600);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.b2b-card__follow-up {
    font-size: 11px;
    color: var(--b2b-warning);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--b2b-gray-100);
}

.b2b-card-placeholder {
    background: var(--b2b-gray-200);
    border: 2px dashed var(--b2b-gray-300);
    border-radius: var(--b2b-radius);
    min-height: 80px;
    margin-bottom: 10px;
}

.b2b-card.ui-sortable-helper {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: rotate(2deg);
    z-index: 9999;
    cursor: grabbing !important;
}

.b2b-pipeline__cards {
    min-height: 100px;
}

/* List View Table */
.b2b-list-view {
    background: var(--b2b-white);
    border-radius: var(--b2b-radius-lg);
    box-shadow: var(--b2b-shadow);
    overflow: hidden;
}

.b2b-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.b2b-table th {
    background: var(--b2b-gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--b2b-gray-700);
    border-bottom: 1px solid var(--b2b-gray-200);
}

.b2b-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--b2b-gray-100);
    color: var(--b2b-gray-600);
}

.b2b-table tr:hover td {
    background: var(--b2b-gray-50);
}

.b2b-table__empty {
    text-align: center;
    color: var(--b2b-gray-400);
    padding: 40px !important;
}

/* Badges */
.b2b-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--b2b-white);
}

.b2b-badge--lg {
    padding: 6px 14px;
    font-size: 13px;
}

.b2b-priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--b2b-white);
}

/* Modals */
.b2b-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-modal__panel {
    position: relative;
    background: var(--b2b-white);
    border-radius: var(--b2b-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--b2b-shadow-lg);
}

.b2b-modal__panel--large {
    max-width: 700px;
}

.b2b-modal__panel--xlarge {
    max-width: 1000px;
}

.b2b-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--b2b-gray-200);
}

.b2b-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--b2b-dark);
    margin: 0;
}

.b2b-modal__close {
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px !important;
}

.b2b-modal__body {
    padding: 20px;
}

.b2b-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--b2b-gray-200);
}

/* Form Grid */
.b2b-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.b2b-form-section {
    padding: 16px;
    background: var(--b2b-gray-50);
    border-radius: var(--b2b-radius);
}

.b2b-form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-gray-700);
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--b2b-gray-200);
}

.b2b-form-row {
    margin-bottom: 14px;
}

.b2b-form-row:last-child {
    margin-bottom: 0;
}

.b2b-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--b2b-gray-600);
    margin-bottom: 4px;
}

.b2b-form-row label .required {
    color: var(--b2b-danger);
}

.b2b-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Detail Modal */
.b2b-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.b2b-detail-section {
    margin-bottom: 20px;
}

.b2b-detail-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--b2b-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.b2b-detail-section p {
    margin: 6px 0;
    font-size: 14px;
    color: var(--b2b-gray-700);
}

.b2b-detail-section a {
    color: var(--b2b-primary);
    text-decoration: none;
}

.b2b-detail-section a:hover {
    text-decoration: underline;
}

.b2b-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.b2b-status-dropdown-wrapper {
    position: relative;
}

.b2b-status-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 32px 8px 14px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s;
    min-width: 120px;
}

.b2b-status-select:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.b2b-status-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.b2b-status-select option {
    background: white;
    color: var(--b2b-dark);
    padding: 8px;
}

.b2b-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--b2b-success);
}

.b2b-detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.b2b-detail-notes {
    background: var(--b2b-gray-50);
    padding: 12px;
    border-radius: var(--b2b-radius);
    font-size: 14px;
    color: var(--b2b-gray-700);
    white-space: pre-wrap;
}

.b2b-follow-up-alert {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    border-radius: var(--b2b-radius);
    font-size: 14px;
}

/* Activities */
.b2b-detail-activities {
    background: var(--b2b-gray-50);
    padding: 16px;
    border-radius: var(--b2b-radius);
}

.b2b-activities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.b2b-activities-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--b2b-dark);
    margin: 0;
}

.b2b-activities-list {
    max-height: 400px;
    overflow-y: auto;
}

.b2b-activities-empty {
    text-align: center;
    color: var(--b2b-gray-400);
    padding: 30px;
}

.b2b-activity {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--b2b-gray-200);
}

.b2b-activity:last-child {
    border-bottom: none;
}

.b2b-activity__icon {
    font-size: 18px;
    flex-shrink: 0;
}

.b2b-activity__content {
    flex: 1;
}

.b2b-activity__title {
    font-weight: 500;
    font-size: 14px;
    color: var(--b2b-dark);
    margin-bottom: 4px;
}

.b2b-activity__desc {
    font-size: 13px;
    color: var(--b2b-gray-600);
    margin-bottom: 4px;
}

.b2b-activity__meta {
    font-size: 12px;
    color: var(--b2b-gray-400);
}

/* Pipeline Manager */
.b2b-pipeline-manager {
    margin-bottom: 24px;
}

.b2b-stages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.b2b-stage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--b2b-gray-50);
    border-radius: var(--b2b-radius);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.b2b-stage-item--modified {
    background: #fff8e6;
    border-left-color: #F8BC32;
}

.b2b-stage-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.b2b-stage-color-input {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    background: transparent;
}

.b2b-stage-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.b2b-stage-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.b2b-stage-name {
    font-weight: 500;
    flex: 1;
}

.b2b-stage-name-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--b2b-gray-200);
    border-radius: var(--b2b-radius);
    font-size: 14px;
    font-weight: 500;
    background: var(--b2b-white);
    transition: border-color 0.2s;
}

.b2b-stage-name-input:hover {
    border-color: var(--b2b-gray-300);
}

.b2b-stage-name-input:focus {
    outline: none;
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.b2b-stage-key {
    font-size: 12px;
    color: var(--b2b-gray-400);
}

/* Stage Order Move Buttons */
.b2b-stage-order-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 4px;
}

.b2b-move-btn {
    padding: 2px 6px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    min-width: 24px;
    background: var(--b2b-gray-100) !important;
    border: 1px solid var(--b2b-gray-200) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.b2b-move-btn:hover:not(:disabled) {
    background: var(--b2b-gray-200) !important;
    border-color: var(--b2b-gray-300) !important;
}

.b2b-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.b2b-pipeline-add {
    padding: 16px;
    background: var(--b2b-gray-50);
    border-radius: var(--b2b-radius);
}

.b2b-pipeline-add h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
}

/* Toast */
.b2b-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--b2b-radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: var(--b2b-shadow-lg);
}

.b2b-toast--success {
    background: var(--b2b-success);
    color: var(--b2b-white);
}

.b2b-toast--error {
    background: var(--b2b-danger);
    color: var(--b2b-white);
}

/* ============================================
   ENHANCED CRM STYLES - Quotes, Contacts, etc.
   ============================================ */

/* Enhanced Stats Grid */
.b2b-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.b2b-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.b2b-stats-row--secondary {
    grid-template-columns: repeat(4, 1fr);
}

.b2b-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--b2b-white);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
}

.b2b-stat--small {
    padding: 14px;
}

.b2b-stat--small .b2b-stat__icon {
    font-size: 20px;
}

.b2b-stat--small .b2b-stat__value {
    font-size: 18px;
}

.b2b-stat__icon {
    font-size: 28px;
}

.b2b-stat__content {
    flex: 1;
}

.b2b-stat__sub {
    font-size: 11px;
    color: var(--b2b-gray-500);
    margin-top: 2px;
}

.b2b-stat--primary {
    border-left: 4px solid var(--b2b-primary);
}

.b2b-stat--info {
    border-left: 4px solid #3b82f6;
}

.b2b-stat--warning {
    border-left: 4px solid var(--b2b-warning);
}

.b2b-stat--success {
    border-left: 4px solid var(--b2b-success);
}

.b2b-stat--purple {
    border-left: 4px solid #8b5cf6;
}

/* Button Variants */
.b2b-btn--success {
    background: var(--b2b-success);
    color: var(--b2b-white);
}

.b2b-btn--success:hover {
    background: #0d9668;
}

.b2b-btn--whatsapp {
    background: #25D366;
    color: var(--b2b-white);
}

.b2b-btn--whatsapp:hover {
    background: #128C7E;
}

.b2b-btn--info {
    background: #3b82f6;
    color: var(--b2b-white);
}

.b2b-btn--info:hover {
    background: #2563eb;
}

/* Lead Score Picker */
.b2b-lead-score {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.b2b-score-btn {
    padding: 6px 10px;
    background: var(--b2b-gray-100);
    border: 2px solid transparent;
    border-radius: var(--b2b-radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.b2b-score-btn:hover,
.b2b-score-btn.active {
    background: #fef3c7;
    border-color: #f59e0b;
}

.b2b-lead-score-display {
    font-size: 14px;
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: var(--b2b-radius);
}

/* Card Stars */
.b2b-card__stars {
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

/* Quick Actions */
.b2b-quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--b2b-gray-200);
}

.b2b-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--b2b-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.b2b-quick-btn--call {
    background: #dcfce7;
    color: #15803d;
}

.b2b-quick-btn--call:hover {
    background: #bbf7d0;
}

.b2b-quick-btn--email {
    background: #dbeafe;
    color: #1d4ed8;
}

.b2b-quick-btn--email:hover {
    background: #bfdbfe;
}

.b2b-quick-btn--whatsapp {
    background: #d1fae5;
    color: #047857;
}

.b2b-quick-btn--whatsapp:hover {
    background: #a7f3d0;
}

.b2b-quick-btn--wati {
    background: #25D366;
    color: #ffffff;
}

.b2b-quick-btn--wati:hover {
    background: #128C7E;
    color: #ffffff;
}

.b2b-quick-btn--website {
    background: #f3e8ff;
    color: #7c3aed;
}

.b2b-quick-btn--website:hover {
    background: #e9d5ff;
}

/* Tabs */
.b2b-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--b2b-gray-200);
    padding-bottom: 0;
}

.b2b-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--b2b-gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.b2b-tab:hover {
    color: var(--b2b-primary);
}

.b2b-tab.active {
    color: var(--b2b-primary);
    border-bottom-color: var(--b2b-primary);
}

.b2b-tab-content {
    display: none;
}

.b2b-tab-content.active {
    display: block;
}

.b2b-detail-panel {
    background: var(--b2b-gray-50);
    padding: 16px;
    border-radius: var(--b2b-radius);
}

/* Modal Header Actions */
.b2b-modal__header-actions {
    display: flex;
    gap: 8px;
    margin-right: auto;
    margin-left: 20px;
}

/* Quote Builder */
.b2b-quote-header-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.b2b-product-search {
    margin-bottom: 16px;
    position: relative;
}

.b2b-search-box {
    position: relative;
}

.b2b-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--b2b-white);
    border: 1px solid var(--b2b-gray-200);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}

.b2b-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.b2b-search-item:hover {
    background: var(--b2b-gray-50);
}

.b2b-search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.b2b-search-item .no-image {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--b2b-gray-100);
    border-radius: 4px;
    font-size: 18px;
}

.b2b-search-item__info {
    flex: 1;
}

.b2b-search-item__name {
    font-weight: 500;
    font-size: 14px;
}

.b2b-search-item__meta {
    font-size: 12px;
    color: var(--b2b-gray-500);
}

.b2b-search-empty {
    padding: 20px;
    text-align: center;
    color: var(--b2b-gray-500);
}

/* Quote Items Table */
.b2b-table--items {
    margin-bottom: 16px;
}

.b2b-table--items th {
    background: var(--b2b-gray-100);
    font-size: 12px;
    padding: 8px 10px;
}

.b2b-table--items td {
    padding: 10px;
    vertical-align: top;
}

.b2b-table--items .b2b-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
}

.b2b-table--items .b2b-input--sm {
    margin-top: 4px;
    font-size: 11px;
    color: var(--b2b-gray-500);
}

.b2b-table--items .item-total {
    font-weight: 600;
    font-size: 14px;
}

/* Quote Totals */
.b2b-quote-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 16px;
    background: var(--b2b-gray-50);
    border-radius: var(--b2b-radius);
    margin-bottom: 16px;
}

.b2b-totals-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.b2b-totals-row span:first-child {
    min-width: 100px;
    text-align: right;
    color: var(--b2b-gray-600);
}

.b2b-totals-row span:last-child {
    min-width: 120px;
    text-align: right;
    font-weight: 500;
}

.b2b-discount-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.b2b-discount-input input {
    width: 60px;
    padding: 4px 8px;
    text-align: right;
}

.b2b-totals-row--grand {
    font-size: 18px;
    padding-top: 12px;
    border-top: 2px solid var(--b2b-gray-300);
    margin-top: 8px;
}

.b2b-totals-row--grand span:last-child {
    color: var(--b2b-success);
    font-weight: 700;
}

.b2b-quote-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Quote Cards */
.b2b-quote-card {
    background: var(--b2b-white);
    padding: 14px;
    border-radius: var(--b2b-radius);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.b2b-quote-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.b2b-quote-card__total {
    font-size: 18px;
    font-weight: 600;
    color: var(--b2b-success);
}

.b2b-quote-card__meta {
    font-size: 12px;
    color: var(--b2b-gray-500);
    margin-bottom: 10px;
}

.b2b-quote-card__actions {
    display: flex;
    gap: 6px;
}

/* Quotes Filters */
.b2b-quotes-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* Contact Cards */
.b2b-contact-card {
    background: var(--b2b-white);
    padding: 14px;
    border-radius: var(--b2b-radius);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.b2b-contact-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.b2b-contact-card__title {
    font-size: 12px;
    color: var(--b2b-gray-500);
    margin-bottom: 8px;
}

.b2b-contact-card > div {
    font-size: 13px;
    margin-bottom: 4px;
}

.b2b-contact-card__actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
}

.b2b-badge--sm {
    font-size: 10px;
    padding: 2px 6px;
}

/* Empty State */
.b2b-empty {
    text-align: center;
    color: var(--b2b-gray-400);
    padding: 30px;
    font-size: 14px;
}

/* Win/Loss Reasons */
.b2b-win-reason {
    color: var(--b2b-success);
    font-weight: 500;
}

.b2b-loss-reason {
    color: var(--b2b-danger);
    font-weight: 500;
}

/* Customer Link */
.b2b-customer-link {
    margin-top: 8px;
    font-size: 13px;
}

.b2b-customer-link a {
    color: var(--b2b-primary);
    text-decoration: none;
}

.b2b-customer-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    .b2b-stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .b2b-stats-row--secondary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .b2b-quote-header-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .b2b-form-grid {
        grid-template-columns: 1fr;
    }
    
    .b2b-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .b2b-quote-notes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .b2b-header {
        flex-direction: column;
    }
    
    .b2b-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .b2b-stats-row--secondary {
        grid-template-columns: 1fr;
    }
    
    .b2b-pipeline__column {
        flex: 0 0 250px;
        min-width: 250px;
    }
    
    .b2b-modal__panel {
        width: 95%;
    }
    
    .b2b-quick-actions {
        flex-wrap: wrap;
    }
    
    .b2b-tabs {
        overflow-x: auto;
    }
}

/* WhatsApp Webhook Styles */
.b2b-webhook-info {
    padding: 0;
}

.b2b-webhook-intro {
    color: var(--b2b-gray-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

.b2b-input-group {
    display: flex;
    gap: 8px;
}

.b2b-input-group .b2b-input {
    flex: 1;
    font-family: monospace;
    font-size: 13px;
}

.b2b-webhook-docs {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--b2b-gray-200);
}

.b2b-webhook-docs h4 {
    color: var(--b2b-dark);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.b2b-webhook-docs ol {
    margin: 0 0 20px 20px;
    padding: 0;
    color: var(--b2b-gray-600);
    font-size: 14px;
    line-height: 1.8;
}

.b2b-webhook-docs ol li {
    margin-bottom: 4px;
}

.b2b-webhook-docs code {
    background: var(--b2b-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--b2b-primary);
}

.b2b-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--b2b-radius);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    margin: 12px 0 16px;
}

.b2b-webhook-docs p {
    color: var(--b2b-gray-600);
    font-size: 13px;
    margin: 12px 0 0 0;
}

.b2b-error {
    color: var(--b2b-danger);
    padding: 20px;
    text-align: center;
}

/* Token Management Styles */
.b2b-token-add {
    background: var(--b2b-gray-100);
    padding: 16px;
    border-radius: var(--b2b-radius);
    margin-bottom: 20px;
}

.b2b-token-add h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-dark);
}

.b2b-tokens-section {
    margin-top: 24px;
}

.b2b-tokens-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-dark);
}

.b2b-tokens-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2b-token-item {
    background: var(--b2b-white);
    border: 1px solid var(--b2b-gray-200);
    border-radius: var(--b2b-radius);
    padding: 12px 16px;
}

.b2b-token-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.b2b-token-name {
    font-weight: 600;
    color: var(--b2b-dark);
    font-size: 14px;
}

.b2b-token-stats {
    flex: 1;
    font-size: 12px;
    color: var(--b2b-gray-500);
}

.b2b-token-url {
    display: flex;
    gap: 8px;
}

.b2b-token-url-input {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    background: var(--b2b-gray-50);
}

.b2b-no-tokens {
    color: var(--b2b-gray-500);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.b2b-loading {
    color: var(--b2b-gray-500);
    text-align: center;
    padding: 20px;
}

/* Validation Popup */
.b2b-validation-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: b2b-fadeIn 0.2s ease;
}

.b2b-validation-popup__content {
    background: white;
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: b2b-popIn 0.3s ease;
}

@keyframes b2b-popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.b2b-validation-popup__icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.b2b-validation-popup__content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--b2b-gray-800);
    margin: 0 0 12px;
}

.b2b-validation-popup__content p {
    font-size: 15px;
    color: var(--b2b-gray-600);
    margin: 0 0 20px;
}

.b2b-validation-popup__content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 16px 24px;
    text-align: left;
}

.b2b-validation-popup__content li {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2b-validation-popup__content li::before {
    content: "✗";
    color: #dc2626;
    font-weight: 700;
    font-size: 16px;
}

.b2b-validation-popup__content button {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    min-width: 180px;
}/**
 * TaskBoard CSS - Modern Trello-like Design
 * 
 * A sleek, professional task board interface inspired by Trello
 * with a similar visual language to the B2B CRM module.
 * 
 * @package AcOrderManagement
 * @since 2.0.0
 */

/* =========================================================================
   CSS VARIABLES
   ========================================================================= */

:root {
    /* Primary Colors - Yellow Theme */
    --yellow: #F8BC32;
    --tb-primary: #F8BC32;
    --tb-primary-dark: #e5a820;
    --tb-primary-light: #fef7e6;
    --tb-secondary: #5e6c84;
    --tb-success: #61bd4f;
    --tb-success-dark: #519839;
    --tb-success-light: #e8f5e9;
    --tb-warning: #ff9f1a;
    --tb-warning-dark: #d97706;
    --tb-warning-light: #fff8e1;
    --tb-danger: #eb5a46;
    --tb-danger-dark: #c0392b;
    --tb-danger-light: #ffebe6;
    --tb-info: #00c2e0;
    --tb-info-light: #e3f9fd;

    /* Priority Colors */
    --tb-priority-urgent: #eb5a46;
    --tb-priority-urgent-bg: #ffebe6;
    --tb-priority-high: #ff9f1a;
    --tb-priority-high-bg: #fff3e0;
    --tb-priority-normal: #F8BC32;
    --tb-priority-normal-bg: #fef7e6;
    --tb-priority-low: #61bd4f;
    --tb-priority-low-bg: #e8f5e9;

    /* Backgrounds */
    --tb-bg-main: #f9fafb;
    --tb-bg-list: #f3f4f6;
    --tb-bg-card: #ffffff;
    --tb-bg-hover: rgba(248, 188, 50, 0.08);
    --tb-bg-active: rgba(248, 188, 50, 0.15);
    --tb-bg-secondary: #f9fafb;

    /* Text Colors */
    --tb-text-primary: #1f2937;
    --tb-text-secondary: #6b7280;
    --tb-text-tertiary: #9ca3af;
    --tb-text-muted: #97a0af;
    --tb-text-light: #b3bac5;

    /* Borders */
    --tb-border: #e5e7eb;
    --tb-border-light: #f3f4f6;
    --tb-border-focus: var(--tb-primary);

    /* Shadows */
    --tb-shadow-xs: 0 1px 1px rgba(9, 30, 66, 0.04);
    --tb-shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.08);
    --tb-shadow-md: 0 4px 8px rgba(9, 30, 66, 0.1);
    --tb-shadow-lg: 0 8px 24px rgba(9, 30, 66, 0.15);
    --tb-shadow-xl: 0 16px 48px rgba(9, 30, 66, 0.2);
    --tb-shadow-card: 0 1px 3px rgba(9, 30, 66, 0.08), 0 1px 1px rgba(9, 30, 66, 0.04);
    --tb-shadow-card-hover: 0 8px 16px rgba(9, 30, 66, 0.12), 0 2px 4px rgba(9, 30, 66, 0.08);

    /* Border Radius */
    --tb-radius-xs: 2px;
    --tb-radius-sm: 4px;
    --tb-radius-md: 8px;
    --tb-radius-lg: 12px;
    --tb-radius-xl: 16px;
    --tb-radius-2xl: 20px;
    --tb-radius-full: 9999px;

    /* Spacing Scale */
    --tb-space-xs: 4px;
    --tb-space-sm: 8px;
    --tb-space-md: 12px;
    --tb-space-lg: 16px;
    --tb-space-xl: 24px;
    --tb-space-2xl: 32px;
    --tb-space-3xl: 48px;

    /* Typography */
    --tb-font-xs: 11px;
    --tb-font-sm: 12px;
    --tb-font-base: 14px;
    --tb-font-md: 15px;
    --tb-font-lg: 18px;
    --tb-font-xl: 20px;
    --tb-font-2xl: 24px;
    --tb-font-3xl: 28px;

    /* Z-index Scale */
    --tb-z-dropdown: 100;
    --tb-z-sticky: 150;
    --tb-z-modal: 250;
    --tb-z-popover: 300;
    --tb-z-toast: 400;

    /* Transitions */
    --tb-transition-fast: 0.15s ease;
    --tb-transition: 0.2s ease;
    --tb-transition-slow: 0.3s ease;
    --tb-transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================================================
   BASE RESET & APP CONTAINER
   ========================================================================= */

/* Task Board - prevent horizontal scroll */
body.taskboard-active {
    overflow-x: hidden;
}

/* Hide sidebar and theme elements ONLY in fullscreen mode */
body.taskboard-fullscreen .sidebar,
body.taskboard-fullscreen .left-menu,
body.taskboard-fullscreen .acom-left-sidebar,
body.taskboard-fullscreen [class*="sidebar-crm"],
body.taskboard-fullscreen .woocommerce-mini-cart,
body.taskboard-fullscreen .mini-cart,
body.taskboard-fullscreen .cart-contents,
body.taskboard-fullscreen .site-header-cart,
body.taskboard-fullscreen .widget_shopping_cart,
body.taskboard-fullscreen .xoo-wsc-modal,
body.taskboard-fullscreen .xoo-wsc-container,
body.taskboard-fullscreen [class*="accessibility"],
body.taskboard-fullscreen [class*="wcas-"],
body.taskboard-fullscreen .free-shipping-bar {
    display: none !important;
    visibility: hidden !important;
}

body.taskboard-fullscreen .container-crm-task-board > .row > .col-md-3,
body.taskboard-fullscreen .container-crm-task-board > .row > .col-lg-2 {
    display: none !important;
}

body.taskboard-fullscreen .container-crm-task-board > .row > main,
body.taskboard-fullscreen .content-crm-task-board {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.taskboard-fullscreen .container-crm-task-board {
    padding: 0 !important;
    max-width: 100% !important;
}

body.taskboard-fullscreen .acom-main-inside-container {
    padding: 0 !important;
    margin: 0 !important;
}

.taskboard-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--tb-bg-main);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    color: var(--tb-text-primary);
    box-sizing: border-box;
    position: relative;
    z-index: 50;
}

.taskboard-app *,
.taskboard-app *::before,
.taskboard-app *::after {
    box-sizing: border-box;
}

.taskboard-app button {
    font-family: inherit;
    cursor: pointer;
}

/* =========================================================================
   SIDEBAR HOVER ZONE & SLIDE-OUT SIDEBAR
   ========================================================================= */

.sidebar-hover-zone {
    position: fixed;
    left: 0;
    top: 0;
    width: 20px;
    height: 100vh;
    z-index: 1000;
    background: transparent;
}

.sidebar-hover-zone:hover + .taskboard-sidebar,
.taskboard-sidebar:hover,
.taskboard-sidebar.open {
    transform: translateX(0);
}

.taskboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.sidebar-close:hover {
    color: white;
}

.sidebar-content {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--tb-primary);
}

.sidebar-link.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border-left-color: #F8BC32;
}

.sidebar-icon {
    font-size: 18px;
}

/* Menu button in topbar */
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Exit button styling */
.exit-btn {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
}

.exit-btn:hover {
    background: rgba(239, 68, 68, 0.4) !important;
    color: white !important;
}

/* Fullscreen mode styles */
body.taskboard-fullscreen .container-crm-task-board {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    background: var(--tb-bg-main) !important;
    overflow: auto !important;
}

body.taskboard-fullscreen .acom_main_inside_crm-task-board {
    height: 100% !important;
}

body.taskboard-fullscreen .taskboard-app {
    min-height: 100vh !important;
}

body.taskboard-fullscreen .navbar,
body.taskboard-fullscreen > header:not(.taskboard-topbar),
body.taskboard-fullscreen .site-header,
body.taskboard-fullscreen .acom-main-inside-before,
body.taskboard-fullscreen .acom-main-inside-after {
    display: none !important;
}

#fullscreenToggle {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

#fullscreenToggle:hover {
    background: rgba(99, 102, 241, 0.4) !important;
}

/* =========================================================================
   TOP NAVIGATION BAR
   ========================================================================= */

.taskboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    color: white;
    box-shadow: var(--tb-shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-left .brand-icon {
    font-size: 28px;
}

.topbar-left .brand h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Board Selector */
.board-selector {
    position: relative;
}

.board-selector-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--tb-radius-lg);
    color: white;
    font-size: 15px;
    font-weight: 600;
    transition: var(--tb-transition);
    min-width: 200px;
}

.board-selector-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
}

.board-indicator {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--tb-primary);
    flex-shrink: 0;
}

.board-selector-trigger .chevron {
    margin-left: auto;
    transition: transform var(--tb-transition);
}

.board-selector.open .chevron {
    transform: rotate(180deg);
}

.board-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-xl);
    min-width: 320px;
    overflow: hidden;
    z-index: 200;
    animation: dropdownFade 0.2s ease;
}

.board-selector.open .board-dropdown {
    display: block;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-header {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    border-bottom: 1px solid var(--tb-border);
    font-size: 13px;
}

.board-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.board-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    transition: var(--tb-transition-fast);
}

.board-option:hover {
    background: var(--tb-bg-hover);
}

.board-option.active {
    background: var(--tb-primary-light);
}

.board-dot {
    width: 24px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.board-label {
    flex: 1;
    font-weight: 500;
    color: var(--tb-text-primary);
}

.star-icon {
    font-size: 12px;
}

.no-boards-msg {
    padding: 32px 20px;
    text-align: center;
    color: var(--tb-text-muted);
}

.no-boards-msg span {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.dropdown-footer {
    padding: 12px;
    border-top: 1px solid var(--tb-border);
}

.btn-create-board {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: var(--tb-bg-main);
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--tb-transition);
}

.btn-create-board:hover {
    background: var(--tb-border);
    color: var(--tb-text-primary);
}

.btn-create-board .plus-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tb-primary);
    color: white;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 400;
}

/* Top Bar Actions */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--tb-radius-md);
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: var(--tb-transition);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.action-btn span {
    display: none;
}

@media (min-width: 768px) {
    .action-btn span {
        display: inline;
    }
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

/* =========================================================================
   STATISTICS BAR (Like B2B CRM)
   ========================================================================= */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid var(--tb-border);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--tb-radius-lg);
    border: 1px solid var(--tb-border-light);
    transition: var(--tb-transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-md);
}

.stat-icon {
    font-size: 28px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--tb-text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--tb-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================================================
   FILTER BAR
   ========================================================================= */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--tb-border);
    align-items: flex-end;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    min-width: 180px;
    transition: var(--tb-transition);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px var(--tb-primary-light);
}

.btn-clear-filters {
    padding: 10px 20px;
    background: var(--tb-bg-main);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--tb-transition);
    margin-left: auto;
}

.btn-clear-filters:hover {
    background: var(--tb-border);
    color: var(--tb-text-primary);
}

/* =========================================================================
   MAIN BOARD AREA
   ========================================================================= */

.board-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Loading State */
.board-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 24px;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spinRing 1.2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #F8BC32;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #e5a820;
    animation-delay: 0.15s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #f093fb;
    animation-delay: 0.3s;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.board-loading p {
    font-size: 16px;
    color: var(--tb-text-secondary);
    font-weight: 500;
}

/* Empty State */
.board-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
    padding: 40px;
}

.empty-illustration {
    position: relative;
    margin-bottom: 32px;
}

.empty-icon {
    font-size: 80px;
    position: relative;
    z-index: 2;
}

.empty-shapes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.1));
    top: -20px;
    left: -30px;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(102, 126, 234, 0.1));
    bottom: -10px;
    right: -20px;
    animation-delay: 0.5s;
}

.shape-3 {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.2), rgba(102, 126, 234, 0.1));
    top: 10px;
    right: -10px;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.board-empty h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--tb-text-primary);
}

.board-empty p {
    font-size: 16px;
    color: var(--tb-text-secondary);
    margin: 0 0 24px;
    max-width: 400px;
}

.text-muted {
    color: var(--tb-text-muted) !important;
}

/* Primary Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    border: none;
    border-radius: var(--tb-radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    transition: var(--tb-transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--tb-radius-lg);
}

.btn-primary.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--tb-bg-main);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: var(--tb-transition);
}

.btn-secondary:hover {
    background: var(--tb-border);
    color: var(--tb-text-primary);
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    transition: var(--tb-transition);
}

.btn-cancel:hover {
    background: var(--tb-bg-hover);
    color: var(--tb-text-primary);
}

.btn-danger {
    background: var(--tb-danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--tb-radius-md);
    font-size: 13px;
    font-weight: 500;
}

.btn-danger:hover {
    background: #d63031;
}

/* =========================================================================
   BOARD CANVAS
   ========================================================================= */

.board-canvas {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    overflow-x: auto;
    min-height: calc(100vh - 280px);
}

.lists-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* =========================================================================
   LISTS
   ========================================================================= */

.task-list {
    width: 300px;
    min-width: 300px;
    max-height: calc(100vh - 320px);
    background: var(--tb-bg-list);
    border-radius: var(--tb-radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--tb-shadow-sm);
}

.list-header {
    display: flex;
    align-items: center;
    padding: 12px 12px 8px;
    cursor: grab;
}

.list-header:active {
    cursor: grabbing;
}

.list-title-input {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--tb-radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--tb-text-primary);
    resize: none;
    line-height: 1.3;
}

.list-title-input:focus {
    background: white;
    border-color: var(--tb-primary);
    outline: none;
}

.list-card-count {
    background: rgba(9, 30, 66, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    margin-right: 4px;
}

.list-menu-btn {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-sm);
    color: var(--tb-text-secondary);
    transition: var(--tb-transition-fast);
}

.list-menu-btn:hover {
    background: rgba(9, 30, 66, 0.08);
    color: var(--tb-text-primary);
}

.list-cards {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
    min-height: 24px;
}

.list-cards::-webkit-scrollbar {
    width: 8px;
}

.list-cards::-webkit-scrollbar-track {
    background: transparent;
}

.list-cards::-webkit-scrollbar-thumb {
    background: rgba(9, 30, 66, 0.15);
    border-radius: 4px;
}

.list-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(9, 30, 66, 0.25);
}

.list-footer {
    padding: 8px;
}

.btn-add-card {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    transition: var(--tb-transition-fast);
}

.btn-add-card:hover {
    background: rgba(9, 30, 66, 0.08);
    color: var(--tb-text-primary);
}

.btn-add-card .plus-icon {
    font-size: 18px;
}

/* Add Card Form */
.add-card-form {
    padding: 8px;
}

.add-card-form textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    resize: none;
    min-height: 60px;
    box-shadow: var(--tb-shadow-md);
}

.add-card-form textarea:focus {
    outline: none;
}

.add-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* =========================================================================
   CARDS - Enhanced Modern Design
   ========================================================================= */

.task-card {
    position: relative;
    background: var(--tb-bg-card);
    border-radius: var(--tb-radius-md);
    padding: var(--tb-space-md) var(--tb-space-lg);
    padding-left: calc(var(--tb-space-lg) + 4px); /* Space for priority indicator */
    margin-bottom: var(--tb-space-sm);
    cursor: pointer;
    box-shadow: var(--tb-shadow-card);
    border: 1px solid transparent;
    transition: all var(--tb-transition);
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    border-radius: var(--tb-radius-md) 0 0 var(--tb-radius-md);
    transition: background var(--tb-transition);
}

.task-card:hover {
    box-shadow: var(--tb-shadow-card-hover);
    border-color: var(--tb-border);
    transform: translateY(-2px);
}

.task-card:active {
    transform: translateY(0);
}

.task-card.dragging {
    opacity: 0.6;
    transform: rotate(3deg) scale(1.02);
    box-shadow: var(--tb-shadow-lg);
}

.task-card.ghost {
    opacity: 0.4;
    background: var(--tb-primary-light);
    border: 2px dashed var(--tb-primary);
}

/* Priority Indicator via ::before pseudo-element */
.task-card.priority-urgent::before { background: var(--tb-priority-urgent); }
.task-card.priority-high::before { background: var(--tb-priority-high); }
.task-card.priority-normal::before { background: var(--tb-priority-normal); }
.task-card.priority-low::before { background: var(--tb-priority-low); }

/* Priority background tint on hover */
.task-card.priority-urgent:hover { background: linear-gradient(90deg, var(--tb-priority-urgent-bg) 0%, var(--tb-bg-card) 20%); }
.task-card.priority-high:hover { background: linear-gradient(90deg, var(--tb-priority-high-bg) 0%, var(--tb-bg-card) 20%); }
.task-card.priority-normal:hover { background: linear-gradient(90deg, var(--tb-priority-normal-bg) 0%, var(--tb-bg-card) 20%); }
.task-card.priority-low:hover { background: linear-gradient(90deg, var(--tb-priority-low-bg) 0%, var(--tb-bg-card) 20%); }

/* Drag & Drop Image to Create Card */
.task-list.drag-over-image {
    border: 3px dashed var(--tb-primary);
    background: linear-gradient(135deg, rgba(0, 121, 191, 0.08) 0%, var(--tb-bg-list) 30%);
    box-shadow: 0 0 20px rgba(0, 121, 191, 0.25);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.task-list.drag-over-image::after {
    content: '📷 Drop image to create card';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--tb-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
    box-shadow: var(--tb-shadow-lg);
}

.task-list {
    position: relative;
}

/* Pinned Lists & Cards */
.task-list.is-pinned {
    border: 2px solid #e67e22;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.05) 0%, var(--tb-bg-list) 10%);
    box-shadow: 0 0 10px rgba(230, 126, 34, 0.15);
}

.task-list.is-pinned .list-header {
    background: linear-gradient(90deg, rgba(230, 126, 34, 0.1) 0%, transparent 50%);
}

.task-list.is-pinned .pinned-indicator {
    margin-right: 6px;
    font-size: 14px;
    animation: pinPulse 2s ease-in-out infinite;
}

.task-card.is-pinned {
    border-left: 4px solid #e67e22;
    background: linear-gradient(90deg, rgba(230, 126, 34, 0.08) 0%, var(--tb-bg-card) 15%);
}

.task-card.is-pinned::before {
    display: none; /* Hide priority indicator, pinned takes precedence visually */
}

.card-pinned-badge {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 12px;
    z-index: 5;
    animation: pinPulse 2s ease-in-out infinite;
}

/* Card Complete Button - Tick Circle (Trello-style) */
.card-complete-btn {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid #ccc;
    background: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s, border-color 0.15s, background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 8px;
}

.card-complete-btn:hover {
    border-color: #61bd4f;
    transform: scale(1.1);
}

.card-complete-btn svg {
    color: transparent;
    width: 14px;
    height: 14px;
    transition: color 0.15s;
}

.card-complete-btn:hover svg {
    color: #61bd4f;
}

.card-complete-btn.completed {
    background: #61bd4f;
    border-color: #61bd4f;
}

.card-complete-btn.completed svg {
    color: white;
}

.card-complete-btn.completed:hover {
    background: #519839;
    border-color: #519839;
}

.task-card:hover .card-complete-btn {
    opacity: 1;
}

.task-card.is-complete .card-complete-btn {
    opacity: 1;
}

/* Yellow border on card hover */
.task-card:hover {
    border: 2px solid #f2d600 !important;
    box-shadow: 0 4px 12px rgba(242, 214, 0, 0.3);
}

/* Adjust padding when hovering to account for border */
.task-card {
    border: 2px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

/* Completed card styling */
.task-card.is-complete {
    opacity: 0.75;
}

.task-card.is-complete .card-title {
    text-decoration: line-through;
    color: #888;
}

.task-card.is-complete:hover {
    opacity: 1;
}

/* Archive Modal Styles */
.tb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.tb-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

.tb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.tb-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.tb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.tb-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.tb-modal-body {
    padding: 20px;
}

.tb-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.tb-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.tb-select:focus {
    outline: none;
    border-color: #0079bf;
    box-shadow: 0 0 0 2px rgba(0, 121, 191, 0.2);
}

@keyframes pinPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Non-admin: show cursor not-allowed on pinned items when hovering */
.task-list.is-pinned:not(.admin-view) .list-header {
    cursor: default;
}

.task-card.is-pinned:not(.admin-view) {
    cursor: default;
}

/* Pinned item filter (prevent dragging for non-admins) */
.task-list.is-pinned[data-is-pinned="1"]:not(:has(+ .sortable-fallback)) {
    /* Additional visual feedback when trying to drag */
}

.task-card.is-pinned.sortable-chosen {
    /* When trying to grab a pinned card - show lock feedback */
    cursor: not-allowed !important;
}

/* Card Cover */
.card-cover {
    height: 32px;
    border-radius: var(--tb-radius-sm);
    margin: calc(-1 * var(--tb-space-md)) calc(-1 * var(--tb-space-lg)) var(--tb-space-md);
    margin-left: calc(-1 * var(--tb-space-lg) - 4px);
    background-size: cover;
    background-position: center;
    transition: height var(--tb-transition);
}

.card-cover.has-image {
    height: 140px;
}

.card-cover.has-image:hover {
    height: 160px;
}

/* Auto-preview from first image attachment (like Trello) */
.card-cover.has-image.auto-preview {
    height: 120px;
    border-radius: var(--tb-radius-md) var(--tb-radius-md) 0 0;
}

.card-cover.has-image.auto-preview:hover {
    height: 140px;
}

/* Card Labels - Modern Pill Style */
.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tb-space-xs);
    margin-bottom: var(--tb-space-sm);
}

.card-label {
    height: 8px;
    min-width: 40px;
    max-width: 80px;
    border-radius: var(--tb-radius-full);
    transition: all var(--tb-transition);
    cursor: pointer;
}

.card-labels:hover .card-label,
.card-labels.expanded .card-label {
    height: 20px;
    padding: 2px 10px;
    font-size: var(--tb-font-xs);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    max-width: none;
}

/* Card Title Row - Checkbox + Title */
.card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* Card Title */
.card-title {
    font-size: var(--tb-font-base);
    font-weight: 500;
    color: var(--tb-text-primary);
    line-height: 1.5;
    word-break: break-word;
    margin: 0;
    flex: 1;
}

/* Card Badges - Enhanced Layout */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tb-space-sm);
    margin-top: var(--tb-space-sm);
    align-items: center;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--tb-font-sm);
    color: var(--tb-text-secondary);
    padding: 2px 6px;
    background: var(--tb-bg-hover);
    border-radius: var(--tb-radius-sm);
    transition: all var(--tb-transition-fast);
}

.card-badge:hover {
    background: var(--tb-bg-active);
    color: var(--tb-text-primary);
}

.card-badge svg,
.card-badge .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

/* Due Date Badge - Enhanced States */
.card-due {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--tb-radius-sm);
    font-size: var(--tb-font-xs);
    font-weight: 600;
    transition: all var(--tb-transition-fast);
}

.card-due.overdue {
    background: var(--tb-danger-light);
    color: var(--tb-danger);
    animation: pulse-danger 2s infinite;
}

.card-due.due-soon {
    background: var(--tb-warning-light);
    color: var(--tb-warning-dark);
}

.card-due.due-today {
    background: var(--tb-info-light);
    color: var(--tb-info);
}

.card-due.complete {
    background: var(--tb-success-light);
    color: var(--tb-success);
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Priority Indicator (legacy support) */
.card-priority {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: var(--tb-radius-md) 0 0 var(--tb-radius-md);
}

.card-priority.urgent { background: var(--tb-priority-urgent); }
.card-priority.high { background: var(--tb-priority-high); }
.card-priority.normal { background: var(--tb-priority-normal); }
.card-priority.low { background: var(--tb-priority-low); }

/* Card Members - Enhanced Avatar Stack */
.card-members {
    display: flex;
    align-items: center;
    margin-top: var(--tb-space-sm);
    margin-left: auto;
}

.card-members img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -8px;
    object-fit: cover;
    transition: all var(--tb-transition-fast);
    box-shadow: var(--tb-shadow-xs);
}

.card-members img:first-child {
    margin-left: 0;
}

.card-members img:hover {
    transform: scale(1.15);
    z-index: 10;
}

.card-members .member-count {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tb-bg-list);
    border: 2px solid white;
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--tb-font-xs);
    font-weight: 600;
    color: var(--tb-text-secondary);
}

/* Card Footer Row */
.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--tb-space-sm);
    padding-top: var(--tb-space-sm);
    border-top: 1px solid var(--tb-border-light);
}

/* Checklist Progress Mini */
.card-checklist-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--tb-font-xs);
    color: var(--tb-text-secondary);
}

.card-checklist-progress .progress-mini {
    width: 40px;
    height: 4px;
    background: var(--tb-border);
    border-radius: 2px;
    overflow: hidden;
}

.card-checklist-progress .progress-mini-fill {
    height: 100%;
    background: var(--tb-success);
    border-radius: 2px;
    transition: width var(--tb-transition);
}

.card-checklist-progress.complete {
    color: var(--tb-success);
}

.card-checklist-progress.complete .progress-mini-fill {
    background: var(--tb-success);
}

/* =========================================================================
   ADD LIST CARD
   ========================================================================= */

.add-list-card {
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
}

.btn-add-list {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px dashed var(--tb-border);
    border-radius: var(--tb-radius-lg);
    color: var(--tb-text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: var(--tb-transition);
}

.btn-add-list:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--tb-primary);
    color: var(--tb-primary);
}

.btn-add-list .plus-icon {
    font-size: 22px;
}

.add-list-form {
    background: var(--tb-bg-list);
    border-radius: var(--tb-radius-lg);
    padding: 12px;
}

.add-list-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--tb-primary);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    margin-bottom: 8px;
}

.add-list-form input:focus {
    outline: none;
}

.form-actions {
    display: flex;
    gap: 8px;
}

/* =========================================================================
   ACTIVITY SIDEBAR
   ========================================================================= */

.activity-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    z-index: 150;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--tb-border);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.btn-close-sidebar {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
}

.btn-close-sidebar:hover {
    background: var(--tb-bg-hover);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.activity-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--tb-text-muted);
}

/* =========================================================================
   MODAL OVERLAY
   ========================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================================================
   CARD DETAIL MODAL
   ========================================================================= */

.card-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--tb-bg-main);
    border-radius: var(--tb-radius-xl);
    box-shadow: var(--tb-shadow-xl);
    z-index: 250;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.card-modal .modal-header {
    display: flex;
    align-items: flex-start;
    padding: 24px 24px 16px;
    background: white;
    border-bottom: 1px solid var(--tb-border);
}

.modal-title-section {
    display: flex;
    gap: 16px;
    flex: 1;
}

.modal-title-section .card-icon {
    font-size: 28px;
}

.title-wrapper {
    flex: 1;
}

.card-title-edit {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid transparent;
    border-radius: var(--tb-radius-md);
    font-size: 20px;
    font-weight: 600;
    color: var(--tb-text-primary);
    background: transparent;
    resize: none;
    line-height: 1.3;
}

.card-title-edit:focus {
    background: white;
    border-color: var(--tb-primary);
    outline: none;
}

.card-location {
    font-size: 13px;
    color: var(--tb-text-secondary);
    margin: 8px 0 0 12px;
}

.modal-close {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    transition: var(--tb-transition);
}

.modal-close:hover {
    background: var(--tb-bg-hover);
    color: var(--tb-text-primary);
}

.modal-body {
    display: flex;
    max-height: calc(90vh - 100px);
    overflow: hidden;
}

.modal-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.modal-sidebar {
    width: 200px;
    padding: 24px 20px;
    background: white;
    border-left: 1px solid var(--tb-border);
}

/* Quick Info Row */
.card-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-section h4 {
    font-size: 11px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.labels-container,
.members-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.label-tag {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-add-inline {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tb-bg-list);
    border: none;
    color: var(--tb-text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tb-transition);
}

.btn-add-inline:hover {
    background: var(--tb-border);
    color: var(--tb-primary);
}

.due-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.due-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--tb-radius-md);
    font-size: 13px;
    font-weight: 500;
    background: var(--tb-bg-list);
    color: var(--tb-text-primary);
}

.due-badge.overdue {
    background: #ffebe6;
    color: var(--tb-danger);
}

/* Card Sections */
.card-section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-icon {
    font-size: 18px;
}

.section-header h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.btn-toggle {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--tb-text-secondary);
    font-size: 13px;
    border-radius: var(--tb-radius-sm);
}

.btn-toggle:hover {
    background: var(--tb-bg-hover);
}

/* Description Editor */
.description-editor textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: white;
}

.description-editor textarea:focus {
    outline: none;
    border-color: var(--tb-primary);
}

.editor-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Add Comment */
.add-comment {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.add-comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    resize: none;
    min-height: 48px;
}

.comment-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--tb-primary);
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
}

.activity-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    color: var(--tb-text-primary);
}

.activity-content p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--tb-text-secondary);
}

.activity-time {
    font-size: 12px;
    color: var(--tb-text-muted);
    margin-top: 4px;
}

/* Modal Sidebar */
.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h5 {
    font-size: 11px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}

.sidebar-action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: var(--tb-bg-list);
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-primary);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    margin-bottom: 6px;
    transition: var(--tb-transition-fast);
}

.sidebar-action:hover {
    background: var(--tb-border);
}

.sidebar-action.danger {
    color: var(--tb-danger);
}

.sidebar-action.danger:hover {
    background: #ffebe6;
}

/* Priority Selector */
.priority-selector {
    display: flex;
    gap: 8px;
}

.priority-btn {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: var(--tb-radius-md);
    background: var(--tb-bg-list);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tb-transition);
}

.priority-btn:hover {
    transform: scale(1.1);
}

.priority-btn.selected {
    border-color: var(--tb-primary);
    background: var(--tb-primary-light);
}

/* =========================================================================
   CREATE BOARD MODAL
   ========================================================================= */

.create-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: var(--tb-radius-xl);
    box-shadow: var(--tb-shadow-xl);
    z-index: 250;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

.create-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--tb-border);
}

.create-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.create-modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    margin-bottom: 8px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 15px;
    transition: var(--tb-transition);
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--tb-primary);
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.color-swatch {
    aspect-ratio: 16 / 10;
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--tb-transition);
}

.color-swatch:hover {
    transform: scale(1.05);
}

.color-swatch.selected {
    border-color: var(--tb-text-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--tb-text-primary);
}

/* Board Preview */
.board-preview-container {
    margin-top: 8px;
}

.board-preview {
    padding: 16px;
    border-radius: var(--tb-radius-lg);
    transition: background 0.3s ease;
}

.preview-lists {
    display: flex;
    gap: 8px;
}

.preview-list {
    width: 60px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 6px;
}

.preview-card {
    height: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    margin-bottom: 4px;
}

.preview-card:last-child {
    margin-bottom: 0;
}

.create-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--tb-border);
    background: var(--tb-bg-main);
}

/* =========================================================================
   BOARD SETTINGS MODAL
   ========================================================================= */

.settings-modal {
    max-height: 80vh;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--tb-text-primary);
}

.settings-description {
    font-size: 13px;
    color: var(--tb-text-secondary);
    margin: 0 0 16px 0;
}

.settings-hint {
    font-size: 11px;
    color: var(--tb-text-secondary);
    margin: 0 0 8px 0;
    font-style: italic;
}

.user-count {
    font-size: 12px;
    color: var(--tb-primary);
    font-weight: 500;
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--tb-bg-main);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: var(--tb-primary);
    background: rgba(0, 121, 191, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--tb-primary);
}

.checkbox-item span {
    font-size: 13px;
    font-weight: 500;
}

.user-select-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    padding: 8px;
}

.user-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--tb-radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.user-checkbox-item:hover {
    background: var(--tb-bg-main);
}

.user-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--tb-primary);
}

.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.role-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.role-badge.graphic {
    background: #e8f5e9;
    color: #2e7d32;
}

.role-badge.product {
    background: #e3f2fd;
    color: #1565c0;
}

.role-badge.editor {
    background: #fff3e0;
    color: #e65100;
}

.loading-users {
    padding: 20px;
    text-align: center;
    color: var(--tb-text-secondary);
    font-size: 13px;
}

.no-users-msg {
    padding: 20px;
    text-align: center;
    color: var(--tb-text-secondary);
    font-size: 13px;
}

.error-msg {
    padding: 20px;
    text-align: center;
    color: var(--tb-danger);
    font-size: 13px;
}

/* =========================================================================
   POPOVER PANELS
   ========================================================================= */

.popover-panel {
    position: fixed;
    width: 280px;
    background: white;
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-xl);
    z-index: 300;
    animation: popoverFade 0.15s ease;
}

@keyframes popoverFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tb-border);
}

.popover-header h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.popover-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-sm);
    font-size: 20px;
    color: var(--tb-text-secondary);
    cursor: pointer;
}

.popover-close:hover {
    background: var(--tb-bg-hover);
}

.popover-content {
    padding: 16px;
}

.popover-search {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 13px;
    margin-bottom: 12px;
}

.popover-search:focus {
    outline: none;
    border-color: var(--tb-primary);
}

.labels-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.label-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    transition: var(--tb-transition-fast);
}

.label-option:hover {
    background: var(--tb-bg-hover);
}

.label-option .label-color {
    width: 100%;
    height: 32px;
    border-radius: 4px;
}

.label-option.selected .label-color {
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.label-option .check-icon {
    margin-left: auto;
    color: white;
    font-weight: bold;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    transition: var(--tb-transition-fast);
}

.member-option:hover {
    background: var(--tb-bg-hover);
}

.member-option img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.member-option .member-name {
    flex: 1;
    font-size: 14px;
    color: var(--tb-text-primary);
}

.member-option.selected {
    background: var(--tb-primary-light);
}

.btn-create-new {
    width: 100%;
    padding: 10px;
    background: var(--tb-bg-main);
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--tb-transition);
}

.btn-create-new:hover {
    background: var(--tb-border);
    color: var(--tb-text-primary);
}

/* Date Picker */
.date-input,
.time-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    margin-bottom: 12px;
}

.popover-actions {
    display: flex;
    gap: 8px;
}

.popover-actions button {
    flex: 1;
}

/* Checklist creator */
.popover-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Move card */
.move-list-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
    margin-bottom: 12px;
}

/* =========================================================================
   CHECKLISTS
   ========================================================================= */

.checklist {
    margin-bottom: 24px;
}

.checklist-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.checklist-header .section-icon {
    font-size: 18px;
}

.checklist-header h4 {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.checklist-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.progress-text {
    font-size: 12px;
    color: var(--tb-text-secondary);
    min-width: 32px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--tb-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--tb-success);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--tb-radius-md);
    transition: var(--tb-transition-fast);
}

.checklist-item:hover {
    background: var(--tb-bg-hover);
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.checklist-item span {
    flex: 1;
    font-size: 14px;
}

.checklist-item.completed span {
    text-decoration: line-through;
    color: var(--tb-text-muted);
}

.add-item-form {
    margin-top: 12px;
}

.add-item-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    font-size: 14px;
}

/* =========================================================================
   ATTACHMENTS
   ========================================================================= */

.attachment-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: white;
    border-radius: var(--tb-radius-md);
    border: 1px solid var(--tb-border);
    margin-bottom: 10px;
}

.attachment-thumb {
    width: 80px;
    height: 56px;
    border-radius: var(--tb-radius-sm);
    background: var(--tb-bg-list);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

.attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--tb-text-primary);
    margin-bottom: 4px;
}

.attachment-meta {
    font-size: 12px;
    color: var(--tb-text-muted);
}

.attachment-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.attachment-actions button {
    padding: 4px 8px;
    background: transparent;
    border: none;
    font-size: 12px;
    color: var(--tb-text-secondary);
    cursor: pointer;
}

.attachment-actions button:hover {
    text-decoration: underline;
}

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */

@media (max-width: 1024px) {
    .stats-bar {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-sidebar {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .taskboard-topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .topbar-center {
        order: 3;
        width: 100%;
    }
    
    .board-selector-trigger {
        width: 100%;
        justify-content: center;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
    }
    
    .btn-clear-filters {
        margin-left: 0;
        width: 100%;
    }
    
    .board-canvas {
        padding: 16px;
    }
    
    .task-list,
    .add-list-card {
        width: 280px;
        min-width: 280px;
    }
    
    .card-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        flex-direction: column;
    }
    
    .modal-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--tb-border);
    }
    
    .activity-sidebar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px 16px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* =========================================================================
   MODERN BUTTON SYSTEM (B2B CRM Style)
   ========================================================================= */

.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tb-space-sm);
    padding: var(--tb-space-md) var(--tb-space-lg);
    font-size: var(--tb-font-base);
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    transition: all var(--tb-transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.tb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary Button */
.tb-btn-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.tb-btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.tb-btn-secondary {
    background: var(--tb-bg-main);
    color: var(--tb-text-secondary);
    border-color: var(--tb-border);
}

.tb-btn-secondary:hover {
    background: var(--tb-border);
    color: var(--tb-text-primary);
}

/* Success Button */
.tb-btn-success {
    background: var(--tb-success);
    color: white;
}

.tb-btn-success:hover {
    background: var(--tb-success-dark);
    transform: translateY(-1px);
}

/* Danger Button */
.tb-btn-danger {
    background: var(--tb-danger);
    color: white;
}

.tb-btn-danger:hover {
    background: var(--tb-danger-dark);
    transform: translateY(-1px);
}

/* Warning Button */
.tb-btn-warning {
    background: var(--tb-warning);
    color: var(--tb-text-primary);
}

.tb-btn-warning:hover {
    background: var(--tb-warning-dark);
}

/* Ghost Button */
.tb-btn-ghost {
    background: transparent;
    color: var(--tb-text-secondary);
}

.tb-btn-ghost:hover {
    background: var(--tb-bg-hover);
    color: var(--tb-text-primary);
}

/* Outline Variants */
.tb-btn-outline-primary {
    background: transparent;
    color: var(--tb-primary);
    border-color: var(--tb-primary);
}

.tb-btn-outline-primary:hover {
    background: var(--tb-primary);
    color: white;
}

.tb-btn-outline-danger {
    background: transparent;
    color: var(--tb-danger);
    border-color: var(--tb-danger);
}

.tb-btn-outline-danger:hover {
    background: var(--tb-danger);
    color: white;
}

/* Button Sizes */
.tb-btn-xs {
    padding: var(--tb-space-xs) var(--tb-space-sm);
    font-size: var(--tb-font-xs);
    border-radius: var(--tb-radius-sm);
}

.tb-btn-sm {
    padding: var(--tb-space-sm) var(--tb-space-md);
    font-size: var(--tb-font-sm);
}

.tb-btn-lg {
    padding: var(--tb-space-lg) var(--tb-space-xl);
    font-size: var(--tb-font-md);
    border-radius: var(--tb-radius-lg);
}

.tb-btn-xl {
    padding: var(--tb-space-lg) var(--tb-space-2xl);
    font-size: var(--tb-font-lg);
    border-radius: var(--tb-radius-lg);
}

/* Icon-only Button */
.tb-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--tb-radius-md);
}

.tb-btn-icon.tb-btn-sm {
    width: 28px;
    height: 28px;
}

.tb-btn-icon.tb-btn-lg {
    width: 44px;
    height: 44px;
}

/* Loading State */
.tb-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.tb-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

.tb-btn-primary.tb-btn-loading::after,
.tb-btn-success.tb-btn-loading::after,
.tb-btn-danger.tb-btn-loading::after {
    border-color: rgba(255, 255, 255, 0.3);
    border-right-color: white;
}

@keyframes btn-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button Group */
.tb-btn-group {
    display: inline-flex;
}

.tb-btn-group .tb-btn {
    border-radius: 0;
}

.tb-btn-group .tb-btn:first-child {
    border-radius: var(--tb-radius-md) 0 0 var(--tb-radius-md);
}

.tb-btn-group .tb-btn:last-child {
    border-radius: 0 var(--tb-radius-md) var(--tb-radius-md) 0;
}

.tb-btn-group .tb-btn + .tb-btn {
    margin-left: -1px;
}

/* =========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================= */

.tb-toast-container {
    position: fixed;
    bottom: var(--tb-space-xl);
    right: var(--tb-space-xl);
    z-index: var(--tb-z-toast);
    display: flex;
    flex-direction: column-reverse;
    gap: var(--tb-space-sm);
    pointer-events: none;
}

.tb-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--tb-space-md);
    min-width: 300px;
    max-width: 420px;
    padding: var(--tb-space-lg);
    background: white;
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-xl);
    pointer-events: auto;
    animation: toast-slide-in 0.3s ease;
    border-left: 4px solid var(--tb-primary);
}

.tb-toast.toast-exiting {
    animation: toast-slide-out 0.2s ease forwards;
}

/* Fallback toast show class (for jQuery-based toasts) */
.tb-toast:not(.tb-toast-success):not(.tb-toast-error):not(.tb-toast-warning):not(.tb-toast-info) {
    opacity: 0;
    transform: translateX(100%);
    animation: none;
    transition: all 0.3s ease;
}

.tb-toast.show {
    opacity: 1;
    transform: translateX(0);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.tb-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tb-toast-content {
    flex: 1;
    min-width: 0;
}

.tb-toast-title {
    font-size: var(--tb-font-base);
    font-weight: 600;
    color: var(--tb-text-primary);
    margin: 0 0 var(--tb-space-xs);
}

.tb-toast-message {
    font-size: var(--tb-font-sm);
    color: var(--tb-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.tb-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-sm);
    color: var(--tb-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tb-transition-fast);
}

.tb-toast-close:hover {
    background: var(--tb-bg-hover);
    color: var(--tb-text-primary);
}

/* Toast Types */
.tb-toast-success {
    border-left-color: var(--tb-success);
}

.tb-toast-success .tb-toast-icon {
    color: var(--tb-success);
}

.tb-toast-error {
    border-left-color: var(--tb-danger);
}

.tb-toast-error .tb-toast-icon {
    color: var(--tb-danger);
}

.tb-toast-warning {
    border-left-color: var(--tb-warning);
}

.tb-toast-warning .tb-toast-icon {
    color: var(--tb-warning-dark);
}

.tb-toast-info {
    border-left-color: var(--tb-info);
}

.tb-toast-info .tb-toast-icon {
    color: var(--tb-info);
}

/* Toast Progress Bar */
.tb-toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.2;
    border-radius: 0 0 var(--tb-radius-lg) 0;
    animation: toast-progress 3s linear forwards;
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* =========================================================================
   STATISTICS DASHBOARD
   ========================================================================= */

.tb-stats-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 32px rgba(9, 30, 66, 0.15);
    z-index: var(--tb-z-modal);
    transform: translateX(100%);
    transition: transform var(--tb-transition-slow);
    display: flex;
    flex-direction: column;
}

.tb-stats-panel.open {
    transform: translateX(0);
}

.tb-stats-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tb-space-xl);
    border-bottom: 1px solid var(--tb-border);
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    color: #1f2937;
}

.tb-stats-panel-header h3 {
    margin: 0;
    font-size: var(--tb-font-xl);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
}

.tb-stats-panel-close {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: var(--tb-radius-md);
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--tb-transition-fast);
}

.tb-stats-panel-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.tb-stats-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--tb-space-xl);
}

/* Stats Grid */
.tb-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--tb-space-lg);
    margin-bottom: var(--tb-space-xl);
}

.tb-stat-card {
    padding: var(--tb-space-lg);
    background: var(--tb-bg-main);
    border-radius: var(--tb-radius-lg);
    border: 1px solid var(--tb-border-light);
    transition: all var(--tb-transition);
}

.tb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-md);
}

.tb-stat-card.primary {
    background: linear-gradient(135deg, var(--tb-primary-light) 0%, white 100%);
    border-color: var(--tb-primary);
}

.tb-stat-card.success {
    background: linear-gradient(135deg, var(--tb-success-light) 0%, white 100%);
    border-color: var(--tb-success);
}

.tb-stat-card.warning {
    background: linear-gradient(135deg, var(--tb-warning-light) 0%, white 100%);
    border-color: var(--tb-warning);
}

.tb-stat-card.danger {
    background: linear-gradient(135deg, var(--tb-danger-light) 0%, white 100%);
    border-color: var(--tb-danger);
}

.tb-stat-label {
    font-size: var(--tb-font-xs);
    font-weight: 600;
    color: var(--tb-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--tb-space-sm);
}

.tb-stat-value {
    font-size: var(--tb-font-2xl);
    font-weight: 700;
    color: var(--tb-text-primary);
    line-height: 1.2;
}

.tb-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--tb-font-xs);
    font-weight: 500;
    margin-top: var(--tb-space-xs);
    padding: 2px 6px;
    border-radius: var(--tb-radius-sm);
}

.tb-stat-trend.up {
    color: var(--tb-success);
    background: var(--tb-success-light);
}

.tb-stat-trend.down {
    color: var(--tb-danger);
    background: var(--tb-danger-light);
}

/* Stats Charts Section */
.tb-stats-section {
    margin-bottom: var(--tb-space-xl);
}

.tb-stats-section-title {
    font-size: var(--tb-font-md);
    font-weight: 600;
    color: var(--tb-text-primary);
    margin: 0 0 var(--tb-space-lg);
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
}

.tb-chart-container {
    background: var(--tb-bg-main);
    border-radius: var(--tb-radius-lg);
    padding: var(--tb-space-lg);
    border: 1px solid var(--tb-border-light);
}

.tb-chart-canvas {
    width: 100%;
    height: 200px;
}

/* Stats List */
.tb-stats-list {
    display: flex;
    flex-direction: column;
    gap: var(--tb-space-sm);
}

.tb-stats-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tb-space-md) var(--tb-space-lg);
    background: var(--tb-bg-main);
    border-radius: var(--tb-radius-md);
    border: 1px solid var(--tb-border-light);
    transition: all var(--tb-transition-fast);
}

.tb-stats-list-item:hover {
    background: white;
    box-shadow: var(--tb-shadow-sm);
}

.tb-stats-list-label {
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    font-size: var(--tb-font-sm);
    color: var(--tb-text-secondary);
}

.tb-stats-list-value {
    font-size: var(--tb-font-base);
    font-weight: 600;
    color: var(--tb-text-primary);
}

/* Stats Panel Body */
.tb-stats-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--tb-space-xl);
}

/* Stat Card with Icon */
.tb-stat-card {
    display: flex;
    align-items: center;
    gap: var(--tb-space-md);
    padding: var(--tb-space-lg);
    background: white;
    border-radius: var(--tb-radius-lg);
    border: 1px solid var(--tb-border-light);
    transition: all var(--tb-transition);
}

.tb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-md);
}

.tb-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--tb-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.tb-stat-icon svg {
    width: 24px;
    height: 24px;
}

.tb-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tb-stat-info .tb-stat-value {
    font-size: var(--tb-font-xl);
    font-weight: 700;
    color: var(--tb-text-primary);
    line-height: 1.2;
}

.tb-stat-info .tb-stat-label {
    font-size: var(--tb-font-xs);
    font-weight: 500;
    color: var(--tb-text-secondary);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

/* Completion Bar */
.tb-completion-bar {
    height: 8px;
    background: var(--tb-border);
    border-radius: var(--tb-radius-full);
    overflow: hidden;
    margin: var(--tb-space-sm) 0;
}

.tb-completion-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tb-success), #2ecc71);
    border-radius: var(--tb-radius-full);
    transition: width 0.5s ease;
}

.tb-completion-text {
    font-size: var(--tb-font-sm);
    color: var(--tb-text-secondary);
}

.tb-completion-text span {
    font-weight: 600;
    color: var(--tb-success);
}

/* Stats Section Headers */
.tb-stats-section h4 {
    font-size: var(--tb-font-md);
    font-weight: 600;
    color: var(--tb-text-primary);
    margin: 0 0 var(--tb-space-md);
}

/* Chart Container Fix */
.tb-chart-container {
    background: var(--tb-bg-main);
    border-radius: var(--tb-radius-lg);
    padding: var(--tb-space-lg);
    border: 1px solid var(--tb-border-light);
    height: 220px;
    position: relative;
}

.tb-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Stats Loading State */
.tb-stats-loading {
    padding: var(--tb-space-xl);
}

/* Stats List Label with Icon */
.tb-stats-list-label svg {
    width: 16px;
    height: 16px;
    color: var(--tb-text-muted);
    flex-shrink: 0;
}

/* =========================================================================
   ENHANCED FORM COMPONENTS
   ========================================================================= */

.tb-form-group {
    margin-bottom: var(--tb-space-lg);
}

.tb-form-label {
    display: block;
    font-size: var(--tb-font-sm);
    font-weight: 600;
    color: var(--tb-text-secondary);
    margin-bottom: var(--tb-space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tb-form-label.required::after {
    content: '*';
    color: var(--tb-danger);
    margin-left: 4px;
}

.tb-form-input,
.tb-form-select,
.tb-form-textarea {
    width: 100%;
    padding: var(--tb-space-md) var(--tb-space-lg);
    font-size: var(--tb-font-base);
    font-family: inherit;
    color: var(--tb-text-primary);
    background: white;
    border: 2px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    transition: all var(--tb-transition);
}

.tb-form-input:focus,
.tb-form-select:focus,
.tb-form-textarea:focus {
    outline: none;
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px var(--tb-primary-light);
}

.tb-form-input.error,
.tb-form-select.error,
.tb-form-textarea.error {
    border-color: var(--tb-danger);
}

.tb-form-input.error:focus,
.tb-form-select.error:focus,
.tb-form-textarea.error:focus {
    box-shadow: 0 0 0 3px var(--tb-danger-light);
}

.tb-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.tb-form-help {
    font-size: var(--tb-font-xs);
    color: var(--tb-text-muted);
    margin-top: var(--tb-space-xs);
}

.tb-form-error {
    font-size: var(--tb-font-xs);
    color: var(--tb-danger);
    margin-top: var(--tb-space-xs);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Form Grid */
.tb-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--tb-space-lg);
}

.tb-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Checkbox & Radio */
.tb-checkbox,
.tb-radio {
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    cursor: pointer;
    user-select: none;
}

.tb-checkbox input,
.tb-radio input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tb-checkbox-label,
.tb-radio-label {
    font-size: var(--tb-font-base);
    color: var(--tb-text-primary);
}

/* =========================================================================
   ENHANCED MODAL SYSTEM
   ========================================================================= */

.tb-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: var(--tb-radius-xl);
    box-shadow: var(--tb-shadow-xl);
    z-index: var(--tb-z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--tb-transition);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tb-modal.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Sizes */
.tb-modal-sm { width: 400px; }
.tb-modal-md { width: 600px; }
.tb-modal-lg { width: 800px; }
.tb-modal-xl { width: 1000px; }
.tb-modal-full { width: calc(100vw - 48px); height: calc(100vh - 48px); }

.tb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tb-space-xl);
    border-bottom: 1px solid var(--tb-border);
    flex-shrink: 0;
}

.tb-modal-title {
    font-size: var(--tb-font-xl);
    font-weight: 600;
    margin: 0;
    color: var(--tb-text-primary);
}

.tb-modal-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--tb-radius-md);
    color: var(--tb-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--tb-transition-fast);
}

.tb-modal-close:hover {
    background: var(--tb-bg-hover);
    color: var(--tb-text-primary);
}

.tb-modal-body {
    flex: 1;
    padding: var(--tb-space-xl);
    overflow-y: auto;
}

.tb-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--tb-space-md);
    padding: var(--tb-space-lg) var(--tb-space-xl);
    border-top: 1px solid var(--tb-border);
    background: var(--tb-bg-main);
    flex-shrink: 0;
}

/* =========================================================================
   BADGE & TAG SYSTEM
   ========================================================================= */

.tb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: var(--tb-font-xs);
    font-weight: 600;
    border-radius: var(--tb-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tb-badge-primary {
    background: var(--tb-primary-light);
    color: var(--tb-primary);
}

.tb-badge-success {
    background: var(--tb-success-light);
    color: var(--tb-success);
}

.tb-badge-warning {
    background: var(--tb-warning-light);
    color: var(--tb-warning-dark);
}

.tb-badge-danger {
    background: var(--tb-danger-light);
    color: var(--tb-danger);
}

.tb-badge-info {
    background: var(--tb-info-light);
    color: var(--tb-info);
}

.tb-badge-muted {
    background: var(--tb-bg-list);
    color: var(--tb-text-muted);
}

/* Tag System */
.tb-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--tb-space-xs);
    padding: var(--tb-space-xs) var(--tb-space-sm);
    background: var(--tb-bg-list);
    border-radius: var(--tb-radius-sm);
    font-size: var(--tb-font-sm);
    color: var(--tb-text-primary);
    transition: all var(--tb-transition-fast);
}

.tb-tag-remove {
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--tb-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all var(--tb-transition-fast);
}

.tb-tag-remove:hover {
    background: var(--tb-danger-light);
    color: var(--tb-danger);
}

/* =========================================================================
   AVATAR SYSTEM
   ========================================================================= */

.tb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    color: white;
    font-weight: 600;
    font-size: var(--tb-font-sm);
    flex-shrink: 0;
}

.tb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tb-avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.tb-avatar-sm { width: 32px; height: 32px; font-size: var(--tb-font-xs); }
.tb-avatar-md { width: 40px; height: 40px; font-size: var(--tb-font-sm); }
.tb-avatar-lg { width: 48px; height: 48px; font-size: var(--tb-font-base); }
.tb-avatar-xl { width: 64px; height: 64px; font-size: var(--tb-font-lg); }

/* Avatar Stack */
.tb-avatar-stack {
    display: flex;
    align-items: center;
}

.tb-avatar-stack .tb-avatar {
    border: 2px solid white;
    margin-left: -10px;
    transition: all var(--tb-transition-fast);
}

.tb-avatar-stack .tb-avatar:first-child {
    margin-left: 0;
}

.tb-avatar-stack .tb-avatar:hover {
    transform: scale(1.1);
    z-index: 10;
}

.tb-avatar-stack .tb-avatar-more {
    background: var(--tb-bg-list);
    color: var(--tb-text-secondary);
}

/* =========================================================================
   DROPDOWN SYSTEM
   ========================================================================= */

.tb-dropdown {
    position: relative;
    display: inline-block;
}

.tb-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-xl);
    z-index: var(--tb-z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--tb-transition-fast);
    overflow: hidden;
}

.tb-dropdown.open .tb-dropdown-menu,
.tb-dropdown-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tb-dropdown-menu-right {
    left: auto;
    right: 0;
}

.tb-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    padding: var(--tb-space-md) var(--tb-space-lg);
    font-size: var(--tb-font-base);
    color: var(--tb-text-primary);
    cursor: pointer;
    transition: all var(--tb-transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.tb-dropdown-item:hover {
    background: var(--tb-bg-hover);
}

.tb-dropdown-item.active {
    background: var(--tb-primary-light);
    color: var(--tb-primary);
}

.tb-dropdown-item.danger {
    color: var(--tb-danger);
}

.tb-dropdown-item.danger:hover {
    background: var(--tb-danger-light);
}

.tb-dropdown-divider {
    height: 1px;
    background: var(--tb-border);
    margin: var(--tb-space-xs) 0;
}

.tb-dropdown-header {
    padding: var(--tb-space-sm) var(--tb-space-lg);
    font-size: var(--tb-font-xs);
    font-weight: 600;
    color: var(--tb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================================================
   EMPTY STATE COMPONENT
   ========================================================================= */

.tb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--tb-space-3xl) var(--tb-space-xl);
    text-align: center;
}

.tb-empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--tb-space-lg);
    opacity: 0.5;
}

.tb-empty-state-title {
    font-size: var(--tb-font-xl);
    font-weight: 600;
    color: var(--tb-text-primary);
    margin: 0 0 var(--tb-space-sm);
}

.tb-empty-state-description {
    font-size: var(--tb-font-base);
    color: var(--tb-text-secondary);
    margin: 0 0 var(--tb-space-xl);
    max-width: 400px;
}

/* =========================================================================
   SKELETON LOADING
   ========================================================================= */

.tb-skeleton {
    background: linear-gradient(90deg, var(--tb-bg-list) 25%, var(--tb-bg-main) 50%, var(--tb-bg-list) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--tb-radius-sm);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tb-skeleton-text {
    height: 16px;
    margin-bottom: var(--tb-space-sm);
}

.tb-skeleton-text:last-child {
    width: 70%;
}

.tb-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.tb-skeleton-card {
    height: 100px;
    border-radius: var(--tb-radius-md);
}

/* =========================================================================
   UTILITY CLASSES
   ========================================================================= */

/* Spacing */
.tb-mt-0 { margin-top: 0 !important; }
.tb-mt-xs { margin-top: var(--tb-space-xs) !important; }
.tb-mt-sm { margin-top: var(--tb-space-sm) !important; }
.tb-mt-md { margin-top: var(--tb-space-md) !important; }
.tb-mt-lg { margin-top: var(--tb-space-lg) !important; }
.tb-mt-xl { margin-top: var(--tb-space-xl) !important; }

.tb-mb-0 { margin-bottom: 0 !important; }
.tb-mb-xs { margin-bottom: var(--tb-space-xs) !important; }
.tb-mb-sm { margin-bottom: var(--tb-space-sm) !important; }
.tb-mb-md { margin-bottom: var(--tb-space-md) !important; }
.tb-mb-lg { margin-bottom: var(--tb-space-lg) !important; }
.tb-mb-xl { margin-bottom: var(--tb-space-xl) !important; }

.tb-p-0 { padding: 0 !important; }
.tb-p-sm { padding: var(--tb-space-sm) !important; }
.tb-p-md { padding: var(--tb-space-md) !important; }
.tb-p-lg { padding: var(--tb-space-lg) !important; }
.tb-p-xl { padding: var(--tb-space-xl) !important; }

/* Text */
.tb-text-center { text-align: center !important; }
.tb-text-left { text-align: left !important; }
.tb-text-right { text-align: right !important; }

.tb-text-primary { color: var(--tb-text-primary) !important; }
.tb-text-secondary { color: var(--tb-text-secondary) !important; }
.tb-text-muted { color: var(--tb-text-muted) !important; }
.tb-text-success { color: var(--tb-success) !important; }
.tb-text-danger { color: var(--tb-danger) !important; }
.tb-text-warning { color: var(--tb-warning-dark) !important; }

.tb-font-bold { font-weight: 600 !important; }
.tb-font-normal { font-weight: 400 !important; }

/* Display */
.tb-hidden { display: none !important; }
.tb-block { display: block !important; }
.tb-inline-block { display: inline-block !important; }
.tb-flex { display: flex !important; }
.tb-inline-flex { display: inline-flex !important; }
.tb-grid { display: grid !important; }

/* Flexbox */
.tb-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tb-flex-wrap { flex-wrap: wrap !important; }
.tb-gap-xs { gap: var(--tb-space-xs) !important; }
.tb-gap-sm { gap: var(--tb-space-sm) !important; }
.tb-gap-md { gap: var(--tb-space-md) !important; }
.tb-gap-lg { gap: var(--tb-space-lg) !important; }

/* Width */
.tb-w-full { width: 100% !important; }
.tb-w-auto { width: auto !important; }

/* Cursor */
.tb-cursor-pointer { cursor: pointer !important; }
.tb-cursor-not-allowed { cursor: not-allowed !important; }

/* Visibility */
.tb-invisible { visibility: hidden !important; }
.tb-visible { visibility: visible !important; }

/* Overflow */
.tb-overflow-hidden { overflow: hidden !important; }
.tb-overflow-auto { overflow: auto !important; }
.tb-overflow-scroll { overflow: scroll !important; }

/* =========================================================================
   ANIMATIONS
   ========================================================================= */

.tb-fade-in {
    animation: tb-fade-in 0.3s ease;
}

@keyframes tb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tb-slide-up {
    animation: tb-slide-up 0.3s ease;
}

@keyframes tb-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tb-scale-in {
    animation: tb-scale-in 0.2s ease;
}

@keyframes tb-scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tb-shake {
    animation: tb-shake 0.5s ease;
}

@keyframes tb-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Pulse animation for notifications */
.tb-pulse {
    animation: tb-pulse 2s infinite;
}

@keyframes tb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* =========================================================================
   RESPONSIVE ADDITIONS
   ========================================================================= */

@media (max-width: 768px) {
    .tb-toast-container {
        left: var(--tb-space-lg);
        right: var(--tb-space-lg);
        bottom: var(--tb-space-lg);
    }

    .tb-toast {
        min-width: auto;
        max-width: none;
    }

    .tb-stats-panel {
        width: 100%;
    }

    .tb-modal-sm,
    .tb-modal-md,
    .tb-modal-lg,
    .tb-modal-xl {
        width: calc(100vw - 32px);
    }

    .tb-form-row,
    .tb-form-row-3 {
        grid-template-columns: 1fr;
    }

    .tb-stats-grid {
        grid-template-columns: 1fr;
    }
}
/**
 * Expense Manager Styles
 */

/* Base button styles for frontend */
.expense-manager-wrap .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    text-decoration: none;
    line-height: 1.4;
}

.expense-manager-wrap .button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.expense-manager-wrap .button-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    border: none;
    color: #fff !important;
}

.expense-manager-wrap .button-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4291 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.expense-manager-wrap .button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* Header */
.expense-manager-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.expense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.expense-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3a5f;
    font-size: 28px;
    margin: 0;
}

.expense-header h1 .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #10b981;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions .button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    height: auto;
}

/* Summary Cards */
.expense-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 1200px) {
    .expense-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .expense-summary-cards {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.summary-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-card .card-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

.summary-card.total-monthly .card-icon {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
}

.summary-card.total-salaries .card-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.summary-card.total-subscriptions .card-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.summary-card.total-other .card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.summary-card .card-content {
    flex: 1;
}

.summary-card .card-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.summary-card .card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Filters */
.expense-filters {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Table */
.expense-table-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.expense-table {
    border: none;
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.expense-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    padding: 15px 12px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-align: right;
}

.expense-table tbody td {
    padding: 15px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.expense-table tbody tr:hover {
    background: #f8fafc;
}

.expense-table tbody tr.loading-row td {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.expense-table tbody tr.no-expenses td {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

.expense-table .col-name {
    width: 20%;
    font-weight: 600;
}

.expense-table .col-category {
    width: 12%;
}

.expense-table .col-amount,
.expense-table .col-amount-ils,
.expense-table .col-monthly {
    width: 10%;
    font-family: 'Courier New', monospace;
}

.expense-table .col-frequency {
    width: 8%;
}

.expense-table .col-dates {
    width: 15%;
}

.expense-table .col-status {
    width: 8%;
}

.expense-table .col-actions {
    width: 10%;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.category-badge.subscription {
    background: #dbeafe;
    color: #1e40af;
}

.category-badge.salary {
    background: #d1fae5;
    color: #065f46;
}

.category-badge.rent {
    background: #fef3c7;
    color: #92400e;
}

.category-badge.utilities {
    background: #e0e7ff;
    color: #3730a3;
}

.category-badge.marketing {
    background: #fce7f3;
    color: #9d174d;
}

.category-badge.insurance {
    background: #cffafe;
    color: #0e7490;
}

.category-badge.accounting {
    background: #f3e8ff;
    color: #6b21a8;
}

.category-badge.legal {
    background: #fef9c3;
    color: #854d0e;
}

.category-badge.office {
    background: #f1f5f9;
    color: #475569;
}

.category-badge.travel {
    background: #ffedd5;
    color: #9a3412;
}

.category-badge.other {
    background: #f3f4f6;
    color: #4b5563;
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive,
.status-badge.expired {
    background: #fee2e2;
    color: #991b1b;
}

/* Frequency badge */
.frequency-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #f3f4f6;
    color: #4b5563;
}

.frequency-badge.one_time {
    background: #fef3c7;
    color: #92400e;
}

/* Date display */
.date-display {
    font-size: 12px;
    color: #6b7280;
}

.date-display .date-start {
    color: #10b981;
}

.date-display .date-end {
    color: #ef4444;
}

.date-display .date-ongoing {
    color: #6b7280;
    font-style: italic;
}

/* Actions */
.expense-actions {
    display: flex;
    gap: 5px;
}

.expense-actions .btn-action {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expense-actions .btn-action:hover {
    background: #f3f4f6;
}

.expense-actions .btn-action.btn-edit:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #3b82f6;
}

.expense-actions .btn-action.btn-delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

/* Modal */
.expense-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    padding: 20px;
}

.expense-modal .modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.expense-modal .modal-content.modal-sm {
    max-width: 400px;
}

.expense-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.expense-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e3a5f;
}

.expense-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.expense-modal .modal-close:hover {
    color: #1f2937;
}

.expense-modal .modal-body {
    padding: 25px;
}

/* Form */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    flex: 1 0 100%;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group .field-hint {
    font-size: 11px;
    color: #6b7280;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.form-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    height: auto;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-actions .button-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    border: none;
    color: #fff !important;
}

.form-actions .button-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4291 100%);
}

.form-actions .modal-cancel {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

.form-actions .modal-cancel:hover {
    background: #e5e7eb;
}

/* Exchange rates */
.exchange-rates-info {
    color: #6b7280;
    margin-bottom: 20px;
    text-align: center;
}

.last-updated {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .expense-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .expense-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
    
    .expense-table-container {
        overflow-x: auto;
    }
    
    .expense-table {
        min-width: 800px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.expense-modal {
    animation: fadeIn 0.2s ease-out;
}

.expense-modal .modal-content {
    animation: slideIn 0.3s ease-out;
}

/* Currency colors */
.currency-usd {
    color: #10b981;
}

.currency-eur {
    color: #3b82f6;
}

.currency-gbp {
    color: #8b5cf6;
}

.currency-ils {
    color: #1e3a5f;
}

/* Expired row */
.expense-table tbody tr.expired {
    opacity: 0.6;
    background: #fef2f2;
}

.expense-table tbody tr.expired:hover {
    background: #fee2e2;
}
/**
 * Profit Calculator Styles
 * Password-protected profit calculation page
 */

/* Login Container */
.profit-calc-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    margin: -20px -20px 0 -20px;
    padding: 40px;
}

.profit-calc-login-box {
    background: #fff;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.profit-calc-login-box .login-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.profit-calc-login-box h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.profit-calc-login-box .login-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.login-input-group {
    margin-bottom: 20px;
}

.profit-calc-password-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.3s;
}

.profit-calc-password-input:focus {
    outline: none;
    border-color: #F8BC32;
}

.profit-calc-login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profit-calc-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Main Calculator Container */
.profit-calculator-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.profit-calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.profit-calc-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3a5f;
    font-size: 32px;
}

.profit-calc-header h1 .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions .button {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* General Button Styles */
.profit-calculator-wrap .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: all 0.2s;
    text-decoration: none;
}

.profit-calculator-wrap .btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.profit-calculator-wrap .btn-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    border-color: #F8BC32;
    color: #fff;
}

.profit-calculator-wrap .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    border-color: #5a6fd6;
}

.profit-calculator-wrap .btn-secondary {
    background: #6b7280;
    border-color: #6b7280;
    color: #fff;
}

.profit-calculator-wrap .btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
}

/* Calculator Grid */
.profit-calc-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    .profit-calc-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .profit-calc-container {
        grid-template-columns: 1fr;
    }
}

/* Section Cards */
.calc-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.calc-section h2 {
    color: #1e3a5f;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F8BC32;
}

.calc-section h3 {
    color: #4a5568;
    font-size: 14px;
    margin: 20px 0 10px;
}

/* Input Groups */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.input-group input[type="number"],
.input-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-with-currency,
.input-with-percent {
    position: relative;
}

.input-with-currency .currency {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
}

.input-with-currency input {
    padding-right: 35px;
}

.input-with-percent .percent {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
}

.input-with-percent input {
    padding-left: 35px;
}

/* Calculated Values */
.input-group.calculated {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.input-group.calculated label {
    margin-bottom: 4px;
}

.calculated-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 1px dashed #d1d5db;
    margin: 20px 0;
}

/* Custom Expenses */
.custom-expenses-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.custom-expense-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.custom-expense-item input[type="text"] {
    flex: 1;
}

.custom-expense-item input[type="number"] {
    width: 120px;
}

.custom-expense-item .remove-expense-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-expense-item .remove-expense-btn:hover {
    background: #dc2626;
}

.add-expense-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

/* Results Section */
.calc-results {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
}

.calc-results h2 {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.result-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.result-card .result-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.result-card .result-value {
    font-size: 20px;
    font-weight: 700;
}

.result-card .result-roi {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.result-card.roas {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
}

.result-card.roas .result-value,
.result-card.roas .result-label {
    color: #fff;
}

.result-card.roas .result-value {
    font-size: 32px;
}

.result-card.highlight {
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
}

.result-card.highlight .result-value,
.result-card.highlight .result-label {
    color: #fff;
}

.result-card.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.result-card.success .result-value,
.result-card.success .result-label {
    color: #fff;
}

.result-card.info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.result-card.info .result-value,
.result-card.info .result-label {
    color: #fff;
}

.result-card.cpa-target {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.result-card.cpa-target .result-value,
.result-card.cpa-target .result-label {
    color: #fff;
}

.result-card.cpa-target .result-value {
    font-size: 28px;
}

/* Summary Table */
.summary-table-wrap {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.summary-table th,
.summary-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-table th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
}

.summary-table td {
    color: #fff;
}

.summary-table .row-revenue {
    background: rgba(248, 188, 50, 0.2);
}

.summary-table .row-revenue td {
    font-weight: 600;
    color: #F8BC32;
}

.summary-table .row-expense td {
    color: rgba(255, 255, 255, 0.9);
}

.summary-table .row-profit {
    background: rgba(16, 185, 129, 0.2);
}

.summary-table .row-profit td {
    color: #10b981;
}

.summary-table .row-profit-net {
    background: rgba(16, 185, 129, 0.3);
}

.summary-table .row-profit-net td {
    color: #34d399;
}

.summary-table .row-orders {
    background: rgba(59, 130, 246, 0.2);
}

.summary-table .row-orders td {
    color: #60a5fa;
    font-weight: 600;
}

.result-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

/* Input Row - for side by side inputs */
.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row .input-group {
    margin-bottom: 0;
}

.input-group.half {
    flex: 1;
}

.calc-section h3 {
    color: #4a5568;
    font-size: 14px;
    margin: 15px 0 10px;
    font-weight: 600;
}

/* Scenario Comparison Section */
.scenario-comparison-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F8BC32;
}

.scenario-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e3a5f;
}

.scenario-actions {
    display: flex;
    gap: 10px;
}

.scenario-actions .button,
.scenario-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: all 0.2s;
}

.scenario-actions .btn-add-scenario {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #fff;
}

.scenario-actions .btn-add-scenario:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.scenarios-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.scenarios-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
}

.scenario-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.scenario-card.active {
    border-color: #F8BC32;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.scenario-card-header {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-card-header .scenario-name {
    font-weight: 600;
    font-size: 14px;
}

.scenario-header-actions {
    display: flex;
    gap: 6px;
}

.scenario-card-header .scenario-load,
.scenario-card-header .scenario-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.scenario-card-header .scenario-load:hover {
    background: rgba(16, 185, 129, 0.8);
}

.scenario-card-header .scenario-remove:hover {
    background: rgba(239, 68, 68, 0.8);
}

.scenario-card-body {
    padding: 15px;
}

.scenario-card-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.scenario-card-body table td {
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}

.scenario-card-body table td:first-child {
    color: #6b7280;
    width: 60px;
}

.scenario-card-body table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
}

.scenario-card-body table td.scenario-pct {
    text-align: left;
    font-size: 11px;
    color: #9ca3af;
    width: 50px;
}

.scenario-card-body table tr.expense-row td.scenario-pct {
    color: #ef4444;
}

.scenario-card-body .profit-pct {
    font-size: 12px;
    margin-top: 3px;
    opacity: 0.9;
}

.scenario-card-body .scenario-highlight {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    margin: -15px -15px 10px -15px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-card-body .scenario-highlight .label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
}

.scenario-card-body .scenario-highlight .value {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.scenario-card-body .scenario-profit {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.scenario-card-body .scenario-profit.positive {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.scenario-card-body .scenario-profit.negative {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.scenario-card-body .scenario-profit .profit-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 3px;
}

.scenario-card-body .scenario-profit .profit-value {
    font-size: 18px;
    font-weight: 700;
}

.scenario-card-body .scenario-profit.positive .profit-value {
    color: #10b981;
}

.scenario-card-body .scenario-profit.negative .profit-value {
    color: #ef4444;
}

/* Scenario Inline Edit Form */
.scenario-card.editing {
    border-color: #F8BC32;
    box-shadow: 0 4px 16px rgba(248, 188, 50, 0.3);
}

.scenario-edit-form {
    padding: 10px 0;
}

.scenario-edit-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.scenario-edit-row label {
    flex: 0 0 70px;
    font-size: 12px;
    color: #6b7280;
}

.scenario-edit-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
}

.scenario-edit-row input:focus {
    outline: none;
    border-color: #F8BC32;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.scenario-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.scenario-edit-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

.scenario-save-edit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    border-color: #10b981 !important;
}

/* Actions */
.profit-calc-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.profit-calc-actions .button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 16px;
}

.profit-calc-actions .button-primary {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    border: none;
}

.profit-calc-actions .button-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Modal */
.profit-calc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.profit-calc-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profit-calc-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.profit-calc-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.profit-calc-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

.profit-calc-modal .modal-close:hover {
    color: #1f2937;
}

.profit-calc-modal .modal-body {
    padding: 25px;
}

/* Responsive */
@media (max-width: 600px) {
    .profit-calc-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .profit-calc-header h1 {
        font-size: 24px;
    }
    
    .profit-calc-actions {
        flex-direction: column;
    }
    
    .profit-calc-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-section {
    animation: fadeIn 0.3s ease-out;
}

.calc-section:nth-child(1) { animation-delay: 0.1s; }
.calc-section:nth-child(2) { animation-delay: 0.2s; }
.calc-section:nth-child(3) { animation-delay: 0.3s; }
.calc-section:nth-child(4) { animation-delay: 0.4s; }

/* RTL Support */
[dir="rtl"] .input-with-currency .currency {
    right: auto;
    left: 12px;
}

[dir="rtl"] .input-with-currency input {
    padding-right: 12px;
    padding-left: 35px;
}

[dir="rtl"] .input-with-percent .percent {
    left: auto;
    right: 12px;
}

[dir="rtl"] .input-with-percent input {
    padding-left: 12px;
    padding-right: 35px;
}

/* Positive/Negative values */
.positive {
    color: #10b981 !important;
}

.negative {
    color: #ef4444 !important;
}

/* Integrated Expenses Section */
.integrated-expenses-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #F8BC32;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    margin: 20px -25px -25px -25px;
    padding: 20px 25px 25px 25px;
    border-radius: 0 0 12px 12px;
}

.integrated-expenses-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e3a5f;
    margin-bottom: 15px;
}

.expense-manager-link {
    color: #F8BC32;
    text-decoration: none;
}

.expense-manager-link:hover {
    color: #e5a820;
}

.expense-manager-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.integrated-expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
}

.integrated-expense-item .expense-label {
    color: #4a5568;
}

.integrated-expense-item .expense-value {
    font-weight: 600;
    color: #1e3a5f;
    font-family: 'Courier New', monospace;
}

.integrated-expense-item.total {
    background: linear-gradient(135deg, #F8BC32 0%, #e5a820 100%);
    margin-top: 12px;
}

.integrated-expense-item.total .expense-label,
.integrated-expense-item.total .expense-value {
    color: #fff;
    font-weight: 700;
}

.use-integrated-expenses {
    margin-top: 15px;
    font-size: 13px;
}

.use-integrated-expenses input[type="checkbox"] {
    margin-left: 8px;
}
/**
 * Marketing ROAS Dashboard Styles
 */

.acom-marketing-wrap {
    padding: 20px 20px 20px 0;
}

.acom-marketing-wrap .nav-tab-wrapper {
    border-bottom: 1px solid #ccc;
    margin-bottom: 0;
    padding-bottom: 0;
}

.acom-marketing-wrap .nav-tab {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
}

.acom-marketing-wrap .nav-tab-active {
    background: #fff;
    border-bottom-color: #fff;
}

/* Cards */
.acom-marketing-wrap .card {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.acom-marketing-wrap .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 16px;
}

.acom-marketing-wrap .card-body {
    padding: 16px;
}

/* Platform Cards */
.platform-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.platform-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.platform-card .card-header {
    border-bottom: none;
}

.platform-card.facebook .card-header {
    background: linear-gradient(135deg, #1877f2, #0d5cc7);
}

.platform-card.google .card-header {
    background: linear-gradient(135deg, #ea4335, #c5221f);
}

.platform-card.tiktok .card-header {
    background: linear-gradient(135deg, #000000, #1f1f1f);
}

/* Summary Cards */
#summary-cards .card {
    border: none;
    border-radius: 12px;
}

#summary-cards .card-title {
    font-size: 2rem;
    font-weight: 700;
}

#summary-cards .bg-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
}

#summary-cards .bg-success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
}

#summary-cards .bg-info {
    background: linear-gradient(135deg, #0891b2, #06b6d4) !important;
}

#summary-cards .bg-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
}

/* Tables */
.acom-marketing-wrap .table {
    font-size: 13px;
}

.acom-marketing-wrap .table th {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.acom-marketing-wrap .table td {
    vertical-align: middle;
}

.acom-marketing-wrap .table-responsive {
    border-radius: 0 0 8px 8px;
}

/* Platform Icons in Tables */
.platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
}

.platform-icon.facebook {
    background: #1877f2;
    color: white;
}

.platform-icon.google {
    background: #ea4335;
    color: white;
}

.platform-icon.tiktok {
    background: #000000;
    color: white;
}

/* ROAS Colors */
.roas-excellent {
    color: #059669;
    font-weight: 600;
}

.roas-good {
    color: #0891b2;
    font-weight: 600;
}

.roas-average {
    color: #d97706;
    font-weight: 600;
}

.roas-poor {
    color: #dc2626;
    font-weight: 600;
}

/* Loading State */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Date Range Buttons */
#date-range-buttons .btn.active {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* Connection Status */
.connected-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px;
}

/* Forms */
.credentials-form .form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Charts */
#spend-revenue-chart,
#platform-pie-chart,
#report-chart {
    max-height: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .acom-marketing-wrap {
        padding: 10px;
    }
    
    #summary-cards .card-title {
        font-size: 1.5rem;
    }
    
    .acom-marketing-wrap .table {
        font-size: 12px;
    }
}

/* Toast Styling */
.toast-container .toast {
    min-width: 300px;
}

.toast-container .toast.success .toast-icon {
    color: #059669;
}

.toast-container .toast.error .toast-icon {
    color: #dc2626;
}

/* Accordion */
.acom-marketing-wrap .accordion-button:not(.collapsed) {
    background-color: #f0f9ff;
    color: #1e40af;
}

.acom-marketing-wrap .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Sticky Table Header */
.table-responsive .sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
}

/* Daily Breakdown Row Hover */
#daily-breakdown-table tbody tr:hover {
    background-color: #f0f9ff;
}

/* Filter Buttons */
.platform-filter.active {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: white !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 16px;
}

/* Sync Animation */
.syncing .bi-arrow-repeat {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Alert Customization */
.acom-marketing-wrap .alert {
    border-radius: 8px;
    border: none;
}

.acom-marketing-wrap .alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.acom-marketing-wrap .alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.acom-marketing-wrap .alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}
/**
 * Hidden Cards CSS
 * 
 * Use this file to temporarily hide dashboard cards.
 * Simply uncomment/comment the cards you want to hide/show.
 * 
 * Card IDs reference (stat-{key}):
 * - stat-new_orders_for_processing
 * - stat-processing_parent_split_orders
 * - stat-partial_shipped_split_orders
 * - stat-on-hold
 * - stat-fac (Can Produce, Waiting for Tracking Number)
 * - stat-miss (Info Missing Orders)
 * - stat-shipped (Orders In Producing)
 * - stat-need-artwork
 * - stat-artwork-ready-for (Waiting for Design Approval)
 * - stat-prob (Orders With Problem)
 * - stat-problem-to-agent (Orders With Problem For Agent)
 * - stat-shipped_orders
 * - stat-exported_to_sheets
 * - stat-needspacking
 * - stat-readytoship
 * - stat-halfway-produce
 * - stat-readyforpickup
 * - stat-needsrefund
 * - stat-urgent-things
 * - stat-needfixurgent
 * - stat-backtooffice (Orders Came Back To Office)
 * - stat-orders_producing_more_than_seven_days
 * - stat-orders_more_than_fifteen_days
 * - stat-orders_processing_more_than_two_days
 * - stat-orders_can_produce_more_than_two_days
 * - stat-orders_shipment_auto_problem
 * - stat-orders_not_assigned_to_agent
 */

/* ============================================
   CURRENTLY HIDDEN CARDS
   ============================================ */

/* Orders Shipment AUTO Problem */
#stat-orders_shipment_auto_problem,
.col:has(#stat-orders_shipment_auto_problem) {
    display: none !important;
}

/* NOTE: The following cards have been removed from Dashboard/Content.php:
   - Exported to Sheets, Waiting for tracking number (stat-exported_to_sheets)
   - Orders With Problem For Agent (stat-problem-to-agent)
   - Orders With Problem (stat-prob)
   - Ready To Ship (stat-readytoship)
*/

/* ============================================
   HIDDEN TABLE COLUMNS
   ============================================ */

/* Hide Shipment Status column (7th column) on orders table */
.table thead th:nth-child(7),
.table tbody td:nth-child(7) {
    display: none !important;
}


/* ============================================
   CARDS TO UNHIDE LATER (commented out)
   Uncomment below to hide, comment to show
   ============================================ */

/*
#stat-new_orders_for_processing {
    display: none !important;
}

#stat-on-hold {
    display: none !important;
}

#stat-prob {
    display: none !important;
}
*/

/* ============================================
   FIX: Modal Z-Index & Backdrop Prevention
   Ensures modals are always interactive and never blocked
   ============================================ */

/* Hide all backdrop elements */
.modal-backdrop,
.offcanvas-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Ensure modals are always on top and interactive */
.modal {
    z-index: 1055 !important;
}

.modal.show {
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1056 !important;
    pointer-events: auto !important;
}

.modal-content {
    pointer-events: auto !important;
    position: relative;
    z-index: 1 !important;
}

/* Prevent body scroll lock issues */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* =========================================================================
   FILE DROP ZONE
   ========================================================================= */

.file-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    background: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-drop-zone:hover {
    border-color: #0079bf;
    background: #f0f7ff;
}

.file-drop-zone.active {
    border-color: #61bd4f;
    background: #e8f5e9;
    transform: scale(1.02);
}

.file-drop-zone.active .drop-zone-content svg {
    color: #61bd4f;
    animation: bounce 0.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-zone-content svg {
    color: #999;
    transition: color 0.2s;
}

.drop-zone-content p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

.drop-zone-content span {
    font-size: 12px;
    color: #999;
}

/* =========================================================================
   IMAGE ANNOTATION EDITOR
   ========================================================================= */

.image-editor-modal {
    position: fixed;
    top: 2%;
    left: 2%;
    right: 2%;
    bottom: 2%;
    transform: none;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    z-index: 100002;
    display: flex;
    flex-direction: column;
}

.editor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.editor-header h3 {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
}

.editor-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.tool-btn:hover {
    background: #f0f0f0;
    border-color: #0079bf;
}

.tool-btn.active {
    background: #0079bf;
    border-color: #0079bf;
    color: white;
}

.tool-btn.active svg {
    fill: white;
}

.tool-btn.active path {
    fill: white;
}

.tool-btn.danger:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: white;
}

.tool-separator {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 8px;
}

.editor-tools input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

.editor-tools select {
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.editor-header .modal-close {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-header .modal-close:hover {
    background: #f0f0f0;
}

.editor-canvas-wrapper {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

#annotationCanvas {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    max-height: 100%;
}

.editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Edit and View buttons for images in attachments */
.edit-image-btn,
.view-image-btn {
    background: none;
    border: none;
    color: #0079bf;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
}

.edit-image-btn:hover,
.view-image-btn:hover {
    text-decoration: underline;
}

/* Clickable image thumbnails */
.attachment-thumb img {
    cursor: pointer;
    transition: opacity 0.15s;
}

.attachment-thumb img:hover {
    opacity: 0.8;
}

/* =========================================================================
   IMAGE LIGHTBOX VIEWER
   ========================================================================= */

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100005;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-actions {
    position: absolute;
    top: -50px;
    right: 0;
    display: flex;
    gap: 8px;
}

.lightbox-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    text-decoration: none;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-btn svg {
    fill: white;
}

.lightbox-btn path {
    fill: white;
}

/* =========================================================================
   RICH TEXT EDITOR FOR DESCRIPTION
   ========================================================================= */

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    align-items: center;
}

.rte-btn {
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #555;
    transition: all 0.15s;
}

.rte-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.rte-btn.active {
    background: #0079bf;
    color: white;
    border-color: #0079bf;
}

.rte-separator {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

.rte-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
}

.rte-color {
    width: 32px;
    height: 32px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.rich-text-content {
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    background: white;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
}

.rich-text-content:focus {
    border-color: #0079bf;
    box-shadow: 0 0 0 2px rgba(0, 121, 191, 0.1);
}

.rich-text-content:empty:before {
    content: attr(placeholder);
    color: #aaa;
    pointer-events: none;
}

.rich-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
    cursor: pointer;
}

.rich-text-content a {
    color: #0079bf;
    text-decoration: underline;
}

/* RTL support */
.rich-text-content[dir="rtl"] {
    text-align: right;
}

/* Drag highlight for dropping attachments */
.rich-text-content.drag-over {
    background: #e8f4fd;
    border-color: #0079bf;
}

/* Insert image picker modal */
.image-picker-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    min-width: 200px;
}

.image-picker-dropdown .picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
}

.image-picker-dropdown .picker-item:hover {
    background: #f0f0f0;
}

.image-picker-dropdown .picker-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.image-picker-dropdown .picker-item span {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Description Editor Fullscreen Mode */
.description-editor.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 40px 80px;
    box-sizing: border-box;
}

.description-editor.fullscreen .rich-text-toolbar {
    flex-shrink: 0;
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
}

.description-editor.fullscreen .rich-text-content {
    flex: 1;
    height: auto;
    min-height: 0;
    max-height: none;
    font-size: 18px;
    line-height: 2;
    padding: 40px 50px;
    border-radius: 10px;
    overflow-y: auto;
    border: 1px solid #e1e4e8;
    background: #fff;
}

.description-editor.fullscreen .editor-actions {
    flex-shrink: 0;
    display: flex !important;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.description-editor.fullscreen .editor-actions button {
    padding: 12px 30px;
    font-size: 15px;
}

.description-editor.fullscreen #toggleFullscreen svg path {
    d: path("M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z");
}

/* View-only mode (read-only fullscreen) */
.description-editor.fullscreen.view-only .rich-text-toolbar {
    display: none;
}

.description-editor.fullscreen.view-only .rich-text-content {
    font-size: 20px;
    line-height: 2.2;
    padding: 60px 80px;
    cursor: default;
    background: #fefefe;
}

.description-editor.fullscreen.view-only .editor-actions {
    display: none !important;
}

/* View mode close button */
.view-mode-close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    transition: all 0.2s ease;
}

.view-mode-close-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
}

/* Fullscreen overlay backdrop */
.fullscreen-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
}

/* Highlighted View button */
#viewDescriptionBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    position: relative;
}

#viewDescriptionBtn:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
    transform: scale(1.05);
}

#viewDescriptionBtn svg path {
    fill: #fff !important;
}

#viewDescriptionBtn::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ffc107;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }

