/* ===============================
   Giao diện bảng đơn hàng - Desktop
================================== */

#orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

#orders-table th,
#orders-table td {
    padding: 15px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid #e1e1e1;
}

#orders-table th {
    background-color: var(--primary-color, #0073aa);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}

/* Hover row */
#orders-table tbody tr {
    transition: background-color 0.3s ease;
}

#orders-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badge trạng thái */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    line-height: 1.5;
}

.badge-completed {
    background-color: #28a745;
    color: #fff;
}

.badge-processing {
    background-color: #ffc107;
    color: #000;
}

.badge-cancelled {
    background-color: #dc3545;
    color: #fff;
}

.badge-pending {
    background-color: #17a2b8;
    color: #fff;
}

/* Nút xem */
#orders-table .button {
    padding: 8px 15px;
    margin: 0 5px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 5px;
    font-weight: 500;
    background-color: var(--primary-color, #0073aa);
    color: #fff;
    border: none;
    text-decoration: none;
    transition: background 0.3s ease;
}

#orders-table .button:hover {
    background-color: #005f91;
    opacity: 0.95;
}

/* ===============================
   Responsive: Mobile View
================================== */

@media (max-width: 768px) {
    #orders-table {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    #orders-table thead {
        display: none;
    }

    #orders-table tbody,
    #orders-table tr,
    #orders-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #orders-table tr {
        margin-bottom: 20px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 6px;
        padding: 10px 12px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    #orders-table td {
        padding: 10px 15px;
        position: relative;
        border: none;
        padding-left: 130px;
        min-height: 40px;
    }

    #orders-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 10px;
        font-weight: bold;
        color: #555;
        width: 110px;
        white-space: nowrap;
    }

    #orders-table .button {
        width: 100%;
        margin-top: 12px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    #orders-table {
        display: block;
        width: 100%;
    }

    #orders-table thead {
        display: none !important;
    }

    #orders-table tbody,
    #orders-table tr,
    #orders-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #orders-table tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        padding: 10px;
        border: 1px solid #eee;
    }

    #orders-table td {
        padding: 10px 15px;
        position: relative;
        border: none;
        padding-left: 130px;
        min-height: 40px;
    }

    #orders-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 10px;
        font-weight: 600;
        color: #555;
        width: 110px;
        white-space: nowrap;
    }

    #orders-table .button {
        margin-top: 10px;
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px 0;
        font-size: 14px;
        border-radius: 6px;
        background: linear-gradient(90deg, #14C6FF, #1E90FF);
    }
}

