/* 사방넷 → 이카운트 변환 웹앱 스타일 */

body {
    background-color: #f4f6f9;
    font-family: '맑은 고딕', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
}

/* 네비게이션 */
.navbar-brand { font-size: 1.1rem; }
.nav-link { font-size: 0.9rem; }

/* 통계 카드 */
.stat-card { border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-box { padding: 0.5rem 0; }
.stat-number { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.78rem; color: #6c757d; margin-top: 2px; }

/* 업로드 영역 */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.2s;
    background: #fafbfc;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: #0d6efd;
    background: #e8f0fe;
}

/* 파일 목록 */
.file-list .badge { font-size: 0.8rem; padding: 0.4em 0.6em; }

/* 결과 테이블 */
.result-table { font-size: 0.82rem; }
.result-table th { white-space: nowrap; font-size: 0.8rem; }
.result-table td { vertical-align: middle; }

.row-ok { background-color: #e2efda !important; }
.row-warn { background-color: #fff2cc !important; }
.row-disc { background-color: #d1ecf1 !important; }
.row-err { background-color: #fce4d6 !important; }

/* 카드 */
.card { border: none; border-radius: 8px; }
.card-header { border-bottom: 1px solid #eee; }

/* 로그인 */
.card.shadow .card-body { max-width: 400px; }

/* 반응형 */
@media (max-width: 768px) {
    .stat-number { font-size: 1.3rem; }
    .result-table { font-size: 0.75rem; }
}

/* 테이블 스크롤 (일반) */
.table-responsive { max-height: 70vh; overflow-y: auto; }
.table-responsive thead { position: sticky; top: 0; z-index: 10; }

/* 정렬 헤더 */
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { background-color: rgba(255,255,255,0.15); }
.sort-icon { font-size: 0.7rem; opacity: 0.5; margin-left: 2px; }
.sortable[data-dir="asc"] .sort-icon,
.sortable[data-dir="desc"] .sort-icon { opacity: 1; }

/* 매핑 테이블 래퍼 - 스크롤 시 헤더 고정 */
.mapping-table-wrap {
    max-height: 65vh;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}
.mapping-table-wrap thead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #212529;
}
.mapping-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 21;
    background: #212529;
    color: #fff;
    border-bottom: 2px solid #495057;
    font-size: 0.8rem;
    white-space: nowrap;
    padding: 0.5rem 0.4rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 매핑 관리 */
.mapping-table { font-size: 0.8rem; margin-bottom: 0; table-layout: fixed; }
.mapping-table td { vertical-align: middle; padding: 0.25rem 0.4rem; overflow: hidden; text-overflow: ellipsis; }
.mapping-table input.form-control-sm { font-size: 0.78rem; padding: 0.15rem 0.4rem; }
.col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    z-index: 25;
}
.col-resize-handle:hover,
.col-resize-handle.active {
    background: rgba(255,255,255,0.4);
}

/* 매핑 테이블 호버 효과 제거 */
.mapping-table-wrap .table tr:hover { background-color: inherit !important; }
.mapping-table-wrap .table tr.row-ok:hover { background-color: #e2efda !important; }
.mapping-table-wrap .table tr.row-warn:hover { background-color: #fff2cc !important; }
.mapping-table-wrap .table tr.row-disc:hover { background-color: #d1ecf1 !important; }
.mapping-table-wrap .table tr.row-err:hover { background-color: #fce4d6 !important; }

/* 자동완성 */
.autocomplete-list {
    position: absolute; z-index: 100;
    background: #fff; border: 1px solid #dee2e6;
    border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 200px; overflow-y: auto;
    width: 350px;
}
.autocomplete-list:empty {
    display: none;
}
.ac-item {
    padding: 0.35rem 0.6rem; cursor: pointer;
    font-size: 0.78rem; border-bottom: 1px solid #f0f0f0;
}
.ac-item:hover { background-color: #e8f0fe; }
td.ec-code-cell { position: relative; }

/* 선택필요 드롭다운 */
.season-select {
    font-size: 0.78rem;
    padding: 0.15rem 0.3rem;
    min-width: 180px;
    border-color: #ffc107;
    background-color: #fffbe6;
}
.season-select:focus { border-color: #fd7e14; box-shadow: 0 0 0 0.2rem rgba(253,126,20,0.25); }

/* 공장 정보 표시 */
.factory-info-wrap { line-height: 1.3; }
.factory-info-item { display: flex; align-items: center; gap: 4px; }
.factory-info-item code {
    word-break: break-all; color: #495057;
}

/* 상태 필터 뱃지 */
.rounded-pill .badge { font-size: 0.7rem; margin-left: 2px; }
