/* ==========================================================================
   列表卡片 · 参考图版式
   适用：患者列表 / 电子病历列表 / 电子处方列表
   结构：彩色方图标 + 加粗标题 + 状态胶囊 ｜ 左标签右值信息行 ｜ 时间页脚
   说明：本文件最后加载，仅作用于三个列表容器内的 .rcard，
         不改动问诊页共享患者卡片、打印纸张与其它业务组件。
   ========================================================================== */

#recordList .rcard,
#rxList .rcard,
#patientList .rcard {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #eef1f5);
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(31, 41, 55, .04);
  color: var(--color-text, #1f2329);
  overflow: hidden;
}

/* ---------- 头部：方图标 + 标题 + 状态胶囊 ---------- */
.rcard-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 17px 18px 14px;
}
.rcard-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.rcard-icon .rc-ico {
  display: block;
  width: 24px;
  height: 24px;
}
.rcard--patient .rcard-icon  { background: #eaf2ff; color: #3b7bf7; }
.rcard--record .rcard-icon   { background: #e8f8f0; color: #0f9d63; }
.rcard--prescription .rcard-icon { background: #fff1e8; color: #f9733d; }

.rcard-heading {
  flex: 1 1 auto;
  min-width: 0;
}
.rcard-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text, #1f2329);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rcard-heading h3 small {
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 400;
  color: #8a9099;
}

.rc-status {
  flex: 0 0 auto;
  padding: 5px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}
.rc-status.is-green  { color: #00a870; background: #f2fbf7; border-color: #b8e8d4; }
.rc-status.is-red    { color: #f53f3f; background: #fff5f4; border-color: #ffcfc9; }
.rc-status.is-orange { color: #d97000; background: #fff8ec; border-color: #ffdfb0; }
.rc-status.is-blue   { color: #3b7bf7; background: #f3f7ff; border-color: #c9dcff; }
.rc-status.is-gray   { color: #86909c; background: #f7f8fa; border-color: #dfe3e9; }

/* ---------- 主体：左标签右值，逐行排列 ---------- */
.rcard-body {
  margin: 0 18px;
  padding: 13px 0 15px;
  border-top: 1px solid rgba(31, 41, 55, .07);
}
.rc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 28px;
  padding: 3px 0;
  font-size: 15px;
  line-height: 1.6;
}
.rc-k {
  flex: 0 0 96px;
  color: #8a9099;
}
.rc-v {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-text, #1f2329);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.reveal-v {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reveal-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a9099;
  cursor: pointer;
}
.reveal-eye .ic,
.reveal-eye .rc-ico {
  width: 16px;
  height: 16px;
}

/* ---------- 页脚：时间 + 操作 / 箭头 ---------- */
.rcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 18px;
  padding: 11px 0 15px;
  border-top: 1px solid rgba(31, 41, 55, .07);
}
.rcard-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #a0a6ae;
  font-size: 13.5px;
}
.rcard-time .rc-ico {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}
.rcard-time > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rcard-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  color: #c2c8d2;
}
.rcard-arrow .rc-ico {
  width: 20px;
  height: 20px;
}
.rcard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.rc-btn {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #dfe3e9;
  border-radius: 999px;
  background: #fff;
  color: #4e5969;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
}
.rc-btn.is-primary {
  background: #3b7bf7;
  border-color: #3b7bf7;
  color: #fff;
}
.rc-btn:active { opacity: .78; }

.rcard.is-clickable { cursor: pointer; }
.rcard.is-clickable:active { background: #fafbfc; }

/* ---------- 窄屏收敛 ---------- */
@media (max-width: 360px) {
  .rcard-head { gap: 10px; min-height: 70px; padding: 15px 14px 12px; }
  .rcard-icon { flex-basis: 40px; width: 40px; height: 40px; border-radius: 10px; }
  .rcard-icon .rc-ico { width: 21px; height: 21px; }
  .rcard-heading h3 { font-size: 16.5px; }
  .rcard-heading h3 small { font-size: 11.5px; margin-left: 5px; }
  .rc-status { padding: 4px 10px; font-size: 12px; }
  .rcard-body, .rcard-foot { margin-left: 14px; margin-right: 14px; }
  .rc-row { font-size: 14px; }
  .rc-k { flex-basis: 84px; }
  .rcard-time { font-size: 12.5px; }
  .rc-btn { min-height: 30px; padding: 0 10px; font-size: 12px; }
}
