/* FrozoFun sitewide UI styles. Entity-specific print and kiosk views remain standalone. */

/* Source consolidated from: assets\css\bootstrap-overrides.css */
/* Bootstrap Overrides - Minimal custom styling to maintain functionality */

/* Professional 3D Button Styling */
.btn-3d {
    position: relative;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(0);
    border-width: 2px;
    padding: 8px 16px; /* Consistent padding for all buttons */
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2), 0 3px 6px rgba(0,0,0,0.15);
}

.btn-3d:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
}

/* Badge Color Definitions for Status Indicators */
.badge-outstanding {
    background-color: var(--bs-danger) !important;
    color: white !important;
}

.badge-surplus {
    background-color: var(--bs-success) !important;
    color: white !important;
}

.badge-settled {
    background-color: var(--bs-secondary) !important;
    color: white !important;
}

/* Consistent button padding sitewide */
.btn {
    padding: 8px 16px;
    font-weight: 500;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.125rem;
}

/* Module and metric card hover effects */
.module-card, .metric-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.module-card:hover, .metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Disabled link styling */
.disabled-link {
    pointer-events: none;
    opacity: 0.6;
}

/* Enhanced card styling */
.card {
    border-radius: 10px;
}

/* Navbar brand hover effect */
.navbar-brand img {
    transition: transform 0.2s ease-in-out;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Nav link hover effects */
.nav-link {
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 6px;
}

/* Floating Action Button */
#floating-inventory-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1100;
    transition: all 0.3s ease;
    outline: none;
}

#floating-inventory-btn:hover {
    background: var(--bs-primary);
    filter: brightness(0.9);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

#floating-inventory-actions {
    position: fixed;
    right: 38px;
    bottom: 98px;
    z-index: 1200;
    min-width: 170px;
    animation: fadeInMenu 0.3s ease;
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(20px);}
    to   { opacity: 1; transform: translateY(0);}
}

.floating-actions-menu {
    background: var(--bs-body-bg);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 200px;
    border: 1px solid var(--bs-border-color);
}

.floating-action-item {
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    color: var(--bs-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
}

.floating-action-item:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.floating-action-item i {
    width: 16px;
    text-align: center;
}

/* Modal styling */
#floating-inventory-modal {
    position: fixed;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1300;
    width: auto;
    min-width: 0;
    min-height: 0;
    background: rgba(0,0,0,0.08);
}

.floating-modal-content {
    background: var(--bs-body-bg);
    border-radius: 12px;
    box-shadow: 0 4px 22px rgba(0,0,0,0.13);
    padding: 0 0 8px 0;
    width: auto;
    min-width: 0;
    min-height: 0;
    max-height: 72vh;
    position: relative;
    animation: fadeInModal 0.17s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(18px);}
    to   { opacity: 1; transform: translateY(0);}
}

#floating-inventory-modal-body {
    padding: 10px 2px 10px 2px;
    overflow-y: auto;
    overflow-x: visible;
    width: 100%;
    height: 100%;
    max-height: 62vh;
    /* Hide scrollbar but allow scrolling */
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* IE 10+ */
}

#floating-inventory-modal-body::-webkit-scrollbar { display: none; }

/* Modal styling for excess stock modal only - prevent conflicts with Bootstrap 5 */
#excess-stock-modal.modal {
    display: none;
}

#excess-stock-modal.modal.show { 
    display: flex !important;
}

#excess-stock-modal .modal-close { 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    color: var(--bs-secondary); 
    cursor: pointer; 
    margin-left: 18px;
}

#excess-stock-modal .modal-close:hover { 
    color: var(--bs-danger); 
}

/* Table styling */
.entity-table {
    border-collapse: collapse;
    width: 100%;
}

.entity-table th, .entity-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--bs-border-color);
    text-align: left;
}

.entity-table th {
    background: var(--bs-light);
}

.entity-table tr:nth-child(even) {
    background-color: var(--bs-light);
}

.entity-table tr:nth-child(odd) {
    background-color: var(--bs-body-bg);
}

/* Badge styling */
.badge-surplus {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success);
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 1em;
}

/* DataTable Bootstrap integration */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--bs-body-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--bs-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bs-primary-bg-subtle) !important;
    border-color: var(--bs-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
}

/* Flash messages */
.flash-message {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 300px;
}


/* Select2 to Smart select update */
/* 1. Target the Select AND the TomSelect replacement */
.smart-select, 
.ts-wrapper.smart-select .ts-control {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 45px !important;
    padding: 10px 12px !important;
    
    /* Your Premium Aesthetic */
    font-family: 'Exo 2', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
    background-color: #ffffff !important;
    border: 2px solid #bec3c9 !important;
    border-radius: 12px !important;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.05) !important;
    transition: all 0.2s;
    box-sizing: border-box;
}

/* 2. Fix the Arrow for the original Select (Non-JS version) */
select.smart-select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 12px !important;
    padding-right: 2.25rem !important;
}

/* 3. The "Anti-Double" Rule */
/* This stops the TomSelect container from having its own border, 
   allowing the inner .ts-control to hold the design. */
.ts-wrapper.smart-select {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* 4. Ensure TomSelect's dropdown matches the radius */
.ts-dropdown.smart-select {
    border-radius: 12px !important;
    border: 2px solid #bec3c9 !important;
    margin-top: 5px !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important;
}

/* 5. Small and Large Variants for JS components */
.smart-select-sm, .ts-wrapper.smart-select-sm .ts-control {
    min-height: 35px !important;
    padding: 5px 10px !important;
    font-size: 0.875rem !important;
    border-radius: 8px !important;
}

/* Source consolidated from: assets\css\inline-style-replacements.css */
/**
 * CSS replacements for removed inline styles
 * This file provides consistent Bootstrap styling to replace inline CSS
 */

/* General utility classes */
.cursor-pointer {
    cursor: pointer !important;
}

/* Icon container sizes for dashboard cards */
.icon-container-sm {
    width: 50px !important;
    height: 50px !important;
}

.icon-container-md {
    width: 60px !important;
    height: 60px !important;
}

/* Badge Styling - Replace inline badge colors with consistent Bootstrap styles */
.badge-summary {
    background-color: var(--bs-primary) !important;
    color: white !important;
    font-size: 15px !important;
    padding: 6px 22px !important;
    min-width: 120px !important;
    display: inline-block;
    text-align: center;
    border-radius: var(--bs-border-radius);
}

.badge-summary.badge-total-received {
    background-color: var(--bs-dark) !important;
    min-width: 140px !important;
}

.badge-summary.badge-bank {
    background-color: var(--bs-info) !important;
}

.badge-summary.badge-cash {
    background-color: var(--bs-success) !important;
}

.badge-summary.badge-pending {
    background-color: var(--bs-warning) !important;
}

.badge-summary.badge-receivable {
    background-color: var(--bs-danger) !important;
    min-width: 140px !important;
}

.badge-disabled {
    background-color: var(--bs-danger) !important;
    color: white !important;
    margin-left: 4px;
    font-size: 0.92em;
}

/* Table Styling - Remove inline table striping and use consistent Bootstrap classes */
.table-consistent {
    width: 100% !important;
}

.table-consistent.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-consistent.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: var(--bs-gray-100);
}

/* Remove custom table row backgrounds, let Bootstrap handle it */
.entity-table tr {
    background-color: transparent !important;
}

.vendor-disabled-row {
    opacity: 0.65;
    background-color: var(--bs-light) !important;
}

/* Icon Styling - Consistent icon sizes and colors */
.icon-standard {
    font-size: 16px !important;
    color: var(--bs-primary) !important;
}

.icon-small {
    font-size: 14px !important;
}

.icon-large {
    font-size: 18px !important;
}

/* Text and Font Styling - Remove inline font sizes and colors */
.text-standard {
    font-size: 1rem !important;
    color: var(--bs-body-color) !important;
}


.text-success-custom {
    color: var(--bs-success) !important;
    font-size: 1.08em !important;
    text-align: center;
    padding: 18px 0;
}

