/* ═══ Company price list ═════════════════════════════════════════════════════
   A feature stylesheet rather than component-scoped CSS (same choice as
   audit-history.css): the same vocabulary spans four components — browse,
   filter bar, edit dialog, remove dialog — and MudBlazor renders most of these
   elements itself, which CSS isolation cannot reach without ::deep everywhere.

   The violet family is reserved for exactly two ideas: a price inherited from
   an older company version, and a supplier unit that needs converting to ours.
   Both say "this number is not what it appears to be", so they share a colour;
   nothing else on the page may use it. */

:root {
    --pl-violet: #7c5cd6;
    --pl-violet-tint: rgba(124, 92, 214, 0.10);
    --pl-violet-line: rgba(124, 92, 214, 0.28);
}

/* ── page header ─────────────────────────────────────────────────────────── */
.pl-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px 12px;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.pl-header-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.pl-header-titles { min-width: 0; }

.pl-header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--mud-palette-text-primary);
}

.pl-header-route {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    color: var(--mud-palette-text-disabled);
    margin-top: 1px;
}

.pl-header-spacer { flex: 1; }

.pl-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--pl-violet-tint);
    border: 1px solid var(--pl-violet-line);
}

.pl-version-badge .mud-icon-root { color: var(--pl-violet); }
.pl-version-label { font-size: 11px; color: var(--mud-palette-text-secondary); }

.pl-version-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--pl-violet);
}

/* ── filter bar ──────────────────────────────────────────────────────────── */
.pl-filterbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    flex-wrap: wrap;
}

.pl-filterbar-spacer { flex: 1; }

.pl-divider {
    width: 1px;
    height: 26px;
    background: var(--mud-palette-lines-default);
    flex-shrink: 0;
}

/* The scope picker reads as one control: an eyebrow naming it and stating that it is
   required, with the autocomplete underneath carrying no border of its own. */
.pl-scope {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    flex: 0 1 340px;
    padding: 2px 10px 2px 8px;
    border-radius: 8px;
    background: var(--mud-palette-background-gray);
    border: 1.5px solid var(--mud-palette-lines-inputs);
}

.pl-scope-empty {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

.pl-scope-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.pl-scope-body { flex: 1; min-width: 0; }

.pl-scope-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-disabled);
    line-height: 1.3;
}

.pl-scope-empty .pl-scope-eyebrow { color: var(--mud-palette-primary); }

/* The shared CompanyPicker is an outlined field; inside the scope box it would draw a second
   border around the one the box already has, so its outline and top margin are stripped. */
.pl-scope .mud-input-control { margin-top: 0; }
.pl-scope .mud-input-outlined .mud-input-outlined-border { border: none !important; }
.pl-scope .mud-input-outlined > input,
.pl-scope .mud-input-outlined > .mud-input-slot { font-size: 13.5px; font-weight: 600; }
.pl-scope .mud-input.mud-input-outlined { padding-left: 0; }

/* Likewise the picked card: the scope box is already the card, so the inner one drops its own
   chrome and keeps only the layout. */
.pl-scope .picked-entity-card {
    background: none;
    border: none;
    padding: 0;
    min-height: 0;
}

.pl-search { flex: 1 1 220px; min-width: 190px; max-width: 320px; }
.pl-segmented .mud-button-root { min-width: 0; padding: 4px 12px; font-size: 12px; }

/* ── inherited banner ────────────────────────────────────────────────────── */
.pl-banner {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--pl-violet-tint);
    border-left: 3px solid var(--pl-violet);
    color: var(--mud-palette-text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.pl-banner .mud-icon-root { color: var(--pl-violet); flex-shrink: 0; }

/* ── grid cells ──────────────────────────────────────────────────────────── */
/* An inherited row is marked on its leading edge, so the signal survives horizontal
   scrolling of a wide grid. */
.pl-row-inherited td:first-child { box-shadow: inset 3px 0 0 0 var(--pl-violet); }

.pl-cell-article { min-width: 0; }
.pl-cell-article-top { display: flex; align-items: center; gap: 7px; }

.pl-code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mud-palette-primary);
}

/* The article name is what the row is ABOUT — it outranks its code, so it gets the size and the
   full-strength colour while the code drops to a quiet monospace tag above it. */
.pl-cell-article-name {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--mud-palette-text-primary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-inherit-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--pl-violet-tint);
    border: 1px solid var(--pl-violet-line);
    color: var(--pl-violet);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.pl-unit { font-size: 12px; color: var(--mud-palette-text-secondary); }

