/* PASS v1.2.1 — 검수자/관리자 탭, Mattermost 인증, 관리자 화면.
   v1.0 디자인 토큰(--accent, --accent-strong, --tint, --accent-border, --ink, --border, --canvas)만 사용합니다. */
:root {
  --ok: #3f9a7e;
  --ok-text: #2f7a5f;
  --ok-tint: #edf5f0;
  --ok-border: #cfe5d8;
  --issue: #e0734f;
  --issue-text: #ae4a3d;
  --issue-tint: #fff5f3;
  --issue-border: #e9b1aa;
  --pending: #c5c8d2;
  --pending-text: #7d8394;
  --pending-tint: #f1f3f7;
}

/* ---------- 브랜드 ---------- */
.brand b > span {
  font-weight: 400;
  letter-spacing: -0.6px;
}
@media (max-width: 560px) {
  .brand b > span {
    display: none;
  }
}

/* ---------- 시작 화면: 검수자 정보 / 관리자 정보 탭 ---------- */
.setup-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.setup-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  text-align: left;
  padding: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #b2b7c2;
  border-radius: 0;
}
.setup-tab .eyebrow {
  color: inherit;
  transition: color 0.15s;
}
.setup-tab b {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 700;
  line-height: 1.2;
}
.setup-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent-strong);
}
.setup-tab.active .eyebrow {
  color: var(--accent-strong);
}
.setup-tab:not(.active):hover {
  color: #7e8394;
  filter: none;
}
.setup-tab:focus-visible {
  outline-offset: -3px;
}
.setup-form-head > p {
  font-size: 12px;
  color: #8c92a0;
  margin: 14px 0 0;
  line-height: 1.8;
}
body[data-theme='multicampus'] .setup-tab.active {
  border-bottom-color: #ef4b00;
}
body[data-theme='multicampus'] .setup-tab.active .eyebrow {
  color: #737373;
}
/* 두 탭의 폼을 같은 칸에 겹쳐 두어 탭 전환 시 머리글 위치가 바뀌지 않게 합니다. */
.setup-panels {
  display: grid;
  margin-bottom: auto;
  flex-shrink: 0;
  min-height: 0;
}
.setup-panels > form {
  grid-area: 1/1;
  min-width: 0;
}
.setup-panels > form.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 999px), (max-height: 599px) {
  .setup-panels > form.is-hidden {
    display: none;
  }
}
@media (min-width: 1000px) and (min-height: 600px) {
  #setupForm {
    margin-bottom: 0;
  }
}
.form-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid select:invalid {
  color: #9aa0ad;
}
.form-grid option {
  color: var(--ink);
}

/* Mattermost 본인 인증 */
.mm-auth {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}
.mm-label {
  font-size: 12px;
  color: #636b7b;
}
.mm-label em {
  font-style: normal;
  color: var(--purple);
}
.mm-send {
  height: 46px;
  width: 100%;
  border: 1px solid var(--accent-border);
  background: var(--tint);
  color: var(--accent-strong);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.mm-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.mm-code input {
  height: 46px;
  width: 100%;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--ink);
  background: white;
}
.mm-code input::placeholder {
  letter-spacing: 0;
  color: #b2b7c3;
}
.mm-code input:focus {
  border-color: var(--accent);
}
.mm-code .button {
  height: 46px;
  min-width: 76px;
  font-size: 12px;
}
.mm-code .text-button {
  font-size: 11px;
}
.mm-done {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ok-border);
  background: var(--ok-tint);
  color: var(--ok-text);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
}
.mm-done > span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok);
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}
.mm-done b {
  font-weight: 600;
}
.mm-done small {
  margin-left: auto;
  font-size: 11px;
  color: #5d8c77;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mm-hint {
  font-size: 10px;
  color: #9aa0ad;
  line-height: 1.6;
}
.mm-auth.verified .mm-hint {
  color: #6f9a86;
}
body[data-theme='multicampus'] .mm-send {
  background: #fff;
  border-color: #cfcfcf;
  color: #191616;
}
body[data-theme='multicampus'] .mm-label em {
  color: #555;
}
#adminForm .setup-actions .primary,
#setupForm .setup-actions .primary {
  transition:
    opacity 0.15s,
    background 0.15s;
}

