/* ================= 全局 ================= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #1F4E79;      /* 深蓝 */
  --primary-2: #2E75B6;    /* 中蓝 */
  --accent: #C55A11;       /* 炉火橙 */
  --accent-2: #E36C09;
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --text: #1F1F1F;
  --text-2: #666666;
  --text-3: #999999;
  --line: #E5E7EB;
  --green: #2E7D32;
  --red: #C62828;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
}
body { font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ================= 应用框架 ================= */
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; background: var(--bg); }

/* 启动页 */
.splash { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; background: linear-gradient(160deg, var(--primary) 0%, #153B5E 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; transition: opacity .4s; }
.splash-logo { text-align: center; color: #fff; }
.splash-logo .logo-flame { font-size: 60px; margin-bottom: 8px; animation: flame .9s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scale(1); } to { transform: scale(1.12); } }
.splash-logo h1 { font-size: 34px; letter-spacing: 6px; font-weight: 800; }
.splash-logo p { font-size: 13px; opacity: .8; margin-top: 6px; letter-spacing: 2px; }
.splash-loading { display: flex; gap: 6px; margin-top: 40px; }
.splash-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); animation: bounce 1s infinite; }
.splash-loading span:nth-child(2){ animation-delay: .15s; }
.splash-loading span:nth-child(3){ animation-delay: .3s; }
@keyframes bounce { 0%,100%{transform:translateY(0);opacity:.4} 50%{transform:translateY(-10px);opacity:1} }

/* 页面容器 */
.page { min-height: 100vh; padding-bottom: 64px; }

/* ================= 顶部栏 ================= */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.topbar-brand { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.topbar-actions { display: flex; gap: 10px; }
.icon-btn { position: relative; color: #fff; font-size: 20px; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12); }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; background: var(--accent); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ================= 内容区 ================= */
#content { padding: 12px 12px 20px; }

/* ================= 底部导航 ================= */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 60; }
.tabbar-item { flex: 1; padding: 8px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-3); }
.tabbar-item span:first-child { font-size: 22px; }
.tabbar-item.active { color: var(--primary); font-weight: 700; }

/* ================= 卡片 ================= */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.section-title { font-size: 16px; font-weight: 700; margin: 16px 4px 10px; display: flex; align-items: center; gap: 6px; }
.section-title .more { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--primary-2); }

