/* ========================================
   计量工具箱 - 首页样式
   转自 pages/home/home.wxss（rpx→0.5px 换算）
   ======================================== */
.page { background: transparent; min-height: 100vh; padding-bottom: 120px; overflow: visible; }

/* ===== 顶部 Header ===== */
.header {
  background: linear-gradient(135deg, #07c160 0%, #06ad56 60%, #059669 100%);
  padding: 24px 14px 12px;
  position: relative;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-title-group { flex: 1; min-width: 0; }

.header-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.header-greet {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  margin-top: 3px;
}

.header-icon {
  width: 40px; height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 12px;
  cursor: pointer;
}

.header-icon-img { width: 100%; height: 100%; object-fit: cover; }

/* 搜索 */
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 7px 9px;
  transition: all 0.2s;
}

.search-box.active {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.search-icon { font-size: 13px; color: rgba(255, 255, 255, 0.5); margin-right: 6px; }

.search-box.active .search-icon { color: #9ca3af; }

.search-input {
  flex: 1; font-size: 14px; color: #fff; height: 21px; border: none; background: transparent; outline: none;
}

.search-box.active .search-input { color: #1f2937; }

.search-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.search-box.active .search-input::placeholder { color: #d1d5db; }

.search-clear {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: rgba(255, 255, 255, 0.6);
  margin-right: 4px; line-height: 1; cursor: pointer;
}

.search-cancel {
  font-size: 13px; color: #fff; font-weight: 500;
  padding: 2px 0 2px 6px; cursor: pointer;
}

/* ===== 内容区 ===== */
.body { padding: 0 16px; }

/* 公告 */
.notice {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  padding: 7px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  margin-top: 9px;
  margin-bottom: 10px;
  cursor: pointer;
}

.notice-icon { font-size: 12px; margin-right: 5px; flex-shrink: 0; }

.notice-m { flex: 1; height: 20px; overflow: hidden; }
.notice-t { white-space: nowrap; display: inline-block; }

.notice-txt {
  font-size: 13px; color: #6b7280;
  white-space: nowrap; display: inline-block; padding-right: 100px;
  line-height: 20px;
}

.notice-ar { font-size: 11px; color: #ddd; margin-left: 3px; flex-shrink: 0; }

/* 推荐 */
.rec-blk { margin-bottom: 14px; }

.rec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rec-hd-t { font-size: 14px; font-weight: 700; color: #1f2937; }
.rec-hd-a { font-size: 12px; color: #07c160; font-weight: 500; cursor: pointer; }

.rec-sc { white-space: nowrap; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rec-sc::-webkit-scrollbar { display: none; }

.rec-card {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 7px;
  padding: 8px 10px;
  margin-right: 6px;
  width: 145px;
  height: 46px;
  box-sizing: border-box;
  vertical-align: top;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.rec-card:active { box-shadow: 0 4px 16px rgba(7, 193, 96, 0.08); }

.rec-card-ic {
  width: 30px; height: 30px;
  background: #f0fdf4;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-right: 7px; flex-shrink: 0;
}

.rec-card-im { width: 28px; height: 28px; }

.rec-card-t { flex: 1; min-width: 0; }

.rec-card-n {
  font-size: 13px; font-weight: 600; color: #1f2937;
  display: block; line-height: 1.2;
}

.rec-card-d {
  font-size: 10px; color: #9ca3af; display: block; margin-top: 1px;
}

/* 分类 */
.sec { margin-bottom: 14px; }

.sec-tt {
  font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 8px;
}

.sec-n {
  font-size: 11px; color: #d1d5db; margin-left: 4px; font-weight: 400;
}

/* 网格 */
.grid { display: grid; gap: 6px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 0;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  border: none;
}

.card:active { background: #f0fdf4; box-shadow: 0 4px 16px rgba(7, 193, 96, 0.08); }

.card-ic {
  width: 40px; height: 40px;
  background: #f0fdf4;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 5px;
}

.card-em { font-size: 21px; line-height: 1; }
.card-im { width: 32px; height: 32px; }

.card-n {
  font-size: 12px; font-weight: 500; color: #374151;
  text-align: center; line-height: 1.2;
}

/* 文档 */
.d-row { display: flex; gap: 7px; }

.d-card {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 7px;
  padding: 10px 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.d-card:active { background: #f0fdf4; }

.d-card-ic {
  width: 24px; height: 24px;
  font-size: 16px;
  margin-right: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.d-card-t { flex: 1; min-width: 0; }
.d-card-n { font-size: 13px; font-weight: 600; color: #1f2937; display: block; }
.d-card-d { font-size: 10px; color: #9ca3af; display: block; margin-top: 1px; }
.d-card-ar { font-size: 14px; color: #ddd; flex-shrink: 0; }

/* 单卡占满整行 */
.d-card-full { width: 100%; }

/* 搜索 */
.sr-hd { font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 7px; margin-top: 4px; }
.sr-n { font-size: 11px; color: #d1d5db; margin-left: 4px; font-weight: 400; }

.sr-list { background: #fff; border-radius: 7px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02); }

.sr-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}

.sr-item:last-child { border-bottom: none; }
.sr-item:active { background: #f0fdf4; }

.sr-item-l { display: flex; align-items: center; flex: 1; min-width: 0; }

.sr-item-ic {
  width: 27px; height: 27px;
  background: #f0fdf4;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  margin-right: 7px; flex-shrink: 0;
}

.sr-item-im { width: 24px; height: 24px; }
.sr-item-t { flex: 1; min-width: 0; }
.sr-item-n { font-size: 13px; font-weight: 600; color: #1f2937; display: block; }
.sr-item-d { font-size: 10px; color: #9ca3af; display: block; margin-top: 1px; }
.sr-item-ar { font-size: 14px; color: #ddd; flex-shrink: 0; }

.sr-ep { text-align: center; padding: 25px; background: #fff; border-radius: 7px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02); }
.sr-ep-t { font-size: 12px; color: #d1d5db; }

/* 分组标题 */
.group-tt {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 1px;
  padding: 12px 0 6px;
  margin-top: 4px;
  border-top: 1px solid #f0f0f0;
  position: relative;
}

.group-tt::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #07c160 0%, transparent 100%);
  border-radius: 1px;
}

/* =========== 公告弹窗 =========== */
.nm-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.nm-c {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  width: 86%;
  max-width: 290px;
  height: 76vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  animation: nm-in 0.2s ease;
  z-index: 9999;
  overflow: hidden;
  box-sizing: border-box;
}

@keyframes nm-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 头部 */
.nm-hd {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.nm-hd-t { font-size: 15px; font-weight: 700; color: #111827; }
.nm-hd-idx { margin-left: 6px; font-size: 11px; color: #d1d5db; font-weight: 400; }

.nm-hd-cls {
  margin-left: auto;
  width: 26px; height: 26px;
  background: #f5f5f5;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: #9ca3af;
  cursor: pointer;
}

/* 内容 */
.nm-bd {
  padding: 14px 14px 10px 16px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.nm-bd-img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.nm-bd-txt {
  font-size: 15px;
  color: #1f2937;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  width: 100%;
  box-sizing: border-box;
}

.nm-bd-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 16px 8px;
  padding: 9px 12px;
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  border-radius: 5px;
  flex-shrink: 0;
  cursor: pointer;
}

.nm-bd-url-icon { font-size: 13px; }
.nm-bd-url-txt { font-size: 13px; color: #fff; font-weight: 600; }

/* 底部 */
.nm-ft { padding: 8px 16px 16px; flex-shrink: 0; }

.nm-ft-dots {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.nm-ft-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e5e7eb;
  margin: 0 4px;
  transition: all 0.2s;
  cursor: pointer;
}

.nm-ft-dot.active {
  width: 20px;
  border-radius: 4px;
  background: #07c160;
}

.nm-ft-view {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}
