:root {
  --bg: #0b1220;
  --bg-alt: #111a2e;
  --card: #151f35;
  --text: #e8edf7;
  --muted: #9aa8c3;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --border: rgba(255, 255, 255, 0.08);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #0d1528 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.container--narrow { width: min(720px, calc(100% - 32px)); margin: 0 auto; }

.header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.85);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.logo { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.logo__mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: grid; place-items: center; font-weight: 800;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

.hero { padding: 72px 0 56px; }
.hero__badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: rgba(59, 130, 246, 0.15); color: #93c5fd; font-size: 13px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 16px; max-width: 800px; }
.hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin-bottom: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.hero__trust span::before { content: '✓ '; color: var(--ok); }

.search-form__row {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.search-form input {
  flex: 1 1 280px; min-height: 54px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--text); font-size: 1rem;
}
.search-form input:focus { outline: 2px solid rgba(59,130,246,0.5); border-color: transparent; }
.search-form__hint { color: var(--muted); font-size: 14px; margin-top: 10px; }
.link-btn {
  background: none; border: none; color: #93c5fd; cursor: pointer; padding: 0; font: inherit;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  border: none; cursor: pointer; font-weight: 600; text-decoration: none;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--primary); color: white; }
.btn--primary:hover { background: var(--primary-hover); color: white; }
.btn--secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn--lg { min-height: 54px; width: 100%; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--danger { background: rgba(239,68,68,0.15); color: #fca5a5; }

.section { padding: 56px 0; }
.section--alt { background: rgba(255,255,255,0.02); border-block: 1px solid var(--border); }
.section h2 { font-size: 1.8rem; margin: 0 0 24px; }

.steps, .features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.step, .feature {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.step__num {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: rgba(59,130,246,0.2); color: #93c5fd; font-weight: 700; margin-bottom: 12px;
}
.price-banner {
  margin-top: 28px; padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(59,130,246,0.15), rgba(34,197,94,0.1));
  border: 1px solid var(--border);
}

.faq details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.card--empty { text-align: center; }
.eyebrow { color: #93c5fd; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin: 0 0 8px; }
.chassis-label { color: var(--muted); font-family: ui-monospace, monospace; }

.preview-flags {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0;
}
.flag {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; text-align: center;
}
.flag span { display: block; color: var(--muted); font-size: 13px; }
.flag strong { font-size: 1.25rem; }
.flag--ok strong { color: var(--ok); }
.flag--no strong { color: var(--muted); }
.flag--risk.risk--low strong { color: var(--ok); }
.flag--risk.risk--medium strong { color: var(--warn); }
.flag--risk.risk--high strong { color: var(--danger); }

.preview-note { color: var(--muted); }
.pay-form { margin-top: 24px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.field input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text);
}
.pay-form__note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 12px; }
.form-error { color: #fca5a5; }

.report-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.report-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.report-heading { margin: 0; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; }
.report-demo-note { margin-bottom: 1rem; border-color: #dacb00; }
.report-characteristics h2,
.report-bidding h2,
.report-sheet h2,
.info-comments h2 { margin-top: 0; }

.info-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.info-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.info-block__label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.info-block__value {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.info-comments ul { margin: 0; padding-left: 18px; }

.report-bidding__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.report-bidding__count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  font-weight: 700;
}

.bidding-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.bidding-row + .bidding-row { margin-top: 14px; }
.bidding-row__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.lot-info__auction {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.lot-info__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.bidding-row__badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.bidding-row__badge.status--ok { color: var(--ok); background: rgba(34,197,94,0.12); }
.bidding-row__badge.status--warn { color: var(--warn); background: rgba(245,158,11,0.12); }

.bidding-row__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
  gap: 16px;
  padding: 16px;
}
.trade-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.info-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.info-item strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.bidding-row__media {
  display: grid;
  gap: 10px;
  align-content: start;
}
.photos-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.row-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  padding: 0;
  cursor: zoom-in;
  min-height: 120px;
}
.row-photo img {
  width: auto;
  max-width: 100%;
  max-height: 180px;
  height: auto;
  object-fit: contain;
  display: block;
}
.row-photo--sheet img { max-height: 220px; }
.risk-badge {
  min-width: 110px; text-align: center; padding: 16px; border-radius: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.risk-badge strong { display: block; font-size: 2rem; line-height: 1; }
.risk-badge.risk--low strong { color: var(--ok); }
.risk-badge.risk--medium strong { color: var(--warn); }
.risk-badge.risk--high strong { color: var(--danger); }

.risk-panel ul { margin: 0; padding-left: 18px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { color: var(--muted); font-weight: 600; }

.report-summary { margin-bottom: 20px; }
.report-summary h2 { margin-top: 0; }
.report-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.report-summary__item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.report-summary__item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.report-summary__item strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.report-extra__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.report-extra__item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.report-extra__item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.report-extra__item strong { display: block; margin-top: 2px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 320px)); gap: 12px; justify-content: center; }
.gallery-item,
.report-sheet__open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 140px;
  padding: 8px;
  border: none;
  background: rgba(0,0,0,0.15);
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
}
.gallery img,
.gallery-item img,
.report-sheet__open img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.gallery--sheet img { max-width: 400px; }
.report-sheet__main {
  margin: 12px 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.report-sheet__main img {
  width: auto;
  max-width: 100%;
  max-height: 900px;
  height: auto;
  object-fit: contain;
  display: block;
}
.report-sheet__open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(3, 8, 20, 0.92);
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__stage {
  width: min(1100px, 100%);
  max-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}
.lightbox__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow);
  image-rendering: auto;
}
.lightbox__close,
.lightbox__nav {
  position: fixed;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
}
.lightbox__close {
  top: 20px;
  right: 20px;
}
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #dbeafe;
  font-size: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 6px 12px;
}

.sheet-legend__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.sheet-legend__item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.sheet-legend__item code {
  display: inline-block;
  background: rgba(59,130,246,0.16);
  color: #bfdbfe;
  border-radius: 8px;
  padding: 3px 8px;
  font-weight: 700;
  text-align: center;
}
.sheet-legend__item span {
  font-size: 14px;
  line-height: 1.4;
}
.sheet-translation .data-table th {
  width: 240px;
  white-space: nowrap;
}

.sheet-translation-sheet h2 { margin-top: 0; }
.sheet-top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 14px;
}
.sheet-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sheet-meta-grid > div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
}
.sheet-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.sheet-meta-grid strong { font-size: 15px; }
.sheet-grade-box {
  text-align: center;
}
.sheet-grade-box strong {
  font-size: 30px;
  line-height: 1;
  color: #fff;
}

