/*
 * Raport wyceny v2 (AF-9113) — jeden renderer dla strony CV, One Report i One Report v3.
 * Wszystko pod .vv2 i z prefiksem
 * vv-, bo layouty raportów ładują Bootstrap 4 (.card, .btn, .legend, .info) i Tailwind (.hidden, .flex);
 * plik nie zależy od żadnego z nich. Wykresy to inline SVG z ValuationV2Helper.
 */
.vv2 {
  --vv-blue: #2d6294;
  --vv-blue-dark: #04447c;
  --vv-blue-soft: #eaf1f8;
  --vv-blue-mid: #b9cfe4;
  --vv-sky: #4aa2ef;
  --vv-sky-soft: rgba(74, 162, 239, .3);
  --vv-sky-mid: rgba(74, 162, 239, .45);
  --vv-green: #28a745;
  --vv-green-text: #1e7b34;
  --vv-orange-text: #a85a00;
  --vv-ink: #212529;
  --vv-ink2: #495057;
  --vv-muted: #5f676f;
  --vv-light: #f1f1f1;
  --vv-line: #dee2e6;
  --vv-line2: #adb5bd;
  --vv-warn-bg: #fff8e1;
  --vv-warn-line: #f0b400;
  --vv-warn-ink: #5c4000;
  --vv-f-head: 'Khand', 'Kanit', 'Arial Narrow', sans-serif;
  --vv-f-label: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --vv-f-mono: 'Roboto Mono', ui-monospace, monospace;
  --vv-f-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  display: flex; flex-direction: column; gap: 24px;
  color: var(--vv-ink); font-family: var(--vv-f-body); font-size: 16px; line-height: 1.5; text-align: start;
}
.vv2 *, .vv2 *::before, .vv2 *::after { box-sizing: border-box; }
.vv2 [hidden] { display: none !important; }
.vv2 h1, .vv2 h2, .vv2 h3, .vv2 h4, .vv2 p, .vv2 dl, .vv2 dd, .vv2 dt, .vv2 ol, .vv2 ul, .vv2 figure { margin: 0; padding: 0; }
.vv2 a { color: var(--vv-blue-dark); }
.vv2 a:hover { color: var(--vv-blue); }
.vv2 svg { max-width: 100%; }
.vv2 :focus-visible { outline: 3px solid var(--vv-sky); outline-offset: 2px; }

.vv2 .vv-htitle { font-family: var(--vv-f-head); font-weight: 600; color: var(--vv-blue); line-height: 1.2; }
.vv2 h1.vv-htitle { font-size: 2.6rem; }
.vv2 h2.vv-htitle { font-size: 2rem; }
.vv2 .vv-sub { font-family: var(--vv-f-mono); text-transform: uppercase; font-size: 1.125rem; }
.vv2 .vv-muted { color: var(--vv-muted); }
.vv2 .vv-hint { font-size: .8125rem; color: var(--vv-muted); }
.vv2 .vv-hint-b { display: block; text-transform: none; }

/* karty */
.vv2 .vv-card { background: #fff; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.16); overflow: hidden; border: 0; }
.vv2 .vv-card.vv-accent { box-shadow: 0 0 0 3px var(--vv-sky), 0 2px 8px rgba(0,0,0,.16); }
.vv2 .vv-card-head { background: var(--vv-blue); color: #fff; padding: 8px 16px 10px; }
.vv2 .vv-card-head h3 { font-family: var(--vv-f-head); font-weight: 600; font-size: 2rem; line-height: 1.2; color: #fff; }
.vv2 .vv-card-head p { font-size: .9375rem; color: #fff; }
.vv2 .vv-card-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.vv2 .vv-card-body.vv-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.vv2 .vv-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* fakty pojazdu */
.vv2 .vv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; }
.vv2 .vv-fact > span { display: block; font-family: var(--vv-f-label); font-weight: 600; color: var(--vv-blue); }
.vv2 .vv-fact > p { font-family: var(--vv-f-mono); text-transform: uppercase; overflow-wrap: anywhere; }
.vv2 .vv-fact > p small { display: block; font-family: var(--vv-f-body); text-transform: none; font-size: .8125rem; color: var(--vv-muted); }
.vv2 .vv-fact .vv-hint { display: block; font-family: var(--vv-f-body); text-transform: none; }
.vv2 .vv-fact .vv-hint.vv-warn { color: var(--vv-warn-ink); }

.vv2 .vv-vtable { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); border-top: 1px solid var(--vv-line); }
.vv2 .vv-vtable dt, .vv2 .vv-vtable dd { padding: 9px 0; border-bottom: 1px solid var(--vv-line); }
.vv2 .vv-vtable dt { font-family: var(--vv-f-label); font-weight: 600; color: var(--vv-blue); padding-inline-end: 16px; }
.vv2 .vv-vtable dd { font-family: var(--vv-f-mono); font-size: .9375rem; text-transform: uppercase; }
.vv2 .vv-vtable dd .vv-flag, .vv2 .vv-vtable dd .vv-hint { text-transform: none; }

.vv2 .vv-lesson { background: var(--vv-light); border: 1px solid var(--vv-line); padding: 10px 12px; font-size: .875rem; }
.vv2 .vv-lesson > strong:first-child { display: block; font-size: 1rem; font-weight: 400; text-transform: uppercase; margin-bottom: 4px; }
.vv2 .vv-lesson a { display: block; margin-top: 6px; }

/* cena i przedziały */
.vv2 .vv-eyebrow { font-family: var(--vv-f-label); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--vv-blue); }
.vv2 .vv-price { font-family: var(--vv-f-mono); font-weight: 700; color: var(--vv-green-text); line-height: 1.1; font-size: 3rem; letter-spacing: -.02em; white-space: nowrap; }
.vv2 .vv-price .vv-cur { font-size: .55em; color: var(--vv-ink); letter-spacing: 0; }
.vv2 .vv-price.vv-md { font-size: 2.25rem; }
.vv2 .vv-price-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px 40px; align-items: start; }

