/* =============================================
   SOFTSTONE 포털 — 공통 디자인 시스템
   CSS 변수 기반 다크/라이트 테마
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─── 라이트 테마 (기본) ─── */
:root, [data-theme="light"] {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-hover: #f8f9fc;
    --surface-alt: #eef1f8;
    --border: #e2e5f0;
    --border-light: #edf0f7;
    --text: #1a1d2e;
    --text-sub: #5c6178;
    --text-muted: #9298ad;
    --primary: #4361ee;
    --primary-hover: #3651d4;
    --primary-light: #eef1ff;
    --primary-glow: rgba(67,97,238,0.12);
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;
    --shadow-sm: 0 1px 3px rgba(26,29,46,0.04), 0 1px 2px rgba(26,29,46,0.02);
    --shadow-md: 0 4px 16px rgba(26,29,46,0.06), 0 2px 4px rgba(26,29,46,0.03);
    --shadow-lg: 0 12px 40px rgba(26,29,46,0.08), 0 4px 12px rgba(26,29,46,0.04);
    --shadow-accent: 0 4px 16px rgba(67,97,238,0.2);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --header-height: 60px;
}

/* ─── 다크 테마 ─── */
[data-theme="dark"] {
    --bg: #0f1117;
    --surface: #1a1d2e;
    --surface-hover: #222538;
    --surface-alt: #252840;
    --border: #2e3148;
    --border-light: #262940;
    --text: #e8eaf0;
    --text-sub: #a0a5b8;
    --text-muted: #6b7085;
    --primary: #6380f5;
    --primary-hover: #7a94ff;
    --primary-light: rgba(99,128,245,0.12);
    --primary-glow: rgba(99,128,245,0.2);
    --success-bg: rgba(16,185,129,0.1);
    --success-border: rgba(16,185,129,0.25);
    --warning-bg: rgba(245,158,11,0.1);
    --warning-border: rgba(245,158,11,0.25);
    --danger-bg: rgba(239,68,68,0.1);
    --danger-border: rgba(239,68,68,0.25);
    --info-bg: rgba(59,130,246,0.1);
    --info-border: rgba(59,130,246,0.25);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
    --shadow-accent: 0 4px 16px rgba(99,128,245,0.3);
}

/* ─── 리셋 ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    display: flex;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* =============================================
   사이드바
   ============================================= */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow-accent);
    flex-shrink: 0;
}

.brand-text {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.sidebar-close {
    display: none;
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.sidebar-item:hover {
    background: var(--surface-alt);
    color: var(--text);
}
.sidebar-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.sidebar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}

.avatar-sm {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}

.user-info { overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-team { font-size: 11px; color: var(--text-muted); }

.logout-link { color: var(--text-muted) !important; font-size: 13px !important; }
.logout-link:hover { color: var(--danger) !important; background: var(--danger-bg) !important; }

/* 테마 토글 */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}
.theme-toggle:hover { background: var(--surface-alt); }

/* 헤더 theme-toggle은 아이콘 버튼 레이아웃을 우선 */
.header-icon-btn.theme-toggle {
    padding: 0;
    gap: 0;
    margin-bottom: 0;
    justify-content: center;
}

[data-theme="light"] .dark-icon { display: none; }
[data-theme="dark"] .light-icon { display: none; }

/* 사이드바 오버레이 (모바일) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}

/* =============================================
   메인 컨텐츠
   ============================================= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(244,246,250,0.82);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid var(--border-light);
    padding: 0 28px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .main-header {
    background: rgba(15,17,23,0.82);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger {
    display: none;
    background: none; border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
}
.hamburger:hover { background: var(--surface-alt); }

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    padding: 0 8px;
}

/* 헤더 아이콘 버튼 (도움말·테마·로그아웃 공통) */
.header-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-sub);
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    font-size: 18px;
    padding: 0;
}
.header-icon-btn:hover {
    background: var(--surface-alt);
    color: var(--text);
}
.header-icon-btn.logout-btn:hover {
    background: var(--danger-bg);
    color: var(--danger);
}
.header-icon-btn .theme-icon { line-height: 1; }
[data-theme="light"] .header-icon-btn .dark-icon,
[data-theme="dark"] .header-icon-btn .light-icon { display: none; }