/* ---------- 관리자 공통 ---------- */
.admin-page {
  min-width: 0;
}
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
}
.admin-heading > div:first-child {
  min-width: 0;
}
.admin-heading h1 {
  margin: 10px 0 6px;
  font-size: 25px;
}
.admin-heading h2 {
  margin: 10px 0 8px;
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-heading p {
  font-size: 12px;
  color: #7e8394;
  margin: 0;
}
.admin-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-heading .button {
  height: 38px;
  font-size: 12px;
}
.title-sub {
  font-size: 14px;
  font-weight: 500;
  color: #7e8394;
  letter-spacing: -0.2px;
}
.crumb-link {
  border: 0;
  background: none;
  padding: 0;
  font-size: inherit;
  color: var(--accent-strong);
  font-weight: 500;
}
.crumb-link:hover {
  text-decoration: underline;
  filter: none;
}
.kit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--ink);
}
.kit-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kit-meta small {
  font-size: 10px;
  color: #9aa0ad;
}
.live-tag {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--tint);
  border: 1px solid var(--accent-border);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  white-space: nowrap;
}
.kit-meta .live-tag {
  margin-left: 0;
  font-size: 10px;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 24px;
  min-width: 58px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  font-style: normal;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.state-chip.ok {
  background: var(--ok-tint);
  color: var(--ok-text);
  border-color: var(--ok-border);
}
.state-chip.issue {
  background: var(--issue-tint);
  color: var(--issue-text);
  border-color: var(--issue-border);
}
.state-chip.pending {
  background: var(--pending-tint);
  color: var(--pending-text);
  border-color: #e3e6ed;
}
button.state-chip:hover {
  filter: brightness(0.96);
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
button.state-chip:after {
  content: '›';
  font-size: 13px;
  line-height: 1;
  opacity: 0.6;
}
.state-chip.group {
  background: transparent;
  border-style: dashed;
}
.state-chip.mini {
  height: 18px;
  min-width: 0;
  padding: 0 6px;
  font-size: 9px;
}
.admin-heading h2 .state-chip {
  font-size: 11px;
  letter-spacing: 0;
}
.kit-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  background: var(--pending-tint);
  border: 2px solid var(--pending);
}
.kit-dot.ok {
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-tint);
}
.kit-dot.issue {
  background: var(--issue);
  border-color: var(--issue);
  box-shadow: 0 0 0 3px #fde6de;
}

