/* order-list.css */
/* Sử dụng CSS module riêng cho trang Orders */

/* Đảm bảo phạm vi sử dụng CSS */
.order-list-container {
    font-family: inherit;
    /* padding: 1rem; */
}

/* Phần header */
.order-list-header {
    background-color: var(--text-light);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.order-list-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Bộ lọc và tìm kiếm */
.order-list-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.order-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 3;
}

.order-list-search {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

/* Nút lọc */
.order-list-status-btn {
    position: relative;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-list-status-btn:hover {
/*    transform: translateY(-2px);*/
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .order-list-status-btn.active {
        border: 3px solid #9d7000 !important;
        background-color: var(--primary-color) !important;
    }

.order-list-status-btn.new {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.order-list-status-btn.confirmed {
    background-color: var(--primary-color);
    color: var(--text-light);
}

    .order-list-status-btn.paid {
        background-color: #f39c12;
        color: var(--text-light);
        border: 3px solid;
    }

/* Badge thông báo số lượng */
.order-list-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background-color: var(--danger-color);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.spin-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ô tìm kiếm */
.order-list-search-box {
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    padding: 5px
    /* box-shadow: var(--box-shadow); */
}

.order-list-search-box .input-group-text {
    background-color: var(--gray-light);
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.order-list-search-box input {
    border: none;
    padding: 0.5rem 1rem;
    flex: 1;
}

.order-list-search-box input:focus {
    outline: none;
    box-shadow: none;
}

.order-list-search-box .btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.order-list-search-box .btn:hover {
    background-color: var(--primary-dark);
}

.order-list-search-box .input-group-select {
    border: 1px solid var(--gray-medium);
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
    line-height: 1.3 !important;
    display: block;
    width: 100%;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    border-radius: 0.35rem;
}

.order-list-search-box .input-group-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(242, 140, 48, 0.25);
}


/* Bảng danh sách đơn hàng */
.order-list-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-medium);
}

.order-list-table thead tr:first-child {
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
}

.order-list-table thead tr:first-child.new-header {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.order-list-table thead tr:first-child.confirmed-header {
    background-color: rgba(173, 181, 189, 0.2);
    color: #5a6268;
}

.order-list-table thead tr:first-child.paid-header {
    background-color: rgba(25, 135, 84, 0.2);
    color: #146c43;
}

.order-list-table thead tr:first-child td {
    padding: 1rem;
    border: 1px solid var(--gray-medium);
    text-align: center;
}

.order-list-table thead tr:last-child {
    background-color: var(--gray-light);
}

.order-list-table thead tr:last-child th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-medium);
    color: var(--text-dark);
    text-align: center;
}

.order-list-table tbody tr {
    background-color: var(--text-light);
    transition: var(--transition);
}

.order-list-table tbody tr:hover {
    background-color: rgba(242, 140, 48, 0.05);
}

.order-list-table tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--gray-medium);
}

.order-list-table tbody td {
    padding: 0.5rem;
    vertical-align: middle;
    border: 1px solid var(--gray-medium);
}

.order-list-table tfoot td {
    border: 1px solid var(--gray-medium);
}

.order-list-table tbody td.order-code {
    font-weight: 600;
    text-align: center;
}

.order-list-table tbody td.customer-name {
    font-weight: 500;
}

.order-list-table tbody td.phone {
    text-align: center;
}

.order-list-table tbody td.price {
    text-align: right;
    font-weight: 600;
}

.order-list-table tbody td.date {
    text-align: center;
}

.order-list-table tbody td.actions {
    text-align: center;
    display: flex;
    justify-content: center;
}

/* Nút hành động */
.order-list-action-btn {
    border-radius: var(--border-radius);
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    transition: var(--transition);
    margin-right: 0.35rem;
}

.order-list-action-btn:last-child {
    margin-right: 0;
}

