:root {
  --bg: #f4f7fb;
  --surface: #fff;
  --line: #d7e0ea;
  --text: #16212c;
  --muted: #617182;
  --accent: #0b7f75;
  --accent-2: #08685f;
  --danger: #b42318;
  --warn: #946200;
  --shadow: 0 10px 26px rgba(22, 33, 44, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.status {
  min-width: 190px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

.status.ok {
  color: var(--accent);
}

.status.warn {
  color: var(--warn);
}

.status.error {
  color: var(--danger);
}

.status.work {
  color: var(--muted);
}

.panel,
.stats > div,
.result > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.wide {
  grid-column: span 2;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field span,
h2 {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input[type="file"],
input[type="number"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button:first-child:hover {
  background: var(--accent-2);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.stats > div {
  padding: 14px;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stats strong {
  display: block;
  margin-top: 5px;
  font-size: 26px;
}

.progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress__track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.progress__bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 160ms ease;
}

.result {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(360px, 1.3fr);
  gap: 14px;
}

h2 {
  height: 38px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

pre,
textarea {
  width: 100%;
  height: 430px;
  margin: 0;
  border: 0;
  color: var(--text);
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.45;
}

pre {
  overflow: auto;
  padding: 12px 14px;
  white-space: pre-wrap;
}

textarea {
  display: block;
  resize: vertical;
  min-height: 430px;
  padding: 12px 14px;
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .checks {
    flex-direction: column;
  }

  .status {
    min-width: 0;
    justify-content: flex-start;
  }

  .grid,
  .stats,
  .result {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: span 1;
  }
}
