.rewards-form {
    text-align: center;
/*    border: 1px solid blue;
    border-radius: 5px 5px 5px 5px;*/
}

.error-message {
    color: red;
}

.client-lookup-status.alert-info {
    border-left: 4px solid #0dcaf0;
}
.client-lookup-status.alert-success {
    border-left: 4px solid #198754;
}
.client-lookup-status.alert-warning {
    border-left: 4px solid #ffc107;
}
.client-lookup-status.alert-danger {
    border-left: 4px solid #dc3545;
}

/* Allocate modal — mobile-first tap targets */
.loyalty-allocate-modal .modal-content {
    border-radius: 0;
}
@media (min-width: 576px) {
    .loyalty-allocate-modal .modal-content {
        border-radius: var(--bs-modal-border-radius, 0.5rem);
    }
}

#exampleModal .loyalty-allocate-client-name[readonly] {
    background-color: var(--bs-secondary-bg, #e9ecef);
    cursor: default;
}

.add-client-action-panel {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.add-client-help {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.4;
}

.loyalty-add-client-btn {
    min-height: 48px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
}

.loyalty-add-client-btn.is-confirmed {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

.min-touch-target {
    min-height: 48px;
}

.loyalty-modal-footer .btn {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.cell-number-field {
    border-color: #0d6efd;
}

.product-code-field {
    border-color: #0d6efd;
    color: #0d6efd;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 16px;
}

.loyalty-reward-confirm-dl dt {
    color: #6c757d;
}
.loyalty-reward-confirm-dl dd {
    font-weight: 500;
}

#BtnRewardInc,
#BtnRewardDec {
    min-width: 48px;
    min-height: 48px;
    font-size: 1.25rem;
    line-height: 1;
}

.reward-cnt-btn {
    border-radius: 10px 10px 10px 10px;
    border-color: #0d6efd;
}

.reward-table {
    padding-top: 20px;
    max-height: calc(100vh - 248px); /* Adjust based on header, title, padding, and search input */
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-color: #4169E1 #e0e0e0; /* Firefox: thumb and track */
    scrollbar-width: thin;
}

.reward-table-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
}

.reward-table-inner {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 12px;
}

.reward-table-content {
    min-width: 600px;
}

.table-record-count {
    background-color: #f1f5ff;
    color: #0d6efd;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.3px;
}

/* Webkit browsers (Chrome, Safari, Edge) - Horizontal scrollbar */
.reward-table-inner::-webkit-scrollbar {
    height: 8px;
}

.reward-table-inner::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.reward-table-inner::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 4px;
}

.reward-table-inner::-webkit-scrollbar-thumb:hover {
    background: #3151B8;
}

#loyaltyHistoryTable {
    margin-bottom: 0;
    width: 100%;
    min-width: 600px; /* Minimum width to enable horizontal scroll on mobile */
    border-collapse: collapse;
    table-layout: fixed;
}

#loyaltyHistoryTable thead {
    display: table;
    width: 100%;
    min-width: 600px; /* Match table min-width */
    table-layout: fixed;
}

#loyaltyHistoryTable thead tr {
    display: table-row;
}

#loyaltyHistoryTable thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
    display: table-cell;
}

#loyaltyHistoryTable thead th:nth-child(1) { width: 16%; }
#loyaltyHistoryTable thead th:nth-child(2) { width: 18%; }
#loyaltyHistoryTable thead th:nth-child(3) { width: 26%; }
#loyaltyHistoryTable thead th:nth-child(4) { width: 14%; }
#loyaltyHistoryTable thead th:nth-child(5) { width: 26%; }

#loyaltyHistoryTable tbody {
    display: block;
    overflow-y: auto;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 308px); /* Adjust based on header, title, padding, search input, and table header */
    width: 100%;
    scrollbar-color: #4169E1 #e0e0e0; /* Firefox: thumb and track */
    scrollbar-width: thin;
}

/* Webkit browsers (Chrome, Safari, Edge) - Vertical scrollbar */
#loyaltyHistoryTable tbody::-webkit-scrollbar {
    width: 8px;
}

#loyaltyHistoryTable tbody::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

#loyaltyHistoryTable tbody::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 4px;
}

#loyaltyHistoryTable tbody::-webkit-scrollbar-thumb:hover {
    background: #3151B8;
}

#loyaltyHistoryTable tbody tr {
    display: table;
    width: 100%;
    min-width: 600px; /* Match table min-width */
    table-layout: fixed;
}

#loyaltyHistoryTable tbody td {
    display: table-cell;
}

#loyaltyHistoryTable tbody td:nth-child(1) { width: 16%; }
#loyaltyHistoryTable tbody td:nth-child(2) { width: 18%; }
#loyaltyHistoryTable tbody td:nth-child(3) { width: 26%; }
#loyaltyHistoryTable tbody td:nth-child(4) { width: 14%; }
#loyaltyHistoryTable tbody td:nth-child(5) { width: 26%; }

.reward-search-container {
    padding: 15px 0;
}

.reward-search-input {
    max-width: 400px;
}

.product-code-field option {
    padding: 8px 12px;
}

.product-code-field::-webkit-scrollbar {
    width: 8px;
}

.product-code-field::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.product-code-field::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 4px;
}

.product-code-field::-webkit-scrollbar-thumb:hover {
    background: #3151B8;
}