.order-list-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.order-list-action-btn.print {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.order-list-action-btn.view {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Phân trang */
.order-list-pagination {
/*    display: flex;
    justify-content: center;*/
    padding: 1rem;
}

/* Trạng thái xuất kho */
.warehouse-exported {
    color: #0d6efd !important;
}

.warehouse-not-exported {
    color: #fd7e14 !important;
}

/* Cải thiện hiển thị cho các bảng có lớp table-bordered */
.order-list-table.table-bordered {
    border: 1px solid var(--gray-medium);
}

.order-list-table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive */
@media (max-width: 992px) {
    .order-list-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .order-list-filters, .order-list-search {
        width: 100%;
    }
    
    .order-list-search {
        min-width: auto;
    }
    
    .order-list-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .order-list-table thead tr:last-child th:nth-child(3),
    .order-list-table tbody td:nth-child(3),
    .order-list-table thead tr:last-child th:nth-child(4),
    .order-list-table tbody td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 576px) {
    .order-list-header h1 {
        font-size: 1.4rem;
    }
    
    .order-list-action-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* CSS cho trang quản lý đơn hàng giao hàng */
/* Sử dụng prefix delivery- để tách biệt với các trang khác */

.delivery-container {
    font-family: inherit;
    /* padding: 1rem; */
}

/* Phần header */
.delivery-header {
    background-color: var(--text-light);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.delivery-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Bộ lọc và tìm kiếm */
.delivery-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.delivery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 3;
}

.delivery-search {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

/* Nút lọc */
.delivery-status-btn {
    position: relative;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delivery-status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.delivery-status-btn.active {
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.delivery-status-btn.new {
    background-color: var(--info-color);
    color: var(--text-light);
}

.delivery-status-btn.confirmed {
    background-color: var(--gray-medium);
    color: var(--text-dark);
}

.delivery-status-btn.sent {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.delivery-status-btn.received {
    background-color: var(--success-color);
    color: var(--text-light);
}

.delivery-status-btn.cancelled {
    background-color: var(--danger-color);
    color: var(--text-light);
}
/* Badge thông báo số lượng */
.delivery-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background-color: var(--danger-color);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ô tìm kiếm */
.delivery-search-box {
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    padding: 5px
    /* box-shadow: var(--box-shadow); */
}

.delivery-search-box .input-group-text {
    background-color: var(--gray-light);
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.delivery-search-box input {
    border: none;
    padding: 0.5rem 1rem;
    flex: 1;
}

.delivery-search-box input:focus {
    outline: none;
    box-shadow: none;
}

.delivery-search-box .btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.delivery-search-box .btn:hover {
    background-color: var(--primary-dark);
}

.delivery-search-box .input-group-select {
    border: 1px solid var(--gray-medium);
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
    line-height: 1.3 !important;
    display: block;
    width: 100%;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    border-radius: 0.35rem;
}

.delivery-search-box .input-group-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(242, 140, 48, 0.25);
}


/* Bảng danh sách đơn hàng */
.delivery-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-medium);
}

.delivery-table thead tr:first-child {
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
}

.delivery-table thead tr:first-child.new-header {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.delivery-table thead tr:first-child.confirmed-header {
    background-color: rgba(173, 181, 189, 0.2);
    color: #5a6268;
}

.delivery-table thead tr:first-child.sent-header {
    background-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
}

.delivery-table thead tr:first-child.received-header {
    background-color: rgba(25, 135, 84, 0.2);
    color: #146c43;
}

.delivery-table thead tr:first-child.cancelled-header {
    background-color: rgba(220, 53, 69, 0.2);
    color: #b02a37;
}

.delivery-table thead tr:first-child td {
    padding: 1rem;
    border: 1px solid var(--gray-medium);
    text-align: center;
}

.delivery-table thead tr:last-child {
    background-color: var(--gray-light);
}

.delivery-table thead tr:last-child th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-medium);
    color: var(--text-dark);
    text-align: center;
}

.delivery-table tbody tr {
    background-color: var(--text-light);
    transition: var(--transition);
}

.delivery-table tbody tr:hover {
    background-color: rgba(242, 140, 48, 0.05);
}

.delivery-table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.delivery-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border: 1px solid var(--gray-medium);
}

.delivery-table tfoot td {
    border: 1px solid var(--gray-medium);
}

.delivery-table tbody td.order-code {
    font-weight: 600;
    text-align: center;
}

.delivery-table tbody td.customer-name {
    font-weight: 500;
}

.delivery-table tbody td.phone {
    text-align: center;
}

.delivery-table tbody td.price {
    text-align: right;
    font-weight: 600;
}

.delivery-table tbody td.date {
    text-align: center;
}

.delivery-table tbody td.actions {
    text-align: center;
    display: flex;
    justify-content: center;
}

/* Nút hành động */
.delivery-action-btn {
    border-radius: var(--border-radius);
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    transition: var(--transition);
    margin-right: 0.35rem;
    display: inline-block;
    text-decoration: none;
}

.delivery-action-btn:last-child {
    margin-right: 0;
}

.delivery-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.delivery-action-btn.print {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.delivery-action-btn.view {
    background-color: var(--info-color);
    color: var(--text-light);
}

/* Phân trang */
.delivery-pagination {
    padding: 1rem;
}


/*Tìm kiếm nâng cao*/
.filter-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    margin-top: 10px;
    border-top: 4px solid #f39c12 !important;
}

.filter-search {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

.filter-box span {
    font-weight: 600;
    margin-bottom: 4px;
    color: #6c757d;
}

.filter-box select,
.filter-box input {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.95rem;
    width: 100%;
}

.filter-box button {
    margin-top: auto;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

/* Trạng thái xuất kho */
.warehouse-exported {
    color: #0d6efd !important;
}

.warehouse-not-exported {
    color: #fd7e14 !important;
}

/* Responsive */
@media (max-width: 992px) {
    .delivery-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .delivery-filters, .delivery-search {
        width: 100%;
    }
    
    .delivery-search {
        min-width: auto;
    }
    
    .delivery-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .delivery-table thead tr:last-child th:nth-child(3),
    .delivery-table tbody td:nth-child(3),
    .delivery-table thead tr:last-child th:nth-child(4),
    .delivery-table tbody td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 576px) {
    .delivery-header h1 {
        font-size: 1.4rem;
    }
    
    .delivery-action-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* CSS cho trang quản lý khách hàng */
/* Sử dụng prefix customer- để tách biệt với các trang khác */

.customer-container {
    font-family: inherit;
    /* padding: 1rem; */
}

/* Phần header */
.customer-header {
    background-color: var(--text-light);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.customer-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Phần card danh sách khách hàng */
.customer-card {
    border-radius: var(--border-radius);
    background-color: var(--text-light);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    border: none;
    overflow: hidden;
}

.customer-card-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border: none;
}

.customer-card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.customer-card-body {
    padding: 1.5rem;
}

/* Khu vực tìm kiếm */


/* Bảng danh sách khách hàng */
.customer-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-medium);
}

.customer-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-medium);
    background-color: var(--gray-light);
    color: var(--text-dark);
    text-align: center;
}

.customer-table tbody tr {
    background-color: var(--text-light);
    transition: var(--transition);
    cursor: pointer;
}

.customer-table tbody tr:hover {
    background-color: rgba(242, 140, 48, 0.05);
}

.customer-table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.customer-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border: 1px solid var(--gray-medium);
}

.customer-table tfoot td {
    padding: 0.75rem;
    border: 1px solid var(--gray-medium);
    text-align: center;
}

.customer-table .customer-name {
    font-weight: 500;
}

.customer-table .customer-phone {
    text-align: center;
}

.customer-table .customer-date {
    text-align: center;
}

.customer-table .customer-count {
    text-align: right;
    font-weight: 600;
}

.customer-table .customer-amount {
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

.customer-table .customer-amount sup {
    font-size: 0.7em;
    font-weight: normal;
    top: -0.5em;
    position: relative;
}

/* Phân trang */
.customer-pagination {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

/* Loading indicator */
.customer-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 100%;
}

/* Responsive */
@media (max-width: 992px) {
    .customer-table {
        font-size: 0.9rem;
    }
    
    .customer-card-body {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .customer-table thead th:nth-child(3),
    .customer-table tbody td:nth-child(3) {
        display: none;
    }
    
    .customer-table thead th:nth-child(4),
    .customer-table tbody td:nth-child(4) {
        display: none;
    }
    
    .customer-header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .customer-header h1 {
        font-size: 1.2rem;
    }
    
    .customer-table thead th,
    .customer-table tbody td {
        padding: 0.5rem;
    }
}

/* CSS cho trang nhập kho */
/* Sử dụng prefix warehouse- để tách biệt với các trang khác */

.warehouse-inputs-container {
    font-family: inherit;
}


/*CSS OrderCreateF&B*/
/* Left Content */
.left-content {
    width: 65%;
    padding: 20px;
    overflow-y: auto;
    background-color: white;
    margin-right: 10px;
    position: relative;
    height: calc(100vh - 160px);
    border-radius: 10px;
}

.order-main-content {
    gap: 0.5rem !important;
}

.left-content::-webkit-scrollbar {
    display: none;
}

.right-content {
    width: 35%;
    background: white;
    overflow-y: auto;
    border-radius: 10px;
    height: calc(100vh - 160px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

    .right-content::-webkit-scrollbar {
        display: none;
    }

.order-info {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

    .order-info h3 {
        color: #2c3e50;
        margin-bottom: 15px;
    }

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
}

    .info-row label {
        font-weight: 600;
        color: #666;
    }

.info-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 120px;
}

/* Customer Info */
.customer-info {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .customer-header h3 {
        color: #2c3e50;
    }

.edit-customer-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.customer-display {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.customer-type {
    color: #ff6b35;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

/* Customer Modal */
.customer-modal {
    position: fixed;
    top: 70px;
    right: 0;
    bottom: 0;
    width: 35%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 150;
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
}

    .customer-modal.show {
        transform: translateX(0);
    }

.order-summary {
    padding: 20px;
}

    .order-summary h3 {
        color: #2c3e50;
        margin-bottom: 15px;
    }

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    align-items: center;
}

    .summary-row.total {
        border-top: 2px solid #ff6b35;
        padding-top: 15px;
        margin-top: 15px;
        font-weight: 600;
        font-size: 18px;
        color: #ff6b35;
    }

.payment-btn {
    background: linear-gradient(135deg, #f96a00, #f7931e);
    color: white;
    border: none;
    padding: 5px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

    .payment-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
    }

.tax-card-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tax-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 7px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tax-card-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.tax-card-body {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.tax-card-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

.Delivery-modal {
    position: fixed;
    top: 70px;
    right: 0;
    bottom: 0;
    width: 35%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 150;
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
}

    .Delivery-modal.show {
        transform: translateX(0);
    }

@media (max-width: 1439px) and (min-width: 1024px) {
    .left-content {
        width: 68%;
    }

    .right-content {
        width: 32%;
    }

    .info-input {
        width: 100px;
    }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .left-content {
        width: 60%;
        padding: 15px;
        margin-right: 8px;
    }

    .right-content {
        width: 40%;
    }

    .order-info, .customer-info, .order-summary {
        padding: 15px;
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .info-input {
        width: 100%;
        max-width: 200px;
    }

    .customer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .customer-modal {
        width: 50%;
        top: 60px;
    }

    .payment-btn {
        font-size: 16px;
        padding: 12px;
    }

    .summary-row.total {
        font-size: 16px;
    }
}

/* Tablet Portrait (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    .left-content, .right-content {
        width: 100%;
        height: auto;
        min-height: 50vh;
        margin-right: 0;
        margin-bottom: 10px;
        border-radius: 8px;
    }

    .left-content {
        padding: 12px;
    }

    .order-info, .customer-info, .order-summary {
        padding: 12px;
    }

    .info-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .info-input {
        width: 100%;
    }

    .customer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .customer-modal {
        width: 90%;
        left: 5%;
        right: 5%;
        top: 80px;
        border-radius: 15px;
    }

    .payment-btn {
        font-size: 16px;
        padding: 14px;
        border-radius: 8px;
    }

    .edit-customer-btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .tax-card {
        padding: 10px;
    }

    .tax-card-header, .tax-card-row {
        font-size: 14px;
    }
}

/* Mobile (320px - 480px) */
@media (max-width: 480px) {
    .left-content, .right-content {
        width: 100%;
        height: auto;
        min-height: 40vh;
        margin: 0 0 8px 0;
        padding: 10px;
        border-radius: 6px;
    }

    .order-info, .customer-info, .order-summary {
        padding: 10px;
    }

        .order-info h3, .customer-header h3, .order-summary h3 {
            font-size: 16px;
            margin-bottom: 10px;
        }

    .info-row {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 8px;
        padding: 6px 0;
    }

        .info-row label {
            font-size: 14px;
        }

    .info-input {
        width: 100%;
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .customer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .customer-type {
        font-size: 14px;
    }

    .customer-display {
        padding: 8px;
        font-size: 14px;
    }

    .customer-modal {
        width: 95%;
        left: 2.5%;
        right: 2.5%;
        top: 60px;
        padding: 15px;
        border-radius: 12px;
    }

    .payment-btn {
        font-size: 16px;
        padding: 12px;
        border-radius: 6px;
        margin-top: 10px;
    }

    .edit-customer-btn {
        font-size: 10px;
        padding: 5px 8px;
        width: 100%;
        margin-top: 5px;
    }

    .summary-row {
        padding: 8px 0;
        font-size: 14px;
    }

        .summary-row.total {
            font-size: 16px;
            padding-top: 12px;
            margin-top: 12px;
        }

    .tax-card {
        padding: 8px;
        margin-bottom: 5px;
    }

    .tax-card-header, .tax-card-row {
        font-size: 13px;
    }

    .tax-card-body {
        margin-top: 8px;
        padding-top: 6px;
    }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
    .left-content, .right-content {
        padding: 8px;
        margin: 0 0 5px 0;
    }

    .order-info, .customer-info, .order-summary {
        padding: 8px;
    }

    .payment-btn {
        font-size: 14px;
        padding: 8px;
    }

    .customer-modal {
        width: 98%;
        left: 1%;
        right: 1%;
        padding: 10px;
    }

    .info-input {
        padding: 8px;
    }
}

/*    CategoryAndProduct*/

.category-container {
    margin-bottom: 30px;
    position: relative;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    scrollbar-width: thin;
    -ms-overflow-style: none;
}

    .category-scroll::-webkit-scrollbar {
        height: 6px;
    }

    .category-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .category-scroll::-webkit-scrollbar-thumb {
        background: #ff6b35;
        border-radius: 10px;
    }

        .category-scroll::-webkit-scrollbar-thumb:hover {
            background: #e55a2b;
        }


/* Category Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 49;
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
}

    .modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }


.category-modal {
    position: absolute;
    top: 120px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 50;
    max-height: 350px;
    border: 2px solid #c3a759;
    will-change: transform, opacity;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

    .category-modal::-webkit-scrollbar {
        display: none;
    }

    .category-modal.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

.back-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

    .back-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 15px;
    padding: 4px;
    contain: layout style paint;
}

.product-cardd {
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    will-change: transform, box-shadow;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    backface-visibility: hidden;
    contain: layout paint;
}

.product-count {
    position: absolute;
    bottom: -7px;
    right: 6px;
    font-size: 30px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
    color: transparent;
    -webkit-text-stroke: 1px #979797;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.remove-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background-color: #ffa959;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 10;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 10px;
    transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    backface-visibility: hidden;
}

    .remove-btn:hover {
        transform: scale(1.05);
    }

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    will-change: auto;
    backface-visibility: hidden;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.product-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
    word-break: break-word;
    hyphens: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.product-emoji {
    font-size: 30px;
    margin-bottom: 10px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.product-price {
    color: #ff6b35;
    font-weight: 600;
    font-size: 14px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.search-input {
    transition: all 0.2s ease;
    will-change: border-color, box-shadow;
}

    .search-input:focus {
        border-color: #c3a759;
        box-shadow: 0 0 0 2px rgba(195, 167, 89, 0.2);
    }

.category-item {
    background: linear-gradient(135deg, #ffb035, #ff9519);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    font-weight: 600;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .category-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }

    .category-item.active {
        background: #2c3e50;
    }

.close {
    position: absolute;
    top: 5px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    z-index: 1;
}

    .close:hover {
        color: #333;
    }

.category-modal * {
    box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
    .category-modal,
    .modal-overlay,
    .product-cardd,
    .remove-btn,
    .back-button {
        transition: none;
    }

        .product-cardd:hover {
            transform: none;
        }

        .back-button:hover {
            transform: none;
        }
}

@media (max-width: 768px) {
    .category-modal {
        left: 10px;
        right: 10px;
        padding: 15px;
        max-height: 70vh;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 6px;
    }

    .product-image {
        width: 50px;
        height: 50px;
    }

    .product-emoji {
        font-size: 24px;
    }

    .product-count {
        font-size: 24px;
        bottom: -5px;
        right: 4px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-areas {
    margin-bottom: 5px;
}

    .filter-areas select {
        width: 200px;
    }

    .filter-areas label {
        margin-bottom: 0.1rem !important;
    }

.area-root {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 10px;
}

.node-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
}

.node-title-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 12px;
}

.node-children {
    border-top: 1px solid #e5e7eb;
    padding: 10px 12px;
}


.grid-summary-area {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
    gap: 10px;
    padding: 10px;
}

.summary-card {
    height: 80px;
    background: white;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(139, 126, 158, 0.1);
    border: 1px solid #e5e7eb;
}

    .summary-card .Total {
        font-size: 18px;
        font-weight: 800;
        text-align: center;
    }

    .summary-card .Status {
        color: #6b7280;
        text-align: center;
    }

.grid-tables {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 10px;
    padding: 10px;
}

.table-card {
    height: 130px;
    background: white;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(139, 126, 158, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

    .table-card.processing::after {
        content: "Đang chọn món...";
        position: absolute;
        border-radius: 16px;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3); 
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;
        font-weight: 600;
        font-size: 16px;
        letter-spacing: 0.5px;
        text-shadow: 0 0 5px rgba(0,0,0,0.3);
        z-index: 2;
        backdrop-filter: blur(2px);
        pointer-events: none;
    }

.table-card.processing::after {
    animation: pulseText 1.5s infinite;
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    display: flex;
    gap: 10px;
}

.merge-link-bagde {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.table-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-order {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.info-order-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 11px;
}

.info-order-icon {
    font-size: 12px;
    opacity: 0.8;
}

.info-order-icon-warning {
    color: #ff5454;
}

@keyframes shake-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    20% {
        transform: translateY(-3px);
    }

    40% {
        transform: translateY(2px);
    }

    60% {
        transform: translateY(-2px);
    }

    80% {
        transform: translateY(1px);
    }
}

.shake {
    animation: shake-bounce 1.5s ease-in-out infinite;
}

.table-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.list-view {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
    transition: background 0.2s;
}

    .list-item:hover {
        background: #f9fafb;
        cursor: pointer;
    }

    .list-item:not(:last-child) {
        border-bottom: 1px solid #f3f4f6;
    }

.list-id {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    min-width: 90px;
}

.list-time,
.list-customer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.list-customer {
    flex: 1;
}

    .list-time i,
    .list-customer i {
        font-size: 11px;
    }

.list-amount {
    font-weight: bold;
    color: #111827;
    font-size: 14px;
}

.view-toggle {
    display: inline-flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    padding: 2px;
}

    .view-toggle button {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        border: none;
        background: transparent;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        color: #6b7280;
    }

        .view-toggle button:hover {
            background: #f9fafb;
            color: #111827;
        }

        .view-toggle button.active {
            background: var(--primary-color);
            color: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .view-toggle button i {
            font-size: 16px;
        }

.status-badge {
    padding: 4px 7px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.card-price {
    font-size: 16px;
    font-weight: 800;
}

.action-card {
    display: flex;
    flex-direction: row;
    gap: 5px;
    position: relative;
}

    .action-card::before {
        content: "";
        position: absolute;
        top: -10px;
        right: -10px;
        bottom: -8px;
        left: -10px;
        border-radius: 50%;
    }

.action-icon {
    cursor: pointer;
    color: #444;
    padding: 5px;
    font-size: 16px;
}

    .action-icon:hover {
        color: #007bff;
    }

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 49;
}

/* Tấm card nổi */
.floating-card {
    position: absolute;
    top: 25px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 50;
    width: 180px;
    animation: fadeIn 0.15s ease-in;
}

.action-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

    .action-list li {
        padding: 10px 15px;
        cursor: pointer;
        transition: background 0.2s;
        font-size: 14px;
    }

        .action-list li:hover {
            background: #f2f2f2;
        }

.area-history-card {
    position: absolute;
    top: -16px;
    left: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 50;
    width: 300px;
    animation: fadeIn 0.15s ease-in;
}

.area-history-card-header {
    background: #fff3e0;
    border-radius: 10px 10px 0 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
}

.area-history-body {
    padding: 8px 10px;
    max-height: 350px;
    overflow: auto;
}

.area-history-list {
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 10px;
}
    .area-history-list:not(:last-child) {
        margin-bottom: 5px;
    }

        .area-history-list:hover {
            background: #f2f2f2;
        }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-new .status-dot {
    background: #a8d5a8;
    box-shadow: 0 0 10px rgba(168, 213, 168, 0.6);
}

.status-new .action-card i {
    color: #a8d5a8;
}

.status-new .status-badge {
    background: #e8f5e9;
    color: #4caf50;
}

.status-new .merge-link-bagde {
    background: #e8f5e9;
    color: #4caf50;
}

.status-new .card-price {
    color: #4caf50;
}

.status-confirmed .status-dot {
    background: #90caf9;
    box-shadow: 0 0 10px rgba(144, 202, 249, 0.6);
}
.status-confirmed .action-card i {
    color: #90caf9;
}

.status-confirmed .status-badge {
    background: #e3f2fd;
    color: #1976d2;
}
.status-confirmed .merge-link-bagde {
    background: #e3f2fd;
    color: #1976d2;
}

.status-confirmed .card-price {
    color: #1976d2;
}

.status-serving .status-dot {
    background: #4db6ac;
    box-shadow: 0 0 10px rgba(77, 182, 172, 0.6);
}
.status-serving .action-card i {
    color: #4db6ac;
}

.status-serving .status-badge {
    background: #e0f2f1;
    color: #00897b;
}
.status-serving .merge-link-bagde {
    background: #e0f2f1;
    color: #00897b;
}
.status-serving .card-price {
    color: #00897b;
}

.status-booked .status-dot {
    background: #ffb74d;
    box-shadow: 0 0 10px rgba(255, 183, 77, 0.6);
}
.status-booked .action-card i {
    color: #ffb74d;
}

.status-booked .status-badge {
    background: #fff3e0;
    color: #f57c00;
}
.status-booked .merge-link-bagde {
    background: #fff3e0;
    color: #f57c00;
}

.status-booked .card-price {
    color: #f57c00;
}

.status-waiting .status-dot {
    background: #ce93d8;
    box-shadow: 0 0 10px rgba(206, 147, 216, 0.6);
}
.status-waiting .action-card i {
    color: #ce93d8;
}

.status-waiting .status-badge {
    background: #f3e5f5;
    color: #7b1fa2;
}
.status-waiting .merge-link-bagde {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-waiting .card-price {
    color: #7b1fa2;
}

.status-takeaway .status-dot {
    background: #90caf9;
    box-shadow: 0 0 10px rgba(144, 202, 249, 0.6);
}

.status-takeaway .action-card i {
    color: #64b5f6;
}

.status-takeaway .status-badge {
    background: #e3f2fd;
    color: #1565c0;
}

.status-takeaway .merge-link-bagde {
    background: #e3f2fd;
    color: #1565c0;
}

.status-takeaway .card-price {
    color: #1565c0;
}

.status-cooking .status-dot {
    background: #ff8a65;
    box-shadow: 0 0 10px rgba(255, 138, 101, 0.6);
}
.status-cooking .action-card i {
    color: #ff8a65;
}


.status-cooking .status-badge {
    background: #fbe9e7;
    color: #d84315;
}

.status-cooking .merge-link-bagde {
    background: #fbe9e7;
    color: #d84315;
}

.status-cooking .card-price {
    color: #d84315;
}

.status-vip .status-dot {
    background: #ffd54f;
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.6);
}
.status-vip .action-card i {
    color: #ffd54f;
}

.status-vip .status-badge {
    background: #fffde7;
    color: #f57f17;
}
.status-vip .merge-link-bagde {
    background: #fffde7;
    color: #f57f17;
}

.status-vip .card-price {
    color: #f57f17;
}

.status-empty .status-dot {
    background: #b0bec5;
    box-shadow: 0 0 10px rgba(176, 190, 197, 0.6);
}

.status-empty .status-badge {
    background: #eceff1;
    color: #546e7a;
}
.status-empty .merge-link-bagde {
    background: #eceff1;
    color: #546e7a;
}

.status-empty .card-price {
    color: #546e7a;
}

.status-empty .action-card i {
    color: #546e7a;
}

.badge-faB {
    font-size: 12px;
    color: #6b7280;
}

.breadcrumb-faB {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
}

     .btn-reset-breadcrum {
        border: 1px solid #e5e7eb;
        background: #fff;
        color: #1f2937;
        border-radius: 8px;
        cursor: pointer;
        padding: 4px 8px;
        font-size: 12px;
    }

.btn-back-area {
    border: 1px solid #d3d3d3;
    background: #fff;
    color: #1f2937;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
}

.modal-custom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .modal-custom-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-custom-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-custom-header {
    background: #fff3e0;
    padding: 15px;
    text-align: center;
    position: relative;
}

.modal-custom-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-custom-title {
    font-size: 24px;
    font-weight: 700;
    color: #f57c00;
}

.modal-custom-subtitle {
    font-size: 14px;
    color: #f57c00;
    opacity: 0.9;
}

.modal-custom-body {
    padding: 20px;
}

.modal-custom-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.booking-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

    .booking-info-item:last-child {
        border-bottom: none;
    }

.booking-info-label {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.modal-custom-message {
    text-align: center;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-custom-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-custom-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: .75rem;
    border-top: 1px solid #e3e6f0;
    border-bottom-right-radius: calc(.3rem - 1px);
    border-bottom-left-radius: calc(.3rem - 1px);
    justify-content: space-between;
}

@media (max-width: 768px) {
    .modal-custom-actions {
        flex-direction: column;
    }
}


.table-custom {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-medium);
}

    .table-custom thead tr {
        font-weight: 600;
        font-size: 1rem;
        text-transform: uppercase;
        background-color: var(--gray-light);
    }

        .table-custom thead tr:first-child.new-header {
            background-color: var(--primary-color);
            color: var(--text-light);
        }

        .table-custom thead tr:first-child.confirmed-header {
            background-color: rgba(173, 181, 189, 0.2);
            color: #5a6268;
        }

        .table-custom thead tr:first-child.paid-header {
            background-color: rgba(25, 135, 84, 0.2);
            color: #146c43;
        }

        .table-custom thead tr td {
            padding: 1rem;
            border: 1px solid var(--gray-medium);
            text-align: center;
        }


        .table-custom thead tr th {
            text-transform: uppercase;
            font-size: 0.85rem;
            padding: 0.5rem;
            border: 1px solid var(--gray-medium);
            color: var(--text-dark);
            text-align: center;
        }

        .table-custom thead tr:first-child {
            border-top: 4px solid #f39c12;
        }

    .table-custom tbody tr {
        background-color: var(--text-light);
        transition: var(--transition);
    }

        .table-custom tbody tr:hover {
            background-color: rgba(242, 140, 48, 0.05);
        }

        .table-custom tbody tr:not(:last-child) {
            border-bottom: 1px solid var(--gray-medium);
        }

    .table-custom tbody td {
        padding: 0.5rem;
        vertical-align: middle;
        border: 1px solid var(--gray-medium);
    }

    .table-custom tfoot td {
        border: 1px solid var(--gray-medium);
    }

    .table-custom tbody td.order-code {
        font-weight: 600;
        text-align: center;
    }

    .table-custom tbody td.customer-name {
        font-weight: 500;
    }

    .table-custom tbody td.phone {
        text-align: center;
    }

    .table-custom tbody td.price {
        text-align: right;
        font-weight: 600;
    }

    .table-custom tbody td.date {
        text-align: center;
    }

    .table-custom tbody td.actions {
        text-align: center;
        display: flex;
        justify-content: center;
    }

.upload-section {
    border: 3px dashed var(--primary-light);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .upload-section:hover {
        border-color: var(--primary-color);
        background: var(--primary-super-light);
    }

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .upload-icon svg {
        width: 40px;
        height: 40px;
        stroke: white;
    }

.upload-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.upload-section p {
    color: #666;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-info {
    padding: 15px;
    background: var(--primary-super-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--primary-color);
}

.file-info-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .file-icon svg {
        width: 28px;
        height: 28px;
        stroke: white;
    }

.file-details h4 {
    color: #333;
    margin-bottom: 5px;
}

.file-details p {
    color: #666;
    font-size: 14px;
}

.preview-section {
    margin-top: 10px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .preview-header h2 {
        color: #333;
        font-size: 24px;
    }

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stats-card {
    flex: 1;
    padding: 5px;
    border-radius: 8px;
    text-align: center;
}

.stat-card-success {
    background: #d4edda;
    border: 2px solid #28a745;
}

.stat-card-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.stat-card-price {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
}

.stat-card-quantity {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.stats-card h4 {
    margin-bottom: 3px;
    font-weight: 700;
}

.stats-card p {
    color: #666;
    margin: 0;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-valid {
    background: #d4edda;
    color: #28a745;
}

.status-error {
    background: #f8d7da;
    color: #dc3545;
}

.error-list {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

    .error-list h3 {
        color: #721c24;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .error-list ul {
        list-style: none;
    }

    .error-list li {
        color: #721c24;
        padding: 8px 0;
        border-bottom: 1px solid #f5c6cb;
    }

        .error-list li:last-child {
            border-bottom: none;
        }

.actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.template-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

    .template-link:hover {
        text-decoration: underline;
        color: var(--primary-color);
    }

.table-detail-container {
    overflow-y: auto;
    max-height: calc(100vh - 500px);
}

.detail-section {
    margin-bottom: 30px;
}

    .detail-section:last-child {
        margin-bottom: 0;
    }

    .detail-section h3 {
        color: var(--primary-color);
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f0f1ff;
    }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

    .detail-item label {
        font-weight: 600;
    }

    .detail-item span {
        color: #333;
    }


.tabs-container {
    position: relative;
}

.tabs-header {
    display: flex;
    position: relative;
    border-bottom: 0px solid #e5e7eb;
}

.tab-button {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: none;
    border: none;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100% / 3);
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.tab-button:hover {
    color: #111827;
}

.tab-button.active {
    color: var(--primary-color);
}