/* scan.css — desktop pairing/summary + mobile scanner UI */

/* ── Comune ────────────────────────────────────────────────── */
.rbz-scan-desktop, .rbz-scan-mobile {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  color: var(--rbz-text, #0a1628);
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.rbz-btn-primary, .rbz-btn-secondary {
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 10px;
  transition: transform 0.1s, opacity 0.15s;
}
.rbz-btn-primary {
  background: var(--rbz-orange, #ff5a1f);
  color: #fff;
}
.rbz-btn-secondary {
  background: rgba(10, 22, 40, 0.08);
  color: var(--rbz-text, #0a1628);
}
.rbz-btn-primary:hover, .rbz-btn-secondary:hover { opacity: 0.9; }
.rbz-btn-primary:active, .rbz-btn-secondary:active { transform: translateY(1px); }
.rbz-btn-primary:disabled { opacity: 0.6; cursor: wait; }

.rbz-scan-flash {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 10px;
  background: #0a1628;
  color: #fff;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  max-width: 90vw;
}
.rbz-flash-ok  { background: #16a34a; }
.rbz-flash-err { background: #dc2626; }
.rbz-flash-warn{ background: #ea580c; }

.rbz-warn {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 0.92rem;
}
.rbz-scan-notice {
  max-width: 700px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}
.rbz-scan-notice-err {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.rbz-pair-status {
  margin-top: 12px;
  padding: 10px 14px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 0.88rem;
  text-align: center;
}

/* ── Desktop ───────────────────────────────────────────────── */
.rbz-scan-head h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 2rem;
  margin: 0 0 6px;
}
.rbz-scan-sub { color: rgba(10, 22, 40, 0.7); margin: 0 0 28px; font-size: 1.05rem; }

.rbz-pair-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.05);
}
.rbz-pair-qr { text-align: center; }
#rbz-qr {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  border: 1px solid rgba(10, 22, 40, 0.08);
  min-height: 280px;
  min-width: 280px;
}
.rbz-qr-loading, .rbz-qr-err {
  padding: 120px 20px;
  color: rgba(10, 22, 40, 0.5);
  font-style: italic;
}
.rbz-qr-err { color: #dc2626; }
.rbz-pair-hint { margin: 16px 0 4px; font-size: 0.95rem; color: rgba(10,22,40,0.7); }
.rbz-pair-url { font-size: 0.78rem; word-break: break-all; margin: 8px 0 16px; }
.rbz-pair-url a { color: var(--rbz-orange, #ff5a1f); text-decoration: none; }

.rbz-pair-steps h3 { margin: 0 0 14px; font-family: 'Archivo Black', sans-serif; font-size: 1.2rem; }
.rbz-pair-steps ol { padding-left: 22px; line-height: 1.8; }
.rbz-pair-steps li { margin-bottom: 4px; }
.rbz-pair-steps em { color: var(--rbz-orange, #ff5a1f); font-style: normal; font-weight: 700; }

/* Live progress */
.rbz-scan-live {
  margin-top: 32px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(10, 22, 40, 0.1);
}
.rbz-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.rbz-live-head h2 { margin: 0; font-family: 'Archivo Black', sans-serif; font-size: 1.4rem; }
.rbz-live-counter {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rbz-counter-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 2.2rem;
  color: var(--rbz-orange, #ff5a1f);
  line-height: 1;
}
.rbz-counter-label { color: rgba(10,22,40,0.6); font-size: 0.9rem; }

.rbz-live-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.rbz-live-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 22, 40, 0.03);
  border-radius: 10px;
  padding: 8px 12px 8px 8px;
}
.rbz-live-item img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}
.rbz-live-meta { flex: 1; min-width: 0; }
.rbz-live-meta strong { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbz-live-meta span { color: rgba(10,22,40,0.55); font-size: 0.8rem; }
.rbz-live-qty {
  font-family: 'Archivo Black', sans-serif;
  background: var(--rbz-orange, #ff5a1f);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}
.rbz-live-empty { color: rgba(10,22,40,0.5); font-style: italic; padding: 20px; text-align: center; }

/* Summary table */
.rbz-scan-summary { margin-top: 32px; background: #fff; border-radius: 16px; padding: 24px; border: 1px solid rgba(10,22,40,0.1); }
.rbz-scan-summary h2 { margin: 0 0 6px; font-family: 'Archivo Black', sans-serif; }
.rbz-sum-hint { color: rgba(10,22,40,0.7); margin: 0 0 16px; }
.rbz-sum-table-wrap { overflow-x: auto; }
.rbz-sum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.rbz-sum-table thead th {
  text-align: left;
  padding: 10px 8px;
  background: rgba(10, 22, 40, 0.04);
  border-bottom: 2px solid rgba(10,22,40,0.08);
  font-weight: 700;
  font-size: 0.85rem;
}
.rbz-sum-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(10,22,40,0.06);
  vertical-align: middle;
}
.rbz-sum-card { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.rbz-sum-card img { width: 40px; height: 56px; object-fit: cover; border-radius: 4px; background: #eee; }
.rbz-sum-card strong { display: block; }
.rbz-sum-card span { color: rgba(10,22,40,0.55); font-size: 0.8rem; }
.rbz-sum-table input[type=number],
.rbz-sum-table select {
  padding: 6px 8px;
  border: 1px solid rgba(10,22,40,0.15);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
}
.rbz-sum-table input[type=number] { width: 80px; }
.rbz-sum-price { display: flex; align-items: center; gap: 6px; }
.rbz-price-src {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.rbz-src-ebay { background: #fef3c7; color: #92400e; }
.rbz-src-cm   { background: #dbeafe; color: #1e40af; }
.rbz-src-none { background: #fee2e2; color: #991b1b; }
.rbz-sum-sell { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.85rem; }
.rbz-sum-del {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: none;
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
}
.rbz-sum-del:hover { background: #dc2626; color: #fff; }
.rbz-sum-na { color: rgba(10,22,40,0.4); }
.rbz-sum-empty { padding: 30px; text-align: center; color: rgba(10,22,40,0.5); }
.rbz-sum-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

.rbz-scan-gate {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(10,22,40,0.08);
}
.rbz-scan-gate h2 { font-family: 'Archivo Black', sans-serif; }

/* ── Mobile ────────────────────────────────────────────────── */
.rbz-scan-mobile {
  padding: 12px;
  max-width: 100%;
  min-height: 100vh;
  /* Disabilita menu contestuali iOS/Android su long-press, selezione testo,
     callout, e tap highlight. Lo scanner è un'app, non un documento. */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.rbz-scan-mobile * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* Eccezione: input testuale per la ricerca manuale */
.rbz-scan-mobile input[type=text] {
  -webkit-user-select: text;
  user-select: text;
}
/* Video: blocca picture-in-picture e drag */
#rbz-m-video {
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}
.rbz-m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.rbz-m-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.rbz-m-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.8rem;
  color: var(--rbz-orange, #ff5a1f);
  line-height: 1;
}
.rbz-m-label { color: rgba(10,22,40,0.6); font-size: 0.85rem; }
.rbz-m-finish {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.rbz-m-stage {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

/* Search input principale (manual-first UX) */
.rbz-m-search-main {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.rbz-m-search-main input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--rbz-orange, #ff5a1f);
  border-radius: 10px;
  font-size: 1.05rem;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.rbz-m-search-main input:focus {
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.2);
}
.rbz-m-search-main ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  max-height: 50vh;
  overflow-y: auto;
}
.rbz-m-search-main li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(10,22,40,0.03);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.rbz-m-search-main li img {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.rbz-m-search-main .rbz-m-search-meta { flex: 1; min-width: 0; }
.rbz-m-search-main .rbz-m-search-meta strong { display: block; font-size: 0.95rem; }
.rbz-m-search-main .rbz-m-search-meta span {
  color: rgba(10,22,40,0.55);
  font-size: 0.78rem;
}
.rbz-m-add-btn {
  background: var(--rbz-orange, #ff5a1f);
  color: #fff;
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* Recent additions */
.rbz-m-recent {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.rbz-m-recent-label {
  font-size: 0.72rem;
  color: rgba(10,22,40,0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.rbz-m-recent-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.rbz-m-recent-card {
  flex-shrink: 0;
  background: rgba(255, 90, 31, 0.08);
  border: 1px solid rgba(255, 90, 31, 0.25);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 70px;
  font-family: inherit;
}
.rbz-m-recent-card img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}
.rbz-m-recent-card span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rbz-orange, #ff5a1f);
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Camera toggle */
.rbz-m-cam-toggle {
  text-align: center;
  margin-bottom: 12px;
}
.rbz-m-cam-toggle button {
  background: rgba(10,22,40,0.05);
  color: rgba(10,22,40,0.7);
  border: 1px dashed rgba(10,22,40,0.2);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}

.rbz-m-start {
  text-align: center;
  padding: 40px 24px;
}
.rbz-m-go-btn {
  background: var(--rbz-orange, #ff5a1f);
  color: #fff;
  border: none;
  padding: 18px 32px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin: 16px 0;
  font-family: inherit;
}
.rbz-m-tip { color: rgba(10,22,40,0.55); font-size: 0.85rem; }

.rbz-m-camera {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
}
.rbz-m-camera::after {
  content: '👆 Tappa qui per scattare';
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 4;
}
#rbz-m-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Code scanner: piccolo rettangolo orizzontale tipo barcode reader.
   L'utente avvicina la carta al telefono finché il codice (es. "OGN 001/298")
   non riempie questo riquadro. */
/* Card-shaped guide (~5:7 aspect, intera carta Riftbound) */
.rbz-m-roi {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  aspect-ratio: 5 / 7;
  border: 3px solid rgba(255, 90, 31, 0.95);
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
}
.rbz-m-roi::before {
  content: 'RIEMPI CON LA CARTA';
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  white-space: nowrap;
}
.rbz-m-roi::after {
  content: 'Banner nome nel rettangolo giallo grande, codice nel piccolo';
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  white-space: nowrap;
  text-align: center;
}
/* Sub-strisce visive: indicano dove leggo nome (banner) + codice (bottom-left).
   L'utente deve far coincidere il banner Vilemaw col rettangolo nome, e
   "UNL · 060/219" col rettangolo codice. */
.rbz-m-roi-name,
.rbz-m-roi-code {
  position: absolute;
  border: 2px dashed rgba(255, 200, 0, 0.85);
  background: rgba(255, 200, 0, 0.10);
  pointer-events: none;
}
.rbz-m-roi-name {
  left: 3%; right: 7%;
  top: 63%; height: 8%;
}
.rbz-m-roi-code {
  left: 4%;
  top: 94%; height: 4%;
  width: 42%;
}
.rbz-m-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
}

.rbz-m-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  gap: 12px;
  background: #fff;
}
.rbz-m-shoot {
  flex: 1;
  background: var(--rbz-orange, #ff5a1f);
  color: #fff;
  border: none;
  padding: 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rbz-m-shoot:disabled { opacity: 0.6; }
.rbz-m-link {
  background: none;
  border: none;
  color: var(--rbz-orange, #ff5a1f);
  text-decoration: underline;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
}

.rbz-m-search {
  padding: 12px;
  background: #fff;
  border-top: 1px solid rgba(10,22,40,0.1);
}
.rbz-m-search input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(10,22,40,0.2);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.rbz-m-search ul, .rbz-m-results ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.rbz-m-search li, .rbz-m-results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(10,22,40,0.03);
  cursor: pointer;
}
.rbz-m-search li img, .rbz-m-results li img {
  width: 38px; height: 53px; object-fit: cover; border-radius: 4px;
}
.rbz-m-search-meta, .rbz-m-cand-meta { flex: 1; }
.rbz-m-search-meta strong, .rbz-m-cand-meta strong { display: block; font-size: 0.95rem; }
.rbz-m-search-meta span, .rbz-m-cand-meta span { color: rgba(10,22,40,0.55); font-size: 0.78rem; }

/* Preview auto-scan */
.rbz-m-freeze {
  padding: 16px;
  background: #fff;
  border-top: 3px solid var(--rbz-orange, #ff5a1f);
  text-align: center;
}
.rbz-m-freeze h3 {
  margin: 0 0 10px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1rem;
}
.rbz-m-freeze img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  margin-bottom: 10px;
}
.rbz-m-freeze-hint {
  font-size: 0.82rem;
  color: rgba(10,22,40,0.6);
  margin: 0 0 12px;
}
.rbz-m-freeze-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rbz-m-preview {
  padding: 16px;
  background: #fff;
  border-top: 3px solid var(--rbz-orange, #ff5a1f);
}
.rbz-m-preview h3 {
  margin: 0 0 14px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.15rem;
  text-align: center;
}
.rbz-m-preview-top {
  margin-bottom: 12px;
}
.rbz-m-prev-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(255, 90, 31, 0.08);
  padding: 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 90, 31, 0.4);
}
.rbz-m-prev-card img {
  width: 60px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  flex-shrink: 0;
}
.rbz-m-variants {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 90, 31, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 90, 31, 0.2);
}
.rbz-m-variants-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(10,22,40,0.7);
  margin-bottom: 6px;
  font-weight: 600;
}
.rbz-m-variants-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rbz-m-variant-btn {
  flex: 1;
  min-width: 70px;
  padding: 8px 10px;
  border: 2px solid rgba(10,22,40,0.15);
  background: #fff;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--rbz-text, #0a1628);
}
.rbz-m-variant-btn.active {
  background: var(--rbz-orange, #ff5a1f);
  color: #fff;
  border-color: var(--rbz-orange, #ff5a1f);
}
.rbz-m-foil {
  margin-top: 8px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(59, 130, 246, 0.06));
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.rbz-m-foil-btn {
  flex: 1;
  min-width: 90px;
  padding: 10px 12px;
  border: 2px solid rgba(10,22,40,0.15);
  background: #fff;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--rbz-text, #0a1628);
}
.rbz-m-foil-btn.active {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #fff;
  border-color: #a855f7;
}
.rbz-m-no-match {
  padding: 14px;
  background: rgba(220, 38, 38, 0.08);
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  text-align: center;
  color: #991b1b;
  font-weight: 600;
}
.rbz-m-prev-meta { flex: 1; min-width: 0; }
.rbz-m-prev-meta strong {
  display: block;
  font-size: 1.05rem;
  font-family: 'Archivo Black', sans-serif;
  margin-bottom: 4px;
}
.rbz-m-prev-meta span {
  display: block;
  color: rgba(10,22,40,0.6);
  font-size: 0.82rem;
}
.rbz-m-ocr-debug {
  margin-top: 4px;
  font-family: monospace;
  font-size: 0.72rem;
  color: rgba(10,22,40,0.5);
}
.rbz-m-preview-alts { margin: 0 0 14px; }
.rbz-m-alts-label {
  font-size: 0.78rem;
  color: rgba(10,22,40,0.55);
  margin: 6px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rbz-m-preview-alts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rbz-m-preview-alts li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(10,22,40,0.04);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.rbz-m-preview-alts img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}
.rbz-m-preview-alts strong { display: block; font-size: 0.9rem; }
.rbz-m-preview-alts span { color: rgba(10,22,40,0.55); font-size: 0.78rem; }

/* Inline search box mostrato quando il match e' low_confidence */
.rbz-m-lowconf-search {
  margin-top: 12px;
  padding: 10px 8px 12px;
  background: rgba(228, 122, 23, 0.08);
  border: 1px solid rgba(228, 122, 23, 0.25);
  border-radius: 10px;
}
.rbz-m-lowconf-msg {
  font-size: 0.82rem;
  color: rgba(10,22,40,0.78);
  margin: 0 0 8px;
  font-weight: 600;
}
.rbz-m-inline-search {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.92rem;
  border: 1px solid rgba(10,22,40,0.18);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.rbz-m-inline-search:focus {
  outline: none;
  border-color: rgba(228, 122, 23, 0.7);
}
.rbz-m-inline-results {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  max-height: 240px;
  overflow-y: auto;
}
.rbz-m-inline-results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(10,22,40,0.04);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.rbz-m-inline-results img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}
.rbz-m-inline-results strong { display: block; font-size: 0.9rem; }
.rbz-m-inline-results span { color: rgba(10,22,40,0.55); font-size: 0.78rem; }

.rbz-m-preview-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
  margin-top: 8px;
}
.rbz-m-confirm,
.rbz-m-retry,
.rbz-m-newscan {
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.rbz-m-confirm {
  background: #16a34a;
  color: #fff;
}
.rbz-m-retry {
  background: #f59e0b;
  color: #fff;
}
.rbz-m-newscan {
  background: rgba(10, 22, 40, 0.08);
  color: var(--rbz-text, #0a1628);
}

.rbz-m-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #0a1628;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  max-width: 90vw;
}
.rbz-m-toast-ok   { background: #16a34a; }
.rbz-m-toast-err  { background: #dc2626; }
.rbz-m-toast-warn { background: #ea580c; }

.rbz-m-done, .rbz-m-expired {
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border-radius: 12px;
}
.rbz-m-done h2 { color: #16a34a; font-family: 'Archivo Black', sans-serif; }
.rbz-m-expired h2 { color: #dc2626; font-family: 'Archivo Black', sans-serif; }
.rbz-m-count { color: rgba(10,22,40,0.6); margin-top: 8px; }

/* Mobile breakpoints */
@media (max-width: 768px) {
  .rbz-pair-grid { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  #rbz-qr { min-width: 240px; min-height: 240px; }
  .rbz-scan-head h1 { font-size: 1.5rem; }
  .rbz-sum-card { min-width: 180px; }
  .rbz-sum-table { font-size: 0.82rem; }
}