/* ================= 按钮 ================= */
.btn-primary { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); color: #fff; border-radius: 10px; padding: 12px; font-size: 16px; font-weight: 700; border: none; }
.btn-block { width: 100%; }
.btn-outline { border: 1px solid var(--primary-2); color: var(--primary); background: #fff; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-blue { background: var(--primary-2); color: #fff; }
.btn-gray { background: #EEF0F2; color: var(--text-2); }
.btn-orange { background: var(--accent); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ================= 认证页 ================= */
#page-auth { padding: 0 24px; padding-top: 60px; }
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-logo { font-size: 30px; font-weight: 800; color: var(--primary); }
.auth-logo span { margin-left: 6px; letter-spacing: 2px; }
.auth-header p { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 12px; font-size: 16px; color: var(--text-2); border-bottom: 3px solid transparent; }
.tab-btn.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--accent); }
.auth-form .field { margin-bottom: 16px; }
.auth-form input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: #fff; }
.auth-form input:focus { outline: none; border-color: var(--primary-2); }
.role-select { display: flex; gap: 8px; }
.role-opt { flex: 1; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--text-2); background: #fff; text-align: center; }
.role-opt.active { border-color: var(--primary-2); color: var(--primary); background: #E8F0FA; font-weight: 700; }
.auth-tip { text-align: center; color: var(--text-3); font-size: 12px; margin: 18px 0 8px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-btn { padding: 10px; border: 1px dashed var(--primary-2); border-radius: 8px; color: var(--primary); background: #F5F9FD; font-size: 13px; }

/* ================= 首页 ================= */
.banner { background: linear-gradient(120deg, var(--primary) 0%, #2A6A9E 100%); border-radius: var(--radius); padding: 18px; color: #fff; margin-bottom: 12px; }
.banner h2 { font-size: 20px; margin-bottom: 6px; }
.banner p { font-size: 13px; opacity: .85; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; }
.quick-item { background: var(--card); border-radius: 12px; padding: 14px 6px; text-align: center; box-shadow: var(--shadow); }
.quick-item .qi-icon { font-size: 26px; display: block; margin-bottom: 6px; }
.quick-item .qi-text { font-size: 12px; color: var(--text-2); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.stat-card { background: var(--card); border-radius: 12px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.stat-card .num { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ================= 列表项 ================= */
.job-item { display: flex; align-items: flex-start; gap: 10px; }
.job-item .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.job-item .job-info { flex: 1; min-width: 0; }
.job-item .job-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.job-item .job-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.job-item .job-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #EFF3F7; color: var(--primary-2); }
.tag.orange { background: #FDEEDF; color: var(--accent); }
.tag.green { background: #E6F4EA; color: var(--green); }
.tag.red { background: #FDECEC; color: var(--red); }
.tag.gray { background: #F0F0F0; color: var(--text-2); }
.tag.blue { background: #E7F0FB; color: var(--primary-2); }
.tag.purple { background: #EFE7FB; color: #7B3FA8; }
.job-item .job-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }

/* 岗位徽章 */
.badge-title { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.badge-role { background: var(--primary); color: #fff; }
.badge-cert { background: #FFF3E0; color: var(--accent); border: 1px solid #FFE0B2; }

/* 维修任务 */
.task-item { display: flex; align-items: flex-start; gap: 10px; }
.task-item .task-icon { width: 46px; height: 46px; border-radius: 10px; background: #FDEEDF; color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.task-item .task-info { flex: 1; min-width: 0; }
.task-item .task-title { font-size: 15px; font-weight: 700; }
.task-item .task-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.task-item .task-price { font-size: 16px; font-weight: 800; color: var(--accent); margin-top: 6px; }
.task-item .task-price .price-num { font-size: 18px; margin-right: 8px; }
.task-item .task-price small { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ================= 表单 ================= */
.form { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.form .form-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.form-item input, .form-item select, .form-item textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; }
.form-item textarea { min-height: 80px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { outline: none; border-color: var(--primary-2); }

/* ================= 筛选条 ================= */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.filter-chip { flex-shrink: 0; padding: 8px 14px; border-radius: 20px; background: var(--card); color: var(--text-2); font-size: 13px; box-shadow: var(--shadow); }
.filter-chip.active { background: var(--primary); color: #fff; font-weight: 700; }

/* ================= 详情页 ================= */
.detail-header { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.detail-header h2 { font-size: 20px; margin-bottom: 8px; }
.detail-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; opacity: .9; }
.detail-section { margin-bottom: 12px; }
.detail-section .ds-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.contact-card { background: #FDEEDF; border-radius: 10px; padding: 12px; display: flex; align-items: center; justify-content: space-between; }
.contact-card .contact-info { font-size: 14px; color: var(--accent); font-weight: 700; }
.bottom-bar { position: sticky; bottom: 64px; background: var(--card); padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.bottom-bar .btn { flex: 1; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 700; }

/* ================= 消息中心 ================= */
.msg-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border-radius: 10px; margin-bottom: 10px; box-shadow: var(--shadow); }
.msg-item .msg-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.msg-item .msg-body { flex: 1; min-width: 0; }
.msg-item .msg-title { font-size: 14px; font-weight: 700; }
.msg-item .msg-text { font-size: 12px; color: var(--text-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item .msg-time { font-size: 11px; color: var(--text-3); }

/* ================= 我的 ================= */
.mine-header { background: linear-gradient(120deg, var(--primary), #2A6A9E); border-radius: var(--radius); padding: 20px; color: #fff; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.mine-header .avatar-lg { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; }
.mine-header .mine-name { font-size: 18px; font-weight: 700; }
.mine-header .mine-role { font-size: 12px; opacity: .85; margin-top: 4px; }
.mine-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mine-menu { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mine-menu-item { display: flex; align-items: center; gap: 12px; padding: 15px; border-bottom: 1px solid var(--line); font-size: 15px; }
.mine-menu-item:last-child { border-bottom: none; }
.mine-menu-item .mm-icon { font-size: 20px; }
.mine-menu-item .mm-arrow { margin-left: auto; color: var(--text-3); }

/* ================= 抽屉 ================= */
.drawer { position: fixed; inset: 0; z-index: 90; max-width: 480px; margin: 0 auto; }
.drawer-mask, .modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 75%; background: #fff; transform: translateX(100%); transition: transform .25s; padding: 20px; overflow-y: auto; }
.drawer-panel.open { transform: translateX(0); }
.drawer-user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.drawer-menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 4px; border-bottom: 1px solid #F5F5F5; font-size: 15px; }
.drawer-logout { margin-top: 20px; width: 100%; }

/* ================= 弹窗 ================= */
.modal { position: fixed; inset: 0; z-index: 95; max-width: 480px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.modal-box { position: relative; width: 88%; background: #fff; border-radius: 14px; padding: 20px; z-index: 2; }
.modal-title { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; padding: 11px; border-radius: 10px; font-size: 15px; font-weight: 600; }

/* 表单弹窗 */
.publish-form { max-height: 70vh; overflow-y: auto; padding-right: 4px; }

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

/* ================= 提示 ================= */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.78); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; z-index: 200; max-width: 70%; text-align: center; }

/* 群撮合入口横幅 */
.group-banner { background: linear-gradient(90deg, #FFF8EF, #FDEEDF); border: 1px solid #F5D5B0; border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.group-banner .gb-icon { font-size: 28px; }
.group-banner .gb-text { flex: 1; font-size: 13px; color: #7A4E20; }
.group-banner .gb-btn { background: var(--accent); color: #fff; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* 首页二维码横幅卡片 */
.qr-banner { background: linear-gradient(90deg, #FFF8EF, #FDEEDF); border: 1px solid #F5D5B0; border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--shadow); }
.qr-banner-main { flex: 1; min-width: 0; }
.qr-banner-title { font-size: 16px; font-weight: 800; color: #7A4E20; margin-bottom: 6px; }
.qr-banner-text { font-size: 13px; color: #8F5E2D; margin-bottom: 6px; }
.qr-banner-hint { font-size: 11px; color: var(--text-3); }
.qr-banner-thumb { width: 72px; height: 72px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 4px; border: 1px solid #F5D5B0; display: flex; align-items: center; justify-content: center; }
.qr-banner-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }

/* 详情标签行 */
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* 价格醒目 */
.price-lg { font-size: 24px; font-weight: 800; color: var(--accent); }

/* 提示条 */
.tip-bar { background: #E8F0FA; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--primary-2); margin-bottom: 12px; line-height: 1.6; }

/* 小头像列表 */
.avatar-row { display: flex; align-items: center; }
.avatar-row .avatar-mini { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-right: -6px; border: 2px solid #fff; }

/* 响应式：桌面居中加宽 */
@media (min-width: 520px) {
  #app { box-shadow: 0 0 20px rgba(0,0,0,0.08); }
}

/* ================= 热能顾问板块 ================= */
.banner-consult { background: linear-gradient(135deg, #2E7D32, #43A047); }
.banner-consult h2 { color: #fff; }
.banner-consult p { color: rgba(255,255,255,.85); }

.panel-consult { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(31,78,121,.06); padding: 14px 16px; margin-bottom: 14px; }

/* 报价档位表 */
.tier-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tier-row:last-child { border-bottom: none; }
.tier-name { width: 96px; flex-shrink: 0; font-weight: 700; color: var(--primary); font-size: 14px; }
.tier-price { width: 96px; flex-shrink: 0; font-weight: 800; color: var(--accent); font-size: 15px; }
.tier-note { flex: 1; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.tier-tip { font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }

/* 顾问详情报价/回复框 */
.quote-box { background: #F8FAFC; border-radius: 10px; padding: 12px 14px; margin-top: 10px; border: 1px solid var(--line); }
.quote-box .quote-label { font-size: 12px; color: var(--text-3); font-weight: 700; margin-bottom: 4px; }
.quote-price { background: #FFF8EF; border-color: #F5D5B0; }

/* 弹窗表单 */
#modal-box .field { margin-bottom: 14px; }
#modal-box .field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
#modal-box .input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; box-sizing: border-box; }
#modal-box .input:focus { outline: none; border-color: var(--primary-2); }
#modal-box textarea.input { min-height: 80px; resize: vertical; }
