/* 运营 / 行政 / 人事 / 财务 四模块样式
 *
 * 共用一套卡片列表，因为四个模块长得几乎一样：
 * 标题 + 几个标签 + 一行元信息 + 右侧状态。分开写四套纯属浪费。
 */

/* ---------- 工具条 ---------- */
.biz-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.biz-toolbar .input {
  flex: 1 1 200px;
  min-width: 0;
}
.biz-toolbar .seg {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* ---------- 列表 ---------- */
.biz-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biz-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: start;
}
.biz-card:hover { border-color: var(--line-strong); }
.biz-card.dim { opacity: .62; }

.biz-card-main { min-width: 0; }

.biz-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.35;
  word-break: break-word;
}
.biz-title .biz-weak { font-weight: 400; color: var(--muted); font-size: 13px; }

.biz-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.biz-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  line-height: 1.6;
}
.biz-meta b { color: var(--text); font-weight: 600; }

.biz-detail {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 8px 10px;
  background: var(--bg-soft);
  border-radius: 8px;
  border-left: 3px solid var(--line-strong);
}

.biz-note {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 7px 10px;
  border-radius: 8px;
  word-break: break-word;
}
.biz-note.warn { background: #fff7e6; color: #8a5a00; border: 1px solid #ffd591; }
.biz-note.danger { background: #fff1f0; color: #a8071a; border: 1px solid #ffa39e; }
.biz-note.ok { background: #f6ffed; color: #237804; border: 1px solid #b7eb8f; }

.biz-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.biz-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  white-space: nowrap;
}
.tag.gray   { background: #f5f5f5; color: #595959; border-color: #d9d9d9; }
.tag.green  { background: #f6ffed; color: #237804; border-color: #b7eb8f; }
.tag.amber  { background: #fffbe6; color: #ad6800; border-color: #ffe58f; }
.tag.red    { background: #fff1f0; color: #a8071a; border-color: #ffa39e; }
.tag.blue   { background: #e6f7ff; color: #096dd9; border-color: #91d5ff; }
.tag.coral  { background: #fff2e8; color: #d4380d; border-color: #ffbb96; }
.tag.purple { background: #f9f0ff; color: #531dab; border-color: #d3adf7; }

/* ---------- 顶部汇总 ---------- */
.ops-sum, .fi-sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sum-cell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px 12px;
}
.sum-cell .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.sum-cell .v {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.sum-cell .v.sm { font-size: 15px; }

/* ---------- 表单弹层 ---------- */
.biz-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, .34);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
}
.biz-modal.hidden { display: none; }

.biz-dialog {
  width: min(560px, 100%);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.biz-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.biz-dialog-head h3 { margin: 0; font-size: 16px; }
.biz-dialog-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.biz-dialog-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  background: var(--bg-soft);
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.field .hint-sm { margin-top: -1px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

.biz-dialog textarea.input {
  min-height: 84px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

/* 可见范围单选卡 */
.scope-list { display: flex; flex-direction: column; gap: 8px; }
.scope-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: var(--panel);
}
.scope-opt:hover { border-color: var(--line-strong); }
.scope-opt.on { border-color: var(--brand); background: var(--brand-soft, #f0f7ff); }
.scope-opt input { margin-top: 3px; flex: none; }
.scope-opt .t { font-size: 13px; font-weight: 600; }
.scope-opt .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 指定人勾选 */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
}
.pick-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 6px;
  min-width: 0;
}
.pick-item:hover { background: var(--bg-soft); }
.pick-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item .rl { color: var(--muted); font-size: 11px; flex: none; }

/* 空态 */
.biz-empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

/* 窄屏：状态列折到下面，别挤成一条 */
@media (max-width: 640px) {
  .biz-card { grid-template-columns: minmax(0, 1fr); }
  .biz-card-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .biz-dialog { width: 100%; }
  .biz-modal { padding: 16px 10px; }
}
