:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d8dee8;
  --text: #18202b;
  --muted: #687386;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --soft: #e8f3f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 960px;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

.tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: calc(100vh - 64px);
  overflow: hidden;
}

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

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.file-picker {
  display: inline-flex;
  align-items: center;
  width: 320px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--muted);
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#fileName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  background: #97a3b6;
  cursor: not-allowed;
}

.status {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfd;
}

.status.error {
  color: var(--danger);
  background: #fff1f0;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-item {
  background: var(--soft);
  padding: 14px 18px;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
}

.summary-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
  word-break: break-word;
}

.sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
}

.section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.section.wide {
  grid-column: 1 / -1;
}

.section h2 {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-size: 16px;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  vertical-align: top;
  font-size: 13px;
}

th {
  width: 42%;
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  background: #fcfdff;
}

td {
  word-break: break-word;
}

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

.mono {
  font-family: Consolas, "Courier New", monospace;
}

.hidden {
  display: none;
}
