/* Nhập Excel vào bảng (#/sync/import) — chỉ class sy-*, dùng biến màu của app.css. Co giãn tới 375px (OPS-06).
   Import Excel to table (#/sync/import) — sy-* classes only, app.css color variables. Scales down to 375px (OPS-06). */
.sy-field { display: flex; flex-direction: column; gap: 4px; font-size: .87rem; color: var(--ink-2); }
.sy-im-dest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.sy-im-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; min-height: var(--ctl-h); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); width: fit-content; max-width: 100%; }
.sy-im-seg label { white-space: nowrap; }
.sy-im-seg label { cursor: pointer; }
.sy-im-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sy-im-seg span { display: inline-block; padding: 6px 14px; border-radius: calc(var(--radius) - 2px); font-weight: 500; color: var(--ink-2); }
.sy-im-seg input:checked + span { background: var(--surface); color: var(--teal-2); box-shadow: 0 0 0 1px var(--teal) inset; }
.sy-im-seg input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 1px; }

.sy-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sy-center { text-align: center; }
.sy-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.sy-headrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sy-headrow h2 { margin: 0; }
.sy-check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; color: var(--ink-2); }
.sy-check input { margin-top: 3px; accent-color: var(--teal); }

/* Xem trước file / file preview */
.sy-preview { max-height: 300px; overflow: auto; }
.sy-preview table { font-size: .82rem; width: max-content; min-width: 100%; }
.sy-preview th { position: sticky; top: 0; z-index: 1; }
.sy-type { display: block; font-weight: 400; font-size: .72rem; color: var(--teal-2); }
.sy-cell { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sy-null { color: var(--ink-3); font-style: italic; }

/* Ánh xạ cột / column mapping */
.sy-off td { opacity: .55; }
.sy-off td:first-child { opacity: 1; }
.sy-tname { width: 100%; min-width: 140px; }
.sy-bad { border-color: var(--red) !important; background: var(--red-bg); }
#sy-s3 select { max-width: 100%; }

/* Cách ghi / write modes */
.sy-modes .kind-opt.sy-danger strong { color: var(--red); }

/* Kết quả / result */
.sy-job { border-left: 4px solid var(--teal); }
.sy-job.sy-ok { border-left-color: var(--green); }
.sy-job.sy-fail { border-left-color: var(--red); }
.sy-job .row strong { font-size: 1rem; }
.sy-progress { width: 100%; height: 8px; accent-color: var(--teal); }
.sy-errors { max-height: 320px; overflow: auto; }

/* Lịch sử / history */
.sy-click { cursor: pointer; }
.sy-click:hover td { background: var(--teal-bg); }

@media (max-width: 860px) {
  .sy-im-dest { grid-template-columns: 1fr; }
  .sy-modes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sy-im-seg { width: 100%; }
  .sy-im-seg label { flex: 1; }
  .sy-im-seg span { display: block; text-align: center; }
  .sy-tname { min-width: 0; }
}
