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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.panel {
  background: #ffffff;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(27, 45, 73, 0.08);
  padding: 28px;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #667085;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.1;
}

.badge {
  flex: 0 0 auto;
  border: 1px solid #cdd6e3;
  border-radius: 999px;
  color: #526070;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 12px;
}

.badge.loading {
  border-color: #b7d4ff;
  color: #1457a8;
  background: #edf5ff;
}

.badge.done {
  border-color: #bfe4cd;
  color: #087443;
  background: #ecfdf3;
}

.badge.error {
  border-color: #ffc9c9;
  color: #c92a2a;
  background: #fff1f1;
}

.upload {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
}

.dropzone {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px dashed #9aa8ba;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  background: #fbfcfe;
}

.dropzone:focus-within,
.dropzone:hover {
  border-color: #2878d4;
  background: #f6faff;
}

.dropzone-title {
  font-weight: 800;
}

.dropzone-detail {
  color: #667085;
  font-size: 0.92rem;
}

#fileInput {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

button {
  min-width: 128px;
  border: 0;
  border-radius: 8px;
  background: #1d5f99;
  color: white;
  font-weight: 800;
  cursor: pointer;
  padding: 0 22px;
}

button:hover {
  background: #164c7c;
}

button:disabled {
  cursor: wait;
  background: #98a7b7;
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: #526070;
}

.message.error {
  color: #c92a2a;
  font-weight: 700;
}

.result-area {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
}

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

th,
td {
  border-bottom: 1px solid #e7ecf3;
  padding: 12px 14px;
  text-align: center;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  background: #f7f9fc;
  color: #425166;
  font-size: 0.82rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 900;
}

.mark.true {
  background: #dcfce7;
  color: #15803d;
}

.mark.false {
  background: #fee2e2;
  color: #b91c1c;
}

.json-box {
  margin-top: 16px;
}

.json-box summary {
  cursor: pointer;
  color: #425166;
  font-weight: 700;
}

pre {
  overflow: auto;
  border-radius: 8px;
  background: #101828;
  color: #e6edf6;
  padding: 16px;
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0;
  }

  .panel {
    padding: 18px;
  }

  .header,
  .upload {
    grid-template-columns: 1fr;
    display: grid;
  }

  .badge,
  button {
    width: 100%;
  }

  button {
    min-height: 48px;
  }
}
