/* ===== SHOP BOX ===== */
#shopBox {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  z-index: 9999;
}

/* ===== IMAGE SECTIONS ===== */
.img-section {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.img-section-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.img-section-title .badge-count {
  background: #0d6efd;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 7px;
  font-weight: 500;
}

.img-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.img-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ccc;
  cursor: pointer;
}

.img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(200, 0, 0, 0.75);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
}

.img-add-btn {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 2px dashed #adb5bd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: #adb5bd;
  background: #f8f9fa;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.img-add-btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
  background: #e8f0fe;
}

.img-add-btn .add-label {
  font-size: 10px;
  margin-top: 2px;
  line-height: 1.2;
  text-align: center;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

#lightbox .lb-close {
  position: absolute;
  top: 16px;
  right: 22px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
}

/* ===== TOAST ===== */
#toast {
  display: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: center;
}

#toast.show {
  display: block;
}

.error-group {
  background: #fff3cd;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 3px solid #ffc107;
}

.error-group-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #856404;
}

/* ===== NOTIFICATION BANNER ===== */
#hoanThanhBanner {
  display: none;
  margin-bottom: 16px;
}

.ht-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hoanThanh-item {
  background: #fff;
  border: 1px solid #198754;
  border-top: 3px solid #198754;
  border-radius: 8px;
  padding: 10px 12px;
  width: calc(25% - 6px);
  min-width: 160px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ht-model {
  font-weight: 700;
  font-size: 13px;
  color: #198754;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ht-imei {
  font-size: 11px;
  color: #666;
}

.ht-gia {
  font-size: 13px;
  font-weight: 600;
  color: #0d6efd;
}

.ht-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.ht-more-btn {
  width: calc(25% - 6px);
  min-width: 160px;
  border: 2px dashed #198754;
  border-radius: 8px;
  background: #f8fff8;
  color: #198754;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px;
  box-sizing: border-box;
}

.ht-more-btn:hover {
  background: #e8f5e9;
}

.ht-confirm-inline {
  display: none;
  background: #f0fff4;
  border: 1px solid #198754;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 13px;
}

.ht-confirm-inline.show {
  display: block;
}

.ht-confirm-inline .confirm-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

#submitConfirmBox {
  display: none;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#submitConfirmBox.show {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hoanThanh-item {
    width: calc(50% - 4px);
  }

  .ht-more-btn {
    width: calc(50% - 4px);
  }
}

@media (max-width: 480px) {
  .hoanThanh-item {
    width: 100%;
  }

  .ht-more-btn {
    width: 100%;
  }

  #shopBox {
    font-size: 12px;
    padding: 4px 8px;
    top: 5px;
    right: 5px;
  }
}
