/* ==============================
   기본 리셋 & 공통
============================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Noto Sans KR", Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
}

h1, h2 {
  margin: 0 0 12px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ==============================
   레이아웃
============================== */

header {
  margin-bottom: 16px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

section {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
}

/* ==============================
   리스트
============================== */

li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border-bottom: 1px solid #eee;
}

li:last-child {
  border-bottom: none;
}

li span {
  flex: 1;
  line-height: 1.4;
}

/* 과거 일정 */
li.past {
  opacity: 0.5;
}

/* ==============================
   체크박스
============================== */

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ==============================
   버튼
============================== */

button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #e0e0e0;
  cursor: pointer;
  font-size: 14px;
}

button:hover {
  background: #d5d5d5;
}

button:active {
  transform: scale(0.97);
}

/* 수정/삭제 버튼 */
li button {
  font-size: 12px;
  padding: 6px 8px;
}

/* 일정 추가 버튼 */
#add-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: #222;
  color: #fff;
}

#add-btn:hover {
  background: #000;
}

/* ==============================
   필터 바
============================== */

#filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

#filter-bar button {
  flex: 1;
  background: #f0f0f0;
}

#filter-bar button.active {
  background: #222;
  color: #fff;
}

/* ==============================
   검색
============================== */

#search-input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* ==============================
   폼
============================== */

#schedule-form {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
}

#schedule-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#schedule-form input:disabled {
  background: #f0f0f0;
}

#schedule-form div {
  display: flex;
  gap: 8px;
}

#schedule-form button {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

/* ==============================
   반응형 (모바일 기준)
============================== */

@media (min-width: 600px) {
  body {
    max-width: 520px;
    margin: 0 auto;
  }
}

/* ==============================
   📅 월간 달력
============================== */

#calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

#calendar-header button {
  background: #eee;
  font-size: 16px;
}

#calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  text-align: center;
  font-size: 12px;
  color: #666;
}

.cal-cell {
  min-height: 48px;
  padding: 4px;
  border-radius: 6px;
  background: #f3f3f3;
  font-size: 12px;
  cursor: pointer;
}

.cal-cell:hover {
  background: #e5e5e5;
}

.cal-cell.empty {
  background: transparent;
  cursor: default;
}


.empty-message {
  text-align: center;
  color: #888;
  margin: 12px 0;
  font-size: 14px;
}
