/* 기본 */
html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: #111827;
    color: #f9fafb;
       overflow-y: scroll;   /* 스크롤바 유지 */
     overscroll-behavior: none;
}

/* 페이지 래퍼 */
.page-wrap {
    background-color: #111827;
    min-height: calc(100vh - 50px);
    padding-top:54px;
}
.page-title{
    margin-top:25px;
}
.mypage_inner{
padding: 24px;
border: 1px solid #3f3f46;
max-width: 480px;
border-radius: 6px;
background:#18181b;
  margin-top:25px;
}
.page-inner {
    max-width: 1640px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 상단 상태 탭 */
.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.status-tab {
    position: relative;
    border: none;
    outline: none;
    padding: 11px 14px;
    background-color: #27272f;
    color: #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.status-bar-right{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap:wrap;
}
.status-tab .status-count {
    padding: 2px 8px;
    border-radius: 999px;
    background-color: #3f3f46;
    font-weight: 600;
    font-size: 11px;
}

.status-tab.is-active {
    background-color: #fbbf24;
    color: #111827;
}

.status-tab.is-active .status-count {
    background-color: rgba(17, 24, 39, 0.2);
}

/* 툴바 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 토글 버튼 */
.toggle-group {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #3f3f46;
}

.toggle-btn {
    border: none;
    min-width: 60px;
    padding: 7px 14px;
    font-size: 15px;
    background-color: #18181b;
    color: #d4d4d8;
    cursor: pointer;
}

.toggle-btn + .toggle-btn {
    border-left: 1px solid #3f3f46;
}

.toggle-btn.is-active {
    background-color: #fbbf24;
    color: #111827;
}

/* 날짜 범위 */
.date-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #18181b;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #3f3f46;
    font-size: 15px;
    color: #e5e7eb;
}

.date-range-display {
    white-space: nowrap;
}

.icon-btn {
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background-color: #27272f;
    color: #9ca3af;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: #3f3f46;
}

/* 검색, 액션 */
.search-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #18181b;
    padding: 4px 6px 4px 10px;
    border-radius: 6px;
    border: 1px solid #3f3f46;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    color: #f9fafb;
    font-size: 15px;
    min-width: 160px;
}

.search-box input::placeholder {
    color: #6b7280;
}

.change-stats {
    font-size: 15px;
    color: #e5e7eb;
    white-space: nowrap;
}

.action-group {
    display: inline-flex;
    gap: 6px;
}

/* 공통 버튼 */
.btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 15px;
    border-radius: 6px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn.primary {
    background-color: #fbbf24;
    color: #111827;
    font-weight: 600;
}
.btn-delete{
     background-color:#fbbf24
}

.btn-children{
     background-color:#10b981;
     color:white;
}
.btn-rank{
     background-color:transparent;
     color:#fbbf24;
     border:1px solid #fbbf24;
     border-radius:6px;
     padding: 6px 12px;
}
.btn-review{
     border:1px solid #555;
     color: #eee;
     border-radius:6px;
          background-color:transparent;
}

.btn.primary:hover {
    background-color: #f59e0b;
}

.btn.subtle {
    background-color: #27272f;
    color: #e5e7eb;

}

.btn.subtle:hover {
    background-color: #3f3f46;
}

/* 테이블 */
.table-wrap {
    margin-top: 15px;
    border-radius: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #3f3f46;
    background-color: #18181b;
}

.data-table {
    width: 100%;
    font-size: 15px;
    color: #e5e7eb;
    white-space:nowrap;
}

.data-table thead {
    background-color: #111827;
}

.data-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
    border-bottom: 1px solid #27272f;
}
.slot-table thead th {
    text-align: center !important;
}
.slot-table tbody td {
    text-align: center !important;
}
.data-table tbody tr {
    background-color: #18181b;
    transition: background-color 0.1s ease;
}

.data-table tbody tr:nth-child(even) {
    background-color: #202027;
}

.data-table tbody tr:hover {
    background-color: #262633;
}

.data-table td {
    padding: 10px 12px;
    word-break: break-all;
}

.col-select {
    width: 40px;
    text-align: center;
}

.col-number {
    width: 60px;
}

.col-status {
    width: 70px;
}

.col-rank {
    text-align: center;
}

/* 체크박스 커스텀 */
.checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-mark {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #4b5563;
    background-color: transparent;
    box-sizing: border-box;
}

.checkbox input:checked + .checkbox-mark {
    background-color: #fbbf24;
    border-color: #fbbf24;
}

/* 상태 배지 */
.badge {
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space:nowrap;
}