/* Our unit, inline beside the article code — a whole column for one short word was what pushed the
   grid into a horizontal scroll. */
.pl-unit-chip {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--mud-palette-text-disabled);
    background: var(--mud-palette-background-gray);
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
}

.pl-part {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

/* The supplier's nomenclature: their number and unit, then their name, then the conversion when the
   units differ. Text truncates rather than widening the column — the full value is in the dialog. */
.pl-cell-item { min-width: 0; }

.pl-cell-item-top {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.pl-cell-item-top .pl-part,
.pl-cell-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-cell-item-name {
    font-size: 12.5px;
    color: var(--mud-palette-text-primary);
    margin-top: 1px;
}

/* Money and status carry short, fixed-width values, so pinning them hands the leftover width to the two
   text columns — which is where the article name lives. MudDataGrid has no Width parameter; HeaderClass
   on the column is the supported way in, and a table column takes its width from the header cell. */
.pricelist-content .mud-table-head th.pl-col-money { width: 92px; }
.pricelist-content .mud-table-head th.pl-col-eff   { width: 104px; }
.pricelist-content .mud-table-head th.pl-col-status { width: 104px; }

/* "1 roll = 25 m" — rendered only when the units actually differ. */
.pl-conv-line {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 1px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    color: var(--pl-violet);
    white-space: nowrap;
}

.pl-conv-line .mud-icon-root { color: var(--pl-violet); }

.pl-money {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    text-align: right;
    white-space: nowrap;
}

/* Fitting nine columns on a normal desktop without a horizontal scroll.

   Two things made the grid overflow, and neither was the data. MudDataGrid sets `white-space: nowrap`
   on the header cell AND on its inner `.column-header`, so a caption like "ЕФЕКТИВНА / НАША ЕМ" claimed
   ~180px for a column rendering "84,00"; and head cells carry 16px/24px padding regardless of Dense.
   Letting the captions wrap to two lines and tightening the padding takes the table from needing a
   ~1767px viewport down to fitting 1280. Measured, not guessed. */
/* The class-heavy selectors are load-bearing, not decoration: app.css sets
   `.mud-table-head th.mud-table-cell { white-space: nowrap }` (0,2,1) and MudBlazor pads cells through
   `.mud-table-dense * .mud-table-row .mud-table-cell` (0,3,0). A plain `.pricelist-content thead th` is
   (0,1,2) and loses to both, so these match at (0,3,1) instead of resorting to !important. */
.pricelist-content .mud-table-head th.mud-table-cell {
    white-space: normal;
    vertical-align: bottom;
    padding-left: 8px;
    padding-right: 8px;
}

.pricelist-content .mud-table-head th .column-header,
.pricelist-content .mud-table-head th .sortable-column-header {
    white-space: normal;
    line-height: 1.15;
}

.pricelist-content .mud-table-body td.mud-table-cell {
    padding-left: 8px;
    padding-right: 8px;
}

.pl-money-muted { color: var(--mud-palette-text-secondary); }
.pl-money-dim { color: var(--mud-palette-text-disabled); }
.pl-discount { color: var(--mud-palette-warning); font-weight: 600; }
.pl-net { font-size: 13px; font-weight: 700; color: var(--mud-palette-text-primary); }
.pl-eff-cell { text-align: right; }
.pl-eff-converted { font-weight: 600; color: var(--pl-violet); }
.pl-eff-sub { font-size: 10px; color: var(--mud-palette-text-disabled); margin-top: 1px; }

/* The article a dialog is pinned to. It is the one thing on the form the user cannot change, so it is
   presented rather than disabled: the code as a quiet mono tag, the name at full strength above the
   supplier's own fields, and the padlock as a small aside instead of a greyed-out box. */
.pl-article-fixed {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    /* Matches an outlined MudTextField so the card lines up with the unit field beside it. A name that
       wraps to a second line grows past this, which is fine — the row is top-aligned by the grid. */
    min-height: 56px;
    border-radius: 8px;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
}

.pl-article-fixed-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.pl-article-fixed-body { flex: 1; min-width: 0; }

.pl-article-fixed-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* A long article name wraps here rather than being cut: the dialog is where the user reads the full
   thing, and the card is full width. Two lines is the ceiling so a very long name cannot push the price
   fields off the dialog; anything beyond that is still reachable through the title tooltip. */
.pl-article-fixed-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2px;
    color: var(--mud-palette-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.pl-article-fixed-lock {
    flex-shrink: 0;
    font-size: 15px !important;
    color: var(--mud-palette-text-disabled);
}

/* ── empty states ────────────────────────────────────────────────────────── */
.pl-empty {
    padding: 64px 24px;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.pl-empty-ring {
    width: 62px;
    height: 62px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.pl-empty-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--mud-palette-text-primary);
}

.pl-empty-body {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    max-width: 460px;
    margin-top: 6px;
    line-height: 1.6;
    text-wrap: pretty;
}

/* ── dialogs ─────────────────────────────────────────────────────────────── */
.pl-dialog-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.pl-dialog-icon-danger {
    background: color-mix(in srgb, var(--mud-palette-error) 12%, transparent);
    color: var(--mud-palette-error);
}

.pl-inherit-notice {
    display: flex;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 9px;
    background: var(--pl-violet-tint);
    border: 1px solid var(--pl-violet-line);
    border-left: 3px solid var(--pl-violet);
}

.pl-inherit-notice .mud-icon-root { color: var(--pl-violet); flex-shrink: 0; }

.pl-inherit-notice-body {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--mud-palette-text-secondary);
    text-wrap: pretty;
}

.pl-remove-warn,
.pl-remove-alt {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 12.5px;
    line-height: 1.55;
    text-wrap: pretty;
}

.pl-remove-warn {
    background: color-mix(in srgb, var(--mud-palette-error) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-error) 30%, transparent);
    color: var(--mud-palette-text-primary);
}

.pl-remove-warn .mud-icon-root { color: var(--mud-palette-error); flex-shrink: 0; }

.pl-remove-alt {
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

.pl-remove-alt .mud-icon-root { color: var(--mud-palette-text-disabled); flex-shrink: 0; }

/* ── edit dialog: the linked money trio ──────────────────────────────────── */
.pl-formula {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
}

.pl-formula-text {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.pl-formula-spacer { flex: 1; }

.pl-lock-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    font-size: 10.5px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.pl-lock-chip .mud-icon-root { color: var(--mud-palette-text-disabled); }

.pl-driven-badge {
    padding: 1px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    color: var(--mud-palette-primary);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── edit dialog: unit conversion block ──────────────────────────────────── */
.pl-conversion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 9px;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
}

.pl-conversion-active {
    background: var(--pl-violet-tint);
    border-color: var(--pl-violet-line);
}

.pl-conversion-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--mud-palette-text-disabled);
}

.pl-conversion-active .pl-conversion-head,
.pl-conversion-active .pl-conversion-head .mud-icon-root { color: var(--pl-violet); }

.pl-conversion-formula {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--pl-violet);
}

