/*
 * 全系统共用的付款对账视觉组件源。
 * 字体、字号、行高、控件密度、间距、圆角、主题色和阴影只在此处定义。
 * PAYMENT-DESIGN-SOURCE
 */
*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--suite-color-canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--suite-color-canvas);
  color: var(--suite-color-text);
  font-family: var(--suite-font-sans);
  font-size: var(--suite-font-size-base);
  line-height: var(--suite-line-height-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--suite-letter-spacing);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell {
  min-height: 100vh;
  color: var(--suite-color-text);
  font-family: var(--suite-font-sans);
  font-size: var(--suite-font-size-base);
  line-height: var(--suite-line-height-body);
  background: var(--suite-color-canvas);
}

button, input, select, textarea, summary { font: inherit; }
button, a, input, select, textarea, [tabindex] { -webkit-tap-highlight-color: transparent; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--suite-color-accent);
  outline-offset: 2px;
}

::selection { color: var(--suite-color-text); background: var(--suite-color-accent-weak); }

#main,
.suite-main {
  min-width: 0;
  padding: var(--suite-page-padding-top) var(--suite-page-padding-x) var(--suite-page-padding-bottom);
}

.status-rail,
.topbar {
  min-height: var(--suite-status-height);
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface);
  border-bottom: 1px solid var(--suite-color-border);
  box-shadow: var(--suite-shadow-sm);
}

.status-rail {
  margin: calc(-1 * var(--suite-page-padding-top)) calc(-1 * var(--suite-page-padding-x)) 26px;
  padding: 11px var(--suite-page-padding-x);
  gap: 12px;
}

.topbar { padding: 11px var(--suite-page-padding-x); }
.topbar-main { gap: 12px; }
.status-rail .rail-title { color: var(--suite-color-text); font-size: 12px; }
.status-rail .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--suite-color-success);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, .12);
}
.status-rail.off .pulse {
  background: var(--suite-color-danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .10);
}

h1, h2, h3, h4, p { margin-top: 0; }
h2.pt,
.page-title {
  margin: 2px 0 6px;
  color: var(--suite-color-text);
  font-size: var(--suite-font-size-title);
  font-weight: 750;
  line-height: var(--suite-line-height-title);
  letter-spacing: -.2px;
}

.modal-head h2 {
  margin: 0 0 8px;
  color: var(--suite-color-text);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: normal;
}

.psub,
.page-subtitle,
.modal-help {
  margin: 0 0 20px;
  color: var(--suite-color-text-secondary);
  font-size: var(--suite-font-size-subtitle);
  line-height: var(--suite-line-height-subtitle);
}

.panel,
.content-panel,
.filter-card,
.manual-card,
.history-card {
  margin-bottom: 16px;
  padding: 16px 18px;
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-hairline);
  border-radius: var(--suite-radius-panel);
  box-shadow: var(--suite-shadow-panel);
}

.panel h3,
.content-panel h3,
.filter-card h3,
.manual-card h3,
.history-card h3 {
  margin: 0 0 14px;
  color: var(--suite-color-text);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: normal;
}

.cards { gap: 14px; margin-bottom: 18px; }
.card,
.summary-cell,
.scan-state {
  min-height: 112px;
  padding: 14px 16px;
  color: var(--suite-color-text);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-hairline);
  border-radius: var(--suite-radius-card);
  box-shadow: var(--suite-shadow-panel);
}

.button,
button.btn,
.rail-btn,
.action-menu-button,
.menu-item {
  min-height: var(--suite-control-height);
  padding: 7px 15px;
  color: var(--suite-color-text-secondary);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border-strong);
  border-radius: var(--suite-radius-control);
  box-shadow: var(--suite-shadow-sm);
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.button:hover:not(:disabled),
button.btn:hover:not(:disabled),
.rail-btn:hover:not(:disabled),
.action-menu-button:hover:not(:disabled),
.menu-item:hover:not(:disabled) {
  color: var(--suite-color-accent);
  background: var(--suite-color-accent-weak);
  border-color: var(--suite-color-accent-border);
}

.button.primary,
button.btn.primary {
  color: #fff;
  background: var(--suite-color-accent);
  border-color: var(--suite-color-accent);
  box-shadow: 0 2px 6px rgba(37, 99, 235, .30);
}
.button.primary:hover:not(:disabled), button.btn.primary:hover:not(:disabled) {
  color: #fff;
  background: var(--suite-color-accent-hover);
  border-color: var(--suite-color-accent-hover);
}
.button.secondary,
button.btn.ghost { color: var(--suite-color-text-secondary); background: var(--suite-color-surface); }

