.prep-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.prep-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }

.prep-card {
  background: linear-gradient(180deg, #111218, #0b0c10);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 16px;
}

.prep-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.prep-card-head h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.prep-card-head p { margin-top: 4px; font-size: 11px; color: var(--text-muted); line-height: 1.5; max-width: 65ch; }

.prep-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.prep-stat {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0d0f14;
  display: grid;
  gap: 3px;
}

.prep-stat .k { font-size: 9px; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 800; }
.prep-stat .v { font-family: var(--font-mono); font-size: 22px; font-weight: 600; line-height: 1.1; }
.prep-stat .s { font-size: 10px; color: var(--text-muted); }
.prep-stat.is-bad { border-color: rgba(255, 43, 43, 0.45); }
.prep-stat.is-bad .v { color: var(--red); }
.prep-stat.is-good .v { color: #fff; }

.prep-verdict {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: #0a0b0f;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.prep-verdict.is-ready { border-color: rgba(255, 255, 255, 0.25); }
.prep-verdict.is-blocked { border-color: rgba(255, 43, 43, 0.45); background: rgba(255, 43, 43, 0.06); }
.prep-verdict b { font-size: 13px; }
.prep-verdict .bar { flex: 1; height: 4px; background: #262a35; border-radius: 2px; overflow: hidden; }
.prep-verdict .bar i { display: block; height: 100%; background: #fff; }
.prep-verdict.is-blocked .bar i { background: var(--red); }

.blocked-list { display: grid; gap: 5px; max-height: 300px; overflow: auto; }

.blocked-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #0d0f14;
}

.blocked-row .b-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocked-row .b-sub { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocked-row .b-actions { display: flex; gap: 5px; }

.drop-zone {
  border: 1px dashed #2c313d;
  border-radius: 10px;
  padding: 20px;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.15s;
}
.drop-zone.is-over { border-color: var(--red); background: rgba(255, 43, 43, 0.06); color: var(--text); }
.drop-zone b { color: var(--text); font-size: 13px; }
.drop-zone .row { display: flex; gap: 8px; }

.import-progress { height: 5px; background: #262a35; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.import-progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.15s linear; }
.import-log { margin-top: 8px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); max-height: 120px; overflow: auto; display: grid; gap: 2px; }
.import-log .is-ok { color: var(--text-dim); }
.import-log .is-err { color: var(--red); }

.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #0d0f14;
  align-items: center;
}
.match-row .m-pair { display: grid; gap: 2px; min-width: 0; }
.match-row .m-meta { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-row .m-local { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-row .m-score { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.match-row.is-applied { opacity: 0.55; border-style: dashed; }

.manual-row { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); margin-top: 10px; }
.manual-row .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.prep-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 8px; color: var(--text-muted); font-size: 11px; text-align: center; }

.prep-locked {
  display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center;
  height: 100%; border: 1px dashed var(--line); border-radius: var(--radius-l); padding: 30px; color: var(--text-muted);
}
.prep-locked b { color: var(--text); font-size: 16px; }
.prep-locked p { max-width: 440px; line-height: 1.6; font-size: 12px; }

@media (max-width: 1200px) {
  .prep-layout { grid-template-columns: 1fr; overflow: auto; }
}
