/* -----------------------
   1. 기본 초기화 (Reset)
------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-size: 16px;
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 가로 스크롤만 제거. overflow:hidden 금지 → 드롭다운 잘림/스크롤 점프 방지 */
html {
    overflow-x: hidden;
    max-width: 100%;
}
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* 얇고 둥근 스크롤바 (전역) */
html {
    scrollbar-width: thin;
    scrollbar-color: #a8b2c0 #eef1f5;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #a8b2c0 transparent;
}
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
    background-color: #a8b2c0;
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: #8793a5;
}
*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Bootstrap row 음수 마진으로 생기는 가로 스크롤만 보정 */
.container-fluid > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    --bs-gutter-x: 0;
}

/* 상단 메뉴라인: 스크롤 컨테이너로 만들지 않음(원래 레이아웃) */
body > nav,
#lbpMainMenuWrap > nav,
.ely-top-nav {
    position: relative;
    z-index: 1030;
    overflow: visible !important;
    flex-wrap: wrap;
    row-gap: 0.35rem;
}
body > nav .dropdown,
#lbpMainMenuWrap > nav .dropdown,
.ely-top-nav .dropdown {
    position: static;
}
body > nav .dropdown-menu,
#lbpMainMenuWrap > nav .dropdown-menu,
.ely-top-nav .dropdown-menu {
    z-index: 1080;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

/* 최상단 메뉴 — 배경만 다크 (버튼/자동화 동작 유지) */
.ely-top-nav {
    background: #12161f !important;
    border-bottom: 1px solid #2a3142 !important;
}

/* 다크 상단바에서 가독성 낮은 outline 버튼 — 텍스트/테두리만 밝은 톤 */
.ely-top-nav a[href="virtual_source_list.php"].btn-outline-primary,
.ely-top-nav a[href="other_sitelist.php?send_type=telegram"].btn-outline-primary,
.ely-top-nav #e2chatBtn.btn-outline-primary {
    color: #8ec5ff !important;
    border-color: #8ec5ff !important;
    background-color: transparent !important;
}
.ely-top-nav a[href="virtual_source_list.php"].btn-outline-primary:hover,
.ely-top-nav a[href="other_sitelist.php?send_type=telegram"].btn-outline-primary:hover,
.ely-top-nav #e2chatBtn.btn-outline-primary:hover,
.ely-top-nav #e2chatBtn.btn-outline-primary.active {
    color: #d6ebff !important;
    border-color: #b7d9ff !important;
    background-color: rgba(142, 197, 255, 0.12) !important;
}

.ely-top-nav a[href="board_list.php"].btn-outline-success {
    color: #7debb8 !important;
    border-color: #7debb8 !important;
    background-color: transparent !important;
}
.ely-top-nav a[href="board_list.php"].btn-outline-success:hover,
.ely-top-nav a[href="board_list.php"].btn-outline-success.active {
    color: #c6f7e0 !important;
    border-color: #a6f0d0 !important;
    background-color: rgba(125, 235, 184, 0.12) !important;
}

.ely-top-nav #captchaBtn.btn-outline-secondary,
.ely-top-nav #captchaBtn.captcha-btn {
    color: #d0d7e2 !important;
    border-color: #aeb8c7 !important;
    background-color: transparent !important;
}
.ely-top-nav #captchaBtn.btn-outline-secondary:hover,
.ely-top-nav #captchaBtn.captcha-btn:hover {
    color: #ffffff !important;
    border-color: #d7dde7 !important;
    background-color: rgba(208, 215, 226, 0.12) !important;
}

.ely-top-nav #backofficeBtn.btn-outline-dark {
    color: #e8ecf2 !important;
    border-color: #c5ccd8 !important;
    background-color: transparent !important;
}
.ely-top-nav #backofficeBtn.btn-outline-dark:hover {
    color: #ffffff !important;
    border-color: #e8ecf2 !important;
    background-color: rgba(232, 236, 242, 0.12) !important;
}
.ely-top-nav #backofficeBtn.btn-outline-dark.border-danger {
    color: #ff9aa5 !important;
    border-color: #ff6b7a !important;
}

img, picture, video, canvas, svg {

    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
	white-space: nowrap; /* 줄바꿈 방지 */
}

