/* ====================================================================
 * STARGRADE BATCH IMAGE SCANNING STYLES (Chấm từ ảnh, thư mục)
 * ==================================================================== */

.batch-scan-wrap {
  max-width: 480px;
  margin: 0 auto 30px;
  background: #f8fafc;
  min-height: 85vh;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #dce8d7;
  position: relative;
  display: flex;
  flex-direction: column;
}

body.night .batch-scan-wrap {
  background: #17241a;
  border-color: #364c3c;
}

.batch-scan-header {
  background: var(--grade-green, #129d08);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.batch-header-title {
  flex: 1;
  text-align: center;
}

.batch-header-title h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: 0.2px;
}

.batch-header-title p {
  font-size: 13px;
  margin: 2px 0 0;
  color: #d1fae5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  display: inline-block;
}

.batch-scan-header .header-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.batch-scan-body {
  flex: 1;
  padding: 16px 14px 100px;
  display: flex;
  flex-direction: column;
}

/* Empty State (Image 1) */
.batch-empty-state {
  margin: auto;
  text-align: center;
  padding: 40px 16px;
}

.batch-empty-icon-box {
  width: 100px;
  height: 100px;
  background: #e2efdf;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--grade-green, #129d08);
}

body.night .batch-empty-icon-box {
  background: #243828;
  color: #57d64d;
}

.batch-empty-title {
  font-size: 19px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
}

body.night .batch-empty-title {
  color: #ecf4e9;
}

.batch-empty-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

body.night .batch-empty-desc {
  color: #94a3b8;
}

/* Summary Card & Progress (Image 2) */
.batch-summary-card {
  background: #fff;
  border: 1.5px solid var(--grade-green, #129d08);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 3px 12px rgba(18, 157, 8, 0.08);
  margin-bottom: 14px;
}

body.night .batch-summary-card {
  background: #223326;
  border-color: #3d5743;
}

.batch-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.batch-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

body.night .batch-summary-title {
  color: #ecf4e9;
}

.batch-summary-time {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

body.night .batch-summary-time {
  color: #94a3b8;
}

.batch-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

body.night .batch-progress-track {
  background: #334155;
}

.batch-progress-fill {
  height: 100%;
  background: var(--grade-green, #129d08);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.batch-counter-pills {
  display: flex;
  align-items: center;
  gap: 14px;
}

.batch-pill {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.batch-pill.pill-done {
  color: #16a34a;
}

.batch-pill.pill-warn {
  color: #d97706;
}

.batch-pill.pill-err {
  color: #dc2626;
}

.batch-source-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--grade-green, #129d08);
  margin: 6px 4px 10px;
}

body.night .batch-source-label {
  color: #57d64d;
}

/* Items List */
.batch-items-list {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.night .batch-items-list {
  background: #1e2d22;
  border-color: #334a37;
}

.batch-item-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
}

body.night .batch-item-row {
  border-bottom-color: #2b3e30;
}

.batch-item-row:last-child {
  border-bottom: none;
}

.batch-item-row:hover {
  background: #f8fafc;
}

body.night .batch-item-row:hover {
  background: #25392a;
}

.batch-item-thumb {
  width: 44px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.batch-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-ph {
  font-size: 20px;
}

.batch-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.batch-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.night .batch-item-name {
  color: #ecf4e9;
}

.batch-item-sub {
  font-size: 12.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.night .batch-item-sub {
  color: #94a3b8;
}

.text-err {
  color: #dc2626 !important;
  font-weight: 500;
}

.text-warn {
  color: #d97706 !important;
  font-weight: 500;
}

.text-muted {
  color: #94a3b8;
}

.batch-item-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.batch-item-score {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.batch-item-score.warn {
  color: #d97706;
}

body.night .batch-item-score {
  color: #ecf4e9;
}

.badge-err {
  background: #fee2e2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.batch-spinner {
  display: inline-block;
  font-size: 18px;
  color: var(--grade-green, #129d08);
  animation: batch-spin 1s linear infinite;
}

@keyframes batch-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Bottom Docked Action Bar */
.batch-dock-container {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.batch-bottom-dock {
  background: #e2efdf;
  border: 1px solid #c9dec5;
  border-radius: 30px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
}

body.night .batch-bottom-dock {
  background: #243a29;
  border-color: #3b5c40;
}

.dock-btn {
  background: transparent;
  border: none;
  color: #206323;
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

body.night .dock-btn {
  color: #b7e8b2;
}

.dock-btn:hover {
  background: #d2e7ce;
}

body.night .dock-btn:hover {
  background: #2e4d35;
}

.dock-btn.active {
  background: var(--grade-green, #129d08);
  color: #fff;
  box-shadow: 0 2px 8px rgba(18, 157, 8, 0.35);
}

body.night .dock-btn.active {
  background: #117b0a;
}

