:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #162033;
  --muted: #5d687a;
  --line: #d9e0ea;
  --panel: #ffffff;
  --brand: #176b87;
  --brand-dark: #104f64;
  --accent: #d76f30;
  --ok: #1f7a4d;
  --shadow: 0 22px 55px rgba(36, 48, 74, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(23, 107, 135, 0.08), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.workspace {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.intro {
  padding: 14px 0 0;
}

.eyebrow,
.label {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.summary {
  margin: 20px 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.panel,
.results {
  background: var(--panel);
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.drop-zone {
  min-height: 260px;
  border: 1.5px dashed #9aa8b8;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  background: #edf8fb;
  border-color: var(--brand);
  transform: translateY(-1px);
}

.drop-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f3f6;
  color: var(--brand);
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-icon svg {
  width: 30px;
  height: 30px;
}

.drop-title {
  font-size: 1.25rem;
  font-weight: 760;
}

.drop-detail {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 740;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--brand-dark);
}

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

button.ghost {
  color: var(--brand-dark);
  background: #eef4f7;
}

button.ghost:hover:not(:disabled) {
  background: #dfeaf0;
}

.results {
  grid-column: 1 / -1;
  padding: 18px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

#status {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metrics span {
  min-width: 108px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f6f9;
  color: var(--muted);
  text-align: center;
}

.metrics strong {
  color: var(--ink);
}

.table-wrap {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  background: #f3f6f9;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #465367;
  letter-spacing: 0;
}

td {
  overflow-wrap: anywhere;
}

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

.preview-note {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfd;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 620px);
    align-items: start;
    padding-top: 24px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  h1 {
    max-width: 9ch;
  }

  .drop-zone {
    min-height: 220px;
  }

  .actions,
  .status-row {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }

  .metrics {
    justify-content: stretch;
  }

  .metrics span {
    flex: 1;
  }
}
