/* 岗位日清：沿用 B01 黑白灰、白卡片、浅边框与克制异常色。
 * 列表 = 全部「日清记录」；异常记录使用轻红色左边框/浅红背景/红标签，
 * 异常判定只依据服务端 answers[].isAbnormal（不按是/否文字）。 */
#adminPageReports {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.daily-page {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: #25372f;
}

.daily-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.daily-page-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 2px 16px;
}

.daily-page-header--actions {
  justify-content: space-between;
  gap: 16px;
}

.daily-page-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.daily-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-range-select {
  height: 36px;
  min-width: 92px;
  padding: 0 30px 0 12px;
  border: 1px solid #dedee3;
  border-radius: 9px;
  background: #fff;
  color: #2c2c2e;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.daily-new-button {
  height: 36px;
  padding: 0 18px;
  border: 1px solid #25372f;
  border-radius: 9px;
  background: #355944;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.daily-new-button:disabled {
  border-color: #dedee3;
  background: #ededf0;
  color: #77777c;
  cursor: default;
}

/* 管理端布局：左岗位汇总 + 右日清记录 */
.daily-management-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
}

.daily-summary-panel,
.daily-history-panel,
.daily-pending-panel {
  min-width: 0;
  border: 1px solid #e1e1e5;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
}

.daily-summary-panel {
  align-self: start;
  padding: 18px;
}

.daily-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ececef;
}

.daily-summary-head h2,
.daily-history-head h2,
.daily-pending-panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: 0;
}

.daily-summary-tip {
  margin: 10px 0 0;
  color: #9a9aa0;
  font-size: 12px;
  line-height: 1.5;
}

.daily-position-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

.daily-position-row {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #455c4e;
  font-size: 14px;
  cursor: pointer;
}

.daily-position-row strong {
  font-size: 13px;
  font-weight: 600;
  color: #6e6e73;
}

.daily-position-row:hover {
  background: #f4f7f3;
}

.daily-position-row.active {
  border-color: #355944;
  background: #355944;
  color: #fff;
}

.daily-position-row.active strong {
  color: #fff;
}

/* 右/自提交岗位：日清记录面板 */
.daily-history-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.daily-history-panel--page {
  flex: 1;
}

.daily-history-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid #ececef;
}

.daily-history-head p {
  margin: 4px 0 0;
  color: #8e8e93;
  font-size: 12px;
  line-height: 1.4;
}

.daily-history-count {
  flex-shrink: 0;
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf2ec;
  color: #5d5d62;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.daily-history-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 24px 26px;
}

.daily-history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: #9b9ba0;
  font-size: 14px;
}

/* ---- 日清记录卡片（列表） ---- */
.daily-record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
}

.daily-record-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 6px 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e5e5e9;
  border-left: 3px solid transparent;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.daily-record-card:hover {
  border-color: #cfcfd4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.daily-record-card:focus-visible {
  outline: 2px solid #25372f;
  outline-offset: 2px;
}

/* 异常记录：轻红色背景 + 红色左边框（保持简洁，不高饱和大色块） */
.daily-record-card--abnormal {
  border-color: #f0d7d1;
  border-left-color: #c1492e;
  background: #fff7f5;
}

.daily-record-card--abnormal:hover {
  border-color: #e6c2ba;
}

.daily-record-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.daily-record-date strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #25372f;
}

.daily-record-date span {
  color: #8e8e93;
  font-size: 12px;
}

.daily-record-content {
  min-width: 0;
}

.daily-record-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-record-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2c2c2e;
  font-size: 14px;
  font-weight: 650;
}

.daily-record-state {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f1f3;
  color: #7c7c82;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.daily-record-state--abnormal {
  background: #fde9e5;
  color: #b84732;
}

.daily-record-meta {
  margin-top: 7px;
  color: #9a9aa0;
  font-size: 12px;
  line-height: 1.5;
}

.daily-pending-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e8e93;
}

.daily-pending-panel h2 {
  color: #8e8e93;
  font-weight: 500;
}

.daily-loading,
.daily-load-error {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8e8e93;
  font-size: 14px;
}

.daily-load-error button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d9d9de;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

/* ---- 弹窗（新增表单 + 详情共用） ---- */
.daily-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.daily-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dadade;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.16);
}

.daily-modal--detail {
  width: min(720px, 100%);
}

.daily-modal-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #ececef;
}

.daily-modal-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0;
}

.daily-modal-head p {
  margin: 5px 0 0;
  color: #8e8e93;
  font-size: 12px;
}

