/* ==========================================================
   鼎信行业资讯 · H5 样式
   移动端优先，主色 #ff6633（行业资讯 / 橙红）
   ========================================================== */
:root {
  --brand: #ff6633;
  --brand-dark: #e64f1f;
  --brand-light: #fff1ec;
  --text: #1f2329;
  --text-2: #5f6772;
  --text-3: #9aa3ad;
  --line: #eef0f3;
  --bg: #f5f6f8;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(31, 35, 41, .06);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.app { max-width: 640px; margin: 0 auto; padding-bottom: 58px; }

/* ---------------- 顶部条 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: 46px; padding: 0 10px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 16px; font-weight: 600; }
.topbar .back { font-size: 26px; line-height: 1; color: var(--text-2); width: 32px; }
.topbar .ph { width: 32px; }

/* ---------------- 首页头部 ---------------- */
.hero {
  background: linear-gradient(135deg, #ff8a4c 0%, #ff5a2b 55%, #f4441d 100%);
  padding: 18px 16px 46px;
  color: #fff;
  position: relative;
}
.hero .brand { display: flex; align-items: center; gap: 10px; }
.hero .brand img { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.2); }
.hero .brand b { font-size: 19px; letter-spacing: .5px; display: block; }
.hero .brand span { font-size: 12px; opacity: .85; }
.hero .search {
  margin-top: 14px;
  display: flex; align-items: center;
  background: rgba(255,255,255,.95);
  border-radius: 20px; padding: 8px 14px;
  color: var(--text-3); font-size: 13px;
}

/* ---------------- 快捷入口 ---------------- */
.quick {
  margin: -34px 12px 0;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 14px 4px;
}
.quick a { text-align: center; font-size: 12px; color: var(--text-2); }
.quick .ic { display: block; font-size: 22px; margin-bottom: 4px; }
.quick a:active .ic { transform: scale(.92); }

/* ---------------- 区块 ---------------- */
.section { margin: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px;
}
.section-head h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.section-head h2::before { content: ''; width: 4px; height: 15px; border-radius: 2px; background: var(--brand); }
.section-head .more { font-size: 12px; color: var(--text-3); }

/* ---------------- 资讯卡片 ---------------- */
.list { padding: 0 14px 6px; }
.item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .thumb {
  width: 104px; height: 74px; border-radius: 8px; object-fit: cover;
  background: #eceef1; flex: none;
}
.item .body { flex: 1; min-width: 0; }
.item h3 {
  margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item .desc {
  margin: 0 0 6px; font-size: 12.5px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.meta .cat { color: var(--brand); background: var(--brand-light); padding: 1px 6px; border-radius: 4px; }

/* 头条大图 */
.hero-card { padding: 0 14px 14px; }
.hero-card .pic { width: 100%; height: 178px; object-fit: cover; border-radius: 10px; background: #eceef1; }
.hero-card h3 { margin: 10px 0 6px; font-size: 17px; line-height: 1.4; }

/* ---------------- 标签 ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.chip {
  font-size: 12.5px; padding: 5px 12px; border-radius: 15px;
  background: #f2f3f5; color: var(--text-2);
}
.chip.on { background: var(--brand); color: #fff; }

/* ---------------- 热点榜 ---------------- */
.hot-list { padding: 4px 14px 10px; }
.hot-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hot-item:last-child { border-bottom: 0; }
.hot-item .rank {
  width: 20px; height: 20px; border-radius: 5px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; background: #b9c0c9;
}
.hot-item:nth-child(1) .rank { background: #ff4d3d; }
.hot-item:nth-child(2) .rank { background: #ff7a45; }
.hot-item:nth-child(3) .rank { background: #ffa940; }
.hot-item .kw { flex: 1; font-size: 14.5px; font-weight: 600; }
.hot-item .score { font-size: 11.5px; color: var(--text-3); }
.hot-item .trend-up { color: #f5222d; }
.hot-item .trend-dn { color: #52c41a; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.tag-cloud a {
  padding: 5px 11px; border-radius: 14px; font-size: 12.5px;
  background: var(--brand-light); color: var(--brand-dark);
}

/* ---------------- 货源 ---------------- */
.supply-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.supply-item:last-child { border-bottom: 0; }
.supply-item .row1 { display: flex; align-items: flex-start; gap: 10px; }
.supply-item .pic { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; background: #eceef1; flex: none; }
.supply-item h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.supply-item .spec { font-size: 12.5px; color: var(--text-3); margin: 0 0 8px; }
.price { color: var(--brand); font-size: 18px; font-weight: 700; }
.price small { font-size: 11px; font-weight: 400; color: var(--text-3); margin-left: 6px; }
.badge {
  display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: #fff7e6; color: #fa8c16; margin-left: 6px;
}
.badge.ok { background: #f6ffed; color: #52c41a; }
.badge.warn { background: #fff1f0; color: #f5222d; }
.badge.gray { background: #f2f3f5; color: var(--text-3); }

/* ---------------- 按钮 / 表单 ---------------- */
.btn {
  display: block; width: 100%; text-align: center;
  padding: 11px 0; border: 0; border-radius: 24px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
}
.btn:active { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.gray { background: #f2f3f5; color: var(--text-2); }
.btn-row { display: flex; gap: 10px; margin: 14px; }
.btn-row .btn { flex: 1; }

.form { padding: 4px 14px 16px; }
.field { margin-top: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; font-size: 15px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; background: #fafbfc;
  font-family: inherit; -webkit-appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field .tip { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.uploader { display: flex; flex-wrap: wrap; gap: 8px; }
.uploader .up {
  width: 76px; height: 76px; border-radius: 8px; background: #f2f3f5;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 12px; position: relative; overflow: hidden;
}
.uploader .up img { width: 100%; height: 100%; object-fit: cover; }
.uploader .up .del {
  position: absolute; top: 0; right: 0; width: 20px; height: 20px;
  background: rgba(0,0,0,.5); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center; border-radius: 0 0 0 8px;
}

/* ---------------- 详情 ---------------- */
.detail-title { font-size: 21px; line-height: 1.45; font-weight: 700; margin: 14px 14px 8px; }
.detail-meta { padding: 0 14px 12px; font-size: 12.5px; color: var(--text-3); display: flex; gap: 10px; }
.detail-body { padding: 0 14px 20px; font-size: 16px; line-height: 1.85; color: #2b3038; word-break: break-word; }
.detail-body p { margin: 0 0 14px; }
.detail-body img { border-radius: 8px; margin: 8px 0; }
.detail-body h3 { font-size: 17px; margin: 18px 0 8px; }
.detail-body blockquote {
  margin: 12px 0; padding: 10px 12px; background: var(--brand-light);
  border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; color: #5c3a2e;
}

.kv { padding: 4px 14px 14px; }
.kv .row { display: flex; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv .row:last-child { border-bottom: 0; }
.kv .row .k { width: 88px; color: var(--text-3); flex: none; }
.kv .row .v { flex: 1; word-break: break-all; }

/* ---------------- 视频 ---------------- */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 14px; }
.video-card .cover { width: 100%; height: 100px; border-radius: 8px; object-fit: cover; background: #eceef1; }
.video-card h4 { margin: 6px 0 2px; font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card .m { font-size: 11.5px; color: var(--text-3); }
.player { width: 100%; background: #000; border-radius: 10px; }

/* ---------------- 我的 ---------------- */
.user-card { background: linear-gradient(135deg, #ff8a4c, #f4441d); color: #fff; padding: 20px 16px; display: flex; gap: 12px; align-items: center; }
.user-card .ava { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25); object-fit: cover; }
.user-card .nm { font-size: 17px; font-weight: 600; }
.user-card .tip { font-size: 12px; opacity: .85; margin-top: 3px; }

.menu-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 12px; overflow: hidden; }
.menu-list a { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.menu-list a:last-child { border-bottom: 0; }
.menu-list .ic { font-size: 17px; }
.menu-list .arrow { margin-left: auto; color: var(--text-3); }

.empty { text-align: center; color: var(--text-3); font-size: 13.5px; padding: 40px 0; }
.empty .ic { font-size: 40px; display: block; margin-bottom: 10px; }

/* ---------------- 底部 tabbar ---------------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 40;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab { text-align: center; padding: 7px 0 6px; font-size: 11px; color: var(--text-3); }
.tab .ic { display: block; font-size: 19px; line-height: 1.2; }
.tab.on { color: var(--brand); font-weight: 600; }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px;
  border-radius: 8px; font-size: 14px; z-index: 100; display: none; max-width: 78%;
  text-align: center;
}

.notice { margin: 12px; padding: 10px 12px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 8px; font-size: 12.5px; color: #8c6d1f; }
