/* 매니저 페이지 전용 스타일 */

/* 명성과 점수 통일된 스타일 */
.card .fame,
.card .score-info {
    font-size: 14px !important;
    font-weight: bold !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    line-height: 1 !important;
    height: 19px !important;
    overflow: hidden !important;
}

/* 명성 색상 */
.card .fame {
    color: #666666 !important; /* 연한 검은색 */
}

/* 점수 색상 */
.card .score-info {
    color: #2196f3 !important; /* 그리드와 동일한 연한 파란색 */
}

/* 명성 값과 점수 값 통일된 스타일 */
.fame-value,
.score-value {
    font-weight: bold;
    margin-left: 4px;
}

/* 명성 아이콘 */
.card .fame::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('/img/ico_fame.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: text-top;
    margin-right: 5px;
    margin-top: 3px;
}

/* 점수 아이콘 */
.card .score-info::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 19px;
    background-image: url('/img/ico_score.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 5px;
    vertical-align: middle;
}

/* 점수 라벨 */
.score-label {
    font-weight: bold;
    color: #2196f3;
    margin-right: 8px;
}

/* 점수 값 */
.score-value {
    font-weight: bold;
    color: #2196f3;
    margin-left: 4px;
}

/* 점수 상세 내역 */
.score-breakdown {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.3;
    font-weight: normal;
}

.score-breakdown small {
    color: #6c757d;
    opacity: 0.8;
}

/* ====== Grid(표) 내 표시 최적화 ====== */
#grid .fame-score-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start; /* 좌측 정렬 */
}

#grid .fame,
#grid .score-info {
    font-size: 12px !important;
    line-height: 1.2 !important;
    height: auto !important;
    margin: 0 !important;
    font-weight: 400 !important; /* 명성과 동일 굵기로 통일 */
    text-align: left; /* 텍스트 좌측 정렬 */
}

/* 색상 복원: 명성은 기본색, 점수는 파란색 */
#grid .fame { color: #333 !important; }
#grid .score-info { color: #2196f3 !important; }

#grid .fame::before,
#grid .score-info::before {
    width: 14px;
    height: 17px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Grid(표) 내 명성 아이콘: 이모지 덮어쓰기 + 전용 이미지 적용 */
#grid .fame::before {
    content: '' !important;
    display: inline-block;
    background-image: url('/img/ico_fame.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    vertical-align: middle;
}

/* 카드/그리드 점수 아이콘: 이미지 확대 + 파란 톤 필터 적용 */
/* 카드/그리드 점수 아이콘: 마스크 기반 단색(파란) 아이콘 */
.card .score-info::before,
#grid .score-info::before {
    content: '' !important;
    display: inline-block;
    background-image: url('/img/ico_score.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 180% auto !important;
}

/* 버퍼 캐릭터 점수 아이콘: 버프력 아이콘 사용 */
.card .score-buff-info::before,
#grid .score-buff-info::before {
    content: '' !important;
    display: inline-block;
    background-image: url('/img/ico_buff_score.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 180% auto !important;
}


.tabulator-frozen-right {
    border-left: 0px solid #aaa !important;
}

/* ====== 카드 내부 5x2 종결 상태 표 스타일 ====== */
.card-completion-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 1fr;
    gap: 4px;
    margin: 0;
    padding: 1px;
    /* background: rgb(212 216 241 / 24%); */
    border-radius: 6px;
    border: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.card-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 2px;
    background: transparent;
    border-radius: 4px;
    border: none;
    transition: all 0.2s ease;
    min-height: 35px;
}

.card-status-item:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.card-status-label {
    font-size: 10px;
    font-weight: 600;
    color: #817e7e;
    margin-bottom: 4px;
    text-align: center;
    line-height: 1.1;
}

.card-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0px;
    font-weight: bold;
    transition: all 0.2s ease;
    position: relative;
}

/* 카드 내부 종결 상태별 색상 (그리드와 동일) */
.card-status-indicator.end {
    background: #6e84ff !important;
    border-color: #6e84ff !important;
    color: white !important;
}