.badge-active {
    background-color: #22c55e1f;
    color: #bbf7d0;
    border: 1px solid #22c55e;
}

/* 빈 행 */
.empty-row td {
    text-align: center;
    padding: 32px 12px;
    color: #9ca3af;
}

/* 하단 */
.page-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.rows-per-page {
    font-size: 15px;
    color: #e5e7eb;
}

.rows-per-page select {
    margin-left: 6px;
    padding: 4px 8px;
    background-color: #18181b;
    border-radius: 6px;
    border: 1px solid #4b5563;
    color: #e5e7eb;
    font-size: 15px;
}
.select-box{
    margin-left: 6px;
    padding: 4px 8px;
    background-color: #18181b;
    border: none;
    color: #e5e7eb;
    font-size: 15px;
}
/* 페이징 */
.pagination {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}



.page-btn:hover {
    background-color: #3f3f46;
}

.page-btn.is-active {
    background-color: #fbbf24;
    color: #111827;
    font-weight: 600;
}

/* 반응형 */
@media (max-width: 1024px) {
    .page-inner {
        padding: 20px 16px 32px;
    }

    .data-table thead {
        font-size: 11px;
    }

    .data-table td {
        padding: 8px 8px;
    }
    .topbar{
        overflow:auto;

    }
}

@media (max-width: 768px) {
    .toolbar {
        align-items: flex-start;
    }

    .toolbar-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .change-stats {
        margin-top: 2px;
    }
}
/* 상단 전체 바 */
.topbar {
    background-color: #18181b;
    border-bottom: 1px solid #27272f;
}

.topbar-inner {
    margin: 0 auto;
    padding: 0 24px;
    height: 55px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    box-sizing: border-box;
    position:fixed;
    top:0px;
    width:100%;
    z-index:2000;
    background-color: #18181b;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

/* 좌측: 로고 + 메뉴 */
.topbar-left {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid #27272f;
    cursor: pointer;
}

.topbar-logo-mark {
    width: 30px;
    height: 30px;
}

.topbar-logo-text {
    font-size: 13px;
    font-weight: 600;
    color: #f9fafb;
}

/* 메뉴 공통 */
.topbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 2px;
}

.topbar-menu-right {
    gap: 4px;
}

.topbar-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 56px;
    font-size: 15px;
    color: #e5e7eb;
    text-decoration: none;
    background-color: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.topbar-item a:hover {
    background-color: #27272f;
}

.topbar-item.is-active a {
    background-color: #fbbf24;
    color: #111827;
    font-weight: 600;
}

/* 오른쪽 영역 */
.topbar-right {
    display: flex;
    align-items: stretch;
}

/* 아이콘(단순한 사각형/원 모양으로 처리) */
.topbar-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background-color: #9ca3af;
}

/* 아이콘별 모양(필요하면 마음대로 변경 가능) */
.topbar-icon-key {
    border-radius: 50%;
}

.topbar-icon-help {
    border-radius: 50%;
}

.topbar-icon-bell {
    border-radius: 50%;
}

.topbar-icon-user {
    border-radius: 50%;
}

/* 반응형: 좁은 화면에서는 스크롤 허용 */
@media (max-width: 1024px) {
    .topbar-inner {
        padding: 0 12px;
    }

    .topbar-menu {
        white-space: nowrap;
    }
}
#local-modal-backdrop {
    z-index: 9000 !important;
}
/* 모달 전체 영역 (배경) */
.modal-backdrop {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    background-color: rgba(15, 23, 42, 0.7);
    z-index: 9998;
}
.modal-card,
.modal-content {
    z-index: 9002 !important;
    pointer-events: auto !important;
}
/* 모달 래퍼: 화면 중앙 정렬 */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9001 !important;
    display: flex;
    align-items: center;      /* 수직 중앙 */
    justify-content: center;  /* 수평 중앙 */
    pointer-events: none;     /* 안에 컨텐츠만 클릭되도록 */
}
.modal-content.modal-card {
    background: #2c2c2c;
    border-radius: 12px;
    padding: 24px;
    width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

/* 모달 헤더 통일 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.modal-header h2 {
    font-size: 20px;
    color: #fff;
    font-weight: 600;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #bbb;
    cursor: pointer;
}

/* 폼 라벨 */
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #dcdcdc;
    display: inline-block;
    margin-bottom: 6px;
}

/* 입력 필드 */


