/* כלי PDF — בסגנון "🧰 כלי PDF" של לבלר (web/signing/pdf_tools.css: .pdft-ops, .pdft-order, .pdft-status) */
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tools [role="tab"] { background: #eef0f7; border: 0; border-radius: 20px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--navy); cursor: pointer; }
.tools [role="tab"]:hover { background: #dfe4fb; }
.tools [role="tab"][aria-selected="true"] { background: var(--navy); color: #fff; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
/* (.drop של לבלר — מסגרת זהב מקווקוות, רקע שמנת) */
.drop { display: block; max-width: 100%; overflow-wrap: anywhere; border: 2px dashed var(--gold); border-radius: 12px; background: #fffdf8; padding: 30px; text-align: center; cursor: pointer; color: var(--navy); font-size: 17px; font-weight: 600; }
.drop:hover, .drop.over { background: #fbf3e2; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0; }
.row label { display: inline-flex; align-items: center; gap: 6px; }
.row input[type=text], .row input[type=number], .row select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 13.5px; }
.row input[type=number] { width: 90px; }
#mergeName { min-width: 220px; }
#splitRanges { min-width: 200px; text-align: left; }
fieldset.row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
fieldset.row legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.finfo { margin: 8px 0; font-weight: 600; }
.finfo:empty { display: none; }
.msg { min-height: 20px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }

.flist { list-style: none; margin: 12px 0; padding: 0; }
/* (.pdft-order li) */
.flist li { display: flex; align-items: center; gap: 8px; background: #fcfcfe; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; margin-bottom: 4px; font-size: 13px; cursor: grab; }
.flist li.dragging, .thumbs li.dragging { opacity: .55; background: #fbf3e2; }
.flist li.drop-before, .thumbs li.drop-before { box-shadow: inset -4px 0 0 var(--gold); }
.flist li .n { color: var(--navy); min-width: 22px; text-align: center; font-weight: 700; }
.flist li .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.flist li .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ib { background: #eef0f7; border: 0; border-radius: 9px; min-width: 32px; height: 32px; padding: 3px 9px; cursor: pointer; color: var(--navy); font-size: 13px; }
.ib:hover { background: #dfe4fb; }
.ib:disabled { opacity: .35; cursor: default; }

.thumbs { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.thumbs li { background: #fcfcfe; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; cursor: grab; position: relative; }
.thumbs .pv { height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumbs .pv > * { max-width: 100%; max-height: 140px; transition: transform .15s ease; box-shadow: 0 1px 4px rgba(0,0,0,.18); background: #fff; }
.thumbs .ph { width: 92px; height: 124px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 22px; font-weight: 700; border: 1px solid var(--line); }
.thumbs .cap { font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
.thumbs .acts { display: flex; justify-content: center; gap: 4px; }
.thumbs li.deleted { background: #fdf0ee; border-color: #efc3bd; }
.thumbs li.deleted .pv { opacity: .3; }
.thumbs li.deleted .cap { color: var(--err); font-weight: 700; }

.outs { list-style: none; padding: 0; margin: 8px 0; }
.outs li { margin: 4px 0; }

@media (max-width: 860px) {
  .tools [role="tab"] { padding: 7px 12px; font-size: 14px; }
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .thumbs .pv { height: 120px; }
  .thumbs .pv > * { max-height: 112px; }
  #mergeName { min-width: 0; width: 100%; }
}
