/**
 * 服务管理样式
 */

/* 服务管理容器 */
.service-management-container {
    padding: 20px;
}

/* 搜索筛选区域 */
.service-search-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

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

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.search-group {
    flex: 1;
    min-width: 200px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 服务统计 */
.service-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e8f4f8;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #2c5282;
}

/* 服务网格布局 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 服务卡片 */
.service-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

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

.service-card.inactive {
    opacity: 0.6;
    background-color: #f5f5f5;
}

/* 服务头部 */
.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.service-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
    flex: 1;
    margin-right: 10px;
}

/* 类别标签 */
.service-category {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.category-cupping {
    background-color: #fee2e2;
    color: #dc2626;
}

.category-massage {
    background-color: #dbeafe;
    color: #2563eb;
}

.category-moxibustion {
    background-color: #fef3c7;
    color: #d97706;
}

.category-scraping {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.category-spine {
    background-color: #d1fae5;
    color: #059669;
}

.category-conditioning {
    background-color: #f3e8ff;
    color: #9333ea;
}

.category-default {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* 服务信息 */
.service-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-label {
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.price {
    color: #dc2626;
    font-weight: bold;
}

.group-price {
    color: #059669;
}

/* 服务状态 */
.service-status {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

.status-inactive {
    background-color: #fee2e2;
    color: #dc2626;
}

.reservation-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background-color: #fef3c7;
    color: #d97706;
}

/* 服务操作 */
.service-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* 按钮样式 */
.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-icon {
    margin-right: 5px;
}

/* 加载和空状态 */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* 模态框表单样式 */
#serviceModal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

#serviceModal .form-group {
    margin-bottom: 0;
}

#serviceModal .form-group:only-child {
    grid-column: 1 / -1;
}

.required::after {
    content: ' *';
    color: #dc2626;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    #serviceModal .form-row {
        grid-template-columns: 1fr;
    }
    
    .service-stats {
        flex-direction: column;
        gap: 10px;
    }
}