/**
 * 列表页面卡片式优化 - 拟态风格
 * 将单调的表格改为美观的卡片式布局
 */

/* ========== 列表容器：卡片网格布局 ========== */
.list-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 1.25rem;
}

@media (max-width: 768px) {
    .list-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
}

/* ========== 列表卡片项 ========== */
.list-card-item {
    background: #e0e5ec;
    border-radius: 16px;
    box-shadow: 6px 6px 12px #c8d0e7, -6px -6px 12px #ffffff;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.list-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #5a67d8 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.list-card-item:hover {
    box-shadow: 8px 8px 16px #c0c0c0, -8px -8px 16px #ffffff;
    transform: translateY(-2px);
}

.list-card-item:hover::before {
    opacity: 1;
}

.list-card-item.active {
    box-shadow: inset 3px 3px 6px #c8d0e7, inset -3px -3px 6px #ffffff;
    background: #e8ecf1;
}

.list-card-item.active::before {
    opacity: 1;
}

/* ========== 卡片头部：标题和状态 ========== */
.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.list-card-title {
    flex: 1;
    min-width: 0;
}

.list-card-title-main {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-card-title-main a {
    color: #5a67d8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.list-card-title-main a:hover {
    color: #4c51bf;
    text-decoration: underline;
}

.list-card-title-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: #e0e5ec;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 2px 2px 4px #c8d0e7, inset -2px -2px 4px #ffffff;
    color: #5a67d8;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.list-card-status {
    flex-shrink: 0;
    margin-left: 0.75rem;
}

/* ========== 卡片内容：信息列表 ========== */
.list-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-card-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.list-card-info-label {
    color: #718096;
    font-weight: 500;
    min-width: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.list-card-info-label i {
    font-size: 0.85rem;
    color: #a0aec0;
    width: 1rem;
    text-align: center;
}

.list-card-info-value {
    color: #2d3748;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.list-card-info-value.highlight {
    color: #5a67d8;
    font-weight: 600;
}

.list-card-info-value.muted {
    color: #a0aec0;
}

/* ========== 卡片底部：操作按钮 ========== */
.list-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.list-card-footer .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* ========== 特殊样式：带图标的卡片 ========== */
.list-card-item.has-icon .list-card-header {
    align-items: center;
}

.list-card-item.has-icon .list-card-title {
    padding-left: 0.75rem;
}

/* ========== 空状态 ========== */
.list-cards-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #a0aec0;
}

.list-cards-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.list-cards-empty-text {
    font-size: 1rem;
    color: #718096;
}

/* ========== 统计信息栏 ========== */
.list-cards-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #e0e5ec;
    border-radius: 12px;
    box-shadow: inset 2px 2px 4px #c8d0e7, inset -2px -2px 4px #ffffff;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #718096;
}

/* ========== 分页栏 ========== */
.list-cards-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

/* ========== 表格模式兼容（保留原有表格样式作为备选）========== */
.list-table-mode .table {
    background: transparent;
}

.list-table-mode .table tbody tr {
    background: #e0e5ec;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    box-shadow: 3px 3px 6px #c8d0e7, -3px -3px 6px #ffffff;
    transition: all 0.2s ease;
}

.list-table-mode .table tbody tr:hover {
    box-shadow: 5px 5px 10px #c8d0e7, -5px -5px 10px #ffffff;
    transform: translateY(-1px);
}

.list-table-mode .table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.list-table-mode .table thead th {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #4a5568;
}

/* ========== 响应式优化 ========== */
@media (max-width: 576px) {
    .list-card-item {
        padding: 1rem;
    }
    
    .list-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .list-card-status {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .list-card-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .list-card-info-label {
        min-width: auto;
    }
}
