@charset "UTF-8";

/* =========================================
   [style1.css 내용]
   ========================================= */

/* ▼▼▼ [추가됨] seo.html의 폰트 적용 ▼▼▼ */
@font-face {
    font-family: 'S-CoreDream-3Light';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ▼▼▼ [수정됨] seo.html의 기본 body 및 레이아웃 스타일 적용 ▼▼▼ */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    font-family: 'S-CoreDream-3Light', sans-serif; /* seo.html 폰트로 변경 */
    /* background-color: #f4f7f6; */
    background-color: #f8f8f8; /* seo.html 배경색으로 변경 */
    color: #333;
    margin: 0;
    line-height: 1.6;
}

/* ▼▼▼ [추가됨] seo.html의 핵심 레이아웃 규칙 ▼▼▼ */
/* footer와 global-hr를 제외한 모든 body 직계 자식에게 좌측 이동 적용 */
body > *:not(.global-hr):not(footer):not(.popup-container) {
    position: relative;
    left: -140px;
}

/* ▼▼▼ [추가됨] seo.html의 컨테이너 스타일 ▼▼▼ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 200px; /* 좌우 여백을 padding으로 제어 */
}

main {
    padding: 20px 0; /* 상하 패딩만 약간 줌 (좌우는 container가 담당) */
}

.hidden { display: none !important; }

/* ▼▼▼ [추가됨] seo.html의 GNB(네비게이션) 관련 스타일 ▼▼▼ */
.gnb {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 10px 0;
    min-height: 102px;
    padding: 10px;
}
.gnb a { margin-right: 10px; }
.logo img { width: 20%; }

.nav-links {
    display: flex;
    align-items: center;
    width: 100%;
}

/* GNB 메뉴 링크 스타일 */
.gnb1, .gnb2, .gnb3, .gnb4, .gnb5, .gnb6 {
    position: relative;
    right: 33px;
    font-size: 110%;
    margin-left: 40px;
    margin-right: 10px;
    text-decoration: none;
    color: inherit;
}
.gnb1:hover,
.gnb2:hover,
.gnb3:hover,   .gnb4:hover,   .gnb5:hover,   .gnb6:hover { color: rgb(26,138,244); }

/* GNB 사용자 정보 스타일 */
.user-header .nickname,
.user-header .logout-btn {
    font-size: 1.2em;
}
.logout-btn {
    margin-right: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none;
}
a.logout-btn:hover,
a.logout-btn:focus {
    background-color: rgb(26, 138, 244) !important;
    color: #fff !important;
    text-decoration: none !important;
}
.logout-btn,
.logout-btn:visited,
.logout-btn:hover,
.logout-btn:active {
    color: #000 !important;
    text-decoration: none;
}

/* ▼▼▼ [추가됨] seo.html의 가로줄 스타일 ▼▼▼ */
.global-hr {
    border: none;
    width: 100vw;
    height: 1px;
    background-color: #eaeaea;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin: 0;
    /* 뷰포트 기준으로 중앙 정렬 */
    margin-left: calc(-50vw + 50%);
}

/* 입력 섹션 */
.input-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* '참고 경쟁사' (세 번째 form-group) 숨기기 */
.input-section .form-group:nth-child(3) {
    display: none;
}

button[type="submit"] {
    background-color: #0052cc;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}
button[type="submit"]:hover {
    background-color: #0041a3;
}

/* 재시작 버튼 스타일 */
.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0; 
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* 모든 버튼의 비활성화 스타일 */
button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

#loading-status {
    margin-top: 20px;
    text-align: center;
}
#status-text {
    font-size: 1.1em;
    font-weight: 600;
    margin: 10px 0 5px 0;
}
#loading-status small {
    color: #555;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0052cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 결과 섹션 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0052cc;
    border-bottom: 2px solid #0052cc;
    padding-bottom: 10px;
    margin-bottom: 20px; 
}
#results-section h2 {
    margin: 0; 
}

