/* ============ V1.0.0 b9：访视日历 / CRF 一览质疑标记 / 顶栏用户区 / 切换浮层 ============ */

/* ---------- 顶栏用户区：恢复头像圆点，避免「景 景俊义」重复字观感 ---------- */
.v52-pnav .pn-drop > a.pn-user { display: inline-flex; align-items: center; gap: 7px; }
.v52-pnav .pn-drop > a.pn-user > i {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 27px;
  background: linear-gradient(135deg, #16bfae, #0fa796); color: #fff;
  font-style: normal; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0;
}
.v52-pnav .pn-drop > a.pn-user > b {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 27px;
  background: linear-gradient(135deg, #16bfae, #0fa796); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600;
}
@media (max-width: 767px) {
  .v52-pnav .pn-drop > a.pn-user > i,
  .v52-pnav .pn-drop > a.pn-user > b { width: 30px; height: 30px; flex-basis: 30px; }
}

/* ---------- DM 统计卡：可点击进入对应质疑视图 ---------- */
.v97-qcards .v95-card[data-qf] { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.v97-qcards .v95-card[data-qf]:hover { border-color: #b9e6da; box-shadow: 0 6px 18px rgba(16, 90, 80, .10); transform: translateY(-1px); }
.v97-qcards .v95-card[data-qf]:focus-visible { outline: 2px solid #18c1ab; outline-offset: 2px; }
.v97-qcards .v95-card i { display: block; font-style: normal; font-size: 11px; color: #93a7b4; margin-top: 3px; }

/* ---------- 研究参与者切换：居中浮层，避免嵌在卡片里被裁切、点不到 ---------- */
.v66-picker-mask {
  position: fixed !important; inset: 0 !important; z-index: 9200 !important;
  background: rgba(16, 34, 43, .38) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 20px !important;
}
.v66-picker-mask .v66-picker {
  width: 760px !important; max-width: 96vw !important; max-height: 88vh !important;
  margin: 0 !important; position: relative !important; top: auto !important; left: auto !important;
  border-radius: 14px !important; box-shadow: 0 24px 70px rgba(12, 40, 48, .28) !important;
  display: flex !important; flex-direction: column !important; overflow: hidden !important;
}
.v66-picker-mask .v66-picker-list { overflow: auto !important; max-height: 52vh !important; }
.v66-picker-mask .v66-pick-row { cursor: pointer; }

/* 受试者头部的搜索下拉：抬高层级并允许溢出，避免被下方卡片盖住导致点不动 */
.sub-hero { overflow: visible !important; }
.v80-pick-pop { z-index: 3000 !important; }
.v80-pick-item { cursor: pointer; }

/* ---------- 访视日程：视图切换 / 状态色 / 日历 ---------- */
.v97-sch-tabs { display: inline-flex; gap: 6px; background: #eef4f6; border-radius: 9px; padding: 3px; margin-bottom: 12px; }
.v97-sch-tabs a {
  display: inline-block; padding: 6px 15px; border-radius: 7px; font-size: 12.5px;
  color: #55707c; text-decoration: none;
}
.v97-sch-tabs a.on { background: #fff; color: #0d7f6c; font-weight: 600; box-shadow: 0 1px 3px rgba(16, 60, 60, .12); }

.v97-st { display: inline-block; font-size: 11.5px; border-radius: 6px; padding: 2px 9px; white-space: nowrap; }
.v97-st.todo { background: #fdf6e7; color: #a9791a; }
.v97-st.live { background: #e6f8f1; color: #0b7d5e; border: 1px solid #b7e7d7; font-weight: 600; }
.v97-st.near { background: #fdecec; color: #b3261e; border: 1px solid #f6c9c6; font-weight: 600; }
.v97-st.over { background: #fde8e8; color: #a11414; }
.v97-st.done { background: #eef3f7; color: #5b7284; }

.v97-today {
  border: 1px solid #bfe9dc; background: linear-gradient(180deg, #f2fcf8, #fff);
  border-radius: 12px; margin-bottom: 14px; overflow: hidden;
}
.v97-today-h { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid #e3f4ee; }
.v97-today-h b { font-size: 13.5px; color: #0b6b5b; }
.v97-today-h span { font-size: 11.5px; color: #7a9a93; }
.v97-today-h .sp { flex: 1; }
.v97-today-empty { padding: 14px; font-size: 12.5px; color: #8aa3a0; }

.v97-scr { font-size: 11px; color: #7c93a3; display: block; margin-top: 1px; }
.v97-scr b { color: #2b4354; font-size: 12.5px; }

/* 日历 */
.v97-cal-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.v97-cal-bar b { font-size: 15px; color: #27414f; }
.v97-cal-bar .sp { flex: 1; }
.v97-cal-bar .btn-o { padding: 5px 12px; font-size: 12.5px; }
.v97-cal { border: 1px solid #e2ecef; border-radius: 12px; background: #fff; overflow: hidden; }
.v97-cal-hd, .v97-cal-bd { display: grid; grid-template-columns: repeat(7, 1fr); }
.v97-cal-hd div { padding: 8px 0; text-align: center; font-size: 11.5px; color: #7d94a4; background: #f7fbfb; border-bottom: 1px solid #eef4f6; }
.v97-cal-cell {
  min-height: 92px; border-right: 1px solid #f1f5f7; border-bottom: 1px solid #f1f5f7;
  padding: 6px 7px; cursor: pointer; background: #fff; position: relative;
}
.v97-cal-cell:nth-child(7n) { border-right: 0; }
.v97-cal-cell.out { background: #fafcfc; color: #b9c8d1; cursor: default; }
.v97-cal-cell.today { box-shadow: inset 0 0 0 2px #18c1ab; }
.v97-cal-cell.sel { background: #f0fbf8; }
.v97-cal-cell .d { font-size: 12px; color: #45606f; font-weight: 600; }
.v97-cal-cell.out .d { color: #c3cfd7; }
.v97-cal-cell .num {
  position: absolute; right: 6px; top: 5px; font-size: 10.5px; border-radius: 9px;
  padding: 0 6px; line-height: 16px; background: #eef4f7; color: #5a7283;
}
.v97-cal-cell .num.red { background: #fde8e8; color: #a11414; }
.v97-cal-cell .num.green { background: #e6f8f1; color: #0b7d5e; }
.v97-cal-ev { margin-top: 4px; font-size: 10.5px; line-height: 1.45; color: #4f6b7a; }
.v97-cal-ev em { font-style: normal; color: #8aa0ad; }
.v97-cal-ev .r { color: #b3261e; }
.v97-cal-ev .g { color: #0b7d5e; }
.v97-cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: #7c93a3; }
.v97-cal-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

/* ---------- CRF 一览：参照研究参与者列表 ---------- */
.v97-crf-tbl { table-layout: auto; }
.v97-crf-tbl th { white-space: nowrap; }
.v97-crf-tbl td { vertical-align: middle; }
.v97-srow { cursor: pointer; }
.v97-srow:hover { background: #f7fbfb; }
.v97-srow.on { background: #f0fbf8; }
.v97-caret { display: inline-block; width: 16px; color: #7c93a3; transition: transform .15s; }
.v97-srow.on .v97-caret { transform: rotate(90deg); color: #0d7f6c; }
.v97-chip {
  display: inline-block; font-size: 11px; border-radius: 5px; padding: 1px 7px; margin: 1px 4px 1px 0;
  background: #f1f6f8; color: #5d7789; white-space: nowrap;
}
.v97-chip.q { background: #fdecec; color: #b3261e; }
.v97-chip.done { background: #eef4f8; color: #5b7284; }
.v97-detail > td { background: #fbfdfd; padding: 0 !important; }
.v97-detail-in { padding: 10px 14px 14px; }
.v97-fld { width: 100%; border-collapse: collapse; }
.v97-fld th {
  text-align: left; font-size: 11px; color: #849aa8; font-weight: 500;
  padding: 5px 8px; border-bottom: 1px solid #e9f0f2; background: #f5fafa;
}
.v97-fld td { font-size: 12.5px; color: #33495a; padding: 6px 8px; border-bottom: 1px solid #f1f5f7; }
.v97-fld tr:last-child td { border-bottom: 0; }
.v97-path { font-size: 10.5px; color: #9aafbb; }

/* 质疑标记：? 红 / ? 绿 / ☺ 绿 */
.v97-qm {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-width: 26px; height: 26px; padding: 0 5px; border-radius: 8px;
  font-size: 15px; font-weight: 800; text-decoration: none; line-height: 1; border: 1px solid transparent;
}
.v97-qm.open { color: #fff; background: #e0413b; box-shadow: 0 2px 6px rgba(224, 65, 59, .28); }
.v97-qm.ans { color: #0b7d5e; background: #e6f8f1; border-color: #a9e3d1; }
.v97-qm.closed { color: #0b7d5e; background: #eefaf5; font-size: 14px; }
.v97-qm i { font-style: normal; font-size: 10px; font-weight: 700; }
.v97-qm:hover { filter: brightness(.96); }
.v97-qempty { color: #b6c6cf; font-size: 12px; }

.v97-qlist { display: flex; flex-direction: column; gap: 10px; max-height: 42vh; overflow: auto; }
.v97-qcard { border: 1px solid #e6eef2; border-radius: 10px; padding: 10px 12px; background: #fff; }
.v97-qcard-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.v97-qcard-h b { font-size: 12.5px; color: #2b4354; }
.v97-qcard-h .sp { flex: 1; }
.v97-qcard .q { font-size: 13px; color: #263b4a; line-height: 1.65; }
.v97-qcard .a { margin-top: 6px; font-size: 12.5px; color: #0b7d5e; background: #f2fbf8; border-radius: 7px; padding: 6px 8px; }
.v97-qcard .m { margin-top: 6px; font-size: 11px; color: #93a7b4; }
.v97-reply { display: flex; gap: 8px; margin-top: 8px; }
.v97-reply input { flex: 1; height: 32px; border: 1px solid #dfe9ec; border-radius: 7px; padding: 0 10px; font-size: 12.5px; }
.v97-tagst { font-size: 11px; border-radius: 5px; padding: 2px 8px; }
.v97-tagst.open { background: #fdecec; color: #b3261e; }
.v97-tagst.ans { background: #fdf6e7; color: #a9791a; }
.v97-tagst.closed { background: #e9f7f2; color: #0b7d5e; }

.v97-deny { max-width: 640px; margin: 40px auto; background: #fff; border: 1px solid #e6eef2; border-radius: 14px; padding: 26px 28px; }
.v97-deny h3 { margin: 0 0 6px; font-size: 16px; color: #27414f; }
.v97-deny p { margin: 0; font-size: 13px; color: #6b8292; line-height: 1.75; }
.v97-deny .acts { display: flex; gap: 10px; margin-top: 16px; }

@media (max-width: 767px) {
  .v97-cal-cell { min-height: 64px; padding: 4px; }
  .v97-cal-ev { display: none; }
  .v97-cal-cell .num { right: 3px; top: 3px; font-size: 9.5px; padding: 0 4px; }
  .v97-crf-tbl th:nth-child(5), .v97-crf-tbl td:nth-child(5) { display: none; }
}
