/* f-providers.css — Service providers: directory, provider page, lane comparison, rate-sheet import. */

.pv-page .pv-tabs { margin-top: 4px; }
.pv-tab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; margin-inline-start: 4px; }
.tabs button:not(.active) .pv-tab-n { background: var(--surface-3); color: var(--text-3); }

/* ---------- small inputs used in editable tables ---------- */
.input.input-sm, .select.input-sm { height: 30px; padding: 0 8px; font-size: var(--fs-xs); border-radius: 8px; }

/* ---------- avatars / badges ---------- */
.pv-avatar { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.pv-avatar svg { width: 18px; height: 18px; }
.pv-avatar.xl { width: 68px; height: 68px; border-radius: var(--r-xl); } .pv-avatar.xl svg { width: 30px; height: 30px; }
.pv-avatar.k-carrier, .pv-kind.k-carrier { background: color-mix(in srgb, var(--sky-500) 16%, var(--surface)); color: var(--sky-500); }
.pv-avatar.k-airline, .pv-kind.k-airline { background: color-mix(in srgb, var(--info) 16%, var(--surface)); color: var(--info); }
.pv-avatar.k-trucker, .pv-kind.k-trucker { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.pv-avatar.k-agent, .pv-kind.k-agent { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--brand-ink); }
.pv-avatar.k-customs_broker, .pv-kind.k-customs_broker { background: color-mix(in srgb, var(--navy) 14%, var(--surface)); color: var(--navy); }
.pv-avatar.k-insurer, .pv-kind.k-insurer { background: color-mix(in srgb, var(--success) 16%, var(--surface)); color: var(--success); }
.pv-avatar.k-warehouse, .pv-kind.k-warehouse { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning); }
.pv-avatar.k-courier, .pv-kind.k-courier { background: color-mix(in srgb, var(--lime-mid) 22%, var(--surface)); color: var(--brand-ink); }
.pv-avatar.k-competitor, .pv-kind.k-competitor { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.pv-kind { border: 0; }
.pv-stars { display: inline-flex; gap: 1px; color: var(--border-strong); }
.pv-stars svg { width: 13px; height: 13px; } .pv-stars svg.on { color: var(--warning); fill: var(--warning); }
.pv-fresh small { opacity: .7; font-weight: 500; }
.pv-src { background: var(--surface-3); }
.pv-change { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-change svg { width: 13px; height: 13px; } .pv-change svg.flipv { transform: scaleY(-1); }
.pv-change.up { color: var(--danger); } .pv-change.down { color: var(--success); } .pv-change.flat { color: var(--text-3); }
.pv-badge { border: 0; font-weight: 600; }
.pv-badge.b-cheapest { background: color-mix(in srgb, var(--success) 18%, var(--surface)); color: var(--success); }
.pv-badge.b-fastest { background: color-mix(in srgb, var(--info) 18%, var(--surface)); color: var(--info); }
.pv-badge.b-freshest { background: color-mix(in srgb, var(--ai) 18%, var(--surface)); color: var(--ai); }
.pv-spark { color: var(--text-3); display: block; } .pv-spark.up { color: var(--danger); } .pv-spark.down { color: var(--success); }

/* ---------- lane + price cells ---------- */
.pv-page .grid .stat { min-width: 0; } .pv-page .stat .delta { white-space: normal; }
.pv-lane { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); min-width: 220px; }
.pv-lane > span:not(.arr) { white-space: nowrap; }
.pv-lane .arr { color: var(--text-3); display: inline-flex; } .pv-lane .arr svg { width: 14px; height: 14px; }
.pv-price { display: flex; flex-direction: column; gap: 1px; align-items: flex-end; white-space: nowrap; font-family: inherit; } .pv-price b { font-size: var(--fs-md); }
.tbl td.num .pv-price, .tbl td.num .pv-price * { font-family: inherit; }
.tbl td.num:has(.pv-price) { font-family: inherit; }
.pv-rates th:last-child, .pv-cmp th:last-child { min-width: 96px; }
.pv-cmp td:nth-child(6) { min-width: 150px; } .pv-cmp td:nth-child(7), .pv-rates td:nth-child(4) { white-space: nowrap; }
.pv-cmp td .xs.muted { white-space: normal; }
.tbl td:first-child .pv-price { align-items: flex-start; }

/* ---------- market strip ---------- */
.pv-market { display: flex; gap: 10px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.pv-index { flex: none; min-width: 170px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.pv-index b { font-size: var(--fs-lg); }
.pv-market.compact .pv-index { min-width: 150px; padding: 8px 10px; } .pv-market.compact .pv-index b { font-size: var(--fs-md); }

/* ---------- market indices tab ---------- */
.pv-idx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pv-idx-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); }
.pv-idx-card.is-empty { opacity: .7; border-style: dashed; }
.pv-idx-val { font-size: var(--fs-xl); }

/* ---------- coverage grid ---------- */
.pv-cov { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pv-cov-cell { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: transform var(--t-fast), box-shadow var(--t-fast); position: relative; overflow: hidden; }
.pv-cov-cell::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--success); }
.pv-cov-cell.stale::before { background: var(--warning); }
.pv-cov-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pv-cov-cell .lane { font-size: var(--fs-xs); color: var(--text-2); display: flex; align-items: center; gap: 4px; } .pv-cov-cell .lane .arr svg { width: 12px; height: 12px; }
.pv-cov-cell b { font-size: var(--fs-md); }