/* 툴팁 컨테이너 스타일 */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* 툴팁 텍스트 스타일 */
.tooltip-container .tooltip-text {
    visibility: hidden;
    width: 260px; 
    background-color: #333;
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    padding: 5px 8px;
    
    position: absolute;
    z-index: 1;
    bottom: 125%; 
    left: 50%;
    transform: translateX(-50%); 
    
    opacity: 0;
    transition: opacity 0.3s;
}

/* 툴팁 화살표 */
.tooltip-container .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; 
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* 호버 시 툴팁 보이기 */
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.dashboard-row {
    display: flex;
    flex-wrap: wrap; 
    gap: 20px;
    margin-bottom: 20px;
}
.dashboard-row.centered {
    justify-content: center; 
}
.card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: 250px; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-basis: 300px; 
    max-width: 450px; 
}
#ranking-card {
    flex-basis: 500px;
    flex-grow: 2; 
    max-width: 700px;
}
#backlinks-card {
    flex-basis: 300px;
    flex-grow: 1;
    max-width: 450px;
}
.card.full-width {
    margin-bottom: 20px;
    max-width: none; 
}

/* 카드 헤더 (필터용) */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px; 
}
.card-header h3 {
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.2;
}
.card-header select {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 14px;
}
.filter-group {
    display: flex;
    gap: 10px; 
}
.card h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px; 
}

/* 로더 컨테이너 (subtext 배치를 위해) */
.loader-container {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}
.loader-subtext {
    font-size: 0.9em;
    color: #555;
    margin-top: 15px;
    text-align: center;
    min-height: 1.2em; 
}

/* 테이블 카드 */
.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    flex-grow: 1;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}
th {
    background-color: #f9f9f9;
    font-weight: 600;
    position: sticky;
    top: 0;
}
tbody tr:hover {
    background-color: #f1f1f1;
}
#brand-qa-table th:nth-child(1) { width: 15%; }
#brand-qa-table th:nth-child(2) { width: 15%; }
#brand-qa-table th:nth-child(3) { width: 25%; }
#brand-qa-table th:nth-child(4) { width: 35%; }
#brand-qa-table th:nth-child(5) { width: 10%; }

#industry-qa-table th:nth-child(1) { width: 10%; } 
#industry-qa-table th:nth-child(2) { width: 15%; } 
#industry-qa-table th:nth-child(3) { width: 30%; } 
#industry-qa-table th:nth-child(4) { width: 35%; } 
#industry-qa-table th:nth-child(5) { width: 10%; } 

/* 1행 1열: Score Bar Card */
.score-bar-container {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1; 
}
.score-value-large {
    font-size: 3.5em;
    font-weight: 700;
    color: #333;
    text-align: center;
    line-height: 1;
}
.score-bar {
    width: 100%;
    height: 20px;
    background-color: #eee;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
}
.score-bar-fill {
    width: 0%; 
    height: 100%;
    background-color: #d9534f; 
    border-radius: 10px;
    transition: width 0.5s ease-out, background-color 0.5s ease-out;
}
.score-label {
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    color: #555;
    margin-top: 5px;
}

/* 점수 설명 텍스트 스타일 */
.score-description {
    text-align: left;
    font-size: 0.9em;
    color: #666;
    margin-top: 15px; 
    line-height: 1.5;
    padding: 0 5px; 
    border-top: 1px solid #f0f0f0; 
    padding-top: 10px;
}

