.order-row {
    transition: background-color 0.3s;
}

.order-row:hover {
    background-color: #f8f9fa;
}

.order-row.new-order {
    animation: highlightRow 2s ease-out;
}

@keyframes highlightRow {
    0% { background-color: rgba(25, 135, 84, 0.1); }
    100% { background-color: transparent; }
}

.status-badge {
    min-width: 100px;
    text-align: center;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    display: inline-block;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-done {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.status-canceled {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.action-btn {
    transition: all 0.2s;
    min-width: 140px;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.order-stats {
    border: 1px solid #dee2e6;
    transition: all 0.2s;
}

.order-stats:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.table > :not(caption) > * > * {
    padding: 1rem 0.75rem;
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length select {
    min-width: 80px;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 200px;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin-left: 2px;
    border-radius: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #2563eb !important;
}

/* Hide DataTables pagination controls but keep paging enabled for scroller/data loading */
.dataTables_wrapper .dataTables_paginate {
    display: none !important;
}

/* Ensure .table-responsive does not hide or overlap pagination */
.table-responsive {
    margin-bottom: 2.5rem !important;
}

/* Add extra bottom padding to .card-body to ensure pagination is always visible */
.card-body {
    padding-bottom: 3.5rem !important;
}

/* Restore default DataTables search box position */
.dataTables_wrapper .dataTables_filter {
    float: right !important;
    text-align: right !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
    width: auto !important;
    direction: rtl;
}

/* Responsive: on small screens, keep search and pagination full width */
@media (max-width: 576px) {
    .dataTables_wrapper .dataTables_filter {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    .dataTables_wrapper .dataTables_paginate {
        flex-wrap: wrap;
        font-size: 1rem;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.25rem;
    }
}

/* RTL support for pagination arrows */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    direction: rtl;
    font-weight: 500;
    border-radius: 0.25rem;
    margin: 0 0.15rem;
    color: #007bff !important;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.35rem 0.85rem;
    transition: background 0.2s, color 0.2s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: #fff !important;
    background: #007bff !important;
    border: 1px solid #007bff;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
    background: #e2e6ea;
    color: #0056b3 !important;
}

/* Responsive: on small screens, pagination is full width and buttons are touch-friendly */
@media (max-width: 576px) {
    .dataTables_wrapper .dataTables_paginate {
        flex-wrap: wrap;
        font-size: 1rem;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.25rem;
    }
}

/* Prevent overlap with sticky headers if present */
.table-responsive {
    margin-bottom: 2.5rem !important;
}

/* Filter Buttons Styles */
.btn-group .btn {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn.active {
    font-weight: 600;
}

.btn-group .btn i {
    font-size: 0.9em;
}
