/* ==========================================================================
   SKYLAND BATCH IMPORT (Cập nhật nguồn hàng loạt dạng Trang tính Excel)
   - Nhập thủ công dạng bảng tính / Excel
   - Dán dữ liệu từ file Excel / Google Sheets (Ctrl+V)
   - Đọc & sao chép từ link bảng hàng online
   - Theo dõi & cập nhật trạng thái Đã bán, Lock cọc thời gian thực
   - Quét ảnh danh sách bằng AI Vision
   Dành riêng cho Manager & Admin
   ========================================================================== */

.skyland-batch-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow-y: auto;
  box-sizing: border-box;
  animation: skylandBatchFadeIn 0.2s ease-out;
}

@keyframes skylandBatchFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.skyland-batch-modal {
  width: 100%;
  max-width: 1240px;
  max-height: 95vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.skyland-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
}

.skyland-batch-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skyland-batch-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skyland-batch-badge-admin {
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skyland-batch-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.skyland-batch-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Nav Tabs Chính */
.skyland-batch-nav {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 16px 0;
  gap: 8px;
  overflow-x: auto;
}

.skyland-batch-nav-btn {
  padding: 10px 18px;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.skyland-batch-nav-btn:hover {
  color: #0369a1;
  background: rgba(255, 255, 255, 0.6);
}

.skyland-batch-nav-btn.is-active {
  background: #ffffff;
  color: #0284c7;
  border-color: #e2e8f0;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.03);
}

.skyland-batch-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8fafc;
}

/* Thanh công cụ nhập link & Excel toolbar */
.skyland-batch-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.skyland-batch-link-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.skyland-batch-excel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.skyland-batch-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.skyland-batch-btn-sm {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.skyland-batch-btn-sm:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.skyland-batch-btn-primary-sm {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.skyland-batch-btn-primary-sm:hover {
  background: #0369a1;
  border-color: #0369a1;
}

/* Modal Paste Excel Dialog */
.skyland-batch-paste-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skyland-batch-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  resize: vertical;
}

.skyland-batch-textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* Loading Spinner - MẶC ĐỊNH DISPLAY: NONE ĐỂ KHÔNG BỊ ĐƠ */
.skyland-batch-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  color: #0369a1;
  gap: 12px;
  text-align: center;
}

.skyland-batch-loading.is-active {
  display: flex !important;
}

.skyland-batch-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #e0f2fe;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: skylandBatchSpin 0.7s linear infinite;
}

@keyframes skylandBatchSpin {
  to { transform: rotate(360deg); }
}

/* Cấu hình chung & Loại nguồn */
.skyland-batch-config-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skyland-batch-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skyland-batch-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .skyland-batch-grid3 {
    grid-template-columns: 1fr;
  }
}

.skyland-batch-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skyland-batch-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.skyland-batch-input,
.skyland-batch-select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.88rem;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.skyland-batch-input:focus,
.skyland-batch-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* KHỐI CÂU HỎI TRƯỜNG VỊ TRÍ */
.skyland-batch-geo-decision-box {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skyland-batch-geo-decision-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
}

.skyland-batch-geo-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skyland-batch-geo-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.skyland-batch-geo-option:hover {
  border-color: #22c55e;
  background: #f7fee7;
}

.skyland-batch-geo-option input[type="radio"] {
  margin-top: 3px;
  cursor: pointer;
}

.skyland-batch-geo-desc {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

/* BẢNG LƯỚI TRANG TÍNH EXCEL (SPREADSHEET GRID) */
.skyland-batch-grid-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  overflow: auto;
  max-height: 420px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.skyland-batch-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.skyland-batch-grid-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 8px 10px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 2px solid #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.skyland-batch-grid-table td {
  padding: 4px 6px;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.skyland-batch-grid-table tr:hover {
  background: #f8fafc;
}

.skyland-batch-grid-table tr.is-selected {
  background: #e0f2fe;
}

.skyland-batch-cell-input {
  width: 100%;
  border: 1px solid transparent;
  padding: 5px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  background: transparent;
  outline: none;
  box-sizing: border-box;
}

.skyland-batch-cell-input:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.skyland-batch-cell-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.skyland-batch-badge-geo {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}

.skyland-batch-badge-geo.is-separate {
  background: #dcfce7;
  color: #15803d;
}

.skyland-batch-badge-geo.is-common {
  background: #fef3c7;
  color: #b45309;
}

.skyland-batch-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}

.skyland-batch-status-badge.is-sold {
  background: #fee2e2;
  color: #b91c1c;
}

.skyland-batch-status-badge.is-locked {
  background: #fef3c7;
  color: #b45309;
}

.skyland-batch-status-badge.is-selling {
  background: #dcfce7;
  color: #15803d;
}

/* Ảnh riêng từng lô */
.skyland-batch-lot-photo-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 110px;
}

.skyland-batch-lot-thumb {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
}

