/* ── 폰트 기준 변수 (페이지별 오버라이드 가능) ──
   style.css의 기본값과 동일. 이 페이지만 다르게 하려면 값 수정.
*/
:root {
  --fs-xs  : 10px;
  --fs-sm  : 11px;
  --fs-base: 12px;
  --fs-md  : 13px;
  --fs-lg  : 14px;
}
/* =============================================================================
   events.css — 행사일정표 + 연차관리 v20260623
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Malgun Gothic', '맑은 고딕', Arial, sans-serif;
  font-size: var(--fs-md);
  background: #f0f2f5;
  color: #222;
}

/* ══════════════════════════════════════
   GNB (공통 스타일)
══════════════════════════════════════ */
#hd { position: sticky; top: 0; z-index: 900; background: #1a2942; box-shadow: 0 2px 8px rgba(0,0,0,.3); }

.login-user { display: flex; align-items: center; gap: 6px; color: #cdd8e8; }
.login-sep  { color: #4a6080; }
.btn-logout {
  color: #cdd8e8; font-size: var(--fs-base); text-decoration: none;
  padding: 4px 10px; border-radius: 4px;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.1); }

/* ══════════════════════════════════════
   로더 / 토스트
══════════════════════════════════════ */
#loader {
  display: none; position: fixed; top: 46px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.45); z-index: 9000;
}
#loader::after {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 4px solid #e0e0e0; border-top-color: #0f6fd8;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

#toast {
  display: none; position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px; border-radius: 6px;
  font-size: var(--fs-md); font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 9999;
}
#toast.toast-show   { display: block; }
#toast.toast-success { background: #2a9d8f; color: #fff; }
#toast.toast-error   { background: #e63946; color: #fff; }

/* ══════════════════════════════════════
   메인 래퍼
══════════════════════════════════════ */
.ev-wrap {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
}

/* ══════════════════════════════════════
   헤더 (월 네비 + 탭 + 일정추가)
══════════════════════════════════════ */
.ev-header {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 10px 10px 0 0;
  padding: 12px 18px;
  border-bottom: 2px solid #e8ecf0;
}

