/* Components Page - Modern & Appealing */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: white;
}

.page-header p {
    font-size: 1.1rem;
    color: white;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.page-header .btn {
    background: white;
    color: #3b82f6;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Orders Stats */
.orders-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-card.total::before { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.stat-card.pending::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.shipping::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.stat-card.delivered::before { background: linear-gradient(90deg, #10b981, #059669); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-card.total .stat-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-card.pending .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.shipping .stat-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-card.delivered .stat-icon { background: linear-gradient(135deg, #10b981, #059669); }

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

/* Order Filters */
.order-filters {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 600;
}

.filter-tab.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: transparent;
}

.filter-tab:hover:not(.active) {
    border-color: #3b82f6;
    background: #f0f7ff;
}

.filter-actions select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    outline: none;
}

/* Orders Grid */
.orders-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.order-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border-color: #e5e7eb;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.order-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.order-date {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.processing {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.shipped {
    background: #ede9fe;
    color: #7c3aed;
}

.status-badge.delivered {
    background: #d1fae5;
    color: #059669;
}

/* Order Items */
.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.order-item:last-child {
    margin-bottom: 0;
}

.item-image {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.item-details p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.item-quantity {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.item-price {
    font-size: 1rem;
    font-weight: 700;
    color: #3b82f6;
}

/* Order Summary */
.order-summary {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.summary-row.total {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Shipping/Processing Info */
.shipping-info,
.processing-info,
.delivery-info {
    background: #f0f7ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #3b82f6;
}

.shipping-info h4,
.processing-info h4,
.delivery-info h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.tracking-info > div {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.tracking-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tracking-number code {
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

.copy-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    padding: 0.25rem;
}

/* Progress Timeline */
.progress-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.timeline-step.completed .step-icon {
    background: #10b981;
}

.timeline-step.active .step-icon {
    background: #3b82f6;
    animation: pulse 2s ease-in-out infinite;
}

.timeline-step:not(.completed):not(.active) .step-icon {
    background: #d1d5db;
    color: #9ca3af;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.step-info h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.step-info p {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.order-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.02);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Quick Actions & Popular Components */
.quick-actions-section,
.popular-components {
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: #3b82f6;
}

.action-grid,
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-item,
.component-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.action-item:hover,
.component-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.action-item i,
.component-image i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.component-image {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.component-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.component-item p {
    font-size: 1rem;
    font-weight: 700;
    color: #3b82f6;
}

.component-item .btn {
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .orders-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .order-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .order-actions {
        justify-content: center;
    }
    
    .action-grid,
    .components-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .orders-stats {
        grid-template-columns: 1fr;
    }
    
    .action-grid,
    .components-grid {
        grid-template-columns: 1fr;
    }
    
    .order-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}