* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #f3f4f6; color: #111; font-family: Arial, Helvetica, sans-serif; font-size: 18px; }
.screen { max-width: 520px; margin: 0 auto; padding: 12px 12px 40px; }
.hidden { display: none !important; }
h1 { font-size: 26px; margin: 8px 0; }
h2 { font-size: 22px; margin: 0; }
header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
header small { color: #555; font-size: 13px; }
.formHead { align-items: center; gap: 10px; margin-bottom: 6px; }
label { display: block; font-weight: bold; margin: 14px 0 6px; color: #333; font-size: 17px; }
input { width: 100%; font-size: 26px; padding: 12px; border: 2px solid #9ca3af; border-radius: 10px; background: #fff; scroll-margin-top: 10px; }
#labFilter { font-size: 20px; padding: 10px 12px; }
.spacer { height: 60vh; } /* lets the last inputs scroll above the keyboard */
input:focus { outline: none; border-color: #1d4ed8; background: #eef2ff; }
button { font-family: inherit; }
.big { width: 100%; font-size: 24px; font-weight: bold; padding: 18px 10px; border: none; border-radius: 12px; background: #e5e7eb; color: #111; margin-top: 10px; }
.big:active { transform: scale(0.98); }
.primary { background: #1d4ed8; color: #fff; }
.danger { background: #dc2626; color: #fff; }
.small { font-size: 16px; padding: 10px 14px; border: 1px solid #9ca3af; border-radius: 10px; background: #fff; }
.link { border: none; background: none; color: #1d4ed8; text-decoration: underline; margin-top: 20px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.variant { padding: 26px 4px; font-size: 20px; }
.variant.job { background: #2563eb; color: #fff; }
.variant.self { background: #059669; color: #fff; }
.variant.blow { background: #7c3aed; color: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tog { font-size: 20px; font-weight: bold; padding: 14px 6px; border: 2px solid #9ca3af; border-radius: 10px; background: #fff; color: #333; }
.tog.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.inRow { display: flex; gap: 8px; align-items: center; }
.inRow input { flex: 1; min-width: 0; }
.prefix { font-size: 26px; font-weight: bold; padding: 0 4px; white-space: nowrap; }
.hint { color: #555; font-size: 13px; display: block; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font-size: 19px; font-weight: bold; padding: 12px 14px; border: 2px solid #9ca3af; border-radius: 10px; background: #fff; color: #333; min-width: 58px; }
.chip.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.chip.lot { display: flex; flex-direction: column; align-items: flex-start; min-width: 45%; }
.chip.lot small { font-weight: normal; font-size: 12px; color: #666; }
.chip.lot.on small { color: #dbeafe; }
.who { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-radius: 10px; background: #eef2ff; border: 1px solid #c7d2fe; font-size: 15px; }
.who b { font-size: 17px; }
.who .others { color: #92400e; font-weight: bold; }
.item .by { font-size: 12px; color: #1d4ed8; font-weight: bold; }
.preview { background: #fff; border: 2px solid #1d4ed8; border-radius: 12px; padding: 10px 12px; }
.preview .pnum { font-size: 30px; font-weight: bold; color: #1d4ed8; }
.preview .prow { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid #e5e7eb; font-size: 17px; }
.preview .prow:first-of-type { border-top: none; }
.preview .prow b { font-size: 19px; text-align: right; }
.preview .missing { color: #b91c1c; }
.preview .pnet { font-size: 22px; }
.info { margin-top: 8px; padding: 10px; border-radius: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; font-weight: bold; }
.info.bad { background: #fef2f2; border-color: #fecaca; }
.seg { display: inline-flex; border: 2px solid #1d4ed8; border-radius: 10px; overflow: hidden; }
.segBtn { font-size: 15px; font-weight: bold; padding: 8px 14px; border: none; background: #fff; color: #1d4ed8; }
.segBtn.on { background: #1d4ed8; color: #fff; }
.listHead { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-weight: bold; }
.item { display: flex; justify-content: space-between; align-items: center; padding: 10px; margin-top: 6px; border-radius: 10px; background: #fff; border: 1px solid #e5e7eb; }
.item .l { display: flex; flex-direction: column; }
.item .num { font-size: 20px; font-weight: bold; }
.item .sub { font-size: 14px; color: #555; }
.badge { font-size: 13px; font-weight: bold; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.importing { background: #dbeafe; color: #1e40af; }
.badge.imported { background: #d1fae5; color: #065f46; }
.badge.rejected { background: #fee2e2; color: #991b1b; }
.err { color: #b91c1c; font-weight: bold; margin-top: 8px; min-height: 24px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.box { background: #fff; border-radius: 14px; padding: 18px; width: 100%; max-width: 440px; }
.msg { font-size: 22px; font-weight: bold; white-space: pre-line; margin-bottom: 14px; }
.msg.error { color: #b91c1c; }
.msg.ask { color: #92400e; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: #065f46; color: #fff; padding: 16px 22px; border-radius: 12px; font-size: 22px; font-weight: bold; z-index: 60; box-shadow: 0 4px 14px rgba(0,0,0,.3); white-space: nowrap; }
.busy { position: fixed; inset: 0; background: rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; z-index: 70; }
.spin { width: 48px; height: 48px; border: 6px solid #cbd5e1; border-top-color: #1d4ed8; border-radius: 50%; animation: s 0.8s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
#editTag { font-size: 14px; color: #92400e; font-weight: bold; }
