:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --light-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

body {
	padding: 1rem;
	background: var(--light-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
}

h1 {
	font-size: 18px;
	margin-top: 0;
}

p {
	color: rgb(107, 114, 128);
	font-size: 15px;
	margin-bottom: 10px;
	margin-top: 5px;
}

.big-checkbox {
    width: 1.25rem;
    height: 1.25rem;
}

.card {
	margin: 0 auto;
	padding: 16px;
	border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
}

.card p:last-child {
	margin-bottom: 0;
}

.card.box-item {
    text-decoration: none;
    text-align: center;
    margin-top: 10px;
    cursor: pointer;
}

.card.box-item .title {
    font-weight: 700;
    font-size: 18px;
}

.card.box-item .value {
    font-size: 18px;
}

.big-table>:not(caption)>*>* {
    padding: .5rem 0;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
}

.danger-row * {
    color: red !important;
    border-color: red !important;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.table {
    border-radius: 15px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
    padding: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.address-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.header-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/********* loading *********/
div.screen-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    background-color: rgba(16, 16, 16, 0.5);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/******** autocomplete *********/
.ui-autocomplete {
    z-index: 99999;
    list-style: none;
    padding-left: 1rem;
    width: auto !important;
    min-width: 0 !important;
    max-width: 300px !important;
    background: #fff !important;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ui-autocomplete li {
    padding: 2px 0px 2px 0px;
    cursor: pointer;
}

.ui-autocomplete-input {

}

/******** pagination *********/
.pagination .page-link {
    font-size: 1rem;
}
.pagination-arrows {
    display:flex;
    align-items: center;
    justify-content: center;
}
.pagination-arrows a,
.pagination-arrows span {
    display:flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    cursor: pointer;
}
.pagination-arrows a,
.pagination-arrows span {
    color: #fff;
}
.pagination-arrows a:hover,
.pagination-arrows span:hover {
    text-decoration: none;
}
.pagination-arrows a:nth-child(1),
.pagination-arrows a:nth-child(5),
.pagination-arrows #prevPageButton,
.pagination-arrows #nextPageButton {
    color: var(--primary-color);
}
.pagination-arrows span:nth-child(1),
.pagination-arrows span:nth-child(5) {
    background: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-width: 1px;
    border-color: var(--primary-color);
}
.pagination-sm .page-link { font-size: 1rem; }

/*** order recipient list ***/
.delivery-order-recipient-table .form-control {
    padding: 3px;
    border-radius: 0px;
}

.recipient-cell {
    min-width: 150px;
}

.recipient-phone-number-cell {
    min-width: 120px;
}

.address-input-groups-cell {
    min-width: 400px;
}

.address-input-groups-cell .address-number {
    flex: 0 0 33%;
}

.product-quantity-cell {
    max-width: 50px;
}

.cod-amount-cell,
.goods-value-cell {
    min-width: 100px;
}

.notes-cell {
    min-width: 200px;
}

.import-delivery-order-recipients-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.shipment-tracking-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

@media (max-width: 576px) {
    body {
        padding: 0px;
    }

    .w-m-100 {
        width: 100%;
    }
}

/* Thành công */
.text-delivered,
.text-reconciled,
.text-picked-up,
.text-cleared-customs,
.text-delivered-to-receiving-warehouse,
.text-allocated-at-warehouse {
    color: #16a34a; /* xanh lá */
    font-weight: 600;
}

/* Đang xử lý / đang giao */
.text-in-transit,
.text-out-for-delivery,
.text-retrieving-products,
.text-packing,
.text-shipped,
.text-request-sent,
.text-request-received,
.text-delivery-service-processing,
.text-in-transit-to-customs,
.text-awaiting-clearance,
.text-at-receiving-warehouse {
    color: #2563eb; /* xanh dương */
    font-weight: 600;
}

/* Chờ / hoãn */
.text-pickup-postponed,
.text-hold,
.text-redelivery-requested,
.text-redelivery-requested-by-customer,
.text-forwarded-to-another-branch {
    color: #ca8a04; /* vàng đậm */
    font-weight: 600;
}

/* Lỗi / huỷ */
.text-cancelled,
.text-cancel-by-customer,
.text-request-send-failed,
.text-unable-to-pick-up,
.text-unable-to-deliver,
.text-failed-delivery-attempt,
.text-delayed-delivery,
.text-refunded-order,
.text-returning-to-sender,
.text-returned-to-sender,
.text-failed-return-notice,
.text-customer-not-at-home,
.text-customer-need-to-picks-up-at-branch,
.text-rejected,
.text-deleted,
.text-invalid,
.text-exception {
    color: #dc2626; /* đỏ */
    font-weight: 600;
}

/* Trung lập / chưa biết */
.text-unknown,
.text-unknown-at-warehouse,
.text-no-customer-at-warehouse,
.text-unallocated-at-warehouse,
.text-not-at-input-warehouse {
    color: #6b7280; /* xám */
    font-weight: 600;
}

/* Kho / hải quan */
.text-scanned-at-input-warehouse,
.text-declared-at-input-warehouse,
.text-packed-at-input-warehouse,
.text-in-customs,
.text-merged-at-receiving-warehouse,
.text-in-package-at-receiving-warehouse {
    color: #7e22ce; /* tím */
    font-weight: 600;
}

.text-revenue-entry-from-origin-branch,
.text-cancel-receipt,
.text-edit-receipt,
.text-reconciled-return-debt {
    color: #0d9488; /* teal */
    font-weight: 600;
}