.card-status-indicator.operational {
    background: #62ad83 !important;
    border-color: #62ad83 !important;
    color: white !important;
}

.card-status-indicator.new {
    background: #a3a7a5 !important;
    border-color: #a3a7a5 !important;
    color: white !important;
}

.card-status-indicator.none {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

/* 상태표 아래 첫 줄(레벨) 상단 간격 축소 */
.card-completion-grid + .level {
    margin-top: 2px !important;
}

/* 카드 내부 표 반응형 디자인 */
@media (max-width: 768px) {
    /* 모바일: PC처럼 1행 5열로 표기 */
    .card-completion-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        grid-auto-rows: 1fr;
        gap: 2px;
        margin: 0 0 2px 0;
        padding: 0;
        background: transparent;
        border: none;
    }
    
    .card-status-item {
        min-width: auto;
        padding: 2px 0;
        min-height: 28px;
        background: transparent;
        border: none;
    }
    
    .card-status-label {
        font-size: 8px;
        margin-bottom: 2px;
    }
    
    .card-status-indicator {
        width: 6px;
        height: 6px;
        font-size: 0px;
    }
}

@media (max-width: 480px) {
    .card-completion-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        grid-auto-rows: 1fr;
        gap: 1px;
        margin: 0 0 1px 0;
        padding: 0;
        background: transparent;
        border: none;
    }
    .card-status-item {
        min-width: auto;
        padding: 0;
        min-height: 24px;
        background: transparent;
        border: none;
    }
    .card-status-label { font-size: 7px; }
    .card-status-indicator { width: 5px; height: 5px; font-size: 0px; }
}

/* 매니저 화면 레이아웃 스타일 */
.manage-left-ad {
    width: 30%;
}

.manage-top-ad {
    width: 100%;
    height: 50px;
}

.manage-right-ad {
    display: flex;
    width: 30%;
    min-width: 160px;
}

.manage-main-content {
    width: 100%;
}

/* 본문 공간 미리 확보 - 본문 로드 시 하단 광고가 밀리지 않도록 (로드 시에만 적용) */
.manage-main-content .adventure-container.content-area-reserved {
    min-height: 780px; /* 그리드(~707px) + 헤더·페이징 등 */
}

.character-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.character-card-header .title-span {
    flex: 1;
}

.symbol-line-spacing {
    margin-right: 0px;
}

/* 공통 페이징 (서포트 공지·상세검색 등 전체 공통) */
.gi-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 0 6px;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
}

.gi-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0.88em;
    color: #4a5568;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.gi-pagination-btn:hover:not(:disabled) {
    background: #edf2f7;
    color: #2d3748;
}

.gi-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gi-pagination-pages {
    display: flex;
    align-items: center;
    gap: 3px;
}

.gi-pagination-num {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 0.88em;
    color: #4a5568;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.gi-pagination-num:hover:not(.active) {
    background: #f7fafc;
    color: #2d3748;
    border-color: #cbd5e0;
}

.gi-pagination-num.active {
    background: #374151;
    color: #fff;
    border-color: #374151;
    cursor: default;
}

/* 상세검색 페이징 컨테이너 (공통 스타일 + 표시 제어) */
.job-search-pagination {
    display: none;
    margin: 16px 0;
}

.job-search-pagination.show {
    display: flex;
}

/* 그리드 캐릭터 배경 이미지 스타일 */
/* Hover 시 스케일 변환 제거 (텍스트 블러 방지) */
.tabulator .tabulator-cell {
    transition: background-color 0.15s ease;
}

.tabulator .tabulator-cell:hover {
    background-color: #f7f9ff; /* 은은한 하이라이트만 */
}

/* 그리드 로우 높이 증가 */
.tabulator .tabulator-row {
    min-height: 65px !important;
}

/* 4캐릭터 단위 굵은 구분선 - 기본 선 제거 후 교체 (추가가 아닌 변경) */
.tabulator .tabulator-row.tabulator-row-group-separator {
    border-bottom: none !important;
}
.tabulator .tabulator-row.tabulator-row-group-separator .tabulator-cell {
    border-bottom: 1.5px solid #c3c5c9 !important;
}

