::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #dfe3e7;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c5c6cd;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 12px;
  color: #fff;
  animation: fadeIn 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.show .modal-box {
  transform: scale(1);
}
.modal-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.btn-primary {
  background: #091426;
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; }

.form-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  outline: none;
}
.form-input:focus {
  border-color: #0099d9;
  box-shadow: 0 0 0 1px #0099d9;
}
.form-input-readonly {
  background: #F9FAFB;
}

.form-select {
  padding: 8px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  outline: none;
  appearance: none;
}
.form-select:focus {
  border-color: #0099d9;
  box-shadow: 0 0 0 1px #0099d9;
}

.form-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  outline: none;
  min-height: 3em;
  line-height: 1.5;
}
.form-textarea:focus {
  border-color: #0099d9;
  box-shadow: 0 0 0 1px #0099d9;
}

.img-placeholder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.img-placeholder-item.pending {
  border: 1px dashed rgba(0, 153, 217, 0.5);
  background: rgba(0, 153, 217, 0.04);
}
.img-placeholder-item.pending:hover {
  background: rgba(0, 153, 217, 0.08);
}
.img-placeholder-item.filled {
  border: 1px solid #dfe3e7;
  background: #f6fafe;
}
.img-placeholder-item.filled:hover {
  background: #eaeef2;
}
.img-placeholder-item .img-desc {
  flex: 1;
  font-size: 12px;
  color: #45474c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.img-placeholder-item .img-action-btn {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.img-placeholder-item .img-action-btn:hover {
  opacity: 0.85;
}
.img-placeholder-item .img-action-btn.upload-btn {
  background: #002c42;
  color: #89ceff;
}
.img-placeholder-item .img-action-btn.replace-btn {
  background: transparent;
  border: 1px solid #dfe3e7;
  color: #091426;
}
.img-placeholder-item .img-action-btn.replace-btn:hover {
  background: #eaeef2;
}
.img-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}
.img-badge.pending {
  background: rgba(0, 153, 217, 0.15);
  color: #004c6e;
}
.img-badge.filled {
  background: rgba(22, 163, 74, 0.15);
  color: #166534;
}
.vditor-ir .img-placeholder-marker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px dashed rgba(0, 153, 217, 0.5);
  border-radius: 4px;
  background: rgba(0, 153, 217, 0.06);
  color: #004c6e;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.vditor-ir .img-placeholder-marker:hover {
  background: rgba(0, 153, 217, 0.12);
}