/* --- Log Shop (goods receipt) ---------------------------------------------- */
.tool.big { font-size: 14px; padding: 11px 18px; }
.tool.big[disabled] { opacity: .45; cursor: not-allowed; }

/* the scan bar: one box for barcodes and names, plus the camera, pinned to the
   top of the page so it stays reachable however far down the list you are */
.rcp-scanbar {
  position: sticky; top: 0; z-index: 6; background: var(--bg);
  padding: 6px 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}
.rcp-scanrow { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.rcp-omniwrap { position: relative; flex: 1 1 260px; min-width: 200px; }
.rcp-omni {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 15px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rcp-omni:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.rcp-omni.isbc { font-variant-numeric: tabular-nums; letter-spacing: .6px; font-weight: 700; }
.rcp-scanrow .tool { flex: none; }
.rcp-scanrow .tool.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rcp-scanrow .tool.on:hover { background: var(--accent); }
.rcp-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; min-height: 16px; }
.rcp-hint b { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.rcp-camwrap {
  display: none; margin-top: 10px; max-width: 420px;
  background: var(--surface-3); border-radius: 12px; overflow: hidden;
}
.rcp-camwrap video { width: 100%; display: block; }
#rcpBanner { margin: 10px 0 0; }
.sb-link {
  font: inherit; font-size: inherit; font-weight: 700; padding: 0; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid currentColor; color: inherit;
}

.rcp-bulk {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  background: var(--surface-2, var(--surface)); border: 1px solid var(--border);
  border-radius: 13px; padding: 12px 14px; margin-bottom: 16px;
}
.rcp-bulk > b { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); padding-bottom: 8px; }
.rcp-bulk label, .rcp-fields label, .rcp-fields .fld {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--text-muted);
}
.rcp-bulk input, .rcp-bulk select,
.rcp-fields input, .rcp-fields select {
  font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--surface); color: var(--text); min-width: 0;
}
.rcp-bulk input:focus, .rcp-bulk select:focus,
.rcp-fields input:focus, .rcp-fields select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.rcp-bulk input[type=number] { width: 92px; }

.rcp-list { display: flex; flex-direction: column; gap: 12px; }
.rcp-row { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 13px 14px; }
/* a line that arrived from a barcode we couldn't put a name to */
.rcp-row.needsname { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.rcp-row.needsname .rcp-name {
  border-color: color-mix(in srgb, var(--amber) 45%, transparent);
  background: color-mix(in srgb, var(--amber) 8%, transparent);
}
.rcp-row.needsname .rcp-name::placeholder { color: var(--amber); opacity: .8; }
@keyframes rcpjustin {
  from { box-shadow: 0 0 0 3px var(--ring); transform: translateY(-6px); opacity: .4; }
  to   { box-shadow: 0 0 0 0 transparent; transform: none; opacity: 1; }
}
.rcp-row.justin { animation: rcpjustin .38s cubic-bezier(.2,.7,.3,1) both; }
.rcp-row.pending { opacity: .75; border-style: dashed; }
.rcp-pendname { font-size: 14.5px; font-weight: 700; color: var(--text-muted); padding: 5px 0; }
.rcp-top { display: flex; gap: 12px; align-items: flex-start; }
.rcp-img { width: 46px; height: 46px; border-radius: 10px; object-fit: contain; background: var(--bg); flex: none; }
.rcp-img.ph { display: grid; place-items: center; font-size: 19px; color: var(--text-muted); }
.rcp-idbox { flex: 1; min-width: 0; }
.rcp-name {
  width: 100%; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 7px; margin: -5px -7px 0;
}
.rcp-name:hover:not(:disabled) { border-color: var(--border); }
.rcp-name:focus { outline: none; background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.rcp-name:disabled { opacity: .85; }
.rcp-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.rcp-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.rcp-tag.new { background: var(--ring); color: var(--accent); }
.rcp-tag.known { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.rcp-bc { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rcp-bc.dim { opacity: .6; font-style: italic; }
/* the way into the add wizard from a line that arrived off a barcode — quiet
   until you look at it, because most lines never need it */
.rcp-setup {
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  font: inherit; font-size: 11px; font-weight: 700; padding: 3px 9px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text-muted);
}
.rcp-setup:hover { border-color: var(--accent); color: var(--accent); background: var(--ring); }

/* 12-column grid so the wider controls (expiry especially) get room instead of
   being squeezed into the same 150px slot as a bare number box */
.rcp-fields {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 12px; margin-top: 12px;
}
.rcp-fields > label, .rcp-fields > .fld { grid-column: span 4; min-width: 0; }
.rcp-fields > .span6 { grid-column: span 6; }
.rcp-fields > .span12 { grid-column: span 12; }
@media (max-width: 880px) {
  .rcp-fields > label, .rcp-fields > .fld, .rcp-fields > .span6 { grid-column: span 6; }
  .rcp-fields > .span12 { grid-column: span 12; }
}
@media (max-width: 560px) {
  .rcp-fields > label, .rcp-fields > .fld,
  .rcp-fields > .span6, .rcp-fields > .span12 { grid-column: span 12; }
}
.rcp-pair { display: flex; gap: 5px; }
.rcp-pair input { flex: 1; min-width: 0; }
.rcp-pair select { flex: none; max-width: 46%; }
.rcp-prec {
  font: inherit; font-size: 10.5px; font-weight: 700; padding: 0 8px; cursor: pointer; flex: none;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text-muted);
}
.rcp-prec:hover { border-color: var(--accent); color: var(--accent); }
.rcp-auto { font-size: 10.5px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.rcp-auto.warn { color: var(--amber); }
.rcp-price { align-items: stretch; }
.rcp-price .rcp-dollar {
  display: grid; place-items: center; flex: none; padding: 0 9px;
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border); border-right: none;
  border-radius: 9px 0 0 9px;
}
.rcp-price input { border-radius: 0 9px 9px 0; }
.rcp-foot-dim { color: var(--text-muted); font-weight: 500; }

/* Best Before / Use By: a segmented toggle in the label row, so the field row
   below only has to hold the date itself */
.rcp-fld-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 20px; }
.rcp-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--bg); }
.rcp-seg button {
  font: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  padding: 3px 10px; cursor: pointer; border: none; background: transparent; color: var(--text-muted);
}
.rcp-seg button:hover { color: var(--text); }
.rcp-seg button.on { background: var(--accent); color: #fff; }
.rcp-seg button.on.ub { background: var(--amber); color: var(--surface); }
.rcp-noexp { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--text-muted); }
.rcp-expiry input[type=date], .rcp-expiry input[type=month] { flex: 1 1 auto; min-width: 118px; }
/* iOS Safari collapses bare date inputs — give them a real height */
.rcp-fields input[type=date], .rcp-fields input[type=month] { min-height: 34px; }

