.plate-badge {
  display: inline-block;
  padding: 2px 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #1e3a8a;
  color: #fff;
  border-radius: 4px;
  border: 1px solid #1e40af;
}
.plate-badge.green {
  background: #166534;
  border-color: #15803d;
}
.plate-badge.red {
  background: #991b1b;
  border-color: #b91c1c;
}
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
.tbl th { background: #f1f5f9; font-weight: 600; color: #334155; }
.tbl tr:hover td { background: #f8fafc; }
.card { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; }
.btn { padding: 6px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.btn-primary { background: #1e40af; color: white; }
.btn-primary:hover { background: #1e3a8a; }
.btn-danger { background: #b91c1c; color: white; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-active { background: #dbeafe; color: #1e40af; }
.badge-void { background: #e2e8f0; color: #64748b; }
.badge-danger { background: #fecaca; color: #991b1b; }
.red-dot { display:inline-block; min-width:20px; height:20px; line-height:20px; text-align:center;
  background:#dc2626; color:white; border-radius:10px; font-size:12px; padding:0 6px; font-weight:700; }

/* 照片上传：拖拽区 + 缩略图预览 */
.photo-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  user-select: none;
  outline: none;
}
.photo-dropzone:hover, .photo-dropzone:focus-visible {
  border-color: #3b82f6;
  background: #eff6ff;
}
.photo-dropzone.dragging {
  border-color: #1d4ed8;
  background: #dbeafe;
  transform: scale(1.01);
}
.photo-dropzone.has-files {
  padding: 12px;
  background: white;
}
.photo-dropzone-icon { font-size: 32px; line-height: 1; margin-bottom: 6px; }
.photo-dropzone-text { color: #334155; font-size: 14px; }
.photo-dropzone-hint { color: #64748b; font-size: 12px; margin-top: 4px; }

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.photo-preview-grid:empty { display: none; }
.photo-preview-cell {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
}
.photo-preview-cell.too-big { border-color: #ef4444; }
.photo-preview-cell img {
  width: 100%;
  flex: 1;
  object-fit: cover;
  min-height: 0;
}
.photo-preview-meta {
  padding: 3px 6px;
  font-size: 11px;
  color: #64748b;
  background: white;
  border-top: 1px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-preview-warn {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  font-size: 11px;
  padding: 2px 4px;
  text-align: center;
}
.photo-preview-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-weight: 600;
  transition: background 0.15s;
}
.photo-preview-remove:hover { background: rgba(220, 38, 38, 0.9); }

.photo-camera-btn {
  display: none;
  margin-top: 8px;
  padding: 10px 16px;
  width: 100%;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.photo-camera-btn:active { background: #1e3a8a; }

/* 手机端：更大的触控目标与按钮 */
@media (max-width: 640px) {
  .photo-camera-btn { display: block; }
  .hide-on-mobile { display: none; }
  .photo-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .photo-preview-remove {
    width: 32px; height: 32px;
    font-size: 22px;
    top: 6px; right: 6px;
  }
  .photo-dropzone {
    padding: 28px 16px;
  }
  .photo-dropzone-icon { font-size: 40px; }
  .photo-dropzone-text { font-size: 16px; }
}
