/* ================================================
   신우디엔시 리뷰평가 - 스타일
   ================================================ */

:root {
  --primary:   #4F46E5;
  --primary-d: #3730A3;
  --primary-l: #EEF2FF;
  --success:   #059669;
  --warning:   #D97706;
  --danger:    #DC2626;
  --info:      #0891B2;
  --bg:        #F1F5F9;
  --card:      #FFFFFF;
  --border:    #E2E8F0;
  --text:      #1E293B;
  --text-2:    #64748B;
  --sidebar-w: 240px;
  --radius:    12px;
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ==============================
   로그인 오버레이
   ============================== */
.login-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 40%, #4338CA 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.login-overlay.hidden { display: none; }

.login-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,.35);
}
.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg,#4F46E5,#7C3AED);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px; color: #fff;
}
/* 관리자 로그인 로고 (방패 아이콘) */
.admin-login-logo {
  background: linear-gradient(135deg,#1E1B4B,#4F46E5);
}
.login-title {
  font-size: 22px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.login-badge {
  display: inline-block;
  background: #EEF2FF; color: var(--primary);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600;
  margin-bottom: 24px;
}
.login-sub {
  font-size: 13px; color: var(--text-2);
  margin-bottom: 20px;
}

/* 역할 카드 */
.role-cards { display: flex; flex-direction: column; gap: 12px; }
.role-card {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: all .2s;
  background: none; width: 100%; text-align: left;
}
.role-card:hover { border-color: var(--primary); background: var(--primary-l); }
/* 직원 페이지: 카드 1개만 크게 */
.role-card-solo {
  padding: 20px 22px;
  border-color: #C7D2FE;
  background: var(--primary-l);
}
.role-card-solo:hover { border-color: var(--primary); background: #E0E7FF; }

.role-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.admin-icon { background: #EEF2FF; color: var(--primary); }
.user-icon  { background: #ECFDF5; color: var(--success); }
.role-info { flex: 1; text-align: left; }
.role-name { display: block; font-weight: 700; font-size: 14px; }
.role-desc { display: block; font-size: 12px; color: var(--text-2); }
.role-arrow { color: var(--text-2); transition: .2s; }
.role-card:hover .role-arrow { color: var(--primary); transform: translateX(4px); }

/* 관리자 페이지 링크 버튼 */
.admin-link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  transition: all .2s;
}
.admin-link-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-l); }

/* 관리자 비밀번호 인라인 폼 (admin.html용) */
.pw-inline-wrap { text-align: left; margin-top: 8px; }

/* 직원 전용 앱 레이아웃 */
.app-layout-user {
  flex-direction: column;
}
.user-topbar {
  height: 56px; background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.user-topbar-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--primary);
}
.user-topbar-logo i { font-size: 18px; }
.user-topbar .topbar-badge { margin-left: auto; }
.user-main {
  flex: 1; overflow-y: auto;
  background: var(--bg);
}

/* ==============================
   비밀번호 모달
   ============================== */
.pw-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
}
.pw-modal {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%; max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  animation: slideDown .25s ease;
}
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.pw-modal-icon {
  width: 56px; height: 56px;
  background: var(--primary-l);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px; color: var(--primary);
}
.pw-modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pw-modal-desc  { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.pw-input-wrap  { position: relative; margin-bottom: 6px; }
.pw-input {
  width: 100%; height: 44px;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0 44px 0 14px;
  font-size: 14px; outline: none;
  transition: border-color .2s;
}
.pw-input:focus { border-color: var(--primary); }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-2); font-size: 15px;
}
.pw-error {
  font-size: 12px; font-weight: 600;
  color: var(--danger); min-height: 18px;
  margin-bottom: 14px;
}
.pw-modal-btns {
  display: flex; gap: 8px;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
.shake { animation: shake .35s ease; }

/* ==============================
   앱 레이아웃
   ============================== */
.app-layout {
  display: flex; min-height: 100vh;
}

/* 사이드바 */
.sidebar {
  width: var(--sidebar-w);
  background: #1E1B4B;
  color: #fff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100; overflow-y: auto;
  transition: transform .3s;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.logo-icon { font-size: 22px; color: #A5B4FC; }
.logo-title { display: block; font-size: 13px; font-weight: 700; }
.logo-sub   { display: block; font-size: 11px; color: #A5B4FC; }

.sidebar-nav { flex: 1; padding: 14px 0; }
.nav-section-label {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 20px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.7);
  border-radius: 0; cursor: pointer;
  transition: all .2s;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { color: #fff; background: var(--primary); }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; }
.user-avatar  {
  width: 34px; height: 34px; border-radius: 50%;
  background: #4F46E5;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: #A5B4FC; }
.logout-btn {
  width: 30px; height: 30px; border-radius: 6px;
  color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: .2s;
}
.logout-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* 메인 콘텐츠 */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* 상단 헤더 */
.topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 50;
}
.sidebar-toggle {
  font-size: 16px; color: var(--text-2);
  padding: 6px; border-radius: 6px;
  display: none;
}
.sidebar-toggle:hover { background: var(--bg); }
.breadcrumb {
  flex: 1; display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.breadcrumb i { color: var(--text-2); }
.topbar-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--primary-l); color: var(--primary);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600;
}

/* 페이지 */
.page { display: none; padding: 24px; flex: 1; }
.page.active { display: block; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.page-title { font-size: 20px; font-weight: 700; }
.page-desc  { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* ==============================
   통계 카드
   ============================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.bg-blue   { background: linear-gradient(135deg,#4F46E5,#6366F1); }
.bg-green  { background: linear-gradient(135deg,#059669,#10B981); }
.bg-purple { background: linear-gradient(135deg,#7C3AED,#A78BFA); }
.bg-orange { background: linear-gradient(135deg,#D97706,#FBBF24); }
.stat-label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-name  { font-size: 16px !important; }

/* ==============================
   차트 그리드
   ============================== */
.chart-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.chart-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.chart-title {
  font-size: 14px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.chart-title i { color: var(--primary); }

/* 최근 리뷰 */
.recent-list { display: flex; flex-direction: column; gap: 10px; }
.review-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 8px;
  border: 1px solid var(--border);
  transition: .2s;
}
.review-item:hover { background: var(--bg); }
.review-item-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.review-item-info { flex: 1; min-width: 0; }
.review-item-name { font-weight: 600; font-size: 13px; }
.review-item-meta { font-size: 11px; color: var(--text-2); }
.review-item-score { font-weight: 700; font-size: 15px; color: var(--primary); }

/* ==============================
   직원 그리드
   ============================== */
.employee-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.emp-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer;
  transition: .2s; position: relative;
}
.emp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.emp-card:hover .emp-edit-hint { opacity: 1; }
.emp-card:hover .emp-delete-btn { opacity: 1; }
.emp-card.editing {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
  cursor: default;
  transform: none !important;
}
.emp-card.editing:hover { transform: none; }

/* 삭제 버튼 */
.emp-delete-btn {
  position: absolute; top: 10px; left: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #FEF2F2; color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; opacity: 0;
  transition: opacity .2s, background .15s;
  border: none; cursor: pointer;
}
.emp-delete-btn:hover { background: var(--danger); color: #fff; }

/* 더블클릭 힌트 아이콘 */
.emp-edit-hint {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary-l); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

/* 인라인 편집 인풋 */
.emp-edit-input {
  width: 100%; padding: 6px 8px;
  border: 1.5px solid var(--border);
  border-radius: 6px; font-size: 12px;
  text-align: center; outline: none;
  transition: border-color .2s;
  background: #fff;
}
.emp-edit-input:focus { border-color: var(--primary); }
.emp-edit-select {
  text-align-last: center; /* select 텍스트 가운데 정렬 */
  cursor: pointer;
}

/* 저장/취소 버튼 묶음 */
.emp-edit-btns {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 10px;
}

.emp-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff;
  margin: 0 auto 12px;
}
.emp-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.emp-dept { font-size: 12px; color: var(--text-2); }
.emp-kpi  { margin-top: 12px; }
.emp-kpi-score { font-size: 20px; font-weight: 700; color: var(--primary); }
.emp-kpi-label { font-size: 11px; color: var(--text-2); }

/* ==============================
   폼 스타일
   ============================== */
.form-card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}
.form-label i { color: var(--primary); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px; font-size: 13px; color: var(--text);
  outline: none; transition: border-color .2s;
  background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
}
.form-textarea { resize: vertical; }

.section-title {
  font-size: 14px; font-weight: 700;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* 평가 슬라이더 */
.score-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px;
  margin-bottom: 20px;
}
.score-grid-1col {
  grid-template-columns: 1fr !important;
}
.score-item { }
.score-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.score-label { font-size: 13px; font-weight: 600; }
.score-num {
  font-size: 18px; font-weight: 700; color: var(--primary);
  min-width: 28px; text-align: right;
}

/* 동적 생성 슬라이더 래퍼 */
.score-item-wrap {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s;
}
.score-item-wrap:hover { border-color: #C7D2FE; }
.score-item-header {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.score-item-label {
  font-size: 13px; font-weight: 600; color: #1E293B; flex: 1;
}
.score-item-weight {
  font-size: 10px; color: #94A3B8; background: #EEF2FF;
  border-radius: 4px; padding: 1px 5px;
}
.score-item-num {
  font-size: 18px; font-weight: 800; color: var(--primary);
  min-width: 24px; text-align: right;
}
.score-tooltip {
  font-size: 12px; line-height: 1.4; min-height: 34px;
  margin-bottom: 6px; color: #64748B;
}
.score-tooltip small { color: #94A3B8; font-size: 11px; }
.score-scale-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #94A3B8; margin-top: 4px;
  padding: 0 2px;
}

/* 사유 입력 영역 */
.score-reason-wrap {
  margin-top: 10px;
  border-top: 1px dashed #E2E8F0;
  padding-top: 8px;
}
.score-reason-label {
  font-size: 11px; color: #94A3B8; margin-bottom: 4px;
  display: flex; align-items: center; gap: 4px;
}
.score-reason-textarea {
  width: 100%; box-sizing: border-box;
  min-height: 64px; padding: 8px 10px;
  border: 1px solid #E2E8F0; border-radius: 8px;
  font-size: 12px; color: #334155;
  background: #fff; resize: vertical;
  font-family: inherit; line-height: 1.5;
  transition: border-color .2s;
}
.score-reason-textarea:focus {
  outline: none; border-color: #818CF8;
  box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
.score-reason-textarea::placeholder { color: #CBD5E1; }

/* 상세보기 - 사유 표시 */
.rd-score-reason {
  margin-top: 6px;
  padding: 6px 10px;
  background: #F8FAFC;
  border-left: 3px solid #C7D2FE;
  border-radius: 0 6px 6px 0;
  font-size: 12px; color: #475569; line-height: 1.5;
}
.score-slider {
  width: 100%; height: 6px;
  -webkit-appearance: none;
  background: var(--border); border-radius: 3px;
  outline: none; cursor: pointer;
}
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(79,70,229,.5);
  cursor: pointer; transition: transform .15s;
}
.score-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.score-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); border: none;
  box-shadow: 0 2px 6px rgba(79,70,229,.5);
}

/* KPI 미리보기 */
.kpi-preview {
  background: linear-gradient(135deg,#4F46E5,#7C3AED);
  border-radius: 12px; padding: 20px;
  text-align: center; color: #fff; margin-bottom: 20px;
}
.kpi-preview-label { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.kpi-preview-score { font-size: 42px; font-weight: 800; line-height: 1; }
.kpi-preview-grade { font-size: 15px; font-weight: 600; opacity: .9; margin-top: 4px; }

/* 본인평가 배너 */
.self-eval-banner {
  background: #EEF2FF; border: 1px solid #C7D2FE;
  color: var(--primary); border-radius: 8px;
  padding: 10px 14px; font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* ─── 이름 저장 체크박스 행 ─── */
.save-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.save-name-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  user-select: none;
  position: relative;
  padding-left: 4px;
}
.save-name-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.save-name-checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #CBD5E1;
  border-radius: 5px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.save-name-label input[type="checkbox"]:checked + .save-name-checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.save-name-label input[type="checkbox"]:checked + .save-name-checkmark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.save-name-label:hover .save-name-checkmark {
  border-color: var(--primary);
}
.saved-name-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 20px;
  padding: 3px 10px;
  animation: fadeInBadge .3s ease;
}
@keyframes fadeInBadge {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1);   }
}

.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}
.btn-block { width: 100%; justify-content: center; }

/* ==============================
   버튼
   ============================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: all .2s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-d); }
.btn-outline {
  background: #fff; color: var(--text);
  border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: #FEF2F2; color: var(--danger);
  border: 2px solid #FCA5A5;
}
.btn-danger:hover { background: #FEE2E2; }
.btn-success {
  background: var(--success); color: #fff;
  border: 2px solid var(--success);
}
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ==============================
   필터 바
   ============================== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 16px;
}
.filter-select {
  width: auto !important;
  min-width: 130px !important;
  max-width: 200px !important;
  flex-shrink: 0;
}
.filter-bar select.form-select {
  width: auto !important;
  min-width: 130px !important;
  max-width: 200px !important;
  flex-shrink: 0;
}

/* 이름 검색창 */
.filter-name-wrap {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
}
.filter-name-icon {
  position: absolute;
  left: 10px;
  color: #94A3B8;
  font-size: 13px;
  pointer-events: none;
  z-index: 2;
}
 input.filter-name-input,
.filter-name-input {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 200px !important;
  padding: 10px 32px 10px 32px !important;
  border: 2px solid var(--border) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  color: var(--text) !important;
  background: #fff !important;
  outline: none !important;
  box-sizing: border-box !important;
  display: block !important;
}
input.filter-name-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-l) !important;
}
.filter-name-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  font-size: 13px;
  padding: 0;
  line-height: 1;
  z-index: 2;
}
.filter-name-clear:hover { color: #475569; }

/* ==============================
   리뷰 유형 탭
   ============================== */
.review-type-tabs {
  display: flex;
  gap: 4px;
  background: #F1F5F9;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
  width: fit-content;
}
.rtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.rtab:hover {
  background: #fff;
  color: var(--text);
}
.rtab.active {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(79,70,229,.13), 0 0 0 1.5px rgba(79,70,229,.13);
}
/* 탭별 활성 색상 */
.rtab[data-type="본인평가"].active { color: #7C3AED; box-shadow: 0 1px 4px rgba(124,58,237,.15), 0 0 0 1.5px rgba(124,58,237,.15); }
.rtab[data-type="동료평가"].active { color: #0891B2; box-shadow: 0 1px 4px rgba(8,145,178,.15), 0 0 0 1.5px rgba(8,145,178,.15); }
.rtab[data-type="하향평가"].active { color: #DC2626; box-shadow: 0 1px 4px rgba(220,38,38,.15), 0 0 0 1.5px rgba(220,38,38,.15); }
.rtab[data-type="상향평가"].active { color: #059669; box-shadow: 0 1px 4px rgba(5,150,105,.15), 0 0 0 1.5px rgba(5,150,105,.15); }

/* 탭 배지 (건수 표시) */
.rtab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #E2E8F0;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.rtab.active .rtab-badge {
  background: currentColor;
  filter: brightness(1.5) saturate(0.7);
}

/* ==============================
   테이블
   ============================== */
.table-wrap {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: auto;
  max-width: 100%;
}
.data-table {
  width: 100%; border-collapse: collapse;
}
.data-table th {
  background: #F8FAFC; padding: 12px 14px;
  font-size: 12px; font-weight: 700; color: var(--text-2);
  text-align: left; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.empty-row { text-align: center; padding: 40px !important; color: var(--text-2); }

/* 등급 배지 */
.grade-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 12px; font-weight: 800;
}
.grade-S { background: #FEF3C7; color: #92400E; }
.grade-A { background: #D1FAE5; color: #065F46; }
.grade-B { background: #DBEAFE; color: #1E40AF; }
.grade-C { background: #F1F5F9; color: #374151; }
.grade-D { background: #FEE2E2; color: #991B1B; }

/* 유형 배지 */
.type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.type-상향평가 { background: #D1FAE5; color: #065F46; }
.type-하향평가 { background: #FEE2E2; color: #991B1B; }
.type-동료평가 { background: #DBEAFE; color: #1E40AF; }
.type-본인평가 { background: #EDE9FE; color: #5B21B6; }

/* ==============================
   KPI 리포트
   ============================== */
.report-header {
  background: linear-gradient(135deg,#4F46E5,#7C3AED);
  color: #fff; border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 20px;
}
.report-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
  border: 3px solid rgba(255,255,255,.4);
}
.report-name  { font-size: 20px; font-weight: 800; }
.report-meta  { font-size: 13px; opacity: .8; }
.report-score { font-size: 36px; font-weight: 800; margin-left: auto; }
.report-grade { font-size: 14px; opacity: .9; text-align: right; }
.report-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.score-detail-card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.sdc-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.sdc-bar-wrap { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.sdc-bar { height: 100%; border-radius: 4px; transition: width .6s ease; }
.sdc-value { font-size: 20px; font-weight: 700; color: var(--primary); }

/* ==============================
   랭킹 포디엄
   ============================== */
.podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 12px; margin-bottom: 24px; padding: 20px;
}
.podium-item {
  text-align: center; width: 120px;
}
.podium-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  margin: 0 auto 8px;
}
.podium-name  { font-size: 13px; font-weight: 700; }
.podium-score { font-size: 12px; color: var(--text-2); }
.podium-score-label { font-size: 10px; color: var(--text-3, #aaa); margin-top: 1px; letter-spacing: -0.2px; }
.podium-stand {
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
}
.podium-1 .podium-stand { height: 80px; background: linear-gradient(#F59E0B,#FBBF24); }
.podium-2 .podium-stand { height: 60px; background: linear-gradient(#9CA3AF,#D1D5DB); }
.podium-3 .podium-stand { height: 46px; background: linear-gradient(#B45309,#D97706); }
.podium-medal { font-size: 22px; margin-bottom: 6px; }

/* ==============================
   일반 직원 리뷰
   ============================== */
.user-review-wrap {
  max-width: 640px; margin: 0 auto; padding: 24px 0;
}
.user-step { }
.user-header {
  text-align: center; margin-bottom: 24px;
}
.user-header-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg,#4F46E5,#7C3AED);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  margin: 0 auto 14px;
}
.user-header-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
  margin: 0 auto 14px;
}
.user-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.user-header p  { font-size: 13px; color: var(--text-2); }

/* 제출 완료 */
.submit-complete {
  text-align: center; padding: 40px 0;
}
.complete-icon {
  font-size: 64px; color: var(--success);
  margin-bottom: 16px; animation: bounceIn .5s ease;
}
@keyframes bounceIn {
  0%   { transform: scale(.5); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.submit-complete h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.submit-complete p  { color: var(--text-2); margin-bottom: 20px; }
.complete-score-box {
  display: inline-block;
  background: linear-gradient(135deg,#4F46E5,#7C3AED);
  color: #fff; border-radius: 16px;
  padding: 20px 40px; margin-bottom: 24px;
}
.complete-score { font-size: 48px; font-weight: 800; }
.complete-grade { font-size: 16px; opacity: .9; }

/* ==============================
   모달
   ============================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  animation: slideDown .25s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: .2s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body   { padding: 20px; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ==============================
   토스트
   ============================== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  min-width: 240px; max-width: 340px;
  box-shadow: var(--shadow-md);
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.toast.success { background: #ECFDF5; color: #065F46; border-left: 4px solid #059669; }
.toast.error   { background: #FEF2F2; color: #991B1B; border-left: 4px solid #DC2626; }
.toast.warning { background: #FFFBEB; color: #92400E; border-left: 4px solid #D97706; }
.toast.info    { background: #EFF6FF; color: #1E40AF; border-left: 4px solid #3B82F6; }

/* ==============================
   엑셀 업로드
   ============================== */
.excel-guide {
  background: #F0FDF4; border: 1px solid #BBF7D0;
  border-radius: 10px; padding: 14px 16px;
  margin-bottom: 16px;
}
.excel-guide-title {
  font-size: 13px; font-weight: 700; color: #065F46;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.excel-guide-desc { font-size: 12px; color: #374151; margin-bottom: 10px; }
.excel-col-list { display: flex; flex-wrap: wrap; gap: 6px; }
.excel-col {
  background: #fff; border: 1px solid #D1FAE5;
  border-radius: 6px; padding: 4px 10px;
  font-size: 12px; font-weight: 600; color: #065F46;
}
.excel-col.required { background: #DCFCE7; border-color: #86EFAC; }

.excel-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px; padding: 32px 20px;
  text-align: center; cursor: pointer;
  transition: all .2s; color: var(--text-2);
  margin-bottom: 14px;
}
.excel-drop-zone:hover, .excel-drop-zone.drag-over {
  border-color: var(--primary); background: var(--primary-l);
  color: var(--primary);
}
.excel-drop-zone i  { font-size: 32px; margin-bottom: 8px; display: block; }
.excel-drop-zone p  { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.excel-drop-zone span { font-size: 12px; opacity: .7; }

.excel-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.excel-preview-header span {
  font-size: 13px; font-weight: 700; color: var(--primary);
}

/* ==============================
   빈 상태
   ============================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px; color: var(--text-2); gap: 10px;
}
.empty-state i { font-size: 32px; opacity: .5; }

/* ==============================
   리뷰 상세 모달
   ============================== */
.review-detail-box {
  max-width: 700px; width: 100%;
  max-height: 90vh; display: flex; flex-direction: column;
}
.review-detail-box .modal-body {
  flex: 1; overflow-y: auto; padding: 0 !important;
}

/* 상단 요약 */
.rd-summary {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
}
.rd-sum-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  border: 3px solid rgba(255,255,255,.4); flex-shrink: 0;
}
.rd-sum-info { flex: 1; }
.rd-sum-name { font-size: 17px; font-weight: 800; }
.rd-sum-meta { font-size: 12px; opacity: .85; margin-top: 2px; }
.rd-sum-kpi  { text-align: right; }
.rd-sum-score { font-size: 36px; font-weight: 800; line-height: 1; }
.rd-sum-grade { font-size: 13px; opacity: .9; margin-top: 2px; }
.rd-sum-final {
  font-size: 12px; background: rgba(255,255,255,.2);
  border-radius: 20px; padding: 2px 10px; margin-top: 4px;
  display: inline-block;
}

/* 탭 */
.rd-tabs {
  display: flex; border-bottom: 2px solid var(--border);
  padding: 0 4px;
}
.rd-tab {
  padding: 12px 18px; font-size: 13px; font-weight: 600;
  color: var(--text-2); border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: .2s; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  background: none; border-left: none; border-right: none; border-top: none;
}
.rd-tab:hover { color: var(--primary); }
.rd-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.rd-tab-content { padding: 20px 24px; }

/* 점수 그리드 */
.rd-scores {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.rd-score-item {
  background: var(--bg); border-radius: 10px; padding: 14px;
}
.rd-score-label { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.rd-score-val   { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.rd-score-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.rd-score-bar   { height: 100%; border-radius: 3px; transition: width .6s ease; }

/* 서술형 답변 */
.rd-answers { display: flex; flex-direction: column; gap: 14px; }
.rd-answer-block {
  background: var(--bg); border-radius: 10px; padding: 14px 16px;
  border-left: 4px solid var(--primary);
}
.rd-answer-q { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.rd-answer-a { font-size: 13px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
.rd-answer-empty { font-size: 12px; color: #94A3B8; font-style: italic; }

/* 종합 의견 */
.rd-comment {
  background: #EEF2FF; border-radius: 10px; padding: 14px 16px;
  border-left: 4px solid #6366F1;
}
.rd-comment-label { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.rd-comment-text  { font-size: 13px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }


/* 리뷰 상세 섹션 타이틀 */
.rd-section-title {
  padding: 14px 20px 10px;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  letter-spacing: .3px;
}
.rd-section-title i { color: var(--primary); }

/* 최종 KPI 영역 */
.rd-final-kpi {
  padding: 16px 24px;
  background: #FFFBEB;
  border-top: 2px solid #FDE68A;
}
.rd-final-label {
  font-size: 13px; font-weight: 700; color: #92400E;
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.rd-final-label i { color: #D97706; }
.rd-final-hint { font-size: 11px; font-weight: 400; color: #A16207; }
.rd-final-input-wrap {
  display: flex; align-items: center; gap: 8px;
}
.rd-final-input {
  width: 100px; height: 38px;
  border: 2px solid #FDE68A; border-radius: 8px;
  padding: 0 10px; font-size: 16px; font-weight: 700;
  color: #92400E; text-align: center; outline: none;
  background: #fff; transition: border-color .2s;
}
.rd-final-input:focus { border-color: #D97706; }
.rd-final-unit { font-size: 14px; font-weight: 700; color: #92400E; }
.rd-final-preview {
  margin-top: 8px; font-size: 13px; font-weight: 600; color: #92400E;
  min-height: 20px;
}

/* 최종KPI 테이블 셀 */
/* 리뷰 목록 행 hover */
.review-row:hover td { background: #F8F7FF !important; }
.review-row:hover td:first-child::after {
  content: ' 👆 더블클릭';
  font-size: 10px; color: #94A3B8; font-weight: 400;
}

.final-kpi-cell {
  cursor: pointer; font-weight: 700;
}
.final-kpi-set   { color: #D97706; }
.final-kpi-empty { color: #CBD5E1; font-size: 11px; font-weight: 400; }

/* ==============================
   질문 관리
   ============================== */
.question-list { display: flex; flex-direction: column; gap: 12px; }

.question-card {
  background: var(--card); border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 16px;
  box-shadow: var(--shadow); transition: .2s;
}
.question-card:hover { border-color: #C7D2FE; }
.question-card.inactive { opacity: .5; }

.q-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-l); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.q-body { flex: 1; min-width: 0; }
.q-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.q-desc  { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.q-meta  { display: flex; gap: 8px; flex-wrap: wrap; }
.q-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.q-badge-period   { background: #EEF2FF; color: var(--primary); }
.q-badge-active   { background: #D1FAE5; color: #065F46; }
.q-badge-inactive { background: #F1F5F9; color: #64748B; }
.q-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── 분기 관리 ─────────────────────────────────────────────── */
.period-summary-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 2px solid #C7D2FE; border-radius: 14px;
  padding: 18px 24px; margin-bottom: 20px;
}
.period-summary-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.period-summary-body { flex: 1; }
.period-summary-label { font-size: 11px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.period-summary-value { font-size: 17px; font-weight: 800; color: #1E293B; }
.period-summary-hint  { font-size: 12px; color: #6366F1; background: #fff; border-radius: 8px; padding: 6px 12px; }

.period-list { display: flex; flex-direction: column; gap: 10px; }

.period-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 2px solid var(--border);
  border-radius: 12px; padding: 16px 20px;
  box-shadow: var(--shadow); transition: .2s;
}
.period-card:hover { border-color: #C7D2FE; }
.period-card.period-active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #FAFAFE 0%, #EEF2FF 100%);
}
.period-card-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.period-key-badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: #EEF2FF; color: var(--primary);
  font-size: 12px; font-weight: 800; letter-spacing: .5px; flex-shrink: 0;
}
.period-card.period-active .period-key-badge { background: var(--primary); color: #fff; }
.period-label { font-size: 15px; font-weight: 700; color: #1E293B; }
.period-active-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--primary);
  background: #E0E7FF; border-radius: 20px; padding: 2px 10px;
}
.period-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.period-active-info { font-size: 12px; color: var(--primary); font-weight: 600; padding: 4px 10px; }
.loading-row { text-align: center; padding: 32px; color: var(--text-2); font-size: 14px; }

/* 서술형 답변 영역 */
.question-answer-block {
  background: #FAFAFA; border: 2px solid var(--border);
  border-radius: 10px; padding: 16px;
  margin-bottom: 14px; transition: border-color .2s;
}
.question-answer-block:focus-within { border-color: var(--primary); }
.qa-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 4px; display: flex; align-items: center; gap: 6px;
}
.qa-title i { color: var(--primary); }
.qa-desc  { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.qa-textarea {
  width: 100%; min-height: 80px; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; resize: vertical;
  outline: none; transition: border-color .2s; background: #fff;
}
.qa-textarea:focus { border-color: var(--primary); }

/* ─── 라디오 점수 + 조건부 서술 UI ─── */
/* 질문 영역 상단 구분 */
#userQuestionsArea, #adminQuestionsArea {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 2px dashed #E2E8F0;
}
#userQuestionsArea .qa-section-title,
#adminQuestionsArea .qa-section-title {
  margin-top: 16px;
}
.qa-radio-group {
  display: flex; flex-direction: column; gap: 6px;
  margin: 10px 0 4px;
}
.qa-radio-label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  border: 1.5px solid var(--border); background: #fff;
  cursor: pointer; transition: border-color .18s, background .18s;
  user-select: none;
}
.qa-radio-label:hover { border-color: var(--primary); background: #F5F3FF; }
.qa-radio-label input[type="radio"] { display: none; }
.qa-radio-custom {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #CBD5E1; background: #fff;
  flex-shrink: 0; transition: border-color .18s, background .18s;
  display: flex; align-items: center; justify-content: center;
}
.qa-radio-label input[type="radio"]:checked ~ .qa-radio-custom {
  border-color: var(--primary); background: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.qa-radio-label input[type="radio"]:checked ~ .qa-radio-custom::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff;
}
.qa-radio-score {
  font-size: 15px; font-weight: 800; color: var(--text); min-width: 34px;
}
.qa-radio-text {
  font-size: 13px; color: var(--text-2); font-weight: 500;
}
.qa-radio-label:has(input:checked) {
  border-color: var(--primary); background: #F5F3FF;
}
.qa-radio-label:has(input:checked) .qa-radio-score { color: var(--primary); }
.qa-radio-label:has(input:checked) .qa-radio-text  { color: var(--primary); font-weight: 600; }

/* 조건부 서술 입력 영역 */
.qa-conditional {
  margin-top: 12px; padding: 14px;
  background: #FAFBFF; border: 1.5px solid #C7D2FE;
  border-radius: 10px;
}
.qa-cond-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px;
}
.qa-cond-hint {
  font-size: 11.5px; font-weight: 400; color: var(--text-2);
  background: #F1F5F9; border-radius: 6px; padding: 5px 8px;
}
.qa-cond-examples {
  display: flex; flex-direction: column; gap: 3px;
}
.qa-eg-bad, .qa-eg-good {
  font-size: 11.5px; font-weight: 400; padding: 3px 6px;
  border-radius: 5px; display: flex; align-items: flex-start; gap: 5px;
}
.qa-eg-bad  { color: #DC2626; background: #FEF2F2; }
.qa-eg-good { color: #059669; background: #ECFDF5; }
.qa-eg-bad  i { margin-top: 2px; flex-shrink: 0; }
.qa-eg-good i { margin-top: 2px; flex-shrink: 0; }

/* 리뷰 상세 - 점수 배지 */
.rd-answer-score-badge {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 8px;
  margin-top: 8px; margin-bottom: 2px;
  font-weight: 700;
}

/* 토글 스위치 */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #CBD5E1;
  border-radius: 24px; cursor: pointer; transition: .3s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; left: 3px; bottom: 3px; transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ==============================
   반응형
   ============================== */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .score-grid  { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-240px);
    width: 240px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .login-card { padding: 30px 20px; }
}

/* ==============================
   평가대상 설정 (eval_targets)
   ============================== */

/* ============================================================
   평가대상 설정 — 필터 행 (이름검색 + 부서선택)
   핵심: 검색박스는 border 컨테이너 안에 아이콘·input·버튼을
         모두 flex item으로 나란히 배치 → absolute 사용 안 함
   ============================================================ */

/* 행 전체: 검색박스(flex:1) + 부서셀렉트(flex:1) */
.et-rev-filter-row,
.et-target-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

/* ── 검색박스 컨테이너 ──
   border + radius를 컨테이너에 주고,
   내부를 flex row로 정렬 → 아이콘이 절대로 밖으로 안 나감 */
.et-rev-search-box,
.et-target-search-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.et-rev-search-box:focus-within,
.et-target-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-l);
}

/* 돋보기 아이콘 — flex item, shrink 안 함 */
.et-rev-search-box > i,
.et-target-search-box > i {
  flex-shrink: 0;
  color: #94A3B8;
  font-size: 13px;
  margin-right: 8px;
  pointer-events: none;
}

/* input — flex 1로 나머지 공간 차지, border/background 제거 */
.et-rev-search-box > input,
.et-target-search-box > input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  padding: 0;
}
.et-rev-search-box > input::placeholder,
.et-target-search-box > input::placeholder { color: #CBD5E1; }

/* ✕ 지우기 버튼 — flex item, shrink 안 함 */
.et-rev-search-box > button,
.et-target-search-box > button {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  font-size: 13px;
  padding: 3px 2px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color .15s;
  margin-left: 4px;
}
.et-rev-search-box > button:hover,
.et-target-search-box > button:hover { color: #475569; }

/* ── 부서 필터 셀렉트 ── */
.et-rev-dept-sel,
.et-target-dept-sel {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.et-rev-dept-sel:focus,
.et-target-dept-sel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-l);
}

/* 검색 드롭다운 목록 */
.et-reviewer-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}
.et-reviewer-dropdown::-webkit-scrollbar { width: 5px; }
.et-reviewer-dropdown::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

.et-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s;
}
.et-drop-item:hover { background: var(--primary-l); }
.et-drop-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.et-drop-name { font-size: 14px; font-weight: 700; color: var(--text); }
.et-drop-meta { font-size: 12px; color: #94A3B8; margin-left: auto; white-space: nowrap; }
.et-drop-empty { padding: 14px; text-align: center; color: #94A3B8; font-size: 13px; }

/* 선택된 리뷰어 chip */
.et-reviewer-selected { margin-top: 8px; }
.et-reviewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 8px;
  background: var(--primary-l);
  border: 1.5px solid #C7D2FE;
  border-radius: 30px;
  font-size: 13px; font-weight: 700; color: var(--primary);
}
.et-chip-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.et-chip-clear {
  background: none; border: none; cursor: pointer;
  color: #94A3B8; font-size: 12px; padding: 2px;
  display: flex; align-items: center; border-radius: 4px;
  transition: color .15s;
}
.et-chip-clear:hover { color: var(--danger); }

/* 툴바: 전체선택/해제 버튼 행 */
.et-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* 선택 카운트 배지 */
.et-count-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-l);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* 체크박스 목록 컨테이너 */
.et-checkbox-list {
  max-height: 340px;
  overflow-y: auto;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.et-checkbox-list::-webkit-scrollbar { width: 6px; }
.et-checkbox-list::-webkit-scrollbar-track { background: transparent; }
.et-checkbox-list::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

/* 각 직원 체크박스 행 */
.et-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.et-checkbox-item:hover { background: var(--bg); }
/* 실제 checkbox는 DOM에 있되 완전히 숨김 — 토글은 JS onclick으로 직접 처리 */
.et-checkbox-item input[type="checkbox"] {
  display: none;
}

/* 커스텀 체크박스 */
.et-check-custom {
  width: 18px; height: 18px;
  border: 2px solid #CBD5E1;
  border-radius: 5px;
  background: #fff;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
/* checked 상태는 .is-checked 클래스로 제어 */
.et-checkbox-item.is-checked { background: #F5F3FF; }
.et-checkbox-item.is-checked .et-check-name { color: var(--primary); font-weight: 700; }
.et-checkbox-item.is-checked .et-check-custom {
  border-color: var(--primary);
  background: var(--primary);
}
.et-checkbox-item.is-checked .et-check-custom::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* 아바타 미니 */
.et-check-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.et-check-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  flex: 1; min-width: 0;
}
.et-check-meta {
  font-size: 11px; color: #94A3B8;
  white-space: nowrap; flex-shrink: 0;
}

/* 부서별 그룹 헤더 */
.et-dept-header {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6366F1;
  background: #EEF2FF;
  border-radius: 6px;
  margin: 4px 2px 2px;
  text-transform: uppercase;
}
.et-dept-header:first-child { margin-top: 2px; }

/* 요약 목록 */
.et-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.et-summary-empty {
  padding: 20px 16px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* 구버전 호환 */
.et-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  flex-wrap: wrap;
  transition: border-color .2s;
}
.et-summary-row:hover { border-color: #C7D2FE; }

/* 신버전 — et-summary-item */
.et-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.et-summary-item:hover {
  border-color: #C7D2FE;
  box-shadow: 0 2px 8px rgba(79,70,229,.08);
}
.et-summary-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}
.et-summary-info {
  flex: 1;
  min-width: 0;
}
.et-summary-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
}
.et-summary-targets {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 12px; color: var(--text-2);
  margin-top: 3px;
}
.et-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: #EEF2FF; color: var(--primary);
  border: 1px solid #C7D2FE;
}
.et-tag-all {
  background: #D1FAE5; color: #065F46;
  border-color: #A7F3D0;
}
.et-tag-more {
  background: #F1F5F9; color: #64748B;
  border-color: #E2E8F0;
}
.et-summary-count { flex-shrink: 0; }
.et-count-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  background: var(--primary-l); color: var(--primary);
}
.et-summary-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

/* 툴바 레이블 */
.et-toolbar-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex: 1;
}
.et-toolbar-btns {
  display: flex; gap: 6px; flex-shrink: 0;
}

/* 저장 행 */
.et-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.et-active-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.et-active-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 공지 배너 (index.html 평가대상 드롭다운 아래) */
.eval-target-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 12px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #1E40AF;
}
.eval-target-notice i { color: #3B82F6; font-size: 13px; }