/* 1행 2열: Dot Plot Card (시계열) */
.dot-plot-container {
    display: flex;
    height: 160px; 
    /* font-family: Arial, sans-serif; */ /* S-CoreDream으로 통일 */
    font-size: 12px;
    color: #888;
    margin-top: 10px;
}
.dot-plot-yaxis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    padding-right: 10px;
    border-right: 2px solid #eee;
}
.dot-plot-area {
    flex-grow: 1;
    display: flex; 
    justify-content: space-around;
    border-bottom: 2px solid #eee;
    margin-left: 10px;
    background-image: linear-gradient(to bottom, #f9f9f9 1px, transparent 1px);
    background-size: 100% 25%;
}
.plot-column {
    flex: 1; 
    position: relative;
    display: flex;
    justify-content: center;
    border-right: 1px dotted #f0f0f0; 
}
.plot-column:last-child {
    border-right: none;
}
.dot-plot-xaxis {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
.plot-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%); 
    z-index: 10;
    cursor: pointer;
    left: 50%;
}
.dot-plot-area .integrated { background-color: #ff6384; } 
.dot-plot-area .chatgpt { background-color: #36a2eb; } 
.dot-plot-area .gemini { background-color: #4bc0c0; } 

.dot-plot-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px; 
    font-size: 12px;
}
.dot-legend {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.dot-plot-legend .integrated { background-color: #ff6384; }
.dot-plot-legend .chatgpt { background-color: #36a2eb; }
.dot-plot-legend .gemini { background-color: #4bc0c0; }

/* Dot Plot 툴팁 스타일 */
.plot-dot .plot-tooltip {
    visibility: hidden;
    width: auto;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 5px 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 20;
    bottom: 150%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap; 
    font-size: 12px;
    font-weight: 600;
}
.plot-dot .plot-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}
.plot-dot:hover .plot-tooltip {
    visibility: visible;
    opacity: 1;
}

/* 1행 3열: Top Score Card */
#top-score-content {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
}
.top-score-box {
    background-color: #e6f0ff;
    border: 1px solid #b3d1ff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    width: 100%;
}
.top-score-value {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #0041a3;
    line-height: 1.1;
}
.top-score-label {
    display: block;
    font-size: 1em;
    color: #0052cc;
    margin-top: 5px;
}

/* 3행 1열 & 2열 (순위 카드) 스타일 */
#rank-integrated-content, #rank-llm-content {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
}
.rank-box {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    width: 100%;
}
.rank-value {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #0052cc;
    line-height: 1.1;
}
.rank-label {
    display: block;
    font-size: 1em;
    color: #555;
    margin-top: 5px;
}
.rank-box-split {
    display: flex;
    gap: 15px;
    width: 100%;
}
.rank-box.sub {
    width: 50%;
    padding: 15px;
}
.rank-box.sub .rank-value {
    font-size: 2.5em;
}

/* 3행 3열 (막대 그래프) 스타일 */
#mention-comparison-content {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
}
.bar-chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px; 
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}
.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}
.bar-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.bar-wrapper {
    width: 50px;
    height: 120px; 
    background-color: #f0f0f0;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse; 
}
.bar-fill {
    width: 100%;
    height: 0%; 
    background-color: #0052cc; 
    transition: height 0.5s ease-out;
}
.bar-fill.top {
    background-color: #f0ad4e; 
}
.bar-label {
    margin-top: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: #555;
}

/* ▼▼▼ [추가됨] seo.html의 푸터 스타일 ▼▼▼ */
.footer {
    height: 220px;
    background-color: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    /* .container의 padding 값(200px)과 body의 left값(-140px)을 고려해야 함 */
    /* seo.html의 규칙을 그대로 따름 */
    margin-left: -200px;
    margin-right: -200px;
    margin-top: 100px; /* 기존 550px에서 적절히 수정 */
    position: relative;
}
.footer-content {
    position: absolute;
    top: 20%;
    /* 1000px(container) / 2 + 200px(padding-left) - 140px(body-left) - (content-width/2) */
    /* seo.html의 455px 값을 우선 사용 */
    left: 455px; 
    text-align: left;
}
.footer-content .service   { font-size: 20px;  margin-bottom: 8px; }
.footer-content .maidata   { font-size: 13px;  margin-bottom: 8px; }
.footer-content .seo       { font-size: 13px;  margin-bottom: 8px; }
.footer-content .mylab     { font-size: 10px; }
.privacy a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 13px; 
}


/* =========================================
   [추가됨] style.css 병합 부분 
   (아래 규칙들은 동일한 태그가 있을 경우 윗부분을 덮어씁니다)
   ========================================= */