.tabulator .tabulator-cell {
    height: 65px !important;
    vertical-align: middle;
}

/* 매니저 그리드 스크롤바 스타일 */
.tabulator .tabulator-tableholder {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    min-height: 20px;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 공지사항 게시판 스타일 */
.notice-section {
    opacity: 0;
    transform: translateY(30px);
    animation: quickFadeIn 0.6s ease forwards;
    margin: 3px 0;
    transition: opacity 2s ease, transform 2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.notice-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.notice-header-box {
    padding: 8px 20px;
    text-align: center;
}

.notice-header-title {
    font-size: 14pt;
    font-weight: 550;
    color: #54585F;
    margin: 0;
}

.notice-header-divider {
    margin: 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.notice-post-list {
    padding: 20px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notice-post {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.notice-post:last-child {
    border-bottom: none;
}

/* 공지 항목 전체 호버 배경: 펼쳐진 항목에만 적용 */
.notice-post.expanded:hover {
    background-color: #f8f9fa;
}

.notice-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 6px 10px 6px 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.notice-post-header.clickable {
    cursor: pointer;
    user-select: none;
    background-color: transparent;
}

/* 헤더 호버 배경: 접힌 상태에서는 투명, 펼친 상태에서만 회색 */
.notice-post-header.clickable:hover {
    background-color: transparent;
}

.notice-post-header.clickable.expanded {
    background-color: #f8f9fa;
}

.notice-post-header.clickable.expanded:hover {
    background-color: #f0f0f0;
}

.notice-post-title {
    font-size: 13px;
    font-weight: 400;
    color: #666; /* 글자색 연하게 */
    margin: 0;
    position: relative;
    padding-right: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.notice-post-title::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7em;
    color: #666;
    transition: transform 0.3s ease, color 0.2s ease;
}

.notice-post-header.clickable.expanded .notice-post-title::after {
    transform: translateY(-50%) rotate(180deg);
}

.notice-post-header.clickable:hover .notice-post-title::after {
    color: #666;
}

.notice-post-date {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    font-weight: 400;
    margin-left: auto;
    padding-right: 0;
}

.notice-post-title-text {
    display: inline;
}
.notice-new-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 500;
    color: #6e84ff;
    background: rgba(110, 132, 255, 0.12);
    border-radius: 10px;
    vertical-align: baseline;
    position: relative;
    top: -1px;
}

.notice-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: middle;
    background-image: url('/img/ico_fame.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.notice-post-content {
    color: #777; /* 글자색 더 연하게 */
    line-height: 1.5;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    font-size: 13px;
    padding: 0 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.notice-post-content p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    color: #777; /* 글자색 더 연하게 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.notice-post-content ul,
.notice-post-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.notice-post-content li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.notice-empty {
    padding: 50px 0;
    text-align: center;
    color: #ccc;
    font-size: 14px;
}

.notice-post-list-items {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.notice-post-list-items li {
    padding: 5px 0 5px 20px;
    position: relative;
    line-height: 1.6;
    color: #666;
    font-size: 13px;
}

.notice-post-list-items li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #666;
    font-weight: bold;
    font-size: 0.9em;
}

/* 검색 기록 섹션 스타일 */
.search-history-section {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 8px;
}

.search-history-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.search-history-header {
    padding: 0;
    text-align: left;
}

.search-history-header .title-span {
    font-size: 11px;
    font-weight: 400;
    color: #999;
    margin: 0;
    text-transform: lowercase;
    position: relative;
}

/* 검색 기록 제목에서 화살표 제거 */
.search-history-header .title-span::after {
    content: none !important;
}

.search-history-header hr {
    margin: 2px 0 0 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.search-history-list {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-history-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s ease;
}

.search-history-item:hover {
    background: #e9ecef;
}

.search-history-item span {
    flex: 1;
    font-size: 12px;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-history-delete {
    background: transparent !important;
    border: none !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 2px 6px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    transition: color 0.15s ease !important;
    flex-shrink: 0 !important;
    margin-left: 8px !important;
}

.search-history-delete:hover {
    color: #dc3545 !important;
}