@charset "utf-8";

:root {
    color-scheme: light;
    --site-bg: #f6f8fc;
    --site-surface: #ffffff;
    --site-surface-soft: #f7f9fc;
    --site-text: #202838;
    --site-muted: #667085;
    --site-border: #e1e6ef;
    --site-primary: #1a73fc;
    --site-shadow: 0 10px 30px rgba(34, 52, 84, .08);
}

[data-theme="dark"] {
    color-scheme: dark;
    --site-bg: #050505;
    --site-surface: #0d0d0d;
    --site-surface-soft: #151515;
    --site-text: #f2f2f2;
    --site-muted: #b5b5b5;
    --site-border: #2c2c2c;
    --site-primary: #6aa6ff;
    --site-shadow: 0 12px 32px rgba(0, 0, 0, .3);
}

html, body, .nt-body, #nt_body, #wrapper, #container {
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.site-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    background: var(--site-surface);
    color: var(--site-text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(34, 52, 84, .1);
    transition: transform .16s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.site-theme-toggle:hover { transform: translateY(-1px); }
.site-theme-toggle:focus-visible { outline: 3px solid rgba(26, 115, 252, .3); outline-offset: 2px; }
.site-theme-switch-track {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 48px;
    height: 24px;
    border: 1px solid #cbd4e1;
    border-radius: 999px;
    background: #e9eef6;
    box-shadow: inset 0 1px 3px rgba(30, 45, 70, .13);
    transition: background-color .22s ease, border-color .22s ease;
}
.site-theme-switch-track > i { display: none; }
.site-theme-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    color: #e2a719;
    box-shadow: 0 2px 5px rgba(22, 34, 54, .28);
    transition: transform .22s cubic-bezier(.22,.61,.36,1), color .22s ease, background-color .22s ease;
}
.site-theme-switch-knob::before {
    content: "\f185";
    font: normal normal normal 11px/1 FontAwesome;
}
[data-theme="dark"] .site-theme-switch-track { background: #263b5b; border-color: #526c93; }
[data-theme="dark"] .site-theme-switch-knob {
    transform: translateX(24px);
    background: #dce8fa;
    color: #355d96;
}
[data-theme="dark"] .site-theme-switch-knob::before { content: "\f186"; }
.site-theme-nav-item { display: flex; align-items: center; }
.site-theme-toggle-nav {
    min-height: 28px;
    margin: 0;
    padding: 0 9px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    line-height: 24px;
}
.site-theme-toggle-nav:hover { background: var(--site-surface-soft); }
.site-theme-toggle-mobile {
    width: 52px;
    min-height: 34px;
    padding: 0 2px;
    border-color: transparent;
    background: transparent;
    color: #fff;
    box-shadow: none;
}
.site-theme-toggle-mobile .site-theme-switch-track { width: 46px; }
[data-theme="dark"] .site-theme-toggle-mobile .site-theme-switch-knob { transform: translateX(22px); }

[data-theme="dark"] body,
[data-theme="dark"] .nt-body,
[data-theme="dark"] #nt_body,
[data-theme="dark"] #wrapper,
[data-theme="dark"] #container {
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--site-bg) !important;
    color: var(--site-text) !important;
}
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] p, [data-theme="dark"] label, [data-theme="dark"] legend,
[data-theme="dark"] .text-dark { color: var(--site-text) !important; }
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-black-50,
[data-theme="dark"] small { color: var(--site-muted) !important; }
[data-theme="dark"] a { color: #9cc2ff; }
[data-theme="dark"] a:hover { color: #c4d9ff; }
[data-theme="dark"] hr { border-color: var(--site-border); }

[data-theme="dark"] .card,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .popover,
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light,
[data-theme="dark"] .table,
[data-theme="dark"] .tbl_wrap,
[data-theme="dark"] .bo_list,
[data-theme="dark"] .bo_v,
[data-theme="dark"] .widget-box {
    background-color: var(--site-surface) !important;
    color: var(--site-text) !important;
    border-color: var(--site-border) !important;
}
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer,
[data-theme="dark"] .table thead th,
[data-theme="dark"] .tbl_head01 thead th,
[data-theme="dark"] .tbl_head02 thead th {
    background-color: var(--site-surface-soft) !important;
    color: var(--site-text) !important;
    border-color: var(--site-border) !important;
}
[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-theme="dark"] .tbl_head01 td,
[data-theme="dark"] .tbl_head02 td {
    color: var(--site-text) !important;
    border-color: var(--site-border) !important;
}
[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
[data-theme="dark"] .tbl_head01 tbody .even { background-color: rgba(255,255,255,.025) !important; }
[data-theme="dark"] .table-hover tbody tr:hover,
[data-theme="dark"] .tbl_head01 tbody tr:hover td { background-color: #202020 !important; }

[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .form-control,
[data-theme="dark"] .input-group-text {
    background-color: #090909 !important;
    color: var(--site-text) !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #8491a5 !important; opacity: 1; }
[data-theme="dark"] .form-control:focus {
    border-color: var(--site-primary) !important;
    box-shadow: 0 0 0 .2rem rgba(106,166,255,.18) !important;
}
[data-theme="dark"] .page-link {
    background-color: var(--site-surface) !important;
    color: #b8d1ff !important;
    border-color: var(--site-border) !important;
}
[data-theme="dark"] .page-item.active .page-link {
    background-color: #316fd1 !important;
    color: #fff !important;
    border-color: #316fd1 !important;
}

/* 출석부처럼 자체 색상을 가진 페이지도 전역 테마를 따른다. */
[data-theme="dark"] #BoardText { color: var(--site-text); }
[data-theme="dark"] #BoardText > table,
[data-theme="dark"] #date_layer > table,
[data-theme="dark"] #list_layer > table { background: var(--site-surface); }
[data-theme="dark"] #date_layer .w,
[data-theme="dark"] #date_layer .day1,
[data-theme="dark"] #date_layer .dot,
[data-theme="dark"] #list_layer .title,
[data-theme="dark"] #list_layer .list { color: var(--site-text) !important; }
[data-theme="dark"] #date_layer .title,
[data-theme="dark"] #date_layer .title1,
[data-theme="dark"] #date_layer .title2 {
    background: var(--site-surface-soft) !important;
}
[data-theme="dark"] #date_layer td,
[data-theme="dark"] #list_layer td { border-color: var(--site-border) !important; }
[data-theme="dark"] #list_layer .bgcolor0,
[data-theme="dark"] #list_layer .bgcolor2 { background-color: var(--site-surface) !important; }
[data-theme="dark"] #list_layer .bgcolor1 { background-color: var(--site-surface-soft) !important; }
[data-theme="dark"] .attendance-check-form {
    border-color: var(--site-border);
    background: linear-gradient(135deg, #202b3d 0%, #182130 72%);
    box-shadow: var(--site-shadow);
}
[data-theme="dark"] .attendance-check-copy strong { color: var(--site-text); }
[data-theme="dark"] .attendance-check-copy span { color: var(--site-muted); }
[data-theme="dark"] .chulsuk_rank_point_info span,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_rank_info,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_point_info {
    background: #202b3c !important;
    color: #dce6f3 !important;
    border-color: #405a7d !important;
    box-shadow: 0 6px 16px rgba(0,0,0,.28) !important;
}
[data-theme="dark"] .chulsuk_rank_point_info span:hover,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_rank_info:hover,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_point_info:hover {
    background: #293b55 !important;
    color: #fff !important;
    border-color: #6aa6ff !important;
}
[data-theme="dark"] .chulsuk_rank_point_info img { filter: brightness(1.08) saturate(.9); }
[data-theme="dark"] .chulsuk_popup {
    background: var(--site-surface) !important;
    color: var(--site-text);
    box-shadow: var(--site-shadow) !important;
}
[data-theme="dark"] .chulsuk_popup .text,
[data-theme="dark"] .chulsuk_popup .text span { color: var(--site-muted) !important; }
[data-theme="dark"] .chulsuk_popup table tr td { background: var(--site-surface-soft) !important; color: var(--site-text) !important; border-color: var(--site-border) !important; }

/* Event board cards */
[data-theme="dark"] #bo_gallery .list-item .list-item-div {
    background: var(--site-surface, #1a2230) !important;
    color: var(--site-text, #edf2f8) !important;
    border: 1px solid var(--site-border, #344054) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.28) !important;
}
[data-theme="dark"] #bo_gallery .list-item-title,
[data-theme="dark"] #bo_gallery .list-item-title a,
[data-theme="dark"] #bo_gallery .list-item-title span {
    color: var(--site-text, #edf2f8) !important;
}
[data-theme="dark"] #bo_gallery .list-event-info .list-event-date {
    background: #202b3c !important;
    border: 1px solid #34465f;
}
[data-theme="dark"] #bo_gallery .list-event-info .list-event-date span:first-child { color: #aeb9c9 !important; }
[data-theme="dark"] #bo_gallery .list-event-info .list-event-date span:last-child { color: #8ab6ff !important; }
[data-theme="dark"] #bo_gallery .list-item-div.event_end {
    background: #171e29 !important;
    border-color: #303a49 !important;
}
[data-theme="dark"] #bo_gallery .list-item-div.event_end .list-item-title,
[data-theme="dark"] #bo_gallery .list-item-div.event_end .list-item-title a,
[data-theme="dark"] #bo_gallery .list-item-div.event_end .list-item-title span { color: #a7b0bd !important; }
[data-theme="dark"] #bo_gallery .list-item-div.event_end .list-event-date { background: #1d2531 !important; border-color: #303a49; }
[data-theme="dark"] #bo_gallery .list-item-div.event_end .list-event-date span { color: #8994a4 !important; }
[data-theme="dark"] #bo_gallery .img-wrap.bg-light { background: #111722 !important; }
[data-theme="dark"] #bo_gallery { border-color: var(--site-border, #344054) !important; }
[data-theme="dark"] #bo_list > .na-table,
[data-theme="dark"] #bo_list > .na-table > li {
    background: var(--site-surface, #1a2230) !important;
    color: var(--site-muted, #aab5c5) !important;
    border-color: var(--site-border, #344054) !important;
}
[data-theme="dark"] #bo_list > .na-table .na-subject { color: var(--site-text, #edf2f8) !important; }
[data-theme="dark"] .event_notice_list,
[data-theme="dark"] .event_notice_list .swiper,
[data-theme="dark"] .event_notice_list .swiper2 {
    background: var(--site-surface, #1a2230) !important;
    color: var(--site-text, #edf2f8) !important;
    border-color: var(--site-border, #344054) !important;
}
[data-theme="dark"] .event_notice_list .na-subject { color: var(--site-text, #edf2f8) !important; }
[data-theme="dark"] .event_notice_list .swiper-button-prev,
[data-theme="dark"] .event_notice_list .swiper-button-next { color: #aebbd0 !important; }

/* Board notices: distinguish with typography, not a yellow row background. */
[data-theme="dark"] .bo_notice,
[data-theme="dark"] .bo_notice td,
[data-theme="dark"] #bo_list .na-table > li:has(.na-notice),
[data-theme="dark"] #bo_list .na-table > li:has(.notice) {
    background: var(--site-surface, #1a2230) !important;
    border-color: var(--site-border, #344054) !important;
}
[data-theme="dark"] .bo_notice td a,
[data-theme="dark"] #bo_list .na-table > li:has(.na-notice) .na-subject,
[data-theme="dark"] #bo_list .na-table > li:has(.notice) .na-subject {
    color: #a9c9ff !important;
    font-family: inherit !important;
    font-weight: 800 !important;
    letter-spacing: -.015em;
}
[data-theme="dark"] .bo_notice .notice_icon,
[data-theme="dark"] #bo_list .na-notice,
[data-theme="dark"] #bo_list .notice {
    color: #8bb7ff !important;
    font-weight: 800 !important;
}

/* 모든 게시판 상세: 에디터가 저장한 라이트 배경/어두운 글자 보정 */
[data-theme="dark"] #bo_v_con [style*="background-color:rgb(255,255,255)"],
[data-theme="dark"] #bo_v_con [style*="background-color: rgb(255, 255, 255)"],
[data-theme="dark"] #bo_v_con [style*="background-color:#fff"],
[data-theme="dark"] #bo_v_con [style*="background-color: #fff"],
[data-theme="dark"] #bo_v_con [style*="background-color:white"],
[data-theme="dark"] #bo_v_con [style*="background-color: white"],
[data-theme="dark"] #bo_v_con [style*="background:#fff"],
[data-theme="dark"] #bo_v_con [style*="background: #fff"],
[data-theme="dark"] #bo_v_con [style*="background:rgb(255,255,255)"],
[data-theme="dark"] #bo_v_con [style*="background: rgb(255, 255, 255)"] {
    color: inherit !important;
    background-color: transparent !important;
    background-image: none !important;
}
[data-theme="dark"] #bo_v_con [style*="color:rgb(0,0,0)"],
[data-theme="dark"] #bo_v_con [style*="color: rgb(0, 0, 0)"],
[data-theme="dark"] #bo_v_con [style*="color:#000"],
[data-theme="dark"] #bo_v_con [style*="color: #000"],
[data-theme="dark"] #bo_v_con [style*="color:black"],
[data-theme="dark"] #bo_v_con [style*="color: black"],
[data-theme="dark"] #bo_v_con [style*="color:rgb(51,51,51)"],
[data-theme="dark"] #bo_v_con [style*="color: rgb(51, 51, 51)"],
[data-theme="dark"] #bo_v_con [style*="color:rgb(53,46,44)"],
[data-theme="dark"] #bo_v_con [style*="color: rgb(53, 46, 44)"] {
    color: var(--site-text, #e8edf5) !important;
}
[data-theme="dark"] #bo_v_con .view-content { color: var(--site-text, #e8edf5); }
[data-theme="dark"] #bo_v_con .view-content a { color: #9fc0ff !important; }

/* 우측 내정보/메뉴 사이드 패널 */
[data-theme="dark"] #nt_sidebar,
[data-theme="dark"] #nt_sidebar .sidebar-content,
[data-theme="dark"] #nt_sidebar .sidebar-item,
[data-theme="dark"] #nt_sidebar .sidebar-list,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-ul,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-ul1,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-ul2 {
    color: var(--site-text) !important;
    background: var(--site-surface) !important;
}
[data-theme="dark"] #nt_sidebar {
    border-left: 1px solid var(--site-border);
    box-shadow: -12px 0 34px rgba(0,0,0,.38) !important;
}
[data-theme="dark"] #nt_sidebar .sidebar-list h5,
[data-theme="dark"] #nt_sidebar .sidebar-list li,
[data-theme="dark"] #nt_sidebar .sidebar-list li a {
    color: var(--site-text) !important;
    border-color: var(--site-border) !important;
}
[data-theme="dark"] #nt_sidebar .sidebar-list li a:hover,
[data-theme="dark"] #nt_sidebar .sidebar-list li a:focus-visible {
    color: #fff !important;
    background: #29364a !important;
}
[data-theme="dark"] #nt_sidebar .sidebar-list .tree-toggle { color: var(--site-muted) !important; }
[data-theme="dark"] #nt_sidebar .sidebar-list .me-line1 .me-a1,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-line2 .me-a2 { background:#253146 !important; }
[data-theme="dark"] #nt_sidebar .progress.bg-white { background:#111927 !important; }
[data-theme="dark"] #nt_sidebar .sv_wrap .sv {
    border:1px solid var(--site-border);
    background:#202b3d;
    box-shadow:0 10px 24px rgba(0,0,0,.32);
}
[data-theme="dark"] #nt_sidebar .sv_wrap .sv::before { border-bottom-color:#202b3d; }
[data-theme="dark"] #nt_sidebar_mask { background:rgba(2,6,14,.82) !important; backdrop-filter:blur(2px); }
@media (max-width:767px) {
    [data-theme="dark"] #nt_sidebar {
        border-left:0;
        border-right:1px solid var(--site-border);
        box-shadow:12px 0 34px rgba(0,0,0,.42) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html, body, .nt-body, #nt_body, #wrapper, #container, .site-theme-toggle { transition: none !important; }
}

/* Final neutral-black overrides must follow component-specific dark rules. */
[data-theme="dark"] .site-theme-switch-track { background: #1c1c1c; border-color: #555; }
[data-theme="dark"] .site-theme-switch-knob { background: #e8e8e8; color: #333; }
[data-theme="dark"] .attendance-check-form { background: linear-gradient(135deg, #171717 0%, #0b0b0b 72%); }
[data-theme="dark"] .chulsuk_rank_point_info span,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_rank_info,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_point_info,
[data-theme="dark"] #bo_gallery .list-event-info .list-event-date,
[data-theme="dark"] #nt_sidebar .sv_wrap .sv { background: #181818 !important; border-color: #353535 !important; }
[data-theme="dark"] .chulsuk_rank_point_info span:hover,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_rank_info:hover,
[data-theme="dark"] .chulsuk_rank_point_info #chulsuk_point_info:hover,
[data-theme="dark"] #nt_sidebar .sidebar-list li a:hover,
[data-theme="dark"] #nt_sidebar .sidebar-list li a:focus-visible { background: #242424 !important; }
[data-theme="dark"] #bo_gallery .list-item-div.event_end { background: #090909 !important; border-color: #292929 !important; }
[data-theme="dark"] #bo_gallery .list-item-div.event_end .list-event-date { background: #121212 !important; border-color: #292929; }
[data-theme="dark"] #bo_gallery .img-wrap.bg-light,
[data-theme="dark"] #nt_sidebar .progress.bg-white { background: #050505 !important; }
[data-theme="dark"] #nt_sidebar .sidebar-list .me-line1 .me-a1,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-line2 .me-a2 { background: #1c1c1c !important; }
[data-theme="dark"] #nt_sidebar .sv_wrap .sv::before { border-bottom-color: #181818; }
[data-theme="dark"] #nt_sidebar_mask { background: rgba(0,0,0,.86) !important; }

/* High-contrast selected menus on neutral-black surfaces. */
[data-theme="dark"] #nt_menu { background-color: #0d0d0d !important; }
[data-theme="dark"] #nt_menu .me-a { color: #c7d7ff !important; }
[data-theme="dark"] #nt_menu .me-li.on .me-a,
[data-theme="dark"] #nt_menu .me-li:hover .me-a,
[data-theme="dark"] #nt_menu .me-li:focus-within .me-a {
    color: #fff !important;
    background: #202020 !important;
    text-shadow: 0 0 1px rgba(255,255,255,.35);
}
[data-theme="dark"] #nt_menu .me-icon.order-1,
[data-theme="dark"] #nt_menu .me-icon.order-1.on,
[data-theme="dark"] #nt_menu .me-icon.order-1:hover,
[data-theme="dark"] #nt_menu .me-icon.order-1:focus-within,
[data-theme="dark"] #nt_menu .me-icon.order-1 .me-a {
    background: #0d0d0d !important;
    text-shadow: none;
}
[data-theme="dark"] #nt_menu .sub-1div,
[data-theme="dark"] #nt_menu .sub-2div,
[data-theme="dark"] #nt_menu .sub-1dul { background: #111 !important; }
[data-theme="dark"] #nt_menu .sub-1da,
[data-theme="dark"] #nt_menu .sub-2da {
    color: #d7d7d7 !important;
    border-color: #303030 !important;
}
[data-theme="dark"] #nt_menu .sub-1dli.on > .sub-1da,
[data-theme="dark"] #nt_menu .sub-1dli:hover > .sub-1da,
[data-theme="dark"] #nt_menu .sub-2dli.on > .sub-2da,
[data-theme="dark"] #nt_menu .sub-2dli:hover > .sub-2da {
    color: #fff !important;
    background: #262626 !important;
    font-weight: 800;
}
[data-theme="dark"] #nt_menu_mobile .bold > a,
[data-theme="dark"] #mobile_nav_sub1 li.active > a {
    color: #fff !important;
    background: #242424 !important;
    font-weight: 800 !important;
}
[data-theme="dark"] #nt_sidebar .sidebar-list .me-li.active > .me-a,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-li1.active > .me-a1,
[data-theme="dark"] #nt_sidebar .sidebar-list .me-li2.active > .me-a2 {
    color: #fff !important;
    background: #242424 !important;
    font-weight: 800 !important;
}