/* 도움말 드롭다운 */
.header-menu { position: relative; }
.header-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    padding: 6px;
    z-index: 500;
    display: none;
}
.header-menu.open .header-dropdown { display: block; }
.header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
}
.header-dropdown-item:hover {
    background: var(--surface-alt);
    color: var(--primary);
}
.header-dropdown-item span:first-child { font-size: 16px; }

/* 공통 모달 (로그아웃 확인용) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.modal-backdrop.active { display: flex; }
.modal-box {
    background: var(--surface);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 10px 40px rgba(0,0,0,0.2));
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}
.modal-box.modal-sm { max-width: 400px; }
.modal-header {
    padding: 20px 24px 8px;
}
.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.modal-body { padding: 12px 24px 20px; font-size: 14px; color: var(--text-sub); }
.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border: 1px solid var(--danger);
}
.btn-danger:hover { opacity: 0.88; }

.page-content {
    flex: 1;
    padding: 24px 28px;
    max-width: 1400px;
    width: 100%;
}

/* =============================================
   공통 컴포넌트
   ============================================= */

/* 알림 (Flash Messages) */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }
.alert-close {
    background: none; border: none;
    color: inherit; font-size: 18px;
    cursor: pointer; opacity: 0.6; padding: 0 4px;
}

/* 카드 */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px; font-weight: 700; color: var(--text);
}
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* 버튼 */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px; font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: var(--surface-alt); color: var(--text-sub); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-icon { padding: 8px; }

/* 입력 필드 */
.form-control {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px; font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control { appearance: auto; }
textarea.form-control { min-height: 100px; resize: vertical; }

.form-label {
    display: block;
    font-size: 13px; font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 6px;
}

/* 테이블 */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
thead th {
    background: var(--surface-alt);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-sub);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: none; }

/* 뱃지 */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px; font-weight: 600;
    line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: var(--surface-alt); color: var(--text-muted); }

/* 통계 카드 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 4px; font-family: 'Outfit', sans-serif; }
.stat-change { font-size: 12px; margin-top: 4px; }

/* 토스트 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 체크박스 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; }
.checkbox-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: var(--text);
    cursor: pointer;
}
.checkbox-item input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state .empty-title { font-size: 18px; font-weight: 600; color: var(--text-sub); }
.empty-state .empty-desc { font-size: 14px; margin-top: 6px; }

/* 403/404 에러 */
.error-page {
    text-align: center; padding: 80px 20px;
}
.error-page .error-code { font-size: 64px; font-weight: 800; color: var(--primary); font-family: 'Outfit', sans-serif; }
.error-page .error-message { font-size: 18px; color: var(--text-sub); margin-top: 12px; }

/* =============================================
   사이드바 접기/펼치기
   ============================================= */
/* ─── 사이드바 접기/펼치기 토글 (푸터 내부) ─── */
.sidebar-toggle-btn {
    /* .sidebar-item 기본 스타일을 상속받고 버튼 기본값만 초기화 */
    background: none;
    border: none;
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--text-muted);
}
.sidebar-toggle-btn:hover {
    color: var(--text);
}
.sidebar-toggle-btn .sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle-btn .icon-expand { display: none; }
body.sidebar-collapsed .sidebar-toggle-btn .icon-collapse { display: none; }
body.sidebar-collapsed .sidebar-toggle-btn .icon-expand { display: block; }

/* 사이드바 + 메인 영역 트랜지션 */
.sidebar {
    transition: width 0.25s ease, transform 0.25s ease;
}
.main-content {
    transition: margin-left 0.25s ease;
}

