/* ============================================================================
   智研网 · 工具列表与运营记录修正 v15
   目标：
   1. 工具中心恢复为“一行一个工具”的稳定横向卡片；
   2. 左侧插画和紫蓝竖线都被明确约束在卡片内部；
   3. 充值批次、用户余额、兑换码记录统一补齐左右安全边距；
   4. 移除兑换码区的内层滚动，避免与页面滚动条双重竞争。
   本文件必须在 ui-full-audit-v14.css 之后加载。
   ============================================================================ */

/* --------------------------------------------------------------------------
   A. 研究工具：一行一个，左图 / 中文案 / 右操作。
   卡片自身负责裁切和定位，视觉元素不允许越过卡片边界。
   -------------------------------------------------------------------------- */
.tools-shell .catalog-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px;
}

.tools-shell .catalog-wrap {
  min-width: 0;
}

.tools-shell .catalog-card {
  position: relative;
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) auto !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: center;
  gap: 24px;
  min-height: 222px;
  padding: 20px 24px 20px 34px;
  overflow: hidden;
}

/* 原 v10 竖线贴在卡片边缘；现在收进卡片内部，形成可见安全距离。 */
.tools-shell .catalog-card::after {
  inset: 18px auto 18px 14px;
  width: 4px;
  border-radius: 999px;
  z-index: 0;
}

.tools-shell .catalog-art,
.tools-shell .catalog-main,
.tools-shell .catalog-action {
  position: relative;
  z-index: 1;
}

.tools-shell .catalog-art {
  grid-row: 1 !important;
  width: 184px;
  min-width: 184px;
  min-height: 180px;
  height: 180px;
  padding: 12px;
  display: grid;
  place-items: center;
  align-self: stretch;
  overflow: hidden;
  border-radius: 16px;
}

/* 文献专题地图的文献画布最宽约 150px；这里给足 160px 视觉画布与边缘余量，避免飘到文案区。 */
.tools-shell .catalog-card .tool-visual {
  width: 154px;
  height: 154px;
  transform: none;
}

.tools-shell .catalog-card .orbital {
  width: 144px;
  height: 144px;
}

.tools-shell .catalog-main {
  align-self: center;
  min-width: 0;
  padding: 4px 0;
}

.tools-shell .catalog-main p {
  max-width: 760px;
  margin: 9px 0 10px;
}

.tools-shell .catalog-main ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 14px;
}

.tools-shell .catalog-action {
  grid-column: 3 !important;
  align-self: center !important;
  justify-self: end;
  min-width: 104px;
  padding-left: 0;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .tools-shell .catalog-card {
    grid-template-columns: 158px minmax(0, 1fr) !important;
    gap: 18px;
    min-height: 206px;
    padding-right: 22px;
  }
  .tools-shell .catalog-art {
    width: 158px;
    min-width: 158px;
    height: 162px;
    min-height: 162px;
  }
  .tools-shell .catalog-card .tool-visual {
    width: 136px;
    height: 136px;
  }
  .tools-shell .catalog-card .orbital {
    width: 126px;
    height: 126px;
  }
  .tools-shell .catalog-main ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tools-shell .catalog-action {
    grid-column: 2 !important;
    justify-self: start;
    align-self: end !important;
  }
}

