/* ===== 纸价雷达 - 广丰废纸行情工具 ===== */

/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 68px;
}

/* ===== 顶部 ===== */
.header {
  background: linear-gradient(135deg, #0d4f3c 0%, #1a7a5a 50%, #0d4f3c 100%);
  color: #fff;
  padding: 20px 16px 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(13,79,60,0.3);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.header-top h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-top h1 .brand-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 6px;
}
.header-top h1 span {
  color: #7ddfb0;
  font-weight: 300;
}
.header-top .date {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 20px;
}
.header-top .badge {
  font-size: 10px;
  background: #ff6b35;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 600;
}
.search-row {
  display: flex;
  gap: 8px;
}
.search-row input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  outline: none;
  transition: all 0.2s;
}
.search-row input::placeholder {
  color: rgba(255,255,255,0.5);
}
.search-row input:focus {
  background: rgba(255,255,255,0.25);
}
.search-row .share-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.search-row .share-btn:active {
  transform: scale(0.95);
  background: rgba(255,255,255,0.3);
}

/* ===== 价格概览卡片 ===== */
.summary-cards {
  display: flex;
  gap: 8px;
  padding: 12px 16px 8px;
}
.summary-card {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.summary-card .label {
  font-size: 11px;
  color: #999;
  margin-bottom: 6px;
  font-weight: 500;
}
.summary-card .price {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.summary-card .change {
  font-size: 12px;
  margin-top: 4px;
  font-weight: 600;
}
.summary-card .change.up { color: #e53935; }
.summary-card .change.down { color: #43a047; }
.summary-card .change.flat { color: #999; }

/* ===== 主Tab ===== */
.main-tabs {
  display: flex;
  padding: 4px 16px 0;
  gap: 2px;
  background: #f0f2f5;
  position: sticky;
  top: 112px;
  z-index: 99;
}
.main-tab {
  flex: 1;
  padding: 10px 4px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.main-tab.active {
  color: #0d4f3c;
  border-bottom-color: #0d4f3c;
  font-weight: 700;
}

/* ===== 内容 ===== */
.content {
  padding: 8px 16px 20px;
}

/* ===== Tab面板 ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 地区芯片 ===== */
.region-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.region-chips::-webkit-scrollbar { display: none; }
.region-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.region-chip.active {
  background: #0d4f3c;
  color: #fff;
  border-color: #0d4f3c;
}
.region-chip:active {
  transform: scale(0.95);
}

/* ===== 公告条 ===== */
.notice-bar {
  background: #fff9e6;
  border: 1px solid #ffecb3;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.notice-bar:active {
  background: #fff3d6;
}
.notice-bar .time {
  font-size: 11px;
  color: #b8860b;
  white-space: nowrap;
  font-weight: 600;
  min-width: 70px;
}
.notice-bar .body {
  font-size: 13px;
  color: #8d6e00;
  line-height: 1.4;
}

/* ===== 报价列表 ===== */
.factory-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 14px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: all 0.15s;
}
.factory-item:active {
  transform: scale(0.98);
  background: #f9f9f9;
}
.fi-info { flex: 1; min-width: 0; }
.fi-info .name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fi-info .sub {
  font-size: 12px;
  color: #999;
  margin-top: 3px;
}
.fi-price {
  text-align: right;
  margin-left: 10px;
  min-width: 90px;
}
.fi-price .amount {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.2;
}
.fi-price .unit {
  font-size: 11px;
  color: #bbb;
}
.fi-price .chg {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}
.fi-price .chg.up { color: #e53935; }
.fi-price .chg.down { color: #43a047; }
.fi-price .chg.flat { color: #999; }

.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.tag.up { background: #fce4ec; color: #c62828; }
.tag.down { background: #e8f5e9; color: #2e7d32; }
.tag.flat { background: #f5f5f5; color: #999; }

/* ===== 图表 ===== */
.chart-box {
  background: #fff;
  border-radius: 14px;
  padding: 20px 16px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chart-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.chart-sub {
  font-size: 12px;
  color: #999;
  margin-bottom: 20px;
}
.chart-vis {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}
.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, #1a7a5a 0%, #7ddfb0 100%);
  border-radius: 4px 4px 0 0;
  min-height: 16px;
  transition: height 0.3s;
  opacity: 0.8;
}
.chart-bar:first-child { opacity: 0.5; }
.chart-bar:last-child { opacity: 1; }
.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #999;
}
.chart-values {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: #bbb;
}
.trend-items { margin-top: 4px; }
.trend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.trend-item .left .name {
  font-size: 14px;
  font-weight: 600;
}
.trend-item .left .desc {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}
.trend-item .right {
  font-size: 16px;
  font-weight: 700;
}

/* ===== 预警 ===== */
.alert-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.alert-section-desc {
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
}
.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.alert-item .left .title {
  font-size: 14px;
  font-weight: 600;
}
.alert-item .left .desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}
.toggle {
  width: 42px;
  height: 24px;
  background: #ddd;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on {
  background: #0d4f3c;
}
.toggle.on::after {
  left: 20px;
}

.add-alert-box {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.add-alert-box .title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.add-alert-box select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  outline: none;
  margin-bottom: 10px;
  background: #fff;
}
.add-alert-box select:focus {
  border-color: #0d4f3c;
}
.btn-add {
  width: 100%;
  padding: 10px;
  background: #0d4f3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add:active {
  transform: scale(0.98);
  background: #0b4232;
}

/* ===== 反馈 ===== */
.feedback-box {
  background: #f8f9ff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #eef0ff;
  margin-bottom: 16px;
}
.feedback-box textarea {
  width: 100%;
  height: 110px;
  padding: 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  resize: none;
  outline: none;
  background: #fff;
  font-family: inherit;
  transition: border 0.2s;
}
.feedback-box textarea:focus {
  border-color: #0d4f3c;
}
.feedback-box .fb-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  background: #0d4f3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.feedback-box .fb-btn:active {
  transform: scale(0.98);
}

/* ===== 会员 ===== */
.vip-hero {
  background: linear-gradient(135deg, #0d4f3c 0%, #1a7a5a 50%, #ffd700 100%);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
}
.vip-hero .tagline {
  font-size: 12px;
  letter-spacing: 4px;
  opacity: 0.8;
  margin-bottom: 8px;
}
.vip-hero .title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}
.vip-hero .price {
  font-size: 42px;
  font-weight: 900;
  margin: 8px 0;
}
.vip-hero .price small {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}
.vip-hero .desc {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 20px;
}
.btn-vip {
  padding: 14px 40px;
  background: #fff;
  color: #0d4f3c;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-vip:active {
  transform: scale(0.97);
}
.feature-list {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  font-weight: 500;
}
.feature-item:last-child {
  border-bottom: none;
}
.feature-item .icon {
  font-size: 16px;
  width: 28px;
  text-align: center;
}
.free-hint {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  margin-top: 8px;
}

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 480px;
  width: 100%;
  display: flex;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  z-index: 200;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  font-size: 10px;
  color: #aaa;
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.2s;
}
.nav-item .icon {
  font-size: 18px;
}
.nav-item.active {
  color: #0d4f3c;
  font-weight: 600;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 认证报价标记 ===== */
.verified-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  vertical-align: middle;
}

/* ===== 上报页面 ===== */
.report-box {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.report-box .title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}
.report-box .desc {
  font-size: 12px;
  color: #888;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ===== 数据更新时间戳 ===== */
.update-tip {
  text-align: center;
  padding: 12px 0 4px;
  font-size: 11px;
  color: #bbb;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 40px 0;
  color: #ccc;
  font-size: 13px;
}

/* ===== 加载骨架 ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
