/* ============================================
   骨架屏加载动画
   ============================================ */

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

.skeleton {
    background: linear-gradient(
        90deg,
        var(--border-color) 25%,
        var(--bg-secondary) 50%,
        var(--border-color) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* 骨架屏容器 */
.skeleton-wrapper {
    width: 100%;
}

/* 统计卡片骨架 */
.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.skeleton-stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.skeleton-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skeleton-stat-title {
    height: 14px;
    width: 80px;
}

.skeleton-stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.skeleton-stat-value {
    height: 32px;
    width: 60px;
    margin-bottom: 8px;
}

.skeleton-stat-desc {
    height: 12px;
    width: 140px;
}

/* 卡片骨架 */
.skeleton-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.skeleton-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-title {
    height: 20px;
    width: 40%;
    margin-bottom: 8px;
}

.skeleton-subtitle {
    height: 14px;
    width: 60%;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 10px;
    border-radius: 3px;
}

.skeleton-line:last-child {
    width: 60%;
}

.skeleton-line-short {
    width: 40%;
}

/* 表格骨架 */
.skeleton-table {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.skeleton-table-header {
    display: flex;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

.skeleton-table-cell {
    height: 14px;
    border-radius: 3px;
}

.skeleton-table-cell:nth-child(1) {
    flex: 2;
}
.skeleton-table-cell:nth-child(2) {
    flex: 1;
}
.skeleton-table-cell:nth-child(3) {
    flex: 1;
}
.skeleton-table-cell:nth-child(4) {
    width: 80px;
}

.skeleton-table-row {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

.skeleton-table-row:last-child {
    border-bottom: none;
}

/* 表单骨架 */
.skeleton-form {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.skeleton-form-group {
    margin-bottom: 20px;
}

.skeleton-label {
    height: 14px;
    width: 80px;
    margin-bottom: 8px;
}

.skeleton-input {
    height: 44px;
    width: 100%;
    border-radius: 6px;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: 6px;
}

/* 列表骨架 */
.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-list-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-list-content {
    flex: 1;
}

/* 脉冲动画变体 */
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-pulse {
    animation: pulse 2s ease-in-out infinite;
}