/* 버튼 */
.modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 26px;
    gap: 12px;
}
.btn.modal-cancel {
    background: #5a5a5a;
    color: #fff;
    padding: 12px 0;
    width: 48%;
    border-radius: 8px;
    font-weight: 600;
}
.btn.modal-submit {
    background: #eabf30;
    color: #000;
    padding: 12px 0;
    width: 48%;
    border-radius: 8px;
    font-weight: 600;
}
.modal-footer .primary{
    flex: 1;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.modal-footer .subtle{
        flex: 1;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
/* 폼 레이아웃 */
.form-row {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 15px;
    color: #e5e7eb;
}

.form-input,
.form-select {
    border-radius: 6px;
    border: 1px solid #4b5563;
    background: #1b1b1b;
    background-color: #030712;
    color: #f9fafb;
    padding: 11px 12px;
    font-size: 15px;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: #fbbf24;
}
/* 슬롯 모달 카드 스타일 */

/* 헤더 */
.slot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.slot-modal-header h2 {
    font-size: 20px;
    color: #fff;
    font-weight: 600;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #bbb;
    cursor: pointer;
}

/* 라벨 */
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #dcdcdc;
    margin-bottom: 6px;
    display: inline-block;
}

/* 입력창 */
.form-input:disabled {
    opacity: 0.5;
}

/* 분류 버튼 */
.slot-type-row {
    margin-bottom: 18px;
}
.slot-type-tabs {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.slot-type-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #666;
    background: #3a3a3a;
    color: #ccc;
    cursor: pointer;
}
.slot-type-btn.active {
    background: #eabf30;
    border-color: #eabf30;
    color: #000;
    font-weight: 700;
}
.slot-type-btn:disabled {
    background: #555;
    border-color: #555;
    color: #888;
    cursor: not-allowed;
}

/* 도움문구 */
.slot-test-text {
    font-size: 15px;
    margin-top: 6px;
    color: #ff6969;
}

/* 버튼 영역 */
.slot-modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 12px;
}
.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn-cancel {
    background: #5a5a5a;
    color: #fff;
}
.btn-submit {
    background: #eabf30;
    color: #000;
}
.btn-submit:hover {
    background: #eabc3d;
}

.btn-cancel:hover {
    background: #666;
}
.slot-type-btn.disabled {
    background: #444 !important;
    border-color: #444 !important;
    color: #777 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;  /* ← 클릭 자체 차단 */
}

/* --------------------------------------------- */
/* 📌 카테고리 박스 (전체/활성/문제/테스트 등)  */
/* --------------------------------------------- */
.slot-category-bar {
    display: flex;
    gap: 8px;
}

.cat-item {
    position: relative;
    background: #27272f;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 15px;
    border: 1px solid #3f3f46;
    cursor: pointer;
    overflow: visible;
}

/* 툴팁 박스 */
.cat-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
}

/* 화살표 */
.cat-item::before {
    content: "";
    position: absolute;
    top: 115%;
    left: 50%;
    transform: translateX(-50%);

    border-width: 6px;
    border-style: solid;
    border-color: rgba(0,0,0,0.85) transparent transparent transparent;

    opacity: 0;
    transition: opacity 0.15s ease;
}

/* hover 시 표시 */
.cat-item:hover::after,
.cat-item:hover::before {
    opacity: 1;
}
.cat-item span {
    background: #3f3f46;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
}
.cat-item.active {
    background: #fbbf24;
    color: #111;
    border-color: #fbbf24;
}
.cat-item.active span {
    background: rgba(0,0,0,0.15);
}
.slotbox.active {
    border-color: #fbbf24;
}
/* --------------------------------------------- */
/* 📌 상승/하락/유지/오류 박스 */
/* --------------------------------------------- */
.slot-summary-boxes {
    display: flex;
    gap: 10px;
}

.slotbox {
    padding: 10px 16px;
    border-radius: 6px;
    background: #1f1f25;
    border: 1px solid #3f3f46;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slotbox.up {
  color: #22c55e;   /* green-500 */
}

.slotbox.down {
  color: #f97316;   /* orange-500 */
}
.slotbox.same {
  color: #94a3b8;   /* slate-400 */
}
.slotbox.no_search {
  color: #eab308;   /* amber-500 */
}
.slotbox.error,
.slotbox.out {
  color: #ef4444;   /* red-500 */
}
/* --------------------------------------------- */
/* 📌 날짜 + 검색 + 연장/수정/삭제 등 */
/* --------------------------------------------- */
.slot-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top:18px;
}

.slot-date {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #18181b;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #3f3f46;
}

.slot-date-display {
    color: #e5e7eb;
    font-size: 15px;
    padding:0 15px;
}

.slot-date-btn {
    background: #27272f;
    color: #aaa;
    border: none;
    padding: 4px 8px;
    border-radius: 999px;
    cursor: pointer;
}
.slot-date-btn:hover {
    background: #3f3f46;
}