/* `.button` 与 `.btn` 使用付款页面相同的中性默认态与显式蓝色主按钮。 */
button.btn {
  min-height: var(--suite-control-height);
  padding: 7px 15px;
  font-size: 13px;
  line-height: 1.4;
}
button.btn.ghost { border: 1px solid var(--suite-color-border-strong); }
.rail-btn {
  min-height: 0;
  padding: 7px 15px;
  font-size: inherit;
  line-height: normal;
}
.button.danger,
.btn.danger { color: var(--suite-color-danger); background: var(--suite-color-danger-weak); border-color: #fecaca; }
.button:disabled, button.btn:disabled { opacity: .46; cursor: not-allowed; box-shadow: none; }

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.bar input[type="text"],
.bar input[type="number"],
.bar select,
.form input,
.form select,
.field input,
.field select,
.field textarea {
  min-height: var(--suite-control-height);
  padding: 7px 10px;
  color: var(--suite-color-text);
  font-family: var(--suite-font-sans);
  font-size: 13px;
  line-height: normal;
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-control);
  box-shadow: var(--suite-shadow-sm);
}

textarea { min-height: 128px; line-height: var(--suite-line-height-body); resize: vertical; }
.field textarea { min-height: 72px; }
input::placeholder, textarea::placeholder { color: var(--suite-color-text-muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) { border-color: var(--suite-color-accent-border); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  border-color: var(--suite-color-accent);
  outline: none;
  box-shadow: var(--suite-focus-ring);
}
input:disabled, select:disabled, textarea:disabled {
  color: var(--suite-color-text-muted);
  background: var(--suite-color-surface-active);
  cursor: not-allowed;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--suite-color-accent); }

.tabs {
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.tab {
  min-height: var(--suite-control-height);
  padding: 6px 18px;
  color: var(--suite-color-text-secondary);
  font-size: var(--suite-font-size-nav);
  font-weight: 500;
  line-height: 1.4;
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: 999px;
  box-shadow: var(--suite-shadow-sm);
  transition: all .15s ease;
}
.tab:hover { color: var(--suite-color-accent); background: var(--suite-color-accent-weak); border-color: var(--suite-color-accent-border); }
.tab.active {
  color: #fff;
  font-weight: 600;
  background: var(--suite-color-accent);
  border-color: var(--suite-color-accent);
  box-shadow: 0 2px 6px rgba(37, 99, 235, .30);
}

.action-menu,
.action-menu-panel { border-radius: var(--suite-radius-control); }
.action-menu-panel {
  padding: 6px;
  color: var(--suite-color-text);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  box-shadow: var(--suite-shadow-panel);
}

.workspace-rail,
.rail-section,
.source-option,
.manual-intro,
.manual-card-head,
.manual-card-body,
.manual-form,
.auto-edit-form,
.history-head,
.history-body,
.history-list,
.table-note,
.table-pagination,
.modal-form,
.form-grid,
.modal-actions {
  gap: 12px;
}
.workspace-rail,
.rail-section,
.manual-intro { padding: 16px; }
.source-option,
.manual-card-head,
.manual-card-body,
.history-head,
.history-body,
.table-note,
.table-pagination { padding: 11px 13px; }
.workspace-rail,
.rail-section,
.source-option,
.manual-intro {
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface);
  border-color: var(--suite-color-border);
  border-radius: var(--suite-radius-control);
}

.table-wrap,
.twrap {
  color: var(--suite-color-text);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-panel);
  box-shadow: var(--suite-shadow-sm);
}
table {
  width: 100%;
  color: var(--suite-color-text);
  font-family: var(--suite-font-sans);
  font-size: var(--suite-font-size-table);
  font-variant-numeric: tabular-nums;
  border-collapse: collapse;
}
th {
  padding: 8px 12px;
  color: var(--suite-color-text-muted);
  font-size: var(--suite-font-size-table-head);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: left;
  background: var(--suite-color-surface-subtle);
  border-bottom: 1px solid var(--suite-color-border);
}
td {
  padding: 8px 12px;
  line-height: 1.45;
  border-bottom: 1px solid var(--suite-color-hairline);
}
tbody tr:hover { background: var(--suite-color-accent-weak); }
.table-note,
.table-pagination { color: var(--suite-color-text-muted); font-size: 11.5px; line-height: 1.6; }

