/* ============================================================
   外包需求（/demand/）v2
   版式参照 yuanjisong.com/job：顶部 chip 筛选 + 单列需求卡 + 右侧 CTA
   命名前缀 .dm-，与既有模块隔离
   ============================================================ */

.dm-page { background: #f5f6f8; padding: 12px 0 64px; color: #1f2937; }
/* 容器：复用站点唯一契约 modern.css 的 --container-max（桌面 1250px，
   1180–1339 视口自动降为 min(1250px,94vw)），⛔ 不再自设 1200px / 20px gutter，
   否则与 header / 其它模块的 1250px 左右边界错位。 */
.dm-container {
  width: 100%;
  max-width: var(--container-max, 1250px);
  margin-inline: auto;
  padding-inline: 0;
  box-sizing: border-box;
  text-align: left;
}
/* 表单/提示页：容器仍占满站点宽度，仅内部内容栏收窄居中（不再用内联
   style 覆盖 .dm-container 的 max-width，避免与头部左右边界错位）。 */
.dm-narrow { max-width: 920px; margin-inline: auto; box-sizing: border-box; }
.dm-narrow--sm { max-width: 720px; }

/* ---------- 面包屑 ---------- */
.dm-crumb { font-size: 13px; color: #9aa1b1; padding: 8px 2px 14px; }
.dm-crumb a { color: #9aa1b1; text-decoration: none; }
.dm-crumb a:hover { color: #423dff; }
.dm-crumb span { margin: 0 6px; }

/* ---------- 布局 ---------- */
.dm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dm-side { min-width: 0; }   /* 栅格子项不允许被内部宽元素撑开 */
@media (max-width: 980px) { .dm-layout { grid-template-columns: 1fr; } }

/* ---------- 筛选卡 ---------- */
.dm-filter { background: #fff; border-radius: 8px; padding: 4px 20px; margin-bottom: 14px; }
.dm-filter__row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #eef0f5; }
.dm-filter__row--last { border-bottom: 0; flex-wrap: wrap; }
.dm-filter__label { flex: 0 0 64px; font-size: 13px; color: #9aa1b1; line-height: 26px; }
.dm-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; flex: 1; min-width: 0; }
.dm-chip { display: inline-block; height: 26px; line-height: 26px; padding: 0 10px; border-radius: 4px; font-size: 13px; color: #4b5563; text-decoration: none; white-space: nowrap; }
.dm-chip:hover { color: #423dff; background: #f5f4ff; }
.dm-chip.is-active { color: #fff; background: #423dff; }
.dm-chip--sm { height: 24px; line-height: 24px; font-size: 12.5px; color: #6b7280; }

.dm-search { display: flex; margin-left: auto; }
.dm-search input[type=text] { width: 220px; height: 32px; border: 1px solid #e3e6ef; border-right: 0; border-radius: 4px 0 0 4px; padding: 0 12px; font-size: 13px; outline: none; }
.dm-search input[type=text]:focus { border-color: #423dff; }
.dm-search button { height: 32px; padding: 0 16px; border: 0; border-radius: 0 4px 4px 0; background: #423dff; color: #fff; font-size: 13px; cursor: pointer; }
.dm-search button:hover { background: #342fe0; }

/* ---------- 列表 ---------- */
.dm-listhead { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #6b7280; padding: 2px 2px 10px; }
.dm-listhead b { color: #1f2937; }
.dm-listhead__keyword a { margin-left: 8px; color: #423dff; text-decoration: none; }

.dm-card { background: #fff; border-radius: 8px; padding: 20px 22px; margin-bottom: 12px; transition: box-shadow .18s ease, transform .18s ease; }
.dm-card:hover { box-shadow: 0 6px 20px rgba(31, 41, 55, .07); }
.dm-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dm-card__title { font-size: 18px; line-height: 1.45; font-weight: 700; margin: 0; }
.dm-card__title a { color: #1f2937; text-decoration: none; }
.dm-card__title a:hover { color: #423dff; }
.dm-card__quotes { flex: 0 0 auto; font-size: 13px; color: #9aa1b1; padding-top: 4px; }

.dm-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.dm-tag { display: inline-block; font-size: 12px; line-height: 20px; padding: 1px 8px; border-radius: 4px; background: #f2f4f7; color: #667085; }
.dm-tag--ask { background: #eef1ff; color: #423dff; }
.dm-tag--fix { background: #fff4e8; color: #c2410c; }
.dm-tag--ghost { background: transparent; border: 1px solid #eaecf3; color: #9aa1b1; }

.dm-card__desc { font-size: 14px; line-height: 1.75; color: #6b7280; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.dm-card__price { font-size: 22px; font-weight: 700; color: #e5484d; line-height: 1.2; }
.dm-card__price small { font-size: 13px; font-weight: 400; color: #9aa1b1; margin-right: 6px; }
.dm-card__price em { font-style: normal; font-size: 13px; font-weight: 400; color: #9aa1b1; margin-left: 2px; }

.dm-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px dashed #eef0f5; margin-top: 16px; padding-top: 14px; }
.dm-card__owner { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dm-card__owner-name { font-size: 13px; color: #374151; font-weight: 600; }
.dm-card__owner-sub { font-size: 12px; color: #9aa1b1; margin-top: 2px; }
.dm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #eef1ff; color: #423dff; font-weight: 700; font-size: 14px; }
.dm-avatar--sm { width: 32px; height: 32px; font-size: 13px; }

/* ---------- 按钮 ---------- */
/* 站点无全局 box-sizing:border-box（modern.css 明确「不用通配」）：
   带 width:100% 的 .dm-btn 若用默认 content-box，padding 20px×2 + border 1px×2
   会额外撑出 42px → 溢出侧栏白卡。此处按元素显式声明，一次性覆盖
   .dm-sidecard__btn 与详情页内联 style="width:100%" 的全部按钮。 */
.dm-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 40px; padding: 0 20px; border-radius: 4px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: .16s ease; }
.dm-btn--primary { background: #423dff; color: #fff; }
.dm-btn--primary:hover { background: #342fe0; }
.dm-btn--ghost { background: #fff; color: #423dff; border-color: #d9d6ff; }
.dm-btn--ghost:hover { border-color: #423dff; }
.dm-btn--sm { height: 34px; padding: 0 18px; font-size: 13px; border-radius: 4px; }
.dm-btn--disabled { background: #f2f4f7; color: #9aa1b1; cursor: not-allowed; }
.dm-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 空态 / 分页 ---------- */
.dm-empty { background: #fff; border-radius: 8px; padding: 64px 20px; text-align: center; }
.dm-empty__title { font-size: 16px; color: #374151; margin-bottom: 6px; }
.dm-empty__desc { font-size: 13px; color: #9aa1b1; margin-bottom: 18px; }
.dm-pager { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.dm-pager a, .dm-pager span { min-width: 34px; height: 34px; line-height: 32px; text-align: center; padding: 0 8px; border: 1px solid #e3e6ef; border-radius: 4px; background: #fff; color: #4b5563; text-decoration: none; font-size: 13px; }
.dm-pager span.is-current { background: #423dff; border-color: #423dff; color: #fff; }

/* ---------- 右侧 ---------- */
.dm-sidecard { background: #fff; border-radius: 8px; padding: 18px 20px; margin-bottom: 12px; }
.dm-sidecard--cta { border: 1px solid #e2e0ff; }
.dm-sidecard__title { font-size: 15px; font-weight: 700; color: #1f2937; margin-bottom: 8px; }
.dm-sidecard__desc { font-size: 13px; line-height: 1.7; color: #6b7280; margin: 0 0 14px; }
.dm-sidecard__btn { width: 100%; }
.dm-sidecard__note { font-size: 12px; color: #9aa1b1; text-align: center; margin-top: 10px; line-height: 1.6; }
.dm-sidecard__links { display: flex; flex-direction: column; gap: 10px; }
.dm-sidecard__links a { font-size: 13.5px; color: #4b5563; text-decoration: none; }
.dm-sidecard__links a:hover { color: #423dff; }
.dm-sidecard__list { margin: 0; padding-left: 18px; }
.dm-sidecard__list li { font-size: 13px; line-height: 1.9; color: #6b7280; }

/* ---------- 详情 ---------- */
.dm-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .dm-detail { grid-template-columns: 1fr; } }
.dm-panel { background: #fff; border-radius: 8px; padding: 26px 28px; }
.dm-panel + .dm-panel { margin-top: 12px; }
.dm-detail__title { font-size: 26px; line-height: 1.35; font-weight: 700; margin: 8px 0 12px; }
.dm-detail__meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #9aa1b1; padding-bottom: 16px; border-bottom: 1px solid #f0f2f7; margin-bottom: 18px; }
.dm-detail__price { font-size: 30px; font-weight: 700; color: #e5484d; }
.dm-detail__price small { font-size: 14px; color: #9aa1b1; font-weight: 400; margin-right: 6px; }
.dm-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 18px 0 6px; }
.dm-kv__item { font-size: 14px; color: #4b5563; }
.dm-kv__item span { color: #9aa1b1; margin-right: 8px; }
.dm-body { font-size: 15px; line-height: 1.9; color: #374151; word-break: break-word; }
.dm-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.dm-gallery img { width: 128px; height: 128px; object-fit: cover; border-radius: 6px; border: 1px solid #eaecf3; }

.dm-aside__owner { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.dm-aside__name { font-weight: 600; font-size: 14px; }
.dm-aside__sub { font-size: 12px; color: #9aa1b1; margin-top: 2px; }
.dm-aside__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.dm-hint { font-size: 12px; color: #9aa1b1; line-height: 1.7; margin-top: 12px; }

/* ---------- 表单 ---------- */
.dm-form { background: #fff; border-radius: 8px; padding: 28px; margin-top: 16px; }
.dm-field { margin-bottom: 22px; }
.dm-field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.dm-field .req { color: #e5484d; margin-left: 2px; }
.dm-field input[type=text], .dm-field input[type=number], .dm-field select, .dm-field textarea {
  width: 100%; border: 1px solid #e3e6ef; border-radius: 4px; padding: 10px 12px; font-size: 14px; background: #fff; color: #1f2937; box-sizing: border-box;
}
.dm-field input:focus, .dm-field select:focus, .dm-field textarea:focus { border-color: #423dff; outline: none; }
.dm-field textarea { min-height: 170px; resize: vertical; line-height: 1.8; }
.dm-field__tip { font-size: 12px; color: #9aa1b1; margin-top: 6px; }
.dm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .dm-row { grid-template-columns: 1fr; } }
.dm-radio { display: flex; gap: 10px; flex-wrap: wrap; }
.dm-radio label { display: flex; gap: 8px; align-items: center; border: 1px solid #e3e6ef; border-radius: 4px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.dm-radio label:hover { border-color: #c9c5ff; }
.dm-alert { border-radius: 4px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.dm-alert--err { background: #fff1f0; color: #b42318; border: 1px solid #ffd5d2; }
.dm-alert--ok { background: #effaf3; color: #067647; border: 1px solid #c7f0d8; }
.dm-alert--info { background: #eff4ff; color: #3538cd; border: 1px solid #d5e0ff; }
.dm-fee-bar { background: #f8f9fd; border: 1px solid #eaecf3; border-radius: 4px; padding: 12px 16px; font-size: 14px; color: #4b5563; margin-bottom: 20px; }
.dm-fee-bar b { color: #e5484d; font-size: 18px; }
.dm-submit { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.dm-section-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }

/* ---------- 支付 ---------- */
.dm-pay { max-width: 720px; margin: 0 auto; }
.dm-pay__amount { font-size: 40px; font-weight: 700; color: #e5484d; text-align: center; margin: 10px 0 4px; }
.dm-pay__sub { text-align: center; color: #9aa1b1; font-size: 13px; margin-bottom: 22px; }
.dm-pay__methods { display: grid; gap: 10px; }
.dm-pay__method { border: 1px solid #e3e6ef; border-radius: 6px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.dm-pay__method strong { display: block; font-size: 15px; }
.dm-pay__method em { font-style: normal; font-size: 12px; color: #9aa1b1; }

/* ---------- 表格（用户中心/后台共用） ---------- */
.dm-table { width: 100%; border-collapse: collapse; background: #fff; }
.dm-table th, .dm-table td { padding: 12px 10px; border-bottom: 1px solid #f0f2f7; font-size: 14px; text-align: left; vertical-align: middle; }
.dm-table th { color: #9aa1b1; font-weight: 600; font-size: 13px; background: #fafbfe; }
.dm-badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: #f2f4f7; color: #667085; }
.dm-badge--wait { background: #fff7e6; color: #b54708; }
.dm-badge--ok { background: #ecfdf3; color: #067647; }
.dm-badge--bad { background: #fef3f2; color: #b42318; }
.dm-badge--gray { background: #f2f4f7; color: #667085; }
