/* BorDoc — Tabulky (data tables). Reuses rs-* + tokens. */

/* VAT-exemption: compact badge + click popover */
.dk-exwrap{position:relative;display:inline-flex}
.dk-exbadge{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:500;color:var(--success);background:var(--success-tint);border:1px solid transparent;border-radius:var(--radius-full);padding:3px 10px;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;font-family:var(--font-sans);white-space:nowrap}
.dk-exbadge *{pointer-events:none;user-select:none}
.dk-exbadge:hover{border-color:var(--success)}
.dk-exbadge .lic{width:12px;height:12px}
.dk-expop-scrim{position:fixed;inset:0;z-index:40}
.dk-expop{position:absolute;top:calc(100% + 6px);right:0;z-index:41;width:300px;max-width:78vw;white-space:normal;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);padding:11px 13px;display:flex;flex-direction:column;gap:5px}
.dk-expop-h{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--fg3)}
.dk-expop-h .lic{width:14px;height:14px;color:var(--success)}
.dk-expop-txt{font-size:13px;line-height:1.5;color:var(--fg1)}
.dk-expop-fixed{position:fixed;top:0;left:0;right:auto}

.tb-shell{height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--bg-app)}
.tb-main{flex:1;display:flex;flex-direction:column;min-height:0}
.tb-head{padding:22px 32px 0;flex:none}
.tb-head h1{font-size:24px;font-weight:500;color:var(--fg1);letter-spacing:-0.01em;margin:0 0 6px}
.tb-sub{font-size:13px;color:var(--fg3);display:inline-flex;align-items:center;gap:7px}
.tb-sub .lic{width:14px;height:14px}

/* table tabs */
.tb-tabs{display:flex;gap:2px}
.tb-tab{height:34px;padding:0 14px;border:none;background:none;font-size:13.5px;font-weight:500;color:var(--fg2);cursor:pointer;font-family:var(--font-sans);border-radius:var(--radius-sm);display:inline-flex;align-items:center;gap:7px}
.tb-tab:hover{color:var(--fg1);background:var(--bg-hover)}
.tb-tab.active{color:var(--accent-text);background:var(--accent-tint)}
.tb-tab .lic{width:15px;height:15px}

/* compact single-row control bar */
.tb-bar{display:flex;align-items:center;gap:12px;padding:12px 32px;flex:none}
.tb-sep{width:1px;height:20px;background:var(--border);flex:none;align-self:center}
.tb-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-left:6px;border-radius:var(--radius-full);background:var(--accent);color:var(--fg-on-accent);font-size:11px;font-weight:500;font-family:var(--font-sans)}
.btn.is-on{background:var(--accent-tint);border-color:var(--accent);color:var(--accent-text);box-shadow:inset 0 0 0 1px var(--accent)}
/* item6: shrink the secondary toolbar buttons (Exportovat/Filtry/Sloupce) to ~tab size;
   scoped to .btn-secondary so the primary "Uložit změny" button keeps full size */
.tb-bar .btn.btn-secondary{height:34px;padding:0 12px;font-size:13.5px;gap:6px}
.tb-bar .btn.btn-secondary svg{width:15px;height:15px}

/* custom-table tabs + selection count */
.tb-tabwrap{position:relative;display:inline-flex}
.tb-tab-more{display:inline-flex;align-items:center;margin-left:4px;opacity:.7}
.tb-tab-more:hover{opacity:1}
.tb-tab-new{color:var(--accent-text)}
.tb-tabmenu{position:absolute;top:calc(100% + 4px);left:0;z-index:40;width:170px;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);padding:5px}
.tb-tabmenu button{display:flex;align-items:center;gap:9px;width:100%;border:none;background:none;padding:8px 10px;border-radius:var(--radius-sm);font-size:13px;color:var(--fg2);cursor:pointer;font-family:var(--font-sans);text-align:left}
.tb-tabmenu button:hover{background:var(--bg-hover);color:var(--fg1)}
.tb-tabmenu .lic{width:15px;height:15px;color:var(--fg3)}
.tb-selcount{font-size:13px;font-weight:500;color:var(--accent-text);padding:0 6px}

