.file-tools-page *, .file-tools-page *::before, .file-tools-page *::after { box-sizing: border-box; }
#file-tool { min-width: 0; max-width: 100%; color: #354a65; }
#file-tool [hidden] { display: none !important; }
.file-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; }
.file-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 13px 0; }
.file-field:has(textarea), .file-field.is-wide { grid-column: 1 / -1; }
.file-field label { margin: 0; font-weight: 600; color: #17335d; }
#file-tool input, #file-tool select, #file-tool textarea { min-width: 0; max-width: 100%; border: 1px solid #b8c7dc; border-radius: 6px; padding: 10px 12px; background: #fff; color: #253c59; font: inherit; }
#file-tool textarea { width: 100%; resize: vertical; line-height: 1.6; }
#file-tool input[type="file"] { width: 100%; overflow: hidden; }
#file-tool input[type="checkbox"] { width: 20px; height: 20px; margin: 0 9px 0 0; vertical-align: middle; }
#file-tool input:focus-visible, #file-tool select:focus-visible, #file-tool textarea:focus-visible, #file-tool [tabindex]:focus-visible, .file-button:focus-visible { outline: 3px solid #9bbcea; outline-offset: 3px; }
.file-drop { padding: 22px 16px; border: 2px dashed #b8c7dc; background: #f3f7fc; border-radius: 9px; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.file-drop:hover, .file-drop.is-dragover { border-color: #0052cc; background: #eaf2ff; }
.file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 14px 0; }
#file-tool .file-button { display: inline-block; min-height: 44px; max-width: 100%; padding: 10px 16px; border: 1px solid #2354a2; border-radius: 6px; background: #2055a6; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
#file-tool .file-button.is-secondary { background: #fff; color: #17335d; border-color: #b8c7dc; }
#file-tool .file-button:disabled, #file-tool input:disabled, #file-tool select:disabled, #file-tool textarea:disabled { opacity: .6; cursor: not-allowed; }
.file-help { margin: 5px 0 12px; font-size: 13px; color: #526176; line-height: 1.8; overflow-wrap: anywhere; }
.file-warning { padding: 12px 14px; border: 1px solid #e8d28f; border-radius: 8px; color: #854d0e; background: #fffbeb; line-height: 1.8; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
#file-tool .tool-message { white-space: pre-line; overflow-wrap: anywhere; }
.file-result { padding-top: 18px; margin-top: 20px; border-top: 1px solid #dbe4f0; min-width: 0; }
#file-tool h3 { color: #17335d; font-size: 19px; line-height: 1.6; margin: 16px 0; }
.file-data { margin: 0 0 18px; }
.file-data-row { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 14px; padding: 10px 12px; border-bottom: 1px solid #dbe4f0; }
.file-data-row:nth-child(odd) { background: #f3f7fc; }
.file-data-row dt, .file-data-row dd { margin: 0; min-width: 0; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.file-records { max-height: 650px; overflow: auto; padding: 2px; }
.file-record { padding: 12px; border: 1px solid #dbe4f0; border-radius: 8px; margin: 12px 0; background: #fff; min-width: 0; }
.file-record h4 { margin: 0 0 10px; overflow-wrap: anywhere; line-height: 1.6; }
.file-record.is-error { border-color: #d97777; }
.file-preview { max-height: 400px; font-family: ui-monospace,Consolas,monospace !important; }
.file-directory-group { margin-top: 24px; }
.file-directory-group > h3 { font-size: 20px; color: #17335d; }
#content.work-listing [data-file-tool-card="226"] { grid-column: 1; }
#content.work-listing [data-file-tool-card] h3 { min-height: 2.84em; }
@media (max-width: 767px) {
 .file-tools-page .tool-shell { padding: 16px; }
 .file-controls { grid-template-columns: minmax(0,1fr); }
 .file-data-row { grid-template-columns: minmax(0,1fr); gap: 3px; }
 .file-actions .file-button { flex: 1 1 100px; }
 .file-record { padding: 9px; }
}