/* 검색 */
.slot-search {
    display: flex;
    align-items: center;
    gap: 6px;
}
.slot-search input {
    padding: 6px 10px;
    border-radius: 6px;
    background: #18181b;
    border: 1px solid #3f3f46;
    color: #e5e7eb;
}
.slot-search input::placeholder {
    color: #6b7280;
}

/* 버튼 */
.slot-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
}
.slot-top-navi{
  display:flex;gap: 10px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
        justify-content: space-between;
}
.rank-summary {
    display: flex;
    gap: 14px;
}

.rank-box {
    background: #3a3a3a;
    border: 1px solid #f2b600;
    border-radius: 6px;
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #f2b600;
}



.rank-box .label {
    font-size: 15px;
    white-space:nowrap;
}

.rank-box .value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
}

.rank-box .arrow {
    font-size: 16px;
}

.rank-box .arrow.up {
    color: #f2b600;
}

.rank-box .arrow.down {
    color: #f2b600;
}
.slot-btn {
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    border: none;
}

.slot-btn.yellow {
    background: #fbbf24;
    color: #111;
    font-weight: 600;
}
.slot-btn.gray {
    background: #555;
    color: #eee;
}
.slot-btn.red {
    background: #e11d48;
    color: white;
}
.slot-btn.yellow-border {
    background: transparent;
    border: 1px solid #fbbf24;
    color: #fbbf24;
}
.item-name-cell {
    width: 400px; /* 또는 flex 기반 테이블이면 flex-grow 가능 */
}

.item_name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slot-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 10px 0;
}

.rows-select {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e5e7eb;
    font-size: 12px;
}

.rows-select select {
    padding: 6px;
    background: #18181b;
    color: #eee;
    border: 1px solid #4b5563;
    border-radius: 4px;
}

.pagination-buttons {
    display: flex;
    gap: 6px;
}

.page-btn {
    padding: 6px 10px;
    background: #27272f;
    color: #e5e7eb;
    border-radius: 6px;
    border: 1px solid #3f3f46;
    cursor: pointer;
}

.page-btn.active {
    background: #fbbf24;
    color: #111;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.target_link{
    color:white;
    text-decoration: none;
    display:flex;
    gap:10px;
}
.item_image{
    width:15px;
}
.item-name-cell a span {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;      /* 줄바꿈 방지 */
    overflow: hidden;         /* 넘치는 텍스트 숨김 */
    text-overflow: ellipsis;  /* ... 처리 */
    vertical-align: middle;
}
.item-name-cell span {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;      /* 줄바꿈 방지 */
    overflow: hidden;         /* 넘치는 텍스트 숨김 */
    text-overflow: ellipsis;  /* ... 처리 */
    vertical-align: middle;
}
.slot-url-guide {
    border: 1px solid #e3e8ef;
    background: #f9fbff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
}

.guide-section {
    display: flex;
    gap: 12px;
}

.guide-section + .guide-section {
    margin-top: 14px;
}

.guide-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background:#eabf30;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-content {
    flex: 1;
}

.guide-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #1f2d3d;
}

.guide-list {
    padding-left: 16px;
    margin: 0;
    color: #4a5568;
}

.guide-list li {
    margin-bottom: 4px;
}

.highlight {
    color: #d9534f;
    font-weight: 600;
}

.guide-url-box {
    background: #fff;
    border: 1px dashed #cfd8e3;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: monospace;
    font-size: 12px;
    color: #c7254e;
    word-break: break-all;
}
.custom-alert-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-alert-modal {
    width: 420px;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
    animation: alertPop .15s ease-out;
}

.custom-alert-body {
    padding: 24px;
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-line;
}

.custom-alert-footer {
    padding: 12px 24px 20px;
    text-align: right;
}