.pl-conversion-hint { font-size: 11.5px; color: var(--mud-palette-text-secondary); }

.pl-conversion-eff {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
    border-top: 1px dashed var(--pl-violet-line);
    flex-wrap: wrap;
}

.pl-conversion-eff-label { font-size: 12px; color: var(--mud-palette-text-secondary); }
.pl-conversion-eff-spacer { flex: 1; }

.pl-conversion-eff-calc {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--mud-palette-text-disabled);
}

.pl-conversion-eff-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 17px;
    font-weight: 700;
    color: var(--pl-violet);
}

.pl-conversion-locked { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.pl-conversion-locked-chip {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 5px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

.pl-conversion-locked-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--mud-palette-text-disabled);
}

/* Below the desktop breakpoint the bar's controls stack instead of overflowing. */
@media (max-width: 1279.98px) {
    .pl-search { max-width: none; }
    .pl-filterbar-spacer { display: none; }
}

/* Version chip — "v3" beside a supplier's name in the comparison view. */
.pl-scope-option-version {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    color: var(--pl-violet);
    background: var(--pl-violet-tint);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ═══ Article-first comparison view ══════════════════════════════════════════
   The second lens on the same data: one of our articles, every supplier's price.
   Green is used here and nowhere else on the feature, for exactly one idea — the
   cheapest ACTIVE offer. Violet keeps its two existing meanings (inherited
   price, unit conversion) unchanged. */

/* ── view switch (page header) ── */
.pl-view-switch {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-inputs);
    margin-right: 4px;
}

.pl-view-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
    color: var(--mud-palette-text-secondary);
}

.pl-view-switch-btn.is-on {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── master / detail frame ── */
.pl-compare {
    display: flex;
    min-height: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
}

.pl-compare-master {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--mud-palette-lines-default);
}

.pl-compare-master-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.pl-compare-master-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--mud-palette-text-disabled);
}