@media (max-width: 650px) {
  .tools-shell .catalog-card {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    min-height: 0;
    gap: 14px;
    padding: 18px 18px 18px 28px;
  }
  .tools-shell .catalog-card::after {
    inset: 14px auto 14px 10px;
  }
  .tools-shell .catalog-art {
    width: 100%;
    min-width: 0;
    height: 136px;
    min-height: 136px;
    justify-self: stretch;
  }
  .tools-shell .catalog-card .tool-visual {
    width: 116px;
    height: 116px;
  }
  .tools-shell .catalog-card .orbital {
    width: 108px;
    height: 108px;
  }
  .tools-shell .catalog-main ul {
    grid-template-columns: minmax(0, 1fr);
  }
  .tools-shell .catalog-action {
    grid-column: auto !important;
    width: 100%;
    justify-self: stretch;
  }
  .tools-shell .catalog-action .button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   B. 算力运营记录：标题与每一条数据使用同一条左右对齐线。
   -------------------------------------------------------------------------- */
.admin-shell .compute-admin-list,
.admin-shell .compute-account-list,
.admin-shell .compute-code-list {
  max-height: none;
  overflow: visible;
  padding: 0 20px;
  scrollbar-gutter: auto;
}

.admin-shell .compute-admin-batch,
.admin-shell .compute-account-row,
.admin-shell .compute-code-row {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* 兑换记录较多时仍沿页面自然向下阅读，不出现页面滚动 + 记录区滚动的双滚动。 */
.admin-shell .compute-code-audit {
  overflow: hidden;
}

@media (max-width: 650px) {
  .admin-shell .compute-admin-list,
  .admin-shell .compute-account-list,
  .admin-shell .compute-code-list {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* --------------------------------------------------------------------------
   C. 研究工具卡片二次收口 v16
   目标：压缩左图占比、增强卡片层次与留白，让工具列表更像产品卡片而不是“大图 + 一块空白”。
   -------------------------------------------------------------------------- */
.tools-shell .catalog-card {
  grid-template-columns: 132px minmax(0, 1fr) auto !important;
  min-height: 188px;
  gap: 20px;
  padding: 18px 22px 18px 30px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,255,.98) 100%);
  box-shadow: 0 12px 30px rgba(53, 71, 105, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tools-shell .catalog-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(53, 71, 105, .09);
  border-color: #d7deef;
}
.tools-shell .catalog-card::after {
  inset: 20px auto 20px 12px;
  width: 5px;
  background: linear-gradient(180deg, #6475ff 0%, #4a58ea 55%, #3341bd 100%);
  box-shadow: 0 0 0 1px rgba(90, 102, 227, .08);
}
.tools-shell .catalog-art {
  width: 132px;
  min-width: 132px;
  height: 132px;
  min-height: 132px;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f7f8ff 0%, #f0f2ff 100%);
  border: 1px solid #eaecfb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.tools-shell .catalog-card .tool-visual {
  width: 112px;
  height: 112px;
}
.tools-shell .catalog-card .orbital {
  width: 104px;
  height: 104px;
}
.tools-shell .catalog-main {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 0;
}
.tools-shell .catalog-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.tools-shell .catalog-title h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.2px;
}
.tools-shell .catalog-main p {
  max-width: 820px;
  margin: 0;
  line-height: 1.72;
  color: #64748a;
}
.tools-shell .catalog-main ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
}
.tools-shell .catalog-main li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f5f7fc;
  border: 1px solid #e6ebf4;
  color: #516579;
  font-size: 12px;
  font-weight: 600;
}
.tools-shell .catalog-main li .icon {
  width: 14px;
  height: 14px;
  color: #5966e9;
}
.tools-shell .catalog-main .api-use {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  color: #738297;
  font-size: 12px;
}
.tools-shell .catalog-action {
  min-width: 116px;
  align-self: center !important;
}
.tools-shell .catalog-action .button {
  min-width: 116px;
  height: 42px;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(35, 44, 122, .12);
}
@media (max-width: 900px) {
  .tools-shell .catalog-card {
    grid-template-columns: 116px minmax(0, 1fr) !important;
    gap: 16px;
    min-height: 176px;
    padding: 18px 18px 18px 28px;
  }
  .tools-shell .catalog-art {
    width: 116px;
    min-width: 116px;
    height: 116px;
    min-height: 116px;
  }
  .tools-shell .catalog-card .tool-visual {
    width: 96px;
    height: 96px;
  }
  .tools-shell .catalog-card .orbital {
    width: 88px;
    height: 88px;
  }
}
@media (max-width: 650px) {
  .tools-shell .catalog-card {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    padding: 16px 16px 16px 24px;
  }
  .tools-shell .catalog-art {
    width: 100%;
    min-width: 0;
    height: 124px;
    min-height: 124px;
  }
  .tools-shell .catalog-card .tool-visual {
    width: 100px;
    height: 100px;
  }
  .tools-shell .catalog-card .orbital {
    width: 92px;
    height: 92px;
  }
  .tools-shell .catalog-main li {
    width: 100%;
    justify-content: flex-start;
  }
}

/* --------------------------------------------------------------------------
   D. 研究工具页插画替换 v17
   使用用户确认的极简静态插画，替换原 CSS 程序化图形。
   -------------------------------------------------------------------------- */
.tools-shell .catalog-art {
  overflow: hidden;
}
.tools-shell .tool-visual.image-tool {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.tools-shell .tool-visual.image-tool img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  filter: saturate(.98) contrast(1.01);
}
.tools-shell .catalog-card .tool-visual.image-tool,
.tools-shell .catalog-card .tool-visual.image-tool img {
  width: 112px;
  height: 164px;
}
@media (max-width: 900px) {
  .tools-shell .catalog-card .tool-visual.image-tool,
  .tools-shell .catalog-card .tool-visual.image-tool img {
    width: 96px;
    height: 142px;
  }
}
@media (max-width: 650px) {
  .tools-shell .catalog-card .tool-visual.image-tool,
  .tools-shell .catalog-card .tool-visual.image-tool img {
    width: 100%;
    height: 124px;
  }
}

/* --------------------------------------------------------------------------
   E. 工具插画尺寸匹配修正 v18
   同时修正 home-shell feature-card 与 tools-shell catalog-card 的插画适配。
   -------------------------------------------------------------------------- */
.home-shell .feature-art,
.tools-shell .catalog-art {
  overflow: hidden;
}
.home-shell .feature-art .tool-visual.image-tool,
.tools-shell .catalog-art .tool-visual.image-tool {
  width: 100% !important;
  height: 100% !important;
  padding: 10px !important;
  box-sizing: border-box;
  display: grid;
  place-items: center;
}
.home-shell .feature-art .tool-visual.image-tool img,
.tools-shell .catalog-art .tool-visual.image-tool img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
  border-radius: 14px;
}
