/* ===== 한빛 캘린더 ===== */
.cl-app {
  display: flex;
  height: 100%;
  background: #fff;
  color: #1f2328;
}

.cl-side {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e1e5ea;
  background: #f8f9fb;
  overflow-y: auto;
}

.cl-brand { display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px; font-size: 13px; font-weight: 700; }
.cl-brand svg { width: 22px; height: 22px; }

.cl-mini { padding: 6px 10px 10px; }
.cl-mini-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; padding: 0 2px 6px; }
.cl-mini-nav { border: none; background: transparent; font-size: 14px; padding: 0 6px; color: #555; }
.cl-mini-nav:hover { color: #000; }
.cl-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.cl-mini-dow { font-size: 10px; color: #8b95a1; text-align: center; }
.cl-mini-day { height: 24px; border: none; border-radius: 50%; background: transparent; font-size: 11px; padding: 0; }
.cl-mini-day:hover { background: #e4e8ee; }
.cl-mini-day.is-today { color: #1f6feb; font-weight: 700; }
.cl-mini-day.is-selected { background: #1f6feb; color: #fff; }

.cl-group { padding: 6px 10px; }
.cl-group-title { font-size: 11px; color: #6b7280; font-weight: 600; margin: 4px 4px 2px; }
.cl-cal { display: flex; align-items: center; gap: 7px; padding: 4px 4px; font-size: 12.5px; cursor: default; border-radius: 4px; }
.cl-cal:hover { background: #eceff3; }
.cl-cal input { margin: 0; }
.cl-cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.cl-cal-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-cal-badge { font-size: 10px; color: #1e6b3a; background: #dcefe3; border-radius: 3px; padding: 0 4px; }

.cl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.cl-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #e1e5ea;
}
.cl-title { font-size: 16px; font-weight: 700; margin-left: 6px; }
.cl-head-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cl-btn { height: 28px; padding: 0 10px; border: 1px solid var(--btn-border); border-radius: 5px; background: var(--btn-bg); color: var(--btn-fg); font-size: 12px; }
.cl-btn:hover { background: var(--btn-bg-hover); }
.cl-btn-icon { width: 28px; padding: 0; font-size: 16px; line-height: 1; }
.cl-btn-history { border-color: #9ec1f0; color: #1f6feb; }
.cl-seg { display: inline-flex; border: 1px solid var(--btn-border); border-radius: 5px; overflow: hidden; }
.cl-seg-btn { height: 26px; padding: 0 12px; border: none; background: var(--btn-bg); color: var(--btn-fg); font-size: 12px; }
.cl-seg-btn.is-active { background: #1f6feb; color: #fff; }

.cl-body { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* 월 보기 */
.cl-month { display: flex; flex-direction: column; height: 100%; min-height: 520px; }
.cl-month-dow { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; color: #6b7280; text-align: center; padding: 4px 0; border-bottom: 1px solid #eef1f4; }
.cl-month-grid { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; }
.cl-cell { border-right: 1px solid #eef1f4; border-bottom: 1px solid #eef1f4; padding: 3px 4px; min-height: 78px; overflow: hidden; cursor: default; }
.cl-cell:hover { background: #fafbfd; }
.cl-cell.is-out { color: #b4bcc6; background: #fbfbfc; }
.cl-cell-day { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.cl-cell.is-today .cl-cell-day { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: #1f6feb; color: #fff; }
.cl-chip {
  font-size: 11px;
  line-height: 1.3;
  padding: 1px 5px;
  margin-bottom: 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--c) 18%, white);
  border-left: 3px solid var(--c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.cl-chip:hover { background: color-mix(in srgb, var(--c) 30%, white); }
.cl-chip-time { color: #555; margin-right: 3px; }
.cl-more { font-size: 10px; color: #6b7280; padding-left: 4px; }

/* 일 보기 */
.cl-day { display: flex; flex-direction: column; min-height: 100%; }
.cl-allday { display: flex; align-items: flex-start; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #e1e5ea; background: #fafbfc; }
.cl-allday-label { flex: 0 0 46px; font-size: 11px; color: #6b7280; padding-top: 3px; }
.cl-allday-items { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 4px; }
.cl-allday-items .cl-chip { margin: 0; }
.cl-allday-none { color: #b4bcc6; font-size: 12px; }
.cl-grid-wrap { padding: 10px 14px 20px; }
.cl-grid { position: relative; }
.cl-hour { position: absolute; left: 0; right: 0; border-top: 1px solid #eef1f4; height: 44px; }
.cl-hour-label { position: absolute; left: 0; top: -7px; font-size: 11px; color: #8b95a1; width: 50px; }
.cl-block {
  position: absolute;
  padding: 4px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 16%, white);
  border-left: 4px solid var(--c);
  overflow: hidden;
  font-size: 12px;
  cursor: default;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.cl-block:hover { background: color-mix(in srgb, var(--c) 28%, white); }
.cl-block-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-block-sub { font-size: 11px; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 상세 */
.cl-detail {
  flex: 0 0 380px;
  border-left: 1px solid #e1e5ea;
  padding: 12px 16px;
  overflow-y: auto;
  background: #fff;
  font-size: 12.5px;
}
.cl-detail-head { display: flex; align-items: center; justify-content: space-between; }
.cl-detail-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #6b7280; font-weight: 600; }
.cl-x { border: none; background: transparent; font-size: 12px; color: #6b7280; }
.cl-x:hover { color: #000; }
.cl-detail-title { font-size: 16px; margin: 6px 0 10px; }
.cl-fields { display: grid; grid-template-columns: 60px 1fr; gap: 6px 10px; }
.cl-k { color: #6b7280; }
.cl-v { user-select: text; }
.cl-link { border: none; background: transparent; color: #1f6feb; text-decoration: underline; font-size: 12px; padding: 0; }
.cl-muted { color: #8b95a1; }

.cl-hist { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11.5px; }
.cl-hist th { text-align: left; font-weight: 600; color: #6b7280; padding: 4px 6px; border-bottom: 1px solid #e1e5ea; }
.cl-hist td { padding: 5px 6px; border-bottom: 1px solid #eef1f4; vertical-align: top; user-select: text; }
.cl-hist th:nth-child(1), .cl-hist td:nth-child(1), .cl-hist th:nth-child(2), .cl-hist td:nth-child(2) { white-space: nowrap; }
.cl-hist tr.is-delete td { background: #fff4f2; }
.cl-hist-cal { display: flex; align-items: center; gap: 6px; font-weight: 700; margin: 14px 0 4px; font-size: 12.5px; }
.cl-hist-denied, .cl-hist-none { color: #8b95a1; font-size: 12px; padding: 4px 0 6px; }
.cl-hist-ev { padding: 8px 10px; margin-bottom: 8px; border: 1px solid #e1e5ea; border-radius: 6px; }
.cl-hist-ev.is-deleted { border-color: #f0b8b0; background: #fffaf9; }
.cl-hist-ev-title { font-weight: 600; }
.cl-hist-ev-sub { font-size: 11px; color: #6b7280; margin-top: 2px; }
.cl-tag-del { font-size: 10px; color: #a3261a; background: #f9d9d5; border-radius: 3px; padding: 0 5px; margin-left: 4px; }

.win--calendar .win-titlebar { background: #d9534f; color: #fff; border-bottom: none; }
.win--calendar:not(.is-active) .win-titlebar { background: #e08a87; color: rgba(255,255,255,0.9); }
.win--calendar .win-ctrl:hover { background: rgba(255,255,255,0.15); }
.win--calendar .win-ctrl-close:hover { background: #a3261a; }