/* Action Button Styling */
.action-btns {
    display: flex;
    flex-wrap: wrap;
}

/* Full-width primary button for forms */
.btn-primary-full {
    width: 100% !important;
    font-size: 1.13em !important;
}

/* Back button with left margin */
.btn-back-spaced {
    margin-left: 2em !important;
}

/* Orders page styling */
.orders-content .entity-header,
.orders-content .orders-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    margin-top: 18px;
}

.orders-content .entity-header h2,
.orders-content .orders-header-row h2 {
    margin: 0;
    font-weight: 700;
    color: #0070e0;
    font-size: 2rem;
    letter-spacing: -.5px;
}

.orders-content .orders-filter-action-row {
    width: 96%;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.orders-content .orders-filter-select {
    min-width: 180px;
    border-radius: 8px;
    border: 1.5px solid #eaf0fa;
    padding: 7px 12px;
    font-size: 1.06rem;
    color: #0070e0;
    background: #f9fbfd;
    margin-bottom: 7px;
}

.orders-content .orders-filter-select:focus {
    border: 1.5px solid #0070e0;
    outline: none;
    background: #fff;
}

.orders-content .orders-customer-link {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.orders-content .orders-customer-link:hover {
    text-decoration: underline;
    color: #128C7E !important;
}

.action-btns .btn-ico {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    color: var(--bs-primary) !important;
    box-shadow: none;
    transition: color 0.15s;
    min-width: 32px;
    min-height: 32px;
}

.action-btns .btn-ico:hover {
    color: var(--bs-primary-text-emphasis) !important;
    background-color: var(--bs-primary-bg-subtle) !important;
}

/* Batch Summary Styling */
.batch-summary-header {
    margin-bottom: 0 !important;
}

.batch-summary-badges {
    margin-bottom: 0 !important;
}

.batch-summary-modal {
    padding-bottom: 20px !important;
}

.batch-summary-modal.transparent-bg {
    padding-bottom: 20px !important;
}

/* Form Field Styling - Keep necessary form styling but remove unnecessary inline styles */
.form-field-custom {
    /* This class is preserved for entity-specific form customizations */
}

/* Header Selector Styling - Keep width auto for dropdowns in header */
#theme-selector,
#timezone-selector {
    width: auto !important;
}

/* Layout and Display Utilities */
.d-none-important {
    display: none !important;
}

.d-inline-block-important {
    display: inline-block !important;
}

.float-right {
    float: right !important;
}

.float-left {
    float: left !important;
}

.text-center-important {
    text-align: center !important;
}

.width-auto {
    width: auto !important;
}

.width-100 {
    width: 100% !important;
}

.max-width-700 {
    max-width: 700px !important;
}

.max-width-800 {
    max-width: 800px !important;
}

/* Margin and Padding Utilities */
.margin-0 {
    margin: 0 !important;
}

.margin-bottom-0 {
    margin-bottom: 0 !important;
}

.margin-bottom-05em {
    margin-bottom: 0.5em !important;
}

.margin-bottom-12px {
    margin-bottom: 12px !important;
}

.margin-left-4px {
    margin-left: 4px !important;
}

.margin-left-12px {
    margin-left: 12px !important;
}

.margin-right-30px {
    margin-right: 30px !important;
}

.margin-top-2px {
    margin-top: 2px !important;
}

.padding-2-5 {
    padding: 2px 5px !important;
}

.padding-12-center {
    padding: 12px;
    text-align: center;
}

.padding-36-0 {
    padding: 36px 0;
}

/* Font and Text Utilities */
.font-size-13 {
    font-size: 13px !important;
}

.font-size-14 {
    font-size: 14px !important;
}

.font-size-15 {
    font-size: 15px !important;
}

.font-size-1-3em {
    font-size: 1.3em !important;
}

.font-size-2-2em {
    font-size: 2.2em !important;
}

.font-size-2-5em {
    font-size: 2.5em !important;
}

.font-weight-bold {
    font-weight: bold !important;
}

/* Sizing Utilities */
.width-40px {
    width: 40px !important;
}

.height-40px {
    height: 40px !important;
}

.width-80px {
    width: 80px !important;
}

.width-150px {
    width: 150px !important;
}

.size-40px {
    width: 40px !important;
    height: 40px !important;
}

/* Image and Object Utilities */
.object-fit-cover {
    object-fit: cover !important;
}

/* Modal and Overlay Utilities */
.modal-overlay-hidden {
    display: none !important;
}

.modal-overlay-visible {
    display: flex !important;
}

.modal-close-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1.3em !important;
    float: right !important;
}

.modal-title-inline {
    display: inline-block !important;
}

.modal-action-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1.3em !important;
    float: right !important;
    margin-top: 2px !important;
    margin-right: 30px !important;
}

/* Loading Spinner */
.loading-center {
    text-align: center !important;
    margin: 36px 0 !important;
}

.loading-spinner {
    font-size: 2.5em !important;
    color: #3498db !important;
}

.loading-spinner-sm {
    font-size: 2.2em !important;
    color: #3498db !important;
}

/* Flex Utilities */
.flex-1 {
    flex: 1 !important;
}

.pointer-events-none {
    pointer-events: none !important;
}

.opacity-06 {
    opacity: 0.6 !important;
}

/* Success and Error Message Styling */
.link-error, .move-error {
    display: none !important;
    color: #c0392b !important;
    font-weight: bold !important;
    margin-top: 6px !important;
}

.link-success {
    display: none !important;
    color: #27ae60 !important;
    font-weight: bold !important;
    margin-top: 6px !important;
}

.error-visible {
    display: block !important;
}

.success-visible {
    display: block !important;
}

/* Form and Table Width Utilities */
.min-width-140px {
    min-width: 140px !important;
}

.max-width-420px {
    max-width: 420px !important;
}

.width-24 {
    width: 24% !important;
}

.width-10 {
    width: 10% !important;
}

.width-12 {
    width: 12% !important;
}

.width-14 {
    width: 14% !important;
}

.width-16 {
    width: 16% !important;
}

.margin-bottom-05rem {
    margin-bottom: 0.5rem !important;
}

.margin-right-05rem {
    margin-right: 0.5rem !important;
}

.margin-bottom-0 {
    margin-bottom: 0 !important;
}

/* Error and Alert Styling */
.error-red-center {
    color: red !important;
    text-align: center !important;
}

