/* ============ 合肥商办数字化履约平台 - 公共样式 V2 ============ */
/* 包含：移动端适配、小程序风格组件、底部TabBar、卡片、轮播等 */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --primary: #1890ff;
    --primary-light: #e6f7ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --purple: #722ed1;
    --text-main: #262626;
    --text-secondary: #595959;
    --text-light: #8c8c8c;
    --bg-page: #f5f6fa;
    --bg-card: #fff;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 6px 24px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-lg: 14px;
    --tabbar-h: 60px;
    --header-h: 58px;
}

body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg-page); color: var(--text-main); font-size: 15px; line-height: 1.65; }

/* ===== 滚动容器 ===== */
.page-container { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg-page); position: relative; padding-bottom: calc(var(--tabbar-h) + 10px); }
.web-container { max-width: 1400px; margin: 0 auto; min-height: 100vh; }

/* ===== 小程序顶部栏 ===== */
.mini-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: linear-gradient(135deg, var(--primary), #096dd9); padding: 10px 14px; display: flex; align-items: center; gap: 10px; color: #fff; }
.mini-header .city { font-size: 14px; display: flex; align-items: center; gap: 2px; white-space: nowrap; cursor: pointer; }
.mini-header .search-box { flex: 1; background: rgba(255,255,255,0.92); border-radius: 22px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; }
.mini-header .search-box input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: #333; }
.mini-header .search-box .search-btn { background: var(--primary); color: #fff; border: none; border-radius: 18px; padding: 4px 14px; font-size: 13px; cursor: pointer; }

/* ===== 轮播图Banner ===== */
.banner-carousel { position: relative; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; border-radius: 0 0 14px 14px; }
.banner-track { display: flex; transition: transform 0.4s ease; }
.banner-slide { min-width: 100%; height: 128px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 24px; color: #fff; }
.banner-slide h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.banner-slide p { font-size: 13px; opacity: 0.9; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.banner-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.banner-dots .dot.active { background: #fff; width: 22px; border-radius: 4px; }

/* ===== 快捷入口按钮 ===== */
.quick-entries { display: flex; justify-content: space-around; padding: 12px 10px; background: #fff; margin: 10px; border-radius: var(--radius); box-shadow: var(--shadow); }
.quick-entry { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.quick-entry .icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.quick-entry .icon.find { background: linear-gradient(135deg, #1890ff, #096dd9); }
.quick-entry .icon.publish { background: linear-gradient(135deg, #52c41a, #389e0d); }
.quick-entry .icon.entrust { background: linear-gradient(135deg, #722ed1, #531dab); }
.quick-entry .icon.news { background: linear-gradient(135deg, #fa8c16, #d4650f); }
.quick-entry .icon.jobs { background: linear-gradient(135deg, #eb2f96, #c41d7f); }
.quick-entry .icon.sv { background: linear-gradient(135deg, #13c2c2, #08979c); }
.quick-entry .label { font-size: 12px; color: var(--text-secondary); }
.quick-entry .sv-mini { font-size: 11px; color: #13c2c2; background: #e6fffb; border-radius: 8px; padding: 2px 8px; margin-top: -2px; white-space: nowrap; }

/* ===== V2.33 首页统一布局与风格（平台后台「界面配置-首页布局管理」驱动） ===== */
/* 尺寸统一：--sec-gap 控制版块间距/卡片间距，三档密度可选 */
.home-page { --sec-gap: 12px; --home-accent: #1890ff; --home-accent-deep: #096dd9; --home-accent-light: #e6f7ff; }
.home-page.density-compact { --sec-gap: 8px; }
.home-page.density-spacious { --sec-gap: 16px; }
/* 色彩统一：四套主题色（蓝经典/青活力/橙暖阳/紫雅致），作用于顶栏、标题强调、Tab激活、按钮 */
.home-page.accent-teal   { --home-accent: #13c2c2; --home-accent-deep: #08979c; --home-accent-light: #e6fffb; }
.home-page.accent-orange { --home-accent: #fa8c16; --home-accent-deep: #d46b08; --home-accent-light: #fff7e6; }
.home-page.accent-purple { --home-accent: #722ed1; --home-accent-deep: #531dab; --home-accent-light: #f9f0ff; }
.home-page .mini-header { background: linear-gradient(135deg, var(--home-accent), var(--home-accent-deep)); }
.home-page .mini-header .search-box .search-btn { background: var(--home-accent); }
.home-page .quick-entries { margin: var(--sec-gap) 10px; }
.home-page .section-title { margin-top: var(--sec-gap); }
.home-page .section-title .more { color: var(--home-accent); }
.home-page .circle-tab.active { background: var(--home-accent); }
.home-page .property-grid { gap: var(--sec-gap); }
.home-page .property-card { margin-bottom: var(--sec-gap); }
.home-page .news-card { margin-bottom: var(--sec-gap); }
.home-page .filter-tabs { margin-bottom: var(--sec-gap); }

/* ===== 房源卡片（横向列表用） ===== */
.property-card { background: #fff; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); display: flex; gap: 14px; padding: 14px; cursor: pointer; transition: transform 0.2s; }
.property-card:active { transform: scale(0.98); }
.property-card .thumb { width: 120px; height: 120px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 44px; flex-shrink: 0; background: linear-gradient(135deg, #f0f5ff, #d6e4ff); }
.property-card .info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.property-card .info .name { font-size: 16px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.property-card .info .meta { font-size: 13px; color: var(--text-light); display: flex; gap: 10px; flex-wrap: wrap; }
.property-card .info .tags { display: flex; gap: 5px; flex-wrap: wrap; }
.property-card .info .tags .tag { font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--primary-light); color: var(--primary); }
.property-card .info .price { color: var(--danger); font-weight: 700; font-size: 18px; }
.property-card .info .price .unit { font-size: 12px; font-weight: 400; color: var(--text-light); }

/* ===== 资讯卡片 ===== */
.news-card { background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); cursor: pointer; }
.news-card .news-type { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 4px; margin-bottom: 8px; }
.news-card .news-type.market { background: #fff7e6; color: #fa8c16; }
.news-card .news-type.notice { background: #e6f7ff; color: #1890ff; }
.news-card h4 { font-size: 16px; color: var(--text-main); margin-bottom: 8px; line-height: 1.4; }
.news-card p { font-size: 14px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { font-size: 12px; color: var(--text-light); margin-top: 8px; display: flex; justify-content: space-between; }

/* ===== 底部TabBar ===== */
.tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: var(--tabbar-h); background: #fff; display: flex; align-items: center; justify-content: space-around; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); z-index: 200; }
.tab-bar .tab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 6px 14px; }
.tab-bar .tab-item .icon { font-size: 22px; }
.tab-bar .tab-item .label { font-size: 11px; color: var(--text-light); }
.tab-bar .tab-item.active .label { color: var(--primary); }
.tab-bar .tab-item.active .icon { transform: scale(1.1); }

/* ===== 通用卡片 ===== */
.card { background: #fff; border-radius: var(--radius); padding: 18px; margin: 12px; box-shadow: var(--shadow); }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card-title .more { font-size: 13px; color: var(--text-light); cursor: pointer; }

/* ===== 个人中心 ===== */
.profile-header { background: linear-gradient(135deg, var(--primary), #096dd9); padding: 24px; color: #fff; text-align: center; }
.profile-header .avatar { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 10px; }
.profile-header .name { font-size: 20px; font-weight: 600; }
.profile-header .company { font-size: 13px; opacity: 0.8; margin-top: 4px; }
.profile-menu { background: #fff; margin: 12px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.profile-menu .menu-item { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.profile-menu .menu-item:last-child { border-bottom: none; }
.profile-menu .menu-item .icon { width: 26px; text-align: center; margin-right: 14px; font-size: 20px; }
.profile-menu .menu-item .text { flex: 1; font-size: 15px; color: var(--text-main); }
.profile-menu .menu-item .arrow { color: var(--text-light); font-size: 15px; }

/* ===== Web后台通用 ===== */
.web-header { background: #001529; color: #fff; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.web-header .logo { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.web-header .user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.web-layout { display: flex; min-height: calc(100vh - 56px); }
.web-sidebar { width: 220px; background: #001933; color: #b3c0d1; flex-shrink: 0; }
.web-sidebar .menu-group { padding: 8px 0; }
.web-sidebar .menu-group-title { padding: 8px 20px; font-size: 11px; color: #5c6b7a; text-transform: uppercase; }
.web-sidebar .menu-item { padding: 10px 20px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; border-left: 3px solid transparent; }
.web-sidebar .menu-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.web-sidebar .menu-item.active { background: var(--primary); color: #fff; border-left-color: #fff; }
.web-content { flex: 1; padding: 20px; overflow-y: auto; background: var(--bg-page); }

/* ===== 数据表格 ===== */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: #fafafa; padding: 14px 18px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 14px 18px; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table tr:hover { background: #fafafa; }

/* ===== 状态标签 ===== */
.status-tag { display: inline-block; padding: 3px 10px; border-radius: 5px; font-size: 12px; }
.status-tag.green { background: #f6ffed; color: var(--success); border: 1px solid #b7eb8f; }
.status-tag.blue { background: #e6f7ff; color: var(--primary); border: 1px solid #91d5ff; }
.status-tag.orange { background: #fff7e6; color: var(--warning); border: 1px solid #ffd591; }
.status-tag.red { background: #fff1f0; color: var(--danger); border: 1px solid #ffa39e; }
.status-tag.gray { background: #fafafa; color: var(--text-light); border: 1px solid var(--border); }
.status-tag.purple { background: #f9f0ff; color: var(--purple); border: 1px solid #d3adf7; }
/* V2.14 可见范围标签 */
.vis-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #f0f5ff; color: #2f54eb; border: 1px solid #adc6ff; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 18px; border-radius: 6px; font-size: 15px; cursor: pointer; border: 1px solid var(--border); background: #fff; color: var(--text-main); transition: all 0.2s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }

/* ===== 模态框 ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius-lg); max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto; }
.modal-header { padding: 18px 22px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 15px; outline: none; transition: border-color 0.2s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 90px; }

/* ===== 统计卡片 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card .stat-value { font-size: 30px; font-weight: 700; }
.stat-card .stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }
.stat-card .stat-trend { font-size: 13px; margin-top: 6px; }
.stat-card .stat-trend.up { color: var(--danger); }
.stat-card .stat-trend.down { color: var(--success); }

/* ===== 筛选栏 ===== */
.filter-bar { background: #fff; padding: 12px 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-bar .filter-item { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text-secondary); cursor: pointer; padding: 5px 12px; border-radius: 5px; }
.filter-bar .filter-item.active { background: var(--primary); color: #fff; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 52px; margin-bottom: 14px; }
.empty-state .text { font-size: 15px; }

/* ===== 段落标题 ===== */
.section-title { font-size: 18px; font-weight: 600; padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.section-title .more { font-size: 14px; color: var(--primary); cursor: pointer; }

/* ===== 委托找房表单 ===== */
.entrust-form { background: #fff; margin: 10px; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.entrust-form h3 { font-size: 16px; margin-bottom: 12px; }

/* ===== 爬虫状态指示器 ===== */
.crawl-status { display: inline-flex; align-items: center; gap: 4px; }
.crawl-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.crawl-status .dot.running { background: var(--success); animation: pulse 1.5s infinite; }
.crawl-status .dot.stopped { background: var(--text-light); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .web-sidebar { width: 60px; }
    .web-sidebar .menu-group-title, .web-sidebar .menu-item span { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
