/* [ LSK Global H&B 인성검사 | CI: #BF5A18 / #ED7D31 / #FCE4D6 ] */
:root {
  --primary: #BF5A18;
  --secondary: #ED7D31;
  --tint: #FCE4D6;
  --ink: #2b2b2b;
  --muted: #777;
  --line: #e3ddd7;
  --green: #2e8b57;
  --orange: #e08a00;
  --red: #c62828;
  --bg: #faf7f4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

.container { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.wide-container { max-width: 1080px; }
.report-container { max-width: 900px; }

h1 { font-size: 24px; margin-bottom: 8px; }
h2 { font-size: 18px; color: var(--primary); margin-bottom: 12px; }
h3 { font-size: 15px; margin-bottom: 8px; }

.brand { color: var(--primary); font-weight: bold; letter-spacing: 0.5px; margin-bottom: 12px; }
.brand.small { font-size: 14px; margin-bottom: 4px; }
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 12px; font-weight: normal; }
.mono { font-family: Consolas, monospace; letter-spacing: 1px; }
.center { text-align: center; }
.note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── 카드/폼 ── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 28px; margin-bottom: 20px;
}
.center-card { max-width: 460px; margin: 8vh auto 0; text-align: center; }
.center-card.wide { max-width: 640px; text-align: left; }
.center-card.wide h1, .center-card.wide .brand { text-align: center; }

.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; text-align: left; }
label { font-size: 14px; font-weight: bold; display: block; }
input[type=text], input[type=password] {
  width: 100%; padding: 11px 12px; margin-top: 5px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
  font-family: inherit;
}
input:focus { outline: 2px solid var(--secondary); border-color: var(--secondary); }

.alert {
  background: #fdecea; color: var(--red); border: 1px solid #f5c6c3;
  border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: 14px;
}

.guide { margin: 18px 0 24px 20px; }
.guide li { margin-bottom: 8px; }
.guide strong { color: var(--primary); }