/* 링크 스타일 초기화 */
a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* -----------------------
   2. 사용자 정의 스타일
------------------------ */
.container {
    max-width: 600px;
    margin-top: 50px;
}

.card {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.d_table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 0.8rem;
  background: #fff;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.d_table th, .d_table td {
  padding: 2px 1px 2px 1px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

/* 헤더는 tbody.d_th 사용 (thead 아님) */
.d_table .d_th th,
.d_table th {
  background-color: #eef2f7;
  color: #334155;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.01em;
  padding: 11px 8px;
  border-bottom: 1px solid #d8dee8;
  white-space: nowrap;
  vertical-align: middle;
}

.d_table td:nth-child(3){
  white-space:nowrap !important;
}
.d_table thead tr {
  background-color: #eef2f7;
  font-weight: 600;
  color: #334155;
  border-bottom: 2px solid #ced4da;
}

.d_table tbody#SbLists tr:hover,
.d_table tbody tr.sb_table_tr:hover {
  background-color: #e9ecef;
}

.d_table tbody tr.sb_table_tr .board-title-cell {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.d_table tbody tr.sb_table_tr .board-comment-count {
  display: inline;
  color: #b71c1c;
  font-weight: 800;
  font-size: 0.85rem;
  margin-left: 3px;
  letter-spacing: 0.02em;
}
.board-checkbox,.target-checkbox {
  width: 25px;  /* 원하는 너비로 설정 */
  height: 25px; /* 원하는 높이로 설정 */
  vertical-align: middle;
  border:1px solid #fefefe;
}

/* 글목록: 좌측 테이블 가로스크롤 제거 + 컬럼 압축 */
.board-list-left {
  overflow-x: hidden !important;
  max-width: 100%;
}
.board-list-left #siteSignSelect {
  max-width: 150px;
  width: 150px;
  text-overflow: ellipsis;
}
.board-list-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}
.board-list-table th,
.board-list-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}
/* 메인 타이틀 톤 테이블 헤더 (글목록 / 자·타사이트 등) */
.d_table.slate-th .d_th th,
.board-list-table .d_th th {
  padding-top: 8px;
  padding-bottom: 8px;
  background: linear-gradient(180deg, #243044 0%, #1a2436 100%);
  color: #e8eef8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.d_table.slate-th .d_th th .bi-gear-fill,
.board-list-table .d_th th .bi-gear-fill {
  color: #8ec8e8 !important;
}
.board-detail-header {
  border-bottom: 1px solid #eee;
  padding: 0.5rem;
  margin-bottom: 1rem;
}
.board-detail-title {
  margin: 0;
  font-weight: 700;
  color: #333;
  font-size: calc(1.5rem - 4px); /* 기본 h4보다 약 4px 축소 */
  line-height: 1.35;
}
.board-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.55rem;
}
.board-detail-actions-left,
.board-detail-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.board-detail-actions-left {
  justify-content: flex-start;
}
.board-detail-actions-right {
  justify-content: flex-end;
  margin-left: auto;
}
.board-detail-actions .bd-btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
}
.board-detail-actions .bd-btn-keyword {
  border: 1px solid #007bff;
  background: #f0f8ff;
  color: #007bff;
}
.board-detail-actions .bd-btn-plain {
  border: 1px solid #28a745;
  background: #f8fff9;
  color: #28a745;
}
.board-detail-actions .bd-btn-edit {
  border: 1px solid #ccc;
  background: #f8f8f8;
  color: #333;
  position: relative;
}
.board-detail-actions .bd-btn-comment {
  border: 1px solid #6f42c1;
  background: #f8f5ff;
  color: #6f42c1;
}
.board-comments-panel {
  border-top: 1px solid #e9ecef;
  margin-top: 1rem;
  padding: 0.85rem 0.65rem 0.75rem;
  background: #fafbfc;
}
.board-comments-panel-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #333;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.board-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.board-comment-item {
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.board-comment-item-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.board-comment-author {
  font-size: 0.9rem;
  color: #333;
  font-weight: 700;
}
.board-comment-date {
  font-size: 0.75rem;
  color: #888;
  white-space: nowrap;
}
.board-comment-body {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.board-comments-empty {
  padding: 0.85rem 0.5rem;
  text-align: center;
  color: #98a2b3;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.board-comment-form {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem;
}
.board-comment-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.board-comment-form-row label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  min-width: 48px;
}
.board-comment-form-row .form-control {
  max-width: 220px;
  font-size: 0.875rem;
}
.board-comment-form textarea.form-control {
  max-width: none;
  width: 100%;
  min-height: 88px;
  resize: vertical;
  font-size: 0.9rem;
}
.board-comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.board-list-table .col-check,
.board-list-table td:nth-child(1) { width: 44px; text-align: center; }
.board-list-table .col-num,
.board-list-table td:nth-child(2) { width: 52px; }
.board-list-table .col-fit,
.board-list-table td:nth-child(3) { width: 11%; }
.board-list-table .col-cat,
.board-list-table td:nth-child(4) { width: 11%; }
.board-list-table .col-site,
.board-list-table td:nth-child(5) { width: 12%; }
.board-list-table .col-type,
.board-list-table td:nth-child(6) { width: 12%; }
.board-list-table .col-title,
.board-list-table td:nth-child(7) { width: auto; }
.board-list-table .col-pub,
.board-list-table td:nth-child(8) {
  width: 78px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}
