
:root {
  --ink: #17191d;
  --muted: #69717d;
  --subtle: #8d949d;
  --line: #dde1e5;
  --line-strong: #cfd4da;
  --canvas: #f3f4f5;
  --panel: #ffffff;
  --sidebar: #eceff1;
  --orange: #ef5b2a;
  --orange-dark: #c9471d;
  --orange-soft: #fff0e9;
  --green: #1e7650;
  --green-soft: #eaf6f0;
  --red: #ad372d;
  --red-soft: #fff0ee;
  --yellow: #966408;
  --yellow-soft: #fff6dc;
  --shadow-sm: 0 8px 22px rgba(28, 33, 39, .06);
  --shadow-md: 0 22px 60px rgba(28, 33, 39, .11);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; overflow-x: hidden; overflow-y: auto; color: var(--ink); background: var(--canvas); font-family: "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; font-size: 15px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(239, 91, 42, .24); outline-offset: 2px; }

.topbar {
  height: 76px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(26, 30, 35, .02);
}
.brand { min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.v-trust-logo { height: 42px; width: auto; display: block; }
.brand-divider { width: 2px; height: 27px; background: var(--line-strong); }
.brand-product { font-size: 16px; font-weight: 750; letter-spacing: .08em; white-space: nowrap; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.system-status { max-width: 240px; margin-right: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.system-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--subtle); }
.system-status.ready { color: var(--green); }
.system-status.ready::before { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.system-status.blocked { color: var(--red); }
.system-status.blocked::before { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

.button { min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: 0 18px; font-size: 14px; font-weight: 750; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--orange); box-shadow: 0 8px 18px rgba(239, 91, 42, .2); }
.button-primary:hover:not(:disabled) { background: var(--orange-dark); box-shadow: 0 10px 24px rgba(201, 71, 29, .24); }
.button-secondary { color: var(--ink); border-color: var(--line-strong); background: var(--panel); }
.button-secondary:hover:not(:disabled) { border-color: #aeb5bd; box-shadow: var(--shadow-sm); }
.button-large { min-height: 50px; padding: 0 25px; font-size: 15px; }
.button-block { width: 100%; }

.workspace { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 328px minmax(0, 1fr); align-items: start; overflow: visible; }
.history-panel {
  min-width: 0;
  height: calc(100vh - 76px);
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
  background: var(--sidebar);
  overflow: hidden;
}
.panel-heading { padding: 27px 22px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 22px; line-height: 1.2; font-weight: 780; letter-spacing: -.02em; }
.eyebrow { color: var(--subtle); font-family: Bahnschrift, "Segoe UI", sans-serif; font-size: 10px; font-weight: 750; letter-spacing: .18em; }
.eyebrow.accent { color: var(--orange-dark); }
.panel-tools { display: flex; align-items: center; gap: 7px; }
.icon-button, .manage-button { min-height: 34px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .8); color: var(--ink); }
.icon-button { width: 34px; padding: 0; border-radius: 9px; font-size: 17px; line-height: 1; }
.manage-button { padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 750; }
.icon-button:hover, .manage-button:hover { border-color: #aeb5bd; background: #fff; }
.manage-button.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.manage-button:disabled { opacity: .45; cursor: not-allowed; }

.history-admin-bar {
  margin: 0 14px 12px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e7c6b8;
  border-radius: 10px;
  background: #fff7f2;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 760;
}
.history-admin-bar div { display: flex; gap: 5px; }
.history-admin-bar button { border: 0; padding: 3px 5px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.history-admin-bar .danger-link { color: var(--red); }
.history-list { min-height: 0; padding: 0 13px 28px; display: grid; align-content: start; gap: 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bcc1c7 transparent; }
.history-card { position: relative; min-width: 0; border: 1px solid transparent; border-radius: 13px; background: rgba(255, 255, 255, .48); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; overflow: hidden; }
.history-card:hover { border-color: var(--line-strong); background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.history-card.active { border-color: #efb59f; background: #fff; box-shadow: inset 4px 0 var(--orange), var(--shadow-sm); }
.history-open { width: 100%; min-width: 0; padding: 14px 15px 13px; border: 0; background: transparent; color: inherit; text-align: left; }
.history-card-top { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.history-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.history-status.processing::before { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.history-status.partial_succeeded::before { background: var(--red); }
.history-count { color: var(--subtle); font-family: Bahnschrift, "Segoe UI", sans-serif; font-size: 11px; letter-spacing: .05em; }
.history-item-title {
  min-width: 0;
  min-height: 38px;
  margin: 0 0 10px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.history-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--subtle); font-size: 11px; }
.history-meta span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-delete {
  position: absolute;
  right: 10px;
  bottom: 9px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #e7c5c1;
  border-radius: 7px;
  background: #fff;
  color: var(--red);
  font-size: 10px;
  font-weight: 760;
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.history-list.admin-mode .history-delete { opacity: 1; transform: none; pointer-events: auto; }
.history-list.admin-mode .history-meta { padding-right: 48px; }
.history-list.admin-mode .history-delete:disabled { opacity: .42; cursor: not-allowed; }
.panel-empty { padding: 42px 16px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.7; }

.review-stage { min-width: 0; min-height: calc(100vh - 76px); overflow: visible; background: var(--canvas); }
.empty-state {
  min-height: calc(100vh - 76px);
  padding: clamp(28px, 6vw, 82px);
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, .4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .4) 1px, transparent 1px),
    radial-gradient(circle at 72% 22%, rgba(239, 91, 42, .13), transparent 28%),
    var(--canvas);
  background-size: 32px 32px, 32px 32px, auto, auto;
}
.empty-shell { width: min(900px, 100%); display: grid; grid-template-columns: minmax(290px, .88fr) minmax(330px, 1.12fr); align-items: stretch; gap: 18px; }
.upload-focus, .process-card { border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-md); }
.upload-focus { padding: clamp(32px, 5vw, 58px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.upload-glyph { width: 48px; height: 48px; margin-bottom: 26px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--orange); font: 400 26px/1 Bahnschrift, sans-serif; box-shadow: 0 10px 26px rgba(239, 91, 42, .24); }
.upload-focus h1 { margin: 0 0 9px; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.045em; }
.upload-focus p { margin: 0 0 28px; color: var(--muted); font-size: 13px; }
.process-card { padding: clamp(27px, 4vw, 42px); display: flex; flex-direction: column; justify-content: center; }
.process-step { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.process-step span { grid-row: 1 / 3; width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #f2c6b5; border-radius: 11px; color: var(--orange-dark); background: var(--orange-soft); font: 700 11px Bahnschrift, sans-serif; }
.process-step strong { font-size: 14px; }
.process-step small { color: var(--muted); font-size: 11px; }
.process-line { width: 1px; height: 24px; margin: 5px 0 5px 19px; background: var(--line-strong); }

.batch-view { width: min(1540px, 100%); min-height: calc(100vh - 76px); margin: 0 auto; padding: 18px clamp(76px, 5vw, 92px) 46px clamp(18px, 3vw, 42px); display: grid; grid-template-rows: auto auto auto auto; overflow: visible; }
.batch-summary { grid-row: 1; }
.file-tabs { grid-row: 2; }
.notice { grid-row: 3; }
.file-content { grid-row: 4; }
.batch-summary { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow-sm); }
.batch-summary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.batch-summary h1 { margin: 4px 0 3px; font-size: 25px; line-height: 1.15; letter-spacing: -.035em; }
.batch-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.batch-progress { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.metric { min-width: 76px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8f9fa; }
.metric strong { display: block; font: 750 21px Bahnschrift, "Segoe UI", sans-serif; }
.metric small { color: var(--muted); font-size: 11px; }
.file-tabs { margin-top: 16px; padding: 0 8px; display: flex; gap: 2px; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px 13px 0 0; background: var(--panel); }
.file-tab { position: relative; white-space: nowrap; border: 0; background: transparent; padding: 15px 16px 14px; color: var(--muted); font-size: 14px; font-weight: 720; }
.file-tab:hover { color: var(--ink); }
.file-tab.active { color: var(--ink); }
.file-tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--orange); }
.tab-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #b8bdc3; }
.tab-dot.ready_unconfirmed { background: var(--orange); }
.tab-dot.exported { background: var(--green); }
.tab-dot.exported_with_deferred { background: var(--yellow); }
.tab-dot.dirty_after_export { background: var(--yellow); }
.tab-dot.failed { background: var(--red); }
.notice { margin-top: 12px; padding: 12px 15px; border: 1px solid #eed38a; border-radius: 10px; background: var(--yellow-soft); color: #70500f; font-size: 13px; }
.file-content { min-height: 0; padding: 16px 18px 24px; display: grid; grid-template-rows: auto auto auto; overflow: visible; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 15px 15px; background: rgba(255, 255, 255, .72); }
.file-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.file-head h2 { margin: 0 0 5px; font-size: 25px; line-height: 1.25; letter-spacing: -.025em; }
.file-head p { margin: 0; color: var(--muted); font-size: 13px; }
.file-actions { display: flex; align-items: center; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 8px 11px; color: var(--muted); background: #edf0f2; font-size: 12px; font-weight: 760; }
.status-pill.exported { color: var(--green); background: var(--green-soft); }
.status-pill.exported_with_deferred { color: var(--yellow); background: var(--yellow-soft); }
.status-pill.dirty_after_export { color: var(--yellow); background: var(--yellow-soft); }
.status-pill.failed { color: var(--red); background: var(--red-soft); }
.conflict-banner { margin-bottom: 12px; padding: 12px 15px; border: 1px solid #e4a8a2; border-radius: 10px; background: var(--red-soft); color: #83362f; font-size: 13px; }
.merge-file-notice { margin-bottom: 12px; padding: 12px 15px; border: 1px solid #e5c66e; border-radius: 10px; color: #6b5113; background: #fff8df; font-size: 13px; line-height: 1.6; }
.review-workbench { min-height: 0; display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); align-items: start; gap: 14px; overflow: visible; }
.suggestion-index, .suggestion-focus { min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.suggestion-index { position: sticky; top: 92px; max-height: calc(100vh - 110px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.suggestion-filters { padding: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; border-bottom: 1px solid var(--line); background: #f7f8f9; }
.suggestion-filter { min-width: 0; height: 38px; padding: 0 8px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 780; }
.suggestion-filter span { min-width: 20px; padding: 2px 5px; border-radius: 999px; background: #e7eaed; color: var(--subtle); font: 700 10px Bahnschrift, sans-serif; }
.suggestion-filter.active { border-color: #efc2b2; color: var(--orange-dark); background: var(--orange-soft); }
.suggestion-filter.active span { color: #fff; background: var(--orange); }
.suggestion-nav-list { min-height: 0; padding: 8px; display: grid; align-content: start; gap: 5px; overflow-y: auto; scrollbar-width: thin; }
.suggestion-nav-item { width: 100%; min-width: 0; padding: 10px 9px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; }
.suggestion-nav-item:hover { border-color: var(--line); background: #f7f8f9; }
.suggestion-nav-item.active { border-color: #efb59f; background: #fff5f0; box-shadow: inset 3px 0 var(--orange); }
.suggestion-nav-item.rejected { opacity: .55; }
.suggestion-nav-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--subtle); background: #edf0f2; font: 700 11px Bahnschrift, sans-serif; }
.suggestion-nav-item.active .suggestion-nav-number { color: #fff; background: var(--orange); }
.suggestion-nav-copy { min-width: 0; }
.suggestion-nav-copy strong { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.suggestion-nav-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.suggestion-focus { padding: 2px; overflow: visible; background: #f7f8f9; }
.suggestion-focus > .suggestion-card { border: 0; box-shadow: none; }
.suggestion-list { display: grid; gap: 14px; }
.suggestion-card { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); overflow: hidden; box-shadow: 0 8px 22px rgba(28, 33, 39, .045); }
.suggestion-card.rejected { opacity: .58; background: #f2f3f4; }
.suggestion-card.conflicted { border-color: #d87d74; box-shadow: 0 0 0 2px rgba(173, 55, 45, .08); }
.suggestion-head { padding: 15px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); background: #f7f8f9; }
.kind-label { min-width: 56px; padding: 5px 8px; border: 1px solid #f1c8b8; border-radius: 7px; color: var(--orange-dark); background: var(--orange-soft); font: 750 10px Bahnschrift, sans-serif; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.suggestion-title { min-width: 0; }
.suggestion-title strong { display: block; overflow-wrap: anywhere; font-size: 16px; }
.suggestion-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.reject-button { width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--muted); font-size: 19px; line-height: 1; }
.reject-button:hover { color: var(--red); border-color: #ddb3ae; }
.reject-button.active { color: #fff; border-color: var(--red); background: var(--red); }
.suggestion-body { padding: 16px; }
.explain-grid { margin-bottom: 15px; display: grid; grid-template-columns: .72fr 1.28fr; gap: 12px; }
.info-box { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; }
.info-box.evidence { border-left: 3px solid var(--orange); }
.info-box span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.info-box p { margin: 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.diff-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.diff-header, .diff-row { display: grid; grid-template-columns: 135px minmax(0, 1fr) minmax(0, 1fr); }
.diff-header { color: var(--muted); background: #edf0f2; font-size: 12px; font-weight: 800; }
.diff-header > *, .diff-row > * { padding: 12px 13px; border-right: 1px solid var(--line); }
.diff-header > *:last-child, .diff-row > *:last-child { border-right: 0; }
.diff-row { align-items: stretch; border-top: 1px solid var(--line); }
.field-group-label { padding: 8px 13px; border-top: 1px solid #e4d6cc; color: #8a4a2c; background: #fff4ee; font-size: 11px; font-weight: 820; letter-spacing: .06em; }
.field-name { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; background: #f7f8f9; font-size: 12px; font-weight: 760; overflow-wrap: anywhere; }
.field-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.field-badge { padding: 2px 5px; border-radius: 999px; font-size: 9px; font-weight: 780; white-space: nowrap; }
.field-badge.changed { color: #9f321d; background: #ffe8df; }
.field-badge.inherited { color: #416067; background: #e8f0f1; }
.field-badge.unresolved { color: #76540a; background: #fff0b8; }
.before-value { min-height: 46px; color: #545b64; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.65; }
.after-input { width: 100%; min-height: 46px; padding: 12px 13px; resize: none; overflow: hidden; border: 0; outline: 0; color: var(--ink); background: #fffaf7; font-size: 14px; line-height: 1.65; }
.after-input.changed { color: #9f321d; background: #fff4ef; }
.after-input:focus { background: #fff2eb; box-shadow: inset 3px 0 var(--orange); }
.after-editor { min-width: 0; padding: 0 !important; background: #fffaf7; }
.after-editor .after-input { display: block; }
.bilingual-meta { padding: 0 12px 10px; display: grid; justify-items: start; gap: 8px; background: #fffaf7; }
.bilingual-meta:empty { display: none; }
.bilingual-state { min-height: 23px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; font-size: 10px; font-weight: 780; line-height: 1.35; }
.bilingual-state.syncing { color: #6b4e10; background: #fff1c7; }
.bilingual-state.syncing span { width: 7px; height: 7px; border: 1.5px solid #b48520; border-top-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
.bilingual-state.applied { color: #28604c; background: #e2f2eb; }
.bilingual-state.suggested { color: #76540a; background: #fff0b8; }
.bilingual-state.failed { color: #9b3932; background: #ffe8e5; cursor: pointer; }
.bilingual-state.empty { color: #76540a; background: #fff4d5; }
.bilingual-state.ignored, .bilingual-state.unavailable { color: #5f6973; background: #eceff1; }
.bilingual-candidate { width: 100%; padding: 11px 12px; border: 1px solid #e5c66e; border-radius: 9px; color: #5d4714; background: #fffaf0; }
.bilingual-candidate > span { font-size: 10px; font-weight: 820; letter-spacing: .08em; }
.bilingual-candidate p { margin: 6px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; color: #353b42; font-size: 13px; line-height: 1.6; }
.bilingual-candidate > div { display: flex; justify-content: flex-end; gap: 7px; }
.bilingual-candidate button { padding: 5px 9px; border: 1px solid #d8c27f; border-radius: 7px; color: #624a11; background: #fff; font-size: 11px; font-weight: 760; }
.bilingual-candidate button.apply { color: #fff; border-color: #a87815; background: #a87815; }
.after-readonly { min-height: 46px; padding: 12px 13px; color: var(--muted); background: #f6f7f8; font-size: 13px; line-height: 1.65; }
.after-readonly.deleted { color: #9b3932; background: #fff2f0; }
.row-separator { padding: 8px 11px; border-top: 1px solid var(--line); color: var(--orange-dark); background: #fff4ee; font-size: 10px; font-weight: 800; }
.action-reminder { margin-bottom: 13px; padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.action-reminder strong { white-space: nowrap; }
.split-reminder { border: 1px solid #e5c66e; color: #684d0b; background: #fff8df; }
.delete-reminder { border: 1px solid #e4a8a2; color: #83362f; background: var(--red-soft); }
.merge-resolution { margin-bottom: 13px; padding: 14px; border: 1px solid #e5c66e; border-radius: 11px; color: #684d0b; background: #fff9e7; }
.merge-resolution > div:first-child { display: grid; gap: 4px; }
.merge-resolution > div:first-child span { font-size: 12px; line-height: 1.55; }
.merge-choice-row { margin-top: 11px; padding-top: 10px; display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 10px; align-items: start; border-top: 1px solid rgba(128, 96, 22, .16); }
.merge-choice-row > span { padding-top: 6px; font-size: 12px; font-weight: 800; }
.merge-choice-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.merge-choice { padding: 6px 9px; border: 1px solid #ddc06e; border-radius: 8px; color: #60480f; background: #fff; font-size: 12px; }
.merge-choice:hover, .merge-choice.selected { color: #fff; border-color: #9a7319; background: #9a7319; }
.merge-choice.blank { border-style: dashed; }
.matched-row-note { padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #f7f8f9; font-size: 13px; }
.detail-fold { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.detail-fold summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.processing-card, .error-card { padding: 52px 28px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); text-align: center; }
.spinner { width: 38px; height: 38px; margin: 0 auto 16px; border: 3px solid var(--orange-soft); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-card { color: var(--red); }
.error-card p { color: var(--muted); }

.modal[hidden], [hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(18, 21, 25, .58); backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(570px, 100%); padding: 30px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 18px; background: #fff; box-shadow: var(--shadow-md); }
.modal-card h2 { margin: 8px 0; font-size: 27px; letter-spacing: -.03em; }
.modal-card > p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.admin-modal-card { width: min(440px, 100%); }
.bilingual-warning-card { width: min(500px, 100%); border-top: 4px solid #d89b23; }
.bilingual-warning-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }
.modal-close { position: absolute; right: 16px; top: 14px; border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.field-label { display: block; margin: 20px 0 7px; color: var(--muted); font-size: 11px; font-weight: 750; }
.password-input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: #fafbfb; }
.password-input:focus { border-color: var(--orange); background: #fff; outline: 3px solid rgba(239, 91, 42, .12); }
.admin-modal-card .button-block { margin-top: 16px; }
.dropzone { min-height: 172px; margin: 20px 0 12px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1.5px dashed #c9ced3; border-radius: 13px; background: #f7f8f9; text-align: center; cursor: pointer; }
.dropzone.dragover { border-color: var(--orange); background: var(--orange-soft); }
.dropzone small { color: var(--muted); }
.drop-icon { color: var(--orange); font-size: 36px; }
.selected-files { max-height: 140px; margin-bottom: 14px; display: grid; gap: 6px; overflow: auto; }
.selected-file { padding: 8px 10px; display: flex; justify-content: space-between; gap: 12px; border-radius: 8px; background: var(--canvas); font-size: 11px; }
.selected-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file small { flex: none; color: var(--muted); }
.form-error { margin: 10px 0 12px; padding: 9px 11px; border-radius: 8px; color: var(--red); background: var(--red-soft); font-size: 11px; line-height: 1.5; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; max-width: 420px; padding: 12px 16px; border-radius: 10px; color: #fff; background: #24282d; box-shadow: var(--shadow-md); font-size: 12px; }
.back-to-review {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 18;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #d8dde2;
  border-radius: 14px;
  color: #fff;
  background: #24282d;
  box-shadow: 0 12px 30px rgba(23, 25, 29, .2);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.back-to-review span { font: 500 25px/1 Bahnschrift, "Segoe UI", sans-serif; transform: translateY(-1px); }
.back-to-review:hover { transform: translateY(-2px); background: var(--orange); box-shadow: 0 14px 34px rgba(239, 91, 42, .28); }
.back-to-review:not([hidden]) + .toast { bottom: 86px; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 296px minmax(0, 1fr); }
  .system-status { display: none; }
  .batch-summary, .file-head { align-items: flex-start; }
  .review-workbench { grid-template-columns: 220px minmax(0, 1fr); }
  .diff-header, .diff-row { grid-template-columns: 105px minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  .topbar { padding: 0 18px; }
  .workspace { height: auto; min-height: calc(100vh - 76px); display: block; overflow: visible; }
  .history-panel { position: relative; top: auto; width: 100%; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .panel-heading { padding: 19px 18px 12px; }
  .history-list { padding: 0 18px 16px; display: flex; overflow-x: auto; overflow-y: hidden; }
  .history-card { flex: 0 0 270px; }
  .empty-state { min-height: calc(100vh - 260px); }
  .empty-shell { grid-template-columns: 1fr; }
  .review-stage { height: auto; overflow: visible; }
  .batch-view { height: auto; padding: 22px 70px 45px 16px; display: block; overflow: visible; }
  .file-content { padding: 20px 16px 26px; display: block; overflow: visible; }
  .review-workbench { grid-template-columns: 1fr; overflow: visible; }
  .suggestion-index { max-height: 290px; }
  .suggestion-focus { max-height: none; overflow: visible; }
  .merge-choice-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .v-trust-logo { height: 34px; }
  .brand-divider, .brand-product { display: none; }
  .topbar { height: 66px; padding: 0 13px; }
  .top-actions { gap: 7px; }
  .top-actions .button-secondary { display: none; }
  .top-actions .button { min-height: 37px; padding: 0 12px; font-size: 12px; }
  .history-panel { top: auto; }
  .empty-state { min-height: calc(100vh - 250px); padding: 25px 15px; }
  .upload-focus, .process-card { padding: 28px 24px; }
  .explain-grid { grid-template-columns: 1fr; }
  .diff-header { display: none; }
  .diff-row { grid-template-columns: 1fr; }
  .diff-row > * { border-right: 0; border-bottom: 1px solid var(--line); }
  .diff-row > *:last-child { border-bottom: 0; }
  .field-name { color: var(--orange-dark); }
  .file-actions { flex-wrap: wrap; }
  .modal-card { padding: 27px 20px 22px; }
  .toast { right: 14px; bottom: 14px; left: 14px; max-width: none; }
  .batch-view { padding: 18px 60px 40px 12px; }
  .back-to-review { right: 12px; bottom: 16px; width: 44px; height: 44px; border-radius: 12px; }
  .back-to-review:not([hidden]) + .toast { bottom: 72px; }
}
