:root {
  color-scheme: light;
  --ink: #1e2528;
  --muted: #627078;
  --line: #d8e0dd;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --accent: #0f8a83;
  --accent-strong: #0b6f69;
  --warning: #ad5c1e;
  --shadow: 0 18px 50px rgba(30, 37, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 138, 131, 0.12), rgba(184, 64, 77, 0.08)),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.2rem;
}

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.import-panel {
  padding: 16px;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 230px;
  padding: 22px;
  border: 2px dashed #9ab6b2;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  background: rgba(15, 138, 131, 0.08);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 2rem;
  line-height: 1;
}

.drop-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.drop-copy,
#statusText {
  color: var(--muted);
  line-height: 1.45;
}

.settings {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
}

select {
  appearance: auto;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

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

.primary {
  min-width: 150px;
  background: var(--accent);
  color: white;
}

.primary:not(:disabled):hover,
.secondary:not(:disabled):hover {
  background: var(--accent-strong);
}

.secondary {
  background: var(--accent);
  color: white;
}

.ghost {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.sample-panel {
  min-width: 0;
  overflow: hidden;
}

.sample-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 190px);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf5f3;
  color: #415058;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 0.92rem;
}

th:nth-child(1),
td:nth-child(1) {
  width: 42%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 15%;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5) {
  width: 11%;
}

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

.sample-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.note-input {
  min-height: 34px;
  padding: 6px 8px;
}

.remove-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: #9f2f3e;
}

.empty-row td {
  height: 160px;
  color: var(--muted);
  text-align: center;
}

.busy {
  color: var(--warning);
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100vw - 20px, 680px);
    padding: 18px 0;
  }

  .topbar,
  .workspace {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .primary {
    width: 100%;
  }

  .workspace {
    display: grid;
  }

  .table-wrap {
    max-height: none;
  }

  table {
    min-width: 720px;
  }
}