.sheet-translation-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}
.sheet-translation-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.sheet-translation-content ul {
  margin: 0;
  padding-left: 18px;
}
.sheet-translation-content li {
  margin-bottom: 4px;
  line-height: 1.35;
}
.sheet-columns {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: rgba(255,255,255,0.02);
}
.sheet-columns h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.report-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; color: var(--muted); }
.footer__inner { display: grid; gap: 16px; }
.footer__links { display: flex; gap: 16px; }
.footer__copy { margin: 0; font-size: 13px; }

.prose h2 { margin-top: 24px; }
.prose ul { padding-left: 20px; }

.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-meta { margin-bottom: 16px; }
.admin-actions { display: flex; flex-direction: column; gap: 8px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.status { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); }
.status--ready { color: var(--ok); }
.status--refunded, .status--failed { color: #fca5a5; }
.status--pending_payment { color: var(--warn); }

@media (max-width: 720px) {
  .preview-flags { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .report-header, .report-top { flex-direction: column; }
  .listing-header { flex-direction: column; gap: 16px; }
  .info-blocks { grid-template-columns: 1fr; }
  .bidding-row__inner { grid-template-columns: 1fr; }
  .photos-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-legend__item { grid-template-columns: 1fr; }
  .sheet-translation .data-table th { width: auto; white-space: normal; }
  .sheet-meta-grid { grid-template-columns: 1fr 1fr; }
  .sheet-translation-content { grid-template-columns: 1fr; }
  .sheet-columns { grid-template-columns: 1fr; }
}

.listing-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; margin-bottom: 24px;
}
.listing-filters { margin-bottom: 24px; }
.listing-filters h2 { margin: 0 0 16px; font-size: 1.1rem; }
.listing-filters__grid { display: flex; flex-wrap: wrap; gap: 16px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; min-width: 140px; }
.filter-group__label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.filter-group__items { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-link {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: #93c5fd; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.filter-link:hover, .filter-link.is-active { background: rgba(59,130,246,0.2); border-color: rgba(59,130,246,0.4); }
.filter-link--reset { color: var(--muted); }

.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.listing-card {
  background: var(--card); border: 2px solid var(--card-accent, #66a16e);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.listing-card__image { background: rgba(0,0,0,0.2); padding: 8px; }
.listing-card__image img {
  width: 100%; height: auto; display: block; border-radius: 8px;
  border: 3px solid var(--card-accent, #66a16e);
}
.listing-card__body { padding: 16px; }
.listing-card__meta { margin: 0 0 16px; }
.listing-card__meta div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.listing-card__meta dt { color: var(--muted); margin: 0; }
.listing-card__meta dd { margin: 0; text-align: right; }
.listing-note { color: var(--muted); font-size: 14px; margin-top: 24px; }

.selected-variant {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  margin: 20px 0; padding: 16px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.selected-variant__img { width: 100%; border-radius: 8px; border: 2px solid var(--border); }
.muted { color: var(--muted); font-size: 14px; }

@media (max-width: 720px) {
  .selected-variant { grid-template-columns: 1fr; }
}