/* row checkbox column */
.tb-cbcol{width:40px;text-align:center;background:var(--bg-subtle)}
.tb td.tb-cbcol{background:var(--bg-surface)}
.tb tr:hover td.tb-cbcol{background:var(--bg-hover)}
.tb tr.sel td{background:var(--bg-selected)}
.tb tr.sel td.tb-cbcol{background:var(--bg-selected)}
.tb-rowcb{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border:1.5px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-surface);color:#fff;cursor:pointer;vertical-align:middle}
.tb-rowcb.on{background:var(--accent);border-color:var(--accent)}
.tb-rowcb .lic{width:12px;height:12px}

/* creation / export dialogs */
.tb-dialog{max-width:520px;max-height:86vh;display:flex;flex-direction:column;padding:0}
.tb-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 14px;border-bottom:1px solid var(--border)}
.tb-dialog-head h2{margin:0;font-size:18px;font-weight:500;color:var(--fg1)}
.tb-dialog-x{width:32px;height:32px;border:none;background:none;border-radius:var(--radius-sm);color:var(--fg3);cursor:pointer;display:flex;align-items:center;justify-content:center}
.tb-dialog-x:hover{background:var(--bg-hover);color:var(--fg1)}
.tb-dialog-body{padding:16px 22px;overflow-y:auto}
.tb-dialog-label{display:block;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--fg3);margin-bottom:8px}
.tb-dialog-input{width:100%;height:40px;padding:0 12px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--bg-surface);color:var(--fg1);font-family:var(--font-sans);font-size:14.5px;outline:none}
.tb-dialog-input:focus{border-color:var(--accent);box-shadow:var(--ring-focus)}
.tb-dialog-cols{display:grid;grid-template-columns:1fr 1fr;gap:1px 14px;max-height:230px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--radius-md);padding:6px}
.tb-dialog-cols.sm{max-height:170px}
.tb-dialog-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid var(--border)}
.tb-seg{display:flex;gap:8px}
.tb-seg button{flex:1;height:38px;border:1px solid var(--border-strong);background:var(--bg-surface);border-radius:var(--radius-md);font-size:13.5px;font-weight:500;color:var(--fg2);cursor:pointer;font-family:var(--font-sans)}
.tb-seg button.on{background:var(--accent-tint);border-color:var(--accent);color:var(--accent-text)}
.tb-fmt{display:flex;flex-direction:column;gap:2px}
.tb-fmt-opt{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:var(--radius-sm);font-size:14px;color:var(--fg1);cursor:pointer}
.tb-fmt-opt:hover{background:var(--bg-hover)}
.tb-radio{width:17px;height:17px;border:1.5px solid var(--border-strong);border-radius:var(--radius-full);display:inline-flex;align-items:center;justify-content:center}
.tb-fmt-opt.on .tb-radio{border-color:var(--accent)}
.tb-radio .dot{width:9px;height:9px;border-radius:var(--radius-full);background:var(--accent)}
.tb-attach{display:flex;align-items:center;gap:10px;margin-top:18px;font-size:14px;color:var(--fg1);cursor:pointer}
.tb-fmt-opt .lic{width:16px;height:16px;color:var(--fg3);flex:none}
.tb-zip-hint{color:var(--accent-text);font-size:12.5px;font-weight:500}

