/* ── 관세율(HS) 화면 — .tf- 네임스페이스 (CRT 품목별 인증 레이아웃 차용) ── */
.tf-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:6px; flex-wrap:wrap; }
.tf-page-title { font-size:16px; font-weight:700; }
.tf-page-sub { font-size:12px; color:var(--text3); margin-top:2px; }

.tf-toolbar { display:flex; gap:10px; align-items:center; margin:14px 0; flex-wrap:wrap; }
.tf-input { height:34px; padding:0 10px; font-size:13px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text); font-family:inherit; }
.tf-search { flex:1; min-width:220px; max-width:380px; }
.tf-muted { font-size:12px; color:var(--text3); }

.tf-tabs { display:flex; gap:6px; }
.tf-tab { padding:6px 14px; font-size:13px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text2); cursor:pointer; }
.tf-tab.active { background:var(--accent-light); color:var(--accent-text); border-color:var(--accent); font-weight:600; }

.tf-selbar { display:flex; align-items:center; gap:10px; padding:9px 14px; margin-bottom:10px; background:var(--accent-light); border:1px solid var(--accent); border-radius:10px; font-size:13px; color:var(--accent-text); position:sticky; top:0; z-index:2; }
.tf-selbar[hidden] { display:none; }

.tf-rows { display:flex; flex-direction:column; gap:8px; }
.tf-check { width:16px; height:16px; flex-shrink:0; cursor:pointer; accent-color:var(--accent); margin:0 2px; }
.tf-prow { display:flex; gap:12px; align-items:center; padding:10px 14px; background:var(--surface); border:1px solid var(--border); border-radius:10px; }
.tf-prow:hover { border-color:#cbd5e1; }
.tf-prow-img { width:48px; height:48px; flex-shrink:0; border-radius:8px; background:var(--surface2); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.tf-prow-img img { width:100%; height:100%; object-fit:cover; }
.tf-prow-main { flex:1; min-width:0; }
.tf-prow-name { font-size:14px; font-weight:700; color:var(--text); display:flex; align-items:center; gap:6px; }
.tf-prow-meta { font-size:12px; color:var(--text3); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.tf-src { font-size:10px; font-weight:700; padding:1px 6px; border-radius:4px; flex-shrink:0; }
.tf-src.so { background:#e0f2fe; color:#0369a1; }
.tf-src.pl { background:#fef3c7; color:#92400e; }

/* HS/세율 칩 영역 (행 우측) */
.tf-prow-hs { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.tf-hs-chip { font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px; font-weight:700; padding:3px 8px; border-radius:6px; background:var(--surface2); color:var(--text); cursor:pointer; border:1px solid var(--border); }
.tf-hs-chip:hover { border-color:var(--accent); }
.tf-hs-chip.unset { background:transparent; color:var(--text3); font-weight:500; cursor:default; }
.tf-hs-chip.orphan { color:var(--red); border-color:var(--red); }
.tf-rate { font-size:12px; color:var(--text2); white-space:nowrap; }
.tf-rate b { color:var(--text); }
.tf-rate .tf-applied { color:var(--green); font-weight:700; }
.tf-rate-sep { color:#cbd5e1; }
.tf-upd { font-size:11px; color:var(--text3); white-space:nowrap; }

.tf-btn { font-size:12px; padding:5px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text2); cursor:pointer; font-family:inherit; flex-shrink:0; }
.tf-btn:hover { background:var(--surface2); color:var(--text); }
.tf-btn-primary { font-size:13px; padding:7px 16px; border:none; border-radius:var(--radius-sm); background:var(--accent); color:#fff; cursor:pointer; font-family:inherit; font-weight:600; }
.tf-btn-primary:hover { filter:brightness(.95); }

.tf-empty { padding:40px; text-align:center; color:var(--text3); font-size:13px; }

/* HS별 품목 — 그룹 헤더 + 하위 품목 */
.tf-byhs-rows { display:flex; flex-direction:column; gap:14px; }
.tf-byhs-group { border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.tf-byhs-head { display:flex; align-items:center; gap:10px; padding:9px 12px; background:var(--surface2); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.tf-byhs-head.unset { background:transparent; }
.tf-byhs-name { font-size:13px; font-weight:700; color:var(--text); }
.tf-byhs-cnt { margin-left:auto; font-size:12px; color:var(--text3); font-weight:600; }
.tf-byhs-items { display:flex; flex-direction:column; }
.tf-prow-sub { border:none; border-radius:0; border-bottom:1px solid var(--border); }
.tf-byhs-items .tf-prow-sub:last-child { border-bottom:none; }

/* 모달 */
.tf-modal { width:min(560px,94vw); }
.tf-modal-title { font-size:15px; font-weight:700; margin-bottom:4px; }
.tf-field { margin-top:12px; }
.tf-field label { display:block; font-size:12px; color:var(--text2); margin-bottom:4px; font-weight:600; }
.tf-field input, .tf-field textarea { width:100%; box-sizing:border-box; padding:8px 10px; font-size:13px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text); font-family:inherit; }
.tf-field textarea { resize:vertical; min-height:54px; line-height:1.5; }
.tf-row2 { display:flex; gap:10px; }
.tf-row2 .tf-field { flex:1; }
.tf-preview { margin-top:12px; padding:10px 12px; border-radius:8px; background:var(--surface2); font-size:12px; color:var(--text2); }
.tf-preview b { color:var(--text); }
.tf-modal-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }
.tf-modal-actions .tf-del { margin-right:auto; color:var(--red); border-color:var(--red); background:transparent; }
