:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fa;
  color: #15181d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

p {
  color: #5c6573;
}

.manual-import,
.bookmarklet-section,
.table-section,
.details {
  background: #fff;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}

.bookmarklet-link {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  background: #1358d8;
  color: #fff;
  text-decoration: none;
}

#bookmarklet-code {
  min-height: 96px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.raw-details {
  margin-top: 18px;
}

.raw-details summary {
  margin-bottom: 12px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #cbd1da;
  border-radius: 6px;
  resize: vertical;
  font: inherit;
}

#import-form {
  margin-top: 14px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 650;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd1da;
  border-radius: 6px;
}

button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #1358d8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.secondary {
  background: #eef2f7;
  color: #20242b;
}

.danger {
  background: #fee4e2;
  color: #b42318;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status {
  min-height: 22px;
  margin: 10px 0 0;
}

.status.error {
  color: #b42318;
}

.status.ok {
  color: #067647;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e8ebef;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #677281;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f4f7fb;
}

tbody tr.selected {
  background: #eaf1ff;
  box-shadow: inset 3px 0 0 #1358d8;
}

tbody tr.selected:hover {
  background: #e1ebff;
}

.empty {
  color: #687385;
  text-align: center;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-width: 56px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.result-green {
  background: #dcfae6;
  color: #067647;
}

.result-yellow {
  background: #fef0c7;
  color: #93370d;
}

.result-red {
  background: #fee4e2;
  color: #b42318;
}

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

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

pre {
  max-height: 260px;
  overflow: auto;
  padding: 14px;
  border-radius: 6px;
  background: #101828;
  color: #f8fafc;
  white-space: pre-wrap;
}

a {
  color: #1358d8;
  font-weight: 700;
}

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

  .input-row,
  .details-grid {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
