/* 匠心互动平台 - 主样式 */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --radius: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
img { max-width: 100%; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
    text-align: center;
}
.btn:hover { opacity: .9; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* 头部 */
.site-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--text); }
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--primary); color: #fff; font-size: 18px;
}
.main-nav { display: flex; gap: 22px; flex: 1; align-items: center; }
.main-nav > a { color: var(--text); font-weight: 500; padding: 8px 0; }
.main-nav > a:hover { color: var(--primary); }
.nav-dropdown, .user-menu { position: relative; cursor: pointer; padding: 8px 0; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 6px;
    z-index: 50;
}
.dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    border-radius: 4px;
    white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }
.nav-dropdown:hover .dropdown-menu, .user-menu:hover .dropdown-menu { display: block; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-icon { color: var(--text); font-size: 13px; }
.user-name { color: var(--text); font-weight: 500; }

/* 主体 */
.site-main { min-height: calc(100vh - 64px - 240px); padding: 24px 0; }

/* 提示 */
.alert {
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-success { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.alert-info { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }

/* 卡片网格 */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .main-nav { order: 3; width: 100%; justify-content: space-around; gap: 8px; }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    border: 1px solid var(--border);
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.card-meta { color: var(--text-light); font-size: 12px; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
}
.tag-success { background: #d1fae5; color: #065f46; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-danger { background: #fee2e2; color: #991b1b; }
.tag-muted { background: #f3f4f6; color: #6b7280; }

/* 首页 hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    border-radius: 14px;
    padding: 56px 32px;
    text-align: center;
    margin-bottom: 28px;
}
.hero h1 { font-size: 32px; margin-bottom: 12px; }
.hero p { font-size: 16px; opacity: .92; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }
.hero .btn-ghost { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.25); color: #fff; }

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 24px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title .more { font-size: 14px; font-weight: 400; }

/* 板块卡片 */
.cat-card { text-align: center; }
.cat-card .cat-icon { font-size: 28px; margin-bottom: 8px; }
.cat-card h3 { font-size: 15px; margin-bottom: 4px; }
.cat-card p { font-size: 12px; color: var(--text-light); min-height: 32px; }

/* 表单 */
.form-card { max-width: 560px; margin: 0 auto; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-control, input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=datetime], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
textarea { min-height: 100px; resize: vertical; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.field-errors { color: var(--danger); font-size: 12px; margin-top: 4px; list-style: none; }

/* 项目列表 */
.project-item { display: flex; flex-direction: column; gap: 6px; }
.project-item .pi-budget { color: var(--accent); font-weight: 600; font-size: 15px; }
.project-item .pi-title { font-size: 16px; font-weight: 600; }
.project-item .pi-desc { color: var(--text-light); font-size: 13px; min-height: 40px; }
.project-item .pi-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-light); }

/* 带封面图的项目卡片 */
.project-card { padding: 0; overflow: hidden; }
.project-card .pi-cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f4f6; }
.project-card .pi-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.project-card .pi-cover img:hover { transform: scale(1.04); }
.project-card .pi-cover-empty {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--text-light); font-size: 13px; background: linear-gradient(135deg,#f3f4f6,#e5e7eb);
}
.project-card .pi-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.pi-contact {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--text); gap: 8px; flex-wrap: wrap;
    padding: 6px 0; border-top: 1px dashed var(--border); margin-top: 2px;
}
.pi-contact .masked { color: var(--primary); font-weight: 500; }

/* 详情页封面 */
.detail-cover { margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; max-height: 360px; }
.detail-cover img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; display: block; }

/* 联系信息盒 */
.contact-box .contact-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.contact-box .contact-row:last-of-type { border-bottom: none; }
.contact-box .contact-label { color: var(--text-light); }
.contact-box .masked { color: var(--primary); font-weight: 600; }

/* 详情页 */
.detail-header { margin-bottom: 16px; }
.detail-header h1 { font-size: 24px; margin-bottom: 8px; }
.detail-meta { display: flex; gap: 16px; color: var(--text-light); font-size: 13px; flex-wrap: wrap; }
.detail-body { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; } }
.detail-section { margin-bottom: 22px; }
.detail-section h3 { font-size: 16px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sidebar-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.sidebar-box h4 { font-size: 14px; margin-bottom: 10px; }

/* 状态跟踪 */
.progress-bar { background: #f3f4f6; border-radius: 20px; height: 8px; overflow: hidden; margin: 10px 0; }
.progress-bar .progress { background: var(--primary); height: 100%; border-radius: 20px; transition: width .3s; }
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline-item .ti-time { font-size: 12px; color: var(--text-light); }
.timeline-item .ti-content { font-size: 14px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.table th { background: #f3f4f6; font-weight: 600; }
.table tr:hover td { background: #fafbfc; }

/* 分页 */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
}
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { color: var(--text-light); opacity: .5; }

/* 价格表 */
.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 768px) { .price-cards { grid-template-columns: 1fr; } }
.price-card { text-align: center; padding: 26px 18px; }
.price-card.featured { border: 2px solid var(--primary); }
.price-card .price-name { font-size: 18px; font-weight: 600; }
.price-card .price-amount { font-size: 30px; color: var(--primary); font-weight: 700; margin: 10px 0; }
.price-card .price-amount small { font-size: 14px; color: var(--text-light); font-weight: 400; }
.price-card ul { list-style: none; margin: 16px 0; text-align: left; }
.price-card ul li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.price-card ul li:last-child { border: none; }

/* 页脚 */
.site-footer { background: #1f2937; color: #d1d5db; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding: 36px 16px; }
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.footer-col a, .footer-col p { display: block; color: #d1d5db; padding: 4px 0; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #374151; padding: 16px; text-align: center; font-size: 12px; color: #9ca3af; }
.footer-bottom .container { display: flex; justify-content: center; gap: 16px; }

/* 通用辅助 */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.empty { text-align: center; padding: 48px 16px; color: var(--text-light); }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 18px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