.board-list-table td:nth-child(8) .btn {
  padding: 0.15rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .d_table th, .d_table td {
	padding:5px 0px 5px 0px;
    font-size: 0.85rem;
  }
  .d_table .d_th th,
  .d_table th {
    padding: 10px 6px;
  }
}

.paging{position:relative;width:100%;height:50px;padding-top:3px;margin-top:10px;background-color:#fefefe;padding-top:10px;border-radius:8px;}
#paging{position:relative;margin:0 auto;display:table;text-align:center;padding:0;}
#paging ul{margin:0;padding:0;}
#paging li{list-style:none;display:inline-block;text-align:center;border-radius:5px 5px 5px 5px;margin:2px;padding:5px 2px 5px 2px;cursor:pointer;min-width:40px;font-weight:bold;font-size:13px;background-color:#f2f2f2;color:#333;}
.page_selected{background-color:#F9EBDE !important;color:#815854 !important;}




#t_paging{position:relative;margin:0 auto;display:table;text-align:center;padding:0;}
#t_paging ul{margin:0;padding:0;}
#t_paging li{list-style:none;display:inline-block;text-align:center;border-radius:5px 5px 5px 5px;margin:2px;padding:5px 2px 5px 2px;cursor:pointer;min-width:40px;font-weight:bold;font-size:13px;background-color:#f2f2f2;color:#333;}





.sb_table_tr.selected {
    background-color: #f0f9ff;
    font-weight: bold;
}
.modal-fullscreen iframe {
    height: 100vh !important;
}
/* 에디터 다크 테마 */
#parsing_editor {
    background: #1e1e1e;
    color: #d4d4d4;
}

.parser-editor {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 구문 강조 색상 */
.text-info { color: #569cd6 !important; }
.text-warning { color: #d7ba7d !important; }
.text-success { color: #6a9955 !important; }
.text-primary { color: #9cdcfe !important; }
.text-danger { color: #d16969 !important; }

/* 에디터 스크롤바 */
#parserEditor::-webkit-scrollbar {
    width: 12px;
}

#parserEditor::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 6px;
}

#parserEditor::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 6px;
}

#parserEditor::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

/* 에디터 포커스 스타일 */
#parserEditor:focus {
    box-shadow: 0 0 0 2px #007bff;
}

.content-row pre {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    max-width: 800px;
    max-height: 600px;
    overflow: auto;
}

.btn-group-sm > .btn {
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem;
}

.toggle-content.active {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* 내용 컨테이너 스타일 추가 */
.content-container {
    max-width: 800px;
    max-height: 600px;
    overflow: auto;
}

/* 탭 스타일 */
.content-tabs {
    border-bottom: 1px solid #444;
    margin-bottom: 15px;
}

.content-tab {
    background: none;
    border: none;
    color: #ccc;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.content-tab.active {
    color: #fff;
    border-bottom-color: #007bff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


