.supplier-price-review-section {
    display: grid;
    gap: 12px;
}

.review-toolbar {
    position: sticky;
    top: 122px;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(140px, .85fr)) auto;
    align-items: end;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.review-toolbar label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.review-filter-count {
    align-self: center;
    justify-self: end;
    white-space: nowrap;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.review-list {
    display: grid;
    gap: 8px;
}

.review-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--warning);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
}

.review-card[data-review-risk="identity"] {
    border-left-color: var(--danger);
}

.review-card-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.review-card-header,
.review-card-badges,
.review-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-card-header {
    justify-content: space-between;
    min-width: 0;
}

.review-card-id {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.review-card-id strong {
    font-size: 1rem;
    line-height: 1.2;
}

.review-card-id span,
.review-card-grid small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-card-badges {
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.review-product-title {
    margin: 0;
    color: var(--text);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.review-risk {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
}

.review-risk.identity {
    background: #fff7f6;
    color: var(--danger);
    border: 1px solid #ffd9d6;
}

.review-risk.simple {
    background: #fffaf0;
    color: var(--warning);
    border: 1px solid #fde5b5;
}

.review-card-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 150px 150px;
    gap: 8px;
    padding: 7px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.review-card-grid > div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding-right: 10px;
    border-right: 1px solid var(--line-soft);
}

.review-card-grid > div:last-child {
    border-right: 0;
    padding-right: 0;
}

.review-card-grid span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.review-card-grid strong,
.review-change-before,
.review-change-after {
    overflow-wrap: anywhere;
}

.review-change-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.review-change {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: #fbfcfd;
}

.review-change.identity {
    border-color: #ffd9d6;
    background: #fff9f8;
}

.review-change-label {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
}

.review-change-before,
.review-change-after {
    display: grid;
    gap: 1px;
    min-width: 0;
    font-size: 0.84rem;
    line-height: 1.25;
}

.review-change-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-change-before small,
.review-change-after small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.review-change-before {
    color: var(--muted);
}

.review-change-after {
    color: var(--text);
    font-weight: 800;
}

.review-change-arrow {
    color: var(--muted);
    font-weight: 800;
}

.review-reason {
    margin: 0;
    padding: 10px;
    border-radius: 8px;
    background: var(--warning-bg);
    color: var(--warning);
    font-weight: 700;
}

.review-card-actions {
    flex-direction: column;
    justify-content: center;
    min-width: 94px;
}

.review-card-actions form,
.review-card-actions button {
    width: 100%;
}

.review-card-actions .button {
    min-height: 30px;
    padding: 5px 9px;
}

.review-empty {
    margin: 0;
}

.price-history-event-table td[data-label="Evento"] .status,
.price-history-event-table td[data-label="Revisione"] .status {
    margin-bottom: 4px;
}

.price-history-event-table td[data-label="Revisione"] a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.price-history-event-table td[data-label="Revisione"] a:hover,
.price-history-event-table td[data-label="Revisione"] a:focus {
    text-decoration: underline;
}

.price-history-event-table td[data-label="Data"],
.price-history-event-table td[data-label="Prezzo"] {
    white-space: nowrap;
}

.price-history-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.price-history-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.price-history-source-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.price-history-source-card > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.price-history-source-card strong {
    font-size: 20px;
    line-height: 1.15;
    white-space: nowrap;
}

.price-history-source-card small {
    min-width: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.price-history-source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.price-history-table table {
    table-layout: fixed;
}

.price-history-table th:nth-child(1),
.price-history-table td:nth-child(1) {
    width: 118px;
}

.price-history-table th:nth-child(2),
.price-history-table td:nth-child(2) {
    width: auto;
}

.price-history-table th:nth-child(3),
.price-history-table td:nth-child(3) {
    width: 126px;
}

.price-history-table th:nth-child(4),
.price-history-table td:nth-child(4) {
    width: 112px;
}

.price-history-table th:nth-child(5),
.price-history-table td:nth-child(5) {
    width: 150px;
}

.price-history-table th:nth-child(6),
.price-history-table td:nth-child(6) {
    width: 220px;
}

.price-history-source-cell {
    min-width: 260px;
}

.price-history-source-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.price-history-source-head strong {
    font-size: 13px;
    line-height: 1.25;
    color: var(--text);
}

.price-history-product-ref {
    max-width: 620px;
}

.price-history-product-ref span {
    font-weight: 700;
    color: var(--primary-strong);
}

.price-history-snapshot-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 7px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef5f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.price-history-snapshot-link:hover,
.price-history-snapshot-link:focus {
    background: #dfecef;
    color: var(--primary-strong);
}

.price-history-unit-cell {
    overflow-wrap: normal;
    word-break: normal;
}

.price-delta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf2f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.price-delta.is-up,
.price-delta.is-risk {
    background: var(--danger-bg);
    color: var(--danger);
}

.price-delta.is-down,
.price-delta.is-favorable {
    background: var(--success-bg);
    color: var(--success);
}

.price-delta.is-flat {
    background: var(--surface-muted);
    color: var(--text-soft);
}