.ev-nav { display: flex; align-items: center; gap: 4px; }
.ev-nav-btn {
  width: 30px; height: 30px;
  border: 1px solid #d0d7e2; border-radius: 6px;
  background: #fff; cursor: pointer; color: #555;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-base); transition: all .15s;
}
.ev-nav-btn:hover { background: #0f6fd8; color: #fff; border-color: #0f6fd8; }
.ev-nav-today { font-size: 8px; }

.ev-title {
  font-size: 18px; font-weight: 700;
  color: #1a2942; margin-left: 10px;
  min-width: 110px;
}

.ev-tabs {
  display: flex; align-items: center; gap: 4px;
  margin-left: 16px;
}
.ev-tab {
  padding: 5px 14px; border-radius: 6px;
  border: 1px solid #d0d7e2; background: #f5f7fa;
  font-size: var(--fs-base); font-weight: 600; color: #666;
  cursor: pointer; transition: all .15s;
}
.ev-tab:hover   { background: #e8ecf0; }
.ev-tab.active  { background: #0f6fd8; color: #fff; border-color: #0f6fd8; }

.ev-header-right { margin-left: auto; }
.ev-add-btn {
  padding: 6px 16px; border-radius: 6px;
  border: none; background: #0f6fd8; color: #fff;
  font-size: var(--fs-md); font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.ev-add-btn:hover { background: #0c5bb5; }

/* ══════════════════════════════════════
   달력 그리드
══════════════════════════════════════ */
.ev-calendar {
  background: #fff;
  border-left: 1px solid #e8ecf0;
  border-right: 1px solid #e8ecf0;
}

.ev-cal-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: #f5f7fa; border-bottom: 1px solid #e8ecf0;
}
.ev-cal-dow {
  padding: 8px 0; text-align: center;
  font-size: var(--fs-base); font-weight: 700;
  color: #555; letter-spacing: .5px;
}
.ev-cal-dow.sun { color: #e63946; }
.ev-cal-dow.sat { color: #1d6fdb; }

.ev-cal-body {
  display: grid; grid-template-columns: repeat(7, 1fr);
}

.ev-cell {
  min-height: 110px;
  border-right: 1px solid #e8ecf0;
  border-bottom: 1px solid #e8ecf0;
  padding: 6px 6px 4px;
  cursor: pointer;
  transition: background .1s;
  vertical-align: top;
  overflow: hidden;
}
.ev-cell:hover { background: #f0f7ff; }
.ev-cell:nth-child(7n) { border-right: none; }

.ev-cell-other { background: #fafafa; }
.ev-cell-other .ev-cell-date { color: #bbb; }
.ev-cell-today { background: #e8f4fd !important; }
.ev-cell-today .ev-cell-date { 
  background: #0f6fd8; color: #fff;
  border-radius: 50%; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.ev-cell-date {
  font-size: var(--fs-md); font-weight: 600;
  color: #333; margin-bottom: 4px;
  display: inline-block;
}
.ev-cell-date.ev-cell-sun { color: #e63946; }
.ev-cell-date.ev-cell-sat { color: #1d6fdb; }

.ev-holiday-name {
  font-size: var(--fs-xs); color: #e63946;
  font-weight: 400; margin-left: 3px;
}

/* 이벤트 칩 */
.ev-chip {
  display: block;
  font-size: var(--fs-sm); padding: 2px 5px;
  border-radius: 3px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; transition: opacity .1s;
}
.ev-chip:hover { opacity: .8; }

.ev-chip-icon { font-size: 9px; margin-right: 3px; }

.ev-chip-leave   { background: #fff8dc; color: #8a6200; border-left: 3px solid #f4c430; }
.ev-chip-holiday { background: #fde8e8; color: #c0392b; border-left: 3px solid #e63946; }
.ev-chip-event   { background: #e8f0fe; color: #1a56db; border-left: 3px solid #0f6fd8; }

/* ══════════════════════════════════════
   내 연차 현황 패널
══════════════════════════════════════ */
.ev-leave-panel {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-top: none;
  padding: 16px 20px;
}

.ev-leave-title {
  font-size: var(--fs-lg); font-weight: 700;
  color: #1a2942; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.ev-leave-title i { color: #0f6fd8; }
.lp-cycle {
  font-size: var(--fs-sm); font-weight: 400;
  color: #888; margin-left: 4px;
}

.lp-info-row {
  display: flex; gap: 30px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.lp-info-item { display: flex; align-items: center; gap: 6px; }
.lp-label {
  font-size: var(--fs-sm); color: #888;
  background: #f5f7fa; padding: 2px 7px;
  border-radius: 4px; white-space: nowrap;
}
.lp-value { font-size: var(--fs-md); font-weight: 600; color: #222; }
.lp-total .lp-value { color: #0f6fd8; font-size: 15px; }

.lp-bar-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.lp-bar-wrap {
  flex: 1; height: 10px; background: #e8ecf0;
  border-radius: 5px; overflow: hidden; max-width: 400px;
}
.lp-bar-fill {
  height: 100%; border-radius: 5px;
  transition: width .5s ease;
}
.lp-bar-label { font-size: var(--fs-md); color: #555; }
.lp-bar-label strong { color: #222; }

.lp-monthly-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding-top: 12px; border-top: 1px dashed #e8ecf0;
  flex-wrap: wrap;
}
.lp-monthly-label {
  font-size: var(--fs-sm); color: #888; background: #f5f7fa;
  padding: 2px 7px; border-radius: 4px;
  white-space: nowrap; margin-top: 2px;
}
.lp-monthly-list { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-monthly-chip {
  font-size: var(--fs-sm); padding: 2px 8px;
  background: #fff8dc; color: #7a5c00;
  border: 1px solid #f4c430; border-radius: 12px;
}

.lp-remain-text {
  font-size: var(--fs-base); color: #0f6fd8; font-weight: 600;
}

/* ══════════════════════════════════════
   오늘 일정 바
══════════════════════════════════════ */
.ev-today-bar {
  background: #e8f4fd;
  border: 1px solid #b8d8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 8px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  flex-wrap: wrap;
}
.ev-today-btn {
  padding: 4px 14px; border-radius: 6px;
  border: 1px solid #0f6fd8; background: #fff;
  color: #0f6fd8; font-size: var(--fs-base); font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.ev-today-btn:hover { background: #0f6fd8; color: #fff; }

.ev-today-events {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; padding-top: 2px;
}
.ev-today-chip {
  font-size: var(--fs-base); padding: 3px 10px;
  background: #fff; border: 1px solid #b8d8f0;
  border-radius: 12px; color: #1a56db;
}
.ev-today-chip.ev-today-leave {
  background: #fff8dc; border-color: #f4c430; color: #8a6200;
}

/* ══════════════════════════════════════
   전직원 연차현황 탭
══════════════════════════════════════ */
#view-leave-all {
  background: #fff;
  border-radius: 0 0 10px 10px;
  border: 1px solid #e8ecf0;
  border-top: none;
}

.la-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid #e8ecf0;
}
.la-toolbar-title { font-size: var(--fs-lg); font-weight: 700; color: #1a2942; }
.la-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.la-sort-label { font-size: var(--fs-base); color: #888; }
.la-sort-select {
  padding: 4px 8px; border: 1px solid #d0d7e2;
  border-radius: 6px; font-size: var(--fs-base);
}

.ev-btn-quota {
  padding: 5px 14px; border-radius: 6px;
  border: 1px solid #0f6fd8; background: #fff;
  color: #0f6fd8; font-size: var(--fs-base); font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.ev-btn-quota:hover { background: #0f6fd8; color: #fff; }

.la-table-wrap { overflow-x: auto; }

.la-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--fs-md);
}
.la-table th {
  background: #f5f7fa; padding: 10px 14px;
  text-align: left; font-size: var(--fs-base); font-weight: 700;
  color: #555; border-bottom: 2px solid #e8ecf0;
  white-space: nowrap;
}
.la-table td {
  padding: 10px 14px; border-bottom: 1px solid #f0f2f5;
}
.la-table tr:hover td { background: #f8faff; }

.la-bar-wrap {
  display: inline-block; width: 90px; height: 8px;
  background: #e8ecf0; border-radius: 4px;
  overflow: hidden; vertical-align: middle;
}
.la-bar-fill { height: 100%; border-radius: 4px; }
.la-pct { font-size: var(--fs-sm); color: #888; margin-left: 6px; }

.la-tfoot-row td {
  background: #f5f7fa; font-weight: 600;
  border-top: 2px solid #e8ecf0;
}

/* ══════════════════════════════════════
   모달 공통
══════════════════════════════════════ */
.ev-modal-bg {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
}
.ev-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff; border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  z-index: 1001; width: 440px; max-width: 95vw;
  display: flex; flex-direction: column;
}
.ev-modal-sm { width: 360px; }
.ev-modal-lg { width: 780px; }

.ev-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e8ecf0;
  font-size: 15px; font-weight: 700; color: #1a2942;
}
.ev-modal-close {
  background: none; border: none; font-size: 18px;
  color: #888; cursor: pointer; line-height: 1;
}
.ev-modal-close:hover { color: #222; }

.ev-modal-body {
  padding: 20px; overflow-y: auto; max-height: 60vh;
}

.ev-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid #e8ecf0;
}

/* 폼 행 */
.ev-form-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 13px;
}
.ev-form-row label {
  min-width: 68px; font-size: var(--fs-base); font-weight: 600;
  color: #555; text-align: right;
}
.ev-form-row input[type="text"],
.ev-form-row input[type="date"],
.ev-form-row input[type="number"],
.ev-form-row select {
  flex: 1; padding: 7px 10px;
  border: 1px solid #d0d7e2; border-radius: 6px;
  font-size: var(--fs-md); outline: none;
  transition: border-color .15s;
}
.ev-form-row input:focus,
.ev-form-row select:focus { border-color: #0f6fd8; }

.ev-remain-info { align-items: center; }

/* 상세 모달 */
.detail-row {
  display: flex; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #f0f2f5;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  min-width: 60px; font-size: var(--fs-base);
  color: #888; font-weight: 600;
}

/* 연차관리 테이블 */
.quota-list-wrap { overflow-x: auto; }
.quota-table {
  width: 100%; border-collapse: collapse; font-size: var(--fs-md);
}
.quota-table th {
  background: #f5f7fa; padding: 9px 12px;
  text-align: left; font-size: var(--fs-base); font-weight: 700;
  color: #555; border-bottom: 2px solid #e8ecf0;
  white-space: nowrap;
}
.quota-table td {
  padding: 9px 12px; border-bottom: 1px solid #f0f2f5;
}
.quota-table tr:hover td { background: #f8faff; }

.ev-btn-edit-quota {
  padding: 3px 10px; border-radius: 5px;
  border: 1px solid #0f6fd8; background: #fff;
  color: #0f6fd8; font-size: var(--fs-sm); cursor: pointer;
  transition: all .15s;
}
.ev-btn-edit-quota:hover { background: #0f6fd8; color: #fff; }

.qe-final-row .lp-value { font-size: 16px; color: #e63946; font-weight: 700; }
