/* 烟草系统风格：深绿 + 金色点缀，手机端优先 */
:root {
  --green: #0e7c52;
  --green-dark: #0a5c3e;
  --green-bg: #eef6f1;
  --gold: #c9a063;
  --red: #d9534f;
  --text: #263238;
  --muted: #78909c;
  --line: #e0e7e2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.hidden { display: none !important; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--green-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶栏 */
.top-bar {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(14, 124, 82, 0.3);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-badge {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: cover; display: block;
}
.logo-text strong { display: block; font-size: 18px; letter-spacing: 1px; }
.logo-text small { opacity: 0.85; font-size: 12px; letter-spacing: 2px; }

/* 主容器 */
.container {
  width: 100%;
  max-width: 480px;   /* 手机端宽度 */
  margin: 0 auto;
  padding: 14px 12px 60px;
  flex: 1;
}

/* 搜索卡 */
.search-card {
  display: flex; gap: 8px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(14, 124, 82, 0.10);
}
.search-card input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}
.search-card input:focus { border-color: var(--green); }
.search-card button {
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  padding: 12px 22px;
  cursor: pointer;
  letter-spacing: 2px;
  white-space: nowrap;
}
.search-card button:disabled { opacity: 0.6; }

.data-meta { font-size: 12px; color: var(--muted); margin: 8px 4px 0; }

/* 返回栏 */
.back-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.back-btn {
  border: 1px solid var(--green);
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 14px;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.back-bar .data-meta { margin: 0; }

/* 模块卡片 */
.module {
  background: #fff;
  border-radius: 12px;
  margin-top: 12px;
  padding: 14px;
  box-shadow: 0 1px 6px rgba(38, 50, 56, 0.06);
}
.module-title {
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
  color: var(--green-dark);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.dot {
  width: 4px; height: 16px;
  background: var(--gold);
  border-radius: 2px;
  display: inline-block;
}

/* 基础信息 */
.base-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.base-item {
  background: var(--green-bg);
  border-radius: 8px;
  padding: 10px;
}
.base-item label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.base-item span { font-size: 14px; font-weight: 600; word-break: break-all; }
.base-item:first-child { grid-column: span 2; }   /* 许可证号独占一行 */
.grade-tag { color: var(--green); }

/* 货源详情 */
.spec-group { margin-bottom: 14px; }
.spec-group:last-child { margin-bottom: 0; }
.spec-sub { margin-bottom: 8px; }
.chip {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}
.chip-main { background: #e3f5ea; color: #0b8a4b; border: 1px solid #9fd8b7; }
.chip-tight { background: #fdeaea; color: #c0392b; border: 1px solid #f2b3b0; }
.spec-list { list-style: none; }
.spec-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list li.spec-head {
  border-radius: 6px 6px 0 0;
  padding: 10px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.spec-list.main li.spec-head {
  background: var(--green);
}
.spec-list.tight li.spec-head {
  background: var(--red);
}
.spec-list li.spec-head .spec-value { color: #fff; }
.spec-name { color: var(--text); }
.spec-value { font-weight: 700; color: var(--green-dark); }
.spec-empty { color: var(--muted); justify-content: center; font-size: 13px; }
.spec-total {
  margin-top: 8px; padding: 8px 12px;
  border-radius: 8px; font-size: 14px; font-weight: 700;
  text-align: right;
}
.spec-total.main { background: #e3f5ea; color: #0b8a4b; }
.spec-total.tight { background: #fdeaea; color: #c0392b; }

/* 经营指导 */
.guide-block { margin-bottom: 12px; }
.guide-block:last-child { margin-bottom: 0; }
.guide-block h4 {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 6px;
}
.guide-block p {
  font-size: 14px;
  line-height: 1.7;
  background: var(--green-bg);
  border-radius: 8px;
  padding: 10px;
}

/* 通知公告 */
.notice-text {
  font-size: 14px;
  line-height: 1.7;
  color: #8a6d1a;
  background: #fdf6e3;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 10px;
}
.sys-ann-item {
  background: #fdf6e3;
  border: 1px solid #f0e2bd;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.sys-ann-item:last-child { margin-bottom: 0; }
.sys-ann-item h4 {
  font-size: 14px;
  color: #8a6d1a;
  margin-bottom: 6px;
}
.sys-ann-item .ann-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.sys-ann-item .ann-body p { margin: 4px 0; }
.sys-ann-item .ann-body ul, .sys-ann-item .ann-body ol { margin: 4px 0 4px 18px; }

/* 提示 */
.empty-tip, .error-tip {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 24px;
}
.error-tip { color: var(--red); }

/* ===== 入口页 ===== */
.entry-ann-section {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(14, 124, 82, 0.10);
}
.entry-ann-title {
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
  color: var(--green-dark);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.entry-ann-list { }
.entry-ann-item {
  background: #fdf6e3;
  border: 1px solid #f0e2bd;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.entry-ann-item:last-child { margin-bottom: 0; }
.entry-ann-item h4 { font-size: 14px; color: #8a6d1a; margin-bottom: 6px; }
.entry-ann-body { font-size: 13px; line-height: 1.7; color: var(--text); word-break: break-word; }
.entry-ann-body p { margin: 4px 0; }
.entry-ann-body ul, .entry-ann-body ol { margin: 4px 0 4px 18px; }
.entry-ann-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 0; }

.entry-search-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 2px 10px rgba(14, 124, 82, 0.10);
}
.entry-search-title {
  font-size: 18px;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 8px;
}
.entry-search-tip {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 18px;
}
.entry-input-row {
  display: flex; gap: 8px;
}
.entry-input-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}
.entry-input-row input:focus { border-color: var(--green); }
.entry-btn-row {
  margin-top: 12px;
}
.entry-btn-row button {
  width: 100%;
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  padding: 12px 26px;
  cursor: pointer;
  letter-spacing: 2px;
  white-space: nowrap;
}
.entry-btn-row button:disabled { opacity: 0.6; }
.entry-err {
  margin-top: 12px;
  font-size: 13px;
  color: var(--red);
  text-align: center;
}

/* 底部 */
.foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
}
.foot a { color: var(--green); text-decoration: none; }

/* 管理页 */
.upload-box { display: flex; gap: 8px; flex-direction: column; }
.upload-box input { font-size: 14px; padding: 8px; }
.upload-box button {
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
}
.upload-result { margin-top: 10px; font-size: 14px; padding: 10px; border-radius: 8px; }
.upload-result.ok { background: #e3f5ea; color: #0b8a4b; }
.upload-result.bad { background: #fdeaea; color: #c0392b; }
.status-box { font-size: 14px; line-height: 1.6; }
.format-list { list-style: none; font-size: 13px; line-height: 1.8; color: var(--muted); }
.format-list b { color: var(--text); }

/* 公告图片轮播 */
.ann-carousel { margin-bottom: 14px; }
.car-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #f2f2f0;
  box-shadow: 0 2px 8px rgba(14, 124, 82, 0.15);
}
.car-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.5s ease;
}
.car-img.active { opacity: 1; }
.car-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.car-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transition: background 0.3s; }
.car-dots i.on { background: #fff; }
.car-audio-btn {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.car-audio-btn:active { transform: scale(0.92); }
