:root {
    --glass: rgba(255, 255, 255, 0.04);
    --radius: 12px;
    --gap: 12px;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.12);
    --border-soft: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

/* ===== Section ===== */
.products-section {
    padding: 40px 0;
    background-color: var(--light-color);
}

/* ===== Layout ===== */
.orders-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: flex-start;
}

.orders-pagination {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pager-info {
    color: var(--danger-color, #dc3545);
    font-size: var(--fs-sm, 0.9rem);
    border: 1px dashed var(--border-soft);
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
}

.date {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Table Wrapper ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

/* ===== Table ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 760px;
}

.table thead th {
    background: #333;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 16px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.selecthead {
    min-width: 120px;
    max-width: 150px;
}

.table td {
    padding: 14px 16px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
    max-width: 420px;
    font-size: 0.95rem;
    color: var(--dark-color, #222);
}

/* ===== Images ===== */
.table td img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* ===== Rows ===== */
.table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.025);
}

/* ===== Status Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.badge.pending {
    background: rgba(255, 165, 0, 0.14);
    color: #d97706;
}

.badge.assigned,
.badge.processing,
.badge.delivered {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.badge.shipped {
    background: rgba(37, 99, 235, 0.14);
    color: #2563eb;
}

.badge.cancelled,
.badge.returned {
    background: rgba(244, 67, 54, 0.14);
    color: #dc2626;
}

/* ===== Action Buttons ===== */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap);
    flex-wrap: wrap;
}

.action-btn {
    border: none;
    min-width: 38px;
    height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.action-btn.edit {
    background: rgba(255, 193, 7, 0.14);
    color: #ff9800;
}

.action-btn.edit:hover {
    background: #ff9800;
    color: #fff;
}

.action-btn.delete {
    background: rgba(244, 67, 54, 0.14);
    color: #f44336;
}

.action-btn.delete:hover {
    background: #f44336;
    color: #fff;
}

.action-btn.save {
    background: rgba(33, 150, 243, 0.14);
    color: var(--main-color, #2196f3);
}

.action-btn.save:hover {
    background: var(--main-color, #2196f3);
    color: #fff;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--glass);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--dark-color, #222);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.page-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--accent-color, #007bff);
    color: #fff;
    border-color: var(--accent-color, #007bff);
}

/* ===== Tablet ===== */
@media (max-width: 991px) {
    .orders-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .table {
        min-width: 680px;
    }

    .table thead th,
    .table td {
        padding: 12px;
    }

    .table td img {
        width: 72px;
        height: 72px;
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .products-section {
        padding: 28px 0;
    }

    .orders-pagination {
        flex-direction: row;
        align-items: stretch;
    }

    .pager-info {
        /* width: 100%; */
        text-align: center;
    }

    .pagination {
        justify-content: center;
    }

    .table {
        min-width: 620px;
    }

    .table thead th,
    .table td {
        padding: 10px;
        font-size: 0.9rem;
    }

    .table td img {
        width: 64px;
        height: 64px;
        border-radius: 8px;
    }

    .badge {
        min-width: 78px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .action-buttons {
        gap: 8px;
    }

    .action-btn,
    .page-btn {
        min-width: 34px;
        height: 34px;
        border-radius: 8px;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 480px) {
    .table {
        min-width: 560px;
    }

    .table thead th,
    .table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .table td img {
        width: 56px;
        height: 56px;
    }

    .pager-info {
        font-size: 0.82rem;
        padding: 7px 10px;
    }
}