/* ---------- 관리자-5: 검수 현황 ---------- */
.admin-summary {
  padding: 26px 32px;
}
.region-filter {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
}
.region-chip {
  border: 0;
  background: none;
  height: 30px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12px;
  color: #7e8394;
}
.region-chip.selected {
  background: var(--tint);
  color: var(--accent-strong);
  font-weight: 600;
}
.stage-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stage-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.stage-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  text-align: left;
  padding: 18px 18px 14px;
  color: var(--ink);
  border-radius: 0;
}
.stage-top:hover {
  background: #fafbfd;
  filter: none;
}
.stage-top .part-number {
  background: var(--tint);
  color: var(--accent-strong);
}
.stage-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.stage-name small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #9aa0ad;
  margin-top: 3px;
  letter-spacing: 0;
}
.stage-top b {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
}
.stage-top b small {
  font-size: 12px;
  font-weight: 500;
  color: #9aa0ad;
  margin-left: 3px;
  letter-spacing: 0;
}
.stage-issue .stage-top b {
  color: var(--issue-text);
}
.stage-track {
  margin: 0 18px;
  height: 4px;
}
.stage-track > div {
  height: 100%;
  background: var(--accent-strong);
  border-radius: 4px;
}
.stage-issue .stage-track > div {
  background: var(--issue);
}
.stage-body {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}
.region-list {
  list-style: none;
  margin: 0;
  padding: 10px 8px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.region-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  background: none;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #5f6576;
  text-align: left;
}
.region-row .region-code {
  font-size: 10px;
  color: #a6a8b5;
  width: 11px;
  font-weight: 600;
}
.region-row b {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.region-row:hover {
  background: #f6f7fa;
  filter: none;
}
.region-row.selected {
  background: var(--tint);
  color: var(--accent-strong);
}
.region-row.selected b,
.region-row.selected .region-code {
  color: var(--accent-strong);
}
.team-list {
  padding: 10px 10px 12px;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.team-list > small {
  font-size: 9px;
  color: #9aa0ad;
  padding: 2px 6px 6px;
  letter-spacing: 0.2px;
}
.team-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  padding: 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.team-link em {
  font-style: normal;
  font-weight: 500;
  color: #8a90a0;
  margin-left: auto;
}
.team-link .kit-dot {
  width: 8px;
  height: 8px;
  border-width: 1.5px;
  box-shadow: none;
}
.team-link:hover {
  background: var(--tint);
  color: var(--accent-strong);
  filter: none;
}
.team-empty {
  font-size: 11px;
  color: #a3a8b4;
  padding: 8px 6px;
  margin: 0;
}

/* ---------- 관리자-3: 관리 개발 키트 목록 + 결과 표 ---------- */
.admin-kits {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  min-height: calc(100vh - 88px);
}
.kit-panel {
  background: #fcfcfe;
  border-right: 1px solid var(--border);
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
body[data-theme='multicampus'] .kit-panel {
  background: #f5f5f5;
}
.kit-panel-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kit-panel .parts-heading {
  padding: 0 4px;
}
.kit-list-download {
  height: 34px;
  font-size: 11px;
  width: 100%;
}
.kit-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 10px;
}
.kit-filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  color: #8a90a0;
  padding: 0 2px;
}
.kit-filters select {
  height: 32px;
  border: 1px solid #dce1e9;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  padding: 0 6px;
}
.kit-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding: 2px;
}
.kit-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 9px;
  padding: 8px 12px;
  text-align: left;
  color: var(--ink);
}
.kit-item .kit-no {
  min-width: 30px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.kit-item .kit-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.kit-item .kit-name small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #8a90a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kit-item.active {
  border-color: var(--accent-border);
  background: var(--tint);
  color: var(--accent-strong);
  box-shadow: inset 3px 0 0 var(--accent-strong);
}
.kit-item.kit-all .kit-no {
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--accent-strong);
}
.kit-item.kit-all {
  border-style: dashed;
}
.kit-item:hover:not(.active) {
  background: #f8f9fb;
  filter: none;
}
body[data-theme='multicampus'] .kit-item.active {
  background: #202020;
  border-color: #202020;
  color: white;
  box-shadow: inset 3px 0 0 #ef4b00;
}
body[data-theme='multicampus'] .kit-item.active small,
body[data-theme='multicampus'] .kit-item.active.kit-all .kit-no {
  color: #bdbdbd;
}
.kit-legend {
  display: flex;
  gap: 14px;
  padding: 12px 4px 0;
  font-size: 10px;
  color: #8a90a0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}
.kit-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kit-legend .kit-dot {
  width: 9px;
  height: 9px;
  box-shadow: none;
}

.admin-main {
  min-width: 0;
  padding: 24px 28px 18px;
  display: flex;
  flex-direction: column;
}
.kit-table-view,
.kit-detail-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.check-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #c8cdd8;
  border-radius: 4px;
  background: white;
  display: grid;
  place-items: center;
}
.check-toggle input:checked + .check-box {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.check-toggle input:checked + .check-box:after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.check-toggle input:focus-visible + .check-box {
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, white);
  outline-offset: 2px;
}

