body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; padding: 16px; }
.card { border: 1px solid #ddd; border-radius: 12px; padding: 12px; max-width: 960px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-header h1 { margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, textarea { padding: 8px; border: 1px solid #ccc; border-radius: 8px; font-family: inherit; font-size: 14px; }
textarea { resize: vertical; }
pre { background: #f6f6f6; padding: 12px; border-radius: 12px; overflow: auto; }
small { color: #666; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { padding: 8px; border: 1px solid #e0e0e0; font-size: 14px; vertical-align: top; }
th { background: #fafafa; text-align: left; }
.table-wrap { overflow-x: auto; }

/* Buttons */
.btn { padding: 8px 12px; border: 1px solid #ccc; border-radius: 8px; cursor: pointer; background: #fff; font-size: 14px; }
.btn:hover { background: #f5f5f5; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-delete { color: #dc2626; border-color: #dc2626; }
.btn-delete:hover { background: #fef2f2; }

/* Column widths */
.col-drag { width: 32px; text-align: center; }
.col-actions { width: 120px; white-space: nowrap; }
.col-actions .btn { margin-right: 4px; }

/* Drag handle */
.drag-handle { cursor: grab; user-select: none; font-size: 16px; color: #999; }
.drag-handle:active { cursor: grabbing; }

/* Drag & drop */
tr.dragging { opacity: 0.4; }
tr.drag-over { border-top: 2px solid #2563eb; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 480px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.modal label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 500; }
.modal label input,
.modal label textarea { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.required { color: #dc2626; }