.rcp-links { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border); }
.rcp-linklabel { font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--text-muted); }
.rcp-links .chips-inline { margin: 7px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lchip.sug {
  font: inherit; font-size: 11.5px; cursor: pointer; padding: 3px 9px; border-radius: 999px;
  border: 1px dashed var(--accent); background: transparent; color: var(--accent);
}
.lchip.sug:hover { background: var(--ring); }
.rcp-nolink { font-size: 11.5px; color: var(--amber); font-style: italic; }
.rcp-links .linkfield { position: relative; }
.rcp-links .linkfield > input {
  width: 100%; font: inherit; font-size: 12.5px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text);
}
.rcp-links .linkfield > input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.rcp-sum { margin-top: 11px; font-size: 12px; color: var(--text-muted); }
.rcp-sum b { color: var(--text); }

/* --- bags, fees & discounts (js/shop-extras.js) ---
   Deliberately plainer than a product line: these aren't stock, they're the
   arithmetic at the bottom of the docket, and they should read like it. */
.rcp-extras {
  margin-top: 16px; padding: 12px 14px;
  background: var(--surface-2, var(--surface)); border: 1px dashed var(--border); border-radius: 13px;
}
.rcp-extras.bare { display: none; }
.rcp-extras > b { display: flex; align-items: center; gap: 6px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); }
.xtra-sub { font-size: 11.5px; color: var(--text-muted); margin: 5px 0 10px; max-width: 62ch; }
.xtra-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.xtra-row, .xtra-add { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.xtra-row input, .xtra-row select, .xtra-add input, .xtra-add select {
  font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--surface); color: var(--text); min-width: 0;
}
.xtra-row input:focus, .xtra-row select:focus,
.xtra-add input:focus, .xtra-add select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.xtra-row > input:first-child, .xtra-add > input:first-child { flex: 1 1 200px; }
.xtra-row select, .xtra-add select { flex: 0 1 auto; }
.xtra-money {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  font-size: 12.5px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.xtra-money input[type=number] { width: 88px; text-align: right; }
.xtra-row.off .xtra-money { color: var(--accent); }
.xtra-sum { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.xtra-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
/* the same thing inside an opened previous shop */
.xtra-hist { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.xtra-hist-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); }
.xtra-hist-head small { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.xtra-hist .xtra-list { margin: 8px 0; }
@media (max-width: 560px) {
  .xtra-row > input:first-child, .xtra-add > input:first-child { flex: 1 1 100%; }
  .xtra-row select, .xtra-add select { flex: 1 1 auto; }
}

.rcp-foot {
  position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 18px; padding: 13px 4px; background: var(--bg); border-top: 1px solid var(--border);
}
.rcp-foot-info { flex: 1; font-size: 13px; color: var(--text-muted); }
.rcp-foot-warn { color: var(--amber); font-weight: 600; }
.li-fix {
  margin-left: 6px; padding: 1px 8px; font: inherit; font-size: 11px; font-weight: 700;
  color: var(--amber); background: transparent; border: 1px solid var(--amber);
  border-radius: 999px; cursor: pointer;
}
.li-fix:hover { background: var(--amber); color: var(--surface); }
.li-recipes { display: block; font-size: 11.5px; color: var(--text-muted); }
.staple-list { columns: 2; gap: 24px; font-size: 13px; color: var(--text-soft); }
@media (max-width: 600px) { .staple-list { columns: 1; } }
.staple-list div { padding: 3px 0; break-inside: avoid; }
.recipes-in-list { font-size: 13px; color: var(--text-muted); margin: 2px 0 8px; }

.homeblock {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.homeblock h4 { border: none; margin-bottom: 4px; }
.homeblock .li-item { opacity: 0.65; padding: 2px 0; }
.empty { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

