/* 인트라넷 공통 스타일
 * --main-color : 관리자 > 회사 설정의 대표색 (header.php 에서 주입)
 */

/* 한글 폰트 (OS 기본 폰트 사용, 외부 폰트 미사용) */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

/* 대표색 적용 */
.btn-main {
    background-color: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
}
.btn-main:hover,
.btn-main:focus {
    filter: brightness(0.9);
    color: #fff;
}
.card-main.card-outline {
    border-top: 3px solid var(--main-color);
}
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--main-color);
}
.login-page .card-main.card-outline {
    border-top-color: var(--main-color);
}

/* 로고 */
.brand-link {
    display: flex;
    align-items: center;
    min-height: 57px;
}
.brand-link .brand-logo {
    max-height: 40px;
    max-width: 100%;
}
.sidebar-collapse .brand-link .brand-logo {
    max-width: 40px;          /* 메뉴 접었을 때 */
}
.login-logo-img {
    max-height: 60px;
    max-width: 100%;
}

/* 페이징 */
.pagination .page-item.active .page-link {
    background-color: var(--main-color);
    border-color: var(--main-color);
}

/* 게시판 */
.text-main { color: var(--main-color) !important; }
.badge-main { background-color: var(--main-color); color: #fff; }
.table-notice { background-color: rgba(0, 0, 0, .03); font-weight: 600; }
.post-content { min-height: 120px; word-break: break-word; line-height: 1.7; }
.post-content img { max-width: 100%; height: auto; }
.post-content table { border-collapse: collapse; }
.post-content table td, .post-content table th { border: 1px solid #dee2e6; padding: 4px 8px; }
.note-editor .note-editable { line-height: 1.7; }

/* 캘린더 */
.scope-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.fc .fc-button-primary { background-color: var(--main-color); border-color: var(--main-color); }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active { filter: brightness(0.85); background-color: var(--main-color); border-color: var(--main-color); }
.fc .fc-day-sun .fc-col-header-cell-cushion, .fc .fc-day-sun .fc-daygrid-day-number { color: #dc2626; }
.fc .fc-day-sat .fc-col-header-cell-cushion, .fc .fc-day-sat .fc-daygrid-day-number { color: #2563eb; }
.fc .fc-daygrid-day-number, .fc .fc-col-header-cell-cushion { color: inherit; text-decoration: none; }
.fc .fc-toolbar-title { font-size: 1.3rem; }

/* 메신저 */
.chat-wrap { height: calc(100vh - 200px); min-height: 460px; }
.chat-wrap > div { height: 100%; }
.chat-room-scroll { overflow-y: auto; }
.chat-room-item { cursor: pointer; padding: .6rem .9rem; }
.chat-room-item.active-room { background-color: rgba(0, 0, 0, .06); border-left: 3px solid var(--main-color); }
.chat-msg-scroll { overflow-y: auto; background: #f4f6f9; flex: 1 1 auto; min-height: 0; }
.chat-date { text-align: center; margin: 14px 0 8px; }
.chat-date span, .chat-system span { display: inline-block; background: rgba(0, 0, 0, .08); color: #555; font-size: .75rem; padding: 2px 10px; border-radius: 10px; }
.chat-system { text-align: center; margin: 6px 0; }
.chat-row { display: flex; margin: 6px 0; }
.chat-row.mine { justify-content: flex-end; }
.chat-box { max-width: 75%; }
.chat-name { font-size: .75rem; color: #555; margin: 0 0 2px 2px; }
.chat-bubble { background: #fff; border-radius: 12px; padding: 7px 11px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.chat-row.mine .chat-bubble { background: #fff3c4; }
.chat-bubble-img { padding: 3px; background: transparent !important; box-shadow: none; }
.chat-bubble-img img { max-width: 240px; max-height: 240px; border-radius: 8px; display: block; }
.chat-file { color: inherit; display: inline-flex; align-items: center; }
.chat-meta { font-size: .68rem; color: #888; margin: 0 5px; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }
.chat-row:not(.mine) .chat-meta { align-items: flex-start; }
.chat-unread { color: var(--main-color); font-weight: 700; }
#msgInput { resize: none; max-height: 120px; }
@media (max-width: 767.98px) { .chat-wrap { height: auto; } .chat-wrap > div { height: 70vh; } }
#roomTitle { float: none; display: block; margin: 0; }
.chat-bubble-file { min-width: 220px; }
.chat-dl { display: inline-block; font-size: .75rem; padding: 1px 8px; }
.btn-xs { line-height: 1.4; }
