@charset "UTF-8";

/* 기본 폰트 및 배경 */
body { 
    font-family: 'Malgun Gothic', sans-serif; 
    background-color: #f3f4f6; 
}

/* 페이지 전환 로직 */
.page { display: none; }
.active { display: block; }

/* =========================================
   UI 컴포넌트 (입력창, 결과박스)
   ========================================= */
.excel-input { 
    text-align: center; 
    border: 1px solid #d1d5db; 
    width: 100%; 
    padding: 0; 
    outline: none; 
    transition: 0.2s; 
    font-weight: bold; 
    background-color: #fff; 
    border-radius: 4px; 
    font-size: 0.95rem; 
    height: 34px; 
    line-height: 34px; 
}
.excel-input:focus { 
    border: 2px solid #2563eb; 
    background-color: #eff6ff; 
}

.input-label-mini { 
    font-size: 0.7rem; 
    color: #6b7280; 
    margin-bottom: 2px; 
    display: block; 
    text-align: left; 
    height: 14px; 
    overflow: hidden; 
    white-space: nowrap; 
}

.result-label-mini { 
    font-size: 0.7rem; 
    color: #2563eb; 
    margin-bottom: 2px; 
    display: block; 
    text-align: right; 
    height: 14px; 
    font-weight: bold; 
}

.result-box-coin { 
    background-color: #eff6ff; 
    color: #1e40af; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 4px; 
    font-size: 0.9rem; 
    width: 100%; 
    height: 34px; 
    border: 1px solid #bfdbfe; 
}

.result-box-po { 
    background-color: #fef2f2; 
    color: #991b1b; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 4px; 
    font-size: 0.9rem; 
    width: 100%; 
    height: 34px; 
    border: 1px solid #fecaca; 
}

/* =========================================
   테이블 스타일
   ========================================= */
.mini-table { 
    width: 100%; 
    font-size: 0.8rem; 
    border-collapse: collapse; 
    background-color: white; 
}
.mini-table th { 
    background-color: #f3f4f6; 
    padding: 4px; 
    border-bottom: 2px solid #e5e7eb; 
    color: #4b5563; 
    font-weight: bold; 
    text-align: center; 
}
.mini-table td { 
    padding: 4px; 
    border-bottom: 1px solid #f3f4f6; 
    text-align: center; 
    color: #374151; 
}
.mini-table tr:last-child td { 
    border-bottom: none; 
}

.stats-table th, .sales-matrix th { 
    background-color: #1e3a8a; 
    color: white; 
    padding: 12px; 
    cursor: pointer; 
    user-select: none; 
    position: sticky; 
    top: 0; 
    white-space: nowrap; 
}
.stats-table th:hover, .sales-matrix th:hover { 
    background-color: #1e40af; 
}
.stats-table td, .sales-matrix td { 
    border-bottom: 1px solid #e5e7eb; 
    padding: 12px; 
    text-align: center; 
    white-space: nowrap; 
}

.sticky-col { 
    position: sticky; 
    left: 0; 
    background-color: white; 
    z-index: 10; 
    border-right: 2px solid #e5e7eb; 
}

/* =========================================
   수익률 색상 (Profit Colors)
   ========================================= */
