/* Daten-Werkstatt -- Route "CSV-Dubletten entfernen".
   Uebernommen aus kukanilea-csv-dubletten-entfernen/styles.css (Stand ab641b17a): genau die
   Regeln, die styles.css dieser Werkstatt nicht schon gleichlautend
   traegt. Laedt NACH styles.css; die Shell-Bloecke (KUK-SHELL:CSS,
   KUK-ZIELGROESSEN) kommen von dort und stehen hier nicht. */

:root { --red-ink: #8a1f2b; --red-soft: #fbe0e2; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.scope-note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 14px 16px; background: var(--warn-soft); border: 1px solid #f3d3ab; border-radius: var(--radius); font-size: 14px; color: var(--warn-ink); }
.scope-note svg { flex: none; margin-top: 2px; }
.scope-note a { color: var(--warn-ink); font-weight: 700; }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tool-status { font-size: 14px; color: var(--ink-3); min-height: 1.4em; }
/* display: block wie im Original -- ein <label> ist inline, und der Rahmen
   zerfiel in drei Stuecke (2026-10-16). */
.dropzone { display: block; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 32px 20px; text-align: center; cursor: pointer; background: var(--paper); }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--blue); background: var(--blue-tint); }
.dropzone:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.dropzone-icon { color: var(--blue); margin: 0 0 10px; }
.dropzone-text { font-size: 14.5px; color: var(--ink-2); font-weight: 600; margin: 0 0 4px; }
.dropzone-hint { font-size: 12.5px; color: var(--ink-4); margin: 0; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.opt { font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin: 16px 0 0; }
.opt select { font-weight: 400; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink); background: var(--white); }
.file-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); font-size: 13.5px; color: var(--ink-2); }
.file-meta-name { font-weight: 700; word-break: break-all; }
.file-meta-size { color: var(--ink-4); font-size: 12.5px; }
.invoice-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; margin: 0 0 20px; }
.invoice-summary-block h3 { margin: 0 0 6px; font-size: 12px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.invoice-summary-block p { margin: 0 0 2px; font-size: 14px; color: var(--ink-2); }
.invoice-summary-block .party-name { font-weight: 700; color: var(--ink); }
.invoice-meta-list { list-style: none; margin: 0; padding: 0; }
.invoice-meta-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.invoice-meta-list li:first-child { border-top: none; }
.invoice-meta-list li b { color: var(--ink); font-weight: 700; }
.invoice-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 20px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.invoice-table th, .invoice-table td { text-align: right; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.invoice-table th:first-child, .invoice-table td:first-child { text-align: left; white-space: normal; }
.invoice-table thead th { color: var(--ink-4); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; background: var(--paper); }
.invoice-table tbody tr:nth-child(even) { background: var(--paper); }
.zip-file-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 16px; }
.zip-file-table th, .zip-file-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.zip-file-table th { color: var(--ink-4); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; background: var(--paper); }
.zip-file-table tbody tr:nth-child(even) { background: var(--paper); }
.zip-file-table td:nth-child(2), .zip-file-table td:nth-child(3) { white-space: nowrap; color: var(--ink-4); }
.invoice-totals { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin: 0 0 4px; }
.invoice-totals-row { display: flex; justify-content: space-between; gap: 24px; width: 100%; max-width: 320px; font-size: 14px; color: var(--ink-2); }
.invoice-totals-row.is-grand { font-size: 17px; font-weight: 800; color: var(--blue-2); border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 2px; }
.pdf-preview-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); padding: 12px; text-align: center; overflow: auto; max-height: 720px; }
.pdf-preview-wrap canvas { max-width: 100%; height: auto; box-shadow: var(--shadow-sm); }
.pdf-preview-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.attachment-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 4px 12px; margin: 0 0 14px; }
.attachment-badge.is-missing { color: var(--warn-ink); background: var(--warn-soft); }
.raw-headers { margin-top: 12px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.body-tabs { display: flex; gap: 4px; margin: 0 0 12px; }
.body-tab { padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.body-tab.is-active { color: var(--white); background: var(--blue); border-color: var(--blue); }
.message-body-frame { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.message-body-frame iframe { display: block; width: 100%; height: 420px; border: none; background: var(--white); }
.attachment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.attachment-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.attachment-list li:first-child { border-top: none; }
.attachment-name { font-weight: 700; word-break: break-all; }
.attachment-meta { color: var(--ink-4); font-size: 12.5px; }
.ics-event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ics-event-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.ics-event-title { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.ics-event-when { font-size: 13px; color: var(--ink-3); margin: 0 0 6px; }
.ics-event-meta-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.ics-event-meta-list li { font-size: 13.5px; display: flex; gap: 6px; }
.ics-event-meta-list li span { color: var(--ink-4); min-width: 92px; flex-shrink: 0; }
.ics-event-desc { margin: 8px 0 0; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.ics-event-rrule { margin-top: 8px; font-size: 12px; color: var(--warn-ink); background: var(--warn-soft); padding: 5px 8px; border-radius: var(--radius-sm); display: inline-block; }
.source-note { font-size: 12.5px; color: var(--ink-4); margin-top: 16px; }
.source-note a { color: var(--ink-4); text-decoration: underline; }
.tool-textarea-label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tool-textarea { width: 100%; min-height: 180px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; resize: vertical; box-sizing: border-box; }
.tool-textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.hop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; counter-reset: hop; }
.hop-item { position: relative; padding: 12px 14px 12px 34px; border-left: 2px solid var(--line-2); margin-left: 10px; }
.hop-item:last-child { border-left-color: transparent; }
.hop-item::before { counter-increment: hop; content: counter(hop); position: absolute; left: -13px; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hop-host { font-weight: 700; font-size: 14.5px; margin: 0 0 4px; word-break: break-word; }
.hop-meta-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hop-meta-list li { font-size: 13px; display: flex; gap: 6px; color: var(--ink-3); }
.hop-meta-list li span { color: var(--ink-4); min-width: 90px; flex-shrink: 0; }
.hop-delay { margin-top: 6px; font-size: 12px; color: var(--ink-4); background: var(--paper); padding: 3px 8px; border-radius: var(--radius-sm); display: inline-block; }
.hop-delay.is-slow { color: var(--warn-ink); background: var(--warn-soft); }
.auth-badge-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.auth-badge-list li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.auth-mech { font-weight: 700; min-width: 70px; }
.auth-result { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; }
.auth-result.is-pass { color: #14532d; background: #dcfce7; }
.auth-result.is-fail { color: #7f1d1d; background: #fee2e2; }
.auth-result.is-neutral { color: var(--ink-3); background: var(--paper); }
.auth-detail { color: var(--ink-4); font-size: 12.5px; }
@media print {
  .site-header, .site-footer, .tool-actions, .privacy-note, .scope-note, .dropzone, .pdf-preview-nav, .faq-list { display: none; }
  body { background: var(--white); }
  .tool-card { box-shadow: none; border: none; padding: 0; margin: 0 0 20px; }
  .invoice-table-wrap { border: none; overflow: visible; }
  .invoice-table { font-size: 11px; }
  .invoice-table th, .invoice-table td { padding: 4px 6px; }
  .pdf-preview-wrap { border: none; max-height: none; overflow: visible; }
  @page { size: A4; margin: 16mm; }
  a[href]::after { content: ""; }
}
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); font-size: 13.5px; }
.file-row-name { flex: 1; font-weight: 600; color: var(--ink-2); word-break: break-all; }
.file-row-size { color: var(--ink-4); font-size: 12.5px; white-space: nowrap; }
.file-row-remove { border: none; background: transparent; color: var(--warn-ink); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.file-row-remove:hover { text-decoration: underline; }
.csv-preview-wrap { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; max-height: 420px; overflow-y: auto; }
.csv-preview-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.csv-preview-wrap th, .csv-preview-wrap td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.csv-preview-wrap th { color: var(--ink-4); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; background: var(--paper); position: sticky; top: 0; }
.csv-preview-wrap tbody tr:nth-child(even) { background: var(--paper); }
