/* Marketplace Dashboard Styles */

.marketplace-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.marketplace-dashboard-header {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.marketplace-dashboard-header h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.marketplace-dashboard-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Statistics Grid */
.marketplace-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.marketplace-stat-box {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.marketplace-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.marketplace-stat-box .stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.marketplace-stat-box .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.marketplace-stat-box .stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Tabs */
.marketplace-dashboard-tabs {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.marketplace-tab-nav {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}

.marketplace-tab-nav a {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.marketplace-tab-nav a:hover {
    color: #333;
    background: #f5f5f5;
}

.marketplace-tab-nav a.active {
    color: #0073aa;
    background: #fff;
    border-bottom-color: #0073aa;
}

.marketplace-tab-content {
    padding: 30px;
}

.marketplace-tab-pane {
    display: none;
}

.marketplace-tab-pane.active {
    display: block;
}

/* Services Table */
.marketplace-services-table {
    width: 100%;
    border-collapse: collapse;
}

.marketplace-services-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.marketplace-services-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.marketplace-services-table tr:hover {
    background: #f8f9fa;
}

.service-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.service-title {
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

.service-title:hover {
    color: #0073aa;
}

.service-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

/* Orders Section */
.marketplace-orders-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.marketplace-order-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.marketplace-order-item:hover {
    background: #e9ecef;
}

.order-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.order-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

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

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

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

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

/* Messages Section */
.marketplace-messages-preview {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.message-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background 0.2s;
}

.message-item:hover {
    background: #f8f9fa;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item.unread {
    background: #f0f8ff;
    font-weight: 500;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-sender {
    font-weight: 500;
    color: #333;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.message-preview {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Charts Container */
.marketplace-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.marketplace-chart-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.marketplace-chart-box h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

/* Action Buttons */
.marketplace-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.marketplace-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.marketplace-btn-primary {
    background: #0073aa;
    color: #fff;
}

.marketplace-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.marketplace-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.marketplace-btn-secondary:hover {
    background: #e0e0e0;
}

/* Empty States */
.marketplace-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.marketplace-empty-state img {
    max-width: 200px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.marketplace-empty-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.marketplace-empty-state p {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .marketplace-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .marketplace-tab-nav {
        flex-direction: column;
    }
    
    .marketplace-order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .marketplace-charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.marketplace-loading {
    text-align: center;
    padding: 40px;
}

.marketplace-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Alerts */
.marketplace-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.marketplace-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.marketplace-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.marketplace-alert-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}