/* ── 버튼 ── */
.btn {
  display: inline-block; border: none; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 15px; padding: 10px 20px;
  text-decoration: none; text-align: center; color: var(--ink); background: #eee;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #a54c12; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #f0b9b6; }
.btn-danger:hover { background: #fdecea; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ── 설문 화면 ── */
.survey-top {
  position: sticky; top: 0; background: var(--bg); z-index: 10;
  padding: 12px 0 10px; border-bottom: 2px solid var(--tint); margin-bottom: 18px;
}
.survey-top-row { display: flex; justify-content: space-between; align-items: center; }
.timer {
  font-family: Consolas, monospace; font-size: 22px; font-weight: bold;
  color: var(--primary); background: var(--tint); border-radius: 8px; padding: 4px 14px;
}
.timer-danger { color: #fff; background: var(--red); }
.progress-wrap { margin-top: 8px; }
.progress-bar { height: 8px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--secondary); border-radius: 4px; transition: width .3s; }
.progress-label { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: right; }

.q-block {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 18px 20px; margin-bottom: 14px;
}
.q-text { font-size: 16px; font-weight: bold; padding: 0 4px; }
.q-no { color: var(--primary); margin-right: 4px; }
.likert-row { display: flex; gap: 10px; margin-top: 14px; }
.likert-card {
  flex: 1; text-align: center; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 14px 6px; cursor: pointer; font-size: 14px; font-weight: normal;
  background: #fff; user-select: none;
}
.likert-card:hover { border-color: var(--secondary); background: #fef4ee; }
.likert-card input { position: absolute; opacity: 0; }
.likert-card:has(input:checked) {
  border-color: var(--primary); background: var(--tint); font-weight: bold; color: var(--primary);
}
.survey-nav { display: flex; justify-content: space-between; margin-top: 24px; }

.done-mark {
  width: 72px; height: 72px; border-radius: 50%; background: var(--tint);
  color: var(--primary); font-weight: bold; display: flex; align-items: center;
  justify-content: center; margin: 10px auto 16px; font-size: 17px;
}

/* ── 관리자 ── */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.issue-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.issue-form label { flex: 1; min-width: 180px; }
.issue-form .btn { height: 44px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { background: var(--tint); color: var(--primary); font-size: 13px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; }
.badge-green { background: #e5f3ea; color: var(--green); }
.badge-orange { background: #fdf1dc; color: var(--orange); }
.badge-gray { background: #eee; color: #666; }

/* ── 결과서 ── */
.report-toolbar { display: flex; justify-content: space-between; margin-bottom: 16px; }
.report { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 36px 40px; }
.report section { margin-bottom: 28px; }

.report-header { border-bottom: 3px solid var(--primary); padding-bottom: 16px; margin-bottom: 24px; }
.report-header h1 { color: var(--primary); font-size: 22px; }
.report-header .en { font-size: 14px; color: var(--muted); font-weight: normal; }
.meta-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.meta-table th {
  background: var(--tint); color: var(--primary); width: 12%;
  padding: 6px 10px; border: 1px solid var(--line); text-align: left;
}
.meta-table td { width: 38%; padding: 6px 10px; border: 1px solid var(--line); }

.verdict-row { display: flex; gap: 14px; }
.verdict-box {
  flex: 1; text-align: center; border-radius: 10px; padding: 14px;
  border: 2px solid var(--line); background: #fafafa;
}
.v-label { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.v-value { font-size: 22px; font-weight: bold; }
.v-pass { border-color: var(--green); } .v-pass .v-value { color: var(--green); }
.v-warn { border-color: var(--orange); } .v-warn .v-value { color: var(--orange); }
.v-fail { border-color: var(--red); } .v-fail .v-value { color: var(--red); }

.total-row { display: flex; align-items: center; gap: 28px; }
.total-num { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.total-pct { font-size: 46px; font-weight: bold; color: var(--primary); }
.total-unit { font-size: 13px; color: var(--muted); }
.total-grade {
  font-size: 24px; font-weight: bold; border-radius: 8px; padding: 2px 12px; margin-left: 6px;
}
.grade-bar-wrap { flex: 1; }
.grade-bar {
  position: relative; display: flex; height: 30px; border-radius: 6px; overflow: visible;
  border: 1px solid var(--line);
}
.grade-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: bold; color: #8a5a3a;
}
.seg-D { background: #f3ece7; border-radius: 6px 0 0 6px; }
.seg-C { background: #fce4d6; }
.seg-B { background: #f8c9a8; }
.seg-A { background: #ED7D31; color: #fff; }
.seg-S { background: #BF5A18; color: #fff; border-radius: 0 6px 6px 0; }
.grade-marker {
  position: absolute; top: -6px; bottom: -6px; width: 4px; background: var(--ink);
  border-radius: 2px; transform: translateX(-50%);
}
.grade-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

.grade-S, .grade-A { background: var(--tint); color: var(--primary); }
.grade-B { background: #eef3ee; color: #3b6e4f; }
.grade-C, .grade-D { background: #eee; color: #666; }
.grade-chip { display: inline-block; border-radius: 6px; padding: 1px 10px; font-weight: bold; }

.comp-table .comp-name { font-weight: bold; white-space: nowrap; }
.comp-table .comp-def { font-size: 12.5px; color: #555; }
.bar-col { width: 24%; min-width: 140px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pct-bar { height: 12px; background: #f1ece8; border-radius: 6px; overflow: hidden; }
.pct-fill { height: 100%; background: var(--secondary); border-radius: 6px; }
.pct-fill.fit { background: var(--primary); }

.two-col { display: flex; gap: 16px; }
.sw-box { flex: 1; border-radius: 10px; padding: 16px 18px; border: 1px solid var(--line); }
.sw-strength { background: #fef7f2; border-color: #f2cdb4; }
.sw-strength h3 { color: var(--primary); }
.sw-weakness { background: #f7f7f7; }
.sw-weakness h3 { color: #555; }
.sw-item { margin-bottom: 10px; }
.sw-item p { font-size: 13px; color: #555; margin-top: 2px; }

.iv-title { color: var(--primary); margin-top: 16px; border-left: 4px solid var(--secondary); padding-left: 8px; }
.iv-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 10px 0; }
.iv-scale { font-size: 12px; font-weight: bold; color: var(--secondary); }
.iv-main { font-weight: bold; margin: 4px 0 6px; }
.iv-block ul { margin-left: 20px; font-size: 13.5px; color: #444; }
.iv-obs { font-size: 13px; color: var(--muted); margin-top: 8px; }
.iv-obs strong { color: var(--primary); }

.detail-table th { width: 30%; background: #f7f4f1; }
.flag-list { margin-left: 18px; }
.report-footer {
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px;
  font-size: 11px; color: var(--muted); text-align: center;
}

/* ── 인쇄 (A4) ── */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 12px; }
  .container { max-width: none; padding: 0; }
  .no-print, .report-toolbar { display: none !important; }
  .admin-only { display: none; }           /* 타당도 상세: 인쇄 시 숨김 */
  .report { border: none; border-radius: 0; padding: 0; }
  .report section { break-inside: avoid; margin-bottom: 18px; }
  .page-break-before { break-before: page; }
  .verdict-box, .grade-seg, .meta-table th, .table thead th,
  .pct-bar, .pct-fill, .sw-box, .badge, .total-grade, .grade-chip {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .total-pct { font-size: 36px; }
}

@media (max-width: 640px) {
  .likert-row { flex-wrap: wrap; }
  .likert-card { min-width: 45%; }
  .two-col, .verdict-row, .total-row { flex-direction: column; }
}

/* ═══ 인재 프로파일 리포트 v2 (재설계) ═══ */
.tp-header { border-bottom: 3px solid var(--primary); padding-bottom: 14px; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tp-title h1 { font-size: 22px; color: var(--primary); margin-bottom: 2px; }
.tp-sub { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.tp-meta { text-align: right; font-size: 13px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }

.tp-summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.radar-wrap { flex: 1 1 300px; max-width: 360px; margin: 0 auto; }
.radar { width: 100%; height: auto; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-mid { stroke: #b5aca4; stroke-width: 1.4; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-shape { fill: rgba(237, 125, 49, 0.30); stroke: var(--primary); stroke-width: 2; }
.radar-label { font-size: 12px; fill: var(--ink); font-weight: bold; }

.tp-summary-side { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.tscore-card { background: var(--tint); border-left: 5px solid var(--primary); border-radius: 6px;
  padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.ts-label { font-size: 12px; color: var(--muted); }
.ts-value { font-size: 40px; font-weight: bold; color: var(--primary); line-height: 1.1; }
.ts-pct { font-size: 12px; color: var(--muted); }
.ts-level { font-weight: bold; font-size: 14px; }
.summary-line { font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }

.rel-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rel-item { flex: 1 1 200px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px; border-top-width: 4px; }
.rel-item .rel-name { font-size: 13px; font-weight: bold; }
.rel-item .rel-word { font-size: 20px; font-weight: bold; }
.rel-item .rel-desc { font-size: 11px; color: var(--muted); }
.rel-pass { border-top-color: var(--green); } .rel-pass .rel-word { color: var(--green); }
.rel-warn { border-top-color: var(--orange); } .rel-warn .rel-word { color: var(--orange); }
.rel-fail { border-top-color: var(--red); } .rel-fail .rel-word { color: var(--red); }

.trait-table .comp-name { font-weight: bold; white-space: nowrap; }
.dev-bar { position: relative; height: 14px; background: #f1ece7; border-radius: 7px; min-width: 140px; }
.dev-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: #b5aca4; }
.dev-fill { position: absolute; top: 2px; bottom: 2px; }
.dev-right { background: var(--secondary); border-radius: 0 5px 5px 0; }
.dev-left { background: #c8b8ab; border-radius: 5px 0 0 5px; }

.lv-chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: bold; white-space: nowrap; }
.lv-L5 { background: var(--primary); color: #fff; }
.lv-L4 { background: var(--secondary); color: #fff; }
.lv-L3 { background: var(--tint); color: var(--primary); }
.lv-L2 { background: #efe9e3; color: #8a7c6e; }
.lv-L1 { background: #e6e0da; color: #6f635a; }
.ts-level.lv-L5, .ts-level.lv-L4 { background: none; color: var(--primary); }
.ts-level.lv-L3, .ts-level.lv-L2, .ts-level.lv-L1 { background: none; color: var(--ink); }

.signal-list { display: flex; flex-direction: column; gap: 8px; }
.signal-row { display: flex; align-items: center; gap: 12px; }
.signal-job { width: 110px; font-size: 13px; font-weight: bold; }
.signal-track { flex: 1; position: relative; height: 10px; background: #f1ece7; border-radius: 5px; }
.signal-cut { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--primary); }
.signal-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--secondary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--secondary);
  transform: translate(-50%, -50%); }
.signal-score { width: 44px; text-align: right; }
.badge-amber { background: #fdf3df; color: var(--orange); }

@media print {
  .tp-header { break-inside: avoid; }
  .tp-summary { break-inside: avoid; }
  .rel-row { break-inside: avoid; }
  .signal-row { break-inside: avoid; }
  .radar-shape { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dev-fill, .lv-chip, .signal-dot, .tscore-card, .rel-item { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ═══ 종합 분석 섹션 ═══ */
.ana-title { margin-top: 18px; border-left: 4px solid var(--secondary); padding-left: 8px; }
.ana-block { padding: 8px 0 2px; border-bottom: 1px dashed var(--line); }
.ana-block:last-of-type { border-bottom: none; }
.ana-head { display: flex; align-items: center; gap: 8px; }
.ana-text { font-size: 13px; color: var(--ink); margin: 4px 0 6px; }
.combo-list { margin: 6px 0 6px 20px; font-size: 13px; }
.combo-list li { margin-bottom: 6px; }
.scene-table td { font-size: 13px; }
@media print { .ana-block, .scene-table tr { break-inside: avoid; } }
