/* supplier & rep portal – staff screens (Vendors module) */

/* shared by both sides: the document timeline and the payment stepper */
.vnd-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.vnd-timeline::before { content: ""; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px; border-inline-start: 2px solid var(--border); }
.vnd-timeline li { position: relative; display: flex; gap: 12px; padding: 6px 0 10px; }
.vnd-tl-dot { flex: 0 0 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); z-index: 1; }
.vnd-timeline li.supplier .vnd-tl-dot { border-color: var(--amber-fg); }
.vnd-timeline li.internal .vnd-tl-dot { border-color: var(--muted); border-style: dashed; }
.vnd-tl-body { min-width: 0; flex: 1; }
.vnd-tl-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vnd-tl-text { margin-top: 2px; overflow-wrap: anywhere; }
.vnd-stepper { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; flex-wrap: wrap; }
.vnd-stepper li { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.vnd-stepper li + li::before { content: ""; width: 22px; border-top: 2px solid var(--border); margin-inline: 6px; }
.vnd-stepper li.done, .vnd-stepper li.current { color: var(--text); }
.vnd-stepper li.done + li::before, .vnd-stepper li.current::before { border-color: var(--primary); }
.vnd-step-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex: 0 0 12px; }
.vnd-stepper li.done .vnd-step-dot { background: var(--primary); border-color: var(--primary); }
.vnd-stepper li.current .vnd-step-dot { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.vnd-stepper li.current .vnd-step-name { font-weight: 600; }
.vnd-stepper.compact li { font-size: 12px; }
.vnd-stepper.compact .vnd-step-name { display: none; }
.vnd-stepper.compact li.current .vnd-step-name { display: inline; }
.vnd-stepper.compact li + li::before { width: 12px; margin-inline: 3px; }

/* ---- staff screens (Vendors module) ---- */
.vnd-kpis { margin-bottom: 16px; }
.vnd-warn { color: var(--amber-fg); }
.vnd-updated { align-self: center; }
.vnd-subtabs { margin-bottom: 12px; }
.vnd-subtabs button.tab { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; cursor: pointer; }
.vnd-subtabs button.tab.active { border-bottom-color: var(--primary); }
.vnd-banner { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.vnd-banner > span { flex: 1; min-width: 0; }
.vnd-pad { padding: 8px; }
.vnd-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vnd-col.grow { flex: 1 1 420px; }
.vnd-col.side { flex: 0 0 340px; max-width: 100%; }
.vnd-ltr { text-align: start; unicode-bidi: plaintext; }
.vnd-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vnd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.vnd-chip-x { border: 0; cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: 4px; }
.vnd-row-actions { white-space: nowrap; text-align: end; }
.vnd-row-actions > * + * { margin-inline-start: 4px; }
.vnd-toolbar-status { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; }
.vnd-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vnd-plain-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* definition lists of a document */
.vnd-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 14px; margin: 0; }
.vnd-dl dt { color: var(--muted); font-size: 13px; }
.vnd-dl dd { margin: 0; overflow-wrap: anywhere; }
.vnd-dl.compact { gap: 4px 12px; font-size: 14px; }

/* dashboard attention list */
.vnd-attention { list-style: none; margin: 0; padding: 0; }
.vnd-attention li + li { border-top: 1px solid var(--row-line); }
.vnd-attention a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; color: inherit; text-decoration: none; }
.vnd-attention a:hover .vnd-att-text, .vnd-attention a:focus-visible .vnd-att-text { color: var(--primary); }
.vnd-att-text { flex: 1; min-width: 0; }
[dir="rtl"] .vnd-attention a svg:last-child { transform: scaleX(-1); }

/* progress bars */
.vnd-bar { display: block; height: 6px; border-radius: 3px; background: var(--gray-bg); overflow: hidden; min-width: 70px; }
.vnd-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.vnd-progress-cell { min-width: 120px; }
.vnd-progress-cell .vnd-bar { margin-bottom: 4px; }

/* supplier file */
.vnd-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vnd-facts > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.vnd-check { border: 1px solid var(--border); border-inline-start: 4px solid var(--muted); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.vnd-check.tone-green { border-inline-start-color: var(--green-fg); }
.vnd-check.tone-red { border-inline-start-color: var(--red-fg); }
.vnd-check.tone-amber { border-inline-start-color: var(--amber-fg); }
.vnd-check-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vnd-score-head { display: flex; align-items: center; gap: 12px; }
.vnd-score-big { font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.vnd-reasons { margin: 0; padding-inline-start: 18px; color: var(--text); }
.vnd-reasons li + li { margin-top: 2px; }

/* timeline card with notes */
.vnd-note-box { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--row-line); }
.vnd-note-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* one-time secret / copy rows */
.vnd-secret { display: flex; flex-direction: column; gap: 10px; }
.vnd-secret-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.vnd-secret-row input { flex: 1 1 200px; min-width: 0; }

/* deliveries */
.vnd-day-picker { display: flex; align-items: flex-end; gap: 6px; }
.vnd-day-picker .icon-btn { margin-bottom: 4px; }
table.grid tr.selected td { background: color-mix(in srgb, var(--primary) 10%, transparent); }

/* new items review */
.vnd-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--gray-bg); display: inline-grid; place-items: center; color: var(--muted); }
.vnd-thumb.big { width: 96px; height: 96px; }
.vnd-decide-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }

/* invoices: 3-way match */
.vnd-match { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vnd-match-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.vnd-match-cell strong { font-size: 20px; }
.vnd-match-main { border-color: var(--primary); }

/* payments stage tiles */
.vnd-stage-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 12px; }

/* messages */
.vnd-threads { list-style: none; margin: 0; padding: 0; }
.vnd-threads li + li { border-top: 1px solid var(--row-line); }
.vnd-threads a { display: flex; gap: 12px; justify-content: space-between; padding: 10px 8px; color: inherit; text-decoration: none; }
.vnd-threads a:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.vnd-thread-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vnd-thread-subject { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.vnd-threads li.unread .vnd-thread-subject { font-weight: 600; }
.vnd-thread-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; text-align: end; }
.vnd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 8px; }
.vnd-bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vnd-bubbles li { display: flex; }
.vnd-bubbles li.us { justify-content: flex-end; }
.vnd-bubble { max-width: min(640px, 85%); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.vnd-bubbles li.them .vnd-bubble { background: var(--amber-bg); border-color: transparent; border-start-start-radius: 4px; }
.vnd-bubbles li.us .vnd-bubble { background: var(--blue-bg); border-color: transparent; border-start-end-radius: 4px; }
.vnd-bubble-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.vnd-bubble-body { white-space: pre-line; overflow-wrap: anywhere; }
.vnd-bubble-files { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.vnd-reply { border-top: 1px solid var(--row-line); padding-top: 12px; }

/* scorecards / settings */
.vnd-quick { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.vnd-test-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.vnd-switch { min-height: 0; }

@media (max-width: 900px) {
    .vnd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vnd-stage-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .vnd-match { grid-template-columns: 1fr; }
    .vnd-stage-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vnd-dl { grid-template-columns: 1fr; gap: 2px; }
    .vnd-dl dd { margin-bottom: 6px; }
    .vnd-col.side { flex: 1 1 100%; }
    .vnd-threads a { flex-direction: column; }
    .vnd-thread-side { align-items: flex-start; text-align: start; }
    .vnd-bubble { max-width: 95%; }
    .vnd-row-actions { white-space: normal; }
}
