/* 31UP QR Studio – Batch 2.0, bulk update, print exports, QRStuff move (module B of 1.7) */
.qb, .qb-mig { min-width: 0; }
.qb-subnav { margin-bottom: 16px; }
.qb-subnav button { min-height: 40px; }
.qb-card { overflow: hidden; }

/* stepper */
.qb-stepper { list-style: none; display: flex; gap: 6px; margin: 0 0 14px; padding: 0; counter-reset: s; }
.qb-stepper li { flex: 1 1 0; min-width: 0; }
.qb-stepper button { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--qr31-muted); background: #fff; border: 1px solid var(--qr31-line); border-radius: 12px; cursor: pointer; text-align: left; }
.qb-stepper button:disabled { cursor: default; opacity: .7; }
.qb-stepper i { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--qr31-soft); color: var(--qr31-muted); font-style: normal; font-size: 13px; }
.qb-stepper span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-stepper .is-on button { border-color: var(--qr31-brand); color: var(--qr31-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--qr31-brand) 14%, transparent); }
.qb-stepper .is-on i { background: var(--qr31-brand); color: #fff; }
.qb-stepper .is-done i { background: #13703a; color: #fff; }
.qb-stepper .is-done button { color: var(--qr31-ink); }
@media (max-width: 640px) {
  .qb-stepper { gap: 4px; }
  .qb-stepper button { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; font-size: 11px; text-align: center; }
  .qb-stepper span { white-space: normal; line-height: 1.15; }
}

.qb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qb-actions .qr31-btn { min-height: 44px; }

/* step 1: types */
.qb-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.qb-type { position: relative; display: block; cursor: pointer; }
.qb-type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qb-type span { display: flex; flex-direction: column; gap: 3px; min-height: 64px; padding: 12px 14px 12px 42px; border: 1.5px solid var(--qr31-line); border-radius: 12px; background: #fff; position: relative; }
.qb-type span::before { content: ""; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #b9bfd0; background: #fff; }
.qb-type small { color: var(--qr31-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-type input:checked + span { border-color: var(--qr31-brand); background: color-mix(in srgb, var(--qr31-brand) 6%, #fff); }
.qb-type input:checked + span::before { background: var(--qr31-brand); border-color: var(--qr31-brand); box-shadow: inset 0 0 0 3px #fff; }
.qb-type input:focus-visible + span { outline: 2px solid var(--qr31-brand); outline-offset: 2px; }
.qb-type.is-off { cursor: default; }
.qb-type.is-off span { background: var(--qr31-soft); border-style: dashed; }
.qb-type.is-off span::before { opacity: .35; }
.qb-type.is-off small { white-space: normal; }

/* step 2: drop zones */
.qb-drops { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .qb-drops { grid-template-columns: 1fr; } }
.qb-drop { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 96px; padding: 16px; border: 2px dashed #c4cadb; border-radius: 14px; background: var(--qr31-soft); cursor: pointer; text-align: center; margin: 0 0 12px; overflow: hidden; }
.qb-drops .qb-drop { margin: 0; }
.qb-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.qb-drop b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; }
.qb-drop span { color: var(--qr31-muted); font-size: 13px; word-break: break-word; }
.qb-drop:hover, .qb-drop.is-over { border-color: var(--qr31-brand); background: color-mix(in srgb, var(--qr31-brand) 6%, #fff); }
.qb-drop:focus-within { outline: 2px solid var(--qr31-brand); outline-offset: 2px; }
.qb-paste { margin: 4px 0 12px; }
.qb-paste summary, .qb-old summary, .qb-errors summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.qb-paste textarea { width: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid #d8d8e0; border-radius: 10px; padding: 10px; }
.qb-sum { border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.qb-sum.is-ok { background: #e7f6ec; color: #0d4f29; }
.qb-sum.is-bad { background: #fff4dc; color: #6b4300; }
.qb-sum ul { flex-basis: 100%; margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.qb-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qb-inline input { flex: 1 1 80px; min-width: 0; }
.qb-inline select { flex: 0 0 auto; width: auto; }
.qb-inline small { color: var(--qr31-muted); font-size: 12px; }

/* step 3: design */
.qb-design { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .qb-design { grid-template-columns: 1fr; } .qb-design-preview { order: -1; } }
.qb-design-preview { position: sticky; top: 12px; }
.qb-preview { background: var(--qr31-soft); border-radius: 14px; padding: 14px; display: grid; place-items: center; }
.qb-preview svg { width: 100%; max-width: 230px; height: auto; display: block; }
.qb-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-bottom: 12px; }
.qb-preset { font: inherit; font-size: 12px; font-weight: 600; color: var(--qr31-ink); background: #fff; border: 1.5px solid var(--qr31-line); border-radius: 12px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; }
.qb-preset.is-on { border-color: var(--qr31-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--qr31-brand) 14%, transparent); }
.qb-pthumb { width: 52px; height: 52px; display: block; }
.qb-pthumb svg { width: 100%; height: 100%; display: block; }
.qb-colors input[type=color] { width: 100%; height: 42px; padding: 2px; border: 1px solid #d8d8e0; border-radius: 10px; background: #fff; }
.qb-out { border-top: 1px solid var(--qr31-line); margin-top: 16px; padding-top: 14px; }
.qb-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.qb-chip { position: relative; cursor: pointer; }
.qb-chip input { position: absolute; opacity: 0; inset: 0; }
.qb-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border: 1.5px solid var(--qr31-line); border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; }
.qb-chip input:checked + span { border-color: var(--qr31-brand); background: color-mix(in srgb, var(--qr31-brand) 8%, #fff); color: var(--qr31-ink); }
.qb-chip input:focus-visible + span { outline: 2px solid var(--qr31-brand); outline-offset: 2px; }
.qb-chip.is-off { cursor: not-allowed; }
.qb-chip.is-off span { background: var(--qr31-soft); color: var(--qr31-muted); border-style: dashed; }
.qb-sizemode button { min-height: 40px; }

/* step 4: review */
.qb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.qb-kpis > div { background: var(--qr31-soft); border-radius: 12px; padding: 10px 12px; }
.qb-kpis b { display: block; font-size: 22px; line-height: 1.2; }
.qb-kpis span { font-size: 13px; color: var(--qr31-muted); }
.qb-kpis .is-bad { background: #fdecec; }
.qb-kpis .is-bad b { color: #b42318; }
.qb-errors { background: #fdf0ee; border-radius: 12px; padding: 4px 14px 10px; margin-bottom: 14px; color: #7a1d14; font-size: 13px; }
.qb-errors ul { margin: 0; padding-left: 18px; max-height: 260px; overflow: auto; }
.qb-errors li { margin: 3px 0; word-break: break-word; }
.qb-review { border: 1px solid var(--qr31-line); border-radius: 14px; overflow: hidden; background: #fff; }
.qb-rh, .qb-r { display: grid; grid-template-columns: 52px 92px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--qr31-line); font-size: 13px; }
.qb-rh { border-top: 0; background: var(--qr31-soft); font-size: 12px; font-weight: 600; color: var(--qr31-muted); }
.qb-mreview .qb-rh, .qb-mreview .qb-r { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.3fr) 80px; }
.qb-r.is-bad { background: #fdf6f4; }
.qb-r-qr { width: 52px; height: 52px; display: block; background: var(--qr31-soft); border-radius: 8px; }
.qb-r-qr svg { width: 100%; height: 100%; display: block; }
.qb-r-n { color: var(--qr31-muted); font-size: 12px; }
.qb-r-name, .qb-r-dest { min-width: 0; overflow: hidden; }
.qb-r-name b, .qb-r-name small, .qb-r-dest { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-r-name small { color: var(--qr31-muted); font-size: 12px; }
.qb-r-dest em { display: block; font-style: normal; color: #b42318; white-space: normal; font-size: 12px; }
.qb-more { text-align: center; margin-top: 10px; }
@media (max-width: 640px) {
  .qb-rh { display: none; }
  .qb-r, .qb-mreview .qb-r { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "qr name" "qr dest" "qr kind"; row-gap: 2px; }
  .qb-mreview .qb-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name kind" "dest dest" "n n"; }
  .qb-r-qr { grid-area: qr; align-self: start; }
  .qb-r-name { grid-area: name; }
  .qb-r-dest { grid-area: dest; }
  .qb-r-kind { grid-area: kind; }
  .qb-r-n { display: none; }
  .qb-mreview .qb-r-n { display: block; grid-area: n; }
}

/* progress */
.qb-progress { border: 1px solid var(--qr31-line); border-radius: 14px; padding: 14px; background: #fff; margin: 12px 0; }
.qb-progress-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.qb-bar { height: 12px; border-radius: 999px; background: var(--qr31-soft); overflow: hidden; }
.qb-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--qr31-brand), #14c8e8); border-radius: inherit; transition: width .25s ease; }
.qb-progress-msg { font-size: 13px; color: var(--qr31-muted); margin: 8px 0; }
@media (prefers-reduced-motion: reduce) { .qb-bar i { transition: none; } }

.qb-result { border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.qb-result.is-ok { background: #e7f6ec; }
.qb-result.is-partial { background: #fff4dc; }
.qb-result h4 { margin: 0 0 6px; }
.qb-result p { margin: 0 0 6px; }
.qb-result .qr31-mini-grid figure { background: #fff; border-radius: 12px; padding: 6px; }
.qb-fail { font-size: 13px; padding-left: 18px; }

/* history */
.qb-hist { display: grid; gap: 10px; }
.qb-hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; border: 1px solid var(--qr31-line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.qb-hrow h4 { margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-hmain { min-width: 0; }
.qb-hmeta { margin: 2px 0 0; font-size: 12px; color: var(--qr31-muted); }
.qb-chips { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.qb-chips span { font-size: 11px; background: var(--qr31-soft); border-radius: 999px; padding: 2px 8px; }
.qb-hnums { display: flex; gap: 12px; font-size: 13px; color: var(--qr31-muted); }
.qb-hnums b { color: var(--qr31-ink); font-size: 15px; }
.qb-hnums .is-bad b { color: #b42318; }
.qb-hside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 760px) {
  .qb-hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .qb-hnums { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
  .qb-hside { grid-row: 1; grid-column: 2; }
}

/* QR codes list: Select mode */
.qb-selbtn[aria-pressed=true] { background: var(--qr31-ink); color: #fff !important; border-color: var(--qr31-ink); }
.qb-selecting .qr31-list [data-id] { position: relative; cursor: pointer; user-select: none; }
.qb-selecting .qr31-list [data-id] * { pointer-events: none; }
.qb-selecting .qr31-tile { outline: 2px solid transparent; transition: outline-color .12s; }
.qb-selecting .qr31-tile.is-selected { outline-color: var(--qr31-brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--qr31-brand) 16%, transparent); }
.qb-selecting .qr31-tr.is-selected { background: color-mix(in srgb, var(--qr31-brand) 8%, #fff); }
.qb-tick { position: absolute; z-index: 2; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #9aa3bb; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.qr31-tr .qb-tick { top: 50%; left: 6px; transform: translateY(-50%); width: 22px; height: 22px; }
.qb-selecting .qr31-tr { padding-left: 38px; }
.is-selected > .qb-tick { background: var(--qr31-brand); border-color: var(--qr31-brand); }
.is-selected > .qb-tick::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.qr31-tr.is-selected > .qb-tick::after { left: 5px; top: 1px; width: 6px; height: 11px; }
.qb-selbar { position: sticky; bottom: 10px; z-index: 30; margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; background: var(--qr31-ink); color: #fff; border-radius: 16px; box-shadow: 0 12px 30px rgba(11,26,58,.28); }
.qb-selinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; }
.qb-selinfo .qr31-link { color: #cfe0ff; min-height: 40px; }
.qb-selacts { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-selacts .qr31-btn { min-height: 40px; }
.qb-selacts .qr31-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.4); }
.qb-selacts .qr31-btn:disabled { opacity: .4; }
@media (max-width: 520px) { .qb-selacts { width: 100%; } .qb-selacts .qr31-btn { flex: 1 1 auto; } }
.qb-filter { margin: -6px 0 12px; font-size: 14px; background: color-mix(in srgb, var(--qr31-brand) 8%, #fff); border-radius: 10px; padding: 8px 12px; }

/* download dialog */
.qb-dl-prev { width: 120px; margin: 12px auto 0; }
.qb-dl-prev svg { width: 100%; height: auto; display: block; }

/* Visualead / QRStuff move */
.qb-mig-steps button { cursor: default; }
.qb-howto { background: var(--qr31-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.qb-map { border-radius: 12px; padding: 12px 14px; margin: 4px 0; }
.qb-map.is-ok { background: #e7f6ec; }
.qb-map.is-ask { background: #fff4dc; }
.qb-map p { margin: 0 0 8px; }
.qb-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; }
.qb-map-grid select { width: 100%; }
.qb-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.qb-howto-steps { padding-left: 20px; display: grid; gap: 8px; font-size: 14px; max-width: 76ch; }
.qb-track { margin-bottom: 12px; }
.qb-meter { background: var(--qr31-soft); border-radius: 14px; padding: 14px; }
.qb-meter b { font-size: 26px; display: block; }
.qb-meter span { color: var(--qr31-muted); font-size: 14px; display: block; margin-bottom: 8px; }
.qb-tlist { display: grid; gap: 6px; }
.qb-trow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--qr31-line); border-radius: 12px; padding: 6px 10px; background: #fff; }
.qb-tqr svg { width: 44px; height: 44px; display: block; }
.qb-tname { min-width: 0; }
.qb-tname b, .qb-tname small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-tname small { color: var(--qr31-muted); font-size: 12px; }
@media (max-width: 480px) { .qb-trow { grid-template-columns: 44px minmax(0, 1fr); } .qb-trow .qr31-pill { grid-column: 2; } }
.qb-moves { display: grid; gap: 6px; }
.qb-move { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--qr31-line); padding-top: 8px; }
.qb-move:first-child { border-top: 0; padding-top: 0; }
.qb-move span { min-width: 0; }
.qb-move small { display: block; color: var(--qr31-muted); font-size: 12px; }
.qb-old { margin-top: 6px; }
.qb-old > summary { padding: 0 4px; }

/* toasts never block a tap on the button underneath (on phones they sit over dialog footers),
   except toasts with their own button ("See add-ons", qr31-plans.css) */
.qr31-toast:not(.has-act) { pointer-events: none; }

/* Move from Visualead: old link → new link list */
.qb-vl { display: grid; gap: 8px; margin: 14px 0; }
.qb-vlrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--qr31-line, #e1e7f0); border-radius: 12px; background: #fff; }
.qb-vlrow .qb-tname small { display: block; color: var(--qr31-muted, #56607a); font-size: 12px; overflow-wrap: anywhere; }
.qb-vlnew { font-weight: 600; color: var(--qr31-ink, #0b1a3a); overflow-wrap: anywhere; font-size: 13px; }
@media (max-width: 640px) { .qb-vlrow { grid-template-columns: minmax(0, 1fr); } }
