/* WolfAssistant 3.3 — Library 2.0 (AlphaWolf Technology). Phone-first, logical properties for RTL, tokens from app.css. */
.lb-top{display:flex;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.lb-top .askform{flex:1;min-width:180px;padding:4px 8px;border-radius:14px}
.lb-top .askform input{border:0;box-shadow:none;background:none;padding:8px 6px;width:100%}
.lb-top .iconbtn,.lb-top .btn.sm{min-height:40px;min-width:40px}
.lb-rail{display:flex;flex-direction:column;gap:2px;position:sticky;top:8px}
.lb-rail button,.fchips button.lb-f{position:relative}
.lb-rail button.drop,.fchips button.drop,.lb-tray .drop{outline:2px dashed var(--blue);outline-offset:-2px;background:var(--frost)!important;color:var(--blue)!important}
.lb-rail .dot{width:9px;height:9px;border-radius:50%;flex:none}
.lb-filters{display:flex;gap:8px;align-items:center;margin:0 0 10px;flex-wrap:wrap}
.lb-types{display:flex;gap:6px;overflow:auto;scrollbar-width:none;padding-bottom:2px;flex:1;min-width:0;touch-action:pan-x}
.lb-types button{flex:none;padding:6px 11px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:.82rem;color:var(--ink2);min-height:34px}
.lb-types button.on{background:var(--grad);color:#fff;border-color:transparent;font-weight:600}
.lb-types button .n{opacity:.75;margin-inline-start:4px;font-size:.74rem}
.lb-filters select.f{width:auto;padding:6px 28px 6px 10px;font-size:.84rem;min-height:34px;margin:0}
.lb-filters .seg button{padding:6px 10px;min-height:28px}
.lb-count{font-size:.78rem;color:var(--muted);margin:0 0 8px}
.lb-count mark,.lb-hl{background:rgba(0,212,255,.28);color:inherit;border-radius:3px;padding:0 1px}
:root[data-theme="dark"] .lb-hl{background:rgba(0,212,255,.22)}
/* the To file tray */
.lb-tray{border:1px solid var(--line);background:var(--warnbg);border-radius:var(--r);padding:12px 14px;margin-bottom:12px}
.lb-tray h3{font-size:.92rem;margin:0 0 2px;display:flex;align-items:center;gap:8px}
.lb-tray p{font-size:.78rem;color:var(--muted);margin:0 0 8px}
.lb-tray .item{background:var(--paper);border-radius:12px;padding:8px 10px;margin-top:6px;display:flex;align-items:center;gap:10px}
.lb-tray .item .tt{font-weight:600;font-size:.86rem;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-tray .item .sg{font-size:.76rem;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}
.lb-tray .item .sg .dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.lb-tray .acts{display:flex;gap:6px;flex:none}
/* cards: colour band by folder, selection, drag ghost */
.doc .fd{position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:var(--fc,transparent)}
.doc .ref{font-size:.68rem;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.02em;margin-top:2px;display:flex;gap:6px;align-items:center}
.doc .ref .lock{color:#B3262C}
.doc.sel{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue) inset}
.doc .ck{position:absolute;inset-inline-end:8px;top:8px;width:22px;height:22px;border-radius:50%;border:2px solid #fff;background:rgba(7,26,58,.35);display:none;place-items:center;color:#fff}
.lb-selecting .doc .ck{display:grid}.doc.sel .ck{background:var(--blue);border-color:var(--blue)}
.doc.dragging{opacity:.35}
.lb-ghost{position:fixed;z-index:400;pointer-events:none;width:150px;padding:8px 10px;border-radius:12px;background:var(--paper);box-shadow:var(--sh2);border:1px solid var(--blue);font-size:.8rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform:translate(-50%,-120%)}
/* list view */
.docs.list{display:flex;flex-direction:column;gap:6px}
.docs.list .doc{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:12px}
.docs.list .doc .th{width:40px;height:48px;aspect-ratio:auto;border-radius:8px;flex:none}
.docs.list .doc .th .ext{width:36px;height:44px;font-size:.58rem}
.docs.list .doc .in{padding:0;flex:1;min-width:0}.docs.list .doc .t{max-height:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.docs.list .doc .pend{position:static}
.docs.list .doc .ck{position:static;flex:none}
/* multi-select bar */
.lb-selbar{position:sticky;bottom:calc(8px + var(--safe-b,0px));z-index:5;display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;background:var(--navy);color:#fff;box-shadow:var(--sh2);margin-top:12px}
.lb-selbar .btn{background:rgba(255,255,255,.14);color:#fff;border:0}
.lb-selbar .btn.danger{background:#B3262C}
/* the document sheet */
.lb-head{display:flex;gap:12px;align-items:flex-start}
.lb-head .ext{width:44px;height:52px;border-radius:9px;color:#fff;display:grid;place-items:center;font:700 .62rem var(--disp);flex:none;background:var(--navy)}
.lb-head .ext.pdf{background:#D9343F}.lb-head .ext.docx{background:#2B5EC8}.lb-head .ext.xlsx{background:#1E8A4C}.lb-head .ext.pptx{background:#D96C1E}.lb-head .ext.img{background:#7B4BD9}.lb-head .ext.txt{background:#5B6B85}
.lb-head h2{font-size:1.02rem;line-height:1.3;margin:0}
.lb-refbox{display:flex;align-items:center;gap:12px;margin-top:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
.lb-refbox img{width:64px;height:64px;border-radius:8px;background:#fff;flex:none}
.lb-refbox .r{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;color:var(--navy);font-size:1rem;letter-spacing:.02em}
:root[data-theme="dark"] .lb-refbox .r{color:var(--electric)}
.lb-refbox .c{font-size:.76rem;color:var(--muted);font-family:ui-monospace,monospace}
.lb-refbox .k{font-size:.7rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.lb-refbox .a{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.lb-meta{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;font-size:.84rem;margin-top:12px}
.lb-meta dt{color:var(--muted)}.lb-meta dd{margin:0;min-width:0;word-break:break-word;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.lb-meta .dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.lb-actions{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;margin-top:12px}
.lb-actions button,.lb-actions a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 6px;border-radius:12px;background:var(--surface2);border:1px solid var(--line);font-size:.76rem;font-weight:600;color:var(--ink);min-height:62px;text-decoration:none;text-align:center}
.lb-actions button:active,.lb-actions a:active{background:var(--frost)}
.lb-actions .i{width:20px;height:20px}
.lb-actions .pri{background:var(--grad);color:#fff;border-color:transparent}
.lb-actions .danger{color:#B3262C}
.lb-tools{margin-top:14px}
.lb-tools h3{font-size:.86rem;margin:0 0 8px;display:flex;align-items:center;gap:6px}
.lb-tools .row{gap:6px;flex-wrap:wrap}
.lb-result{margin-top:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:10px 12px}
.lb-result .tx{white-space:pre-wrap;font-size:.9rem;line-height:1.55;max-height:46vh;overflow:auto;touch-action:pan-y}
.lb-result .acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.lb-result .tl{font-size:.76rem;color:var(--muted);margin-bottom:6px;display:flex;align-items:center;gap:6px}
.lb-result ol{margin:0;padding-inline-start:20px}.lb-result li{margin:3px 0}
.lb-sw{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.lb-sw .s{font-size:.78rem;color:var(--muted)}
.lb-ver{margin-top:12px}.lb-ver .item{padding:8px 10px}
.lb-menu .item{padding:12px 12px;border-radius:12px}
.lb-menu .item .ss{font-size:.76rem;color:var(--muted)}
.lb-menu .item .ic{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--surface2);flex:none}
.lb-pick .item{padding:10px 12px}
.lb-prog{height:4px;border-radius:4px;background:var(--line);overflow:hidden;margin:8px 0}
.lb-prog i{display:block;height:100%;background:var(--grad);transition:width .2s}
.lb-dup{display:flex;gap:10px;align-items:center}
.lb-scanprev{width:100%;max-height:40vh;object-fit:contain;border-radius:12px;background:var(--surface2);margin-top:10px}
@media(max-width:900px){.lb-rail{display:none}.lb-actions{grid-template-columns:repeat(4,1fr)}.lb-actions button,.lb-actions a{font-size:.7rem;padding:8px 4px;min-height:58px}.lb-refbox img{width:56px;height:56px}}
@media(min-width:901px){.lb-filters .lb-types{max-width:60%}}
