:root {
  --bg: #10131a;
  --card: #171b24;
  --card-2: #1e232e;
  --fg: #e6e9ef;
  --muted: #8f98a8;
  --accent: #4a9eff;
  --accent-2: #2f7fe0;
  --ok: #3ecf8e;
  --warn: #f5a524;
  --err: #f5566a;
  --border: #262c38;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

header {
  padding: 32px 24px 8px;
  max-width: 980px;
  margin: 0 auto;
}

header h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}

header .sub {
  color: var(--muted);
  margin: 6px 0 0;
}

.version {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  vertical-align: 3px;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 40px;
  color: var(--muted);
  font-size: 13px;
}

a {
  color: var(--accent);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #06111f;
  font-size: 12px;
  font-weight: 700;
}

.card.warn {
  border-color: var(--warn);
  background: #2a2113;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.row + .row {
  margin-top: 10px;
}

.tools {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

button {
  background: var(--card-2);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  transition: 0.12s;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

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

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06111f;
  font-weight: 600;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-2);
}

button.danger {
  border-color: var(--err);
  color: var(--err);
}

input[type="file"] {
  color: var(--muted);
  font: inherit;
}

.status {
  color: var(--muted);
  font-size: 14px;
}

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

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

.hint {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
}

.info {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 14px;
}

.info dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 0;
}

.info dt {
  color: var(--muted);
}

.info.error {
  border-color: var(--err);
  background: #2a1519;
  color: #ffd9de;
}

.info.notice {
  border-color: var(--accent);
  background: #12233a;
}

.dropzone {
  margin-top: 12px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: 0.12s;
}

.dropzone:hover,
.dropzone.over {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--card-2);
}

.file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
}

.file-list .fname {
  font-weight: 600;
  word-break: break-all;
}

.file-list .muted {
  margin-right: auto;
}

button.link {
  background: none;
  border: none;
  color: var(--muted);
  padding: 2px 4px;
  font-size: 13px;
  text-decoration: underline;
}

button.link:hover {
  color: var(--err);
}

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

select {
  background: var(--card-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  font: inherit;
  font-size: 13px;
}

.options {
  display: grid;
  gap: 8px;
}

.options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* checkbox | image | version | product/hw | from | size */
th:nth-child(1),
td:nth-child(1) {
  width: 34px;
  padding-right: 0;
}

th:nth-child(2),
td:nth-child(2) {
  width: 26%;
  white-space: normal;
}

th:nth-child(3),
td:nth-child(3) {
  width: 16%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 22%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 22%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 12%;
}

tr.chosen td {
  background: rgba(74, 158, 255, 0.06);
}

.tag {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 17px;
  color: var(--muted);
  vertical-align: 1px;
}

.tag.ok {
  border-color: var(--ok);
  color: var(--ok);
}

.showall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tr.unsupported td {
  opacity: 0.5;
}

pre#log {
  background: #0b0e14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0 0;
  max-height: 340px;
  overflow: auto;
  font: 12.5px/1.5 "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  background: #0b0e14;
  padding: 1px 5px;
  border-radius: 4px;
  font: 12.5px ui-monospace, Menlo, monospace;
}

#progress-wrap {
  margin-top: 16px;
}

.progress-line {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.progress-line > span:first-child {
  font-weight: 600;
}

.badge {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 12px;
  color: var(--accent);
  margin-right: auto;
}

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

.bar {
  height: 8px;
  background: var(--card-2);
  border-radius: 999px;
  overflow: hidden;
}

#bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.15s linear;
}

.notes ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.notes li + li {
  margin-top: 8px;
}

.hidden {
  display: none !important;
}
