body { font-family: Arial, sans-serif; margin: 30px; }
h2 { margin-top: 26px; }
table { border-collapse: collapse; width: 100%; margin-top: 12px; }
th, td { border: 1px solid #ddd; padding: 10px; text-align: left; vertical-align: top; }
th { background-color: #f2f2f2; }
code { background: #f4f4f4; padding: 3px 6px; border-radius: 4px; }
textarea { width: 100%; min-height: 140px; font-family: monospace; padding: 10px; resize: vertical; }
select { padding: 8px; border-radius: 8px; border: 1px solid #ccc; }
.flash { padding: 10px; margin: 12px 0; border-radius: 6px; }
.ok { background: #e8f7ee; border: 1px solid #bfe8cf; }
.err { background: #fdecea; border: 1px solid #f5c2c7; }
.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.btn { display:inline-flex; align-items:center; justify-content:center; height:36px; padding:0 14px; border:1px solid #222; background:#222; color:#fff; border-radius:6px; text-decoration:none; font-size:14px; cursor:pointer; }
.btn.secondary { background:#fff; color:#222; }
.btn.danger { background:#b00020; border-color:#b00020; }
.btn:hover { opacity:0.92; }
form.inline { margin:0; display:inline; }
pre { margin:0; white-space:pre-wrap; word-break:break-word; }
.qr { width: 84px; height: 84px; border: 1px solid #eee; border-radius: 6px; }
.small { font-size: 12px; color: #666; }

input[type="text"], input[type="file"] { padding: 8px; border-radius: 8px; border: 1px solid #ccc; }

/* Print grid */
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin: 12px 0; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:16px; }
.card { border:1px solid #e5e5e5; border-radius:10px; padding:12px; }
.card .label { margin-top:8px; font-size:12px; color:#111; word-break:break-word; }
.card .meta { font-size:11px; color:#666; margin-top:4px; }
.card img.qrprint { width: 100%; height: auto; border-radius: 8px; border: 1px solid #eee; }
@media print {
  body { margin: 0; }
  .no-print { display:none !important; }
  .card { break-inside: avoid; page-break-inside: avoid; }
}