.table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  position: relative;
}
.result-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  color: var(--ink);
}
.result-table th {
  position: sticky;
  background: #f6f7fa;
  color: #5f6576;
  font-weight: 600;
  font-size: 11px;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid #eef0f4;
  text-align: center;
  line-height: 1.35;
  z-index: 2;
}
.result-table thead tr:nth-child(1) th {
  top: 0;
  height: 34px;
}
.result-table thead tr:nth-child(2) th {
  top: 34px;
  height: 28px;
}
.result-table thead tr:nth-child(1) th[rowspan] {
  height: 62px;
}
.result-table thead tr.filter-row th {
  top: 62px;
  padding: 5px 5px;
  background: #fbfbfd;
  font-weight: 400;
}
.result-table th small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: #9aa0ad;
  margin-top: 2px;
}
.result-table th.c-group {
  border-bottom: 1px solid var(--border);
}
.filter-row input,
.filter-row select {
  width: 100%;
  height: 26px;
  border: 1px solid #e3e6ed;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 11px;
  background: white;
  color: var(--ink);
  min-width: 0;
}
.filter-row input::placeholder {
  color: #c0c4ce;
}
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--tint);
}
.result-table td {
  padding: 0 9px;
  height: 38px;
  border-bottom: 1px solid #f0f1f5;
  border-right: 1px solid #f4f5f8;
  white-space: nowrap;
  vertical-align: middle;
}
.result-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.result-table .c-kit {
  width: 84px;
  text-align: center;
}
.result-table th:not(.c-photo) {
  white-space: nowrap;
}
.result-table td.c-kit {
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}
.result-table .c-tier {
  width: 56px;
}
.result-table .c-no {
  width: 96px;
}
.result-table .c-sub {
  width: 74px;
}
.result-table td.c-sub {
  text-align: center;
  color: #8a90a0;
}
.result-table .c-name {
  min-width: 130px;
}
.result-table .c-photo {
  width: 104px;
}
.result-table td.c-photo {
  text-align: center;
}
.result-table .c-info {
  min-width: 110px;
}
.result-table td.c-info {
  color: #5f6576;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-table .c-qty {
  width: 64px;
}
.result-table .c-cons {
  width: 80px;
}
.result-table td.c-cons {
  color: #5f6576;
}
.result-table .c-state {
  width: 90px;
  text-align: center;
}
.result-table .c-reason {
  min-width: 110px;
}
.result-table td.c-reason {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--issue-text);
  font-weight: 500;
}
.result-table td.inherited {
  color: #b0b5c0;
}
.result-table tr.row-group td {
  background: #fafbfd;
  font-weight: 600;
}
.result-table tr.row-group td.c-name {
  color: var(--accent-strong);
}
.result-table tr.row-group td.c-reason {
  color: #8a90a0;
  font-weight: 500;
}
.result-table tr.row-part td.c-name {
  padding-left: 20px;
}
.result-table tr.kit-start td {
  border-top: 2px solid #e3e6ed;
}
.result-table tbody tr:first-child td {
  border-top: 0;
}
.result-table tr.row-part:hover td {
  background: #f8f9fc;
}
.result-table tr.row-issue td.c-name {
  color: var(--issue-text);
  font-weight: 600;
}
body[data-theme='multicampus'] .result-table tr.row-group td.c-name {
  color: #191616;
}
.photo-ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 3px 4px;
  border-radius: 5px;
  font-size: 11px;
  color: var(--accent-strong);
  font-weight: 500;
}
.photo-ref .thumb {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  background: var(--tint);
  border: 1px solid var(--accent-border);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--accent-strong);
}
.photo-ref:hover {
  background: var(--tint);
  filter: none;
}
.table-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 12px;
  color: #9aa0ad;
}
.table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 2px 0;
  font-size: 11px;
  color: #8a90a0;
  flex-wrap: wrap;
}
.table-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.table-hint .state-chip {
  pointer-events: none;
}

/* ---------- 관리자-4: 검수 단계 상세 ---------- */
.admin-heading h2 .part-number {
  font-size: 11px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1;
}
.detail-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.detail-card-title {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 14px;
}
.detail-step {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid #f0f1f5;
}
.detail-step:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.detail-step .step-number {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.detail-step.issue .step-number {
  background: var(--issue-tint);
  border-color: var(--issue-border);
  color: var(--issue-text);
}
.detail-step-body {
  flex: 1;
  min-width: 0;
}
.detail-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-stage {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
  min-width: 76px;
}
.detail-step-head .state-chip {
  height: 28px;
  font-size: 13px;
  min-width: 70px;
}
.detail-question {
  font-size: 12px;
  color: #5f6576;
  margin: 8px 0 0;
}
.detail-step .original-label {
  font-size: 10px;
  color: #9aa0ad;
  margin: 4px 0 0;
}
.reason-view {
  margin-top: 12px;
  border: 1px solid var(--issue-border);
  background: var(--issue-tint);
  border-radius: 8px;
  padding: 12px 14px;
}
.reason-view > span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--issue-text);
  margin-bottom: 6px;
}
.reason-view p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #5a3a35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.evidence-view figure {
  margin: 0;
  flex: 1;
  min-height: 180px;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.evidence-view figure img {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #f6f7fa;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.evidence-view figcaption {
  font-size: 10px;
  color: #9aa0ad;
  text-align: center;
}
.photo-empty {
  flex: 1;
  min-height: 160px;
  border: 1px dashed var(--accent-border);
  background: #fbfcfe;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  text-align: center;
}
.photo-empty .device-illustration {
  height: 110px;
  width: 100%;
  margin: 0;
  background: radial-gradient(ellipse, var(--tint), transparent 70%);
}
.photo-empty .device-illustration svg {
  height: 100px;
  width: 140px;
}
.photo-empty b {
  font-size: 12px;
  font-weight: 600;
  color: #5f6576;
}
.photo-empty small {
  font-size: 10px;
  color: #9aa0ad;
}
.memo-view {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.memo-view b {
  font-size: 11px;
  font-weight: 600;
}
.memo-view p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--ink);
}
.memo-view p.empty {
  color: #a3a8b4;
}
.detail-pager {
  border-top: 0;
  padding-top: 12px;
}

