/**
 * 店铺管理专业版样式 - 深度优化版
 * 创建时间：2026-01-07
 * 特性：现代化、专业化、数据可视化
 */

/* ==================== 统计卡片专业样式 ==================== */
.stats-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 120px;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stats-card:hover::before {
    transform: scaleX(1);
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.stats-card:active {
    transform: translateY(-4px) scale(1.01);
}

/* 统计卡片图标样式 */
.stats-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.stats-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: inherit;
    opacity: 0.2;
    filter: blur(8px);
    z-index: -1;
}

/* 统计卡片内容 */
.stats-content {
    flex: 1;
    min-width: 0;
}

.stats-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

/* 不同颜色的统计卡片 */
.stats-card-blue .stats-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stats-card-blue::before {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.stats-card-pink .stats-icon {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.stats-card-pink::before {
    background: linear-gradient(90deg, #ec4899 0%, #db2777 100%);
}

.stats-card-green .stats-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stats-card-green::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.stats-card-purple .stats-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stats-card-purple::before {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

/* ==================== 店铺管理页面头部优化 ==================== */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.badge-soft-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
    color: #ffffff !important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid #0d47a1 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

/* ==================== 筛选卡片优化 ==================== */
.card-modern {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card-modern:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-modern .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}

.card-modern .card-header h6 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.card-modern .card-body {
    padding: 1.5rem;
}

/* ==================== 平台筛选按钮组优化 ==================== */

/* 平台筛选按钮组容器 */
.platform-filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 平台筛选按钮基础样式 */
.platform-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.platform-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.platform-filter-btn:hover::before {
    left: 100%;
}

.platform-filter-btn i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.platform-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.platform-filter-btn:hover i {
    transform: scale(1.1);
}

/* 全部店铺 - 默认紫色主题 */
.platform-filter-btn[data-platform="all"] {
    border-color: #667eea;
    color: #667eea;
}

.platform-filter-btn[data-platform="all"]:hover,
.platform-filter-btn[data-platform="all"].active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Shopee - 橙红色品牌色 */
.platform-filter-btn.platform-shopee {
    border-color: #EE4D2D;
    color: #EE4D2D;
}

.platform-filter-btn.platform-shopee:hover,
.platform-filter-btn.platform-shopee.active {
    background: linear-gradient(135deg, #EE4D2D 0%, #FF6B45 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.4);
}

/* Lazada - 蓝紫色品牌色 */
.platform-filter-btn.platform-lazada {
    border-color: #0F146D;
    color: #0F146D;
}

.platform-filter-btn.platform-lazada:hover,
.platform-filter-btn.platform-lazada.active {
    background: linear-gradient(135deg, #0F146D 0%, #F85606 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(15, 20, 109, 0.4);
}

/* TikTok - 黑色品牌色 + 彩虹效果 */
.platform-filter-btn.platform-tiktok {
    border-color: #000000;
    color: #000000;
}

.platform-filter-btn.platform-tiktok:hover,
.platform-filter-btn.platform-tiktok.active {
    background: linear-gradient(135deg, #000000 0%, #25F4EE 50%, #FE2C55 100%);
    background-size: 200% 200%;
    animation: tiktokGradient 3s ease infinite;
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

@keyframes tiktokGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 激活状态通用样式 */
.platform-filter-btn.active {
    transform: translateY(-1px);
}

.platform-filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .platform-filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .platform-filter-btn span {
        display: none;
    }
    
    .platform-filter-btn i {
        margin: 0;
    }
}

.btn-group .btn {
    position: relative;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-width: 2px;
    transition: all 0.3s ease;
}

.btn-group .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-group .btn:hover::before {
    left: 100%;
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-danger {
    border-color: #EE4D2D;
    color: #EE4D2D;
}

.btn-outline-danger.active {
    background: linear-gradient(135deg, #EE4D2D 0%, #ff6b45 100%);
    border-color: #EE4D2D;
    color: white;
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.4);
}

.btn-outline-dark {
    border-color: #000000;
    color: #000000;
}

.btn-outline-dark.active {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border-color: #000000;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ==================== 表单控件优化 ==================== */
.form-control, .form-select {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label.small {
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label.small i {
    color: #667eea;
    font-size: 0.875rem;
}

/* ==================== 按钮样式增强 ==================== */
.btn {
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-purple:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    background: white;
    border: 2px solid #e5e7eb;
    color: #6b7280;
}

.btn-outline-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* ==================== 店铺表格优化 ==================== */
.table {
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table thead th {
    color: white;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transform: scale(1.005);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: #374151;
}

/* ==================== 平台徽章样式 ==================== */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.platform-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.platform-badge-shopee {
    background: linear-gradient(135deg, #EE4D2D 0%, #ff6b45 100%);
    color: white;
}

.platform-badge-lazada {
    background: linear-gradient(135deg, #0F156D 0%, #1a2399 100%);
    color: white;
}

.platform-badge-tiktok {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
}

/* ==================== 状态徽章样式 ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8125rem;
}

.status-badge-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.status-badge-paused {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.status-badge-ended {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.25);
}

/* ==================== 操作按钮优化 ==================== */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.action-btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.action-btn-view:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.action-btn-edit {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.action-btn-edit:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.action-btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.action-btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ==================== 任务数量徽章 ==================== */
.task-count-badge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 60px;
    justify-content: center;
}

/* ==================== 分页样式优化 ==================== */
.pagination {
    margin: 0;
}

.page-link {
    border: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-item.disabled .page-link {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #d1d5db;
    cursor: not-allowed;
}

/* ==================== 空状态样式 ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 1rem;
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 768px) {
    .stats-card {
        padding: 1.25rem 1rem;
        min-height: 100px;
    }
    
    .stats-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .stats-value {
        font-size: 2rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: 10px !important;
        margin-bottom: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 统计卡片动画增强 ==================== */
.stats-card {
    animation: cardFadeIn 0.5s ease-out;
}

.stats-card:nth-child(1) { animation-delay: 0s; }
.stats-card:nth-child(2) { animation-delay: 0.1s; }
.stats-card:nth-child(3) { animation-delay: 0.2s; }
.stats-card:nth-child(4) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 统计卡片选中/激活状态 */
.stats-card.active {
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), 
                      linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* 统计卡片数值动画 */
.stats-value {
    transition: all 0.3s ease;
}

.stats-card:hover .stats-value {
    transform: scale(1.05);
    color: #667eea;
}

/* 统计标签样式增强 */
.stats-label {
    position: relative;
    padding-left: 0;
}

/* 平台特定颜色样式 */
.stats-card-pink .stats-label {
    color: #db2777;
}

.stats-card-green .stats-label {
    color: #059669;
}

.stats-card-purple .stats-label {
    color: #7c3aed;
}

.stats-card-blue .stats-label {
    color: #2563eb;
}

/* ==================== 筛选区域增强 ==================== */
.card-header .btn-group .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px !important;
    margin: 0 2px;
}

.card-header .btn-group .btn i {
    margin-right: 0.375rem;
}

/* 筛选按钮徽章样式 */
.filter-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ==================== 打印样式 ==================== */
@media print {
    .stats-card:hover,
    .btn:hover,
    .action-btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn-group,
    .action-buttons {
        display: none;
    }
}