.pl-compare-master-count { font-size: 11px; color: var(--mud-palette-text-disabled); }
.pl-compare-master-list { flex: 1; overflow: auto; min-height: 0; }

/* ── an article row in the master list ── */
.pl-article-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    border-left: 3px solid transparent;
}

.pl-article-row:hover { background: var(--mud-palette-action-default-hover); }

.pl-article-row.is-selected {
    border-left-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}

.pl-article-row-main { flex: 1; min-width: 0; }
.pl-article-row-top { display: flex; align-items: center; gap: 7px; }
.pl-article-row-unit { font-size: 10.5px; color: var(--mud-palette-text-disabled); }

.pl-article-row-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-article-row-offers { font-size: 10.5px; color: var(--mud-palette-text-disabled); margin-top: 2px; }
.pl-article-row-price { text-align: right; flex-shrink: 0; }

.pl-article-row-from {
    font-size: 9.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mud-palette-text-disabled);
}

.pl-article-row-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.pl-article-row-per { font-size: 10px; color: var(--mud-palette-text-disabled); }
.pl-article-row-dash { font-size: 11px; color: var(--mud-palette-text-disabled); }

/* ── detail pane ── */
.pl-compare-detail { flex: 1; overflow: auto; min-width: 0; }

.pl-compare-detail-inner {
    padding: 18px 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pl-compare-detail-head { display: flex; align-items: flex-start; gap: 14px; }
.pl-compare-group { font-size: 11px; color: var(--mud-palette-text-disabled); }

.pl-compare-article-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--mud-palette-text-primary);
    margin-top: 3px;
}

.pl-compare-article-sub { font-size: 12px; color: var(--mud-palette-text-secondary); margin-top: 4px; }

/* ── one supplier's offer ── */
.pl-offer-list { display: flex; flex-direction: column; gap: 12px; }

.pl-offer-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
}

/* Green marks the cheapest ACTIVE offer — the one number this view exists to surface. */
.pl-offer-card.is-best {
    border-color: color-mix(in srgb, var(--mud-palette-success) 45%, transparent);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--mud-palette-success) 12%, transparent);
}

.pl-offer-card.is-inherited { border-left: 3px solid var(--pl-violet); }
.pl-offer-card.is-inactive { opacity: 0.62; }

.pl-offer-head { display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; }
.pl-offer-supplier-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pl-offer-supplier { font-size: 14px; font-weight: 700; color: var(--mud-palette-text-primary); }

.pl-best-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--mud-palette-success) 15%, transparent);
    color: var(--mud-palette-success);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.pl-best-chip .mud-icon-root { color: var(--mud-palette-success); }

.pl-offer-item-name { font-size: 12.5px; color: var(--mud-palette-text-secondary); margin-top: 4px; }
.pl-offer-price { text-align: right; flex-shrink: 0; }

.pl-offer-eff {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--mud-palette-text-primary);
}

.pl-offer-eff.is-best { color: var(--mud-palette-success); }
.pl-offer-eff-sub { font-size: 10.5px; color: var(--mud-palette-text-disabled); margin-top: -1px; }

.pl-offer-delta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    color: var(--mud-palette-warning);
    margin-top: 3px;
}

.pl-offer-inactive-note { font-size: 10px; color: var(--mud-palette-text-disabled); margin-top: 3px; }

/* footer strip: the raw figures behind the effective price */
.pl-offer-facts {
    display: flex;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-gray);
}

.pl-offer-fact {
    flex: 1;
    padding: 8px 16px;
    border-right: 1px solid var(--mud-palette-lines-default);
    min-width: 0;
}

.pl-offer-fact:last-child { border-right: none; flex: 1.2; }
.pl-offer-fact.is-conversion { background: var(--pl-violet-tint); }
.pl-offer-fact.is-conversion .pl-offer-fact-key,
.pl-offer-fact.is-conversion .pl-offer-fact-value { color: var(--pl-violet); }

.pl-offer-fact-key {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mud-palette-text-disabled);
}

.pl-offer-fact-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    margin-top: 2px;
    color: var(--mud-palette-text-secondary);
}

.pl-offer-fact-value.is-strong { font-weight: 700; }
.pl-offer-fact-value.is-warn { color: var(--mud-palette-warning); font-weight: 600; }

/* Below the desktop breakpoint the master list stops being a sidebar. */
@media (max-width: 959.98px) {
    .pl-compare { flex-direction: column; }

    .pl-compare-master {
        width: auto;
        max-height: 40%;
        border-right: none;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }
}