/* Modal and Overlay Styling */
.modal-overlay {
    display: none !important;
    background: rgba(0,0,0,0.25) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99 !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-overlay-flex {
    display: flex !important;
}

/* Form and Label Styling */
.form-width-100 {
    width: 100% !important;
}

.modal-title-centered {
    margin-bottom: 20px !important;
    text-align: center !important;
    color: #198754 !important;
    letter-spacing: 0.5px !important;
}

.form-section-margin {
    margin-bottom: 18px !important;
}

.form-row-flex {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 14px !important;
}

.radio-label-a4 {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    background: #f8fff5 !important;
    border-radius: 8px !important;
    border: 2px solid #b9de7e !important;
}

.radio-label-barcode {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    background: #f5faff !important;
    border-radius: 8px !important;
    border: 2px solid #6ec6ff !important;
}

.radio-input-green {
    accent-color: #198754 !important;
    margin-right: 10px !important;
    transform: scale(1.2) !important;
}

.radio-input-blue {
    accent-color: #2196f3 !important;
    margin-right: 10px !important;
    transform: scale(1.2) !important;
}

.font-weight-600 {
    font-weight: 600 !important;
}

.font-size-12 {
    font-size: 12px !important;
}

.font-size-11 {
    font-size: 11px !important;
}

.color-888 {
    color: #888 !important;
}

.margin-top-2px {
    margin-top: 2px !important;
}

.disabled-state {
    pointer-events: none !important;
    opacity: 0.6 !important;
}

/* Table Row Styling */
.table-disabled-row {
    opacity: 0.65 !important;
    background-color: var(--bs-light) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .badge-summary {
        font-size: 13px !important;
        padding: 4px 16px !important;
        min-width: 100px !important;
        margin-bottom: 5px;
    }
    
    .action-btns .btn-ico {
        font-size: 14px;
        min-width: 28px;
        min-height: 28px;
    }
}

.modal-content-box {
}


.margin-top-14px {
}

.text-align-right {
}

.btn-continue {
}


/* Packing Scan Specific Classes */
.container-scan {
}

.form-row-scan {
}

.margin-left-7px {
}

.modal-title-camera {
}

.modal-body-camera {
}

.camera-container {
}

.camera-video {
}

.camera-overlay {
}


/* Print Invoice Styling */
.no-print-center {
}

.print-btn {
}

.print-text {
}

.flex-align-center {
}

.order-no-text {
}


/* Payment and Form Styling */
.padding-18-0 {
}

.table-full-width {
}

.flex-gap-center {
}

.margin-bottom-14px {
}


.width-38px {
}

.color-red {
}

/* Source consolidated from: assets\css\list-pages-consistency.css */
/**
 * List Pages Design Consistency
 * Centralized styling for all list pages to ensure consistent design
 * Based on orders_list.php as the reference design
 */

/* ===== PAGE CONTAINER STRUCTURE ===== */
.page-content-wrapper {
    /* Wrapper for consistent page width like orders_list.php */
}
.ts-dropdown {
    z-index: 2000 !important;
}

/* If Select2 is lurking, it might be hiding your original select 
   with 'display: none !important', making TomSelect fail to measure it. */
select.smart-select.ts-hidden-accessible {
    display: none !important;
}
.page-content-wrapper .container {
    /* Standard container width for consistency */
}

/* ===== PAGE HEADER STANDARDIZATION ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    margin: 0;
    font-weight: 700;
    color: var(--bs-primary) !important;
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.page-header .page-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ===== BUTTON SPACING FOR STACKED BUTTONS ===== */
/* Add proper spacing for buttons below header */
.header-buttons-secondary {
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.header-buttons-secondary .btn {
    margin-bottom: 0.5rem;
}

/* ===== STANDARDIZED BUTTON CLASSES ===== */
/* 1st button pattern: Success color */
.btn-action-1 {
    /* Will use: btn btn-success btn-3d me-2 */
}

/* 2nd button pattern: Primary color */
.btn-action-2 {
    /* Will use: btn btn-primary btn-3d */
}

/* 3rd button pattern: Outline danger for trash/delete */
.btn-action-3 {
    /* Will use: btn btn-outline-danger btn-3d */
}

/* 4th button pattern: Warning color */
.btn-action-4 {
    /* Will use: btn btn-warning btn-3d me-2 */
}

/* ===== BADGE STANDARDIZATION ===== */
/* Reduced size badges for better visual consistency */
.badge-consistent {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    min-width: 70px;
    text-align: center;
}

.badge-consistent.badge-secondary { 
    background: #7f8c8d; 
}

.badge-consistent.badge-warning { 
    background: #f39c12; 
}

.badge-consistent.badge-success { 
    background: #2ecc40; 
}

.badge-consistent.badge-danger { 
    background: #e74c3c; 
}

.badge-consistent.badge-info { 
    background: #3498db; 
}

.badge-consistent.badge-primary { 
    background: #007bff; 
}

/* Order status badges - smaller and more consistent */
.badge-order-status {
    display: inline-block;
    padding: 2px 10px;
    font-weight: 600;
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
    min-width: 75px;
    color: #fff;
}

.badge-order-status.delivered {
    background: #2ecc40 !important;
    color: #fff !important;
}

.badge-order-status.undelivered {
    background: #f39c12 !important;
    color: #fff !important;
}

.badge-order-status.pending {
    background: #f39c12 !important;
    color: #fff !important;
}

.badge-order-status.paid {
    background: #2ecc40 !important;
    color: #fff !important;
}

.badge-order-status.unpaid {
    background: #e74c3c !important;
    color: #fff !important;
}

.badge-order-status.cancelled {
    background: #7f8c8d !important;
    color: #fff !important;
}

.badge-order-status.partial_paid {
    background: #f39c12 !important;
    color: #fff !important;
}

/* For positive/negative value badges */
.badge-positive {
    background: #2ecc40 !important;
    color: #fff !important;
}

.badge-negative {
    background: #e74c3c !important;
    color: #fff !important;
}

.badge-neutral {
    background: #7f8c8d !important;
    color: #fff !important;
}

/* ===== ACTION BUTTON ICON STANDARDIZATION ===== */
/* Based on orders_list.php and batches.css color scheme - REMOVED OUTLINES */
.action-icons .btn i,
.btn-outline-primary i,
.btn-outline-warning i,
.btn-outline-danger i,
.btn-outline-success i,
.btn-outline-info i {
    /* Remove any outline/border styling */
    border: none !important;
    outline: none !important;
}

.action-icons .btn-outline-primary i,
.btn-outline-primary i {
    color: #007b83; /* View/Details - Teal */
}

.action-icons .btn-outline-primary:hover i,
.btn-outline-primary:hover i {
    color: #005a61;
}

.action-icons .btn-outline-warning i,
.btn-outline-warning i {
    color: #f39c12; /* Edit - Orange */
}

.action-icons .btn-outline-warning:hover i,
.btn-outline-warning:hover i {
    color: #d68910;
}

.action-icons .btn-outline-danger i,
.btn-outline-danger i {
    color: #e05353; /* Delete - Red */
}

.action-icons .btn-outline-danger:hover i,
.btn-outline-danger:hover i {
    color: #b92e2e;
}

.action-icons .btn-outline-success i,
.btn-outline-success i {
    color: #1ca37c; /* Success actions - Green */
}

.action-icons .btn-outline-success:hover i,
.btn-outline-success:hover i {
    color: #16745b;
}

.action-icons .btn-outline-info i,
.btn-outline-info i {
    color: #3498db; /* Info actions - Blue */
}

.action-icons .btn-outline-info:hover i,
.btn-outline-info:hover i {
    color: #2980b9;
}

/* Remove button outline styling completely */
.btn-outline-primary,
.btn-outline-warning,
.btn-outline-danger,
.btn-outline-success,
.btn-outline-info {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

.btn-outline-primary:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover,
.btn-outline-success:hover,
.btn-outline-info:hover {
    background: rgba(0,0,0,0.05) !important;
    border: 1px solid transparent !important;
}

/* ===== DATATABLE STYLING FIXES ===== */
/* Fix for dropdown arrow overlapping text - addresses the user's comment */
.dataTables_wrapper .dataTables_length select {
    padding-right: 30px !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='m2 0-2 2h4zm0 5 2-2h-4z'/></svg>");
    background-repeat: no-repeat;
}

/* Ensure consistent table styling */
.dataTables_wrapper {
    font-family: inherit;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.5rem 0.75rem;
    margin-left: 2px;
    border-radius: 0.375rem;
}

/* Fix for DataTables info and controls alignment */
.dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 1rem;
}

/* ===== TABLE CONTAINER STANDARDIZATION ===== */
.table-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-container .table {
    margin-bottom: 0;
}

/* ===== RESPONSIVE BEHAVIOR ===== */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .page-header .page-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .badge-consistent {
        font-size: 12px;
        padding: 3px 10px;
        min-width: 75px;
    }
}

/* ===== ALERT STYLING CONSISTENCY ===== */
.page-info-alert {
    max-width: 700px;
}

.page-info-alert strong {
    color: var(--bs-info-text-emphasis);
}

/* ===== WHATSAPP LINK STYLING ===== */
.whatsapp-link {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 500;
}

.whatsapp-link:hover {
    color: #128C7E !important;
    text-decoration: underline;
}

/* ===== LOADING AND EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Source consolidated from: assets\css\sidebar.css */
/* Sidebar Navigation Styles */
/* Designed to work with Bootstrap 5 themes and adapt to theme colors */

/* Body layout for sticky footer */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 60px; /* Account for sticky footer height */
}

