/* Sanitize PDF */
.tool-wrapper[data-tool="sanitize-pdf"] { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.san-app { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.san-busy { margin: 16px auto; text-align: center; color: #475569; font-weight: 500; }
.san-report h3, .san-result h3 { font-size: 1.05rem; margin: 0 0 10px; }
.san-table-wrap { overflow-x: auto; }
.san-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; font-size: .95rem; }
.san-table th, .san-table td { padding: 10px 12px; border-bottom: 1px solid #eef0f3; text-align: start; vertical-align: top; }
.san-table tr:last-child th, .san-table tr:last-child td { border-bottom: 0; }
.san-table th { width: 38%; font-weight: 600; color: #1f2937; }
.san-table td { color: #374151; word-break: break-word; }
.san-table td div + div { margin-top: 4px; }
.san-bad { color: #b42318; font-weight: 600; }
.san-ok { color: #067647; }
.san-warn { color: #a15c07; font-weight: 600; }
.san-info { color: #475569; }
.san-warnings { background: #fffaeb; border: 1px solid #fedf89; border-radius: 10px; padding: 12px 14px; color: #7a4a00; }
.san-warnings p { margin: 0; }
.san-warnings p + p { margin-top: 8px; }
.san-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 20px; }
.san-opts label { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; cursor: pointer; }
.san-opts input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 auto; }
.san-opts small { display: block; color: #64748b; }
.san-result { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 14px 16px; }
.san-result p { margin: 0 0 8px; }
.san-done { font-weight: 600; color: #067647; }
.tool-wrapper[data-tool="sanitize-pdf"] .info-note { margin-top: 18px; }

html[data-theme="dark"] .san-table, html[data-theme="dark-contrast"] .san-table { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .san-table th, html[data-theme="dark"] .san-table td,
html[data-theme="dark-contrast"] .san-table th, html[data-theme="dark-contrast"] .san-table td { border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .san-bad, html[data-theme="dark-contrast"] .san-bad { color: #fca5a5; }
html[data-theme="dark"] .san-ok, html[data-theme="dark-contrast"] .san-ok { color: #86efac; }
html[data-theme="dark"] .san-warn, html[data-theme="dark-contrast"] .san-warn { color: #fcd34d; }
html[data-theme="dark"] .san-info, html[data-theme="dark-contrast"] .san-info,
html[data-theme="dark"] .san-busy, html[data-theme="dark-contrast"] .san-busy { color: #cbd5e1; }
html[data-theme="dark"] .san-warnings, html[data-theme="dark-contrast"] .san-warnings { background: #3a2a06; border-color: #854d0e; color: #fde68a; }
html[data-theme="dark"] .san-result, html[data-theme="dark-contrast"] .san-result { background: #052e16; border-color: #166534; color: #dcfce7; }
html[data-theme="dark"] .san-opts small, html[data-theme="dark-contrast"] .san-opts small { color: #94a3b8; }
@media (max-width: 600px) { .san-table th { width: 42%; } .san-table th, .san-table td { padding: 8px; } }
.san-app .action-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 auto; }
.san-app .file-box, .san-app .tool-settings { display: block; margin: 0 auto; }
.san-app .file-row { display: flex; align-items: center; gap: 12px; }
.san-app .file-name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.san-app .file-size { color: #64748b; white-space: nowrap; }
.san-app .remove-file { background: none; border: 0; color: #dc2626; cursor: pointer; font-size: 1rem; padding: 4px; }
.san-app > * { width: 100%; max-width: 960px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
html[data-theme="dark"] .san-done, html[data-theme="dark-contrast"] .san-done { color: #86efac; }
html[data-theme="dark"] .san-result a, html[data-theme="dark-contrast"] .san-result a { color: #93c5fd; }
