@char-set "utf-8";
/* 1. 웹 폰트 로드 */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* 2. 공통 변수 설정 */
:root {
    --font-nanum: 'Nanum Gothic', sans-serif;
    --font-noto: 'Noto Sans KR', sans-serif;
    --color-main: #334155;
    --color-slate: #1e293b;
    --color-gray: #64748b;
    --color-blue: #2563eb;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --p-blue: #2563eb;
    --p-red: #ef4444; 
    --p-gray: #64748b; 
    --border: #e2e8f0; 
}

/* 3. 전역 레이아웃 및 기본 폰트 설정 (아이콘 제외) */
.premium-main-wrapper, 
.premium-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
    font-family: var(--font-nanum);
    color: var(--color-main);
    line-height: 1.6;
}

/* ★ 중요: Font Awesome 아이콘 깨짐 방지 ★ */
.premium-wrapper i[class^="fa-"], 
.premium-wrapper i[class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900; 
}

/* 4. 제목 및 주요 UI (폰트 강제 적용 대상 전체) */
.premium-page-header h2,
.view-title,
.btn-premium,
.btn-premium-blue,   /* 누락 방지 */
.premium-list-table th,
.premium-list-table td,
.subject-link,
.comment-header,
.attach-label,
.badge-blue,
.btn-dark-gray {
    font-family: var(--font-noto) !important;
}

/* 5. 상단 내비게이션 및 헤더 */
.premium-breadcrumb { display: flex; align-items: center; justify-content: flex-end; padding: 0px 0; font-size: 13px; color: #94a3b8; }
.premium-breadcrumb a { color: var(--color-gray); text-decoration: none; }
.premium-breadcrumb a:hover { color: var(--color-blue); }
.premium-breadcrumb .sep { margin: 0 8px; color: #cbd5e1; }
.premium-breadcrumb .current { font-weight: 700; color: var(--color-slate); }

.premium-page-header { border-bottom: 1px solid #f1f5f9; padding-bottom: 0px; margin-bottom: 0px; text-align: left; }
.premium-page-header .sub-desc { font-size: 15px; color: var(--color-gray); margin-top: 5px; }

/* 6. 게시판 리스트 테이블 (폰트 깨짐 방지 보강) */
.premium-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    padding: 0 5px;
}
/* 타이틀 전체 헤더 영역 */
.premium-page-header {
    padding: 0px 0 5px 0; /* 위아래 여백 조절 */
    border-bottom: 2px solid #e2e8f0; /* 하단 전체 구분선 */
    margin-bottom: 0px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left; /* 왼쪽 정렬로 변경 (이미지 느낌 반영) */
}

/* 텍스트 타이틀 스타일 */
.title-main-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0px;
}

.main-title {
    font-size: 24px; /* 서브메뉴보다 약간 더 큰 크기 */
    font-weight: 700;
    color: #1e293b;
    position: relative;
    padding-left: 15px; /* 파란색 세로바를 위한 여백 */
    line-height: 1.2;
}

/* 왼쪽 파란색 세로 포인트 바 (서브메뉴 활성화 느낌) */
.main-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: #2563eb; /* 서브메뉴 활성 포인트 컬러 */
    border-radius: 2px;
}

/* 서브 설명문 스타일 */
.sub-description {
    font-size: 14px;
    color: #64748b;
    padding-left: 15px; /* 타이틀 바 위치와 맞춤 */
    margin-top: 5px;
    letter-spacing: -0.03em;
}

/* 이미지 타이틀 처리 */
.title-image-wrapper img {
    max-height: 40px; /* 너무 크지 않게 조절 */
    display: block;
}

/* 반응형 처리 */
@media (max-width: 768px) {
    .premium-page-header {
        padding: 20px 15px 10px;
    }
    .main-title {
        font-size: 20px;
    }
}
.total-count { font-size: 14px; color: var(--color-gray); }
.total-count b { color: var(--color-slate); font-weight: 700; }

