/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Table Styles */
.current-orders-table,
.order-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.current-orders-table th,
.current-orders-table td,
.order-history-table th,
.order-history-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
}

.current-orders-table th,
.order-history-table th {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.current-orders-table tr:nth-child(even),
.order-history-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.current-orders-table tr:hover,
.order-history-table tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.3s ease;
}

.current-orders-table th:nth-child(6),
.current-orders-table td:nth-child(6) {
    width: 20%;
    max-width: 200px;
    white-space: normal;
}

/* Popup Styles */
#order-details-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

#order-details-content {
    margin-bottom: 20px;
}

#order-details-content h3 {
    margin-top: 0;
    color: #2575fc;
    font-size: 24px;
    font-weight: 700;
}

#order-details-content p {
    margin: 10px 0;
    font-size: 16px;
    color: #555;
}

#order-details-content table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#order-details-content table th,
#order-details-content table td {
    border: 1px solid #e0e0e0;
    padding: 10px;
    text-align: left;
}

#order-details-content table th {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
    font-weight: 600;
}

#order-details-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#order-details-content table tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.3s ease;
}

#order-details-content p strong {
    font-weight: 600;
    color: #333;
}

#order-details-content p {
    margin: 10px 0;
    font-size: 14px;
    color: #555;
}

#order-details-content p:nth-child(7) { /* Target the notes paragraph */
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    white-space: pre-line; /* Preserve line breaks in notes */
}

/* Button Styles */
#close-popup,
#update-status,
.orders-filter .button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#close-popup {
    background: #f44336;
    color: #fff;
}

#close-popup:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

#update-status {
    background: #4caf50;
    color: #fff;
    margin-right: 10px;
}

#update-status:hover {
    background: #388e3c;
    transform: translateY(-2px);
}

.orders-filter .button {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
    text-decoration: none;
}

.orders-filter .button:hover {
    background: linear-gradient(135deg, #2575fc, #6a11cb);
    transform: translateY(-2px);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #2575fc;
    font-weight: 600;
}

/* Order Status Badges */
.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
    font-size: 12px;
    transition: all 0.3s ease;
}

.order-status.processing {
    background: #ffcc00;
    color: #000;
}

.order-status.confirmed {
    background: #4caf50;
    color: #fff;
}

.order-status.pending-payment {
    background: #f44336;
    color: #fff;
}

.order-status.completed {
    background: #2196f3;
    color: #fff;
}

.order-status.cancelled {
    background: #9e9e9e;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .current-orders-table th,
    .current-orders-table td,
    .order-history-table th,
    .order-history-table td {
        padding: 10px;
        font-size: 14px;
    }

    #order-details-popup {
        width: 95%;
        padding: 15px;
    }

    #order-details-content h3 {
        font-size: 20px;
    }

    #order-details-content p {
        font-size: 14px;
    }
/* Filters and Bulk Actions */
.orders-filters {
    margin-bottom: 20px;
}

#orders-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#orders-filter-form input,
#orders-filter-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#orders-filter-form button {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#orders-filter-form button:hover {
    background: #005177;
}

#orders-filter-form button#reset-filters {
    background: #ccc;
    color: #000;
}

#orders-filter-form button#reset-filters:hover {
    background: #999;
}

.bulk-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#bulk-action-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#apply-bulk-actions {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#apply-bulk-actions:hover {
    background: #005177;
}

/* Modern Filters CSS */
.orders-filters {
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#orders-filter-form,
#history-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

#orders-filter-form input,
#orders-filter-form select,
#history-filter-form input,
#history-filter-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    flex: 1 1 200px;
    background: #fff;
    transition: border-color 0.3s ease;
}

#orders-filter-form input:focus,
#orders-filter-form select:focus,
#history-filter-form input:focus,
#history-filter-form select:focus {
    border-color: #0073aa;
    outline: none;
}

#orders-filter-form button,
#history-filter-form button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

#orders-filter-form button:hover,
#history-filter-form button:hover {
    background: #005177;
}

#orders-filter-form button#reset-filters,
#history-filter-form button#reset-filters {
    background: #e0e0e0;
    color: #333;
}

#orders-filter-form button#reset-filters:hover,
#history-filter-form button#reset-filters:hover {
    background: #ccc;
}

/* Old Filters for Current Orders */
.orders-filter .button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.orders-filter .button:hover {
    background: #005177;
}

}