.modal-backdrop,
#ovl {
  background: rgba(18, 25, 38, .45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-card {
  padding: 24px 26px;
  color: var(--suite-color-text);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-modal);
  box-shadow: var(--suite-shadow-lg);
}
#modal {
  padding: 24px 26px;
  color: var(--suite-color-text);
  background: var(--suite-color-surface);
  border: 0;
  border-left: 1px solid var(--suite-color-border);
  border-radius: 0;
  box-shadow: -18px 0 55px rgba(16, 24, 40, .18);
}
.modal-head { gap: 20px; margin-bottom: 12px; }
.modal-close {
  width: 34px;
  height: 34px;
  color: var(--suite-color-text-secondary);
  font-size: 21px;
  line-height: 1;
  background: var(--suite-color-surface-subtle);
  border: 1px solid var(--suite-color-border);
  border-radius: 10px;
}
#modal .close {
  width: 30px;
  height: 30px;
  color: var(--suite-color-text-secondary);
  font-size: 14px;
  line-height: normal;
  background: var(--suite-color-surface-subtle);
  border: 1px solid var(--suite-color-border);
  border-radius: 8px;
}
.modal-close:hover,
#modal .close:hover { color: var(--suite-color-accent); background: var(--suite-color-accent-weak); border-color: var(--suite-color-accent-border); }
.modal-actions { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--suite-color-border); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 10px 22px;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  background: #0b0b0b;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .30);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
.toast.on,
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  transition-delay: 0s;
}
.toast.bad, .toast.error { color: #fff; background: var(--suite-color-danger); }
.status { font-size: 11.5px; line-height: 1.45; border-radius: 999px; }

/* ---------- 单证备案业务组件：只组合付款视觉令牌 ---------- */
.top-actions,
.brand-block,
.source-heading,
.context-copy,
.rail-section-heading,
.scan-state,
.scan-copy,
.pagination-actions,
.manual-actions,
.history-total-change,
.history-source-line,
.edit-hint,
.add-row-bar { gap: 10px; }

.view-heading {
  color: var(--suite-color-text-secondary);
  font-size: 12.5px;
  line-height: 1.4;
}
.view-heading strong { color: var(--suite-color-text); font-weight: 720; }
.view-heading-separator { color: var(--suite-color-text-muted); }

.workspace-rail {
  gap: 14px;
  margin-bottom: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.rail-brand,
.rail-section {
  padding: 16px;
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-panel);
  box-shadow: var(--suite-shadow-panel);
}
.product-mark-wrap {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 7px;
  background: var(--suite-color-accent-weak);
  border: 1px solid var(--suite-color-accent-border);
  border-radius: var(--suite-radius-panel);
  box-shadow: var(--suite-shadow-sm);
}
.product-mark { width: 28px; height: 28px; }
.eyebrow,
.section-kicker,
.context-label,
.rail-live-label {
  color: var(--suite-color-text-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.rail-live-label { color: var(--suite-color-success); letter-spacing: .02em; text-transform: none; }
.rail-live-label i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  background: var(--suite-color-success);
  border-radius: 50%;
}
.context-copy strong { color: var(--suite-color-text); font-size: 13px; line-height: 1.35; }
.source-switch,
.summary-strip { gap: 8px; margin-top: 10px; }
.source-option {
  min-height: 50px;
  padding: 9px 10px;
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface-subtle);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-control);
  box-shadow: none;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.source-option:hover { color: var(--suite-color-accent); background: var(--suite-color-accent-weak); border-color: var(--suite-color-accent-border); }
.source-option.active {
  color: var(--suite-color-text);
  background: var(--suite-color-accent-weak);
  border-color: var(--suite-color-accent-border);
  box-shadow: inset 3px 0 var(--suite-color-accent);
}
.source-logo { width: 30px; height: 30px; }
.source-option-copy { gap: 2px; }
.source-option-copy strong { color: var(--suite-color-text); font-size: 12.5px; line-height: 1.25; }
.source-option-copy small { color: var(--suite-color-text-muted); font-size: 10px; line-height: 1.3; }
.source-option-check { color: var(--suite-color-accent); font-size: 12px; opacity: 0; }
.source-option.active .source-option-check { opacity: 1; }

/* 仅图标的数据空间切换器：品牌名称由按钮的 aria-label 提供。 */
.source-switch-icons {
  grid-template-columns: repeat(2, 76px);
  justify-content: center;
  gap: 10px;
  margin-top: 0;
}
.source-option-icon {
  display: flex;
  width: 76px;
  min-height: 58px;
  padding: 8px 10px;
  align-items: center;
  justify-content: center;
}
.source-option-icon.active { box-shadow: inset 0 -3px var(--suite-color-accent); }
.source-option-icon .source-logo-homega { width: 58px; height: 34px; }
.source-logo-crop {
  position: relative;
  display: block;
  width: 44px;
  height: 43px;
  overflow: hidden;
}
.source-logo-crop .source-logo-elangsung {
  position: absolute;
  top: 0;
  left: 50%;
  width: 92px;
  height: auto;
  max-width: none;
  transform: translateX(-50%);
}

.summary-cell,
.scan-state {
  min-height: 78px;
  padding: 13px;
  background: var(--suite-color-surface-subtle);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-control);
  box-shadow: none;
}
.summary-cell span { display: block; color: var(--suite-color-text-secondary); font-size: 10.5px; line-height: 1.35; }
.summary-cell strong {
  display: block;
  margin-top: 6px;
  color: var(--suite-color-text);
  font-size: 20px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.2px;
}
.summary-cell.warning strong { color: var(--suite-color-warning); }
.scan-state { margin-top: 10px; }
.scan-state .pulse {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  background: var(--suite-color-success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(21, 128, 61, .12);
}
.scan-state.scanning .pulse { background: var(--suite-color-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.scan-state.error .pulse { background: var(--suite-color-danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .10); }
.scan-copy { gap: 2px; }
.scan-copy strong { color: var(--suite-color-text); font-size: 12px; line-height: 1.3; }
.scan-copy small { color: var(--suite-color-text-muted); font-size: 10px; line-height: 1.4; }

.content-panel { padding: 16px 18px; }
.tabs { margin-bottom: 14px; }
.tab > span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  min-height: 18px;
  margin-left: 5px;
  padding: 1px 6px;
  color: var(--suite-color-text-muted);
  font-size: 10px;
  line-height: 1;
  background: #eef1f5;
  border-radius: 999px;
}
.tab.active > span { color: #fff; background: rgba(255, 255, 255, .18); }
.filter-card { gap: 10px; }
.filter-card label,
.modal-form label,
.form-grid label,
.manual-form label,
.auto-edit-form label,
.history-tools label,
.auto-export-time {
  color: var(--suite-color-text-secondary);
  font-size: 11.5px;
  line-height: 1.35;
}
.filter-card label > span,
.modal-form label > span,
.form-grid label > span,
.manual-form label > span,
.auto-edit-form label > span,
.history-tools label > span,
.auto-export-time > span {
  display: block;
  margin-bottom: 5px;
  color: var(--suite-color-text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.search-field input { width: 100%; }
.date-range-heading { margin-bottom: 8px; color: var(--suite-color-text-secondary); font-size: 11px; line-height: 1.35; }
.date-range-heading output { color: var(--suite-color-accent); font-weight: 700; }
.date-range-control { height: 22px; }
.date-range-track {
  position: absolute;
  top: 9px;
  right: 8px;
  left: 8px;
  height: 4px;
  background: var(--suite-color-border);
  border-radius: 999px;
}
.date-range-track span { display: block; height: 100%; background: var(--suite-color-accent); border-radius: inherit; }
.date-range-control input[type="range"] {
  appearance: none;
  height: 22px;
  margin: 0;
  background: transparent;
}
.date-range-control input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.date-range-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  background: var(--suite-color-surface);
  border: 2px solid var(--suite-color-accent);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .14);
}
.date-range-control input[type="range"]::-moz-range-track { height: 4px; background: transparent; }
.date-range-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--suite-color-surface);
  border: 2px solid var(--suite-color-accent);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .14);
}

