/**
 * 组件样式
 * 特定组件的增强样式
 */

/* ==================== 加载状态 ==================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ==================== 标签页样式 ==================== */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-fast);
    background-color: rgb(128, 173, 20);
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);

}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color:burlywood;
    font-weight: 600;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* ==================== 搜索框样式 ==================== */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* ==================== 统计卡片 ==================== */
.stat-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--gray-50) 100%);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, transparent 100%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    border-left-width: 6px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.stat-card h3 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 时间线样式 ==================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-primary);
}

/* ==================== 标签输入 ==================== */
.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    min-height: 50px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
}

.tag .remove {
    cursor: pointer;
    font-weight: bold;
}

/* ==================== 文件上传区域 ==================== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* ==================== 步骤指示器 ==================== */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step:last-child::after {
    display: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--gray-300);
    color: var(--text-secondary);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.step.completed .step-number {
    background-color: var(--success-color);
    color: var(--text-white);
}

/* ==================== 通知徽章 ==================== */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: var(--text-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==================== 卡片网格 ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-menu a:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== 数据表格增强 ==================== */
.table-responsive {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.table-hover tbody tr {
    cursor: pointer;
}

/* ==================== 操作按钮组 ==================== */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==================== 状态指示器 ==================== */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--success-color);
}

.status-indicator.pending {
    background-color: var(--warning-color);
}

.status-indicator.inactive {
    background-color: var(--gray-400);
}

/* ==================== 响应式工具类 ==================== */
@media (max-width: 576px) {
    .btn-group-vertical {
        width: 100%;
    }
    
    .btn-group-vertical .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

