/* =========================================================
   Pollex 직무평가 시스템
   Ink(#0E082D) + Slate(#737373) — 로고 두 색에서 출발한 체계
   점수 1~5는 잉크 농도 단계로 표현 (평가표가 그대로 히트맵이 됨)
   ========================================================= */
:root {
  --ink: #0E082D;
  --ink-2: #2A2350;
  --ink-soft: #4A4470;
  --slate: #737373;
  --slate-2: #9A9AA4;
  --paper: #F5F5F8;
  --surface: #FFFFFF;
  --line: #E4E4EB;
  --line-strong: #CFCFDA;
  --focus: #3B5BDB;
  --ok: #1E7F55;
  --ok-bg: #E7F4EE;
  --warn: #9A6200;
  --warn-bg: #FFF4DE;
  --bad: #B42318;
  --bad-bg: #FDECEA;
  /* 점수 잉크 단계 */
  --s0: #FFFFFF;
  /* 선택된 점수: 밝은 하늘색 계열(점수가 높을수록 조금 진함), 글자는 진한 남색 */
  --s1: #F0F9FF;
  --s2: #E0F2FE;
  --s3: #CDEBFC;
  --s4: #B9E3FA;
  --s5: #A5DAF8;
  --sky-on: #DDF0FD;
  --sky-line: #5BB4E8;
  /* 진행 표시용 (점수 색과 별도) */
  --p1: #CFCCE2;
  --p2: #9C97C2;
  --p3: #5C558F;
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --shadow-pop: 0 10px 30px rgba(14, 8, 45, .16), 0 2px 6px rgba(14, 8, 45, .08);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  --topbar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "tnum" 1;
  word-break: keep-all;
}
a { color: var(--ink); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
code { font-size: .92em; background: var(--paper); padding: 1px 5px; border-radius: 4px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-soft); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: rgba(14, 8, 45, .06); border-color: transparent; }
.btn--danger { color: var(--bad); }
.btn--danger:hover { border-color: var(--bad); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn--block { width: 100%; height: 48px; font-size: 15px; }

/* ---------- 폼 ---------- */
.form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.form legend { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field select, .field textarea, .input {
  width: 100%; height: 44px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 8, 45, .12);
}
.field .hint, .hint { font-size: 12.5px; color: var(--slate); margin: 6px 0 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 8px 0; }
.check input { margin-top: 4px; }

/* ---------- 알림 ---------- */
.notice { padding: 12px 14px; border-radius: var(--radius-s); font-size: 14px; margin: 0 0 16px; border: 1px solid transparent; }
.notice--ok { background: var(--ok-bg); color: var(--ok); border-color: #CBE7D9; }
.notice--warn { background: var(--warn-bg); color: var(--warn); border-color: #F3DDB0; }
.notice--bad { background: var(--bad-bg); color: var(--bad); border-color: #F6CFCB; }
.notice--info { background: #EEF0FA; color: var(--ink-2); border-color: #DADDF0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--paper); color: var(--slate);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--bad-bg); color: var(--bad); }
.badge--muted { background: #EEEEF2; color: var(--slate); }

/* =========================================================
   로그인 / 설치
   ========================================================= */
.auth-body {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(420px, 46fr) 54fr;
  background: var(--surface);
}
.auth-side {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 100% 100%, #1D1650 0%, var(--ink) 60%);
  color: #fff;
  padding: clamp(36px, 5vw, 72px) clamp(32px, 5vw, 80px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-side__mark {
  position: absolute; z-index: -1; pointer-events: none;
  right: -8%; bottom: -10%; width: min(62%, 560px); opacity: .07;
}
.auth-side__logo { width: clamp(120px, 9vw, 160px); filter: brightness(0) invert(1); opacity: .95; }
.auth-side__body { max-width: 520px; }
.auth-side__client { font-size: clamp(15px, 1.1vw, 18px); color: rgba(255,255,255,.7); margin: 0 0 8px; }
.auth-side__title { font-size: clamp(30px, 3vw, 48px); line-height: 1.22; font-weight: 700; letter-spacing: -.025em; margin: 0 0 16px; }
.auth-side__group { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 18px; font-size: clamp(16px, 1.2vw, 20px); font-weight: 600; color: rgba(255,255,255,.78); }
.auth-side__group span { display: inline-block; padding: 4px 14px; border-radius: 999px; background: #A5DAF8; color: #0E082D; font-weight: 700; }
.auth-side__meta { font-size: 14.5px; color: rgba(255,255,255,.62); margin: 0; }
.auth-side__meta b { color: #fff; font-weight: 600; }
.auth-steps { list-style: none; counter-reset: as; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; gap: 0; }
.auth-steps li {
  counter-increment: as; position: relative; padding: 0 0 22px 50px;
}
.auth-steps li::before {
  content: counter(as); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.32); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.auth-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 1px; background: rgba(255,255,255,.16);
}
.auth-steps li:first-child::before { background: #fff; color: var(--ink); border-color: #fff; }
.auth-steps b { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 3px; }
.auth-steps span { display: block; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.62); }
.auth-side__foot { font-size: 12.5px; color: rgba(255,255,255,.45); margin: 0; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px clamp(24px, 4vw, 64px); background: var(--surface); }
.auth-panel { width: 100%; max-width: 420px; }
.auth-client-logo { display: block; height: clamp(30px, 2.4vw, 40px); width: auto; max-width: 240px; object-fit: contain; object-position: left center; margin: 0 0 clamp(28px, 3.4vw, 44px); }
.auth-panel__kicker { font-size: 13px; font-weight: 600; color: var(--slate); margin: 0 0 10px; }
.auth-panel h2 { font-size: clamp(26px, 2vw, 32px); letter-spacing: -.025em; margin: 0 0 8px; }
.auth-panel .lead { color: var(--slate); margin: 0 0 30px; font-size: 15px; }
.auth-panel .field input { height: 50px; font-size: 15.5px; }
.auth-panel .btn--block { height: 52px; font-size: 16px; margin-top: 6px; }
.auth-panel .help { margin-top: 22px; font-size: 13px; color: var(--slate); line-height: 1.6; }
.auth-privacy {
  margin: 22px 0 0; padding: 15px 18px 15px 20px; border-radius: var(--radius-s);
  background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--sky-line);
  font-size: 13.5px; line-height: 1.7; color: var(--ink-soft);
}
.auth-privacy p { margin: 0; }
.auth-privacy p + p { margin-top: 4px; }
.auth-privacy strong {
  color: var(--ink); font-weight: 700;
  background: linear-gradient(transparent 55%, #C4E6FB 55%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 2px;
}
.auth-privacy .is-note { margin-top: 8px; font-size: 12.5px; color: var(--slate); }
.hint--bad { color: var(--bad, #C2410C); font-weight: 500; }
.hint--ok { color: #0B7A55; font-weight: 500; }
.auth-chip { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: #E6F4FD; color: #0B5C8E; border: 1px solid #BFE2F8; font-size: 12.5px; font-weight: 700; vertical-align: 1px; }
.pick--link { justify-content: space-between; text-decoration: none; color: var(--ink); }
.pick--link svg { color: var(--slate); }
.pick-list { display: grid; gap: 8px; margin: 0 0 18px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-size: 15.5px; font-weight: 600; transition: border-color .12s, background .12s; }
.pick:hover { border-color: var(--ink-soft); }
.pick input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.pick:has(input:checked) { border-color: var(--ink); background: #F3F2F9; box-shadow: 0 0 0 1px var(--ink) inset; }
.auth-notes { list-style: none; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.auth-notes li { position: relative; padding-left: 16px; font-size: 13.5px; color: var(--slate); line-height: 1.55; }
.auth-notes li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--slate-2); }

@media (min-width: 1700px) {
  .auth-panel { max-width: 460px; }
}
@media (max-width: 900px) {
  .auth-body { grid-template-columns: 1fr; }
  .auth-side { padding: 26px 22px 28px; gap: 24px; }
  .auth-side__mark { width: 220px; right: -40px; bottom: -50px; }
  .auth-side__logo { width: 108px; }
  .auth-side__title { font-size: 25px; margin-bottom: 8px; }
  .auth-steps, .auth-side__foot { display: none; }
  .auth-main { align-items: flex-start; padding: 28px 22px 40px; }
  .auth-panel .lead { margin-bottom: 22px; }
}

/* 설치·관리자 로그인처럼 단일 카드형 */
body.auth-single { display: block; background: var(--paper); min-height: 100vh; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 56px 20px 32px; }
.auth-wrap--wide { max-width: 620px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 34px 32px; }
.auth-logo { height: 46px; width: auto; display: block; margin-bottom: 22px; }
.auth-title { font-size: 22px; margin: 0 0 22px; letter-spacing: -.02em; }
.auth-foot { text-align: center; color: var(--slate-2); font-size: 12px; margin-top: 18px; }
.check-list { list-style: none; padding: 0; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.check-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list em { font-style: normal; font-size: 12.5px; }
.check-list .is-ok em { color: var(--ok); }
.check-list .is-bad em { color: var(--bad); font-weight: 700; }
.check-list .is-warn em { color: var(--warn); }
.code-box { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); margin-bottom: 14px; }

/* =========================================================
   평가 화면
   ========================================================= */
.sv-body { background: var(--paper); }
.sv-top {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
}
.sv-top__logo { height: 26px; filter: brightness(0) invert(1); }
.sv-top__title { font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,.88); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-top__sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); }
.sv-top__spacer { flex: 1; }
.sv-top__user { font-size: 13px; color: rgba(255,255,255,.7); white-space: nowrap; }
.sv-top__user b { color: #fff; font-weight: 600; }
.sv-top .btn { height: 32px; background: transparent; color: #fff; border-color: rgba(255,255,255,.28); font-size: 13px; }
.sv-top .btn:hover { border-color: #fff; }

.sv-wrap { max-width: 1480px; margin: 0 auto; padding: 24px 20px 120px; }

.sv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 18px; }
.sv-head h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.025em; margin: 0; }
.sv-head__logo { display: block; height: 30px; width: auto; max-width: 220px; object-fit: contain; object-position: left center; margin: 0 0 14px; }
.sv-head__client { color: var(--slate); font-size: 14px; margin: 0 0 6px; }
.sv-head__guide { color: var(--ink-soft); font-size: 14px; margin: 10px 0 0; max-width: 72ch; white-space: pre-line; }

.sv-status { text-align: right; }
.sv-status__num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.sv-status__num small { font-size: 15px; color: var(--slate); font-weight: 600; margin-left: 4px; }
.sv-status__save { font-size: 12.5px; color: var(--slate); margin-top: 6px; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.sv-status__save i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sv-status__save.is-saving i { background: var(--warn); animation: pulse 1s infinite; }
.sv-status__save.is-error { color: var(--bad); }
.sv-status__save.is-error i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }

/* 직무 진행 스트립: 직무 하나당 한 칸, 채운 비율만큼 잉크가 진해짐. 클릭하면 해당 직무로 이동 */
.sv-strip { display: flex; gap: 2px; height: 26px; margin: 0 0 6px; padding: 4px 0; overflow: hidden; }
.sv-strip button {
  flex: 1 1 0; min-width: 0; height: 100%; border: 0; padding: 0; border-radius: 2px;
  background: var(--line); cursor: pointer; position: relative;
}
.sv-strip button[data-fill="1"] { background: var(--p1); }
.sv-strip button[data-fill="2"] { background: var(--p2); }
.sv-strip button[data-fill="3"] { background: var(--ink); }
.sv-strip button.is-current { outline: 2px solid var(--focus); outline-offset: 1px; }
.sv-strip button:hover { transform: scaleY(1.25); }
.sv-strip-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--slate); margin-bottom: 18px; }

/* 툴바 */
.sv-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 12px; border-bottom: 0;
}
.sv-search { position: relative; flex: 0 1 240px; }
.sv-search input { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 0 10px 0 32px; font-size: 14px; background: var(--paper); }
.sv-search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--slate); }
.sv-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; user-select: none; color: var(--ink-soft); }
.sv-toggle input { width: 16px; height: 16px; accent-color: var(--ink); }
.sv-legend { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12.5px; color: var(--slate); }
.sv-legend b { width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--line); }
.sv-legend span { margin: 0 6px; }
.sv-kbd { font-size: 12px; color: var(--slate); display: flex; gap: 4px; align-items: center; }
.sv-kbd kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }

/* 점수 잉크 */
.sc-1 { background: var(--s1) !important; color: var(--ink) !important; }
.sc-2 { background: var(--s2) !important; color: var(--ink) !important; }
.sc-3 { background: var(--s3) !important; color: var(--ink) !important; }
.sc-4 { background: var(--s4) !important; color: var(--ink) !important; }
.sc-5 { background: var(--s5) !important; color: var(--ink) !important; }

/* 평가 매트릭스 */
.sv-gridwrap {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  overflow: auto; max-height: calc(100vh - var(--topbar-h) - 150px); max-height: calc(100dvh - var(--topbar-h) - 150px);
  overscroll-behavior: contain;
}
table.sv-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; }
.sv-grid th, .sv-grid td { border-bottom: 1px solid var(--line); }
.sv-grid thead th {
  position: sticky; top: 0; z-index: 5; background: var(--surface);
  font-size: 13px; font-weight: 700; padding: 10px 4px 9px; text-align: center; vertical-align: bottom;
  border-bottom: 1px solid var(--line-strong);
}
.sv-grid thead th.sv-jobh { left: 0; z-index: 7; text-align: left; padding-left: 16px; width: 260px; min-width: 220px; }
.sv-grid thead th.sv-sumh { width: 92px; min-width: 92px; position: sticky; right: 0; z-index: 7; border-left: 1px solid var(--line); }
.sv-fh { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 6px; border-radius: 5px; cursor: help; font-weight: 700; font-size: 13px; }
.sv-fh:hover, .sv-fh:focus-visible { background: var(--paper); }
.sv-fh svg, .sv-jobname svg { width: 13px; height: 13px; color: var(--slate-2); flex: none; }
.sv-grid tbody th {
  position: sticky; left: 0; z-index: 3; background: var(--surface);
  text-align: left; font-weight: 600; font-size: 14px; padding: 6px 12px 6px 16px;
  border-right: 1px solid var(--line);
}
.sv-grid tbody tr:hover th, .sv-grid tbody tr:hover td.sv-sum { background: #FAFAFC; }
.sv-grid tbody tr.is-target th { box-shadow: inset 3px 0 0 var(--focus); }
.sv-jobname { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; text-align: left; cursor: help; font-weight: 600; font-size: 14px; line-height: 1.35; }
.sv-jobcat { display: block; font-size: 11.5px; color: var(--slate); font-weight: 500; margin-bottom: 1px; }
.sv-jobdesc { display: none; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--ink-soft); font-weight: 400; white-space: pre-line; }
.sv-grid.show-desc .sv-jobdesc { display: block; }
.sv-grid.show-desc thead th.sv-jobh { width: 340px; min-width: 300px; }
.sv-grp { display: inline-block; vertical-align: 1px; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.55; letter-spacing: -.01em; white-space: nowrap; background: #EEEDF6; color: var(--ink); border: 1px solid #DCDAEA; }
.sv-grp--1 { background: #E6F4FD; color: #0B5C8E; border-color: #BFE2F8; }
.sv-grp--2 { background: #EEF7EC; color: #2D6A2A; border-color: #CFE7CB; }
.sv-grp--3 { background: #FDF3E7; color: #8A5414; border-color: #F3DDBF; }
.mv-card__grp { margin: 0 0 4px; }
.sv-jobteam { display: block; font-size: 11.5px; color: var(--slate); font-weight: 400; margin-top: 2px; line-height: 1.35; }
.sv-tip { white-space: pre-line; }
.mv-card__team { font-size: 13px; color: var(--slate); margin: 6px 0 0; }
.mv-card__desc { white-space: pre-line; }
.sv-defs dd { white-space: pre-line; }
.sv-grid td.sv-c { padding: 3px; text-align: center; min-width: 64px; }
.sv-cell {
  width: 100%; height: 36px; border-radius: 6px; border: 1px dashed var(--line-strong);
  background: var(--s0); color: var(--slate-2); font-weight: 700; font-size: 15px;
  cursor: pointer; transition: background .1s, color .1s, border-color .1s;
}
.sv-cell:hover { border-color: var(--ink-soft); border-style: solid; }
.sv-cell.has { border-color: #9ED3F3; border-style: solid; color: var(--ink); }
.sv-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.sv-cell.is-missing { border-color: var(--bad); border-style: solid; background: #FFF7F6; }
.sv-cell[disabled] { cursor: default; }
.sv-grid td.sv-sum {
  position: sticky; right: 0; z-index: 3; background: var(--surface);
  text-align: right; padding: 0 14px; border-left: 1px solid var(--line); white-space: nowrap;
}
.sv-sum b { font-size: 15px; }
.sv-sum small { display: block; font-size: 11.5px; color: var(--slate); line-height: 1.2; }
.sv-sum.is-done b { color: var(--ink); }
.sv-empty { padding: 48px 16px; text-align: center; color: var(--slate); }

/* 점수 선택 팝오버 */
.sv-pop {
  position: fixed; z-index: 80; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-pop);
  padding: 8px; display: none; border: 1px solid var(--line);
}
.sv-pop.is-open { display: block; }
.sv-pop__label { font-size: 12px; color: var(--slate); padding: 2px 4px 8px; max-width: 280px; }
.sv-pop__label b { color: var(--ink); }
.sv-pop__row { display: flex; gap: 4px; }
.sv-pop__row button {
  width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; font-size: 16px; cursor: pointer;
  background: var(--surface);
}
.sv-pop__row button.is-on { outline: 2px solid var(--focus); outline-offset: 1px; }
.sv-pop__clear { width: auto !important; padding: 0 10px; font-size: 13px !important; font-weight: 600 !important; color: var(--slate); }

/* 툴팁 */
.sv-tip {
  position: fixed; z-index: 90; max-width: 320px; background: var(--ink); color: #fff;
  font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 8px; pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.sv-tip.is-on { opacity: 1; transform: none; }
.sv-tip b { display: block; margin-bottom: 3px; font-size: 13.5px; }

/* 하단 제출 바 */
.sv-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.sv-bar__in { max-width: 1480px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.sv-bar__msg { font-size: 14px; color: var(--ink-soft); flex: 1; min-width: 0; }
.sv-bar__msg b { color: var(--ink); }
.sv-bar .btn--primary { height: 44px; padding: 0 22px; }

/* 평가요소 정의 패널 */
.sv-defs { margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sv-defs summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.sv-defs summary::-webkit-details-marker { display: none; }
.sv-defs summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--slate); border-bottom: 2px solid var(--slate); transform: rotate(45deg); margin-left: auto; transition: transform .15s; }
.sv-defs[open] summary::after { transform: rotate(-135deg); }
.sv-defs dl { margin: 0; padding: 4px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; }
.sv-defs dt { font-weight: 700; font-size: 14px; }
.sv-defs dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-soft); }

/* 제출 완료 / 안내 화면 */
.sv-msg { max-width: 560px; margin: 64px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 40px 36px; text-align: center; }
.sv-msg__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 18px; }
.sv-msg__icon svg { width: 28px; height: 28px; }
.sv-msg h2 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.02em; }
.sv-msg p { color: var(--slate); margin: 0 0 6px; }
.sv-msg .btn { margin-top: 22px; }
.sv-banner { display: flex; gap: 12px; align-items: center; background: var(--ok-bg); color: var(--ok); border: 1px solid #CBE7D9; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(14, 8, 45, .42); }
.modal.is-open { display: flex; }
.modal__box { background: var(--surface); border-radius: var(--radius-l); width: 100%; max-width: 460px; padding: 28px 26px 22px; box-shadow: var(--shadow-pop); }
.modal__box h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; }
.modal__box p { margin: 0 0 6px; color: var(--ink-soft); font-size: 14.5px; }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; }

/* ---------- 모바일 평가 (카드형) ---------- */
.mv { display: none; }
@media (max-width: 820px) {
  .sv-top { padding: 0 14px; gap: 10px; }
  .sv-top__title, .sv-top__sep { display: none; }
  .sv-top__user { font-size: 12.5px; }
  .sv-wrap { padding: 16px 14px 150px; }
  .sv-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
  .sv-head h1 { font-size: 21px; }
  .sv-head__guide { font-size: 13.5px; }
  .sv-status { text-align: left; display: flex; align-items: baseline; justify-content: space-between; }
  .sv-status__num { font-size: 22px; }
  .sv-status__save { margin: 0; }
  .sv-strip { height: 22px; gap: 1px; }
  .sv-strip button { border-radius: 1px; }
  .sv-strip button.is-current { outline-offset: 0; }
  .sv-strip-legend { margin-bottom: 14px; }
  .sv-strip-legend span + span { display: none; }
  .dv { display: none !important; }
  .mv { display: block; }
  .sv-bar__in { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
}

.mv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.mv-card__head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.mv-card__count { font-size: 12.5px; color: var(--slate); display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mv-card__count button { background: none; border: 0; color: var(--ink-soft); font-size: 13px; font-weight: 600; padding: 4px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.mv-card__cat { font-size: 12.5px; color: var(--slate); }
.mv-card__name { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.3; }
.mv-card__desc { font-size: 13.5px; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.6; }
.mv-card__sum { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--paper); font-size: 13.5px; color: var(--ink-soft); }
.mv-card__sum b { color: var(--ink); font-size: 16px; }
.mv-f { padding: 14px 18px 16px; border-bottom: 1px solid var(--line); }
.mv-f:last-child { border-bottom: 0; }
.mv-f__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.mv-f__name { font-weight: 700; font-size: 15px; background: none; border: 0; padding: 0; display: inline-flex; gap: 5px; align-items: center; text-align: left; cursor: pointer; }
.mv-f__name svg { width: 14px; height: 14px; color: var(--slate-2); }
.mv-f__def { font-size: 13px; color: var(--slate); margin: -4px 0 10px; display: none; line-height: 1.55; }
.mv-f.is-open .mv-f__def { display: block; }
.mv-f.is-missing { background: #FFF7F6; }
.mv-seg { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 6px; }
.mv-seg button {
  height: 48px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 17px; font-weight: 700; cursor: pointer; color: var(--ink);
  -webkit-tap-highlight-color: transparent; transition: background .1s, transform .08s;
}
.mv-seg button:active { transform: scale(.96); }
.mv-seg button.is-on { background: var(--sky-on) !important; color: var(--ink) !important; border: 2px solid var(--sky-line); }
.mv-seg-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--slate-2); margin-top: 5px; }
.mv-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.mv-nav .btn { height: 48px; }
.mv-next-ready { animation: nudge 1.2s ease-in-out 2; }
@keyframes nudge { 50% { box-shadow: 0 0 0 4px rgba(14,8,45,.18); } }

/* 직무 목록 시트 (모바일) */
.sheet { position: fixed; inset: 0; z-index: 95; display: none; }
.sheet.is-open { display: block; }
.sheet__bg { position: absolute; inset: 0; background: rgba(14,8,45,.42); }
.sheet__box {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; max-height: 82dvh;
  background: var(--surface); border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet__head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet__head h3 { margin: 0 0 10px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.sheet__head input { width: 100%; height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; background: var(--paper); }
.sheet__list { overflow: auto; padding: 6px 0; }
.sheet__list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 14.5px;
}
.sheet__list button:hover, .sheet__list button.is-current { background: var(--paper); }
.sheet__list i { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 2px solid var(--line-strong); display: grid; place-items: center; font-style: normal; font-size: 11px; color: #fff; }
.sheet__list i.is-part { border-color: var(--p2); background: linear-gradient(90deg, var(--p2) 50%, transparent 50%); }
.sheet__list i.is-full { border-color: var(--ink); background: var(--ink); }
.sheet__list span { flex: 1; }
.sheet__list em { font-style: normal; font-size: 12px; color: var(--slate); }

/* =========================================================
   관리자
   ========================================================= */
.ad-body { background: var(--paper); }
.ad { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.ad-rail { background: var(--ink); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.ad-rail__logo { display: block; padding: 2px 10px 20px; }
.ad-rail__logo img { height: 34px; filter: brightness(0) invert(1); }
.ad-rail__label { font-size: 12px; color: rgba(255,255,255,.45); padding: 16px 10px 6px; }
.ad-rail a { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.78); text-decoration: none; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.ad-rail a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ad-rail a.is-on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.ad-rail a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.ad-rail__proj { padding: 10px; margin: 4px 0 2px; border-radius: 8px; background: rgba(255,255,255,.06); }
.ad-rail__proj b { display: block; font-size: 14px; line-height: 1.35; }
.ad-rail__proj small { color: rgba(255,255,255,.55); font-size: 12px; }
.ad-rail__foot { margin-top: auto; padding: 14px 10px 0; font-size: 12.5px; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.1); }
.ad-rail__foot a { padding: 6px 0; font-size: 13px; }

.ad-main { padding: 28px 32px 64px; min-width: 0; }
.ad-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ad-head h1 { font-size: 24px; letter-spacing: -.025em; margin: 0; line-height: 1.3; }
.ad-head p { margin: 4px 0 0; color: var(--slate); font-size: 14px; }
.ad-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel__head h2 { font-size: 15.5px; margin: 0; letter-spacing: -.01em; }
.panel__head p { margin: 2px 0 0; font-size: 13px; color: var(--slate); }
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }

/* KPI 스트립: 한 줄로 이어진 지표 */
.kpis { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.kpi { padding: 18px 20px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; background: var(--ink); color: #fff; }
.kpi__label { font-size: 13px; color: var(--slate); margin-bottom: 6px; }
.kpi:first-child .kpi__label { color: rgba(255,255,255,.65); }
.kpi__value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi__value small { font-size: 14px; font-weight: 600; margin-left: 3px; color: var(--slate); }
.kpi:first-child .kpi__value small { color: rgba(255,255,255,.6); }
.kpi__meter { height: 6px; background: rgba(255,255,255,.18); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.kpi__meter span { display: block; height: 100%; background: #fff; border-radius: 3px; }
.kpi__sub { font-size: 12.5px; color: var(--slate); margin-top: 6px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpi:first-child { grid-column: 1 / -1; } .kpi:nth-child(2), .kpi:nth-child(4) { border-left: 0; } .kpi:nth-child(n+2) { border-top: 1px solid var(--line); } }

/* 표 */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--slate); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFAFC; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FBFBFD; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl .actions form { display: inline; }
.tbl-empty { padding: 36px 16px; text-align: center; color: var(--slate); font-size: 14px; }

/* 그룹별 진행 막대 */
.gbar { display: flex; height: 10px; background: #EEEEF3; border-radius: 5px; overflow: hidden; min-width: 140px; }
.gbar span { display: block; height: 100%; }
.gbar .g-done { background: var(--ink); }
.gbar .g-prog { background: var(--p2); }
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--slate); }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 일별 제출 추이 */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.trend__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.trend__bar { width: 100%; max-width: 34px; background: var(--p3); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.trend__bar em { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }
.trend__col small { font-size: 11px; color: var(--slate); white-space: nowrap; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

/* 링크 공유 */
.share { display: flex; gap: 8px; align-items: center; }
.share input { flex: 1; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 0 12px; background: var(--paper); font-size: 14px; min-width: 0; }

/* 필터 바 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.filters .input { height: 36px; width: auto; min-width: 140px; font-size: 14px; }
.filters .input[type="search"] { min-width: 220px; }

.pager { display: flex; gap: 4px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 6px; text-decoration: none; font-size: 13.5px; padding: 0 8px; }
.pager a:hover { background: var(--paper); }
.pager .is-on { background: var(--ink); color: #fff; font-weight: 700; }

/* 프로젝트 목록 */
.proj-list { display: grid; gap: 12px; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 20px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.proj:hover { border-color: var(--line-strong); }
.proj h3 { margin: 0 0 3px; font-size: 16.5px; letter-spacing: -.01em; }
.proj p { margin: 0; font-size: 13px; color: var(--slate); }
.proj__rate { font-size: 13px; color: var(--slate); }
.proj__rate b { color: var(--ink); font-size: 15px; }
.proj__rate .gbar { margin-top: 6px; }
@media (max-width: 760px) { .proj { grid-template-columns: 1fr; gap: 10px; } }

/* 업로드 */
.upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .upload-grid { grid-template-columns: 1fr; } }
.upload { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.upload h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.upload h3 span { font-size: 13px; color: var(--slate); font-weight: 600; }
.upload p { margin: 0; font-size: 13px; color: var(--slate); line-height: 1.55; }
.upload input[type="file"] { font-size: 13px; width: 100%; }
.upload .btn { align-self: flex-start; }
.list-compact { margin: 0; padding: 0; list-style: none; font-size: 13.5px; max-height: 260px; overflow: auto; border-top: 1px solid var(--line); }
.list-compact li { padding: 7px 2px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.list-compact li span:first-child { color: var(--slate-2); width: 24px; flex: none; text-align: right; }
.list-compact li em { font-style: normal; color: var(--slate); font-size: 12.5px; margin-left: auto; }

.steps { counter-reset: st; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: st; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.steps li::before { content: counter(st); width: 24px; height: 24px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.steps li.is-done::before { content: "✓"; background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li a { font-weight: 600; }

.ad-mobilebar { display: none; }
@media (max-width: 900px) {
  .ad { grid-template-columns: 1fr; }
  .ad-rail { display: none; }
  .ad-mobilebar { display: flex; position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; padding: 10px 14px; gap: 6px; overflow-x: auto; align-items: center; }
  .ad-mobilebar img { height: 24px; filter: brightness(0) invert(1); margin-right: 8px; }
  .ad-mobilebar a { color: rgba(255,255,255,.8); text-decoration: none; font-size: 13.5px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
  .ad-mobilebar a.is-on { background: rgba(255,255,255,.14); color: #fff; }
  .ad-main { padding: 20px 14px 48px; }
  .ad-head h1 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .sv-top, .sv-bar, .sv-toolbar, .ad-rail, .ad-mobilebar { display: none !important; }
  .sv-gridwrap { max-height: none; overflow: visible; }
}

/* 평가그룹별 링크 */
.link-list { display: grid; gap: 10px; }
.link-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.link-row__name b { display: block; font-size: 15px; }
.link-row__name span { font-size: 12.5px; color: var(--slate); }
.link-row .share { margin: 0; }
@media (max-width: 760px) { .link-row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Go 버전 추가분 ---------- */
.inline-form { margin: 0; }
.sv-msg__icon--warn { background: var(--warn-bg); color: var(--warn); }
.ad-rail__foot .btn--ghost { color: rgba(255,255,255,.75); padding: 0; height: 30px; }
.legend-row .is-done { background: var(--ink); }
.legend-row .is-prog { background: var(--p2); }
.legend-row .is-none { background: #EEEEF3; }
.panel__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
