/* MANAGER ORDERS DASHBOARD - FULL UPDATED STYLES */
.manager-orders-dashboard {
    background: #fff;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.dashboard-header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
}

.dashboard-header i {
    margin-right: 12px;
    font-size: 1.2em;
}

.stats-summary {
    display: flex;
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    border-radius: 6px;
    min-width: 100px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

/* FILTER SECTION */
.movw-filters-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 5px solid #4e73df;
}

.movw-filters-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4e73df;
    display: flex;
    align-items: center;
}

.movw-filters-card i {
    margin-right: 10px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #5a5c69;
    display: flex;
    align-items: center;
}

.filter-group i {
    margin-right: 8px;
    font-size: 0.9em;
}

.filter-select, .filter-input, .filter-date {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d3e2;
    border-radius: 6px;
    background: white;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-select:focus, .filter-input:focus, .filter-date:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.25);
    outline: none;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range span {
    color: #858796;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-self: flex-end;
}

.filter-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.apply-button {
    background: #4e73df;
    color: white;
}

.apply-button:hover {
    background: #3a56c0;
}

.reset-button {
    background: #e74a3b;
    color: white;
}

.reset-button:hover {
    background: #d52a1a;
}

/* ORDERS TABLE */
.manager-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
    table-layout: fixed;
}

.manager-orders-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e1e1e1;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.manager-orders-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

/* PRODUCT DETAILS - UPDATED FOR PROPER CONTAINMENT */
.product-details-cell {
    width: 30%;
    min-width: 250px;
    max-width: 350px;
}

.product-details-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 12px;
    width: 100%;
    box-sizing: border-box;
}

.product-detail-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    width: 100%;
}

.product-image {
    width: 50px;
    min-width: 50px;
    height: 50px;
    margin-right: 10px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    border: 1px solid #eee;
    object-fit: contain;
    display: block;
}

.product-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.product-name {
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    color: #2271b1;
    text-decoration: underline;
    width: 100%;
    display: block;
}

.product-meta {
    display: flex;
    font-size: 0.85em;
    color: #666;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.product-qty, .product-sku {
    white-space: nowrap;
}

.product-sku {
    font-family: monospace;
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

/* PRODUCT VERIFICATION */
.product-verification {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.verify-product, .reject-product {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.verify-product {
    background: #1cc88a;
    color: white;
}

.verify-product:hover {
    background: #17a673;
}

.reject-product {
    background: #e74a3b;
    color: white;
}

.reject-product:hover {
    background: #d52a1a;
}

.verified-badge, .rejected-badge {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

.verified-badge {
    color: #1cc88a;
}

.rejected-badge {
    color: #e74a3b;
}

/* STATUS BADGES */
.order-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-pending {
    background: #f6c23e;
    color: #000;
}

.status-processing {
    background: #1cc88a;
    color: white;
}

.status-verified {
    background: #36b9cc;
    color: white;
}

.status-rejected {
    background: #e74a3b;
    color: white;
}

/* ORDER ACTIONS */
.order-actions {
    white-space: nowrap;
}

.order-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.button.verify {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.button.reject {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.button.view {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.button.verify:hover {
    background: #3e8e41;
    border-color: #3e8e41;
}

.button.reject:hover {
    background: #da190b;
    border-color: #da190b;
}

.button.view:hover {
    background: #0b7dda;
    border-color: #0b7dda;
}

/* LOADING INDICATOR */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 20px;
    color: #5a5c69;
}

.orders-table-container.loading .loading-indicator {
    display: block;
}

.orders-table-container.loading .manager-orders-table {
    opacity: 0.6;
}

.spinner {
    border: 3px solid rgba(78, 115, 223, 0.1);
    border-radius: 50%;
    border-top: 3px solid #4e73df;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SCROLLBAR STYLING */
.product-details-container::-webkit-scrollbar {
    width: 6px;
}

.product-details-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.product-details-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.product-details-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 1200px) {
    .product-details-cell {
        min-width: 220px;
        max-width: 280px;
    }
    
    .filter-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 900px) {
    .manager-orders-table {
        display: block;
        overflow-x: auto;
    }
    
    .manager-orders-table th,
    .manager-orders-table td {
        min-width: 120px;
    }
    
    .product-details-cell {
        min-width: 200px;
    }
}

@media (max-width: 782px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stats-summary {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .product-details-cell {
        min-width: 180px;
        max-width: none;
    }
    
    .product-detail-row {
        flex-wrap: wrap;
    }
    
    .product-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .product-verification {
        width: 100%;
        justify-content: flex-start;
    }
    
    .order-actions {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .manager-orders-dashboard {
        padding: 15px;
    }
    
    .filter-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .manager-orders-table th,
    .manager-orders-table td {
        padding: 8px 10px;
    }
}