/* edit-mode toggle */
.tb-editmode{display:inline-flex;align-items:center;gap:9px;height:36px;padding:0 14px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--bg-surface);color:var(--fg2);font-size:13.5px;font-weight:500;font-family:var(--font-sans);cursor:pointer;transition:all var(--dur) var(--ease)}
.tb-editmode:hover{border-color:var(--accent)}
.tb-editmode.on{color:var(--accent-text);border-color:var(--accent);background:var(--accent-tint)}
.tb-sw{position:relative;width:34px;height:20px;border-radius:var(--radius-full);background:var(--gray-300);flex:none;transition:background var(--dur) var(--ease)}
.tb-editmode.on .tb-sw{background:var(--accent)}
.tb-sw-knob{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background:#fff;box-shadow:var(--shadow-sm);transition:transform var(--dur) var(--ease)}
.tb-editmode.on .tb-sw-knob{transform:translateX(14px)}
.cell.editable{cursor:text}
.cell.editable:hover{background:var(--bg-hover)}
.tb-fp2 .val.editable{cursor:text}

/* variant switch + toolbar row */
.tb-toolbar{display:flex;align-items:center;gap:14px;padding:14px 32px;flex:none}
.tb-vswitch{display:inline-flex;gap:4px;background:var(--bg-subtle);border:1px solid var(--border);border-radius:var(--radius-md);padding:4px}
.tb-vswitch button{height:30px;padding:0 13px;border:none;background:none;border-radius:var(--radius-sm);font-size:12.5px;font-weight:500;color:var(--fg2);cursor:pointer;font-family:var(--font-sans)}
.tb-vswitch button.active{background:var(--bg-surface);color:var(--fg1);box-shadow:var(--shadow-xs)}
.tb-tool-spacer{flex:1}
.tb-editnote{font-size:12px;color:var(--fg3);display:inline-flex;align-items:center;gap:6px}
.tb-editnote .lic{width:13px;height:13px;color:var(--accent-text)}

/* table region */
.tb-region{flex:1;min-height:0;margin:0 32px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg-surface);overflow:hidden;display:flex;position:relative}
.tb-scroll{flex:1;overflow:auto}

table.tb{border-collapse:separate;border-spacing:0;font-size:13px;width:100%;table-layout:fixed}
table.tb.full{min-width:100%}
.tb th{position:sticky;top:0;z-index:3;background:var(--bg-subtle);text-align:left;font-weight:500;color:var(--fg2);font-size:11.5px;text-transform:uppercase;letter-spacing:.03em;padding:11px 26px 11px 16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid var(--border-strong);cursor:grab}
.tb th.dragging{opacity:.5}
.tb th.dragover{box-shadow:inset 2px 0 0 var(--accent)}
.tb th .th-label{display:inline;cursor:pointer}
.tb th .th-label:hover{color:var(--fg1)}
.tb td{padding:0;border-bottom:1px solid var(--border);color:var(--fg1);vertical-align:middle;overflow:hidden}
.tb tr:last-child td{border-bottom:none}
.tb td .cell{display:block;padding:10px 14px;min-height:20px;border:1px solid transparent;border-radius:var(--radius-sm);margin:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default;text-align:left}
.tb td .cell.editable{cursor:text}
.tb td .cell.editable:hover{background:var(--bg-hover)}
.tb td .cell:focus{outline:none;border-color:var(--accent);background:var(--bg-surface);box-shadow:var(--ring-focus)}
.tb td.num .cell{font-family:var(--font-mono);text-align:left}
.tb td.muted,.tb td.muted .cell{color:var(--fg3)}
.tb tr:hover td{background:var(--bg-hover)}
.tb tr.active td{background:var(--bg-selected)}
.tb .act-cell{text-align:left;padding-right:8px}

/* header sort arrow + ⋯ menu + resize handle */
.tb th .lic{vertical-align:middle}
.tb th .th-more{position:absolute;top:50%;right:9px;transform:translateY(-50%);width:20px;height:20px;border:1px solid var(--border);background:var(--bg-surface);border-radius:var(--radius-sm);color:var(--fg2);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;z-index:4;transition:opacity var(--dur) var(--ease)}
.tb th:hover .th-more{opacity:1}
.tb th .th-more:hover{background:var(--bg-hover);color:var(--fg1);border-color:var(--accent)}
.tb th .th-more:hover{background:var(--bg-hover);color:var(--fg1)}
.tb th .th-menu,.th-menu{position:fixed;z-index:200;width:200px;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);padding:5px;text-transform:none;letter-spacing:normal}
.th-menu-scrim{position:fixed;inset:0;z-index:199}
.tb th .th-menu button,.th-menu button{display:flex;align-items:center;gap:9px;width:100%;border:none;background:none;padding:8px 10px;border-radius:var(--radius-sm);font-size:13px;font-weight:400;color:var(--fg2);cursor:pointer;font-family:var(--font-sans);text-align:left}
.tb th .th-menu button:hover,.th-menu button:hover{background:var(--bg-hover);color:var(--fg1)}
.tb th .th-menu .lic,.th-menu .lic{width:15px;height:15px;color:var(--fg3)}
.tb th .resize-h{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;z-index:2}
.tb th .resize-h:hover{background:var(--accent);opacity:.4}
.tb th.boundary,.tb td.frozen.boundary{border-right:1px solid var(--border)}
.tb-freeze-line{display:none}

