:root {
  --ink: #16211d;
  --muted: #5c6b65;
  --line: #dfe3e0;
  --bg: #f0f3f1;
  --surface: #fff;
  --teal: #0f6e56;
  --green: #157b5a;
  --green-soft: #e3f5ec;
  --yellow: #9a6309;
  --yellow-soft: #fbf0de;
  --red: #a11d2e;
  --red-soft: #f8e6e9;
  --gray: #6b7280;
  --blue: #1a4f8b;
  --blue-soft: #e4eef8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, #d8ebe3 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 48px; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
h1 { margin: 8px 0 4px; font-size: 1.75rem; letter-spacing: -0.02em; }
.sub { margin: 0 0 22px; color: var(--muted); }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
}
.panel h2 { margin: 0 0 12px; font-size: 1.1rem; }
.meta { color: var(--muted); font-size: 0.95rem; line-height: 1.5; white-space: pre-line; }
.warn {
  margin: 10px 0;
  padding: 10px 12px;
  background: var(--yellow-soft);
  color: var(--yellow);
  border-radius: 8px;
  font-weight: 600;
}
.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  margin-right: 8px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn.ghost { background: transparent; }
.drop {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}
.drop.drag { border-color: var(--teal); background: #eef7f3; }
.file-name { margin-top: 8px; color: var(--ink); font-weight: 600; }
.progress { margin-top: 10px; font-size: 0.9rem; color: var(--muted); white-space: pre-line; }
.bar-wrap {
  margin-top: 12px;
  height: 10px;
  background: #e5ebe8;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0f6e56, #2a9d7a);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.bar-fill.indeterminate {
  width: 35%;
  animation: barpulse 1.2s ease-in-out infinite;
}
@keyframes barpulse {
  0% { transform: translateX(-20%); }
  50% { transform: translateX(180%); }
  100% { transform: translateX(-20%); }
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.stat .label { font-size: 0.75rem; color: var(--muted); }
.stat .value { font-size: 1.25rem; font-weight: 700; }
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.card.match { border-left: 4px solid var(--green); background: var(--green-soft); }
.card.norm { border-left: 4px solid #3d9b6e; background: #eefaf3; }
.card.warn { border-left: 4px solid var(--yellow); background: var(--yellow-soft); }
.card.bad { border-left: 4px solid var(--red); background: var(--red-soft); }
.card.gray { border-left: 4px solid var(--gray); background: #f3f4f6; }
.card.info { border-left: 4px solid var(--blue); background: var(--blue-soft); }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.card-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}
.badge-status {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  color: var(--ink);
}
.card .row { margin: 5px 0; font-size: 0.92rem; }
.card .row.muted { color: var(--muted); }
.card .k {
  display: inline-block;
  min-width: 7.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin: 10px 0;
}
.compare-col {
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.compare-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.compare-val {
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
}
.compare-arrow {
  align-self: center;
  color: var(--muted);
  font-weight: 700;
}
.hint {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  line-height: 1.4;
}
.hint strong { display: block; margin-bottom: 2px; }
.apply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 640px) {
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { display: none; }
  .card .k { min-width: 6rem; }
}
.toolbar { margin: 10px 0; }
.msg { font-weight: 600; }
.ver { color: var(--muted); font-size: 0.85rem; }
.error-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.registry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .registry-grid { grid-template-columns: 1fr; }
}
.registry-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fafbfa;
}
.registry-flag { font-weight: 800; font-size: 1.05rem; }
.registry-name { color: var(--muted); margin: 2px 0 10px; font-size: 0.9rem; }
.source-pick {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}
.source-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-weight: 600;
  cursor: pointer;
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.country-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 8px;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.country-pill.ru { background: #e8f0fa; }
.country-pill.kz { background: #eaf6ef; }

