/* ============================================================================
   components.css —— 公共组件层（L3）
   ----------------------------------------------------------------------------
   定位：介于 app.css（token + 全局基础）与各页样式之间。
   引入顺序铁律：app.css → components.css → list-page.css / legal-doc.css → 页面内联 style
   —— 页面内联 style 必须最后，才能覆盖组件默认值。

   铁律：
   1. 本文件只允许引用 app.css 的 token 变量，不写任何 hex（除压在主色上的白字 #fff）。
   2. 组件类一律 c- 前缀，修饰符用 --，内部元素用 __。
   3. 组件只规定「骨架 + 规格」，不做页面级布局（宽度、栅格、单页特化留给页面）。
   4. 迁移方式为「叠加」：<div class="c-card biz-card">，原类保留差异，
      只把 background / border / border-radius / transition 四项骨架收进组件。
      这样 JS 里的类名选择器不会失效，可逐页回滚。
   5. 不预留无落点的类 —— 探针 #10 会把「CSS 里写了但页面没用」判为失败。
      因此本文件只收已经真实迁移的组件，未迁移的宁可先不写。

   2026-11-19 建立（字号/行高/字重/间距统一之后）
   ========================================================================== */

/* ── 1. c-card 卡片骨架 ─────────────────────────────────────────────────────
   只提供背景、边框、圆角、过渡四项；padding 与内部结构由页面决定。
   圆角默认 --r（10px），--sm（6px）/--lg（12px）两档修饰。
   默认不带 hover，需要反馈的加 --hover（阴影+描边）或 --raise（加位移）。
   已迁移：biz-card / show-item / fc-card / doc-card / tip-card / yewu-card */
.c-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.c-card--sm {
  border-radius: var(--r-sm);
}
.c-card--lg {
  border-radius: var(--r-lg);
}
.c-card--clip {
  overflow: hidden;
}
.c-card--hover:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}
.c-card--raise:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
  transform: translateY(-2px);
}
/* 卡片内部文字规格：所有卡片的标题/描述同一层级，不再各页自定 */
.c-card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--text);
}
.c-card__desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text2);
}

/* ── 2. c-btn 按钮 ──────────────────────────────────────────────────────────
   本站此前没有全局按钮骨架，各页各自造（fuwu 的 .btn 甚至只定义了颜色）。
   本组件是第一个完整骨架：主/幽灵两档配色 + 小号/块级两个尺寸修饰。
   已迁移：fuwu 的 btn-main / btn-ghost、wode 的 btn-submit */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-10) var(--sp-24);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-none);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.c-btn--main {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}
.c-btn--main:hover,
.c-btn--main:active {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.c-btn--ghost {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}
.c-btn--ghost:hover,
.c-btn--ghost:active {
  background: var(--brand-light);
  color: var(--brand);
}
.c-btn--sm {
  padding: var(--sp-6) var(--sp-14);
  font-size: var(--fs-sm);
}
.c-btn--block {
  width: 100%;
}
.c-btn:disabled,
.c-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

/* ── 3. c-field 表单三件套 ──────────────────────────────────────────────────
   标签 + 输入 + 错误提示。替代 wode 的 form-group / form-input / form-msg。
   输入框字号取 16（--fs-base）：低于 16 时 iOS Safari 聚焦会自动放大页面。
   已迁移：wode.html 修改密码表单 */
.c-field {
  display: block;
  margin-bottom: var(--sp-14);
}
.c-field__label {
  display: block;
  margin-bottom: var(--sp-6);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  color: var(--text2);
}
.c-field__input {
  display: block;
  width: 100%;
  padding: var(--sp-10) var(--sp-12);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  transition: border-color .2s;
  outline: none;
}
.c-field__input:focus {
  border-color: var(--brand);
}
.c-field__input::placeholder {
  color: var(--text3);
}
.c-field__err {
  display: block;
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--danger-deep);
}

/* ── 4. c-row 列表行 ────────────────────────────────────────────────────────
   左内容右动作，替代 wode 的 list-item。
   不设 __label / __value 子元素：现有列表行是「标题+副标题 | 状态标签」，
   与 label/value 的键值对结构不同，强套会改结构。
   已迁移：wode.html 客户中心列表 */
.c-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-12);
  padding: var(--sp-10) 0;
  border-bottom: 1px solid var(--border-soft);
}
.c-row:last-child {
  border-bottom: none;
}

/* ── 5. c-tag 标签 ──────────────────────────────────────────────────────────
   四档语义色，全部用既有 token。文字压在淡底上，必须用深一档的前景色
   （--brand-deep / --danger-deep），与 wode 现有 status-* 三档同值。
   已迁移：wode 的 status-tag、xiangqing 的 dt-tag */
.c-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-8);
  border-radius: var(--r-xs);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  white-space: nowrap;
}
.c-tag--brand {
  background: var(--brand-light);
  color: var(--brand-deep);
}
.c-tag--success {
  background: var(--success-bg);
  color: var(--success);
}
.c-tag--warn {
  background: var(--warn-bg);
  color: var(--warn);
}

/* ── 6. c-price 价格 ────────────────────────────────────────────────────────
   数字 + 单位。默认 20（卡片）。字重用 --fw-heavy（800）—— 全站只允许「数字强调」和 logo 用 800。
   已迁移：fuwu 的 yewu-card-price。
   2026-11-19：xiangqing.html 删除、详情页改由网关 SSR 渲染，--lg（32 大价格）与 __old（划线原价）
   两个修饰类零使用已删，需要大价格样式时随用随加。 */
.c-price {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-lg);
  font-weight: var(--fw-heavy);
  line-height: var(--lh-none);
  color: var(--danger);
  white-space: nowrap;
}
.c-price__unit {
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  color: var(--text2);
}

/* ── 7. c-empty 空态 ────────────────────────────────────────────────────────
   收编 .empty-state / .site-empty / .empty 三处副本。
   gw-empty / parts-empty 是 grid 单元格内的单行提示，结构不同，不迁移。
   已迁移：wode.html 客户中心空态、app.css 全局 empty-state */
.c-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  padding: var(--sp-32) var(--sp-16);
  text-align: center;
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  color: var(--text3);
}

/* 手机端卡片标题降一档（2026-11-20）
   原因见 app.css 末尾「手机端标题层级」：手机上区块标题被压到 20，
   卡片标题若仍是 20，两层同大、层级归零。降到 16 与正文同号，靠 600 字重区分。 */
@media (max-width: 600px) {
  .c-card__title {
    font-size: var(--fs-base);
  }
}