/* frozen (pinned) columns */
.tb td.frozen{position:sticky;background:var(--bg-surface);z-index:3}
.tb tr:hover td.frozen{background:var(--bg-hover)}
.tb tr.active td.frozen{background:var(--bg-selected)}
.tb th.frozen{z-index:5}

/* subtle freeze line (boundary position) */
.tb-freeze-line{position:absolute;top:0;bottom:0;width:1px;background:var(--border-strong);z-index:6;pointer-events:none}

/* divider item inside Sloupce panel */
.tb-colopt.tb-divopt{color:var(--accent-text);background:var(--accent-tint);margin:3px 0;font-weight:500}
.tb-colopt.tb-divopt:hover{background:var(--accent-tint)}
.tb-colopt.tb-divopt .lic{color:var(--accent-text)}

/* link cells */
.tb-link{display:inline-flex;align-items:center;gap:4px;color:var(--accent-text);text-decoration:none}
.tb-link:hover{text-decoration:underline}
.tb-link .lic{width:12px;height:12px;flex:none}

/* folder location marker + popover */
.tb-folder{position:relative;display:inline-flex;margin-left:7px;vertical-align:middle}
.tb-folder-btn{width:20px;height:20px;border:none;background:none;border-radius:var(--radius-sm);color:var(--fg3);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.tb-folder-btn:hover{background:var(--bg-hover);color:var(--accent-text)}
.tb-folder-pop{position:fixed;z-index:60;display:flex;flex-direction:column;gap:7px;min-width:240px;padding:11px 13px;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);white-space:nowrap}
.tb-folder-pop-h{font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--fg3)}
.tb-folder-path{display:flex;align-items:center;flex-wrap:wrap;gap:2px;font-size:13px;color:var(--fg1)}
.tb-folder-path .seg{display:inline-flex;align-items:center;gap:2px}
.tb-folder-path .seg:first-child .lic{display:none}
.tb-folder-path .seg .lic{width:11px;height:11px;color:var(--fg3)}

/* sticky summary footer (three sums) */
.tb-summary{flex:none;display:flex;align-items:center;gap:16px;padding:11px 24px;border-top:1px solid var(--border);background:transparent;font-size:13px;color:var(--fg2)}
.tb-summary b{color:var(--fg2);font-weight:500}
.tb-sum-count{flex:none;color:var(--fg2);font-weight:400}
.tb-sum-totals{margin-left:auto;display:flex;align-items:center;gap:22px}
.tb-sum-item{display:inline-flex;align-items:baseline;gap:8px}
.tb-sum-item .lab{font-size:12px;color:var(--fg3)}
.tb-sum-item .amt{font-family:var(--font-mono);color:var(--fg1)}
.tb-sum-item.strong .lab{color:var(--fg2)}
.tb-sum-item.strong .amt{font-weight:500;font-size:14px}
/* coloured footer totals mirror column colour */
.tb-sum-item[style]{padding:4px 12px;border-radius:var(--radius-sm)}
.tb-sum-item[style] .lab,.tb-sum-item[style] .amt{color:inherit}

/* column colour palette in ⋯ menu */
.th-menu-sep{height:1px;background:var(--border);margin:5px 4px}
.th-palette{padding:6px 6px 4px}
.th-pal-label{font-size:10.5px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--fg3);padding:4px 4px 5px}
.th-pal-row{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;margin-bottom:4px}
.th-swatch{height:26px;border:1px solid;border-radius:var(--radius-sm);font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;font-family:var(--font-sans);padding:0}
.th-swatch:hover{filter:brightness(.96)}
.th-swatch.sel{outline:2px solid var(--accent);outline-offset:1px}
.th-swatch .lic{width:13px;height:13px}
.th-pal-clear{display:flex;align-items:center;gap:7px;width:100%;margin-top:4px;border:none;background:none;padding:7px 8px;border-radius:var(--radius-sm);font-size:12.5px;color:var(--fg2);cursor:pointer;font-family:var(--font-sans);text-align:left}
.th-pal-clear:hover{background:var(--bg-hover);color:var(--fg1)}
.th-pal-clear .lic{width:13px;height:13px;color:var(--fg3)}