.skyland-batch-lot-upload-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}

.skyland-batch-lot-upload-btn:hover {
  background: #e2e8f0;
}

.skyland-batch-row-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.skyland-batch-row-remove:hover {
  background: #fee2e2;
}

/* Khu vực theo dõi bảng hàng online (Online Trackers Tab) */
.skyland-batch-trackers-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skyland-batch-tracker-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.skyland-batch-tracker-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skyland-batch-tracker-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.skyland-batch-tracker-meta {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Footer & Actions */
.skyland-batch-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  gap: 12px;
}

.skyland-batch-stat {
  font-size: 0.88rem;
  color: #475569;
}

.skyland-batch-stat b {
  color: #0369a1;
}

.skyland-batch-foot-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skyland-batch-btn-cancel {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.skyland-batch-btn-commit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.2s;
}

.skyland-batch-btn-commit:hover {
  filter: brightness(1.08);
}

.skyland-batch-btn-commit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dropzone Quét Ảnh */
.skyland-batch-dropzone {
  border: 2px dashed #93c5fd;
  background: #f0f9ff;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.skyland-batch-dropzone:hover {
  border-color: #0284c7;
  background: #e0f2fe;
}

.skyland-batch-dropzone-ico {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.skyland-batch-dropzone-text {
  font-size: 0.95rem;
  color: #0369a1;
  font-weight: 600;
  margin-bottom: 4px;
}

.skyland-batch-dropzone-hint {
  font-size: 0.8rem;
  color: #64748b;
}

.skyland-batch-image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.skyland-batch-image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.skyland-batch-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skyland-batch-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Launch Buttons */
.skyland-batch-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transition: all 0.15s;
}

.skyland-batch-launch-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   GIAO DIỆN 1 TAB: Link bảng hàng đa nền tảng + Dự án + Vị trí + Chính sách
   ========================================================================== */
