/**
 * ================================================================
 *  components.css — 可复用组件样式（极简现代风格）
 * ================================================================
 */

/* ==== 1. 卡片组件 ==== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ==== 2. 徽章 ==== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: #e6f5e6;
    color: var(--primary);
}

/* ==== 3. 表单 ==== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* ==== 4. 页面标题区 ==== */
.page-header {
    background: var(--bg-light);
    padding: 48px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

.breadcrumb span {
    margin: 0 8px;
}

/* ==== 5. 分页器 ==== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination a {
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination span.active {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

/* ==== 6. 加载动画 ==== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==== 7. 空状态 ==== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    fill: var(--border);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
}

/* ==== 8. 响应式 ==== */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .pagination a,
    .pagination span {
        width: 36px;
        height: 36px;
    }
}
