/* Mobile-First Order Management System */

/* Order ID Section with Copy Button - Mobile Admin */
.order-id-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-id-text {
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.copy-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    font-size: 0.75rem;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-btn i {
    font-size: 0.75rem;
}

/* Enhanced mobile title with copy button */
.mobile-item-title .order-id-section {
    gap: 0.75rem;
}

.mobile-item-title .copy-btn {
    min-width: 32px;
    height: 32px;
}

/* Desktop table copy button adjustments */
.desktop-table .order-id-section {
    gap: 0.5rem;
    align-items: center;
}

.desktop-table .copy-btn {
    min-width: 24px;
    height: 24px;
    padding: 0.25rem;
}

.desktop-table .copy-btn i {
    font-size: 0.625rem;
}

/* ===== MOBILE SECTION HEADER ===== */
.mobile-section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    margin: -1rem -1rem 1.5rem -1rem;
    border-radius: 0 0 20px 20px;
}

.mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mobile-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-title i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.mobile-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.mobile-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.mobile-breadcrumb {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 400;
}

/* ===== ORDER STATISTICS GRID ===== */
.order-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.stat-card.stat-primary {
    --accent-color: #3b82f6;
}

.stat-card.stat-success {
    --accent-color: #10b981;
}

.stat-card.stat-info {
    --accent-color: #06b6d4;
}

.stat-card.stat-warning {
    --accent-color: #f59e0b;
}

.stat-card.stat-purple {
    --accent-color: #8b5cf6;
}

.stat-card.stat-danger {
    --accent-color: #ef4444;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* ===== ENHANCED SEARCH AND FILTERS ===== */
.order-filters-section {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.search-container {
    margin-bottom: 1rem;
}

.search-box-enhanced {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-enhanced i {
    position: absolute;
    left: 1rem;
    color: #64748b;
    font-size: 1rem;
    z-index: 2;
}

.search-input-enhanced {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
    outline: none;
}

.search-input-enhanced:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: #f1f5f9;
    color: #374151;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-select-enhanced,
.filter-input-enhanced {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select-enhanced:focus,
.filter-input-enhanced:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-filter-clear {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-filter-clear:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* ===== ORDERS CONTAINER ===== */
.orders-container-wrapper {
    position: relative;
    min-height: 400px;
}

.orders-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.loading-spinner-enhanced {
    width: 48px;
    height: 48px;
    border: 4px solid #f1f5f9;
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spinEnhanced 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text-enhanced {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

@keyframes spinEnhanced {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ===== INDIVIDUAL ORDER CARDS ===== */
.order-card-enhanced {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.order-id-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-id {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-id i {
    color: #667eea;
    font-size: 0.875rem;
}

.order-date {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.order-status-section {
    text-align: right;
}

.status-badge-enhanced {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.status-badge-enhanced.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-badge-enhanced.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-enhanced.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge-enhanced.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-enhanced.status-cancelled {
    background: #f3f4f6;
    color: #374151;
}

.status-badge-enhanced i {
    font-size: 0.625rem;
}

.order-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.order-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-detail-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-detail-value i {
    color: #667eea;
    font-size: 0.75rem;
}

.order-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.order-action-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.order-action-btn.btn-view {
    background: #667eea;
    color: white;
}

.order-action-btn.btn-view:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.order-action-btn.btn-edit {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.order-action-btn.btn-edit:hover {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
}

.order-action-btn.btn-more {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.order-action-btn.btn-more:hover {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
}

/* ===== EMPTY AND ERROR STATES ===== */
.orders-empty-state,
.orders-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state-icon,
.error-state-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.error-state-icon {
    color: #ef4444;
}

.empty-state-title,
.error-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-state-description,
.error-state-description {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* ===== ENHANCED PAGINATION ===== */
.orders-pagination {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.pagination-info-enhanced {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-controls-enhanced {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-controls-enhanced .btn {
    min-width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
    .order-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .order-body {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .order-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (min-width: 768px) {
    .mobile-section-header {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        padding: 1.5rem;
    }
    
    .order-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filters-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1024px) {
    .order-stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}