.history-import-trigger { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.history-import-dialog { width: min(1120px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); box-shadow: 0 24px 70px #14244233; }
.history-import-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.history-import-header, .history-import-footer { flex-shrink: 0; }
.history-import-dialog .history-import-body { min-height: 0; overflow: auto; }
.history-import-dialog::backdrop { background: #18233870; }
.history-import-header { display: flex; align-items: center; justify-content: space-between; padding: 23px 28px 20px; border-bottom: 1px solid var(--line); }
.history-import-header h2 { display: inline; margin: 0; font-size: 21px; letter-spacing: .3px; }
.history-import-header p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.history-import-header .history-close { width: 32px; height: 32px; padding: 0; color: var(--muted); font-size: 24px; background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.history-import-body { padding: 22px 28px 26px; }
.history-import-steps { display: flex; align-items: center; justify-content: center; gap: 32px; list-style: none; padding: 0; margin: 0 0 24px; }
.history-import-steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.history-import-steps li + li::before { content: ""; width: 72px; height: 1px; background: var(--line); margin-right: 18px; }
.history-import-steps b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-soft); font-size: 12px; font-weight: 500; }
.history-import-steps .active { color: var(--primary); font-weight: 600; }
.history-import-steps .active b { background: var(--primary); color: white; }
.history-import-steps .complete b { background: #e9f1ff; color: var(--primary); }
.history-import-notice { display: flex; gap: 10px; padding: 12px 14px; margin: 0 0 20px; background: #f0f5ff; border: 1px solid #dbe7ff; border-radius: 6px; font-size: 13px; line-height: 1.7; color: #496287; }
.history-import-notice strong { flex-shrink: 0; color: #30599b; }
.history-import-dropzone { display: grid; justify-items: center; gap: 14px; padding: 36px 20px; border: 1px dashed #b8c8e2; border-radius: 8px; background: #fafcff; text-align: center; }
.history-import-dropzone.dragging { border-color: var(--primary); background: #edf3ff; }
.history-upload-symbol { display: grid; place-items: center; width: 48px; height: 48px; color: var(--primary); background: #eaf1ff; border-radius: 10px; font-size: 28px; }
.history-import-dropzone h3 { margin: 0; font-size: 16px; }
.history-import-dropzone p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.history-import-file-label { cursor: pointer; }
.history-import-file-label:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
.history-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.history-field-hint { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.history-import-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding: 17px 28px; background: #fcfdff; }
.history-import-footer > span { color: var(--muted); font-size: 12px; }
.history-import-footer > div { display: flex; gap: 10px; }
.history-import-error { color: var(--danger); font-size: 13px; line-height: 1.7; margin: 12px 0 0; }
.history-import-error:empty { display: none; }
.history-import-done { text-align: center; padding: 30px 20px 32px; }
.history-done-symbol { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; color: #14876c; background: #eaf7f2; border-radius: 50%; font-size: 28px; }
.history-import-done h3 { font-size: 21px; margin: 0 0 14px; }
.history-import-done p { color: var(--muted); line-height: 1.8; margin: 8px 0; }
.history-import-done strong { color: var(--text); }
.history-done-batch { font-size: 12px; }
@media (max-width: 700px) {
  .history-import-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .history-import-header, .history-import-body { padding: 18px 16px; }
  .history-import-header h2 { font-size: 18px; }
  .history-import-header p { max-width: 260px; line-height: 1.7; }
  .history-import-steps { gap: 14px; justify-content: space-between; }
  .history-import-steps li { gap: 6px; font-size: 12px; }
  .history-import-steps li + li::before { display: none; }
  .history-import-footer { align-items: stretch; flex-direction: column; padding: 15px 16px; gap: 12px; }
  .history-import-footer > div { justify-content: flex-end; flex-wrap: wrap; }
}
.history-selected-file { overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
.history-currency { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; font-size: 13px; }
.history-currency select { width: 170px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); }
.history-progress-panel { padding: 24px 0; }
.history-progress-panel progress { width: 100%; height: 16px; margin: 16px 0; accent-color: var(--primary); }
.history-progress-panel p { line-height: 1.8; }
.history-recent { margin-top: 24px; }
.history-recent h3 { font-size: 14px; }
.history-recent-task { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 12px 0; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.history-recent-task span { overflow-wrap: anywhere; }
.history-recent-task small { flex-shrink: 0; color: var(--muted); }
.history-original-fields dd { overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 600px) { .history-recent-task { align-items: flex-start; flex-direction: column; gap: 6px; } }
.history-import-dialog .history-currency { flex-direction: row; white-space: nowrap; }
.history-import-dialog .history-currency select { width: 180px; flex: none; }