/* 접힌 상태 */
body.sidebar-collapsed .sidebar {
    width: 64px;
    overflow: visible;  /* 툴팁이 사이드바 바깥으로 나갈 수 있도록 */
}
body.sidebar-collapsed .sidebar-nav {
    overflow: visible;
}
body.sidebar-collapsed .main-content {
    margin-left: 64px;
}
/* 브랜드 텍스트 숨김 */
body.sidebar-collapsed .brand-text {
    display: none;
}
/* 메뉴 라벨 숨김 (flex 자식에서도 완전히 제거하여 gap 영향 차단) */
body.sidebar-collapsed .sidebar-label {
    display: none;
}
/* 메뉴 아이템: 아이콘 주위 40x40 박스 형태로 중앙 정렬 */
body.sidebar-collapsed .sidebar-item {
    justify-content: center;
    gap: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    margin: 0 auto;
}
body.sidebar-collapsed .sidebar-icon {
    font-size: 20px;
    width: auto;
    text-align: center;
}
/* 사이드바 네비게이션: 아이템을 중앙 정렬 */
body.sidebar-collapsed .sidebar-nav {
    padding: 12px 0;
    align-items: center;
    gap: 4px;
}
/* 유저 정보 숨김 */
body.sidebar-collapsed .sidebar-user .user-info {
    display: none;
}
body.sidebar-collapsed .sidebar-user {
    justify-content: center;
}
/* 테마 토글 숨김 텍스트 */
body.sidebar-collapsed .theme-toggle {
    justify-content: center;
}
/* 로그아웃 라벨 숨김 */
body.sidebar-collapsed .logout-link .sidebar-label {
    display: none;
}
body.sidebar-collapsed .logout-link {
    justify-content: center;
}
/* 사이드바 헤더 - 접힌 상태 */
body.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 16px 8px;
}
/* 접힌 상태에서 호버 시 라벨 툴팁 */
body.sidebar-collapsed .sidebar-item {
    position: relative;
}
body.sidebar-collapsed .sidebar-item:hover::after {
    content: attr(data-label);
    position: absolute;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 300;
    pointer-events: none;
}

/* =============================================
   반응형
   ============================================= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close { display: block; }
    .sidebar-overlay.active { display: block; }
    .hamburger { display: block; }
    .sidebar-toggle-btn { display: none; }

    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .main-header { padding: 0 16px; }
    .page-content { padding: 16px; }
    .page-title { font-size: 16px; }

    .header-user { display: none; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .card { padding: 16px; }
}

/* ─── Flatpickr 포털 테마 오버라이드 ─── */
.flatpickr-input {
    cursor: pointer !important;
}
.flatpickr-calendar {
    font-family: 'Noto Sans KR', -apple-system, sans-serif !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    border: 1px solid var(--border) !important;
    width: 280px !important;
    padding: 0 !important;
    overflow: hidden;
}
.flatpickr-months {
    padding: 0 !important;
    align-items: center !important;
    height: 38px !important;
}
.flatpickr-months .flatpickr-month {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 7px 7px 0 0;
    height: 38px !important;
    line-height: 38px !important;
    display: flex !important;
    align-items: center !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: #fff !important;
    color: #fff !important;
    padding: 8px 12px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #fff !important;
}
.flatpickr-current-month {
    padding: 0 !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.flatpickr-current-month .cur-month,
.flatpickr-current-month .numInputWrapper {
    color: #fff !important;
    font-weight: 600 !important;
}
.flatpickr-current-month input.cur-year {
    color: #fff !important;
    font-weight: 600 !important;
}
/* 월 선택 드롭다운 — 라이트 테마에서 보이도록 */
.flatpickr-current-month select.cur-month,
.flatpickr-monthDropdown-months {
    color: #fff !important;
    background: var(--primary) !important;
    -webkit-appearance: none;
    appearance: none;
    font-weight: 600 !important;
}
.flatpickr-monthDropdown-months option {
    color: #333 !important;
    background: #fff !important;
    font-weight: 500;
}
.flatpickr-innerContainer {
    padding: 6px 10px 10px !important;
}
.flatpickr-rContainer {
    width: 100% !important;
}
.flatpickr-days {
    width: 100% !important;
}
.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    justify-content: center;
}
.flatpickr-day {
    max-width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    margin: 1px !important;
    border-radius: 50% !important;
    font-size: 13px !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}
.flatpickr-day.today {
    border-color: var(--primary) !important;
}
.flatpickr-day:hover {
    background: var(--primary-light, #eff6ff) !important;
}
span.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
}
.flatpickr-weekdays {
    padding: 0 2px !important;
}
/* 다크모드 */
[data-theme="dark"] .flatpickr-calendar {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .flatpickr-day {
    color: var(--text) !important;
}
[data-theme="dark"] .flatpickr-day.prevMonthDay,
[data-theme="dark"] .flatpickr-day.nextMonthDay {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .flatpickr-day:hover {
    background: var(--surface-alt) !important;
}
[data-theme="dark"] .flatpickr-monthDropdown-months option {
    color: var(--text) !important;
    background: var(--surface) !important;
}