.premium-content-area { width: 100%; padding: 0 5px; }
.premium-list-table { width: 100%; border-collapse: collapse; border-bottom: 1px solid var(--border-color); }
.premium-list-table thead tr { border-top: 2px solid var(--color-slate); background: #fcfdfe; }
.premium-list-table th { padding: 18px 10px; font-size: 15px; font-weight: 600; color: var(--color-slate); border-bottom: 1px solid var(--border-color); }
.premium-list-table td { padding: 16px 12px; font-size: 14px; color: #475569; text-align: center; border-bottom: 1px solid #f1f5f9; }

.row-notice { background: var(--bg-light); }
.row-notice .subject-link { font-weight: 700; color: #1e3a8a; }
.td-subject { text-align: left !important; padding-left: 20px !important; }
.td-subject a { font-size:14px; }
.subject-link { color: var(--color-main); display: inline-block; max-width: 80%; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.subject-link:hover { color: var(--color-blue); text-decoration: underline; }

/* 7. 게시글 상세보기 */
.view-header { border-top: 2px solid var(--color-slate); background: #fcfdfe; padding: 30px 25px; border-bottom: 1px solid var(--border-color); }
.view-title { font-size: 26px; font-weight: 700; color: var(--color-slate); margin-bottom: 15px; }
.view-meta { display: flex; gap: 20px; font-size: 13px; color: var(--color-gray); }
.view-meta b { color: var(--color-main); margin-left: 4px; }
.view-content-body { padding: 50px 25px; min-height: 400px; font-size: 16px; color: #475569; border-bottom: 1px solid var(--border-color); overflow-wrap: break-word; }
.view-content-body img { max-width: 100%; height: auto; }

/* 8. 첨부파일 및 아이콘 */
.file-list-wrap, .file-icon-wrap { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; vertical-align: middle; }
.file-icon, .attach-icon { width: 16px; height: 16px; object-fit: contain; opacity: 0.7; transition: transform 0.2s; }
.file-count { font-size: 11px; color: #94a3b8; }
.view-attachments { margin: 20px 25px; padding: 18px 22px; background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 8px; }
.attach-label { font-weight: 700; font-size: 13px; color: var(--color-gray); margin-bottom: 12px; display: block; }
.attach-list { display: flex; flex-direction: column; gap: 10px; }
.attach-item { display: flex; align-items: center; text-decoration: none; color: #475569; font-size: 14px; width: fit-content; }

/* 9. 버튼 시스템 (btn-premium-blue 포함) */
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 50px; padding: 30px 0; border-top: 1px double var(--border-color); }
.left-btns, .right-btns { display: flex; gap: 8px; }

.btn-premium, .btn-premium-blue { 
    display: inline-flex; align-items: center; justify-content: center; 
    height: 42px; padding: 0 20px; border-radius: 6px; font-size: 14px; font-weight: 500; 
    cursor: pointer; transition: 0.2s; text-decoration: none; gap: 6px;
}
.btn-premium i, .btn-premium-blue i { font-size: 14px; }

.btn-list { background: #334155; color: #fff !important; border: 1px solid #334155; }
.btn-list:hover { background: var(--color-slate); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.btn-outline { background: #fff; color: var(--color-gray) !important; border: 1px solid #cbd5e1; }
.btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }

.btn-delete { background: #fff; color: #ef4444 !important; border: 1px solid #fee2e2; }
.btn-delete:hover { background: #ef4444; color: #fff !important; border-color: #ef4444; }

.btn-write, .btn-premium-blue { font-width:700;background: var(--color-blue); color: #fff !important; border: 1px solid var(--color-blue); }
.btn-write:hover, .btn-premium-blue:hover { background: #0e2569;border: 1px solid  #0e2569;  }

/* 10. 댓글 및 푸터 */
.comment-section { margin-top: 50px; padding: 0 10px; }
.comment-header { font-size: 18px; font-weight: 700; margin-bottom: 25px; color: var(--color-slate); border-left: 4px solid var(--color-blue); padding-left: 15px; }
.badge-blue { background: var(--color-blue); color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: bold; }
.premium-footer { display: flex; justify-content: flex-end; align-items: center; margin-top: 25px; }

/* 11. 검색 및 페이징 */
.search-box-wrap { display: flex; border: 1px solid #cbd5e1; border-radius: 4px; overflow: hidden; background: #fff; height: 38px; }
.search-box-wrap select { border: none; background: var(--bg-light); padding: 0 12px; border-right: 1px solid #cbd5e1; outline: none; font-size: 14px; }
.search-box-wrap input { border: none; padding: 0 15px; width: 200px; outline: none; font-size: 14px; }
.btn-dark-gray { background: #475569; color: #fff; border: none; padding: 0 18px; cursor: pointer; font-weight: bold; }

.premium-paging { display: flex; justify-content: center; gap: 5px; margin: 30px 0; }
.premium-paging a { color: var(--color-gray); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: 4px; font-size: 14px; text-decoration: none; }
.premium-paging a.active { background: var(--color-slate); color: #fff; border-color: var(--color-slate); font-weight: bold; }

/* 1. 웹 폰트 로드 */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

/* 2. 공통 변수 설정 */
:root {
    --font-nanum: 'Nanum Gothic', sans-serif;
    --font-noto: 'Noto Sans KR', sans-serif;
    --color-main: #334155;
    --color-slate: #1e293b;
    --color-gray: #64748b;
    --color-blue: #2563eb;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
}

/* 3. [추가] 모든 입력 요소 폰트 강제 초기화 */
.premium-wrapper input,
.premium-wrapper select,
.premium-wrapper optgroup,
.premium-wrapper option,
.premium-wrapper textarea,
.premium-wrapper button {
    font-family: var(--font-noto) !important; /* 폼 요소는 가독성 좋은 노토산스 강제 적용 */
    font-size: 14px;
    color: var(--color-main);
}

/* 4. 전역 레이아웃 */
.premium-main-wrapper, 
.premium-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0px auto;
    font-family: var(--font-nanum);
    color: var(--color-main);
    line-height: 1.6;
}

/* ★ Font Awesome 아이콘 깨짐 방지 ★ */
.premium-wrapper i[class^="fa-"], 
.premium-wrapper i[class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900; 
}

/* 5. 제목 및 주요 UI 폰트 설정 */
.premium-page-header h2,
.view-title,
.btn-premium,
.btn-premium-blue,
.premium-list-table th,
.premium-list-table td,
.subject-link,
.comment-header,
.attach-label,
.badge-blue,
.btn-dark-gray,
.search-box-wrap select, /* 검색 카테고리 명시 */
.search-box-wrap input   /* 검색어 입력창 명시 */
{
    font-family: var(--font-noto) !important;
}

/* 6. 검색 박스 상세 스타일 (Search Box) */
.search-box-wrap { 
    display: flex; 
    border: 1px solid #cbd5e1; 
    border-radius: 4px; 
    overflow: hidden; 
    background: #fff; 
    height: 38px; 
}

.search-box-wrap select { 
    border: none; 
    background: var(--bg-light); 
    padding: 0 12px; 
    border-right: 1px solid #cbd5e1; 
    outline: none; 
    cursor: pointer;
    -webkit-appearance: none; /* 브라우저 기본 화살표 스타일 초기화(선택사항) */
    appearance: none;
    padding-right: 25px; /* 화살표 공간 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.search-box-wrap input { 
    border: none; 
    padding: 0 15px; 
    width: 200px; 
    outline: none; 
}

.btn-dark-gray { 
    background: #475569; 
    color: #fff !important; 
    border: none; 
    padding: 0 18px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.2s;
}
.btn-dark-gray:hover { background: #1e293b; }
 .sun .d-num, .sun-text { color: var(--p-red) !important; }
    .sat .d-num, .sat-text { color: var(--p-blue) !important; }
.today .d-num { color:#ffffff !important; }
/* 7. 버튼 시스템 (Action Bar) */
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 50px; padding: 30px 0; border-top: 1px double var(--border-color); }
.left-btns, .right-btns { display: flex; gap: 8px; }

.btn-premium, .btn-premium-blue { 
    display: inline-flex; align-items: center; justify-content: center; 
    height: 42px; padding: 0 20px; border-radius: 6px; font-size: 14px; font-weight: 500; 
    cursor: pointer; transition: 0.2s; text-decoration: none; gap: 6px;
}
.btn-premium i, .btn-premium-blue i { font-size: 14px; }

.btn-list { background: #334155; color: #fff !important; border: 1px solid #334155; }
.btn-outline { background: #fff; color: var(--color-gray) !important; border: 1px solid #cbd5e1; }
.btn-delete { background: #fff; color: #ef4444 !important; border: 1px solid #fee2e2; }
.btn-write, .btn-premium-blue { background: var(--color-blue); color: #fff !important; border: 1px solid var(--color-blue); }

/* [이후 리스트, 상세보기, 댓글 등 기존 스타일 유지...] */
.premium-list-table { width: 100%; border-collapse: collapse; border-bottom: 1px solid var(--border-color); }
.premium-list-table th { padding: 18px 10px; font-size: 15px; color: var(--color-slate); border-bottom: 1px solid var(--border-color); }
.premium-list-table td { padding: 16px 12px; font-size: 14px; color: #475569; text-align: center; border-bottom: 1px solid #f1f5f9; }
.td-subject { text-align: left !important; padding-left: 20px !important; }
.subject-link { color: var(--color-main); text-decoration: none; display: inline-block; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.premium-paging { display: flex; justify-content: center; gap: 5px; margin: 30px 0; }
.premium-paging a { color: var(--color-gray); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: 4px; font-size: 14px; text-decoration: none; }
.premium-paging a.active { background: var(--color-slate); color: #fff; border-color: var(--color-slate); font-weight: bold; }

    .premium-list-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; border-top: 2px solid #333; }
    .premium-list-table th { background: #f8fafc; padding: 12px; border-bottom: 1px solid #e2e8f0; font-size: 14px; color: #475569; }
    .premium-list-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; text-align: center; font-size: 14px; color: #334155; }
    .td-subject { text-align: left !important; }
    .subject-link { text-decoration: none; color: #1e293b; font-weight: 500; }
    .subject-link:hover { text-decoration: underline; color: #00589e; }
    
    /* 강조 요소 */
    .memo-count { color: #696969; font-weight:700; font-size: 12px; margin-left: 5px; }
    .badge-blue { background: #00589e; color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 11px; }
    .row-notice { background: #f1f5f9; }
    .file-icon { width: 14px; vertical-align: middle; margin-left: 3px; opacity: 0.7; }

      /* 하단 버튼 */
    .premium-footer { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid #f1f5f9; }
  
    /* 검색 박스 */
    .search-box-wrap { display: flex; gap: 5px; }
    .search-box-wrap select, .search-box-wrap input { border: 1px solid #ddd; padding: 5px; border-radius: 3px; font-size: 13px; }
    .btn-dark-gray { background: #555; color: #fff; border: none; padding: 5px 15px; border-radius: 3px; cursor: pointer; }
	
	/* 상단 헤더 컨테이너 정렬 */
.md-list-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 자식 요소들을 수직 중앙으로 정렬 */
	padding:0px 0;
    margin-bottom: 0px;
    width: 100%;
     min-height:40px;
}

/* 전체 게시글 수 텍스트 */
.md-total-count-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    line-height: 1; /* 텍스트 높이 초기화로 정렬 보정 */
}
.md-total-count-text b {
    color: #00589e !important;
}

/* 검색바 래퍼 */
.md-premium-search-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 2px 5px 2px 18px;
}

.md-premium-select {
    border: none;
    background: transparent;
    height: 34px;
    font-size: 13px;
    color: #4b5563;
    outline: none;
    cursor: pointer;
}

.md-premium-input {
    border: none;
    border-left: 1px solid #e5e7eb;
    background: transparent;
    height: 34px;
    width: 160px;
    font-size: 13px;
    outline: none;
    padding-left: 15px;
}

.md-premium-btn-search {
    background: #ffffff;
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
}

.md-premium-btn-search svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
}

.subject-link { text-decoration: none; color: #333; }
.subject-link:hover { text-decoration: underline; }
.text-locked { color: #999; cursor: pointer; }
.badge-notice { background: #3182ce; color: #fff; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.row-notice { background: #f8faff; }
.reply-icon { color: #cbd5e0; margin-right: 5px; }
.btn-write { background: #3182ce; color: #fff; padding: 10px 25px; border-radius: 5px; text-decoration: none; display: inline-block; }
/* 부모 컨테이너: 테이블 셀 안에서 꽉 차게 */
.notice-check-wrapper {
    display: flex;
    align-items: center; /* 자식 요소들을 세로 중앙으로 */
    justify-content: flex-start;
    height: 100%;
    min-height: 24px; /* 최소 높이 보장 */
}

/* 실제 체크박스 숨김 */
.notice-check-wrapper input[type="checkbox"] {
    display: none;
}

/* 라벨: 여기서 다시 한번 flex를 주어 박스와 글자를 맞춤 */
.notice-check-wrapper label {
    display: inline-flex;
    align-items: center; /* 커스텀 박스와 텍스트의 중앙을 맞춤 */
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    line-height: 1; /* 중요: 텍스트 줄간격에 의한 치우침 방지 */
}

/* 커스텀 체크박스 사각형 */
.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0; /* 박스가 찌그러지지 않게 */
    transition: all 0.2s ease;
    display: inline-block;
}

/* 체크 상태 디자인 */
.notice-check-wrapper input[type="checkbox"]:checked + label .custom-checkbox {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* 체크 표시 (V) */
.custom-checkbox::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

.notice-check-wrapper input[type="checkbox"]:checked + label .custom-checkbox::after {
    display: block;
}

/* 텍스트 영역 */
.label-text {
    display: inline-block;
    padding-top: 1px; /* 폰트에 따라 미세하게 위로 치우쳐 보일 때만 조절 (0~2px) */
}

/* 디자인 보완 */
.premium-wrapper { font-family: 'Pretendard', sans-serif; max-width: 1200px; margin: 0 auto; }
.premium-list-table { width: 100%; border-collapse: collapse; margin-top: 10px; border-top: 2px solid #334155; }
.premium-list-table th { background: #f8fafc; padding: 12px; border-bottom: 1px solid #e2e8f0; font-size: 14px; color: #475569; }
.premium-list-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; text-align: center; font-size: 14px; color: #334155; }
.td-subject { text-align: left !important; }
.subject-link { text-decoration: none; color: #1e293b; transition: color 0.2s; }
.subject-link:hover { color: #2563eb; }
.icon-lock { font-size: 12px; color: #94a3b8; margin-right: 4px; }
.reply-icon { color: #cbd5e1; margin-right: 5px; font-weight: bold; }
.text-locked { color: #94a3b8; cursor: pointer;}
.memo-count { color: #2563eb; font-size: 12px; margin-left: 5px; font-weight: bold; }


/* 페이징 영역 전체 컨테이너 */
.premium-paging-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
}

/* 기본 버튼 스타일 */
.pg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

/* 마우스를 올렸을 때 (Hover) */
.pg-link:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* 현재 페이지 활성화 (Active) */
.pg-link.active {
    background-color: #2563eb; /* 포인트 블루 컬러 */
    border-color: #2563eb;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

/* 이전/다음 글자 버튼 전용 */
.prev-next {
    font-size: 12px;
    font-weight: 500;
    background-color: #f1f5f9;
    color: #475569;
}

.prev-next:hover {
    background-color: #e2e8f0;
}

.board-write-box { width: 100%; padding: 10px; box-sizing: border-box; }
.w-table { width: 100%; border-collapse: collapse; border-top: 2px solid #555; background:#fff; }
.w-table th { width: 110px; background: #f9f9f9; padding: 10px; border-bottom: 1px solid #ddd; border-right: 1px solid #eee; text-align: right; font-size: 13px; color: #333; }
.w-table td { padding: 8px 12px; border-bottom: 1px solid #ddd; }
.input-form { width: 100%; height: 30px; border: 1px solid #ccc; padding: 0 5px; font-size: 13px; box-sizing: border-box; }

/* 기존 파일 목록 스타일 */
.old-file-item { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; background: #f1f5f9; padding: 5px 10px; border-radius: 4px; font-size: 12px; }
.del-check { color: #ef4444; font-weight: bold; cursor: pointer; }

.btn-group { text-align: center; margin-top: 20px; }
.btn-custom { display: inline-block; padding: 10px 30px; font-size: 14px; font-weight: bold; border-radius: 3px; cursor: pointer; text-decoration: none; border: none; }
.btn-gray { background: #888; color: #fff; margin-right: 5px; }
.btn-blue { background: #34495e; color: #fff; }
.btn-custom:hover { opacity: 0.9; }
/* 검색바 요소들의 높이를 34px로 통일 */
.md-search-select, 
.md-search-input, 
.md-search-btn {
    height: 34px; 
    box-sizing: border-box; /* 패딩이 높이에 영향을 주지 않도록 설정 */
    font-size: 13px;
    vertical-align: middle;
}

.md-search-select {
    padding: 0 5px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
}

.md-search-input {
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 150px;
    outline: none;
}

.md-search-input:focus {
    border-color: #3b82f6;
}

.md-search-btn {
    padding: 0 15px;
    background: #334155;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    line-height: 34px; /* 버튼 텍스트 수직 중앙 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-search-btn:hover {
    background: #1e293b;
}

/* 전체 건수 텍스트 위치 보정 */
.md-total-count-text {
    line-height: 34px; /* 검색바 높이와 맞춰서 시각적 평행 유지 */
}
/* 시간/날짜 필드 폰트 깨짐 방지 및 정렬 */
    .input-form[type="date"],
    .input-form[type="time"] {
        font-family: 'Malgun Gothic', '맑은 고딕', sans-serif !important;
        font-size: 14px !important;
        height: 38px;             /* 일반 input과 높이 통일 */
        line-height: 1.5;
        padding: 5px 10px;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        color: #374151;
        background-color: #fff;
        vertical-align: middle;
        box-sizing: border-box;
    }

    /* 크롬/엣지에서 시간 입력창의 내부 아이콘 스타일 조정 */
    .input-form[type="time"]::-webkit-calendar-picker-indicator,
    .input-form[type="date"]::-webkit-calendar-picker-indicator {
        cursor: pointer;
        filter: invert(0.5); /* 아이콘 색상을 살짝 흐리게 */
    }

    /* 감싸는 컨테이너 (정렬용) */
    .schedule-group {
        display: flex;
        align-items: center;
        gap: 8px; /* 필드 간 간격 */
    }
	
    .meoritdol-wrapper { max-width: 1200px; margin: 40px auto; font-family: 'Pretendard', sans-serif; padding: 0 0px; }
    
    /* 달력 상단 */
    .cal-container { background: #fff; border: 1px solid var(--border); border-radius: 0px; overflow: hidden; }
    .cal-header { display: flex; justify-content: space-between; align-items: center; padding: 40px; background: #fff; }
    .month-title { font-size: 64px; font-weight: 900; letter-spacing: -3px; color: #1e293b; margin: 0; }
    .nav-btn { padding: 10px 20px; border-radius: 8px; background: #f1f5f9; color: #475569; text-decoration: none; font-weight: 600; transition: 0.2s; font-size: 14px; }
    .nav-btn:hover { background: #e2e8f0; color: #1e293b; }

    /* 달력 그리드 */
    .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
    .label { padding: 15px; text-align: center; font-size: 11px; font-weight: 800; color: #94a3b8; background: #f8fafc; border-bottom: 1px solid var(--border); }
    .cell { min-height: 160px; padding: 10px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; position: relative; }
    .cell:nth-child(7n) { border-right: none; }
    
    .d-num { font-size: 14px; font-weight: 700; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; transition: 0.3s; margin-bottom: 10px; }
    .d-num:hover { background: var(--p-blue); color: #fff; }
    .today .d-num { background: var(--p-blue); color: #fff; }

    /* 일정 카드 (달력 내부) */
    .ev-card { display: block; padding: 6px 10px; margin-bottom: 6px; border-radius: 8px; background: #fff; border: 1px solid var(--border); text-decoration: none; transition: 0.2s; }
    .ev-card:hover { transform: translateY(-2px); border-color: var(--p-blue); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
    .ev-card.is-notice { border-left: 4px solid var(--p-red); background: #fffafb; }
    .ev-card.is-hidden { opacity: 0.6; border-style: dashed; background: #f8fafc; }
    
    .ev-title { display: block; font-size: 12px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ev-summary { display: block; font-size: 11px; color: #64748b; line-height: 1.3; height: 2.6em; overflow: hidden; margin: 4px 0; }
    .ev-meta { font-size: 10px; color: #94a3b8; }
	
	/* 달력 상단 */
.cal-container { background: #fff; border: 1px solid var(--border); border-radius: 0px; overflow: hidden; }
.cal-header { display: flex; justify-content: space-between; align-items: center; padding: 40px; background: #fff; }
.month-title { font-size: 64px; font-weight: 900; letter-spacing: -3px; color: #1e293b; margin: 0; }
.nav-btn { padding: 10px 20px; border-radius: 8px; background: #f1f5f9; color: #475569; text-decoration: none; font-weight: 600; transition: 0.2s; font-size: 14px; }
.nav-btn:hover { background: #e2e8f0; color: #1e293b; }

/* 달력 그리드 */
.cal-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    /* 중요: 그리드 자체가 부모를 넘지 못하게 고정 */
    width: 100%;
    table-layout: fixed; 
}
.label { padding: 15px; text-align: center; font-size: 11px; font-weight: 800; color: #94a3b8; background: #f8fafc; border-bottom: 1px solid var(--border); }

.cell { 
    min-height: 160px; 
    padding: 10px; 
    border-right: 1px solid #f1f5f9; 
    border-bottom: 1px solid #f1f5f9; 
    position: relative; 
    
    /* [핵심] 자식이 길어도 셀이 늘어나지 않게 차단 */
    min-width: 0; 
    overflow: hidden; 
}
.cell:nth-child(7n) { border-right: none; }

.d-num { font-size: 14px; font-weight: 700; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; transition: 0.3s; margin-bottom: 10px; }
.d-num:hover { background: var(--p-blue); color: #fff; }
.today .d-num { background: var(--p-blue); color: #fff; }

/* 일정 카드 (달력 내부) */
.ev-card { 
    display: block; 
    padding: 6px 10px; 
    margin-bottom: 6px; 
    border-radius: 8px; 
    background: #fff; 
    border: 1px solid var(--border); 
    text-decoration: none; 
    transition: 0.2s; 
    
    /* [핵심] 카드가 셀 너비를 절대 넘지 못하게 함 */
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.ev-card:hover { transform: translateY(-2px); border-color: var(--p-blue); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.ev-card.is-notice { border-left: 4px solid var(--p-red); background: #fffafb; }
.ev-card.is-hidden { opacity: 0.6; border-style: dashed; background: #f8fafc; }

/* 일정 제목: 길어지면 자동으로 다음 줄로 넘어감 */
.ev-title { 
    display: block; 
    font-size: 12px; 
    font-weight: 700; 
    color: #1e293b; 
    
    /* 줄바꿈 설정 */
    white-space: normal;       /* 자동 줄바꿈 허용 */
    word-break: break-all;     /* 영어든 숫자든 너비가 넘어가면 강제 줄바꿈 */
    line-height: 1.4;          /* 줄바꿈 시 가독성을 위해 간격 조정 */
    margin-bottom: 4px;
}

/* 요약글 부분도 자동으로 늘어나게 하려면 */
.ev-summary { 
    display: block; 
    font-size: 11px; 
    /* 줄바꿈 설정 */
    white-space: normal;       /* 자동 줄바꿈 허용 */
    word-break: break-all;     /* 영어든 숫자든 너비가 넘어가면 강제 줄바꿈 */
	color: #64748b; 
    line-height: 1.3; 
    height: auto;              /* 높이 제한 해제 */
    max-height: none;          /* 최대 높이 제한 해제 */
    overflow: visible;         /* 숨김 해제 */
    margin: 4px 0; 
}
.ev-meta { font-size: 10px; color: #94a3b8;
    /* 줄바꿈 설정 */
    white-space: normal;       /* 자동 줄바꿈 허용 */
    word-break: break-all;     /* 영어든 숫자든 너비가 넘어가면 강제 줄바꿈 */
   display: block; 
    font-size: 11px; 
    color: #64748b; 
    line-height: 1.3; 
    height: auto;              /* 높이 제한 해제 */
    max-height: none;          /* 최대 높이 제한 해제 */
    overflow: visible;         /* 숨김 해제 */
    margin: 4px 0; 

}

    /* 하단 리스트 */
    .list-section { margin-top: 60px; }
    .list-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #1e293b; padding-bottom: 15px; margin-bottom: 20px; }
    .list-item { display: flex; align-items: center; padding: 25px; border-bottom: 1px solid var(--border); background: #fff; transition: 0.2s; text-decoration: none; border-radius: 12px; margin-bottom: 10px; }
    .list-item:hover { background: #f8fafc; }
    .list-date { flex: 0 0 80px; text-align: center; border-right: 1px solid var(--border); margin-right: 30px; }
    .list-date .dd { font-size: 32px; font-weight: 900; color: #1e293b; display: block; line-height: 1; }
    .list-date .dw { font-size: 12px; color: #94a3b8; font-weight: 600; margin-top: 5px; }
    
    .badge-notice { background: var(--p-red); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
    .badge-private { background: #475569; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }

   