/* empty state when filters match no rows */
.tb-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:48px 24px;color:var(--fg3);font-size:14px}
.tb-empty .lic{width:20px;height:20px}

/* type pill */
.tb-type{display:inline-block;font-size:11.5px;font-weight:500;padding:2px 9px;border-radius:var(--radius-full);background:var(--bg-subtle);border:1px solid var(--border);color:var(--fg2)}

/* row open button (compact variant) */
.tb-open{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:none;border-radius:var(--radius-sm);color:var(--fg3);cursor:pointer}
.tb-open:hover{background:var(--bg-hover);color:var(--accent-text)}

/* ---- Variant A: detail drawer ---- */
.tb-drawer-scrim{position:absolute;inset:0;background:rgba(21,24,28,.32);z-index:10;animation:rs-fade var(--dur) var(--ease)}
.tb-drawer{position:absolute;top:0;right:0;bottom:0;width:420px;max-width:90%;background:var(--bg-surface);border-left:1px solid var(--border);box-shadow:var(--shadow-lg);z-index:11;display:flex;flex-direction:column;animation:tb-slide var(--dur-slow) var(--ease)}
@keyframes tb-slide{from{transform:translateX(24px);opacity:.4}to{transform:none;opacity:1}}
.tb-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px 14px;border-bottom:1px solid var(--border);flex:none}
.tb-drawer-head h2{font-size:16px;font-weight:500;color:var(--fg1);margin:0 0 3px}
.tb-drawer-head .sub{font-size:12.5px;color:var(--fg3);font-family:var(--font-mono)}
.tb-drawer-x{width:32px;height:32px;flex:none;border:none;background:none;border-radius:var(--radius-sm);color:var(--fg3);cursor:pointer;display:flex;align-items:center;justify-content:center}
.tb-drawer-x:hover{background:var(--bg-hover);color:var(--fg1)}
.tb-drawer-body{flex:1;overflow-y:auto;padding:6px 20px 20px}
.tb-grp{font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.05em;color:var(--fg3);margin:18px 0 8px;padding-top:14px;border-top:1px solid var(--border)}
.tb-grp:first-child{border-top:none;padding-top:6px;margin-top:6px}
.tb-fp2{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.tb-fp2 label{font-size:11.5px;color:var(--fg3)}
.tb-fp2 .val{font-size:14px;color:var(--fg1);padding:8px 11px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-surface);transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease)}
.tb-fp2 .val:focus{outline:none;border-color:var(--accent);box-shadow:var(--ring-focus)}
.tb-fp2 .val.mono{font-family:var(--font-mono)}
.tb-drawer-foot{flex:none;padding:14px 20px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:10px}

/* ---- Variant B: column toggle ---- */
.tb-colwrap{position:relative}
.tb-colmenu{position:absolute;right:0;top:42px;z-index:30;width:260px;max-height:380px;overflow-y:auto;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);padding:6px}
.tb-colmenu .hd{font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.05em;color:var(--fg3);padding:8px 10px 6px}
.tb-colopt{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:var(--radius-sm);font-size:13px;color:var(--fg2);cursor:grab}
.tb-colopt:hover{background:var(--bg-hover);color:var(--fg1)}
.tb-colopt.locked{opacity:.55;cursor:not-allowed}
.tb-colopt.dragging{opacity:.5}
.tb-colopt.dragover{background:var(--accent-tint);box-shadow:inset 0 2px 0 var(--accent)}
.tb-colgrip{display:inline-flex;color:var(--fg3);flex:none}
.tb-colgrip .lic{width:14px;height:14px}
.tb-cb{width:17px;height:17px;flex:none;border:1.5px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-surface);display:inline-flex;align-items:center;justify-content:center;color:#fff}
.tb-cb.on{background:var(--accent);border-color:var(--accent)}
.tb-cb .lic{width:12px;height:12px}