.profit-high { color: #1d4ed8; font-weight: 800; }
.profit-mid { color: #854d0e; font-weight: 800; }
.profit-low { color: #dc2626; font-weight: 800; }

/* =========================================
   탭 (Tab) 스타일
   ========================================= */
.tab-btn { 
    padding: 12px 24px; 
    font-weight: bold; 
    color: #6b7280; 
    border-bottom: 3px solid transparent; 
    cursor: pointer; 
    white-space: nowrap; 
}
.tab-btn:hover { 
    color: #1e3a8a; 
    background-color: #f8fafc; 
}
.tab-btn.active-tab { 
    color: #1e3a8a; 
    border-bottom: 3px solid #1e3a8a; 
    background-color: white; 
}

.tab-section { display: none; }
.tab-section.show { display: block; }

/* =========================================
   기타 UI 요소
   ========================================= */
.header-select { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #1f2937; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    outline: none; 
    padding-right: 1rem; 
    max-width: 200px; 
    text-overflow: ellipsis; 
}

.store-selector-wrapper { 
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); 
    color: white; 
    padding: 2rem; 
    border-radius: 0 0 20px 20px; 
    margin-bottom: 2rem; 
}

.summary-box { 
    background-color: #f8f9fa; 
    border-bottom: 2px solid #e9ecef; 
}

.filter-box { 
    background-color: #f8fafc; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #e2e8f0; 
    margin-bottom: 15px; 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    align-items: center; 
}

.sort-icon { 
    display: inline-block; 
    margin-left: 5px; 
    font-size: 0.8rem; 
    color: #fbbf24; 
}

.stats-chip { 
    display: inline-block; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    cursor: pointer; 
    margin-right: 5px; 
    margin-bottom: 5px; 
    border: 1px solid #e5e7eb; 
}
.stats-chip.active-chip { 
    background-color: #1e3a8a; 
    color: white; 
    border-color: #1e3a8a; 
}

/* =========================================
   모달 (Modal) & 로딩 스크린
   ========================================= */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 50; 
}
.modal-content { 
    background: white; 
    width: 95%; 
    max-width: 1200px; 
    margin: 40px auto; 
    border-radius: 8px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    max-height: 90vh; 
}
.modal-small { max-width: 500px; }
.open { display: block; }

#loading-screen { 
    position: fixed; 
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    background:rgba(255,255,255,0.8); 
    z-index:100; 
    display:none; 
    justify-content:center; 
    align-items:center; 
    flex-direction: column; 
    font-size:1.2rem; 
    font-weight:bold; 
    color:#2563eb; 
}

.find-tab { 
    width: 50%; 
    padding: 12px; 
    text-align: center; 
    cursor: pointer; 
    font-weight: bold; 
    border-bottom: 2px solid #eee; 
    color: #888; 
}
.find-tab.active { 
    border-bottom: 2px solid #1e3a8a; 
    color: #1e3a8a; 
}

/* =========================================
   아코디언 (Accordion) - 입고내역
   ========================================= */
.accordion-btn { 
    background-color: #fff; 
    cursor: pointer; 
    padding: 18px; 
    width: 100%; 
    text-align: left; 
    border: none; 
    outline: none; 
    transition: 0.4s; 
    border-bottom: 1px solid #eee; 
    font-weight: bold; 
    color: #1e3a8a; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.accordion-btn:hover, .accordion-btn.active-acc { 
    background-color: #f1f5f9; 
}
.accordion-panel { 
    padding: 0 18px; 
    background-color: white; 
    display: none; 
    overflow: hidden; 
    border-bottom: 1px solid #eee; 
}
.accordion-panel.show { 
    display: block; 
    padding: 20px 18px; 
}

/* =========================================
   게시판 (Board) 스타일
   ========================================= */
.board-feed { 
    height: 500px; 
    overflow-y: auto; 
    background-color: #f9fafb; 
    border: 2px solid #e5e7eb; 
    border-radius: 8px; 
    padding: 20px; 
}
.post-card { 
    background: white; 
    border: 1px solid #e5e7eb; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 15px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}
.post-badge-notice { 
    background-color: #ef4444; 
    color: white; 
    font-size: 0.7rem; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: bold; 
}
.post-badge-patch { 
    background-color: #3b82f6; 
    color: white; 
    font-size: 0.7rem; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: bold; 
}

/* 게시판 탭 버튼 (v45.0 추가 기능) */
.board-nav { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
    border-bottom: 2px solid #e5e7eb; 
    padding-bottom: 10px; 
}
.board-nav-btn { 
    font-weight: bold; 
    color: #6b7280; 
    padding: 5px 15px; 
    cursor: pointer; 
    transition: 0.2s; 
}
.board-nav-btn:hover { 
    color: #1e3a8a; 
}
.board-nav-btn.active { 
    color: #1e3a8a; 
    border-bottom: 3px solid #1e3a8a; 
}