.daily-modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef3ee;
  color: #4d4d52;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* 新增表单 */
.daily-modal-form {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.daily-questions {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 24px 0;
}

.daily-question {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid #ececef;
}

.daily-question legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: #222225;
  font-size: 14px;
  font-weight: 600;
}

.daily-question legend span {
  color: #9a9aa0;
  font-size: 12px;
  font-weight: 600;
}

.daily-answer-options {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}

.daily-answer-option {
  position: relative;
  cursor: pointer;
}

.daily-answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.daily-answer-option span {
  min-width: 70px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dedee3;
  border-radius: 8px;
  background: #fff;
  color: #4b4b50;
  font-size: 13px;
}

.daily-answer-option input:checked + span {
  border-color: #355944;
  background: #355944;
  color: #fff;
}

.daily-answer-option input:focus-visible + span {
  outline: 2px solid #77777c;
  outline-offset: 2px;
}

.daily-detail-field {
  display: block;
  margin-top: 14px;
}

.daily-detail-field[hidden] {
  display: none;
}

.daily-detail-field > span {
  display: block;
  margin-bottom: 7px;
  color: #b84732;
  font-size: 12px;
  font-weight: 600;
}

.daily-detail-field textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #d9d9de;
  border-radius: 9px;
  background: #fff;
  color: #222225;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  box-sizing: border-box;
}

.daily-detail-field textarea:focus {
  border-color: #77777c;
  outline: none;
}

.daily-form-error {
  min-height: 20px;
  padding: 10px 24px 0;
  color: #c24b2c;
  font-size: 12px;
}

/* 详情弹窗：头部元信息 */
.daily-detail-meta {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 24px;
  padding: 14px 24px;
  background: #fafafc;
  border-bottom: 1px solid #ececef;
}

.daily-detail-meta-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.daily-detail-meta-item span {
  flex-shrink: 0;
  color: #9a9aa0;
  font-size: 12px;
}

.daily-detail-meta-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2c2c2e;
  font-size: 13px;
  font-weight: 650;
}

/* 详情弹窗：逐项内容（完整展示所有题目与回答） */
.daily-detail-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 14px 24px 4px;
  list-style: none;
}

.daily-detail-item {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #ececef;
  border-radius: 12px;
  background: #fff;
}

.daily-detail-item--abnormal {
  border-color: #f1d5ce;
  background: #fff8f6;
}

.daily-detail-item-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.daily-detail-index {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf2ec;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 700;
}

.daily-detail-item--abnormal .daily-detail-index {
  background: #b84732;
  color: #fff;
}

.daily-detail-item-head h4 {
  flex: 1;
  min-width: 0;
  margin: 1px 0 0;
  color: #222225;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.daily-detail-tag {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #fde9e5;
  color: #b84732;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.daily-detail-answer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 11px;
  color: #2c2c2e;
  font-size: 13px;
}

.daily-detail-answer span {
  flex-shrink: 0;
  color: #8e8e93;
  font-size: 12px;
}

.daily-detail-answer b {
  font-weight: 650;
}

.daily-detail-abnormal {
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid #f6d8d0;
  border-radius: 9px;
  background: #fdece8;
}

.daily-detail-abnormal .lbl {
  display: block;
  margin-bottom: 6px;
  color: #b84732;
  font-size: 12px;
  font-weight: 650;
}

.daily-detail-abnormal .txt {
  color: #7a2e1d;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.daily-modal-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
}

.daily-modal-button {
  height: 38px;
  padding: 0 20px;
  border: 1px solid #25372f;
  border-radius: 9px;
  background: #355944;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.daily-modal-button.ghost {
  border-color: #dedee3;
  background: #fff;
  color: #4b4b50;
}

.daily-modal-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 900px) {
  .daily-management-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .daily-summary-panel {
    width: 100%;
  }
  .daily-history-panel {
    min-height: 480px;
  }
}

@media (max-width: 640px) {
  .daily-page-header--actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .daily-page-actions {
    width: 100%;
  }
  .daily-range-control {
    flex: 1;
  }
  .daily-range-select,
  .daily-new-button {
    width: 100%;
  }
  .daily-history-head,
  .daily-history-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }
  .daily-record-card {
    grid-template-columns: 1fr;
    gap: 8px 0;
  }
  .daily-record-date {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .daily-modal-mask {
    padding: 10px;
  }
  .daily-modal {
    max-height: calc(100vh - 20px);
  }
  .daily-modal-head,
  .daily-questions,
  .daily-detail-meta,
  .daily-detail-list,
  .daily-modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}