/* Main layout container */
.layout-container {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 220px;
    min-height: 100vh;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Collapsed sidebar state */
.sidebar.collapsed {
    width: 60px;
}

/* Sidebar header adjustments */
.sidebar-header {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem 0.5rem !important;
    justify-content: center !important;
}

/* Toggle button inside sidebar */
.sidebar-toggle-btn {
    transition: all 0.3s ease;
    min-width: 100%;
    height: 36px;
}

.sidebar.collapsed .sidebar-toggle-btn {
    min-width: 32px;
    height: 32px;
    padding: 0.25rem;
}

/* Toggle button text transitions */
.toggle-text {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
    white-space: nowrap;
}

.sidebar.collapsed .toggle-text {
    opacity: 0;
    transform: translateX(-10px);
    width: 0;
    margin: 0;
    overflow: hidden;
}

/* Sidebar title with smooth transitions */
.sidebar-title {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    transform: translateX(-20px);
    width: 0;
    margin: 0 !important;
    overflow: hidden;
}

/* Logo adjustments */
.sidebar.collapsed .logo-img {
    margin: 0 auto;
}

/* Navigation text transitions */
.nav-text {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    transform: translateX(-10px);
    width: 0;
    margin: 0;
}

/* Chevron icon transitions */
.nav-link .nav-chevron {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
    min-width: 14px;
}

.sidebar.collapsed .nav-link .nav-chevron {
    opacity: 0;
    transform: translateX(-10px);
    width: 0;
    min-width: 0;
    margin: 0;
}

/* Sidebar footer adjustments */
.sidebar-footer {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-footer .btn {
    margin-bottom: 0.25rem !important;
    padding: 0.375rem !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    transform: none !important;
    overflow: visible !important;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.5rem;
}

/* Hide button text in collapsed state */
.sidebar.collapsed .sidebar-footer .nav-text {
    opacity: 0;
    transform: translateX(-10px);
    width: 0;
    margin: 0;
    overflow: hidden;
}

/* Remove the old pseudo-element settings icon */
.sidebar.collapsed .sidebar-footer::after {
    display: none;
}

/* Collapsed sidebar navigation adjustments */
.sidebar.collapsed .nav-sidebar {
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.5rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.sidebar.collapsed .nav-link:hover {
    transform: none !important;
}

/* Tooltip functionality for collapsed sidebar */
.sidebar.collapsed .nav-link:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bs-dark);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1001;
    margin-left: 0.75rem;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease 0.5s forwards;
    pointer-events: none;
}

.sidebar.collapsed .nav-link:hover::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 6px 4px 0;
    border-color: transparent var(--bs-dark) transparent transparent;
    z-index: 1001;
    margin-left: 0.125rem;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease 0.5s forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Navigation styles that adapt to Bootstrap themes */
.nav-sidebar .nav-link {
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-sidebar .nav-link:hover {
    background-color: var(--bs-primary) !important;
    color: white !important;
    transform: translateX(2px);
}

.nav-sidebar .nav-link.active {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

/* Sticky footer */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 60px;
    display: flex;
    align-items: center;
}

/* Responsive adjustments */
@media (min-width: 992px) {
    .main-content {
        margin-left: 280px;
        padding: 20px;
        flex: 1;
        transition: margin-left 0.3s ease;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 60px;
    }
    
    /* Footer positioning - adjust for sidebar */
    .fixed-footer {
        left: 280px;
        transition: left 0.3s ease;
    }
    
    .fixed-footer.sidebar-collapsed {
        left: 60px;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 70px; /* Account for mobile toggle button */
        flex: 1;
    }
    
    /* Footer on mobile spans full width */
    .fixed-footer {
        left: 0;
    }
    
    /* Hide desktop toggle button on mobile */
    #sidebarToggle {
        display: none !important;
    }
}

/* Theme adaptations */
[data-theme="darkly"] .sidebar,
[data-theme="cyborg"] .sidebar,
[data-theme="slate"] .sidebar,
[data-theme="superhero"] .sidebar,
[data-theme="vapor"] .sidebar,
[data-theme="solar"] .sidebar {
    background-color: var(--bs-dark) !important;
    border-color: var(--bs-gray-600) !important;
}

[data-theme="darkly"] .sidebar .nav-link,
[data-theme="cyborg"] .sidebar .nav-link,
[data-theme="slate"] .sidebar .nav-link,
[data-theme="superhero"] .sidebar .nav-link,
[data-theme="vapor"] .sidebar .nav-link,
[data-theme="solar"] .sidebar .nav-link {
    color: var(--bs-light) !important;
}

[data-theme="darkly"] .sidebar .text-muted,
[data-theme="cyborg"] .sidebar .text-muted,
[data-theme="slate"] .sidebar .text-muted,
[data-theme="superhero"] .sidebar .text-muted,
[data-theme="vapor"] .sidebar .text-muted,
[data-theme="solar"] .sidebar .text-muted {
    color: var(--bs-gray-400) !important;
}

[data-theme="darkly"] .fixed-footer,
[data-theme="cyborg"] .fixed-footer,
[data-theme="slate"] .fixed-footer,
[data-theme="superhero"] .fixed-footer,
[data-theme="vapor"] .fixed-footer,
[data-theme="solar"] .fixed-footer {
    background-color: var(--bs-dark) !important;
    border-color: var(--bs-gray-600) !important;
}

/* Collapse animation for submenu */
.collapse {
    transition: height 0.3s ease;
}

/* Logo adjustments for sidebar */
.sidebar .logo-img {
    max-height: 40px;
    width: auto;
}

/* Navigation text visibility for smaller sidebar */
.nav-text {
    white-space: nowrap;
}

/* Scrollbar styling for sidebar content */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Source consolidated from: assets\css\dashboard-widgets.css */
/* Dashboard Card Drag and Drop Styles */
.dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    margin-bottom: 0; /* Let Bootstrap handle spacing */
}

/* Row-based layout styling */
.dashboard-row {
    position: relative;
    margin-bottom: 1rem;
}

.dashboard-row-content {
    position: relative;
}

/* Row drag handle styling */
.row-drag-handle {
    cursor: move;
    padding: 8px 12px;
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
    border-radius: 6px;
    color: #007bff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.row-drag-handle:hover {
    background: rgba(0, 123, 255, 0.2);
    border-color: #0056b3;
    color: #0056b3;
}

/* Dashboard card placeholders for empty spaces */
.dashboard-card-placeholder {
    opacity: 0.3;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 249, 250, 0.5);
    position: relative;
}

.dashboard-card-placeholder::after {
    content: "Hidden Card";
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.7;
}

/* Edit mode styling */
.dashboard-card.edit-mode {
    position: relative;
}

