/* 童模酷 - 简约扁平风格 */

/* ========== 导航 ========== */
.nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    position: relative;
    transition: color 0.15s;
    text-decoration: none;
}
.nav-link:hover { color: #111827; }
.nav-link.active { color: #111827; font-weight: 600; }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0.75rem; right: 0.75rem;
    height: 2px;
    background: #111827;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}
.btn-primary { background: #111827; color: #fff; }
.btn-primary:hover { background: #1f2937; }
.btn-secondary { background: #e5e7eb; color: #374151; border: 1px solid #e5e7eb; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #d1fae5; color: #059669; }
.btn-success:hover { background: #a7f3d0; }
.btn-ghost { background: transparent; color: #6b7280; }
.btn-ghost:hover { background: #e5e7eb; color: #111827; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Legacy */
.btn-gradient, .btn-gradient-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: #111827;
    color: #fff;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-gradient:hover, .btn-gradient-sm:hover { background: #1f2937; }
.btn-gradient-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }

/* ========== 表单 ========== */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s;
    outline: none;
    background: #fff;
    color: #111827;
    line-height: 1.5;
}
.form-input::placeholder { color: #9ca3af; }
.form-input:focus { border-color: #111827; }
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #fff;
    transition: border-color 0.15s;
    outline: none;
    appearance: auto;
    line-height: 1.5;
}
.form-select:focus { border-color: #111827; }
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    resize: vertical;
    transition: border-color 0.15s;
    outline: none;
    background: #fff;
    color: #111827;
    line-height: 1.5;
    min-height: 80px;
}
.form-textarea::placeholder { color: #9ca3af; }
.form-textarea:focus { border-color: #111827; }
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* ========== 卡片 ========== */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body { padding: 1.25rem; }
.stat-card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
}
.model-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s;
}
.model-card:hover { border-color: #d1d5db; }
.card-hover { transition: all 0.2s; }
.card-hover:hover { border-color: #d1d5db; }

/* ========== 表格 ========== */
.table-row {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.1s;
}
.table-row:hover { background: #fafafa; }
.table-responsive { overflow-x: auto; }
@media (max-width: 639px) {
    .table-responsive { margin-left: -1rem; margin-right: -1rem; }
}
.table-responsive table { min-width: 640px; width: 100%; }

/* ========== 标签/徽章 ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-info { background: #eff6ff; color: #2563eb; }
.badge-gray { background: #e5e7eb; color: #6b7280; }

/* ========== 分页 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}
.pagination a, .pagination span {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}
.pagination a { color: #6b7280; border: 1px solid transparent; }
.pagination a:hover { background: #e5e7eb; color: #111827; }
.pagination span.current { background: #111827; color: #fff; }

/* ========== 筛选标签 ========== */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.5rem;
}
.filter-tab {
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.15s;
    text-decoration: none;
}
.filter-tab:hover { border-color: #d1d5db; color: #111827; }
.filter-tab.active { background: #111827; color: #fff; border-color: #111827; }

/* ========== 上传 ========== */
.upload-zone {
    border: 2px dashed #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.15s;
    cursor: pointer;
    background: #fafafa;
}
.upload-zone:hover { border-color: #d1d5db; background: #f9fafb; }

/* ========== 空状态 ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

/* ========== 图片网格 ========== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-grid .photo-item {
    aspect-ratio: 1;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #e5e7eb;
    position: relative;
    cursor: pointer;
}
.photo-grid .photo-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.photo-grid .photo-item:hover img { transform: scale(1.03); }
.photo-grid .photo-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-grid .photo-item:hover .overlay { opacity: 1; }

/* ========== 信息列表 ========== */
.info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
}
@media (max-width: 639px) { .info-list { grid-template-columns: 1fr; } }
.info-label { font-size: 0.75rem; color: #9ca3af; }
.info-value { font-size: 0.875rem; color: #111827; font-weight: 500; }

/* ========== 时间线 ========== */
.timeline { display: flex; flex-direction: column; gap: 0.75rem; }
.timeline-item { display: flex; gap: 0.625rem; align-items: flex-start; }
.timeline-dot {
    width: 0.5rem; height: 0.5rem;
    border-radius: 50%;
    margin-top: 0.375rem;
    flex-shrink: 0;
}
.timeline-dot.done { background: #111827; }
.timeline-dot.pending { background: #d1d5db; }
.timeline-dot.error { background: #ef4444; }

/* ========== 统计 ========== */
.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}
.stat-label {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* ========== 提示条 ========== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    line-height: 1.5;
}
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease-out; }

/* ========== 移动端底部导航 ========== */
.mobile-bottom-nav { display: none; }
@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        z-index: 50;
        align-items: center;
        justify-content: space-around;
        padding: 0.375rem 0.5rem;
        padding-bottom: calc(0.375rem + env(safe-area-inset-bottom, 0px));
    }
}
.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.25rem 0.5rem;
    color: #9ca3af;
    font-size: 10px;
    transition: color 0.15s;
    text-decoration: none;
}
.mobile-bottom-nav a.active { color: #111827; }
.mobile-bottom-nav a svg { width: 1.125rem; height: 1.125rem; }

.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }
