.leader-page {
  max-width: 1520px;
  margin: 0 auto;
  padding: 12px;
}
.leader-status {
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  color: #d46b08;
}
.leader-dispute-status {
  background: #fff1f0;
  border-color: #ffa39e;
  color: #cf1322;
}
.leader-dispute-question {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: #1f2329;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}
.leader-dispute-tip {
  margin-top: 8px;
  color: #a8071a;
  font-size: 12px;
}
.leader-mobile-hint { display: none; }
.leader-xlsx {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 420px;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.leader-xlsx .xlsx-sheet {
  width: max-content !important;
  min-width: 100%;
  max-width: none !important;
  margin: 0 !important;
  overflow: visible !important;
  transform: none !important;
}
.leader-xlsx table {
  width: max-content !important;
  min-width: 100%;
  table-layout: fixed;
}
.leader-score-cell,
.leader-comment-cell,
.leader-sign-cell {
  position: relative !important;
  padding: 0 !important;
  vertical-align: middle !important;
}
.leader-score-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 600;
}
.leader-score-input:focus,
.leader-comment-input:focus {
  background: #fffde0;
  box-shadow: inset 0 0 0 2px #aeb4bd;
}
.leader-total-score-cell {
  color: #3370ff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center !important;
}
.leader-comment-input {
  display: block;
  width: 100%;
  min-height: 86px;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  resize: vertical;
  padding: 10px;
  font: inherit;
}
.leader-sign-cell {
  text-align: center !important;
  min-height: 68px;
}
.leader-sign-btn {
  border: 1px dashed #8f959e;
  background: #fafafa;
  color: #4e5969;
  border-radius: 7px;
  padding: 9px 18px;
  cursor: pointer;
}
.leader-sign-img,
.leader-employee-sign {
  display: block;
  max-width: 180px;
  max-height: 68px;
  object-fit: contain;
  margin: auto;
}
.leader-sign-content {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 3px 6px;
}
.leader-sign-content .leader-sign-img { margin: 0; }
.leader-sign-name {
  color: #1f2329;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.leader-sign-placeholder,
.leader-sign-loading,
.leader-sign-error {
  display: block;
  padding: 8px;
  color: #8f959e;
  font-size: 11px;
  text-align: center;
}
.leader-sign-error { color: #ff3b30; }
.leader-sign-action {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #ffd591;
  border-radius: 12px;
  background: #fffaf0;
}
.leader-sign-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.leader-sign-action-head b { font-size: 14px; }
.leader-sign-action-head b span {
  color: #ff3b30;
  font-size: 11px;
  margin-left: 4px;
}
.leader-sign-action-head > div:first-child > div {
  color: #8f959e;
  font-size: 12px;
  margin-top: 4px;
}
.leader-sign-preview {
  width: 180px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d0a85c;
  border-radius: 8px;
  background: #fff;
  color: #8f959e;
  font-size: 12px;
}
.leader-sign-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.leader-sign-action-btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}
.leader-queue {
  margin-top: 18px;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 14px;
}
.leader-page > .leader-queue:first-child {
  margin-top: 0;
  margin-bottom: 12px;
}
.leader-queue-head {
  display: flex;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid #e5e6eb;
}
.leader-people {
  display: flex;
  gap: 10px;
  padding: 14px;
  overflow: auto;
}
.leader-person {
  min-width: 170px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  padding: 11px;
  cursor: pointer;
}
.leader-person.active {
  background: #f1f5ff;
  border-color: #8aafff;
}
.leader-submit {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.leader-submit .btn { justify-content: center; }
.leader-sign-complete {
  color: #16835f;
  border-color: #69c9aa;
  background: #effbf7;
}
.leader-sign-modal { width: min(760px, 100%); }
.leader-sign-wrap {
  height: 320px;
  border: 1px dashed #aeb4bd;
  border-radius: 12px;
  overflow: hidden;
}
.leader-sign-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.leader-sign-tools {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.leader-sign-tools .btn { flex: 1; }

@media (max-width: 768px) {
  .leader-page {
    width: 100%;
    max-width: 100%;
    padding: 2px 0;
    overflow: hidden;
  }
  .leader-page .employee-card-body { padding: 10px 8px; }
  .leader-status {
    padding: 10px 8px;
    margin-bottom: 8px;
    font-size: 12px;
  }
  .leader-mobile-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #eef4ff;
    color: #245bdb;
    border: 1px solid #cbdcff;
    border-radius: 7px;
    padding: 7px 8px;
    margin-bottom: 8px;
    font-size: 11px;
  }
  .leader-xlsx {
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    overflow: hidden !important;
    touch-action: pan-x pan-y pinch-zoom;
  }
  .leader-xlsx .xlsx-sheet {
    width: max-content !important;
    min-width: 920px !important;
    max-width: none !important;
    overflow: visible !important;
    transform-origin: top left !important;
  }
  .leader-xlsx table {
    width: max-content !important;
    min-width: 920px !important;
    max-width: none !important;
    table-layout: fixed !important;
  }
  .leader-xlsx td {
    white-space: normal;
    font-size: 11px;
  }
  .leader-score-input {
    min-width: 44px;
    font-size: 14px;
  }
  .leader-comment-input {
    min-width: 150px;
    min-height: 72px;
    padding: 6px;
  }
  .leader-sign-action {
    margin: 12px -2px 0;
    padding: 12px;
  }
  .leader-sign-action-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .leader-sign-preview {
    width: 100%;
    height: 88px;
  }
  .leader-sign-action-btn {
    min-height: 50px;
    font-size: 15px;
  }
  .leader-submit {
    position: static;
    margin: 14px 0 0;
    padding: 4px 0 calc(12px + env(safe-area-inset-bottom));
    background: transparent;
    box-shadow: none;
  }
  .leader-submit .btn {
    flex: 1;
    justify-content: center;
    min-height: 58px;
    padding: 14px 8px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
  }
  .leader-queue {
    margin-top: 10px;
    border-radius: 10px;
  }
  .leader-queue-head {
    padding: 10px;
    gap: 4px;
    flex-direction: column;
    font-size: 12px;
  }
  .leader-people {
    padding: 8px;
    gap: 7px;
  }
  .leader-person {
    min-width: 138px;
    padding: 8px;
  }
  .leader-dispute-status { text-align: left; }
  .leader-dispute-question { font-size: 12px; line-height: 1.6; }
}
