:root {
  --bg: #f5f6f7;
  --surface: #fff;
  --ink: #232a2a;
  --muted: #737d7b;
  --line: #e3e8e6;
  --green: #16725c;
  --green-dark: #0b5644;
  --green-pale: #eaf5ef;
  --amber: #a66a1d;
  --red: #bf3d3d;
  --font: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.drop-zone:focus-visible {
  outline: 3px solid #87bdaa;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 15px;
  font-weight: 650;
}
h3 {
  font-size: 13px;
  font-weight: 600;
}
.app-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 17px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
}
.brand img {
  border-radius: 8px;
  flex-shrink: 0;
}
.brand strong {
  display: block;
  font-size: 23px;
  line-height: 1.2;
}
.brand small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.nav-caption {
  margin: 47px 14px 13px;
  font-size: 11px;
  color: #959f9b;
}
.tool-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-item {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #636f6b;
  padding: 0 13px;
  justify-content: flex-start;
  gap: 11px;
  text-align: left;
}
.nav-item.active {
  color: var(--green-dark);
  background: var(--green-pale);
  font-weight: 600;
}
.nav-item:hover:not(.active) {
  background: #f3f6f4;
}
.nav-index {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.55;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 18px 12px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.local-dot {
  width: 6px;
  height: 6px;
  background: #45937a;
  border-radius: 50%;
  flex-shrink: 0;
}
.version {
  margin-left: auto;
  color: #9ba4a1;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 65px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb svg {
  width: 12px;
  height: 12px;
  color: #b2bab7;
}
.breadcrumb span {
  color: #343e39;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #697770;
  font-size: 11px;
}
.local-badge svg {
  width: 14px;
  height: 14px;
}
main {
  padding: 34px 36px 16px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
}
.eyebrow span {
  font-size: 10px;
  margin-left: 10px;
  color: #9da7a2;
}
h1 {
  font-size: 27px;
  font-weight: 650;
  line-height: 1.3;
}
.quiet-button {
  height: 36px;
  padding: 0 12px;
  background: transparent;
  color: #5b6962;
  border: 1px solid #d8e0db;
  border-radius: 5px;
  font-size: 12px;
}
.quiet-button:hover {
  background: #fff;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 29px;
  padding: 21px 0;
  background: transparent;
}
.metrics > div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.metrics > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.metrics strong {
  font-size: 23px;
  font-weight: 550;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  display: block;
  overflow-wrap: anywhere;
}
.metrics small {
  font-size: 11px;
  font-weight: 400;
  color: #818d87;
}
.metrics > div:last-child strong {
  color: var(--green);
}
.metrics .danger {
  color: var(--red) !important;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  min-height: 516px;
}
.data-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}
.toolbar-left,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}
.toolbar-left {
  flex-wrap: wrap;
  gap: 4px 12px;
}
.limit {
  color: #8b9590;
  font-size: 10px;
}
.toolbar-actions {
  gap: 6px;
  flex-shrink: 0;
}
.secondary-button {
  height: 33px;
  padding: 0 11px;
  color: #37473e;
  background: #fff;
  border: 1px solid #d6ddd8;
  border-radius: 5px;
  font-size: 12px;
}
.secondary-button:hover {
  background: #f4f7f5;
}
.icon-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #8a9590;
}
.icon-button:hover:enabled {
  background: #eef2ef;
  color: #324b3e;
}
.primary-button {
  height: 39px;
  padding: 0 17px;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 550;
}
.primary-button:hover:enabled {
  background: var(--green-dark);
}
.wide {
  width: 100%;
}
.drop-zone {
  min-height: 360px;
  position: relative;
  flex: 1;
  outline-offset: -4px;
}
.drop-zone.dragging {
  outline: 2px dashed var(--green);
  outline-offset: -8px;
  background: #f1f8f4;
}
.empty-state {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
}
.empty-state h3 {
  color: #7b8982;
  font-size: 13px;
  font-weight: 400;
}
.empty-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  background: #f1f6f3;
  color: #8da79a;
  border-radius: 8px;
}
.empty-icon svg {
  width: 29px;
  height: 29px;
  stroke-width: 1.3;
}
.empty-icon.amber {
  color: #b49b6f;
  background: #f8f6ef;
}
.table-scroll {
  max-height: 460px;
  overflow: auto;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #cdd8d0 transparent;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafbf9;
}
th {
  color: #7d8981;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  height: 39px;
}
th,
td {
  padding: 11px 16px;
  border-bottom: 1px solid #edf0ee;
}
td {
  height: 53px;
  color: #58655c;
}
tbody tr:hover {
  background: #fcfdfb;
}
td .new-name {
  color: var(--green-dark);
  font-weight: 500;
}
.rename-table {
  table-layout: fixed;
  min-width: 460px;
}
.rename-table .index-col {
  width: 40px;
}
.rename-table .arrow-col {
  width: 25px;
  padding: 0;
}
.rename-table .action-col {
  width: 39px;
}
.rename-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.rename-table .index-cell {
  color: #9ba59e;
  font-size: 10px;
  text-align: center;
  padding-left: 5px;
  padding-right: 5px;
  font-variant-numeric: tabular-nums;
}
.rename-table .file-name {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.file-name svg {
  width: 15px;
  height: 17px;
  flex-shrink: 0;
  color: #9ba89f;
  margin-top: 1px;
}
.name-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.rename-table .arrow-cell {
  padding: 0;
  color: #b1bcb5;
}
.arrow-cell svg {
  width: 13px;
  height: 13px;
}
.rename-table .remove-cell {
  padding: 0 5px;
}
.remove-cell .icon-button {
  width: 28px;
  height: 28px;
}
.file-error {
  display: block;
  color: var(--red);
  font-size: 10px;
  margin-top: 3px;
}
.invalid-row {
  background: #fff9f8;
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  min-height: 53px;
  font-size: 11px;
  color: #8a948e;
  margin-top: auto;
}
.inline-label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.inline-label select {
  font-size: 11px;
  padding: 4px 22px 4px 7px;
  height: 28px;
  background: #fff;
  border-color: #e5e9e6;
  width: auto;
}
.settings {
  border-left: 1px solid var(--line);
  padding: 18px 20px 20px;
  min-width: 0;
}
.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  min-height: 28px;
}
.settings-heading .icon-button {
  height: 28px;
  width: 28px;
  flex-basis: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #6c7971;
  font-size: 11px;
  margin-bottom: 13px;
}
.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 35px;
  border: 1px solid #dfe5e0;
  border-radius: 4px;
  background: #fff;
  color: #34453a;
  padding: 7px 10px;
  font-size: 12px;
  transition: border-color 0.15s;
}
input::placeholder {
  color: #abb3ad;
  font-size: 11px;
}
.field input:focus,
.field select:focus {
  border-color: #57957a;
}
.field input:disabled,
.field select:disabled {
  background: #f6f7f5;
  color: #b4bbb6;
}
.field-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.paired-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.paired-fields .field select {
  padding-left: 6px;
  font-size: 11px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #53635a;
  min-height: 29px;
  margin-bottom: 7px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.check-row input {
  accent-color: var(--green);
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}
.check-row span {
  min-width: 0;
}
.check-row svg {
  width: 13px;
  height: 13px;
  color: #8ba997;
  margin-left: auto;
  flex-shrink: 0;
}
.export-area {
  margin-top: 21px;
}
.export-area progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 12px;
  accent-color: var(--green);
}
.message {
  margin-top: 16px;
  border-left: 3px solid #73a78a;
  padding: 10px 14px;
  background: #edf5ef;
  color: #326847;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.message.error {
  border-left-color: #d88070;
  background: #fff0ec;
  color: #a23c2c;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: #a0aaa3;
  padding: 12px 36px 23px;
  max-width: 1600px;
  margin: auto;
}
.file-queue {
  padding: 9px 16px;
  background: #f9faf8;
  border-bottom: 1px solid var(--line);
  max-height: 135px;
  overflow: auto;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #697a6b;
  min-height: 28px;
}
.file-item > svg {
  width: 14px;
  height: 14px;
  color: #b09453;
  flex-shrink: 0;
}
.file-item .file-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.file-item .file-meta {
  margin-left: auto;
  white-space: nowrap;
  color: #98a298;
  font-size: 10px;
}
.file-item .icon-button {
  height: 25px;
  width: 25px;
  flex-basis: 25px;
}
.column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.column-heading h3 {
  color: #6c7971;
  font-size: 11px;
  font-weight: 400;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--green);
  font-size: 11px;
  padding: 4px;
}
.column-list {
  max-height: 155px;
  overflow: auto;
  padding-right: 6px;
}
.column-list .check-row {
  font-size: 11px;
  margin-bottom: 0;
  min-height: 26px;
}
.muted {
  color: #a0aaa2;
  font-size: 11px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.pagination .icon-button {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
}
.pagination span {
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#csv-table {
  width: max-content;
  min-width: 100%;
}
#csv-table th,
#csv-table td {
  max-width: 260px;
  min-width: 95px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
#csv-table .index-cell {
  min-width: 40px;
  width: 40px;
  color: #9ba59e;
  text-align: center;
  font-size: 10px;
}
#csv-table td {
  height: 41px;
}
.data-area .error-cell {
  padding: 28px;
  text-align: center;
  color: var(--red);
}