/* pasek: przedział 50 % wyraźny, 80 % cichszy (cieńszy, bez obramowania, mniejsze liczby); w raporcie z jednym przedziałem (.vv-one) bez wyciszenia */
.vv2 .vv-rng { position: relative; height: 78px; margin: 10px 0 0; }
.vv2 .vv-rng.vv-dim { opacity: .6; }
.vv2 .vv-rng .vv-t { position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--vv-line); }
.vv2 .vv-rng .vv-r80 { position: absolute; top: 17px; height: 12px; background: var(--vv-sky-mid); border-radius: 2px; }
.vv2 .vv-rng .vv-r50 { position: absolute; top: 7px; height: 32px; background: var(--vv-blue-mid); border: 2px solid var(--vv-blue); border-radius: 2px; }
.vv2 .vv-rng .vv-pm { position: absolute; top: 0; width: 4px; height: 46px; margin-left: -2px; background: var(--vv-green); }
.vv2 .vv-rng .vv-x { position: absolute; top: 50px; transform: translateX(-50%); font-variant-numeric: tabular-nums; font-size: .9375rem; white-space: nowrap; }
.vv2 .vv-rng .vv-x.vv-in { font-weight: 700; color: var(--vv-ink); }
.vv2 .vv-rng .vv-x.vv-out { top: 52px; font-size: .8125rem; color: var(--vv-muted); }
.vv2 .vv-one .vv-rng .vv-x.vv-out { top: 50px; font-size: .9375rem; font-weight: 700; color: var(--vv-ink); }

/* klucz kolorów paska i kanału na wykresie przebiegu */
.vv2 .vv-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: .9375rem; }
.vv2 .vv-key li { display: flex; align-items: center; gap: 8px; }
.vv2 .vv-key .vv-key-out { color: var(--vv-muted); }
.vv2 .vv-one .vv-key .vv-key-out { color: var(--vv-ink); }
.vv2 .vv-sw { display: inline-block; flex: none; width: 22px; height: 14px; }
.vv2 .vv-sw.vv-r50 { background: var(--vv-blue-mid); border: 2px solid var(--vv-blue); }
.vv2 .vv-sw.vv-r80 { height: 8px; background: var(--vv-sky-mid); }
.vv2 .vv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* miernik dokładności */
.vv2 .vv-meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; list-style: none; padding: 0; margin-top: 6px; }
.vv2 .vv-meter li { border-top: 6px solid var(--vv-line); padding-top: 5px; font-family: var(--vv-f-label); font-size: .8125rem; color: var(--vv-muted); line-height: 1.2; }
.vv2 .vv-meter li.vv-d { border-top-color: var(--vv-blue); }
.vv2 .vv-meter li.vv-c { color: var(--vv-ink); font-weight: 700; }
.vv2 .vv-meter li.vv-req { border-top: 6px dashed var(--vv-line2); }
.vv2 .vv-acc { font-family: var(--vv-f-label); font-weight: 600; }
.vv2 .vv-acc b { color: var(--vv-blue); }

/* komunikaty */
.vv2 .vv-note, .vv2 .vv-info { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-size: .9375rem; }
.vv2 .vv-note { background: var(--vv-warn-bg); border: 1px solid var(--vv-warn-line); color: var(--vv-warn-ink); }
.vv2 .vv-info { background: var(--vv-light); border: 1px solid var(--vv-line); }
.vv2 .vv-note svg, .vv2 .vv-info svg { flex: none; margin-top: 3px; }
.vv2 .vv-flag { display: inline-block; font-family: var(--vv-f-label); font-size: .75rem; font-weight: 700; text-transform: uppercase; padding: 1px 6px; background: var(--vv-warn-bg); border: 1px solid var(--vv-warn-line); color: var(--vv-warn-ink); vertical-align: 2px; margin-inline-start: 4px; }

