/* Styles for the files_docs tools (sign pad, form fields, data grids, zip lists, reports). Uses the site's colour tokens. */
.fd-muted { color: var(--text-2); }
.fd-sig { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin: 4px 0 16px; }
.fd-sig-lab { margin: 0 0 6px; font-weight: 600; font-size: .95rem; }
.fd-sig-hint { margin: 6px 0; font-size: .86rem; color: var(--text-2); }
.fd-pad { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 2px dashed var(--border-strong); border-radius: var(--r-sm); touch-action: none; cursor: crosshair; }
.fd-pad:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fd-sig-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-sigprev { min-height: 110px; display: flex; align-items: center; justify-content: center; padding: 10px; background: repeating-conic-gradient(#e8ebf2 0 25%, #fff 0 50%) 0 0/16px 16px; border: 1px solid var(--border); border-radius: var(--r-sm); color: #333; }
.fd-sigprev img { max-width: 100%; max-height: 140px; }
@media (max-width: 720px) { .fd-sig { grid-template-columns: 1fr; } }
.out[data-out="preview"] canvas.fd-click { cursor: crosshair; }
.fd-note { margin: 6px 0 0; font-size: .86rem; color: var(--text-2); }

/* PDF form fields */
.fd-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.fd-ff { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fd-ff > label, .fd-ff legend { font-weight: 600; font-size: .94rem; overflow-wrap: anywhere; }
.fd-ff .fd-fname { font-size: .8rem; color: var(--text-2); font-family: var(--mono); overflow-wrap: anywhere; }
.fd-ff fieldset { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; margin: 0; min-width: 0; }
.fd-ff .fd-opt { display: flex; gap: 8px; align-items: center; min-height: 28px; }
.fd-ff input[type=checkbox], .fd-ff input[type=radio] { width: 20px; height: 20px; flex: none; }
.fd-ff.fd-wide { grid-column: 1 / -1; }
.out[data-out="form"] .out-html { max-height: none; overflow: visible; padding: 2px; }

/* grid (csv / xlsx viewer) */
.fd-gridbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; justify-content: space-between; margin: 0 0 10px; }
.fd-qwrap { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; max-width: 420px; }
.fd-qwrap label, .fd-sheetsel label { font-weight: 600; font-size: .9rem; }
.fd-ginfo { margin: 0; font-size: .9rem; color: var(--text-2); }
.fd-tbl { max-height: 560px; }
.fd-tbl table { font-size: .9rem; }
.fd-tbl th, .fd-tbl td { white-space: pre-wrap; max-width: 360px; overflow-wrap: anywhere; }
.fd-tbl thead th { position: sticky; top: 0; z-index: 1; padding: 0; }
.fd-tbl thead th.fd-rn { padding: .5em .6em; }
.fd-tbl th.fd-rn { color: var(--text-2); font-weight: 500; text-align: right; width: 1%; white-space: nowrap; }
.fd-sort { all: unset; box-sizing: border-box; display: block; width: 100%; min-height: 32px; padding: .5em .75em; font-weight: 650; cursor: pointer; }
.fd-sort:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.fd-sort:hover { background: var(--primary-soft); }
.fd-sind { color: var(--text-2); font-size: .8em; }
.fd-pager { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; margin-top: 10px; }
.fd-pinfo { font-size: .9rem; color: var(--text-2); }
.out[data-out="grid"] .out-html, .out[data-out="list"] .out-html, .out[data-out="preview"] .out-html, .out[data-out="report"] .out-html { max-height: none; overflow: visible; }
.fd-sheetsel { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; max-width: 360px; }

/* lists & reports */
.fd-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 650; white-space: nowrap; border: 1px solid currentColor; }
.fd-ok { color: var(--ok); background: var(--ok-bg); }
.fd-bad { color: var(--danger); background: var(--danger-bg); }
.fd-warn { color: var(--warn); background: var(--warn-bg); }
.fd-info { color: var(--text-2); background: var(--surface-2); }
.fd-warnlist { margin: 0; padding-left: 20px; }
.fd-warnlist li { margin: 4px 0; }
.fd-zipbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 0 0 10px; }
.fd-zipbar .fd-qwrap { max-width: 360px; }
.fd-tbl td .btn { white-space: nowrap; }
.fd-tbl td.fd-num, .fd-tbl th.fd-num { text-align: right; white-space: nowrap; }
.fd-path { font-family: var(--mono); font-size: .86rem; overflow-wrap: anywhere; }
.fd-hexsig { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.fd-verdict { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid currentColor; font-weight: 600; }
.fd-verdict p { margin: 0; }
.fd-hash { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; word-break: break-all; }
.fd-new { font-family: var(--mono); font-size: .88rem; overflow-wrap: anywhere; }
.fd-preview-table { overflow: auto; }
.fd-preview-table table { min-width: 280px; }
.fd-preview-table caption { caption-side: top; text-align: left; font-weight: 650; padding: 6px 0; }
.fd-imgprev { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; }
.out[data-out="dump"] textarea { white-space: pre; overflow-wrap: normal; overflow-x: auto; font-size: .82rem; }