.dashboard-card.edit-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.dashboard-card.edit-mode .card {
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.dashboard-card.edit-mode:hover .card {
    border-color: #007bff;
}

/* Drag handle styling */
.drag-handle {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: move;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    color: #6c757d;
}

/* Override d-none when in edit mode */
.dashboard-card.edit-mode .drag-handle.d-none {
    display: block !important;
}

.dashboard-card.edit-mode:hover .drag-handle {
    opacity: 1;
    color: #007bff;
}

/* Sortable states for cards */
.sortable-ghost {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #007bff;
    border-radius: 8px;
}

.sortable-ghost .card {
    background: transparent;
    border: none;
}

.sortable-chosen {
    transform: rotate(2deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.sortable-drag {
    transform: rotate(5deg);
    z-index: 1001;
}

/* Sortable states for rows */
.sortable-ghost-row {
    opacity: 0.5;
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 10px;
}

.sortable-chosen-row {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
    z-index: 1000;
}

.sortable-drag-row {
    transform: scale(1.05);
    z-index: 1001;
}

/* Special handling for analytics dashboard card */
.dashboard-card[data-card-id="analytics-dashboard"] .drag-handle {
    top: 20px;
    right: 20px;
    background: rgba(248, 249, 250, 0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drag-handle {
        opacity: 0.8;
        font-size: 14px;
        padding: 6px 8px;
    }
    
    .row-drag-handle {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .dashboard-card.edit-mode {
        margin-bottom: 10px;
    }
    
    .dashboard-card.edit-mode:hover {
        transform: none; /* Disable hover transform on mobile */
    }
    
    .dashboard-card-placeholder::after {
        font-size: 10px;
    }
}

/* Toast styling for success messages */
.toast {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Edit mode notification */
#edit-mode-notification {
    border-radius: 8px;
    border: 2px solid #0dcaf0;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.3);
    background-color: #cff4fc;
    color: #055160;
}

/* Source consolidated from: assets\css\modern-dashboard.css */
/* Modern Dashboard Styles - Theme-Aware Enhanced Design */

/* ==================== THEME-AWARE VARIABLES ==================== */
:root {
    /* Theme-aware gradients using Bootstrap color variables */
    --primary-gradient: linear-gradient(135deg, var(--bs-primary, #0d6efd) 0%, color-mix(in srgb, var(--bs-primary, #0d6efd) 80%, var(--bs-dark, #212529) 20%) 100%);
    --secondary-gradient: linear-gradient(135deg, var(--bs-secondary, #6c757d) 0%, color-mix(in srgb, var(--bs-secondary, #6c757d) 80%, var(--bs-primary, #0d6efd) 20%) 100%);
    --success-gradient: linear-gradient(135deg, var(--bs-success, #198754) 0%, color-mix(in srgb, var(--bs-success, #198754) 80%, var(--bs-info, #0dcaf0) 20%) 100%);
    --warning-gradient: linear-gradient(135deg, var(--bs-warning, #ffc107) 0%, color-mix(in srgb, var(--bs-warning, #ffc107) 80%, var(--bs-success, #198754) 20%) 100%);
    --info-gradient: linear-gradient(135deg, var(--bs-info, #0dcaf0) 0%, color-mix(in srgb, var(--bs-info, #0dcaf0) 80%, var(--bs-warning, #ffc107) 20%) 100%);
    --danger-gradient: linear-gradient(135deg, var(--bs-danger, #dc3545) 0%, color-mix(in srgb, var(--bs-danger, #dc3545) 80%, var(--bs-warning, #ffc107) 20%) 100%);
    
    /* Fallback gradients for browsers without color-mix support */
    --primary-gradient-fallback: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
    --secondary-gradient-fallback: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    --success-gradient-fallback: linear-gradient(135deg, #198754 0%, #0f5132 100%);
    --warning-gradient-fallback: linear-gradient(135deg, #ffc107 0%, #997404 100%);
    --info-gradient-fallback: linear-gradient(135deg, #0dcaf0 0%, #087990 100%);
    --danger-gradient-fallback: linear-gradient(135deg, #dc3545 0%, #721c24 100%);
    
    /* Card design variables */
    --card-border-radius: 16px;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
    --card-shadow-active: 0 2px 12px rgba(0, 0, 0, 0.08);
    
    /* Typography */
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Theme-aware background variations */
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-dark: rgba(0, 0, 0, 0.1);
}

/* Dark theme adjustments */
[data-theme="darkly"], 
[data-theme="cyborg"], 
[data-theme="slate"], 
[data-theme="solar"], 
[data-theme="superhero"], 
[data-theme="vapor"] {
    --bg-glass: rgba(255, 255, 255, 0.15);
    --bg-glass-dark: rgba(0, 0, 0, 0.15);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==================== ENHANCED BOOTSTRAP COMPONENTS ==================== */
.card {
    border: var(--bs-card-border-width, 1px) solid var(--bs-card-border-color, rgba(0,0,0,.125));
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card.modern-card {
    border: none;
    border-radius: var(--card-border-radius);
}

.btn.btn-modern {
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ==================== HERO SECTION ==================== */
.dashboard-hero {
    /* Use Bootstrap primary color with fallback */
    background: var(--primary-gradient-fallback);
    background: var(--primary-gradient);
    color: var(--bs-white, white);
    border-radius: var(--card-border-radius);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xxl) var(--spacing-xl);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--bs-primary, #0d6efd) 30%, transparent);
    box-shadow: 0 8px 32px rgba(13, 110, 253, 0.3); /* Fallback */
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, var(--bg-glass) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, var(--bg-glass-dark) 0%, transparent 50%);
    pointer-events: none;
}

.dashboard-hero .hero-content {
    position: relative;
    z-index: 2;
}

.dashboard-hero h1 {
    font-weight: var(--font-weight-bold);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-hero .lead {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
}

.hero-stats {
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass);
    border-radius: var(--card-border-radius);
}

.hero-stats .h3 {
    font-weight: var(--font-weight-bold);
    font-size: 2rem;
}

.hero-stats .small {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ==================== ENHANCED CARD STYLES ==================== */
.modern-card {
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-card:hover::before {
    opacity: 1;
}

/* ==================== STAT CARDS ==================== */
.stat-card {
    background: var(--bs-card-bg, #ffffff);
    position: relative;
    overflow: hidden;
}

/* Dark theme stat card adjustments */
[data-theme="darkly"] .stat-card,
[data-theme="cyborg"] .stat-card,
[data-theme="slate"] .stat-card,
[data-theme="solar"] .stat-card,
[data-theme="superhero"] .stat-card,
[data-theme="vapor"] .stat-card {
    background: var(--bs-card-bg, var(--bs-dark, #212529));
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, var(--bg-glass), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.stat-card:hover::after {
    transform: rotate(45deg) translate(100%, 100%);
}

.icon-container-sm {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--primary-gradient-fallback);
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--bs-primary, #0d6efd) 30%, transparent);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3); /* Fallback */
    position: relative;
    overflow: hidden;
}

.icon-container-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-glass), transparent);
    border-radius: inherit;
}

.icon-container-md {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin: 0 auto;
    background: var(--primary-gradient-fallback);
    background: var(--primary-gradient);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bs-primary, #0d6efd) 30%, transparent);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.3); /* Fallback */
    position: relative;
    overflow: hidden;
}

.icon-container-md::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-glass), transparent);
    border-radius: inherit;
}

/* Different icon container colors */
.icon-container-success {
    background: var(--success-gradient-fallback);
    background: var(--success-gradient);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bs-success, #198754) 30%, transparent);
    box-shadow: 0 8px 24px rgba(25, 135, 84, 0.3); /* Fallback */
}

.icon-container-warning {
    background: var(--warning-gradient-fallback);
    background: var(--warning-gradient);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bs-warning, #ffc107) 30%, transparent);
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.3); /* Fallback */
}

.icon-container-info {
    background: var(--info-gradient-fallback);
    background: var(--info-gradient);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bs-info, #0dcaf0) 30%, transparent);
    box-shadow: 0 8px 24px rgba(13, 202, 240, 0.3); /* Fallback */
}

.icon-container-danger {
    background: var(--danger-gradient-fallback);
    background: var(--danger-gradient);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bs-danger, #dc3545) 30%, transparent);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3); /* Fallback */
}

/* ==================== METRIC CARDS ==================== */
.metric-card {
    background: var(--bs-card-bg, #ffffff);
    position: relative;
    overflow: hidden;
}

/* Dark theme metric card adjustments */
[data-theme="darkly"] .metric-card,
[data-theme="cyborg"] .metric-card,
[data-theme="slate"] .metric-card,
[data-theme="solar"] .metric-card,
[data-theme="superhero"] .metric-card,
[data-theme="vapor"] .metric-card {
    background: var(--bs-card-bg, var(--bs-dark, #212529));
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-glass), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.metric-card:hover::after {
    opacity: 1;
}

.metric-card .card-title {
    font-weight: var(--font-weight-semibold);
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.metric-card .display-6 {
    font-weight: var(--font-weight-bold);
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    background: var(--primary-gradient-fallback);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== MODULE CARDS ==================== */
/* ==================== MODULE CARDS ==================== */
.module-card {
    background: var(--bs-card-bg, #ffffff);
    position: relative;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme module card adjustments */
[data-theme="darkly"] .module-card,
[data-theme="cyborg"] .module-card,
[data-theme="slate"] .module-card,
[data-theme="solar"] .module-card,
[data-theme="superhero"] .module-card,
[data-theme="vapor"] .module-card {
    background: var(--bs-card-bg, var(--bs-dark, #212529));
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient-fallback);
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-card:hover {
    transform: translateY(-4px);
}

.module-card .card-body {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.module-card .card-title {
    font-weight: var(--font-weight-semibold);
    color: var(--bs-body-color, #212529);
    margin-bottom: var(--spacing-sm);
}

.module-card .card-text {
    flex-grow: 1;
    color: var(--bs-secondary-color, #6c757d);
    line-height: 1.6;
}

.module-card i {
    color: var(--bs-primary, #0d6efd);
    transition: all 0.3s ease;
}

.module-card:hover i {
    color: color-mix(in srgb, var(--bs-primary, #0d6efd) 80%, var(--bs-dark, #212529) 20%);
    color: var(--bs-primary, #0d6efd); /* Fallback */
    transform: scale(1.1);
}

/* ==================== ANALYTICS SECTION ==================== */
.analytics-card {
    background: var(--bs-card-bg, #ffffff);
    position: relative;
    overflow: hidden;
}

/* Dark theme analytics card adjustments */
[data-theme="darkly"] .analytics-card,
[data-theme="cyborg"] .analytics-card,
[data-theme="slate"] .analytics-card,
[data-theme="solar"] .analytics-card,
[data-theme="superhero"] .analytics-card,
[data-theme="vapor"] .analytics-card {
    background: var(--bs-card-bg, var(--bs-dark, #212529));
}

.analytics-card .card-header {
    background: var(--bs-secondary-bg, #e9ecef);
    border-bottom: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.125));
    padding: var(--spacing-lg);
    border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
}

.analytics-card .card-header h5 {
    font-weight: var(--font-weight-semibold);
    color: var(--bs-body-color, #212529);
    margin-bottom: 0;
}

/* ==================== ENHANCED BUTTONS ==================== */
.btn-modern {
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-glass), transparent);
    transition: left 0.5s ease;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-outline-light.btn-modern {
    border-color: var(--bg-glass);
    color: white;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
}

.btn-outline-light.btn-modern:hover {
    background: color-mix(in srgb, var(--bg-glass) 80%, white 20%);
    background: var(--bg-glass); /* Fallback */
    border-color: var(--bg-glass);
}

.bg-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bg-glass);
}

/* ==================== TEXT UTILITIES ==================== */
.text-gradient {
    background: var(--primary-gradient-fallback);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: var(--font-weight-bold);
}

/* ==================== LOADING STATES ==================== */
.loading-shimmer {
    background: linear-gradient(90deg, var(--bs-gray-100, #f8f9fa) 25%, var(--bs-gray-200, #e9ecef) 50%, var(--bs-gray-100, #f8f9fa) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--card-border-radius);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .dashboard-hero {
        padding: var(--spacing-xl) var(--spacing-lg) !important;
        text-align: center;
    }
    
    .dashboard-hero h1 {
        font-size: 2rem !important;
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-actions .btn {
        width: 100%;
        text-align: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .metric-card .display-6 {
        font-size: 1.75rem !important;
    }
    
    .icon-container-md {
        width: 64px !important;
        height: 64px !important;
    }
    
    .icon-container-sm {
        width: 48px !important;
        height: 48px !important;
    }
    
    .card-body {
        padding: var(--spacing-md) !important;
    }
}

@media (max-width: 576px) {
    .dashboard-hero h1 {
        font-size: 1.75rem !important;
    }
    
    .metric-card .display-6 {
        font-size: 1.5rem !important;
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== FOCUS STATES ==================== */
.btn:focus,
.card:focus-within {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* ==================== ENHANCED SHADOWS ==================== */
.shadow-modern {
    box-shadow: var(--card-shadow) !important;
}

.shadow-modern-hover {
    box-shadow: var(--card-shadow-hover) !important;
}

.border-radius-modern {
    border-radius: var(--card-border-radius) !important;
}

/* ==================== BADGE IMPROVEMENTS ==================== */
.badge {
    border-radius: 50px !important;
    font-weight: var(--font-weight-semibold) !important;
    padding: 0.25rem 0.75rem !important;
}

.rounded-pill {
    border-radius: 50px !important;
}

/* Source consolidated from: assets\css\customers.css */
/* Customer Page Styling */
.receivable-btn {
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-size: 1.06em;
    font-weight: 600;
    margin-left: 14px;
    cursor: pointer;
    transition: background 0.12s;
    box-shadow: 0 1px 4px rgba(40,60,90,0.07);
}

.receivable-btn:hover { 
    background: #19539a; 
}

.total-receivable {
    font-size: 1.13em;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 14px;
}
/* Ensure the action column doesn't squeeze buttons */
.actions-cell {
    white-space: nowrap; /* Prevents buttons from stacking vertically */
    width: 1%;           /* Forces the column to be as slim as the content allows */
    vertical-align: middle;
}

.action-icons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
}

/* Fix for mobile responsiveness if using data-labels */
@media (max-width: 768px) {
    .actions-cell {
        width: 100%;
        display: block;
        text-align: right !important;
    }
    .action-icons {
        justify-content: flex-end;
    }
}
.customer-wa-link {
    color: #1761ae;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.14s;
}

.customer-wa-link:hover {
    color: #128C7E;
    text-decoration: underline;
}

.amount {
    text-align: right;
    font-weight: 600;
    color: #b25d13;
}

.entity-table td.actions-cell, .entity-table th.actions-cell {
    min-width: 120px;
    max-width: 1px;
    white-space: nowrap !important;
    padding: 4px 6px;
    width: 1%;
    text-align: left;
}

.entity-table .actions-inline {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

.entity-table .actions-inline .btn-ico {
    margin: 0;
    flex: 0 0 auto;
}

@media (max-width: 550px) {
    .entity-table td.actions-cell, .entity-table th.actions-cell {
        min-width: 90px;
        max-width: none;
        width: auto;
        overflow-x: auto;
    }
    .entity-table .actions-inline {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 99vw;
    }
}

/* Source consolidated from: assets\css\vendors.css */
/* Vendor Page Styling */
.vendor-disabled-row {
    opacity: 0.65;
    background: #f9eaea;
}

.badge-disabled {
    background: #d9534f;
    color: #fff;
    margin-left: 4px;
    font-size: 0.92em;
}

.entity-table td, .entity-table th {
    vertical-align: middle !important;
    white-space: nowrap;
}

/* Icon-only buttons, no background */
.action-btns {
    display: flex;
    flex-wrap: wrap;
}

.action-btns .btn-ico {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    color: #1976d2 !important; /* Uniform blue color for all icons */
    box-shadow: none;
    transition: color 0.15s;
    min-width: 32px;
    min-height: 32px;
}

.action-btns .btn-ico:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
}

.action-btns .btn-ico i {
    color: inherit !important;
    font-size: 18px;
}

.action-btns .btn-ico:hover,
.action-btns .btn-ico:focus {
    color: #0d47a1 !important; /* Darker blue on hover/focus */
}

@media (max-width: 600px) {
    .entity-header h2 { 
        font-size: 1.2em; 
    }
    .action-btns .btn-ico {
        font-size: 12px;
        min-width: 24px;
        min-height: 24px;
        padding: 2px 4px;
    }
    .action-btns .btn-ico i {
        font-size: 14px;
    }
}

/* Source consolidated from: assets\css\batches.css */
/* Batches Page Styling */
.badge-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    min-width: 70px;
    text-align: center;
}

.badge-secondary { 
    background: #7f8c8d; 
}

.badge-warning { 
    background: #f39c12; 
}

.badge-success { 
    background: #2ecc40; 
}

/* Action buttons inline styling */
.action-btns-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
}

.order-status-badge {
    display: inline-block;
    padding: 2px 10px;
    font-weight: 600;
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
    min-width: 75px;
}

.order-status-delivered {
    background: var(--bs-success) !important;
    color: #fff !important;
}

.order-status-undelivered {
    background: var(--bs-warning) !important;
    color: #fff !important;
}

.batch-order-checkbox, .batch-select-all-checkbox { 
    width: 20px; 
    height: 20px; 
    vertical-align: middle; 
    cursor: pointer; 
}

.batch-bulk-row-inside-table {
    display: flex; 
    gap: 10px; 
    justify-content: flex-end; 
    align-items: center;
    padding: 6px 0 6px 0; 
    background: transparent; 
    border-bottom: 1px solid #eaf0fa;
}

.batch-bulk-btn {
    background: none; 
    border: none; 
    border-radius: 7px; 
    padding: 7px 10px;
    font-size: 1.25rem; 
    font-weight: 600; 
    cursor: pointer; 
    margin-right: 0;
    transition: background 0.17s, color 0.17s; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.batch-bulk-btn i.fa-truck { 
    color: #1ca37c; 
}

.batch-bulk-btn i.fa-truck:hover { 
    color: #16745b; 
}

.btn-unlink-order {
    background: none; 
    border: none; 
    cursor: pointer; 
    color: #0070e0;
    padding: 2px 6px; 
    margin-left: 4px; 
    font-size: 15px; 
    vertical-align: middle;
}

.btn-unlink-order:hover { 
    color: #e67e22; 
}

.batch-bulk-btn i.fa-money, 
.batch-bulk-btn i.fa-money-bill, 
.batch-bulk-btn i.fa-money-bill-alt, 
.batch-bulk-btn i.fa-credit-card {
    color: #218838;
}

.batch-bulk-btn i.fa-money:hover,
.batch-bulk-btn i.fa-money-bill:hover,
.batch-bulk-btn i.fa-money-bill-alt:hover,
.batch-bulk-btn i.fa-credit-card:hover {
    color: #166c27;
}

.batch-bulk-btn i.fa-list { 
    color: #2980b9; 
}

.batch-bulk-btn i.fa-list:hover { 
    color: #145a86; 
}

.actions-bar-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
}

/* Badge styles for status */
.badge-order-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    min-width: 75px;
    text-align: center;
}

.badge-order-status-delivered {
    background: #2ecc40 !important;
    color: #fff !important;
    border: 1px solid #1e8c2f;
}

.badge-order-status-undelivered {
    background: #e74c3c !important;
    color: #fff !important;
    border: 1px solid #b82e24;
}

.badge-order-status-pending {
    background: #f39c12 !important;
    color: #fff !important;
    border: 1px solid #d68910;
}

.badge-order-status-inprocess {
    background: #3498db !important;
    color: #fff !important;
    border: 1px solid #2980b9;
}

/* Responsive table styles for batch summary and modal tables */
@media (max-width: 768px) {
    #summary-modal .table,
    #items-modal .table {
        border: 0;
    }
    
    #summary-modal .table thead,
    #items-modal .table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    #summary-modal .table tr,
    #items-modal .table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }
    
    #summary-modal .table td,
    #items-modal .table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
        padding-left: 50% !important;
        position: relative;
    }
    
    #summary-modal .table td:before,
    #items-modal .table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
    }
}

/* Item list styling in modals */
.item-list-margin {
    margin: 0;
    padding-left: 1.5rem;
}

.item-list-margin li {
    margin-bottom: 0.5rem;
}

.no-items-text {
    color: #6c757d;
    font-style: italic;
}

/* Source consolidated from: entities\sales\css\sales.css */
/* Force the table to behave on small screens */
@media screen and (max-width: 767px) {
    /* Make the Customer name look like a link so users know to click it */
    #orders-table tbody td.dtr-control {
        color: #0d6efd;
        font-weight: bold;
        cursor: pointer;
        text-decoration: underline;
    }

    /* Style the expanded child row to look like a clean list */
    table.dataTable > tbody > tr.child ul.dtr-details {
        width: 100%;
        display: table; /* Makes it look like a mini-table inside the row */
        padding: 10px;
        background: #f8f9fa;
    }
    
    table.dataTable > tbody > tr.child li {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border-bottom: 1px solid #dee2e6;
    }
}
/* Shared utility treatments used across entity lists. */
.bg-primary-soft { background-color: rgba(13, 110, 253, 0.1); }
.bg-danger-soft { background-color: rgba(220, 53, 69, 0.1); }
.bg-success-soft { background-color: rgba(25, 135, 84, 0.1); }
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
    transition: background-color 0.2s;
}
.btn-light:hover { background-color: #f8f9fa; }

#link-orders-modal-content .text-muted {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #28a745 !important;
}

#link-orders-modal-content .text-muted::before {
    content: "\f058";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

#summary-modal .modal-header {
    background-color: #0d6efd !important;
    color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}
#summary-modal .modal-title { color: #fff !important; font-weight: 600; }
#summary-modal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}
#summary-modal .btn-close-white:hover { opacity: 1; }

.shipping-edit-input {
    border-radius: 7px;
    border: 1px solid #d3e5fa;
    padding: 6px 7px;
    font-size: 1rem;
    width: 80px;
    text-align: center;
}
.shipping-edit-input:focus {
    border: 1.5px solid #0070e0;
    outline: none;
    background: #f6fbff;
}
.order-customer-cell,
.order-area-cell {
    text-align: left;
    padding-left: 6px;
    padding-right: 6px;
}
.order-customer-name {
    color: #1869e3;
    font-weight: 700;
    font-size: 1rem;
    word-break: break-word;
    display: inline-block;
}
.order-customer-contact {
    color: #23b367 !important;
    font-size: 0.99em;
    font-weight: 500;
    display: block;
    margin-top: 2px;
    text-decoration: none;
    word-break: break-all;
}
.order-customer-contact:hover {
    text-decoration: underline;
    color: #128c7e !important;
}
.shipping-actions-bar .btn i,
.shipping-save-btn i {
    font-size: 1.25em;
    margin-right: 3px;
}
.modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    margin-left: 18px;
}
.modal .modal-close:hover { color: #e05353; }

@media print {
    .modal,
    .shipping-edit-input,
    .select-order-checkbox,
    .select-all-checkbox,
    .top-row,
    .header-buttons-secondary { display: none !important; }
    body { background: #fff; }
    .entity-table th,
    .entity-table td { display: none; }
    .entity-table th.print-items,
    .entity-table td.print-items,
    .entity-table th:nth-child(4),
    .entity-table td:nth-child(4) { display: table-cell !important; }
}

/* ==========================================================================
   FrozoFun UI Design System
   These final rules intentionally normalize legacy page-specific variants.
   ========================================================================== */
:root {
    --ui-primary: #0d6efd;
    --ui-primary-dark: #0a58ca;
    --ui-success: #198754;
    --ui-danger: #dc3545;
    --ui-warning: #ffc107;
    --ui-info: #0dcaf0;
    --ui-text: #212529;
    --ui-muted: #6c757d;
    --ui-border: #dee2e6;
    --ui-surface: #fff;
    --ui-surface-subtle: #f8f9fa;
    --ui-radius: 0.625rem;
    --ui-radius-sm: 0.45rem;
    --ui-shadow: 0 0.25rem 0.8rem rgba(33, 37, 41, 0.08);
    --ui-control-height: 2.5rem;
    --ui-touch-size: 2.75rem;
    --ui-font-size: 0.9375rem;
}

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    color: var(--ui-text);
    font-size: var(--ui-font-size);
    line-height: 1.5;
    overflow-x: hidden;
}

.page-content-wrapper {
    width: 100%;
    min-width: 0;
}

.page-content-wrapper > .container,
.page-content-wrapper > .container-fluid {
    max-width: 100%;
}

.page-content-wrapper h1,
.page-content-wrapper h2,
.page-content-wrapper h3 {
    font-weight: 600;
    letter-spacing: -0.015em;
}

.page-content-wrapper h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.page-content-wrapper h4,
.page-content-wrapper h5,
.page-content-wrapper h6,
.modal-title,
.card-title {
    font-weight: 600;
}

.page-content-wrapper .small,
.page-content-wrapper small,
.form-text {
    color: var(--ui-muted);
}

/* Buttons */
.btn.ui-button {
    min-height: 2.375rem;
    border-radius: var(--ui-radius-sm);
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: none;
    transform: none;
    white-space: normal;
    text-align: center;
}

.btn.ui-button:hover {
    transform: none;
    box-shadow: 0 0.2rem 0.45rem rgba(33, 37, 41, 0.12);
}

.btn.ui-button:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.25);
    outline-offset: 2px;
}

.btn.ui-button.btn-sm {
    min-height: 2rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.8125rem;
}

.btn.ui-button.btn-lg {
    min-height: 3rem;
    padding: 0.7rem 1.1rem;
    font-size: 1rem;
}

.btn.ui-icon-button {
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0;
}

.btn-group,
.actions-inline,
.actions-bar-top {
    gap: 0.35rem;
    flex-wrap: wrap;
}

.btn-group > .btn {
    border-radius: var(--ui-radius-sm) !important;
}

/* Forms and universal TomSelect */
.form-label,
.modal label:not(.btn) {
    margin-bottom: 0.4rem;
    color: var(--ui-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.ui-required-label::after {
    content: " *";
    color: var(--ui-danger);
}

.form-control,
.form-select,
.ts-wrapper .ts-control {
    min-height: var(--ui-control-height);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    background-color: var(--ui-surface);
    color: var(--ui-text);
    font-size: 0.9375rem;
    box-shadow: none;
}

.form-control,
.form-select {
    padding: 0.5rem 0.75rem;
}

textarea.form-control {
    min-height: 6rem;
}

.form-control:focus,
.form-select:focus,
.ts-wrapper.focus .ts-control {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}

.ts-wrapper {
    width: 100%;
    min-width: 0;
}

.ts-wrapper .ts-control {
    padding: 0.45rem 2.25rem 0.45rem 0.75rem;
    display: flex;
    align-items: center;
}

.ts-wrapper.multi .ts-control {
    padding: 0.3rem 2.25rem 0.3rem 0.45rem;
}

.ts-wrapper.multi .item {
    border-radius: 0.35rem;
}

.ts-dropdown {
    z-index: 1085;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    box-shadow: var(--ui-shadow);
    font-size: 0.9375rem;
    overflow: hidden;
}

.ts-dropdown .option {
    padding: 0.6rem 0.75rem;
}

.ts-dropdown .active {
    background: rgba(13, 110, 253, 0.1);
    color: var(--ui-text);
}

.dataTables_length .ts-wrapper {
    display: inline-block;
    width: 5.25rem;
    margin: 0 0.35rem;
    vertical-align: middle;
}

.dataTables_length .ts-control {
    min-height: 2.15rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.invalid-feedback,
.valid-feedback {
    font-size: 0.8125rem;
}

/* Cards */
.page-content-wrapper .card,
.ui-modal .modal-content {
    border: 1px solid rgba(33, 37, 41, 0.08);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
}

.page-content-wrapper .card-header {
    padding: 0.85rem 1rem;
    background: var(--ui-surface-subtle);
    border-bottom: 1px solid var(--ui-border);
    font-weight: 600;
}

.page-content-wrapper .card-body {
    padding: 1rem;
}

/* Universal table and DataTables presentation */
.ui-list-table {
    width: 100% !important;
    margin-bottom: 0;
    color: var(--ui-text);
    font-size: 0.875rem;
    vertical-align: middle;
}

.ui-list-table > :not(caption) > * > * {
    padding: 0.72rem 0.75rem;
    border-bottom-color: var(--ui-border);
    font-weight: 400;
}

.ui-list-table thead th {
    background: var(--ui-surface-subtle);
    color: #495057;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--ui-border);
}

.ui-list-table tbody tr {
    background: var(--ui-surface);
}

.ui-list-table.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(33, 37, 41, 0.018);
}

.ui-list-table.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(13, 110, 253, 0.045);
}

.ui-list-table .fw-bold {
    font-weight: 600 !important;
}

.ui-table-responsive,
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper {
    width: 100%;
    font-size: 0.875rem;
}

.dataTables_wrapper .row {
    row-gap: 0.75rem;
    align-items: center;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: min(16rem, 70vw);
    min-height: 2.25rem;
    margin-left: 0;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    padding: 0.4rem 0.7rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: var(--ui-muted);
}

.dataTables_wrapper .dataTables_paginate .pagination {
    flex-wrap: wrap;
    gap: 0.2rem;
}

.dataTables_wrapper .page-link {
    min-width: 2.25rem;
    min-height: 2.25rem;
    border-radius: 0.4rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    background-color: var(--ui-primary);
}

/* Universal Bootstrap modal behavior and appearance */
.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1055;
    background-color: #111827;
}

.modal-backdrop.show {
    opacity: 0.58;
}

.modal-dialog {
    margin: 1.25rem auto;
}

.ui-modal .modal-content {
    background: var(--ui-surface);
}

.ui-modal .modal-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark) {
    min-height: 3.75rem;
    padding: 0.85rem 1rem;
    background: var(--ui-surface) !important;
    color: var(--ui-text) !important;
    border-bottom: 1px solid var(--ui-border);
    display: flex;
    align-items: center;
}

.modal-title {
    margin: 0;
    color: inherit;
    font-size: 1.05rem;
}

.modal-header .btn-close,
.modal .modal-close {
    width: 2.25rem;
    height: 2.25rem;
    margin: -0.35rem -0.35rem -0.35rem auto;
    padding: 0.55rem;
    border-radius: 50%;
    opacity: 0.65;
}

.modal-header .btn-close:hover,
.modal .modal-close:hover {
    background-color: rgba(33, 37, 41, 0.08);
    opacity: 1;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 0.8rem 1rem;
    gap: 0.5rem;
    background: var(--ui-surface-subtle);
    border-top: 1px solid var(--ui-border);
}

/* Standalone invoice format chooser follows the same modal visual contract. */
.modal-overlay {
    background: rgba(17, 24, 39, 0.58) !important;
    padding: 1rem;
}

.modal-overlay .modal-card {
    width: min(32rem, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid rgba(33, 37, 41, 0.08);
    border-radius: var(--ui-radius);
    box-shadow: 0 1rem 3rem rgba(17, 24, 39, 0.25);
}

.modal-overlay .modal-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.modal-overlay .print-option,
.modal-overlay .btn-main,
.modal-overlay .btn-size {
    min-height: var(--ui-touch-size);
    border-radius: var(--ui-radius-sm);
    font-weight: 600;
    transform: none;
}

body.modal-open {
    overflow: hidden !important;
}

/* Alerts */
.alert {
    border: 1px solid transparent;
    border-radius: var(--ui-radius-sm);
    font-size: 0.9rem;
}

/* Mobile-first corrections */
@media (max-width: 767.98px) {
    :root {
        --ui-control-height: 2.75rem;
    }

    .page-content-wrapper > .container,
    .page-content-wrapper > .container-fluid {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .page-content-wrapper .row > [class*="col-"] {
        min-width: 0;
    }

    .page-content-wrapper .card-body {
        padding: 0.85rem;
    }

    .page-content-wrapper .d-flex.justify-content-between,
    .page-content-wrapper .actions-bar-top {
        align-items: stretch !important;
        gap: 0.65rem;
    }

    .page-content-wrapper .d-flex.justify-content-between:not(.flex-nowrap) {
        flex-wrap: wrap;
    }

    .btn.ui-button:not(.ui-icon-button),
    .ui-modal .modal-footer .btn {
        min-height: var(--ui-touch-size);
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        width: 100%;
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 0;
        margin-top: 0.35rem;
    }

    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: flex-start !important;
    }

    .ui-modal .modal-header {
        position: sticky;
        top: 0;
        z-index: 3;
    }

    .ui-modal .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 3;
        flex-wrap: wrap;
    }

    .ui-modal .modal-footer > * {
        flex: 1 1 calc(50% - 0.5rem);
        margin: 0;
    }

    .ts-dropdown {
        max-width: calc(100vw - 1.5rem);
    }

    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-overlay .modal-card {
        width: 100%;
        max-height: 92vh;
        border-radius: var(--ui-radius) var(--ui-radius) 0 0;
    }
}
