/* Lớp bổ sung P1: lương, chi phí, thi đua, đánh dấu ô tường */

.tile { position: relative; }
.marks {
  position: absolute; left: 3px; right: 3px; bottom: 3px; height: 4px;
  display: flex; gap: 2px; margin: 0; padding: 0; font-style: normal;
}
.marks s { flex: 1; border-radius: 2px; display: block; }
.sw.marker { background: linear-gradient(90deg, #A0432A 0 33%, #5F7A43 33% 66%, #4F7185 66%); }

.mb { margin-bottom: 14px; }

.perf { margin-bottom: 14px; }
.perf:last-of-type { margin-bottom: 0; }
.perf-track {
  height: 10px; margin-top: 6px; border-radius: 99px; overflow: hidden;
  background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(80, 40, 20, .12);
}
.perf-track span { display: block; height: 100%; border-radius: inherit; transition: width .4s ease; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.tbl td, .tbl th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl .r { text-align: right; }

.stars { display: flex; gap: 8px; margin-top: 8px; }
.stars button {
  width: 48px; height: 48px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 16px; font-weight: 700;
}
.stars button:hover { border-color: var(--clay); }
.stars button:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }

.pay-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.pay-line.total { font-weight: 700; font-size: 16px; border-bottom: 0; color: var(--brick); padding-top: 12px; }

.mini-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.mini-row:first-child { border-top: 0; }
.mini-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pick-check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600;
}
.pick-check input { width: 18px; height: 18px; accent-color: var(--brick); margin: 0; }
.pick-check:has(input:checked) { background: #FBEDE4; border-color: var(--brick); color: var(--brick); }

.person[role="button"] { cursor: pointer; border-radius: 14px; }
.person[role="button"]:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Chú thích cách tính: rê chuột (máy tính) hoặc chạm giữ (điện thoại) để xem */
.info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px; border-radius: 50%; font-size: 11px; line-height: 1; color: var(--muted); border: 1px solid rgba(58, 42, 32, .25); cursor: help; vertical-align: middle; user-select: none; }
.info:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }

/* Ảnh mẫu hiện rõ phía sau lưới; mỗi ô chỉ phủ màu trạng thái ở độ mờ 25% để nhìn thấy hình bên dưới */
.grid-wrap { position: relative; }
.grid-wrap > *:not(.grid-bg) { position: relative; z-index: 1; }
.grid-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; border-radius: 12px; pointer-events: none; z-index: 0; }
.grid-wrap.has-photo .tile { background: transparent; }
.grid-wrap.has-photo .tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .25; z-index: 0; background: #EFE6DA; }
.grid-wrap.has-photo .tile.st-doing::before { background: #F4E3C2; }
.grid-wrap.has-photo .tile.st-wait::before { background: #DCE6EC; }
.grid-wrap.has-photo .tile.st-ok::before { background: #DFE8D3; }
.grid-wrap.has-photo .tile.st-fix::before { background: #F3D9CD; }
.grid-wrap.has-photo .tile > * { position: relative; z-index: 1; }