:root {
    --primary-blue: #2563eb;
    --primary-light: #eff6ff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --bg-base: #f8fafc;
    --sidebar-width: 260px;   
    --chat-width: 350px;      
}

/* 🚨 주의: style1.css의 body 스타일과 충돌하는 부분입니다. (overflow: hidden 등) */
body, html { 
    height: 100%; 
    overflow: hidden; 
    font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-base);
    margin: 0;
    padding: 0;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =========================================
   2. JSpreadsheet 오버라이드
   ========================================= */
.jexcel_content { 
    width: 100% !important; 
    box-shadow: none !important; 
    padding: 0 !important;
}

/* 헤더 스타일 */
.jexcel > thead > tr > td { 
    background-color: #f1f5f9 !important; 
    color: #475569 !important; 
    font-weight: 600 !important; 
    border-color: #cbd5e1 !important;
    font-size: 13px;
}

/* 헤더 내부 레이아웃 */
.jexcel_header_inner { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    width: 100%; 
    padding-right: 4px !important; 
}

/* 헤더 수정 인풋 */
.header-edit-input { 
    width: 100%; 
    border: 2px solid var(--primary-blue); 
    border-radius: 4px; 
    padding: 2px 4px; 
    font-weight: bold; 
    font-size: 13px;
}

/* 필터 아이콘 */
.filter-icon { 
    pointer-events: auto; 
    cursor: pointer; 
    font-size: 10px; 
    color: #94a3b8; 
    padding: 2px 4px; 
    border-radius: 4px; 
    transition: all 0.2s; 
}
.filter-icon:hover { 
    background-color: #e2e8f0; 
    color: var(--primary-blue); 
}

/* =========================================
   3. 레이아웃 (사이드바 & 채팅 패널)
   ========================================= */
#sidebar, #chat-panel {
    position: relative;
    z-index: 50;
    overflow: hidden;
    background: white;
    flex-shrink: 0;
    height: 100%;
}

#sidebar {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    border-right: 1px solid #e2e8f0;
    box-shadow: 4px 0 10px rgba(0,0,0,0.02);
    overflow-y: auto;
}

#chat-panel {
    width: var(--chat-width) !important;
    min-width: var(--chat-width) !important;
    border-left: 1px solid #e2e8f0;
    box-shadow: -4px 0 10px rgba(0,0,0,0.02);
}

#table-list, #chat-container { width: 100%; }

/* =========================================
   4. 컴포넌트 스타일
   ========================================= */
