/* 2026 考核流程頁面樣式：階段狀態條、檢核卡、權重列、評分與名單表格。 */

/* 階段狀態條：一條光纖。光走過的節點實心墨黑、目前節點雷射橘、之後的路段是虛線。 */
.stage-bar {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 76px minmax(0, 1fr);
  margin-bottom: 20px;
}

.stage-bar-label {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
}

.stage-line {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stage-line li {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  padding: 20px 6px 0 0;
  position: relative;
}

.stage-line li::before {
  background: repeating-linear-gradient(90deg, var(--field-line) 0 4px, transparent 4px 7px);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 5px;
}

.stage-line li:last-child::before {
  display: none;
}

.stage-line li i {
  background: var(--surface);
  border: 2px solid #b9b6af;
  border-radius: 50%;
  height: 12px;
  left: 0;
  position: absolute;
  top: 0;
  width: 12px;
}

.stage-line li.is-done {
  color: var(--ink);
}

.stage-line li.is-done::before {
  background: var(--ink-strong);
}

.stage-line li.is-done i {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
}

.stage-line li.is-current {
  color: var(--ink-strong);
  font-weight: 700;
}

.stage-line li.is-current::before {
  background: linear-gradient(90deg, var(--laser), rgba(255, 74, 28, 0.12));
}

.stage-line li.is-current i {
  background: var(--laser);
  border-color: var(--laser);
  box-shadow: 0 0 0 4px rgba(255, 74, 28, 0.18), 0 0 12px rgba(255, 74, 28, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .stage-line li.is-current i {
    animation: stage-pulse 2.4s ease-in-out infinite;
  }
}

@keyframes stage-pulse {
  50% { box-shadow: 0 0 0 7px rgba(255, 74, 28, 0.08), 0 0 16px rgba(255, 74, 28, 0.75); }
}

/* 窄螢幕：九個節點擠不下一行，改成直的一條 */
@media (max-width: 760px) {
  .stage-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-line {
    grid-auto-flow: row;
  }

  .stage-line li {
    padding: 0 0 12px 22px;
  }

  .stage-line li::before {
    background: repeating-linear-gradient(180deg, var(--field-line) 0 4px, transparent 4px 7px);
    bottom: 0;
    height: auto;
    left: 5px;
    right: auto;
    top: 12px;
    width: 2px;
  }

  .stage-line li.is-current::before {
    background: linear-gradient(180deg, var(--laser), rgba(255, 74, 28, 0.12));
  }
}

/* 檢核卡 */
.check-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.check-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.check-card.is-alert {
  border-color: var(--danger);
}

.check-card-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.check-card-head span {
  color: var(--muted);
  font-size: 12.5px;
}

.check-list {
  display: grid;
  gap: 14px;
}

.check-list ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.check-list li {
  font-size: 13.5px;
  margin-bottom: 4px;
}

/* 表格補充 */
.data-table.compact th,
.data-table.compact td {
  font-size: 13px;
  padding: 8px 10px;
}

.score-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-inputs input {
  width: 64px;
}

.total-cell b {
  display: block;
  font-size: 17px;
}

.comment-hint {
  color: var(--danger);
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.raw-rating {
  color: var(--muted);
  display: block;
  font-size: 11.5px;
}

.aside-note {
  color: var(--muted);
  font-size: 12.5px;
  margin: 10px 0 0;
}

.danger-callout {
  background: var(--danger-bg);
  border-left-color: var(--danger);
  color: #7d2112;
}

/* 權比／Evaluation List */
.weight-entry {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.weight-entry input {
  width: 70px;
}

.list-entries {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.list-entry {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.entry-name {
  font-weight: 700;
  min-width: 140px;
}

.profile-line {
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.profile-line b {
  color: var(--success);
  display: block;
  font-size: 13.5px;
}

.profile-line span {
  color: var(--muted);
  font-size: 12.5px;
}

.profile-line.is-blocked {
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.profile-line.is-blocked b {
  color: var(--danger);
}

.role-tag {
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  border-radius: var(--radius);
  color: var(--info);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
}

/* Evaluator 待評 */
.data-table tr.is-selected {
  background: var(--laser-tint);
}

.self-readonly {
  border-bottom: 1px solid var(--soft-line);
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.self-readonly b {
  color: var(--navy-deep);
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}

.self-readonly p {
  color: var(--ink);
  font-size: 13.5px;
  margin: 0;
}

.compact-question .score-options label {
  padding: 6px 10px;
}

/* 員工可見性說明框 */
.visibility-box ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.visibility-box li {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius);
  color: #8c2a1a;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 12px;
}

.anon-comments {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.anon-comments li {
  background: #f6f5f1;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  font-size: 14px;
  padding: 10px 14px;
}

/* 新角色的視角色帶 */
@media (max-width: 1050px) {
  .scoring-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .entry-name {
    min-width: 100%;
  }
}

/* ---------- 舊制對齊的自評／互評題目版面 ---------- */
.question-hint {
  color: var(--muted, #5b6673);
  font-size: 13.5px;
  line-height: 1.7;
}

.question-title small {
  color: var(--muted, #5b6673);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 400;
  margin-left: 8px;
}

.form-section-title {
  border-bottom: 2px solid var(--soft-line);
  font-size: 16px;
  margin: 22px 0 4px;
  padding-bottom: 8px;
}

.question input[type="number"] {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  max-width: 110px;
  padding: 8px 10px;
}

.quota-hint {
  color: var(--success);
  font-size: 13px;
}

.quota-hint.is-over {
  color: var(--danger);
  font-weight: 700;
}

.ok-inline { color: var(--success); font-weight: 700; }
.warn-inline { color: var(--amber-ink); font-weight: 700; }

.same-as-last { list-style: none; margin: 0; padding: 0; }

.same-as-last li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 4px;
}

.same-as-last li small { color: var(--muted, #5b6673); }

.same-as-last li:last-child { border-bottom: none; }
