/* Leonix v0.4.7 | Calm light interface, no external visual assets. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --subtle-bg: #f5f5f7;
  --input: #ffffff;
  --border: #e5e5e9;
  --strong-border: #d2d2d7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0066cc;
  --accent-hover: #0056b3;
  --good: #18794e;
  --danger: #b42332;
  --warning: #965900;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
[hidden], .hidden { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
main { max-width: 1030px; padding: 0 26px 45px; margin: 0 auto; }

/* Restrained brand/navigation bar. */
.topbar, .brand, .progress, .progress-item, .step-heading, .row-actions, .file-row { display: flex; align-items: center; }
.topbar { min-height: 70px; justify-content: space-between; border-bottom: 1px solid #f0f0f2; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 760; letter-spacing: .105em; white-space: nowrap; }
.brand-sub { color: #88888f; font-weight: 500; letter-spacing: .06em; }
.version { color: #98989c; font-size: 11px; letter-spacing: .07em; font-weight: 550; }

/* Product-focused heading and contextual privacy reassurance. */
.hero { text-align: center; padding: 66px 0 24px; }
.hero h1 { font-size: clamp(36px, 5.5vw, 55px); line-height: 1.1; letter-spacing: -.055em; font-weight: 760; margin: 0; }
.hero p { color: var(--muted); margin: 15px auto 17px; font-size: 16px; max-width: 560px; }
.privacy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #f3f8f5; color: #32664d; border: 1px solid #e3efe7; border-radius: 100px; padding: 6px 13px; font-size: 12px; line-height: 1.5; }
.privacy-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #34a66b; }

/* One single workspace card, not three stacked cards. */
.wizard-card { background: var(--panel); max-width: 900px; margin: 26px auto 0; border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 16px 45px rgba(29,29,31,.045), 0 2px 9px rgba(29,29,31,.018); overflow: hidden; }
.wizard-card .progress { gap: 10px; margin: 0; padding: 20px 44px; background: #fbfbfc; border-bottom: 1px solid var(--border); }
.wizard-card .progress-item { gap: 9px; justify-content: center; flex: none; min-width: 0; min-height: 36px; padding: 5px 8px; color: #86868b; background: transparent; border: none; border-radius: 10px; font-size: 12px; font-weight: 660; white-space: nowrap; }
.wizard-card .progress-number { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1px solid #d8d8dd; border-radius: 50%; color: #86868b; background: #fff; font-size: 12px; font-weight: 700; }
.wizard-card .progress-line { flex: 1; min-width: 12px; height: 1px; background: #dedee2; }
.wizard-card .progress-item.active { color: #1d1d1f; background: #efeff2; }
.wizard-card .progress-item.active .progress-number { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
.wizard-card .progress-item.complete { color: #377558; }
.wizard-card .progress-item.complete .progress-number { background: #e6f5ec; border-color: #b8ddc7; color: #257647; }
.wizard-card .progress-item.available { color: #646468; }
.wizard-card .progress-item.available:hover:not(:disabled), .wizard-card .progress-item.complete:hover:not(:disabled) { background: #f0f0f3; }
.wizard-card .progress-item.locked { color: #a8a8ad; cursor: not-allowed; }
.wizard-card .progress-item.locked .progress-number { color: #b0b0b5; }
.wizard-content .step { margin: 0; padding: 0; border: 0; background: transparent; }
.wizard-content .step-heading { padding: 35px 42px 18px; }
.wizard-content .step-title { flex: 1; min-width: 0; }
.wizard-content .step-title h2 { font-size: 25px; font-weight: 735; line-height: 1.22; letter-spacing: -.035em; margin: 0; }
.wizard-content .step-title p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.wizard-content .step-body { padding: 0 42px 38px; }
.step-index, .step-badge { display: none; }

/* Programmatically focused step titles should not gain the browser's heavy black rectangle.
   The active progress step remains visually identifiable. */
.step-title h2[tabindex="-1"]:focus { outline: none; }

/* Form controls with neutral surfaces and a single accent color. */
.control { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.control > span { color: #45454a; font-size: 13px; font-weight: 620; }
.hint { color: #8b8b92; font-size: 11px; font-weight: 400; }
input[type="file"], input[type="text"], select { display: block; min-width: 0; width: 100%; min-height: 46px; padding: 10px 12px; color: var(--text); background: var(--input); border: 1px solid var(--strong-border); border-radius: 12px; outline: none; }
input::placeholder { color: #95959b; }
input[type="file"] { min-height: 63px; padding: 13px; background: #fbfbfd; }
input[type="file"]::file-selector-button { min-height: 35px; padding: 7px 15px; margin-right: 13px; background: #1d1d1f; color: #fff; border: 0; border-radius: 9px; font-weight: 600; cursor: pointer; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
button { min-height: 44px; padding: 10px 17px; border: 1px solid #d2d2d7; border-radius: 999px; color: var(--text); background: #fff; white-space: nowrap; font-weight: 600; transition: background .17s ease, box-shadow .17s ease, border-color .17s ease; }
button:hover:not(:disabled) { background: #f5f5f7; border-color: #c3c3ca; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #74b6fa; outline-offset: 3px; }
input[type="file"]:focus-visible, input[type="text"]:focus-visible, select:focus-visible { border-color: #7bbaff; }
button:disabled { opacity: .43; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 690; }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.subtle { background: #fff; color: #4b4b50; }
button.subtle:hover:not(:disabled) { background: #f5f5f7; }
button.danger { color: var(--danger); }
.file-row { align-items: stretch; gap: 12px; }
.file-control { width: 100%; flex: 1; min-width: 0; }
/* Optional drag-and-drop upload without sacrificing the native file picker. */
.upload-dropzone { border: 1.5px dashed #c9d0d9; border-radius: 16px; padding: 17px 18px 13px; background: #fafbfc; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.upload-dropzone.drag-over { border-color: var(--accent); background: #eef6ff; box-shadow: inset 0 0 0 1px #9cc9f5; }
.upload-dropzone .file-row { width: 100%; }
.upload-dropzone input[type="file"] { background: #fff; }
.drop-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.drop-file-name { text-align: center; color: #255f99; font-size: 12px; font-weight: 600; margin: 8px 0 0; overflow-wrap: anywhere; }

.example-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 12px; }
button.example-link { transition: none; min-height: 32px; padding: 3px 4px; border: 0; border-radius: 5px; background: rgba(0,0,0,0); color: var(--accent); font-size: 12px; font-weight: 680; white-space: normal; text-align: left; }
button.example-link:hover:not(:disabled) { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; background: transparent; }
.sheet-wrap { margin-top: 16px; max-width: 460px; }
.options { margin-top: 20px; }
.options summary, .tools-panel > summary, .backup-tools summary, .result-details summary { color: #606066; font-size: 13px; cursor: pointer; list-style: none; }
.options summary::before, .tools-panel > summary::before, .backup-tools summary::before, .result-details summary::before { content: '›'; display: inline-block; margin-right: 10px; color: #8a8a90; font-size: 20px; line-height: 12px; transform-origin: 50% 50%; transition: transform .18s ease; }
.options[open] > summary::before, .tools-panel[open] > summary::before, .backup-tools[open] > summary::before, .result-details details[open] > summary::before { transform: rotate(90deg); }
.options-grid, .preset-controls { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.status { margin-top: 19px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border); background: #f8f8fa; color: #5c5c62; font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.status.good { background: #eef8f1; border-color: #cfe7d7; color: #17683d; }
.status.bad { background: #fff2f2; border-color: #f1c8cc; color: #a62a34; }
.status.neutral { color: #696970; }
.retry-row { margin-top: 12px; }
.retry-row button { min-height: 36px; font-size: 12px; padding: 6px 13px; }

/* Mapping: clear column layout with soft row grouping. */
.source-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; margin-bottom: 24px; border: 1px solid #e5e9ed; border-radius: 12px; background: #f6f8fa; color: #4b5561; font-size: 12px; overflow-wrap: anywhere; }
button.link-button { border: 0; min-height: 34px; padding: 5px 7px; color: var(--accent); background: transparent; flex: none; font-size: 12px; }
button.link-button:hover:not(:disabled) { background: #ebf1f8; }
.mapping-headline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px; }
.mapping-headline p { margin: 0; color: var(--muted); font-size: 12px; }
.small-meta { color: #87878d; font-size: 11px; white-space: nowrap; }
.mapping-header, .mapping { display: grid; grid-template-columns: 85px minmax(95px,1.1fr) minmax(125px,1.25fr) minmax(105px,.82fr) 44px 34px; gap: 10px; align-items: center; }
.mapping-header { padding: 5px 12px 7px; font-size: 11px; color: #86868b; }
.mapping { padding: 10px 12px; margin-bottom: 9px; border: 1px solid #ededf0; border-radius: 13px; background: #fbfbfd; }
.mapping .control > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.mapping input[type="text"], .mapping select { min-height: 43px; font-size: 12px; padding: 9px 10px; background: #fff; }
.mapping .required-control { justify-content: center; align-items: center; }
.mapping button.remove-field { display: grid; place-items: center; width: 34px; height: 38px; min-height: 38px; padding: 0; background: transparent; border: none; color: #84848a; font-size: 23px; }
.mapping button.remove-field:hover:not(:disabled) { color: var(--danger); background: #fdf0f1; }
.row-actions { flex-wrap: wrap; gap: 10px; }
.main-actions { margin-top: 15px; }
.mapping-feedback { white-space: pre-line; margin-top: 16px; padding: 11px 13px; color: #6d6d74; font-size: 12px; border: 1px dashed #dedee3; border-radius: 12px; background: #fcfcfd; }
.mapping-feedback.ok { color: var(--good); border-color: #b4d9c1; background: #f5fbf6; }
.mapping-feedback.warn { color: var(--warning); border-color: #eddab9; background: #fffaf2; }
/* Step 2: live sample. Quiet, collapsible and intentionally not a full-data verdict. */
.mapping-preview { margin-top: 24px; padding: 17px 18px 18px; border: 1px solid #e7e9ed; background: #fcfcfd; border-radius: 15px; }
.mapping-preview > summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; font-size: 14px; color: #25272c; font-weight: 650; }
.mapping-preview > summary::-webkit-details-marker { display: none; }
.mapping-preview > summary::before { content: '›'; color: #8a8a90; font-size: 19px; font-weight: 400; transform: rotate(0deg); transition: transform .18s ease; }
.mapping-preview[open] > summary::before { transform: rotate(90deg); }
.mapping-preview > summary .small-meta { margin-left: auto; font-size: 11px; font-weight: 400; color: #777c83; }
.mapping-preview-note { margin: 12px 0 0; color: #6b7077; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.mapping-preview-note.preview-alert { color: #946a29; }
.mapping-preview-scroll { margin-top: 13px; border: 1px solid #e8eaed; border-radius: 10px; background: #fff; }
.mapping-preview-scroll:empty { display: none; }
.mapping-preview-scroll table { min-width: max-content; width: 100%; margin: 0; }
.mapping-preview-scroll th { background: #f5f6f8; white-space: nowrap; }
.mapping-preview-scroll th, .mapping-preview-scroll td { max-width: 280px; min-width: 105px; }
.mapping-preview-scroll td { white-space: pre-wrap; }
.tools-panel { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.tools-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 650; }
.tools-panel > summary::before { margin-right: 2px; }
.tools-panel > summary > span:first-child { flex: 1; }
.summary-caption { color: #9a9aa0; font-size: 11px; font-weight: 400; }
.tools-inner { padding: 17px 0 0; }
.tools-inner > p, .help p { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.tools-inner > .row-actions { margin: 10px 0; }
.preset-controls { margin-top: 16px; }
.backup-tools { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.backup-tools .row-actions { margin: 13px 0; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 29px; padding-top: 20px; border-top: 1px solid var(--border); }
.wizard-actions .primary { min-width: 152px; }
.result-actions { margin: 2px 0 8px; }
.result-details { margin-top: 20px; }
.result-details > details { padding: 14px 0; border-top: 1px solid var(--border); }
.result-details p { margin-top: 12px; }
.scroll { width: 100%; overflow-x: auto; margin-top: 14px; }
table { border-collapse: collapse; min-width: 540px; width: 100%; font-size: 12px; }
tr { background: #fff; }
th, td { padding: 10px 12px; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid #e9e9ed; max-width: 320px; }
th { background: #f7f7f9; color: #4b4b50; font-weight: 700; }
.warn { color: var(--warning); }

/* Self-hosted open-source license page (no inline styles, CSP compatible). */
.back-link, .license-link { color: var(--accent); text-decoration: none; }
.back-link:hover, .license-link:hover { text-decoration: underline; }
.license-hero { padding-bottom: 18px; }
.license-hero h1 { font-size: clamp(29px,5vw,40px); }
.license-card { max-width: 720px; padding: 32px; }
.license-card h2 { margin: 0 0 7px; font-size: 20px; }
.license-copy { color: var(--muted); margin: 0 0 10px; }
.license-divider { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.license-note { color: #8a8a90; font-size: 12px; margin: 22px 0 0; }
/* Legal text is available without a visually heavy footer. */
footer { max-width: 900px; margin: 22px auto 0; text-align: right; font-size: 11px; }
footer a { color: #96969d; text-decoration: none; }
footer a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 760px) {
  main { padding: 0 18px 35px; }
  .hero { padding: 46px 0 15px; }
  .wizard-card { margin-top: 22px; }
  .wizard-card .progress { padding: 16px 22px; gap: 5px; }
  .wizard-content .step-heading { padding: 29px 26px 15px; }
  .wizard-content .step-body { padding: 0 26px 29px; }
  .mapping-header { display: none; }
  .mapping { grid-template-columns: repeat(2,minmax(0,1fr)); position: relative; gap: 10px; padding: 14px 14px 15px; }
  .mapping .control > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 11px; }
  .mapping .required-control { justify-content: flex-start; align-items: flex-start; align-self: end; padding-right: 42px; }
  .mapping .required-control > input { margin-top: 7px; }
  .mapping button.remove-field { position: absolute; right: 12px; bottom: 12px; }
  .options-grid, .preset-controls { grid-template-columns: 1fr; }
  .result-actions button { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 480px) {
  main { padding: 0 14px 30px; }
  .topbar { min-height: 63px; }
  .brand { font-size: 12px; gap: 7px; letter-spacing: .08em; }
  .brand-sub { letter-spacing: 0; }
  .version { font-size: 10px; }
  .hero { padding: 47px 5px 14px; }
  .hero h1 { font-size: clamp(31px, 8.3vw, 40px); letter-spacing: -.055em; }
  .hero p { margin: 13px auto 16px; font-size: 14px; }
  .privacy { max-width: 100%; font-size: 11px; padding: 6px 11px; }
  .wizard-card { border-radius: 18px; margin-top: 18px; }
  .wizard-card .progress { padding: 13px 10px; gap: 3px; }
  .wizard-card .progress-item { gap: 5px; min-height: 34px; padding: 4px 2px; font-size: 10px; }
  .wizard-card .progress-number { width: 22px; height: 22px; font-size: 10px; }
  .wizard-card .progress-line { min-width: 4px; }
  .wizard-content .step-heading { padding: 26px 18px 15px; }
  .wizard-content .step-title h2 { font-size: 22px; }
  .wizard-content .step-title p { font-size: 12px; }
  .wizard-content .step-body { padding: 0 18px 24px; }
  .upload-dropzone { padding: 12px; }
  .drop-hint { font-size: 11px; }
  input[type="file"] { font-size: 12px; }
  input[type="file"]::file-selector-button { margin-right: 8px; padding: 7px 10px; }
  .mapping-headline { flex-wrap: wrap; }
  .mapping-preview { padding: 14px 12px 15px; margin-top: 20px; }
  .mapping-preview > summary { gap: 5px; font-size: 13px; }
  .mapping-preview > summary .small-meta { font-size: 10px; }
  .source-summary { align-items: flex-start; flex-wrap: wrap; }
  .wizard-actions > button { flex: 1; padding-left: 10px; padding-right: 10px; }
  .wizard-actions .primary { min-width: 0; }
}
@media (max-width: 345px) {
  .brand-sub { display: none; }
  .wizard-card .progress-item { font-size: 9px; }
  .wizard-card .progress-item { gap: 3px; }
  .mapping { gap: 7px; padding: 10px; }
  .mapping input[type="text"], .mapping select { padding: 7px 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* A clear secondary workflow action at the end of the completed review. */
#startNewFile { margin-left: auto; }


/* Optional data-cleaning controls stay collapsed unless a column uses them. */
.clean-options { grid-column: 1 / -1; border-top: 1px solid #e8e8ee; margin-top: 1px; padding: 8px 3px 0; }
.clean-options > summary { cursor: pointer; font-size: 12px; color: #5f646d; font-weight: 580; display: flex; align-items: center; gap: 10px; }
.clean-options > summary .clean-state { color: #8b8e96; margin-left: auto; font-size: 11px; font-weight: 450; }
.clean-fields { display: grid; grid-template-columns: .85fr 1fr 1.5fr; align-items: end; gap: 12px; margin: 13px 0 5px; }
.clean-fields .control > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 11px; color: var(--muted); }
.clean-fields .control input, .clean-fields .control select { min-height: 38px; }
.clean-switch { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: 12px; color: #50545c; }
.clean-switch input { flex: none; }
@media (max-width: 760px) { .clean-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } .clean-fields .control:last-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .clean-fields { grid-template-columns: 1fr; } .clean-fields .control:last-child { grid-column: auto; } }

/* v0.5.2: optional numeric format conversion remains inside each field's disclosure. */
.clean-fields .format-control { grid-column: 1 / -1; }
.clean-fields .format-control select { width: 100%; max-width: 100%; }
.clean-format-note { grid-column: 1 / -1; color: var(--muted); font-size: 11px; margin: -3px 0 0; line-height: 1.6; }
@media (max-width: 760px) {
  /* Avoid an unlabeled remove X overlapping the expanded conversion helper. */
  .mapping button.remove-field {
    position: static; grid-column: 1 / -1; justify-self: end;
    width: auto; min-height: 30px; height: 30px; padding: 3px 8px;
    color: var(--muted); font-size: 15px; border-radius: 7px;
  }
  .mapping button.remove-field::after { content: ' 删除字段'; font-size: 11px; margin-left: 4px; }
}
@media (min-width: 481px) and (max-width: 760px) {
  .clean-fields > .control:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .mapping button.remove-field { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
}


/* v0.5.3: explicit, keyboard-accessible column order controls. */
.order-controls { display: flex; flex-direction: column; align-items: center; gap: 5px; align-self: center; min-width: 0; }
.order-number { font-size: 10px; color: #7f858e; font-weight: 600; white-space: nowrap; }
.order-buttons { display: flex; align-items: center; gap: 2px; }
.mapping .order-buttons button { width: 25px; height: 28px; min-height: 28px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #4f6074; font-size: 15px; line-height: 1; }
.mapping .order-buttons button:hover:not(:disabled) { border-color: #d5dce7; background: #ebf3ff; color: #1769c2; }
.mapping .order-buttons button:disabled { opacity: .27; cursor: not-allowed; }
.mapping .order-handle { cursor: grab; letter-spacing: -2px; user-select: none; }
.mapping .order-handle:active { cursor: grabbing; }
.mapping.mapping-dragging { opacity: .56; }
.mapping.mapping-drop-before { box-shadow: inset 0 3px #3478d9; }
.mapping.mapping-drop-after { box-shadow: inset 0 -3px #3478d9; }
@media (max-width: 760px) {
  .mapping > .order-controls { grid-column: 1 / -1; display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 0 0 5px; border-bottom: 1px solid #e9ebef; }
  .mapping .order-buttons button { width: 36px; height: 33px; min-height: 33px; border-color: #e6e9ee; font-size: 17px; }
  .mapping .order-handle { display: none; }
}

/* v0.5.4: compact advisory rules, shown only when saved presets match source names. */
.rule-suggestions { margin: -9px 0 22px; padding: 12px 16px 13px; border: 1px solid #e3e7ee; border-radius: 13px; background: #fafbfc; }
.rule-suggestions > summary { list-style: none; display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 650; color: #333942; cursor: pointer; }
.rule-suggestions > summary::-webkit-details-marker { display: none; }
.rule-suggestions > summary::before { content: '›'; color: #858b96; font-size: 19px; line-height: 1; }
.rule-suggestions[open] > summary::before { transform: rotate(90deg); }
.rule-suggestions .small-meta { margin-left: auto; }
.rule-suggestion-note { color: var(--muted); font-size: 11px; margin: 8px 0 9px; }
.rule-suggestion-list { display: grid; gap: 7px; }
.rule-suggestion { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 11px; background: white; border: 1px solid #e7e8ec; border-radius: 10px; min-width: 0; }
.rule-suggestion-info { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rule-suggestion-info strong { font-size: 12px; font-weight: 650; }
.rule-suggestion-meta { font-size: 11px; color: #6b7077; }
.rule-suggestion-warning { font-size: 11px; color: #95641e; }
.rule-suggestion-apply { flex: none; font-size: 12px; min-height: 34px; padding: 6px 12px; }
@media (max-width: 480px) {
  .rule-suggestions { margin: -7px 0 20px; padding: 11px; }
  .rule-suggestion { align-items: flex-start; gap: 8px; }
  .rule-suggestion-apply { padding: 6px 9px; }
}

/* v0.5.5: optional batch mode; the single-file wizard stays unchanged. */
.batch-entry {margin-top:17px; border-top:1px solid var(--border); padding:14px 2px 0;}
.batch-entry > summary {cursor:pointer; color:#56565d; font-size:13px; font-weight:620;}
.batch-entry > summary .hint {font-weight:400; margin-left:7px;}
.batch-entry-body {margin-top:15px; border:1px solid #e5e7eb; background:#f9fafb; border-radius:13px; padding:18px;}
.batch-entry-body p, .batch-review p, .batch-note {font-size:12px; color:var(--muted); line-height:1.65;}
.batch-entry-body input[type="file"] {width:100%; background:#fff;}
.batch-entry-body .batch-note {color:var(--accent); margin-bottom:0;}
.batch-review {background:#fcfcfd; border:1px solid var(--border); border-radius:16px; padding:20px;}
.batch-review-heading {display:flex; justify-content:space-between; gap:12px; align-items:center;}
.batch-review-heading strong {font-size:16px;}
.batch-format {max-width:260px; margin:14px 0;}
.batch-review .row-actions {margin:16px 0 12px;}
.batch-review .batch-note {white-space:pre-line; overflow-wrap:anywhere;}
.batch-status-table {min-width:500px; width:100%;}
.batch-status-table td, .batch-status-table th {text-align:left; vertical-align:top; overflow-wrap:anywhere; max-width:240px;}
.batch-status-table td:nth-child(2) {font-weight:600;}
.batch-status-table .failed {color:var(--danger);}
.batch-status-table .passed {color:var(--good);}
.batch-review #batchCancel {border-color:#e6b4b9;color:var(--danger);}
@media(max-width:600px) {.batch-review {padding:14px;} .batch-entry-body {padding:14px;} .batch-review .row-actions > button {flex:1 1 145px;} }

/* v0.5.9 — Accessible, understated import failure recovery. */
.import-recovery { margin-top: 12px; padding: 18px; border: 1px solid #e5e5e9; border-radius: 14px; background: #fafafa; }
.recovery-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.recovery-head strong { font-size: 14px; color: var(--text); }
.recovery-code { font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); }
.import-recovery p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.import-recovery .recovery-button { margin-top: 2px; }
@media(max-width:420px){ .import-recovery { padding: 14px; } .recovery-head { gap: 4px; } }

/* MALYOR bilingual controls: compact at narrow widths. */
.header-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; min-width:0; }
select.language-switch { width:auto; min-width:0; min-height:34px; padding:4px 8px; border:1px solid var(--strong-border); border-radius:9px; background:#fff; color:var(--text); font-size:12px; font-weight:600; }
@media (max-width:480px) { .brand-sub,.version { display:none; } .header-actions { gap:8px; } select.language-switch { font-size:11px; } }