/* 테이블 목록 아이템 */
.table-item { 
    transition: all 0.2s; 
    border-radius: 6px; 
    margin-bottom: 4px; 
    cursor: pointer; 
    padding: 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border: 1px solid transparent;
}
.table-item:hover { 
    background-color: white; 
    border-color: #e2e8f0; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
.table-item.active { 
    background-color: var(--primary-light); 
    color: var(--primary-blue); 
    font-weight: 600; 
    border-color: #bfdbfe;
}

/* 채팅창 컬럼 태그 */
.column-tag { 
    display: inline-flex; 
    align-items: center; 
    background-color: #e0f2fe; 
    border: 1px solid #bae6fd; 
    color: #0284c7; 
    padding: 0px 6px; 
    border-radius: 4px; 
    font-weight: 600; 
    margin: 0 2px; 
    font-size: 0.85rem; 
}
[contenteditable]:empty:before { 
    content: attr(data-placeholder); 
    color: #94a3b8; 
    display: block; 
}

/* 툴팁 (병합 안내) */
.merge-tooltip {
    position: fixed; 
    transform: translateX(-50%);
    width: 200px;
    background-color: var(--primary-blue);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    text-align: center;
    line-height: 1.4;
    animation: bounce 1s infinite;
    pointer-events: auto;
}
.merge-tooltip::after {
    content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -6px;
    border-width: 6px; border-style: solid; border-color: transparent transparent var(--primary-blue) transparent;
}
.tooltip-close { position: absolute; top: 2px; right: 6px; cursor: pointer; font-weight: bold; color: #93c5fd; }
.tooltip-close:hover { color: white; }

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* =========================================
   5. 모달 (Common)
   ========================================= */
.modal-overlay { 
    position: fixed; inset: 0; 
    background: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(2px); 
    z-index: 100; 
    display: none; 
    justify-content: center; 
    align-items: center; 
}
.modal-container { 
    background: white; 
    width: 600px; 
    max-height: 90vh; 
    border-radius: 12px; 
    box-shadow: 0 20px 25px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    border: 1px solid #e2e8f0; 
}
.modal-header { 
    padding: 16px 20px; 
    border-bottom: 1px solid #e2e8f0; 
    font-weight: 700; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: white; 
    color: var(--text-main); 
}
.modal-body { 
    padding: 24px; 
    overflow-y: auto; 
    background: white; 
}
.modal-footer { 
    padding: 16px 20px; 
    border-top: 1px solid #e2e8f0; 
    background: #f8fafc; 
    display: flex; 
    justify-content: flex-end; 
    gap: 8px; 
}
.modal-btn { 
    padding: 8px 16px; 
    border-radius: 6px; 
    border: 1px solid #cbd5e1; 
    cursor: pointer; 
    background: white; 
    font-weight: 500; 
    transition: all 0.2s;
}
.modal-btn:hover { background-color: #f1f5f9; }
.modal-btn.primary { 
    background: var(--primary-blue); 
    color: white; 
    border-color: var(--primary-blue); 
}
.modal-btn.primary:hover { background-color: #1d4ed8; }

.op-select-box { border: 1px solid #e2e8f0; padding: 16px; border-radius: 8px; margin-bottom: 16px; background: #f8fafc; }
.op-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: var(--text-sub); }
.op-select { width: 100%; border: 1px solid #cbd5e1; padding: 8px; border-radius: 6px; margin-bottom: 10px; font-size: 0.9rem; background: white; }

/* =========================================
   6. 엑셀 필터 메뉴
   ========================================= */
.excel-filter-menu { 
    display: flex; flex-direction: column; 
    position: fixed; z-index: 2000; 
    background: white; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
    min-width: 200px; 
    border-radius: 8px; 
    font-size: 13px; 
    color: var(--text-main); 
    overflow: hidden; 
}
.filter-info-section { padding: 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.type-btn { background: var(--primary-blue); color: white; border: none; border-radius: 4px; padding: 4px 8px; cursor: pointer; }
.filter-menu-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; }
.filter-menu-item:hover { background-color: #f1f5f9; }
.filter-list-section { max-height: 200px; overflow-y: auto; padding: 5px 0; background: white; display: flex; flex-direction: column; }
.filter-checkbox-item { padding: 6px 12px; cursor: pointer; display: flex; align-items: center; width: 100%; box-sizing: border-box; }
.filter-checkbox-item:hover { background-color: #f1f5f9; }
.filter-checkbox-item span { overflow: hidden; text-overflow: ellipsis; display: block; width: 100%; white-space: nowrap; }
.filter-checkbox-item input { margin-right: 8px; flex-shrink: 0; }
.filter-action-section { background: #f8fafc; border-top: 1px solid #e2e8f0; padding: 8px; display: flex; justify-content: flex-end; }
.filter-btn { padding: 4px 12px; margin-left: 6px; border: 1px solid #d1d5db; background: white; border-radius: 4px; cursor: pointer; }
.filter-btn.primary { background: var(--primary-blue); color: white; border-color: var(--primary-blue); }
.filter-clear-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; color: #ef4444; border-bottom: 1px solid #f1f5f9; }
.filter-clear-item:hover { background-color: #fef2f2; }

/* =========================================
   7. 피벗 테이블 패널 (디자인 개선됨)
   ========================================= */

/* 7-1. 패널 전체 틀 */
#pivot-panel {
    position: fixed;
    right: -400px; /* 평소엔 숨김 */
    top: 64px;     /* 헤더 높이만큼 띄움 */
    bottom: 0;
    width: 320px;
    background: #f8fafc; /* 밝은 회색 배경 */
    border-left: 1px solid #cbd5e1;
    box-shadow: -4px 0 15px rgba(0,0,0,0.05);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    display: flex;
    flex-direction: column;
}

#pivot-panel.open {
    right: 0; /* 열림 */
}

/* 7-2. 패널 헤더 */
.pivot-section-header {
    padding: 16px 20px;
    background: #ffffff;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}
.pivot-section-header button {
    font-size: 1.2rem;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.pivot-section-header button:hover {
    color: #ef4444; /* 닫기 버튼 호버 시 빨간색 */
}

/* 7-3. 드래그 가능한 필드 목록 (상단) */
.pivot-field-list {
    padding: 12px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    max-height: 200px; /* 너무 길어지면 스크롤 */
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 드래그 할 아이템 (알약 모양) */
.pivot-field-item {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 20px; /* 둥근 모양 */
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #334155;
    cursor: grab;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    user-select: none;
}
.pivot-field-item:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.pivot-field-item:active {
    cursor: grabbing;
}

/* 7-4. 드롭 영역 컨테이너 (하단) */
.pivot-areas {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f1f5f9;
}

/* 개별 드롭 존 */
.pivot-drop-zone {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-height: 110px;
    transition: background 0.2s, border-color 0.2s;
}

/* 드롭 존 제목 */
.pivot-drop-zone h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 7-5. 드롭된 아이템 (배치된 상태) */
.pivot-dropped-item {
    padding: 6px 10px;
    margin-bottom: 6px;
    background: #e0f2fe; /* 연한 파란색 배경 */
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0369a1; /* 진한 파란 글씨 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    cursor: default;
}

.pivot-dropped-item .item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* 옵션 버튼 (▼) */
.pivot-dropped-item .opt-btn {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #0ea5e9;
    font-weight: bold;
}
.pivot-dropped-item .opt-btn:hover {
    background: rgba(255,255,255,0.5);
    color: #0284c7;
}

/* 7-6. 피벗 컨텍스트 메뉴 */
#pivot-context-menu { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    background: white; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
    min-width: 200px; 
    border-radius: 8px; 
    overflow: hidden;
}
.ctx-menu-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #334155; }
.ctx-menu-item:hover { background-color: #f1f5f9; }
.ctx-icon { width: 16px; text-align: center; color: #94a3b8; }
.ctx-divider { height: 1px; background: #e2e8f0; margin: 4px 0; }

/* =========================================
   8. 드래그 앤 드롭 오버레이 (수정됨)
   ========================================= */
#drop-overlay {
    position: fixed; inset: 0;
    background: rgba(37, 99, 235, 0.1);
    backdrop-filter: blur(4px);
    z-index: 9999;
    
    /* [수정] 중앙 정렬 및 표시를 위해 flex로 변경 */
    display: flex; 
    
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

/* JS에서 hidden 클래스를 추가하면 숨김 처리 */
#drop-overlay.hidden { display: none !important; }

.animate-bounce-slight { animation: bounceSlight 2s infinite; }
@keyframes bounceSlight {
    0%, 100% { transform: translateY(-3%); }
    50% { transform: translateY(3%); }
}

/* =========================================
   9. 기타 유틸리티
   ========================================= */
/* .hidden { display: none !important; } (상단에서 이미 정의되어 생략 가능하나 원본 유지) */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
   10. 사이드바 리사이저 (Resizer)
   ========================================= */
#resizer {
    width: 5px;
    cursor: col-resize;
    background-color: #e2e8f0; /* slate-200 */
    transition: background-color 0.2s;
    z-index: 20;
    flex-shrink: 0;
}

#resizer:hover, 
#resizer.bg-blue-600 { /* main.js에서 드래그 시 추가하는 클래스명 매칭 */
    background-color: var(--primary-blue);
}