* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: '맑은 고딕', sans-serif; background: #f4f6fb; color: #222; }
header { background: #252e4f; color: #fff; padding: 0 32px; display: flex; align-items: center; height: 56px; gap: 0; }
.header-title { font-size: 18px; font-weight: bold; letter-spacing: 0.5px; color: #fff; white-space: nowrap; margin-right: 28px; }
.header-nav { display: flex; gap: 4px; }
.header-nav a { color: rgba(255,255,255,0.65); text-decoration: none; padding: 7px 15px; border-radius: 6px; font-size: 14px; font-weight: bold; transition: background .15s, color .15s; white-space: nowrap; }
.header-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.header-nav a.active { background: rgba(255,255,255,0.16); color: #fff; }
.container { max-width: 1100px; margin: 28px 32px; padding: 0; }

.card { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px #0001; padding: 24px 28px; margin-bottom: 22px; }
.card h2 { font-size: 15px; color: #252e4f; margin-bottom: 16px; border-bottom: 2px solid #e8eaf0; padding-bottom: 8px; }

.form-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; color: #555; font-weight: bold; }
.form-group input, .form-group select {
  border: 1px solid #ccd0dd; border-radius: 6px; padding: 7px 11px; font-size: 14px;
  font-family: inherit; outline: none; transition: border .2s;
}
.form-group input:focus, .form-group select:focus { border-color: #252e4f; }

.checkbox-group { display: flex; gap: 20px; align-items: center; }
.checkbox-group label { display: flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; }

.btn { padding: 9px 28px; border: none; border-radius: 6px; font-size: 14px; font-family: inherit; cursor: pointer; font-weight: bold; transition: background .15s; }
.btn-primary { background: #252e4f; color: #fff; }
.btn-primary:hover { background: #3a4875; }
.btn-export { background: #2e7d32; color: #fff; }
.btn-export:hover { background: #388e3c; }
.btn-export:disabled { background: #aaa; cursor: not-allowed; }
.btn-viewer { background: #00838f; color: #fff; }
.btn-viewer:hover { background: #00acc1; }
.btn-viewer:disabled { background: #aaa; cursor: not-allowed; }
.btn-settings { background: #f0f2fa; color: #252e4f; border: 1px solid #ccd0dd; }
.btn-settings:hover { background: #e2e6f5; }

/* 탭 */
.tabs { display: flex; gap: 0; border-bottom: 2px solid #e8eaf0; margin-bottom: 0; }
.tab-btn {
  padding: 9px 22px; border: none; background: none; font-size: 14px;
  font-family: inherit; cursor: pointer; color: #888; border-bottom: 3px solid transparent;
  margin-bottom: -2px; font-weight: bold; transition: color .15s, border-color .15s;
}
.tab-btn.active { color: #252e4f; border-bottom-color: #252e4f; }
.tab-content { display: none; padding-top: 18px; }
.tab-content.active { display: block; }

/* 테이블 */
table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
th { background: #252e4f; color: #fff; padding: 9px 12px; text-align: center; }
/* 열 너비 고정 (뱃지 유무와 무관하게 열이 고정됨) */
th:nth-child(1) { width: 100px; }  /* 신청일 */
th:nth-child(2) { width: 120px; }  /* 회차 */
th:nth-child(3) { width: 140px; }  /* 실업인정일 */
th:nth-child(4) { width: 160px; }  /* 구직활동기간 */
th:nth-child(5) { width: 100px; }  /* 지급일수 */
td { padding: 8px 12px; text-align: center; border-bottom: 1px solid #eee; overflow: hidden; }
tr:hover td { background: #f7f8fd; }
.customized td { background: #f0fdf4 !important; }
.customized td:nth-child(3) { color: #1a6e2e; font-weight: bold; }
tr.holiday-row td { background: #fff8e1 !important; }
tr.holiday-row td.app-date-cell { background: #fff !important; }
tr.holiday-row td:nth-child(3) { color: #e65100; font-weight: bold; }
.customized td.app-date-cell { background: #fff !important; }
.edit-btn {
  display: inline-block; margin-left: 6px; cursor: pointer;
  font-size: 12px; color: #aaa; vertical-align: middle;
  border: 1px solid #ddd; border-radius: 3px; padding: 1px 5px;
  background: #fafafa; transition: all .15s;
}
.edit-btn:hover { color: #252e4f; border-color: #252e4f; background: #f0f2fa; }
.holiday-badge {
  display: inline-block; font-size: 11px; background: #ff8f00;
  color: #fff; border-radius: 3px; padding: 1px 5px; margin-left: 4px; vertical-align: middle;
}
.over34-cell { color: #d32f2f !important; font-weight: bold; }
.over34-badge { display:inline-block; font-size:11px; background:#d32f2f; color:#fff; border-radius:3px; padding:1px 5px; margin-left:4px; vertical-align:middle; cursor:default; }
/* 센터출석 뱃지 */
.center-badge {
  display: inline-block; font-size: 10px; font-weight: bold;
  background: #c0392b; color: #fff; border-radius: 3px;
  padding: 1px 5px; vertical-align: middle;
  letter-spacing: 0;
}
/* 회차 칸: 뱃지 + 숫자를 왼쪽 정렬, 줄바꿈 없이 */
td.round-cell {
  text-align: left;
  white-space: nowrap;
  padding-left: 14px;
}
/* 실업인정일 칸: 공휴일 뱃지가 붙어도 줄바꿈 없이 */
td.recday-cell {
  white-space: nowrap;
}
/* 라벨 출력 버튼 */
.btn-label { background: #7b2d8b; color: #fff; }
.btn-label:hover { background: #9c3aab; }
.btn-label:disabled { background: #aaa; cursor: not-allowed; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.badge-general { background: #e8f0fe; color: #1a56db; }
.badge-recurrent { background: #fdf2f2; color: #c0392b; }
.badge-first { background: #e9fbe9; color: #2e7d32; }
.empty-msg { text-align: center; color: #aaa; padding: 36px 0; font-size: 15px; }

/* 로딩 */
#loading { display: none; text-align: center; padding: 30px; color: #555; font-size: 15px; }
.spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid #ddd; border-top-color: #252e4f; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 모달 */
.modal-overlay { display: none; position: fixed; inset: 0; background: #0005; z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 28px 32px; width: 540px; max-width: 95vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 32px #0003; }
.modal h3 { font-size: 16px; color: #252e4f; margin-bottom: 18px; }
.modal-section { margin-bottom: 18px; }
.modal-section h4 { font-size: 13px; color: #555; margin-bottom: 10px; background: #f4f6fb; padding: 5px 10px; border-radius: 4px; }
.setting-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.setting-row label { min-width: 180px; font-size: 13px; color: #444; }
.setting-row input { flex: 1; border: 1px solid #ccd0dd; border-radius: 5px; padding: 5px 9px; font-size: 13px; font-family: inherit; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.alert { padding: 10px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.alert-error { background: #fdf2f2; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-success { background: #e9fbe9; color: #2e7d32; border: 1px solid #b2dfdb; }
.alert-warn { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }

/* 편집 피커 */
#editPickerOverlay .modal { width: 310px; }
.edit-cal-info { font-size: 13px; color: #555; background: #f4f6fb; padding: 6px 10px; border-radius: 6px; }
.edit-cal-info:empty { display: none; margin-bottom: 0; }
.edit-cal-info:not(:empty) { margin-bottom: 10px; }

/* 날짜 피커 */
.datepicker-wrap { position: relative; flex: 1; }
.datepicker-chips {
  min-height: 40px; border: 1px solid #ccd0dd; border-radius: 6px;
  padding: 5px 8px; cursor: pointer; display: flex; flex-wrap: wrap;
  gap: 5px; align-items: center; background: #fff; transition: border .2s;
}
.datepicker-chips:focus-within, .datepicker-chips.open { border-color: #252e4f; }
.datepicker-chips .placeholder { color: #aaa; font-size: 14px; line-height: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #252e4f; color: #fff; border-radius: 14px;
  padding: 3px 10px 3px 12px; font-size: 13px;
}
.chip-remove { cursor: pointer; font-size: 15px; line-height: 1; opacity: .7; }
.chip-remove:hover { opacity: 1; }

.dp-popup {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 200;
  background: #fff; border: 1px solid #ccd0dd; border-radius: 10px;
  box-shadow: 0 8px 24px #0002; width: 280px; padding: 12px;
}
.dp-popup.open { display: block; }
.dp-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-nav button { background: none; border: none; font-size: 18px; cursor: pointer; color: #252e4f; padding: 2px 8px; border-radius: 4px; }
.dp-nav button:hover { background: #f0f2fa; }
.dp-month-label { font-size: 15px; font-weight: bold; color: #252e4f; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-grid .dp-head { text-align: center; font-size: 13px; font-weight: bold; color: #888; padding: 3px 0; }
.dp-grid .dp-head:nth-child(1) { color: red !important; }
.dp-grid .dp-head:nth-child(7) { color: blue !important; }
.dp-day {
  text-align: center; padding: 5px 2px; font-size: 13px; border-radius: 50%;
  cursor: pointer; line-height: 26px; width: 30px; height: 30px; margin: auto;
}
.dp-day:hover { background: #e8f0fe; }
.dp-day.empty { cursor: default; }
.dp-day.empty:hover { background: none; }
.dp-day.sunday { color: red; }
.dp-day.saturday { color: blue; }
.dp-day.holiday { color: red; font-weight: bold; }
.dp-day.selected { background: #252e4f !important; color: #fff !important; font-weight: bold; }
.dp-day.today-marker { outline: 2px solid #f39c12; outline-offset: -2px; border-radius: 50%; }

/* 달력 */
.cal-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.cal-month { border: 1px solid #e0e4ef; border-radius: 10px; overflow: hidden; min-width: 260px; flex: 1; }
.cal-month-title { background: #252e4f; color: #fff; text-align: center; padding: 8px 0; font-size: 14px; font-weight: bold; }
.cal-week-header { display: grid; grid-template-columns: repeat(7, 1fr); background: #f0f2fa; }
.cal-week-header span { text-align: center; font-size: 14px; font-weight: bold; padding: 5px 0; }
.cal-week-header span:nth-child(1) { color: red !important; }
.cal-week-header span:nth-child(7) { color: blue !important; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  min-height: 44px; padding: 4px 3px; font-size: 12px; text-align: center;
  position: relative; cursor: default; border-top: 1px solid #f0f2f8;
}
.cal-day.empty { background: #fafafa; }
.cal-day .day-num { display: inline-block; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; font-weight: bold; }
.cal-day.sunday .day-num { color: red; }
.cal-day.saturday .day-num { color: blue; }
.cal-day.holiday .day-num { color: red; }
.cal-day.app-date .day-num { background: #252e4f; color: #fff !important; }
.cal-day .markers { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 2px; }
.cal-day .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-general { background: #1a56db; }
.dot-recurrent { background: #c0392b; }
.dot-first { background: #2e7d32; }
.cal-day.today .day-num { outline: 2px solid #f39c12; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #555; margin-top: 14px; }
.cal-legend span { display: flex; align-items: center; gap: 5px; }
.legend-app { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #252e4f; }
.holiday-name { font-size: 9px; color: #c0392b; line-height: 1.1; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 36px; }

/* ── 임금체불 날짜/월 피커 팝업 ─────────────────────────────── */
.wt-picker-overlay { display: none; position: fixed; inset: 0; z-index: 199; }
.wt-picker-overlay.open { display: block; }
.wt-picker-popup {
  display: none; position: fixed; z-index: 200;
  background: #fff; border: 1px solid #dde1f0;
  border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  padding: 14px 16px; min-width: 242px;
}
.wt-picker-popup.open { display: block; }

/* 테이블 셀 안 피커 트리거 */
.wt-picker-cell {
  min-height: 34px; border: 1px solid #ccd0dd; border-radius: 5px;
  padding: 4px 9px; cursor: pointer; background: #fff;
  font-size: 13px; color: #333; display: flex; align-items: center; gap: 4px;
  transition: border .2s; user-select: none; white-space: nowrap;
}
.wt-picker-cell:hover { border-color: #252e4f; }
.wt-picker-cell.placeholder { color: #aaa; }

/* 연월 선택 그리드 */
.wt-month-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.wt-month-btn {
  padding: 9px 4px; text-align: center; border: 1px solid #e0e4f0;
  border-radius: 6px; cursor: pointer; font-size: 13px; font-family: inherit;
  background: #fff; transition: all .15s;
}
.wt-month-btn:hover { background: #f0f2fa; border-color: #252e4f; }
.wt-month-btn.wt-selected { background: #252e4f; color: #fff; border-color: #252e4f; }

/* 실제지급일 지우기 버튼 */
.wt-actual-clear {
  font-size: 11px; color: #aaa; cursor: pointer; margin-left: auto;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.wt-actual-clear:hover { background: #f0f0f0; color: #555; }

/* ── 임금체불 수급자격 판단 UI ────────────────────────────── */

/* 체불 내역 입력 테이블 — 전역 th:nth-child 너비 오버라이드 */
.wt-entry-table { table-layout: fixed; }
.wt-entry-table th:nth-child(1) { width: 115px; }
.wt-entry-table th:nth-child(2) { width: 145px; }
.wt-entry-table th:nth-child(3) { width: 145px; }
.wt-entry-table th:nth-child(4) { width: 145px; }
.wt-entry-table th:nth-child(5) { width: 195px; }
.wt-entry-table th:nth-child(6) { width: 54px; }
.wt-entry-table td { padding: 6px 8px; vertical-align: middle; overflow: visible; }
.wt-entry-table td input[type="month"],
.wt-entry-table td input[type="number"],
.wt-entry-table td input[type="date"] {
  width: 100%; border: 1px solid #ccd0dd; border-radius: 5px;
  padding: 5px 7px; font-size: 13px; font-family: inherit;
  text-align: center; box-sizing: border-box; outline: none; transition: border .2s;
  background: #fff;
}
.wt-entry-table td input:focus { border-color: #252e4f; }
.wt-entry-table td input[readonly] { background: #f4f6fb; border-color: #e2e6f5; cursor: default; }
.wt-entry-table td input.wt-full  { color: #c62828; font-weight: bold; }
.wt-entry-table td input.wt-over30 { color: #e65100; font-weight: bold; }
.wt-entry-table td input.wt-under30 { color: #333; }
.wt-del-btn { padding: 5px 12px !important; font-size: 12px !important; white-space: nowrap; }

/* 체불 비율 배지 */
.wt-ratio-badge { display: block; font-size: 10px; border-radius: 3px; padding: 1px 5px; margin-top: 3px; text-align: center; }
.wt-ratio-full   { background: #d32f2f; color: #fff; }
.wt-ratio-over30 { background: #e65100; color: #fff; }
.wt-ratio-under30 { background: #757575; color: #fff; }

/* 판정 배너 */
.wt-verdict { display: flex; flex-direction: column; align-items: center; padding: 20px 16px; border-radius: 8px; margin-bottom: 20px; text-align: center; }
.wt-recognized     { background: #e8f5e9; border: 2px solid #66bb6a; color: #1b5e20; }
.wt-not-recognized { background: #ffebee; border: 2px solid #ef9a9a; color: #b71c1c; }
.wt-verdict-icon { font-size: 32px; margin-bottom: 6px; }
.wt-verdict-text { font-size: 20px; font-weight: bold; }
.wt-verdict-sub  { font-size: 13px; margin-top: 6px; opacity: .8; }

/* 판단 결과 테이블 — 전역 th:nth-child 너비 오버라이드 */
.wt-table { table-layout: fixed; margin-bottom: 16px; }
.wt-table th:nth-child(1) { width: 170px; }
.wt-table th:nth-child(2) { width: auto; }
.wt-table th:nth-child(3) { width: 90px; }
.wt-table th:nth-child(4), .wt-table th:nth-child(5) { width: auto; }
.wt-table td { vertical-align: middle; }
.wt-table td:first-child { font-size: 13px; line-height: 1.6; }
.wt-pass td { background: #f1f8e9 !important; }
.wt-result-cell { font-size: 13px; font-weight: bold; white-space: nowrap; }
.wt-cell-pass { color: #2e7d32; }
.wt-cell-fail { color: #bbb; }

/* 주의사항 */
.wt-notice { background: #f5f5f5; border-radius: 6px; padding: 14px 16px; font-size: 12px; color: #666; line-height: 2.0; }
.wt-notice strong { color: #333; display: block; margin-bottom: 4px; font-size: 13px; }
.wt-notice em { color: #999; font-size: 11px; display: block; margin-top: 6px; }

/* ── 인트로 랜딩 카드 ────────────────────────────────────────── */
.intro-card {
  display: flex; align-items: center; gap: 20px;
  cursor: pointer; text-decoration: none; color: inherit;
  padding: 28px 32px !important;
  transition: box-shadow .15s, transform .12s;
}
.intro-card:hover {
  box-shadow: 0 6px 20px rgba(37,46,79,0.12) !important;
  transform: translateY(-2px);
}
.intro-icon { font-size: 38px; flex-shrink: 0; width: 56px; text-align: center; }
.intro-title { font-size: 17px; font-weight: bold; color: #252e4f; margin-bottom: 6px; }
.intro-desc { font-size: 13px; color: #777; line-height: 1.5; }
.intro-arrow { margin-left: auto; font-size: 22px; color: #ccd0dd; flex-shrink: 0; transition: color .15s; }
.intro-card:hover .intro-arrow { color: #252e4f; }