/* payment-status chip */
.tb-pay{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:500;padding:2px 9px;border-radius:var(--radius-full)}
.tb-pay .lic{width:12px;height:12px}
.tb-pay.ok{background:var(--success-tint);color:var(--success)}
.tb-pay.warn{background:var(--attention-tint);color:var(--attention-text)}
.tb-pay.err{background:var(--danger-tint);color:var(--danger)}

/* table-level muted note */
.tb-note{font-size:12px;color:var(--fg3);display:inline-flex;align-items:center;gap:7px}
.tb-note .lic{width:13px;height:13px}
.tb-hint{font-size:12px;color:var(--fg3);display:inline-flex;align-items:center;gap:6px;padding:0 32px 10px}
.tb-hint .lic{width:13px;height:13px}

/* draggable header (both variants) */
.tb th.drag{cursor:grab;user-select:none}
.tb th.drag .grip{display:inline-flex;vertical-align:middle;margin-right:5px;color:var(--fg3);opacity:0;transition:opacity var(--dur) var(--ease)}
.tb th.drag:hover .grip{opacity:1}
.tb th.dragging{opacity:.5}
.tb th.dragover{background:var(--accent-tint);box-shadow:inset 2px 0 0 var(--accent)}
.tb th.drag .grip .lic{width:13px;height:13px}

/* ---- Filtry panel ---- */
.tb-filterpanel{margin:0 32px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-surface);box-shadow:var(--shadow-sm);overflow:hidden;flex:none}
.tb-fp-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--bg-subtle)}
.tb-fp-head h3{margin:0;font-size:13px;font-weight:500;color:var(--fg1)}
.tb-fp-head .lic{width:16px;height:16px;color:var(--fg2)}
.tb-fp-body{padding:14px 16px}
.tb-fp-chips{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:14px}
.tb-fp-chip{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--accent-text);background:var(--accent-tint);border:1px solid var(--accent);border-radius:var(--radius-full);padding:4px 8px 4px 12px}
.tb-fp-chip button{width:18px;height:18px;border:none;background:none;border-radius:var(--radius-full);color:var(--accent-text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.tb-fp-chip button:hover{background:rgba(0,0,0,.08)}
.tb-fp-chip button .lic{width:13px;height:13px}
.tb-fp-clear{font-size:12.5px;color:var(--fg2);background:none;border:none;cursor:pointer;text-decoration:underline;font-family:var(--font-sans)}
.tb-fp-clear:hover{color:var(--fg1)}
.tb-fp-builder{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tb-fp-builder select,.tb-fp-builder input{height:36px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-surface);color:var(--fg1);font-family:var(--font-sans);font-size:13px;outline:none}
.tb-fp-builder select:focus,.tb-fp-builder input:focus{border-color:var(--accent);box-shadow:var(--ring-focus)}
.tb-fp-add{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px;border:1px dashed var(--border-strong);border-radius:var(--radius-md);background:none;color:var(--accent-text);font-size:13px;font-weight:500;cursor:pointer;font-family:var(--font-sans)}
.tb-fp-add:hover{border-color:var(--accent);background:var(--accent-tint)}
.tb-fp-add .lic{width:15px;height:15px}
.tb-fp-multi{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tb-fp-mopt{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--fg2);background:var(--bg-subtle);border:1px solid var(--border);border-radius:var(--radius-sm);padding:5px 9px;cursor:pointer}
.tb-fp-mopt:hover{border-color:var(--accent)}
.tb-fp-mopt.on{background:var(--accent-tint);border-color:var(--accent);color:var(--accent-text)}
.tb-fp-range{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--fg2)}
.tb-fp-range input{height:36px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-surface);color:var(--fg1);font-family:var(--font-sans);font-size:13px;outline:none}
.tb-fp-range input:focus{border-color:var(--accent);box-shadow:var(--ring-focus)}
.tb-colhint{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--fg3);padding:9px 10px 4px;margin-top:4px;border-top:1px solid var(--border)}
.tb-colhint .lic{width:12px;height:12px;flex:none}
.tb-fp-note{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--fg3);margin-top:10px}
.tb-fp-note .lic{width:12px;height:12px;flex:none}
.tb-fp-chip b{font-weight:500}