/* 부품 정보 */
.part-info-dialog {
  width: min(560px, calc(100vw - 32px));
}
.part-info-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}
.part-info-body .device-illustration {
  height: 130px;
  margin: 0;
  border-radius: 8px;
}
.part-info-body .device-illustration svg {
  width: 150px;
  height: 110px;
}
.part-info-body dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 12px;
}
.part-info-body dt {
  color: #9aa0ad;
}
.part-info-body dd {
  margin: 0;
  color: var(--ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.part-info-link {
  font-size: 11px !important;
  background: var(--tint);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 18px 0 0;
  color: var(--accent-strong) !important;
  line-height: 1.7 !important;
}

/* ---------- 화면 고정형(데스크톱) ---------- */
@media (min-width: 1000px) and (min-height: 600px) {
  .app-shell > #adminPage {
    grid-area: content;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .admin-summary {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: clamp(18px, 2.6dvh, 30px) clamp(24px, 2.4vw, 40px);
  }
  .admin-summary .admin-heading h1 {
    font-size: clamp(22px, 2.8dvh, 30px);
  }
  .stage-board {
    flex: 1;
    min-height: 0;
  }
  .stage-card {
    min-height: 0;
  }
  .admin-kits {
    height: 100%;
    min-height: 0;
  }
  .kit-panel {
    height: 100%;
    overflow: hidden;
  }
  .admin-main {
    height: 100%;
    min-height: 0;
    padding: clamp(16px, 2.4dvh, 26px) clamp(20px, 2vw, 32px) 14px;
  }
  .setup-tab b {
    font-size: clamp(22px, 3dvh, 36px);
  }
  .setup-form-head > p {
    font-size: clamp(11px, 1.35dvh, 15px);
    margin-top: clamp(8px, 1.4dvh, 16px);
  }
  .mm-auth {
    margin-bottom: clamp(12px, 2dvh, 22px);
    gap: clamp(5px, 0.8dvh, 9px);
  }
  .mm-label {
    font-size: clamp(12px, 1.4dvh, 16px);
  }
  .mm-send,
  .mm-code input,
  .mm-code .button,
  .mm-done {
    height: clamp(38px, 5.1dvh, 60px);
    font-size: clamp(12px, 1.5dvh, 17px);
  }
  .mm-hint {
    font-size: clamp(10px, 1.15dvh, 13px);
  }
}
@media (min-width: 1000px) and (min-height: 600px) and (max-height: 820px) {
  .setup-tab {
    padding-bottom: 10px;
    gap: 6px;
  }
  .setup-tab b {
    font-size: 23px;
  }
  .setup-form-head > p {
    font-size: 11px;
    margin-top: 8px;
  }
  .setup-form-area .form-grid {
    margin: 14px 0 12px;
    gap: 10px 14px;
  }
  .mm-auth {
    margin-bottom: 12px;
    gap: 5px;
  }
  .mm-label {
    font-size: 12px;
  }
  .mm-send,
  .mm-code input,
  .mm-code .button,
  .mm-done {
    height: 38px;
    font-size: 12px;
  }
  .mm-hint {
    font-size: 10px;
  }
  .setup-footnote {
    display: none;
  }
  .stage-top {
    padding: 14px 16px 10px;
  }
  .stage-top b {
    font-size: 28px;
  }
  .stage-body {
    margin-top: 10px;
  }
  .admin-heading {
    margin-bottom: 12px;
  }
  .admin-heading h1 {
    margin: 6px 0 4px;
  }
  .admin-heading h2 {
    margin: 6px 0 6px;
    font-size: 19px;
  }
  .detail-step {
    padding: 12px 0;
  }
  .detail-card {
    padding: 16px 18px;
  }
  .region-row {
    padding: 5px 8px;
  }
  .team-link {
    padding: 5px 6px;
  }
}
@media (min-width: 1000px) and (min-height: 600px) and (max-height: 690px) {
  .setup-tab b {
    font-size: 20px;
  }
  .setup-form-head > p {
    display: none;
  }
  .setup-form-area .form-grid {
    margin: 10px 0 8px;
    gap: 7px 12px;
  }
  .mm-send,
  .mm-code input,
  .mm-code .button,
  .mm-done {
    height: 34px;
  }
  .mm-hint {
    display: none;
  }
  .demo-button {
    margin-top: 6px;
  }
}
@media (min-width: 1000px) and (max-width: 1250px) {
  .admin-heading {
    flex-wrap: wrap;
  }
}
@media (min-width: 1000px) and (max-width: 1440px) {
  .admin-kits {
    grid-template-columns: 228px minmax(0, 1fr);
  }
  .admin-main {
    padding-left: 20px;
    padding-right: 20px;
  }
  .kit-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
}
@media (min-width: 1600px) and (min-height: 900px) {
  .result-table {
    font-size: 13px;
  }
  .result-table td {
    height: 42px;
  }
  .kit-item {
    min-height: 56px;
  }
  .kit-item .kit-no {
    font-size: 18px;
  }
  .kit-item .kit-name {
    font-size: 13px;
  }
  .admin-kits {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .stage-name {
    font-size: 17px;
  }
  .region-row,
  .team-link {
    font-size: 13px;
  }
}

/* ---------- 태블릿 · 모바일 ---------- */
@media (max-width: 999px), (max-height: 599px) {
  .stage-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage-card .team-list {
    max-height: 280px;
  }
  .table-wrap {
    max-height: 70vh;
  }
}
@media (max-width: 1080px) {
  .admin-summary {
    padding: 24px 22px;
  }
  .admin-kits {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .admin-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-heading-actions {
    justify-content: flex-start;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .setup-tab b {
    font-size: 21px;
  }
  .setup-tab {
    gap: 6px;
    padding-bottom: 10px;
  }
  .form-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid.cols-3 label:nth-child(3) {
    grid-column: 1/-1;
  }
  .mm-code {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .mm-code .text-button {
    grid-column: 1/-1;
    justify-self: end;
    padding: 0 4px;
  }
  .admin-summary {
    padding: 18px 16px;
  }
  .admin-heading h1 {
    font-size: 21px;
  }
  .stage-board {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage-body {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .admin-kits {
    grid-template-columns: minmax(0, 1fr);
  }
  .kit-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
  }
  .kit-panel-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .kit-panel .parts-heading {
    display: flex;
    gap: 8px;
  }
  .kit-list-download {
    width: auto;
    padding: 0 10px;
  }
  .kit-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .kit-item {
    width: auto;
    flex-shrink: 0;
    min-height: 44px;
    padding: 6px 10px;
  }
  .kit-item .kit-name small {
    display: none;
  }
  .kit-legend {
    display: none;
  }
  .admin-main {
    padding: 18px 16px;
  }
  .admin-heading-actions {
    width: 100%;
    justify-content: space-between;
  }
  .admin-heading-actions .button {
    flex: 1;
  }
  .detail-step-head {
    flex-wrap: wrap;
  }
  .part-info-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 420px) {
  .form-grid.cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .region-filter {
    width: 100%;
  }
}

/* ---------- v1.2: 관리 개발 키트 목록을 항상 표시 ----------
   전체 키트 보기 = 검수 현황(관리자-5) / 키트 선택 = 결과 표 / 검수 상태 = 오른쪽에서 열리는 상세 레이어 */
.admin-main {
  position: relative;
}
.admin-main > .admin-summary {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.admin-main > .admin-summary .admin-heading {
  flex-wrap: wrap;
}
.stage-card {
  container-type: inline-size;
}
.stage-top.filtered {
  background: var(--tint);
}
.stage-top.filtered .stage-name small {
  color: var(--accent-strong);
}
/* 카드 폭이 좁으면 지역 목록을 팀 목록 위 2열로 */
@container (max-width:259px) {
  .stage-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .region-list {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px;
  }
  .region-row {
    padding: 4px 6px;
    font-size: 11px;
  }
  .stage-top {
    gap: 8px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .stage-top b {
    font-size: 26px;
  }
}

/* 검수 단계 상세: 결과 표 위에 오른쪽 → 왼쪽으로 겹쳐 열리는 레이어 */
.kit-detail-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--canvas);
  padding: 24px 28px 18px 44px;
  outline: 0;
  transform: translateX(100%);
  transition:
    transform 0.34s cubic-bezier(0.22, 0.8, 0.26, 1),
    box-shadow 0.34s ease;
}
.kit-detail-layer.open {
  transform: none;
  box-shadow: -26px 0 46px -22px rgba(22, 26, 40, 0.32);
}
.kit-detail-layer .detail-grid {
  flex: 1;
  min-height: 0;
}
.layer-actions {
  flex-direction: column;
  align-items: flex-end;
  align-self: stretch;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}
.layer-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.layer-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.layer-close:hover {
  background: var(--tint);
  border-color: var(--accent-border);
  filter: none;
}
.layer-handle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 24px;
  height: 88px;
  padding: 0;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: white;
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 5px 0 14px -8px rgba(22, 26, 40, 0.25);
}
.layer-handle svg {
  width: 10px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.layer-handle:hover {
  background: var(--tint);
  width: 28px;
  filter: none;
}
.detail-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.detail-pager > #detailPrev {
  justify-self: start;
}
.detail-pager > #detailPage {
  text-align: center;
}
.pager-actions {
  justify-self: end;
  display: flex;
  gap: 8px;
}
.pager-actions .detail-close {
  min-width: 86px;
}
body[data-theme='multicampus'] .layer-close:hover,
body[data-theme='multicampus'] .layer-handle:hover {
  background: #ececec;
  border-color: #cfcfcf;
}
@media (prefers-reduced-motion: reduce) {
  .kit-detail-layer {
    transition: none;
  }
}
@media (min-width: 1000px) and (min-height: 600px) {
  .admin-main {
    overflow: clip;
  }
  .kit-detail-layer {
    padding: clamp(16px, 2.4dvh, 26px) clamp(20px, 2vw, 32px) 14px clamp(38px, 2.6vw, 48px);
  }
}
@media (min-width: 1000px) and (min-height: 600px) and (max-height: 820px) {
  .layer-actions {
    gap: 6px;
  }
  .layer-close {
    width: 32px;
    height: 32px;
  }
}
/* 태블릿·모바일: 화면 전체를 덮는 레이어 */
@media (max-width: 999px), (max-height: 599px) {
  .kit-detail-layer {
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow: auto;
    padding: 18px 16px 18px 36px;
  }
  .kit-detail-layer .detail-grid {
    flex: none;
  }
  .layer-handle {
    position: fixed;
  }
  .kit-detail-layer:not(.open) .layer-handle {
    visibility: hidden;
  }
}
@media (max-width: 760px) {
  .layer-actions {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .layer-actions .button {
    flex: 0 1 auto;
  }
  .detail-pager {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }
  .detail-pager > #detailPage {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .pager-actions {
    grid-column: 2;
  }
}

.stage-top.filtered .part-number {
  background: white;
}
@container (max-width:209px) {
  .region-row .region-code {
    display: none;
  }
  .region-row {
    gap: 4px;
  }
  .stage-name small {
    display: none;
  }
}

/* ---------- v1.2.1: web-service 검수 결과(결과 JSON) 반영 ----------
   구성품 결과의 '확인 필요'(needs_review)와 검사의 '검사 못 함'(not_run)을 주황으로 표시합니다. */
:root {
  --review: #d29a2b;
  --review-text: #8a5d0f;
  --review-tint: #fff8ea;
  --review-border: #efd49c;
}
.state-chip.review {
  background: var(--review-tint);
  color: var(--review-text);
  border-color: var(--review-border);
}
.detail-step.review .step-number {
  background: var(--review-tint);
  border-color: var(--review-border);
  color: var(--review-text);
}
.result-table tr.row-issue td.c-state .state-chip.review {
  font-weight: 600;
}
.photo-empty .photo-ref-img {
  max-height: 150px;
  max-width: 80%;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 6px;
}
.part-info-body .device-illustration img {
  max-width: 150px;
  max-height: 120px;
  object-fit: contain;
}
