/* Vendor Listing Builder (.vlb-*) — V1 (spine).
 *
 * Visual language + structure copied from public/css/evriClaimGen.css (.ecg-): the
 * house-standard member of the teal-blue family (the only one on the 1180px
 * breakpoint, with full dark mode). Same tokens (#0588b6 primary, #03658e dark,
 * 1.5px borders, 11-19px radii, soft shadow). Renamed to .vlb-.
 *
 * Two rules kept from the .ecg- source:
 *   1. Mobile rules live ONLY inside @media (max-width:1180px). Desktop unchanged.
 *   2. Dark mode covers every surface introduced here.
 */

:root {
  --vlb-primary: #0588b6;
  --vlb-primary-d: #03658e;
  --vlb-grad: linear-gradient(135deg, #03658e, #0588b6);
  --vlb-ink: #0f2740;
  --vlb-sub: #5b7183;
  --vlb-line: #e6edf5;
  --vlb-line-s: #cfdcea;
  --vlb-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --vlb-ok: #0f7b52;
  --vlb-warn: #9a6700;
  --vlb-bad: #b42318;
  --vlb-card: #fff;
  --vlb-bg-soft: #f6f9fc;
}

.vlb-wrap { max-width: 1180px; margin: 0 auto; padding: 6px 4px 44px; }

/* ---------- Head ---------- */
.vlb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 4px 0 16px; }
.vlb-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--vlb-primary); }
.vlb-title { font-size: 25px; font-weight: 800; color: var(--vlb-ink); margin: 4px 0; line-height: 1.15; }
.vlb-sub { font-size: 13.5px; color: var(--vlb-sub); margin: 0; max-width: 680px; line-height: 1.5; }
.vlb-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Mode pill */
.vlb-mode { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; padding: 5px 12px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.vlb-mode.live { color: var(--vlb-ok); background: #eaf7f1; border-color: #bde3d1; }
.vlb-mode.sample { color: var(--vlb-warn); background: #fff8e6; border-color: #f2dda0; }
.vlb-mode.off { color: var(--vlb-bad); background: #fdf1f0; border-color: #f1c9c5; }

/* ---------- Cards ---------- */
.vlb-card { background: var(--vlb-card); border: 1.5px solid var(--vlb-line); border-radius: 18px; box-shadow: var(--vlb-shadow); padding: 18px; margin-bottom: 16px; }
.vlb-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.vlb-card-head h3 { font-size: 15.5px; font-weight: 800; color: var(--vlb-ink); margin: 0; }
.vlb-card-head .vlb-spacer { flex: 1; }
.vlb-card-sub { font-size: 12.5px; color: var(--vlb-sub); margin: -4px 0 12px; line-height: 1.5; }

/* ---------- Buttons ---------- */
.vlb-btn { appearance: none; border: 1.5px solid var(--vlb-line-s); background: #fff; color: #21506f; font-size: 13px; font-weight: 700; padding: 9px 15px; border-radius: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: .15s; text-decoration: none; }
.vlb-btn:hover:not(:disabled) { border-color: var(--vlb-primary); color: var(--vlb-primary); }
.vlb-btn.primary { border: none; color: #fff; background: var(--vlb-grad); box-shadow: 0 8px 18px rgba(5, 136, 182, .28); }
.vlb-btn.primary:hover:not(:disabled) { color: #fff; filter: brightness(1.06); }
/* Background MUST be stated here — polish.css:429 `button.danger{background:#b42318}`
   is (0,1,1) and would otherwise paint red-on-red (see evriClaimGen.css:87-94). */
.vlb-btn.danger { background: #fff; border-color: #f1c9c5; color: var(--vlb-bad); }
.vlb-btn.danger:hover:not(:disabled) { background: #fdf1f0; border-color: var(--vlb-bad); color: var(--vlb-bad); }
.vlb-btn:disabled { opacity: .5; cursor: not-allowed; }
.vlb-btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }

/* ---------- Inputs ---------- */
.vlb-field { margin-bottom: 13px; }
.vlb-label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--vlb-sub); margin-bottom: 5px; }
.vlb-label .req { color: var(--vlb-bad); margin-left: 3px; }
.vlb-inp, .vlb-textarea, .vlb-select {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--vlb-line-s); border-radius: 11px;
  padding: 9px 12px; font-size: 13.5px; font-family: inherit; color: var(--vlb-ink); background: #fff; transition: .15s;
}
.vlb-inp:focus, .vlb-textarea:focus, .vlb-select:focus { outline: none; border-color: var(--vlb-primary); box-shadow: 0 0 0 3px rgba(5, 136, 182, .13); }
.vlb-textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
.vlb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vlb-hint { font-size: 12px; color: var(--vlb-sub); margin-top: 5px; line-height: 1.45; }

/* ---------- Status panel (plain English rows) ---------- */
.vlb-status-rows { display: flex; flex-direction: column; gap: 0; }
.vlb-srow { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--vlb-line); flex-wrap: wrap; }
.vlb-srow:last-child { border-bottom: none; }
.vlb-srow-l { flex: 0 0 190px; font-size: 12.5px; font-weight: 800; color: var(--vlb-ink); }
.vlb-srow-b { flex: 1; min-width: 200px; font-size: 12.5px; color: var(--vlb-sub); line-height: 1.5; }
.vlb-srow-b strong { color: var(--vlb-ink); font-weight: 700; }
.vlb-next { display: block; margin-top: 4px; font-size: 12px; color: var(--vlb-primary-d); }
.vlb-next::before { content: "\2192  "; font-weight: 800; }

/* ---------- Chips ---------- */
.vlb-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.vlb-chip.ok { color: var(--vlb-ok); background: #eaf7f1; border-color: #bde3d1; }
.vlb-chip.warn { color: var(--vlb-warn); background: #fff8e6; border-color: #f2dda0; }
.vlb-chip.bad { color: var(--vlb-bad); background: #fdf1f0; border-color: #f1c9c5; }
.vlb-chip.neutral { color: #41607d; background: var(--vlb-bg-soft); border-color: var(--vlb-line-s); }

/* ---------- Table (vendor codes) ---------- */
.vlb-tablewrap { overflow-x: auto; border: 1.5px solid var(--vlb-line); border-radius: 13px; -webkit-overflow-scrolling: touch; }
.vlb-table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 12.5px; }
.vlb-table th { text-align: left; padding: 9px 12px; background: var(--vlb-bg-soft); color: var(--vlb-ink); font-weight: 800; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1.5px solid var(--vlb-line); white-space: nowrap; position: sticky; top: 0; }
.vlb-table td { padding: 9px 12px; border-bottom: 1px solid var(--vlb-line); color: var(--vlb-ink); vertical-align: middle; }
.vlb-table tbody tr:hover td { background: #f3f9fc; }
.vlb-table tr.inactive td { color: #7d90a5; }
.vlb-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .02em; }
.vlb-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vlb-disclosure { margin-top: 12px; }
.vlb-disclosure summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--vlb-ink); list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; }
.vlb-disclosure summary::-webkit-details-marker { display: none; }
.vlb-disclosure summary::before { content: "\25B8"; color: var(--vlb-primary); transition: .15s; }
.vlb-disclosure[open] summary::before { transform: rotate(90deg); }

/* ---------- Skeletons ---------- */
.vlb-skel { border: 1.5px solid var(--vlb-line); border-radius: 14px; padding: 15px; background: #fff; }
.vlb-skel-l { height: 11px; border-radius: 6px; background: linear-gradient(90deg, #eef3f8 25%, #e2eaf3 37%, #eef3f8 63%); background-size: 400% 100%; animation: vlb-sheen 1.3s ease infinite; margin-bottom: 8px; }
.vlb-skel-l.s { width: 40%; } .vlb-skel-l.m { width: 68%; } .vlb-skel-l.w { width: 88%; }
@keyframes vlb-sheen { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .vlb-skel-l { animation: none; } }

/* ---------- Empty / error states ---------- */
.vlb-empty { text-align: center; padding: 30px 18px; color: var(--vlb-sub); }
.vlb-empty-ico { font-size: 28px; margin-bottom: 8px; }
.vlb-empty h4 { margin: 0 0 6px; font-size: 15px; color: var(--vlb-ink); font-weight: 800; }
.vlb-empty p { margin: 0 auto; font-size: 13px; line-height: 1.55; max-width: 460px; }
.vlb-error { border: 1.5px solid #f1c9c5; background: #fdf1f0; border-radius: 13px; padding: 13px 15px; }
.vlb-error h4 { margin: 0 0 6px; font-size: 13.5px; font-weight: 800; color: var(--vlb-bad); }
.vlb-error p { margin: 0 0 6px; font-size: 12.5px; color: #7a2b23; line-height: 1.5; }
.vlb-error .vlb-still { color: var(--vlb-ink); }
.vlb-tech { margin-top: 8px; }
.vlb-tech summary { cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--vlb-sub); list-style: none; }
.vlb-tech summary::-webkit-details-marker { display: none; }
.vlb-tech pre { margin: 6px 0 0; font-size: 11px; background: var(--vlb-bg-soft); border: 1px solid var(--vlb-line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; color: var(--vlb-ink); white-space: pre-wrap; word-break: break-word; }

/* ---------- Banner ---------- */
.vlb-banner { border: 1.5px solid var(--vlb-line-s); background: #eef7fb; color: #21506f; border-radius: 13px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; line-height: 1.45; }
.vlb-banner.warn { border-color: #f2dda0; background: #fff8e6; color: #7a5200; }
.vlb-banner.bad { border-color: #f1c9c5; background: #fdf1f0; color: var(--vlb-bad); }

/* ---------- Modal (add / edit vendor code) ---------- */
.vlb-modal { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: center; justify-content: center; padding: 18px; }
.vlb-modal-bg { position: absolute; inset: 0; background: rgba(9, 24, 40, .5); backdrop-filter: blur(2px); }
.vlb-modal-shell { position: relative; background: #fff; border-radius: 19px; width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 26px 70px rgba(9, 24, 40, .3); overflow: hidden; }
.vlb-modal-head { display: flex; align-items: center; gap: 12px; padding: 15px 19px; border-bottom: 1.5px solid var(--vlb-line); }
.vlb-modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--vlb-ink); flex: 1; }
.vlb-modal-body { padding: 17px 19px; overflow-y: auto; }
.vlb-modal-foot { display: flex; gap: 9px; justify-content: flex-end; padding: 13px 19px; border-top: 1.5px solid var(--vlb-line); flex-wrap: wrap; }
.vlb-x { appearance: none; border: none; background: none; font-size: 22px; line-height: 1; color: var(--vlb-sub); cursor: pointer; padding: 0 4px; }
.vlb-x:hover { color: var(--vlb-ink); }
.vlb-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--vlb-ink); margin-bottom: 11px; cursor: pointer; }
.vlb-check input { width: 17px; height: 17px; }

/* ---------- Toast ---------- */
.vlb-toast { position: fixed; right: 18px; bottom: 18px; z-index: 7000; background: #10314c; color: #fff; font-size: 13px; padding: 11px 15px; border-radius: 11px; box-shadow: 0 12px 30px rgba(9, 26, 43, .3); max-width: 360px; }
.vlb-toast.ok { background: #14795a; } .vlb-toast.err { background: #b23a32; }

/* ================= DARK MODE ================= */
html[data-theme="dark"] {
  --vlb-ink: #e6edf6; --vlb-sub: #9fb0c4; --vlb-line: #243049; --vlb-line-s: #2f3d5a;
  --vlb-card: #161f33; --vlb-bg-soft: #1a2438; --vlb-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .vlb-card,
html[data-theme="dark"] .vlb-skel,
html[data-theme="dark"] .vlb-modal-shell { background: #161f33; }
html[data-theme="dark"] .vlb-btn { background: #1d2941; border-color: #2f3d5a; color: #cfdcea; }
html[data-theme="dark"] .vlb-btn:hover:not(:disabled) { border-color: #6fc7e6; color: #6fc7e6; }
html[data-theme="dark"] .vlb-btn.primary { color: #fff; }
html[data-theme="dark"] .vlb-btn.danger { background: #1d2941; border-color: #5b2a26; color: #f5a29a; }
html[data-theme="dark"] .vlb-inp, html[data-theme="dark"] .vlb-textarea, html[data-theme="dark"] .vlb-select { background: #1a2438; border-color: #2f3d5a; color: #e6edf6; }
html[data-theme="dark"] .vlb-chip.ok { color: #7ddcae; background: #10301f; border-color: #1d5237; }
html[data-theme="dark"] .vlb-chip.warn, html[data-theme="dark"] .vlb-mode.sample { color: #e3c06a; background: #2c2413; border-color: #4a3d1c; }
html[data-theme="dark"] .vlb-chip.bad, html[data-theme="dark"] .vlb-mode.off { color: #f5a29a; background: #2a1616; border-color: #5b2a26; }
html[data-theme="dark"] .vlb-chip.neutral { color: #b8c6d8; background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-mode.live { color: #7ddcae; background: #10301f; border-color: #1d5237; }
html[data-theme="dark"] .vlb-tablewrap { border-color: #243049; }
html[data-theme="dark"] .vlb-table th { background: #1a2438; color: #e6edf6; border-color: #243049; }
html[data-theme="dark"] .vlb-table td { border-color: #243049; color: #e6edf6; }
html[data-theme="dark"] .vlb-table tbody tr:hover td { background: #1d2941; }
html[data-theme="dark"] .vlb-srow { border-color: #243049; }
html[data-theme="dark"] .vlb-banner { background: #14283a; border-color: #244152; color: #b7d3e2; }
html[data-theme="dark"] .vlb-banner.warn { background: #2c2413; border-color: #4a3d1c; color: #e3c06a; }
html[data-theme="dark"] .vlb-banner.bad, html[data-theme="dark"] .vlb-error { background: #2a1616; border-color: #5b2a26; }
html[data-theme="dark"] .vlb-error p { color: #f5b3ac; }
html[data-theme="dark"] .vlb-tech pre { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-modal-head, html[data-theme="dark"] .vlb-modal-foot { border-color: #243049; }
html[data-theme="dark"] .vlb-modal-bg { background: rgba(0, 0, 0, .62); }
html[data-theme="dark"] .vlb-skel-l { background: linear-gradient(90deg, #1d2941 25%, #243049 37%, #1d2941 63%); background-size: 400% 100%; }

/* ================= MOBILE (additive only, gated at 1180px) ================= */
@media (max-width: 1180px) {
  .vlb-wrap { padding: 4px 2px 40px; }
  .vlb-title { font-size: 21px; }
  .vlb-card { padding: 14px; border-radius: 15px; }
  .vlb-row2 { grid-template-columns: 1fr; }
  .vlb-head { flex-direction: column; gap: 11px; }
  .vlb-head-actions { width: 100%; }
  .vlb-srow-l { flex-basis: 100%; }
  .vlb-table { min-width: 640px; }
  .vlb-tablewrap { border-radius: 11px; }
  .vlb-modal { padding: 0; align-items: flex-end; }
  .vlb-modal-shell { width: 100%; max-height: 94vh; border-radius: 19px 19px 0 0; }
  .vlb-modal-foot { position: sticky; bottom: 0; background: #fff; }
  .vlb-modal-foot .vlb-btn { flex: 1; justify-content: center; }
  .vlb-btn { min-height: 40px; }
  .vlb-inp, .vlb-select, .vlb-textarea { min-height: 40px; }
}
html[data-theme="dark"] .vlb-modal-foot { background: #161f33; }

/* ===========================================================================
   V2 — the five-tab form. Structure mirrors Vendor Central ABIS; styling is ours.
   =========================================================================== */

.vlb-linkbtn { appearance: none; background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--vlb-primary); text-decoration: underline; cursor: pointer; text-align: left; }
.vlb-linkbtn:hover { color: var(--vlb-primary-d); }
.vlb-inp-sm { padding: 6px 10px; font-size: 12.5px; }
.vlb-thumb { width: 30px; height: 30px; border-radius: 8px; background: var(--vlb-bg-soft); border: 1px solid var(--vlb-line); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.vlb-save { font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }

details.vlb-collapse > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 9px; }
details.vlb-collapse > summary::-webkit-details-marker { display: none; }
details.vlb-collapse > summary::before { content: "\25B8"; color: var(--vlb-primary); transition: .15s; }
details.vlb-collapse[open] > summary::before { transform: rotate(90deg); }
details.vlb-collapse > summary h3 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--vlb-ink); }
details.vlb-collapse > div { margin-top: 13px; }

.vlb-prov { font-size: 12px; color: var(--vlb-sub); margin: -6px 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.5; }

.vlb-editor { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.vlb-rail { position: sticky; top: 8px; background: var(--vlb-card); border: 1.5px solid var(--vlb-line); border-radius: 14px; padding: 14px; box-shadow: var(--vlb-shadow); }
.vlb-rail-t { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vlb-sub); margin-bottom: 9px; }
.vlb-radio { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--vlb-ink); margin-bottom: 7px; cursor: pointer; }
.vlb-radio input { width: 16px; height: 16px; }
.vlb-meter { margin-top: 13px; border-top: 1.5px solid var(--vlb-line); padding-top: 11px; }
.vlb-meter-overall { font-size: 12.5px; font-weight: 800; color: var(--vlb-ink); margin-bottom: 8px; }
.vlb-meter-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--vlb-sub); padding: 2px 0; }
.vlb-meter-note { font-size: 11px; color: var(--vlb-sub); margin-top: 8px; line-height: 1.4; }

.vlb-formcol { min-width: 0; }

.vlb-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--vlb-line); margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vlb-tab { appearance: none; background: none; border: none; border-bottom: 2.5px solid transparent; padding: 10px 14px; font-size: 13.5px; font-weight: 700; color: var(--vlb-sub); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.vlb-tab:hover { color: var(--vlb-primary); }
.vlb-tab.active { color: var(--vlb-ink); border-bottom-color: var(--vlb-primary); }
.vlb-tab-badge { background: #d61f4b; color: #fff; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }

.vlb-tabbody { display: flex; flex-direction: column; gap: 2px; }
.vlb-plain, .vlb-subgroup { display: flex; flex-direction: column; }
.vlb-subgroup { border: 1.5px solid var(--vlb-line); border-radius: 13px; padding: 13px 15px; margin: 8px 0; background: var(--vlb-bg-soft); }
.vlb-subgroup-t { font-size: 12.5px; font-weight: 800; color: var(--vlb-ink); margin-bottom: 9px; letter-spacing: .02em; }
.vlb-frow { display: grid; grid-template-columns: 210px 1fr; gap: 14px; align-items: start; padding: 9px 0; }
.vlb-fhead { padding-top: 8px; }
.vlb-flabel { font-size: 13px; font-weight: 700; color: var(--vlb-ink); display: inline-flex; align-items: center; gap: 5px; line-height: 1.4; }
.vlb-req { color: var(--vlb-bad); font-weight: 800; }
.vlb-help { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--vlb-line-s); font-size: 10px; color: var(--vlb-sub); cursor: help; }
.vlb-fbody { min-width: 0; }
.vlb-sublabel { font-size: 11px; font-weight: 700; color: var(--vlb-sub); margin-bottom: 4px; }
.vlb-inp.vlb-bad, .vlb-textarea.vlb-bad, .vlb-select.vlb-bad { border-color: var(--vlb-bad); }
.vlb-counter { font-size: 11px; color: var(--vlb-sub); margin-top: 3px; text-align: right; }

.vlb-selwrap { display: flex; align-items: center; gap: 6px; }
.vlb-selwrap .vlb-select { flex: 1; }
.vlb-x-sm { appearance: none; border: 1.5px solid var(--vlb-line-s); background: #fff; color: var(--vlb-sub); width: 30px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 16px; line-height: 1; flex: 0 0 auto; }
.vlb-x-sm:hover { border-color: var(--vlb-bad); color: var(--vlb-bad); }

.vlb-radios { display: flex; gap: 18px; padding-top: 6px; }

.vlb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vlb-pair-cell { min-width: 0; }
.vlb-subpanel { border: 1.5px solid var(--vlb-line); border-radius: 11px; padding: 11px 13px; background: var(--vlb-bg-soft); display: flex; flex-direction: column; gap: 4px; }
.vlb-subpanel .vlb-frow { grid-template-columns: 160px 1fr; }

.vlb-list { display: flex; flex-direction: column; gap: 8px; }
.vlb-listrow { display: flex; align-items: flex-start; gap: 8px; }
.vlb-listrow > :first-child { flex: 1; min-width: 0; }
.vlb-listobj > .vlb-pair { flex: 1; }
.vlb-addmore { appearance: none; background: none; border: none; padding: 2px 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--vlb-primary); cursor: pointer; align-self: flex-start; }
.vlb-addmore:hover { color: var(--vlb-primary-d); }

.vlb-condnote { font-size: 11px; color: var(--vlb-warn); margin-top: 4px; }

.vlb-pt-results { margin-top: 10px; max-height: 320px; overflow-y: auto; border: 1.5px solid var(--vlb-line); border-radius: 11px; }
.vlb-pt-item { padding: 10px 13px; border-bottom: 1px solid var(--vlb-line); cursor: pointer; }
.vlb-pt-item:last-child { border-bottom: none; }
.vlb-pt-item:hover { background: #eef7fb; }
.vlb-pt-name { font-size: 13.5px; font-weight: 700; color: var(--vlb-ink); }
.vlb-pt-ex { font-size: 11.5px; color: var(--vlb-sub); margin-top: 2px; }

html[data-theme="dark"] .vlb-rail { background: #161f33; }
html[data-theme="dark"] .vlb-subgroup, html[data-theme="dark"] .vlb-subpanel { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-x-sm { background: #1d2941; border-color: #2f3d5a; color: #9fb0c4; }
html[data-theme="dark"] .vlb-tabs, html[data-theme="dark"] .vlb-meter { border-color: #243049; }
html[data-theme="dark"] .vlb-pt-results { border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-pt-item { border-color: #243049; }
html[data-theme="dark"] .vlb-pt-item:hover { background: #1d2941; }
html[data-theme="dark"] .vlb-help { border-color: #2f3d5a; }

/* ===========================================================================
   V3 — images gallery, AI panel, searchable picker, AI/overflow markers
   =========================================================================== */

/* image gallery */
.vlb-imgcard .vlb-card-head h3 { margin: 0; }
.vlb-imggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.vlb-imgtile { border: 1.5px solid var(--vlb-line); border-radius: 13px; padding: 9px; background: var(--vlb-card); display: flex; flex-direction: column; gap: 7px; min-height: 150px; }
.vlb-imgtile.main { border-color: var(--vlb-primary); box-shadow: 0 0 0 3px rgba(5, 136, 182, .10); }
.vlb-img-label { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--vlb-sub); display: flex; align-items: center; gap: 6px; }
.vlb-img-drop { flex: 1; border: 2px dashed var(--vlb-line-s); border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; background: var(--vlb-bg-soft); transition: .15s; }
.vlb-img-drop:hover { border-color: var(--vlb-primary); background: #eef7fb; }
.vlb-img-plus { font-size: 21px; color: var(--vlb-primary); }
.vlb-img-hint { font-size: 11.5px; color: var(--vlb-sub); }
.vlb-img-thumb { width: 100%; height: 90px; object-fit: contain; border-radius: 9px; background: var(--vlb-bg-soft); }
.vlb-img-meta { font-size: 11px; color: var(--vlb-sub); }
.vlb-img-name { font-weight: 700; color: var(--vlb-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlb-img-acts { display: flex; gap: 5px; flex-wrap: wrap; }
.vlb-img-busy { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.vlb-img-empty p { line-height: 1.6; }

/* AI panel */
.vlb-aicard { border-color: #cfe6f2; }
.vlb-ai-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.vlb-ai-running { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.vlb-ai-running .vlb-skel-l { width: 100%; }
.vlb-aiprop { border: 1.5px solid var(--vlb-line); border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; background: var(--vlb-bg-soft); }
.vlb-aiprop-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 12.5px; color: var(--vlb-ink); }
.vlb-aiprop-v { font-size: 12.5px; color: var(--vlb-ink); line-height: 1.5; white-space: pre-wrap; }
.vlb-ai-steer { display: flex; gap: 8px; margin-top: 11px; align-items: center; }
.vlb-ai-steer .vlb-inp { flex: 1; }
.vlb-aimark { font-size: 11px; font-weight: 700; color: var(--vlb-warn); background: #fff8e6; border: 1px solid #f2dda0; border-radius: 8px; padding: 3px 8px; margin-top: 5px; display: inline-flex; align-items: center; gap: 8px; }
.vlb-overflow { font-size: 11.5px; color: var(--vlb-bad); margin-top: 4px; line-height: 1.4; }
.vlb-counter.over { color: var(--vlb-bad); font-weight: 700; }
.vlb-safety-note { font-weight: 600; }

/* searchable picker (A1) */
.vlb-pickbox { position: relative; flex: 1; }
.vlb-pickmenu { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1.5px solid var(--vlb-line-s); border-radius: 11px; box-shadow: 0 12px 28px rgba(15, 23, 42, .13); max-height: 260px; overflow-y: auto; }
.vlb-pickcount { font-size: 11px; color: var(--vlb-sub); padding: 6px 11px; border-bottom: 1px solid var(--vlb-line); }
.vlb-pickopt { padding: 8px 11px; font-size: 13px; color: var(--vlb-ink); cursor: pointer; }
.vlb-pickopt:hover, .vlb-pickopt.on { background: #eef7fb; color: var(--vlb-primary); }
.vlb-pickempty { padding: 10px 11px; font-size: 12.5px; color: var(--vlb-sub); }
.vlb-derived { color: var(--vlb-sub); }

html[data-theme="dark"] .vlb-imgtile { background: #161f33; }
html[data-theme="dark"] .vlb-img-drop { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-img-thumb { background: #1a2438; }
html[data-theme="dark"] .vlb-aiprop { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-aicard { border-color: #2f4a5c; }
html[data-theme="dark"] .vlb-aimark { background: #2c2413; border-color: #4a3d1c; color: #e3c06a; }
html[data-theme="dark"] .vlb-pickmenu { background: #161f33; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-pickcount { border-color: #243049; }
html[data-theme="dark"] .vlb-pickopt { color: #e6edf6; }
html[data-theme="dark"] .vlb-pickopt:hover, html[data-theme="dark"] .vlb-pickopt.on { background: #1d2941; color: #6fc7e6; }

/* ===========================================================================
   V3b — nesting, repeatable instances, help, currency, locks, footer, defaults
   =========================================================================== */

/* D2: nested panels, indented one step per level */
.vlb-subgroup.vlb-nested { margin: 8px 0; background: transparent; }
.vlb-subpanel.vlb-depth-1 { margin-left: 8px; }
.vlb-subpanel.vlb-depth-2 { margin-left: 14px; }
.vlb-subpanel.vlb-depth-3 { margin-left: 18px; }

/* D1: each repeatable instance is its own bordered box */
.vlb-instbox { border: 1.5px solid var(--vlb-line-s); border-radius: 12px; background: var(--vlb-card); padding: 9px 11px; margin-bottom: 9px; position: relative; }
.vlb-inst-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.vlb-inst-n { font-size: 10.5px; font-weight: 800; color: var(--vlb-sub); background: var(--vlb-bg-soft); border: 1px solid var(--vlb-line); border-radius: 999px; min-width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.vlb-inst-x { width: 26px; height: 26px; font-size: 14px; }
.vlb-inst-b { display: flex; flex-direction: column; gap: 2px; }

/* PART C: help */
.vlb-help { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--vlb-line-s); background: #fff; font-size: 10px; font-weight: 800; color: var(--vlb-sub); cursor: pointer; padding: 0; line-height: 1; }
.vlb-help:hover, .vlb-help:focus-visible { border-color: var(--vlb-primary); color: var(--vlb-primary); outline: none; }
.vlb-helppop { position: absolute; z-index: 6500; max-width: 340px; background: #fff; border: 1.5px solid var(--vlb-line-s); border-radius: 12px; box-shadow: 0 14px 34px rgba(15, 23, 42, .16); }
.vlb-helppop .vlb-help-h, .vlb-helpsheet .vlb-help-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--vlb-line); font-size: 12.5px; font-weight: 800; color: var(--vlb-ink); }
.vlb-helppop .vlb-help-b, .vlb-helpsheet .vlb-help-b { padding: 10px 12px; font-size: 12.5px; line-height: 1.55; color: var(--vlb-ink); max-height: 260px; overflow-y: auto; white-space: pre-wrap; }
.vlb-help-k { padding: 0 12px 10px; font-size: 11px; color: var(--vlb-sub); }
.vlb-helpsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6500; background: #fff; border-top: 1.5px solid var(--vlb-line-s); border-radius: 16px 16px 0 0; box-shadow: 0 -12px 34px rgba(15, 23, 42, .2); max-height: 70vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom, 0); }

/* D3: currency badge INSIDE the input */
.vlb-curwrap { position: relative; display: block; }
.vlb-curbadge { position: absolute; left: 1px; top: 1px; bottom: 1px; display: flex; align-items: center; padding: 0 9px; font-size: 12px; font-weight: 800; color: var(--vlb-sub); background: var(--vlb-bg-soft); border-right: 1.5px solid var(--vlb-line-s); border-radius: 10px 0 0 10px; pointer-events: none; }
.vlb-inp.vlb-has-cur { padding-left: 52px; }

/* D4: locked fields */
.vlb-lock { font-size: 11px; opacity: .75; margin-left: 4px; }
.vlb-locked { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1.5px dashed var(--vlb-line-s); border-radius: 11px; padding: 9px 12px; background: var(--vlb-bg-soft); font-size: 13.5px; color: var(--vlb-ink); }
.vlb-locked-empty { color: var(--vlb-sub); }

/* PART E: sticky footer */
.vlb-footer { position: sticky; bottom: 0; z-index: 500; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: var(--vlb-card); border-top: 1.5px solid var(--vlb-line); box-shadow: 0 -6px 18px rgba(15, 23, 42, .06); padding: 11px 14px; margin-top: 18px; border-radius: 0 0 14px 14px; }
.vlb-foot-note { font-size: 11.5px; color: var(--vlb-sub); flex-basis: 100%; }
.vlb-footer .vlb-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* G2: remember-for-next-time panel */
.vlb-defcard { border-color: #cfe6f2; margin-top: 16px; }
.vlb-def-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; margin-top: 9px; }
.vlb-def-pick { font-size: 12.5px; margin-bottom: 4px; }

html[data-theme="dark"] .vlb-instbox { background: #161f33; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-inst-n { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-help { background: #1d2941; border-color: #2f3d5a; color: #9fb0c4; }
html[data-theme="dark"] .vlb-helppop, html[data-theme="dark"] .vlb-helpsheet { background: #161f33; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-helppop .vlb-help-h, html[data-theme="dark"] .vlb-helpsheet .vlb-help-h { border-color: #243049; }
html[data-theme="dark"] .vlb-curbadge { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-locked { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-footer { background: #161f33; border-color: #243049; }
html[data-theme="dark"] .vlb-defcard { border-color: #2f4a5c; }

/* ===========================================================================
   V4 — validate / submit results, issues, submission history, confirm dialog
   =========================================================================== */
.vlb-valcard { border-color: #cfe6f2; }
.vlb-sub-res { font-size: 13px; font-weight: 700; padding: 8px 11px; border-radius: 10px; margin: 9px 0 7px; border: 1.5px solid var(--vlb-line-s); background: var(--vlb-bg-soft); color: var(--vlb-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vlb-sub-res.ok { border-color: #bde3d1; background: #eaf7f1; color: var(--vlb-ok); }
.vlb-sub-res.warn { border-color: #f2dda0; background: #fff8e6; color: var(--vlb-warn); }
.vlb-sub-res.bad { border-color: #f1c9c5; background: #fdf1f0; color: var(--vlb-bad); }

.vlb-issue { font-size: 12.5px; line-height: 1.5; border-left: 3px solid var(--vlb-line-s); padding: 7px 11px; margin-bottom: 6px; background: var(--vlb-bg-soft); border-radius: 0 9px 9px 0; color: var(--vlb-ink); }
.vlb-issue.err { border-left-color: var(--vlb-bad); background: #fdf1f0; }
.vlb-issue.warn { border-left-color: var(--vlb-warn); background: #fff8e6; }
.vlb-issue.jump { cursor: pointer; }
.vlb-issue.jump:hover { filter: brightness(.98); }
.vlb-issue-act { display: block; margin-top: 3px; font-size: 11.5px; color: var(--vlb-primary-d); }
.vlb-issue-inline { margin-top: 6px; }
.vlb-issue-group { margin-top: 11px; }
.vlb-issue-group-t { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--vlb-sub); margin-bottom: 5px; }
.vlb-warn-t { color: var(--vlb-warn); font-weight: 700; }

/* submission history — a story, not a log dump */
.vlb-hist { display: flex; flex-direction: column; gap: 9px; }
.vlb-hist-row { border: 1.5px solid var(--vlb-line); border-radius: 12px; padding: 10px 12px; background: var(--vlb-card); }
.vlb-hist-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--vlb-ink); }
.vlb-hist-when { margin-left: auto; font-size: 11.5px; color: var(--vlb-sub); }
.vlb-hist-issues { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--vlb-sub); line-height: 1.5; }

/* pre-submit confirm dialog */
.vlb-confirm-sec { margin-bottom: 13px; }
.vlb-confirm-sec h4 { margin: 0 0 5px; font-size: 13px; font-weight: 800; color: var(--vlb-ink); }
.vlb-confirm-sec ul { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; color: var(--vlb-ink); }
.vlb-confirm-sec.warn { border-left: 3px solid var(--vlb-warn); padding-left: 10px; }

html[data-theme="dark"] .vlb-issue { background: #1a2438; }
html[data-theme="dark"] .vlb-issue.err { background: #2a1616; }
html[data-theme="dark"] .vlb-issue.warn { background: #2c2413; }
html[data-theme="dark"] .vlb-sub-res { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-hist-row { background: #161f33; border-color: #243049; }
html[data-theme="dark"] .vlb-valcard { border-color: #2f4a5c; }

/* V4b — readiness panel rows */
.vlb-caprow .vlb-srow-b { line-height: 1.55; }
.vlb-caprow.pending .vlb-srow-l { color: var(--vlb-warn); }
.vlb-caprow .vlb-next { color: var(--vlb-primary-d); }

/* ===========================================================================
   V5a — spec sheet panel + review, prefill banner, duplicate banner
   =========================================================================== */
.vlb-speccard { border-color: #cfe6f2; }
.vlb-speccard > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 9px; }
.vlb-speccard > summary::-webkit-details-marker { display: none; }
.vlb-speccard > summary::before { content: "\25B8"; color: var(--vlb-primary); transition: .15s; }
.vlb-speccard[open] > summary::before { transform: rotate(90deg); }
.vlb-speccard > summary h3 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--vlb-ink); }
.vlb-speccard > div { margin-top: 12px; }
.vlb-speccard .vlb-textarea { min-height: 130px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.vlb-spec-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* the three-column review: field · value · where it came from */
.vlb-spec-head, .vlb-spec-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px; align-items: start; }
.vlb-spec-head { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--vlb-sub); padding: 6px 0; border-bottom: 1.5px solid var(--vlb-line); }
.vlb-spec-row { padding: 9px 0; border-bottom: 1px solid var(--vlb-line); font-size: 12.5px; color: var(--vlb-ink); }
.vlb-spec-value { word-break: break-word; }
.vlb-spec-src { font-size: 11.5px; color: var(--vlb-sub); font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-word; }
.vlb-spec-conv { font-size: 11px; color: var(--vlb-warn); margin-top: 3px; }
.vlb-spec-couldnot { margin-top: 12px; }
.vlb-spec-couldnot summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--vlb-sub); }
.vlb-spec-couldnot ul { margin: 7px 0 0; padding-left: 18px; font-size: 12px; color: var(--vlb-sub); line-height: 1.55; }

.vlb-dfltbanner, .vlb-dupbanner { display: block; }

html[data-theme="dark"] .vlb-speccard { border-color: #2f4a5c; }
html[data-theme="dark"] .vlb-spec-head, html[data-theme="dark"] .vlb-spec-row { border-color: #243049; }

/* ===========================================================================
   V5b — field search, quality score, title advice, keyword clean, shortcuts
   =========================================================================== */
.vlb-findbox { margin-bottom: 8px; }
.vlb-find-results { max-height: 300px; overflow-y: auto; border: 1.5px solid var(--vlb-line); border-radius: 11px; margin-bottom: 8px; }
.vlb-find-group + .vlb-find-group { border-top: 1.5px solid var(--vlb-line); }
.vlb-find-tab { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--vlb-sub); padding: 6px 10px; background: var(--vlb-bg-soft); display: flex; justify-content: space-between; align-items: center; }
.vlb-find-count { background: var(--vlb-primary); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10px; min-width: 16px; text-align: center; }
.vlb-find-hit { display: block; width: 100%; text-align: left; appearance: none; background: none; border: none; border-bottom: 1px solid var(--vlb-line); padding: 7px 10px; font: inherit; font-size: 12.5px; color: var(--vlb-ink); cursor: pointer; }
.vlb-find-hit:last-child { border-bottom: none; }
.vlb-find-hit:hover, .vlb-find-hit.on, .vlb-find-hit:focus-visible { background: #eef7fb; color: var(--vlb-primary); outline: none; }
.vlb-find-grp { display: block; font-size: 10.5px; color: var(--vlb-sub); }
.vlb-find-none { font-size: 12px; color: var(--vlb-sub); padding: 8px 2px; line-height: 1.5; }

/* the flash that shows you where you landed */
.vlb-flash { animation: vlb-flash 1.4s ease; border-radius: 9px; }
@keyframes vlb-flash { 0% { background: #d9f0fa; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .vlb-flash { animation: none; outline: 2px solid var(--vlb-primary); } }

/* advisory title warnings — never a blocker, so never red-bordered */
.vlb-advice { margin-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.vlb-advice-row { font-size: 11.5px; line-height: 1.45; padding-left: 15px; position: relative; color: var(--vlb-warn); }
.vlb-advice-row::before { content: "!"; position: absolute; left: 0; font-weight: 800; }
.vlb-advice-row.nudge { color: var(--vlb-sub); }

/* keyword cleaner */
.vlb-kw-act { margin-top: 6px; }
.vlb-kw { margin-top: 8px; border: 1.5px solid var(--vlb-line-s); border-radius: 11px; padding: 10px 12px; background: var(--vlb-bg-soft); }
.vlb-kw-h { font-size: 12px; font-weight: 700; color: var(--vlb-ink); margin-bottom: 5px; }
.vlb-kw-v { font-size: 12.5px; color: var(--vlb-ink); word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace; }
.vlb-kw-acts { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }

/* listing STRENGTH — distinct from the completeness meter above it */
.vlb-quality { margin-top: 13px; border-top: 1.5px solid var(--vlb-line); padding-top: 11px; }
.vlb-quality-h { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--vlb-ink); flex-wrap: wrap; }
.vlb-quality-grade { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--vlb-bg-soft); border: 1px solid var(--vlb-line-s); color: var(--vlb-sub); }
.vlb-quality-grade.strong, .vlb-quality-grade.excellent { background: #eaf7f1; border-color: #bde3d1; color: var(--vlb-ok); }
.vlb-quality-grade.weak { background: #fdf1f0; border-color: #f1c9c5; color: var(--vlb-bad); }
.vlb-quality-grade.fair, .vlb-quality-grade.good { background: #fff8e6; border-color: #f2dda0; color: var(--vlb-warn); }
.vlb-quality-wins { margin: 7px 0 0; padding-left: 17px; font-size: 11.5px; color: var(--vlb-sub); line-height: 1.55; }

/* shortcut list */
.vlb-kbd { width: 100%; border-collapse: collapse; font-size: 13px; }
.vlb-kbd td { padding: 7px 4px; border-bottom: 1px solid var(--vlb-line); color: var(--vlb-ink); }
.vlb-kbd td:first-child { white-space: nowrap; width: 40%; }
.vlb-kbd kbd { background: var(--vlb-bg-soft); border: 1px solid var(--vlb-line-s); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }

html[data-theme="dark"] .vlb-find-results { border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-find-tab { background: #1a2438; }
html[data-theme="dark"] .vlb-find-hit { color: #e6edf6; border-color: #243049; }
html[data-theme="dark"] .vlb-find-hit:hover, html[data-theme="dark"] .vlb-find-hit.on { background: #1d2941; color: #6fc7e6; }
html[data-theme="dark"] .vlb-kw { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-quality { border-color: #243049; }
html[data-theme="dark"] .vlb-kbd td { border-color: #243049; }
html[data-theme="dark"] .vlb-kbd kbd { background: #1a2438; border-color: #2f3d5a; }
html[data-theme="dark"] .vlb-flash { animation-name: vlb-flash-dark; }
@keyframes vlb-flash-dark { 0% { background: #1d3a49; } 100% { background: transparent; } }

/* V5b Part K — the per-field popover reuses the Seller assistant's .la-* classes, which
   are already loaded globally (index.html loads listingAssistant.css app-wide). Only the
   vendor-specific bits are added here. */
.vlb-sparkle { margin-left: 6px; vertical-align: middle; }
.vlb-sparkle[disabled] { opacity: .4; cursor: not-allowed; }
.vlb-aipop { position: fixed; z-index: 6800; width: 380px; max-width: calc(100vw - 16px); padding: 14px; }
.vlb-refusal { color: var(--vlb-warn); line-height: 1.5; }

/* Breathing room. The popover borrows the Seller assistant's .la-* classes, which are
   tuned for that form's density — here the rows ran into each other ("1 2earlier
   suggestions are kept"). Spacing is scoped to .vlb-aipop so the Seller popover is
   untouched. */
.vlb-aipop .la-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--vlb-line); }
.vlb-aipop .la-head strong { flex: 1; font-size: 13.5px; }
.vlb-aipop .la-text { width: 100%; box-sizing: border-box; padding: 9px 11px; line-height: 1.5; border-radius: 10px; }
.vlb-aipop .la-count { margin-top: 7px; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; line-height: 1.45; }
.vlb-aipop .la-dots { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.vlb-aipop .la-dots .la-hint { margin-left: 4px; font-size: 11.5px; color: var(--vlb-sub); }
.vlb-aipop .la-dot { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; border: 1.5px solid var(--vlb-line-s); background: #fff; color: var(--vlb-sub); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.vlb-aipop .la-dot.on { background: var(--vlb-primary); border-color: var(--vlb-primary); color: #fff; }
.vlb-aipop .la-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vlb-aipop .la-chip { padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--vlb-line-s); background: #fff; color: #21506f; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.vlb-aipop .la-chip:hover { border-color: var(--vlb-primary); color: var(--vlb-primary); }
.vlb-aipop .la-steerrow { margin-top: 12px; }
.vlb-aipop .la-steer { width: 100%; box-sizing: border-box; padding: 8px 11px; border: 1.5px solid var(--vlb-line-s); border-radius: 10px; font: inherit; font-size: 12.5px; }
.vlb-aipop .la-acts { display: flex; gap: 7px; margin-top: 13px; flex-wrap: wrap; }
.vlb-aipop .la-btn { padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--vlb-line-s); background: #fff; color: #21506f; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vlb-aipop .la-btn.primary { border: none; background: var(--vlb-grad); color: #fff; }
.vlb-aipop .la-btn[disabled] { opacity: .5; cursor: not-allowed; }
.vlb-aipop .la-law { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--vlb-line); font-size: 11px; color: var(--vlb-sub); line-height: 1.45; }
.vlb-aipop .la-loading { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; color: var(--vlb-sub); padding: 6px 0; }

html[data-theme="dark"] .vlb-aipop .la-dot { background: #1d2941; border-color: #2f3d5a; color: #9fb0c4; }
html[data-theme="dark"] .vlb-aipop .la-chip,
html[data-theme="dark"] .vlb-aipop .la-btn { background: #1d2941; border-color: #2f3d5a; color: #cfe0ee; }
html[data-theme="dark"] .vlb-aipop .la-steer { background: #161f33; border-color: #2f3d5a; color: #e6edf6; }
html[data-theme="dark"] .vlb-aipop .la-head,
html[data-theme="dark"] .vlb-aipop .la-law { border-color: #243049; }

@media (max-width: 1180px) {
  /* K9: on mobile the popover is a BOTTOM SHEET — a textarea, chips and three buttons
     will not fit in a floating panel. `top` is overridden too: the Seller version only
     overrides `left`, so its panel can still land off-screen. */
  .vlb-aipop {
    left: 0 !important; right: 0; bottom: 0; top: auto !important;
    width: 100%; max-width: 100%;
    border-radius: 16px 16px 0 0; max-height: 82vh; overflow-y: auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 34px rgba(15, 23, 42, .22);
  }
  .vlb-aipop .la-text { font-size: 16px; }        /* stops iOS zooming on focus */
  .vlb-aipop .la-steer { font-size: 16px; min-height: 44px; }
  .vlb-aipop .la-btn { min-height: 40px; flex: 1; }
  .vlb-aipop .la-chip { min-height: 36px; }
  .vlb-sparkle { min-width: 32px; min-height: 32px; }
  /* PART F: the search sits above the form (the rail is already order:-1), and its
     results stay thumb-reachable rather than running off the bottom of a long list. */
  .vlb-findbox { font-size: 16px; min-height: 44px; }   /* 16px stops iOS zooming */
  .vlb-find-results { max-height: 240px; }
  .vlb-find-hit { min-height: 40px; padding: 10px; }
  .vlb-quality { margin-top: 11px; }
  .vlb-kw-acts .vlb-btn { flex: 1; justify-content: center; min-height: 40px; }
  .vlb-kbd td:first-child { width: auto; }
  /* the spec panel stacks, and the three-column review becomes cards */
  .vlb-spec-head { display: none; }
  .vlb-spec-row { grid-template-columns: 1fr; gap: 4px; border: 1.5px solid var(--vlb-line); border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; }
  .vlb-spec-src::before { content: "From: "; font-family: inherit; font-weight: 700; }
  .vlb-spec-act .vlb-btn { width: 100%; justify-content: center; min-height: 40px; }
  .vlb-spec-foot { flex-direction: column; align-items: stretch; }
  .vlb-spec-foot .vlb-btn { min-height: 40px; justify-content: center; }
  .vlb-speccard .vlb-textarea { font-size: 16px; }   /* stops iOS zooming on focus */
  /* readiness rows stack: the label sits above its explanation */
  .vlb-caprow { flex-direction: column; gap: 3px; }
  .vlb-caprow .vlb-srow-l { flex-basis: auto; }
  /* the per-code result list and the history stack as cards */
  .vlb-sub-res { flex-direction: column; align-items: flex-start; gap: 4px; }
  .vlb-hist-h { flex-direction: column; align-items: flex-start; gap: 3px; }
  .vlb-hist-when { margin-left: 0; }
  .vlb-issue { font-size: 12px; }
  .vlb-editor { grid-template-columns: 1fr; }
  /* nested panels reduce indent so deep nesting does not squeeze the inputs */
  .vlb-subpanel.vlb-depth-1, .vlb-subpanel.vlb-depth-2, .vlb-subpanel.vlb-depth-3 { margin-left: 4px; padding: 9px 10px; }
  .vlb-subgroup.vlb-nested { margin: 6px 0; }
  /* repeatable instances stack full-width */
  .vlb-instbox { padding: 9px; }
  .vlb-inst-x { width: 34px; height: 34px; }
  /* footer pinned with safe-area padding; the form gets clearance beneath it */
  .vlb-footer { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px)); }
  .vlb-footer .vlb-btn { flex: 1; justify-content: center; min-height: 40px; }
  .vlb-formcol { padding-bottom: 132px; }
  /* the currency badge must not overlap the typed value */
  .vlb-inp.vlb-has-cur { padding-left: 56px; font-size: 16px; }
  .vlb-def-picks { grid-template-columns: 1fr; }
  /* gallery: 2-up so tiles stay tappable rather than shrinking to nothing */
  .vlb-imggrid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .vlb-imgtile { min-height: 140px; }
  .vlb-img-acts .vlb-btn { flex: 1; justify-content: center; min-height: 40px; }
  .vlb-img-drop { min-height: 84px; }
  .vlb-ai-foot, .vlb-ai-steer { flex-direction: column; align-items: stretch; }
  .vlb-ai-steer .vlb-btn, .vlb-ai-foot .vlb-btn { min-height: 40px; justify-content: center; }
  .vlb-aiprop-h { flex-direction: column; align-items: flex-start; gap: 6px; }
  /* 16px keeps iOS from zooming the page when the search box is focused */
  .vlb-pickinput { font-size: 16px; min-height: 44px; }
  .vlb-pickmenu { max-height: 220px; }
  .vlb-pickopt { min-height: 40px; display: flex; align-items: center; }
  .vlb-rail { position: static; order: -1; }
  .vlb-frow { grid-template-columns: 1fr; gap: 5px; padding: 8px 0; }
  .vlb-fhead { padding-top: 0; }
  .vlb-subpanel .vlb-frow { grid-template-columns: 1fr; }
  .vlb-pair { grid-template-columns: 1fr; }
  .vlb-tabs { gap: 2px; }
  .vlb-tab { padding: 9px 11px; min-height: 40px; }
  .vlb-addmore, .vlb-x-sm { min-height: 40px; }
  .vlb-x-sm { width: 100%; }
  .vlb-listrow { flex-wrap: wrap; }
}

/* V5b fix — a deliberately-empty select (the category fields before a live schema)
   explains itself instead of looking broken. */
.vlb-emptysel .vlb-select[disabled] { background: var(--vlb-bg-soft); color: var(--vlb-sub); cursor: not-allowed; }
.vlb-emptysel .vlb-hint { margin-top: 4px; line-height: 1.45; }

/* ══════════════════════════════════════════════════════════════════════════
   POLISH PASS — footer hierarchy, product-type line, progress bar
   ══════════════════════════════════════════════════════════════════════════ */

/* POLISH 1 — the ⋯ overflow holding Export + the shortcut list.
   .vlb-spacer is only given flex:1 inside .vlb-card-head, so in the footer it did
   nothing and every button bunched together on the left. The footer needs its own. */
.vlb-footer .vlb-spacer { flex: 1 1 auto; min-width: 12px; }
.vlb-foot-more { position: relative; display: inline-flex; }
.vlb-foot-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 220px; padding: 6px;
  background: #fff; border: 1px solid #d8dee6; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .16);
}
.vlb-foot-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: 7px;
  background: transparent; color: #1f2a37; font: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
}
.vlb-foot-item:hover { background: #f2f5f9; }
.vlb-foot-item kbd {
  padding: 1px 6px; border: 1px solid #d8dee6; border-radius: 4px;
  background: #f7f9fc; font-size: 11px; color: #5b6675;
}

/* POLISH 6 — outstanding issues stay reachable once you scroll away. */
.vlb-foot-issues {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.vlb-foot-issues.err  { background: #fdeceb; border-color: #f3c2bd; color: #8f2018; }
.vlb-foot-issues.warn { background: #fff6e6; border-color: #f0d9a8; color: #7a5310; }
.vlb-foot-issues:hover { filter: brightness(.97); }

/* POLISH 3 — the type, its Edit control and the examples no longer run together. */
.vlb-ptline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.vlb-ptline .vlb-sub { margin: 0; }
.vlb-pt-ex-line {
  flex-basis: 100%; margin-top: 2px;
  font-size: 12px; color: #6b7684; line-height: 1.45;
}

/* POLISH 4 — one overall bar in the rail; per-tab counts live on the tab badges. */
.vlb-meter-bar {
  height: 6px; margin: 7px 0 6px; border-radius: 999px;
  background: #e6ebf1; overflow: hidden;
}
.vlb-meter-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: #2f7d6d; transition: width .25s ease;
}

@media (prefers-color-scheme: dark) {
  .vlb-foot-menu { background: #1c2229; border-color: #333c46; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
  .vlb-foot-item { color: #e6ebf1; }
  .vlb-foot-item:hover { background: #262e37; }
  .vlb-foot-item kbd { background: #262e37; border-color: #3a444f; color: #9aa6b4; }
  .vlb-foot-issues.err  { background: #3a1d1a; border-color: #6b2f27; color: #f3b4ac; }
  .vlb-foot-issues.warn { background: #362a14; border-color: #6a5320; color: #f0d19a; }
  .vlb-pt-ex-line { color: #9aa6b4; }
  .vlb-meter-bar { background: #2b333c; }
  .vlb-meter-bar > span { background: #4ea08c; }
}

/* FIX-3 — "loading" must never look like "unavailable".
   A capability that is still being checked gets a neutral, clearly-provisional
   treatment; an unavailable one keeps the existing amber statement. */
.vlb-mode.loading { color: #41607d; background: var(--vlb-bg-soft); border-color: var(--vlb-line-s); }
.vlb-banner-loading {
  border: 1px dashed var(--vlb-line-s); background: var(--vlb-bg-soft);
  color: var(--vlb-sub); border-radius: 11px; padding: 10px 13px; font-size: 12.5px;
}
html[data-theme="dark"] .vlb-mode.loading { background: #1a2438; border-color: #2f3d5a; color: #9fb0c4; }
html[data-theme="dark"] .vlb-banner-loading { background: #161f33; border-color: #2f3d5a; color: #9fb0c4; }

/* FIX-5 — announced prefills, the sprint note, and a duplicate warning you can act on. */
.vlb-unitbanner { border-left: 3px solid var(--vlb-primary); }
.vlb-sprintnote { border-left: 3px solid var(--vlb-ok); }
.vlb-dup-list { margin: 8px 0 6px; padding-left: 18px; }
.vlb-dup-list li { margin-bottom: 7px; font-size: 13px; }
.vlb-dup-meta { color: var(--vlb-sub); font-size: 12px; }
.vlb-dup-how { color: var(--vlb-sub); font-size: 12px; line-height: 1.45; margin-top: 1px; }
html[data-theme="dark"] .vlb-dup-meta, html[data-theme="dark"] .vlb-dup-how { color: #9aa6b4; }

/* BN1 — browse node picker. A result is a NAME plus its PATH: the name alone cannot
   distinguish two similarly-named shelves, which is the whole point of the field. */
.bn-wrap { display: block; }
.bn-results { max-height: 260px; overflow-y: auto; border: 1.5px solid var(--vlb-line-s); border-radius: 11px; margin-top: 7px; }
.bn-opt { padding: 8px 11px; border-bottom: 1px solid var(--vlb-line); cursor: pointer; }
.bn-opt:last-child { border-bottom: none; }
.bn-opt:hover, .bn-opt.on { background: #f3f9fc; }
.bn-name { font-size: 13px; font-weight: 700; color: var(--vlb-ink); }
.bn-path { font-size: 11.5px; color: var(--vlb-sub); margin-top: 1px; }
/* A seed row has no id, so it cannot be chosen — and it must LOOK unchoosable. */
.bn-opt-dead { cursor: default; opacity: .72; }
.bn-opt-dead:hover { background: transparent; }
.bn-chosen { font-size: 12.5px; margin-bottom: 6px; color: var(--vlb-ink); }
.bn-chosen strong { font-family: ui-monospace, Menlo, Consolas, monospace; }
.bn-prov { margin-top: 6px; }
html[data-theme="dark"] .bn-results { border-color: #2f3d5a; }
html[data-theme="dark"] .bn-opt { border-bottom-color: #2f3d5a; }
html[data-theme="dark"] .bn-opt:hover, html[data-theme="dark"] .bn-opt.on { background: #1a2438; }

/* FIX-11 — the category fields Amazon requires but does not supply values for.
   A statement, not an error: nothing is broken and there is nothing to reconnect. */
.vlb-catnotice { margin-top: 7px; font-size: 12.5px; line-height: 1.5; }

/* VERIFY+HARDEN — make a screenshot enough to diagnose from.
   ADDITIVE ONLY: nothing above is altered, and no rule here changes an existing one. */
.vlb-diagline {
  margin: 6px 0 10px; font-size: 12px; color: var(--vlb-sub);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.vlb-diagline code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700;
  background: var(--vlb-bg-soft); border: 1px solid var(--vlb-line-s);
  border-radius: 6px; padding: 1px 7px; color: var(--vlb-ink);
}
/* The build tag is deliberately quiet but always present. */
.vlb-buildline {
  margin: -6px 0 12px; font-size: 11.5px; color: var(--vlb-sub);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.vlb-diagbox { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

html[data-theme="dark"] .vlb-diagline code { background: #1a2438; border-color: #2f3d5a; color: #e6ebf1; }

/* Mobile: gated at the module's existing breakpoint, and nothing may scroll sideways. */
@media (max-width: 1180px) {
  .vlb-diagline, .vlb-buildline { font-size: 11px; }
  .vlb-diagline code { word-break: break-all; }
  .vlb-diagbox { max-width: 100%; }
}

/* CATEGORIES — the code actually sent, shown small under a picker whose label differs. */
.vlb-pickcode { font-size: 11.5px; color: var(--vlb-sub); margin-top: 4px; }
.vlb-pickcode code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
