*{box-sizing:border-box}body{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;margin:0;color:#1d2433;background:#f6f7f9;font-size:15px}
.top{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between;background:#123c69;color:#fff;padding:.6rem 1rem}
.top a,.top .who,.top button.link{color:#fff;text-decoration:none;margin-right:.8rem}.brand{font-weight:600}
.inline{display:inline}button.link{background:none;border:0;padding:0;cursor:pointer;font:inherit}
main{max-width:64rem;margin:1rem auto;padding:0 1rem}
.card{background:#fff;border:1px solid #dde1e7;border-radius:6px;padding:1rem;margin-bottom:1rem}
table{border-collapse:collapse;width:100%;background:#fff}th,td{border-bottom:1px solid #e3e6ea;padding:.45rem;text-align:left;vertical-align:top}
label{display:block;font-weight:600;margin-top:.6rem}input,select,textarea{width:100%;padding:.45rem;border:1px solid #bfc5cd;border-radius:4px;font:inherit}
input[type=checkbox],input[type=radio]{width:auto}button,.btn{background:#1f6feb;color:#fff;border:0;border-radius:4px;padding:.5rem .9rem;cursor:pointer;font:inherit;margin-top:.6rem}
.btn.secondary,button.secondary{background:#6b7280}.errorlist,.error{color:#b42318}.notice{background:#fff7e6;border:1px solid #f0c36d;padding:.6rem;border-radius:4px}
.messages{list-style:none;padding:0}.messages li{background:#e7f3ff;border:1px solid #9cc7f5;padding:.5rem;border-radius:4px;margin-bottom:.4rem}
.badge{display:inline-block;padding:.1rem .45rem;border-radius:10px;background:#e5e7eb;font-size:.85em}.internal{background:#fff4d6}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.6rem}.muted{color:#6b7280}
.helptext{color:#6b7280;font-size:.85em;display:block}

/* M5: QR label sheet, upload progress */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.qr-label { border: 1px solid #ccc; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; break-inside: avoid; }
.qr-label svg { width: 160px; height: 160px; }
.qr-label small { word-break: break-all; color: #555; }
@media print { header, nav, .no-print, footer { display: none !important; } .qr-label { border: 1px dashed #999; } }
.upload-status { margin-top: 8px; }
.upload-status progress { width: 100%; }
.upload-row { margin: 4px 0; font-size: 0.9em; }
.upload-row.error { color: #b00020; }
.draft-note { background: #fff8e1; padding: 6px 10px; border-radius: 4px; }
.badge-pending { background: #fff3cd; color: #7a5a00; padding: 2px 8px; border-radius: 10px; }