.table-note {
  margin: 0 0 8px;
  padding: 0 4px;
  color: var(--suite-color-text-muted);
  font-size: 11px;
  line-height: 1.5;
}
.table-note-meta { font-family: var(--suite-font-data); font-size: 10.5px; letter-spacing: .02em; }
.table-wrap { max-height: calc(100vh - 330px); }
th { position: sticky; top: 0; z-index: 2; }
td.code,
td.work-code,
.date-cell { font-family: var(--suite-font-data); font-variant-numeric: tabular-nums; }
.editable-cell { cursor: pointer; transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.editable-cell:hover,
.editable-cell.group-hover { color: var(--suite-color-accent); background: var(--suite-color-accent-weak); box-shadow: inset 3px 0 var(--suite-color-accent); }
.editable-cell.saving { opacity: .6; }
.cell-editor { min-width: 0; }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface-active);
  border: 1px solid var(--suite-color-border);
}
.status.complete,
.status.success,
.status.valid { color: var(--suite-color-success); background: var(--suite-color-success-weak); border-color: #bbdfc7; }
.status.pending,
.status.warning { color: var(--suite-color-warning); background: var(--suite-color-warning-weak); border-color: #f3d8a5; }
.status.error,
.status.invalid { color: var(--suite-color-danger); background: var(--suite-color-danger-weak); border-color: #fecaca; }
.empty-row,
.empty-recipient,
.history-no-detail {
  padding: 30px 18px;
  color: var(--suite-color-text-muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  background: var(--suite-color-surface-subtle);
}
.table-pagination {
  margin-top: 10px;
  padding: 10px 4px 0;
  color: var(--suite-color-text-muted);
  border-top: 1px solid var(--suite-color-border);
}
.pagination-summary strong { display: block; color: var(--suite-color-text); font-size: 12px; line-height: 1.35; }
.pagination-summary span,
.page-size-control,
.pagination-actions output { font-size: 10.5px; line-height: 1.4; }
.page-size-control { gap: 7px; }
.page-size-control select { width: 72px; min-height: 34px; padding: 0 8px; }
.compact-button { min-height: 34px; padding: 6px 10px; }

.manual-intro {
  margin-bottom: 14px;
  padding: 18px 20px;
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-hairline);
  border-radius: var(--suite-radius-panel);
  box-shadow: var(--suite-shadow-panel);
}
.manual-intro h2 { margin: 4px 0 0; color: var(--suite-color-text); font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
.manual-intro p { max-width: 640px; margin: 0; color: var(--suite-color-text-secondary); font-size: 11.5px; line-height: 1.65; }
.manual-list,
.history-list { gap: 12px; }
.manual-card { padding: 0; }
.manual-card.completed { opacity: .78; }
.manual-card-head {
  gap: 16px;
  padding: 16px 18px;
  background: var(--suite-color-surface-subtle);
  border-bottom: 1px solid var(--suite-color-border);
}
.manual-card-head h3 { margin: 4px 0 3px; color: var(--suite-color-text); font-size: 16px; line-height: 1.3; }
.manual-card-head p { margin: 0; color: var(--suite-color-text-muted); font-size: 11px; line-height: 1.5; }
.manual-card-body { gap: 12px; padding: 16px 18px 18px; }
.issue-panel,
.auto-preview,
.manual-rows,
.manual-action-guide {
  padding: 12px;
  background: var(--suite-color-surface-subtle);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-control);
}
.issue-panel { background: var(--suite-color-warning-weak); border-color: #f3d8a5; }
.issue-title { margin-bottom: 8px; }
.issue-title strong { color: var(--suite-color-warning); font-size: 12px; }
.issue-title span { color: var(--suite-color-warning); font-size: 10.5px; }
.issue-row { gap: 12px; padding: 8px 0; border-top: 1px dashed #f3d8a5; }
.issue-row span { color: var(--suite-color-warning); font-size: 10.5px; font-weight: 700; }
.issue-row p { margin: 0; color: var(--suite-color-text-secondary); font-size: 11.5px; line-height: 1.55; }
.factory-flow { gap: 7px; }
.factory-chip {
  padding: 5px 9px;
  color: var(--suite-color-success);
  font-size: 11px;
  line-height: 1.3;
  background: var(--suite-color-success-weak);
  border: 1px solid #bbdfc7;
  border-radius: 999px;
}
.factory-chip.missing { color: var(--suite-color-warning); background: var(--suite-color-warning-weak); border-color: #f3d8a5; }
.flow-arrow { color: var(--suite-color-text-muted); font-size: 12px; }
.edit-hint { margin-bottom: 10px; color: var(--suite-color-text-secondary); font-size: 11px; line-height: 1.5; }
.edit-hint strong { color: var(--suite-color-text); }
.edit-hint span { color: var(--suite-color-text-muted); }
.manual-form,
.auto-edit-form {
  gap: 10px;
  padding: 11px;
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-control);
}
.manual-form.extra-row { border-style: dashed; background: var(--suite-color-surface-subtle); }
.manual-rows { gap: 9px; }
.list-cell { color: var(--suite-color-text-secondary); font-size: 11px; line-height: 1.5; }
.list-cell strong { display: block; color: var(--suite-color-text); font-size: 12px; }
.source-note { display: block; margin-top: 3px; color: var(--suite-color-text-muted); font-size: 9.5px; }
.source-note.edited { color: var(--suite-color-accent); }
.add-row-bar { padding-top: 10px; }
.add-manual-row {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--suite-color-accent);
  font: 700 11.5px/1.35 var(--suite-font-sans);
  background: var(--suite-color-accent-weak);
  border: 1px dashed var(--suite-color-accent-border);
  border-radius: var(--suite-radius-control);
  cursor: pointer;
}
.manual-action-guide { color: var(--suite-color-text-secondary); font-size: 11px; line-height: 1.6; }
.manual-actions { padding-top: 12px; border-top: 1px solid var(--suite-color-border); }

.history-reading-guide { margin: 14px 0; padding: 14px 16px; color: var(--suite-color-text); background: #f4f8ff; border: 1px solid #cdddfb; border-left: 4px solid var(--suite-color-accent); border-radius: var(--suite-radius-panel); }
.history-reading-guide > strong { display: block; margin-bottom: 10px; font-size: 13px; }
.history-reading-guide ol { gap: 10px; margin: 0; padding: 0; list-style: none; }
.history-reading-guide li { gap: 9px; align-items: center; min-width: 0; padding: 9px 11px; background: var(--suite-color-surface); border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-control); }
.history-reading-guide li > span { display: grid; flex: 0 0 25px; height: 25px; place-items: center; color: #fff; font: 800 11px/1 var(--suite-font-data); background: var(--suite-color-accent); border-radius: 50%; }
.history-reading-guide b, .history-reading-guide small { display: block; }
.history-reading-guide b { font-size: 12px; }
.history-reading-guide small { margin-top: 2px; color: var(--suite-color-text-secondary); font-size: 10.5px; line-height: 1.4; }
.history-tools { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 18px 0 12px; }
.history-tools label { flex: 1 1 440px; }
.history-tools input { width: min(520px, 100%); }
.history-tools p { margin: 0 0 3px; color: var(--suite-color-text-secondary); font-size: 11px; }
.history-day { margin: 20px 2px 8px; padding-bottom: 7px; color: var(--suite-color-text); font-size: 13px; border-bottom: 1px solid var(--suite-color-border); }
.history-day:first-child { margin-top: 4px; }
.history-day small { color: var(--suite-color-text-muted); font: 500 10.5px/1.4 var(--suite-font-sans); }
.history-entry {
  color: var(--suite-color-text);
  background: var(--suite-color-surface);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-panel);
  box-shadow: var(--suite-shadow-sm);
}
.history-entry[data-tone="release"] { border-left: 4px solid #2e8b57; }
.history-entry[data-tone="correction"] { border-left: 4px solid #2f65d9; }
.history-entry[data-tone="notice"] { border-left: 4px solid #b7791f; }
.history-entry[open] { border-color: var(--suite-color-accent-border); box-shadow: var(--suite-shadow-panel); }
.history-entry-summary {
  gap: 13px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
  background: var(--suite-color-surface-subtle);
}
.history-entry-summary::-webkit-details-marker { display: none; }
.history-status-mark { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; font: 800 12px/1 var(--suite-font-sans); background: #2e8b57; border-radius: 10px; box-shadow: inset 0 -1px 0 rgb(0 0 0 / 12%); }
.history-entry[data-tone="correction"] .history-status-mark { background: #2f65d9; }
.history-entry[data-tone="notice"] .history-status-mark { background: #b7791f; }
.history-entry-meta { gap: 6px; color: var(--suite-color-text-secondary); font-size: 11px; line-height: 1.45; }
.history-entry-meta time { color: var(--suite-color-text); font: 700 12px/1.4 var(--suite-font-data); }
.history-entry-operation { gap: 5px 12px; }
.history-work-number small { display: block; color: var(--suite-color-text-muted); font-size: 9.5px; }
.history-work-number strong { display: block; margin-top: 2px; color: var(--suite-color-text); font: 800 15px/1.35 var(--suite-font-data); letter-spacing: .01em; }
.history-action,
.history-balance {
  padding: 4px 8px;
  font-size: 10.5px;
  line-height: 1.3;
  border: 1px solid var(--suite-color-border);
  border-radius: 999px;
}
.history-action { justify-self: start; padding: 3px 8px; font-weight: 700; }
.history-action.release { color: #1d6f42; background: #edf8f1; border-color: #b9ddc6; }
.history-action.correction { color: #2455b5; background: #eef4ff; border-color: #c7d7f7; }
.history-action.notice { color: #8a5a13; background: #fff8e8; border-color: #efd69e; }
.history-action.success,
.history-balance.balanced { color: var(--suite-color-success); background: var(--suite-color-success-weak); border-color: #bbdfc7; }
.history-action.warning,
.history-balance.changed { color: var(--suite-color-warning); background: var(--suite-color-warning-weak); border-color: #f3d8a5; }
.history-action.danger { color: var(--suite-color-danger); background: var(--suite-color-danger-weak); border-color: #fecaca; }
.history-result { margin-top: 3px; color: var(--suite-color-text-secondary); font-size: 12.5px; line-height: 1.6; }
.history-result b { color: var(--suite-color-text); }
.history-result-after { color: #1d6f42; }
.history-status-comparison { overflow: hidden; background: #f8fafc; border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-panel); }
.history-status-side { padding: 14px 15px; }
.history-status-side > span { display: inline-flex; margin-bottom: 7px; padding: 3px 8px; font-size: 10px; font-weight: 800; border-radius: 999px; }
.history-status-side p { margin: 0; color: var(--suite-color-text); font-size: 12.5px; line-height: 1.65; }
.history-status-side.before { background: #fff9ec; }
.history-status-side.before > span { color: #8a5a13; background: #ffedbf; }
.history-status-side.after { background: #f1faf4; }
.history-status-side.after > span { color: #1d6f42; background: #dcefe3; }
.history-comparison-arrow { color: var(--suite-color-accent); font: 800 20px/1 var(--suite-font-data); background: #f8fafc; border-right: 1px solid var(--suite-color-border); border-left: 1px solid var(--suite-color-border); }
.history-expand { color: var(--suite-color-accent); font-size: 10.5px; font-weight: 700; }
.history-detail-content { gap: 12px; padding: 15px; border-top: 1px solid var(--suite-color-border); }
.history-explanation-flow { gap: 0; overflow: hidden; background: var(--suite-color-surface); border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-panel); }
.history-step { gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--suite-color-border); }
.history-step:last-child { border-bottom: 0; }
.history-step-number { display: grid; flex: 0 0 26px; height: 26px; place-items: center; color: var(--suite-color-accent); font: 800 11px/1 var(--suite-font-data); background: var(--suite-color-accent-weak); border: 1px solid var(--suite-color-accent-border); border-radius: 50%; }
.history-step h4 { margin: 0 0 4px; color: var(--suite-color-text); font-size: 12px; }
.history-step p { margin: 0; color: var(--suite-color-text-secondary); font-size: 12px; line-height: 1.65; }
.history-step.result-note { background: #f3faf5; }
.history-step.result-note .history-step-number { color: #1d6f42; background: #e5f5eb; border-color: #b9ddc6; }
.history-note { gap: 12px; padding: 11px 12px; border-radius: var(--suite-radius-control); }
.history-note strong { color: var(--suite-color-text); font-size: 11.5px; }
.history-note p { margin: 0; color: var(--suite-color-text-secondary); font-size: 11px; line-height: 1.6; }
.history-note.issue-note { background: var(--suite-color-warning-weak); border: 1px solid #f3d8a5; }
.history-note.decision-note { background: var(--suite-color-success-weak); border: 1px solid #bbdfc7; }
.history-note.reason-note { background: var(--suite-color-accent-weak); border: 1px solid var(--suite-color-accent-border); }
.history-total-change { padding: 12px; background: var(--suite-color-surface-subtle); border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-control); }
.history-total-change strong { color: var(--suite-color-text); font-size: 13px; }
.history-change-arrow { color: var(--suite-color-accent); }
.history-data-section { padding: 12px; background: var(--suite-color-surface-subtle); border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-control); }
.history-data-heading { margin-bottom: 9px; }
.history-data-heading h4 { margin: 0; color: var(--suite-color-text); font-size: 12px; }
.history-data-heading span { color: var(--suite-color-text-muted); font-size: 10.5px; }
.history-data-list { gap: 8px; }
.history-data-row { padding: 10px; background: var(--suite-color-surface); border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-control); }
.history-data-row header { margin-bottom: 9px; }
.history-data-row header span { display: block; color: var(--suite-color-text-muted); font-size: 9.5px; }
.history-data-row header strong { display: block; margin-top: 2px; color: var(--suite-color-text); font-size: 12px; }
.history-record-comparison { overflow: hidden; border: 1px solid var(--suite-color-border); border-radius: 8px; }
.history-record-side { padding: 10px; }
.history-record-side.before { background: #fffaf0; }
.history-record-side.after { background: #f3faf5; }
.history-record-side h5 { margin: 0 0 8px; font-size: 10.5px; }
.history-record-side.before h5 { color: #8a5a13; }
.history-record-side.after h5 { color: #1d6f42; }
.history-record-arrow { color: var(--suite-color-accent); font-weight: 800; background: #f8fafc; border-right: 1px solid var(--suite-color-border); border-left: 1px solid var(--suite-color-border); }
.history-data-row dl { gap: 8px; margin: 0; }
.history-data-row dl > div { padding: 7px 8px; background: var(--suite-color-surface-subtle); border-radius: 7px; }
.history-data-row dt { color: var(--suite-color-text-muted); font-size: 9.5px; line-height: 1.3; }
.history-data-row dd { margin: 3px 0 0; color: var(--suite-color-text); font-size: 11px; line-height: 1.45; }
.history-data-row dd.number { font-family: var(--suite-font-data); text-align: right; }
.history-snapshot-note { margin: 0; color: var(--suite-color-text-secondary); font-size: 10.5px; line-height: 1.6; }
.history-row-difference { margin: 8px 0 0; color: var(--suite-color-text-secondary); font-size: 10.5px; text-align: right; }
.history-row-difference strong { color: var(--suite-color-text); font-family: var(--suite-font-data); }
.history-source-line { padding-top: 10px; color: var(--suite-color-text-muted); font-size: 10px; line-height: 1.5; border-top: 1px solid var(--suite-color-border); }
.history-technical { color: var(--suite-color-text-secondary); background: var(--suite-color-surface-subtle); border: 1px solid var(--suite-color-border); border-radius: var(--suite-radius-control); }
.history-technical summary { padding: 10px 12px; color: var(--suite-color-text-secondary); font-size: 10.5px; cursor: pointer; }
.history-technical > div { gap: 12px; padding: 8px 12px; font-size: 10.5px; border-top: 1px solid var(--suite-color-border); }
.history-technical strong { max-width: min(680px, 100%); color: var(--suite-color-text); overflow-wrap: anywhere; }
.history-empty { display: grid; gap: 5px; }
.history-empty strong { color: var(--suite-color-text); }

.action-menu-panel { z-index: 80; gap: 3px; margin-top: 6px; }
.action-menu-panel .menu-item { width: 100%; text-align: left; box-shadow: none; }
.modal-backdrop { padding: 16px; }
.modal-card {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.modal-form,
.form-grid,
.auto-export-task,
.task-editor,
.recipient-list { gap: 12px; }
.attachment-note,
.auto-export-task,
.task-editor,
.recipient-item,
.schedule-facts > div {
  padding: 12px;
  color: var(--suite-color-text-secondary);
  background: var(--suite-color-surface-subtle);
  border: 1px solid var(--suite-color-border);
  border-radius: var(--suite-radius-control);
}
.attachment-note strong { display: block; margin-bottom: 4px; color: var(--suite-color-text); font-size: 11.5px; }
.attachment-note span { font-size: 11px; line-height: 1.55; }
.auto-task-heading,
.recipient-toolbar,
.task-editor-head,
.recipient-item,
.recipient-actions,
.switch-row { gap: 12px; }
.auto-task-heading h3,
.task-editor-head h3 { margin: 3px 0 0; color: var(--suite-color-text); font-size: 14px; line-height: 1.35; }
.auto-export-controls,
.schedule-facts { gap: 10px; }
.schedule-facts { margin: 10px 0 0; }
.schedule-facts dt { color: var(--suite-color-text-muted); font-size: 10px; line-height: 1.3; }
.schedule-facts dd { margin: 4px 0 0; color: var(--suite-color-text); font-size: 11.5px; line-height: 1.45; }
.recipient-toolbar { margin: 14px 0 10px; padding-top: 14px; border-top: 1px solid var(--suite-color-border); }
.recipient-toolbar strong { color: var(--suite-color-text); font-size: 13px; }
.recipient-item.disabled { opacity: .58; }
.recipient-main { gap: 3px; }
.recipient-main strong { color: var(--suite-color-text); font-size: 12.5px; }
.recipient-main small { color: var(--suite-color-text-muted); font-size: 10.5px; line-height: 1.45; }
.switch-row > span strong { display: block; color: var(--suite-color-text); font-size: 12px; }
.switch-row > span small { display: block; margin-top: 3px; color: var(--suite-color-text-muted); font-size: 10.5px; line-height: 1.45; }
.switch-row input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; }

* { scrollbar-color: #cbd5e1 transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 8px;
}
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 900px) {
  #main,
  .suite-main { width: 100%; padding: 18px 14px 50px; }
  .status-rail { min-height: 54px; margin: -18px -14px 18px; padding: 10px 14px; gap: 9px; }
  .topbar { min-height: 54px; padding: 10px 14px; }
  .panel,
  .content-panel,
  .filter-card,
  .manual-card,
  .history-card { padding: 16px; }
}

@media (max-width: 560px) {
  h2.pt,
  .page-title { font-size: 20px; }
  .panel,
  .content-panel,
  .filter-card,
  .manual-card,
  .history-card { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
