/* Orders Page Styles */

.orders-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: #f8f9fa;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.orders-header h1 {
    color: #333333;
    margin: 0;
    font-size: 2rem;
}

.orders-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    min-width: 120px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6b35;
}

.orders-filters {
    display: flex;
    gap: 25px;
    align-items: end;
    margin-bottom: 30px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.filter-group label {
    font-size: 0.95em;
    color: #6c757d;
    font-weight: 500;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    color: #333333;
    font-size: 0.9em;
    min-width: 160px;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.refresh-btn {
    padding: 10px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.refresh-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #ff6b35;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.order-id {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-number {
    font-weight: bold;
    font-size: 1.2em;
    color: #333333;
}

.external-id {
    font-size: 0.9em;
    color: #6c757d;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
}

.order-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #d4edda;
    color: #155724;
}

.status-inprogress {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-partial {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background: #f5f5f5;
    color: #6c757d;
}

.order-content {
    padding: 30px;
}

.order-service {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.service-info i {
    font-size: 1.8em;
    color: #ff6b35;
    width: 35px;
    text-align: center;
}

.service-info h4 {
    margin: 0 0 6px 0;
    color: #333333;
    font-size: 1.2em;
    font-weight: 600;
}

.service-type {
    margin: 0;
    font-size: 0.9em;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.service-link a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff6b35;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 107, 53, 0.1);
}

.service-link a:hover {
    color: #e55a2b;
    background: rgba(255, 107, 53, 0.2);
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: #333333;
    font-size: 1.05em;
}

.order-comments {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.order-comments h5 {
    margin: 0 0 10px 0;
    color: #333333;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.comment-item {
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.9em;
    color: #333333;
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.order-date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    font-size: 0.95em;
}

.order-date i {
    color: #ff6b35;
}

.order-actions {
    display: flex;
    gap: 12px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #6c757d;
}

.loading-indicator i {
    font-size: 1.2em;
}

/* Dark mode adjustments for orders */
@media (prefers-color-scheme: dark) {
    .status-pending {
        background: #664d00;
        color: #fff3cd;
    }
    
    .status-processing {
        background: #0d4614;
        color: #d4edda;
    }
    
    .status-inprogress {
        background: #002952;
        color: #cce5ff;
    }
    
    .status-completed {
        background: #062c33;
        color: #d1ecf1;
    }
    
    .status-partial {
        background: #491217;
        color: #f8d7da;
    }
    
    .status-cancelled {
        background: #343a40;
        color: #f8f9fa;
    }
}

/* Responsive Orders */
@media (max-width: 768px) {
    .orders-container {
        padding: 1rem;
    }
    
    .orders-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        padding: 20px;
    }
    
    .orders-stats {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 100px;
    }
    
    .orders-filters {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        min-width: auto;
        width: 100%;
    }
    
    .order-header {
        padding: 20px;
    }
    
    .order-service {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .order-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 20px;
    }
    
    .order-actions {
        justify-content: center;
    }
    
    .subscription-details {
        grid-template-columns: 1fr;
    }
    
    .order-content {
        padding: 20px;
    }
}