.skyland-batch-modal { position: relative; }
.skyland-batch-single { display: flex; flex-direction: column; gap: 14px; }
.skyland-batch-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #0284c7; color: #fff; font-size: 0.75rem; font-weight: 800; flex: 0 0 auto;
}
.skyland-batch-count { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: #64748b; }
.skyland-batch-hint { font-size: 0.8rem; color: #64748b; line-height: 1.45; }
.skyland-batch-ok { color: #15803d; font-weight: 600; }
.skyland-batch-err { color: #b91c1c; font-weight: 600; }
.skyland-batch-red-text { color: #dc2626; }
.skyland-batch-right { display: flex; justify-content: flex-end; }
.skyland-batch-empty { text-align: center; color: #94a3b8; padding: 28px 12px; }
.skyland-batch-span2 { grid-column: span 2; }
.skyland-batch-btn-lg { padding: 9px 16px; white-space: nowrap; }
.skyland-batch-btn-green { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.skyland-batch-btn-danger { color: #ef4444; }
.skyland-batch-btn-muted { color: #94a3b8; }
.skyland-batch-btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.skyland-batch-x { border: none; background: transparent; cursor: pointer; color: #64748b; font-size: 1rem; }
.skyland-batch-paste-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; color: #0f172a; }

.skyland-batch-link-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.skyland-batch-link-input-wrap .skyland-batch-input { flex: 1; min-width: 0; padding-right: 150px; }
.skyland-batch-link-bar > .skyland-batch-input { flex: 1; min-width: 0; }
.skyland-batch-platform {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #e0f2fe; color: #0369a1; font-size: 0.72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; pointer-events: none;
}
.skyland-batch-platform.is-bad { background: #fee2e2; color: #b91c1c; }
.skyland-batch-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.84rem; color: #0369a1; font-weight: 600; cursor: pointer; }
.skyland-batch-check input { margin-top: 2px; }
.skyland-batch-link-result {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 8px 10px; font-size: 0.85rem; color: #334155;
}

.skyland-batch-geo-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.skyland-batch-geo-row > .skyland-batch-input { flex: 1; min-width: 240px; }
.skyland-batch-geo-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.skyland-batch-seg { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; gap: 3px; align-self: flex-start; }
.skyland-batch-seg label { cursor: pointer; }
.skyland-batch-seg input { position: absolute; opacity: 0; pointer-events: none; }
.skyland-batch-seg span { display: block; padding: 6px 14px; border-radius: 8px; font-size: 0.84rem; font-weight: 700; color: #475569; }
.skyland-batch-seg input:checked + span { background: #fff; color: #0284c7; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
#batchPolicyText { font-family: inherit; min-height: 84px; }

.skyland-batch-photo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.skyland-batch-photo-previews { display: flex; gap: 6px; flex-wrap: wrap; }
.skyland-batch-photo-previews .skyland-batch-image-thumb { width: 52px; height: 52px; }

.skyland-batch-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: #64748b; }
.skyland-batch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.skyland-batch-dot.is-sold { background: #fecaca; border: 1px solid #ef4444; }
.skyland-batch-dot.is-locked { background: #fef3c7; border: 1px solid #f59e0b; }
.skyland-batch-grid-table tr.skyland-batch-row.is-sold { background: #fee2e2; }
.skyland-batch-grid-table tr.skyland-batch-row.is-sold .skyland-batch-cell-input { color: #b91c1c; }
.skyland-batch-grid-table tr.skyland-batch-row.is-locked { background: #fffbeb; }
.skyland-batch-grid-table tr.skyland-batch-row.is-selected { background: #e0f2fe; }

.skyland-batch-trackers-details > summary { cursor: pointer; list-style: none; }
.skyland-batch-trackers-details > summary::-webkit-details-marker { display: none; }
.skyland-batch-trackers-details[open] > summary { margin-bottom: 8px; }

.skyland-batch-loading.is-active {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.86);
}

/* Máy tính bảng / điện thoại */
@media (max-width: 768px) {
  .skyland-batch-overlay { padding: 0; align-items: stretch; }
  .skyland-batch-modal { max-width: none; max-height: none; height: 100%; height: 100dvh; border-radius: 0; }
  .skyland-batch-head { padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
  .skyland-batch-title { font-size: 1rem; }
  .skyland-batch-badge-admin { display: none; }
  .skyland-batch-body { padding: 10px; gap: 10px; -webkit-overflow-scrolling: touch; }
  .skyland-batch-config-card { padding: 12px; }
  .skyland-batch-span2 { grid-column: auto; }
  .skyland-batch-link-bar { flex-direction: column; align-items: stretch; }
  .skyland-batch-btn-lg { justify-content: center; }
  .skyland-batch-input, .skyland-batch-select, .skyland-batch-textarea, .skyland-batch-cell-input { font-size: 16px; }
  .skyland-batch-geo-row > .skyland-batch-input { min-width: 0; flex-basis: 100%; }
  .skyland-batch-geo-btns .skyland-batch-btn-sm { flex: 1 1 auto; justify-content: center; }
  .skyland-batch-seg { align-self: stretch; }
  .skyland-batch-seg label { flex: 1; text-align: center; }
  .skyland-batch-action-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .skyland-batch-action-group .skyland-batch-btn-sm { justify-content: center; padding: 8px 6px; }
  .skyland-batch-foot { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; gap: 8px; }
  .skyland-batch-stat { font-size: 0.8rem; text-align: center; }
  .skyland-batch-foot-btns { display: grid; grid-template-columns: 1fr 2fr; }
  .skyland-batch-tracker-card { flex-direction: column; align-items: stretch; }
  .skyland-batch-tracker-meta { flex-wrap: wrap; }
}

/* Điện thoại: bảng hàng chuyển thành thẻ từng lô */
@media (max-width: 640px) {
  .skyland-batch-grid-wrap { max-height: none; border: none; background: transparent; box-shadow: none; overflow: visible; }
  .skyland-batch-grid-table thead { display: none; }
  .skyland-batch-grid-table, .skyland-batch-grid-table tbody { display: block; }
  .skyland-batch-grid-table tr.skyland-batch-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px;
    position: relative; margin-bottom: 10px; padding: 10px 10px 8px;
    border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
  }
  .skyland-batch-grid-table tr.skyland-batch-row.is-sold { border-color: #fca5a5; background: #fef2f2; }
  .skyland-batch-grid-table tr.skyland-batch-row td { display: flex; flex-direction: column; gap: 2px; border: none; padding: 0; }
  .skyland-batch-grid-table tr.skyland-batch-row td::before { font-size: 0.7rem; font-weight: 700; color: #64748b; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(1) { position: absolute; top: 8px; left: 10px; font-size: 0.72rem; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(2) { grid-column: 1 / -1; padding: 0 32px 0 28px; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(2) .skyland-batch-cell-input { font-weight: 700; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(3)::before { content: "Diện tích"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(4)::before { content: "Giá bán"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(5)::before { content: "Giá xây dựng"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(6)::before { content: "Giá thu"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(7)::before { content: "Phí / HH"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(8)::before { content: "Trạng thái"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(9)::before { content: "Đường / Pháp lý"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(10)::before { content: "Liên hệ"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(11) { align-items: flex-start; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(11)::before { content: "Vị trí lô"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(12)::before { content: "Ảnh riêng"; }
  .skyland-batch-grid-table tr.skyland-batch-row td:nth-child(13) { position: absolute; top: 4px; right: 4px; }
  .skyland-batch-grid-table tr.skyland-batch-row .skyland-batch-cell-input { border-color: #e2e8f0; background: #fff; padding: 7px 8px; }
  .skyland-batch-lot-photo-cell { min-width: 0; }
}
.skyland-batch-trackers-details { display: block; }
.skyland-batch-overlay [hidden] { display: none !important; }