@keyframes alertPop {
    from {
        transform: scale(.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #27272f;
}
.detail-title{
    font-size:25px;
    font-weight: 700;
}
.detail-meta{
    margin:10px 0px;
}
.detail-content{
    margin:10px 0px;
}

.detail-content {
    white-space: pre-line;
}

.slot-sticky-header {
    position: sticky;
    top: 55px; /* topbar 높이 (topbar-inner height) */
    padding-top:25px;
    z-index: 40;
    background-color: #111827;
    padding-bottom: 12px;
}

.table_number{
    display:flex;
    gap:10px;
    align-items: center;
    white-space:nowrap;
    justify-content: flex-end;
}



/* 테이블만 스크롤 */
.rank-table-scroll {
    max-height: 320px;          /* 필요 시 조절 */
    overflow-y: auto;
    margin-top: 15px;
    border-top: 1px solid #333;
}

/* 테이블 헤더 고정 */
.rank-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0f172a;   /* 기존 테이블 헤더 색과 맞춤 */
}

.review-body {
    display: flex;
    gap: 16px;
    flex: 1;
    overflow: hidden;
}

.review-left {
    width: 45%;
    display: flex;
    flex-direction: column;
}

.review-right {
    width: 55%;
    display: flex;
    flex-direction: column;
}

.review-date-scroll {
    max-height: 280px;
    overflow-y: auto;
    margin-top:10px;
}

.review-date-scroll table {
    width: 100%;
    border-collapse: collapse;
}

.review-date-scroll thead th {
    position: sticky;
    top: 0;
    background: #111827;
    z-index: 1;
}

.review-detail-scroll {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
}

.review-date-row {
    cursor: pointer;
}
.review-date-row.active {
    background: rgba(250,204,21,0.15) !important;
}
.overflow-section{
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}
.tooltip-layer {
    position: fixed;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.tooltip-layer.show {
    opacity: 1;
}
::-webkit-scrollbar {
    height: 5px;   /* 가로 스크롤 높이 */
    width:10px
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

.user-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 0px;
}

.user-tree .tree-node {
    margin-bottom: 6px;
}

.user-tree .node-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
}



/* 🔥 toggle 전용 */
.user-tree .user-tree-toggle {
    width: 16px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    color: #555;
}

/* 기타 */
.user-tree .user-name {
    font-weight: 600;
}

.user-tree .child-count {
    font-size: 12px;
    color: #999;
}

.user-tree .children {
    margin: 5px 20px;
}

.grade-999 { background:#222; color:#fff; }
.grade-100 { background:#3b82f6; color:#fff; }
.grade-10  { background:#10b981; color:#fff; }
.grade-1   { background:#f59e0b; color:#000; }

.site-footer {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 44px;

    background-color: #18181b;
    border-top: 1px solid #27272a;

    display: flex;
    align-items: center;
    z-index: 1000;
}

.footer-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #a1a1aa;
    font-size: 12px;
}

.btn-clear-cache {
    background: transparent;
    border: 1px solid #3f3f46;
    color: #e5e7eb;

    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;

    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-clear-cache:hover {
    background-color: #27272a;
    border-color: #52525b;
}

.btn-clear-cache:active {
    background-color: #3f3f46;
}

@media (max-width: 768px) {
    .site-footer {
        height: 48px;
    }

    .footer-inner {
        font-size: 11px;
    }

    .btn-clear-cache {
        padding: 5px 8px;
    }
}


@media (max-width: 768px) {
  .modal-content.modal-card {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .review-body {
      flex: 1;                 /* 남은 영역 차지 */
      overflow-y: auto;        /* ✅ 여기서 스크롤 */
      min-height: 0;           /* flex 스크롤 핵심 */
    }
}

.review-body {
  display: flex;
  gap: 12px;
}

/* 📱 모바일 */
@media (max-width: 768px) {
  .review-body {
    flex-direction: column;
  }

  .review-left,
  .review-right {
    width: 100%;
  }

  .modal-body{
    height: 100%;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: space-between;
    padding:20px 0px
    }
    .tree-root{
            max-height: calc(100vh - 125px) !important;
            padding-bottom:10px;
    }
}

.rank-chart-wrap {
  width: 100%;
  height: 160px;          /* 🖥 PC */
}


.rank-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.rank-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rank-count {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #27272f;
    color: #fff;
}

.rank-btn.in .rank-count {
    background: #16a34a; /* 초록 */
}

.rank-btn.out .rank-count {
    background: #dc2626; /* 빨강 */
}

.badge {
    display: inline-block;
    min-width: 34px;
    text-align: center;

    padding: 3px 8px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.badge-in {
    background: rgba(34, 197, 94, 0.15); /* green */
    color: #22c55e;
}

.badge-out {
    background: rgba(239, 68, 68, 0.15); /* red */
    color: #ef4444;
}

.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#slot-in-out-modal .table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#slot-in-out-modal .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;

    background: #18181b;
    color: #e5e7eb;

    font-size: 13px;
    font-weight: 600;

    padding: 10px 12px;
    border-bottom: 1px solid #3f3f46;
}

#slot-in-out-modal .table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    color: #d4d4d8;

    border-bottom: 1px solid #27272a;
    vertical-align: middle;
}

#slot-in-out-modal .table tbody tr:hover {
    background: #1f2933;
}