:root {
    --primary: #4f6df5;
    --bg: #f5f6fa;
    --white: #fff;
    --text: #333;
    --border: #e5e7eb;

    --consult: #4f6df5;
    --test: #2ecc71;
    --admin: #f1c40f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ================= 레이아웃 ================= */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    height: 100vh;
}

/* ================= 사이드바 ================= */
.sidebar {
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 20px;
}

.logo {
    margin-bottom: 20px;
}

.menu__item {
    list-style: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.menu__item:hover {
    background: #eef2ff;
}

.menu__item.active {
    background: var(--primary);
    color: #fff;
}

/* ================= 메인 ================= */
.main {
    padding: 20px;
}

/* ================= 캘린더 ================= */
.calendar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.calendar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn {
    border: none;
    background: var(--primary);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* 요일 포함 */
.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* 날짜 */
.day {
    background: #fafafa;
    border-radius: 0px;
    padding: 8px;
    min-height: 110px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.day:hover {
    background: #eef2ff;
}

.day.active {
    border: 1px solid var(--primary);
    background: #f0f3ff;
}

/* 날짜 숫자 */
.day__date {
    font-weight: bold;
    margin-bottom: 5px;
}

/* 이벤트 */
.event {
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 6px;
    margin-top: 4px;
    color: #fff;
}

.event--consult {
    background: var(--consult);
}
.event--test {
    background: var(--test);
}
.event--admin {
    background: var(--admin);
    color: #333;
}

/* ================= 우측 ================= */
.right {
    background: var(--white);
    border-left: 1px solid var(--border);
    padding: 20px;
}

.schedule-item {
    background: #f8f9ff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

#monthTitle {
    font-size: 2rem;
}

/* 요일 헤더 */
.weekday {
    text-align: center;
    font-weight: 600;
    padding: 8px 0;
    color: #666;
}

.weekday.sun {
    color: #e74c3c;
} /* 일요일 */
.weekday.sat {
    color: #3498db;
} /* 토요일 */

/* 날짜 컬러 */
.day.sun .day__date {
    color: #e74c3c;
}
.day.sat .day__date {
    color: #3498db;
}

/* 주말 배경 살짝 강조 (선택) */
.day.sun {
    background: #fff5f5;
}
.day.sat {
    background: #f5f9ff;
}

/* 다른 달 날짜 */
.day--other {
    opacity: 0.4;
    background: #f1f3f5;
}

.day--other:hover {
    background: #e2e6ea;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 8px;
    width: 100%;
}

.filter {
    border: 1px solid #ddd;
    background: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}

.filter.active {
    background: #4f6df5;
    color: #fff;
}

/* 타입 색상 */
.filter[data-type='consult'] {
    border-color: #4f6df5;
}
.filter[data-type='test'] {
    border-color: #2ecc71;
}
.filter[data-type='admin'] {
    border-color: #f1c40f;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f1f3f5;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.nav-btn:hover {
    background: #4f6df5;
    color: #fff;
}

/* ================= 반응형 ================= */
@media (max-width: 1200px) {
    .layout {
        grid-template-columns: 220px 1fr;
    }
    .right {
        display: none;
    }
}

@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}