/* przyciski */
.vv2 .vv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 20px; border: 1px solid transparent; border-radius: 0; font-family: var(--vv-f-label); font-size: 1.0625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; text-align: center; cursor: pointer; align-self: flex-start; }
.vv2 .vv-btn.vv-p { background: var(--vv-blue); border-color: var(--vv-blue); color: #fff; }
.vv2 .vv-btn.vv-p:hover { background: var(--vv-blue-dark); color: #fff; }
.vv2 .vv-btn.vv-a { background: var(--vv-sky); color: #fff; box-shadow: 0 4px 6px rgba(0,0,0,.3); }
.vv2 .vv-btn.vv-a:hover { background: #2f8fe3; color: #fff; }
.vv2 .vv-btn.vv-s { background: #fff; border-color: var(--vv-blue); color: var(--vv-blue); }
.vv2 .vv-btn.vv-s:hover { background: var(--vv-blue-soft); }

/* stany bez wyceny */
.vv2 .vv-empty { align-items: center; text-align: center; }
.vv2 .vv-empty .vv-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--vv-light); border: 1px solid var(--vv-line); display: flex; align-items: center; justify-content: center; color: var(--vv-blue); }
.vv2 .vv-empty h4 { font-family: var(--vv-f-head); font-weight: 600; color: var(--vv-blue); font-size: 1.6rem; line-height: 1.15; }
.vv2 .vv-empty p { max-width: 460px; }
.vv2 .vv-empty .vv-btn { align-self: center; }
.vv2 .vv-pending { align-items: center; text-align: center; }
.vv2 .vv-spin { width: 40px; height: 40px; border: 4px solid var(--vv-blue-mid); border-top-color: var(--vv-blue); border-radius: 50%; animation: vv-spin 1s linear infinite; }
@keyframes vv-spin { to { transform: rotate(360deg); } }

/* wykresy */
.vv2 .vv-charts { display: flex; flex-direction: column; }
.vv2 .vv-charts > section { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.vv2 .vv-charts > section + section { border-top: 1px solid var(--vv-line); }
.vv2 .vv-chart-title { font-family: var(--vv-f-head); font-weight: 600; color: var(--vv-blue); font-size: 1.6rem; text-align: center; }
.vv2 .vv-chart { overflow-x: auto; }
.vv2 .vv-chart svg { display: block; width: 100%; min-width: 640px; height: auto; }
.vv2 .vv-chart .vv-grid line { stroke: #e6e6e6; }
.vv2 .vv-chart .vv-axis text { fill: var(--vv-ink); font-family: var(--vv-f-body); font-size: 14px; }
.vv2 .vv-chart .vv-axis-title { fill: var(--vv-blue); font-family: var(--vv-f-body); font-size: 14px; }
.vv2 .vv-chart .vv-area { fill: var(--vv-sky-soft); }
.vv2 .vv-chart .vv-band { fill: var(--vv-blue-mid); fill-opacity: .55; }
.vv2 .vv-chart .vv-band-edge { fill: none; stroke: var(--vv-blue); stroke-width: 1.5; }
.vv2 .vv-chart .vv-line { fill: none; stroke: var(--vv-sky); stroke-width: 3; }
.vv2 .vv-chart .vv-dot { fill: var(--vv-blue); }
.vv2 .vv-chart .vv-me { fill: var(--vv-green); stroke: #fff; stroke-width: 3; }
.vv2 .vv-chart .vv-val { font-family: var(--vv-f-body); font-size: 14px; fill: var(--vv-blue); }
.vv2 .vv-chart .vv-val.vv-me-t { fill: var(--vv-green-text); font-weight: 700; font-size: 16px; }
.vv2 .vv-chart .vv-cur-x { font-weight: 700; }

/* zastrzeżenia */
.vv2 .vv-factors { list-style: disc; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; }
.vv2 .vv-disclaimer { display: flex; flex-direction: column; gap: 10px; }
.vv2 .vv-disclaimer h4 { font-family: var(--vv-f-head); font-weight: 600; color: var(--vv-blue); font-size: 1.6rem; }
.vv2 .vv-disclaimer ol { padding-inline-start: 22px; font-size: .75rem; text-align: justify; display: flex; flex-direction: column; gap: 6px; }


@media (max-width: 1100px) { .vv2 .vv-price-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) {
  .vv2 .vv-card-head h3 { font-size: 1.6rem; }
  .vv2 .vv-card-body { padding: 16px; }
  .vv2 .vv-price { font-size: 2.4rem; }
  .vv2 .vv-price.vv-md { font-size: 2rem; }
  .vv2 .vv-rng .vv-x.vv-in { top: 68px; }
  .vv2 .vv-rng { height: 92px; }
  .vv2 .vv-vtable { grid-template-columns: 1fr; }
  .vv2 .vv-vtable dt { border-bottom: 0; padding-bottom: 0; }
  .vv2 .vv-vtable dd { padding-top: 0; }
  .vv2 .vv-charts > section { padding: 16px; }
}
@media print {
  .vv2 .vv-card { box-shadow: none; border: 1px solid var(--vv-line); }
  .vv2 .vv-btn { display: none; }
}