/* ---------- pills / contacts ---------- */
.pv-chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pv-pill svg { width: 16px; height: 16px; color: var(--text-3); }
.pv-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.pv-contact { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); }
.pv-contact.primary { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.pv-kvs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; } .pv-kv { display: flex; flex-direction: column; gap: 2px; } .pv-kv b { font-weight: 600; word-break: break-word; }

/* ---------- history ---------- */
.pv-hist-row td { background: var(--surface-2); }
.pv-hist { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.pv-hist-list { display: flex; flex-direction: column; gap: 4px; }
.pv-hist-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 8px; border-radius: 8px; background: var(--surface); }
.pv-hist-item b { min-width: 90px; }

/* ---------- compare ---------- */
.pv-crit { display: grid; grid-template-columns: auto 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.pv-crit .pv-modes { display: flex; gap: 6px; align-self: end; height: var(--control-h); align-items: center; }
.pv-crit .field { margin: 0; }
@media (max-width: 1000px) { .pv-crit { grid-template-columns: 1fr 1fr; } .pv-crit .pv-modes { grid-column: 1 / -1; } .pv-crit button[type=submit] { grid-column: 1 / -1; } }
.pv-summary .fact b { font-size: var(--fs-xl); }
.pv-cmp tr.best td { background: color-mix(in srgb, var(--success) 7%, transparent); }
.pv-cmp tr.competitor td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.pv-cmp tr.best td:first-child { box-shadow: inset 4px 0 0 var(--success); }
[dir="rtl"] .pv-cmp tr.best td:first-child { box-shadow: inset -4px 0 0 var(--success); }

/* ---------- pending / review tables ---------- */
.pv-pend tr.low td, .pv-review tr.low td { background: color-mix(in srgb, var(--warning) 9%, transparent); }
.pv-pend tr.ok td { background: color-mix(in srgb, var(--success) 14%, transparent); transition: background var(--t-base); }
.pv-pend tr.off td { opacity: .4; transition: opacity var(--t-base); }
.pv-review td, .pv-pend td { padding: 6px 8px; vertical-align: top; } .pv-review th, .pv-pend th { padding-inline: 8px; }

/* ---------- import steps ---------- */
.pv-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; }
[dir="rtl"] .pv-step { padding: 6px 6px 6px 14px; }
.pv-step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); }
.pv-step svg { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--success); color: #fff; }
.pv-step.active { color: var(--text); border-color: var(--brand); } .pv-step.active .n { background: var(--brand); color: #fff; }
.pv-step.done { color: var(--success); }
.pv-drop { border-style: dashed; } .pv-drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.pv-import textarea { min-height: 200px; font-size: var(--fs-xs); }
.pv-done .empty .ico { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: var(--success); }

/* ---------- rate modal surcharges / checks ---------- */
.pv-checks label.check svg { width: 14px; height: 14px; }
.pv-sur { align-items: center; }

/* ---------- Nola deal card: buy side ---------- */
.nola-buy { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.nola-buy .lane { font-size: var(--fs-xs); color: var(--text-3); display: flex; justify-content: space-between; gap: 8px; }
.nola-buy-opt { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); font-size: var(--fs-sm); }
.nola-buy-opt.best { background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.nola-buy-opt .nm { display: flex; flex-direction: column; gap: 1px; min-width: 0; } .nola-buy-opt .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nola-buy-total { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); } .nola-buy-total b { font-size: var(--fs-md); color: var(--success); }
