/* Rule assets and operations console. Theme tokens are derived by ThemeStudio. */
#flowStudio .hub-library-workspace,#flowStudio .hub-console-workspace{min-width:0;color:var(--ink);margin-bottom:24px;background:transparent;border:0;box-shadow:none;overflow:visible}
.hub-library-heading,.hub-console-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 22px}
.hub-library-title h2,.hub-console-heading h2{font-size:22px;line-height:1.35;margin:0 0 7px;letter-spacing:-.3px}
.hub-library-title p,.hub-console-heading p{margin:0;color:var(--muted);font-size:13px;max-width:65ch;line-height:1.8}
#flowStudio .hub-head-actions{flex-wrap:wrap;gap:8px;justify-content:flex-end;flex-shrink:1}
.hub-library-toolbar,.hub-console-toolbar{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap;margin-bottom:22px;padding:18px 20px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.hub-library-toolbar label,.hub-console-toolbar label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;color:var(--muted);min-width:0}
.hub-library-toolbar label:first-child,.hub-console-toolbar label:first-child{flex:1;max-width:440px;min-width:210px}
.hub-library-toolbar .input,.hub-console-toolbar .input{font-size:13px;min-height:40px;background:var(--surface-alt);color:var(--ink);font-weight:400}
#hubLibrarySort,#hubConsoleFilter{min-width:170px;width:auto}
.hub-order-help{font-size:12px;color:var(--muted);margin:0 0 9px auto;line-height:1.7;max-width:38ch}
#flowStudio .hub-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;max-height:none;overflow:visible;padding:0;scroll-snap-type:none;align-items:stretch}
#flowStudio .hub-rule-card{position:relative;min-width:0;display:flex;flex-direction:column;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 3px 8px var(--shadow);transition:border-color .15s,box-shadow .15s;isolation:isolate}
#flowStudio .hub-rule-card:hover{border-color:var(--muted)}
#flowStudio .hub-rule-card.selected{border-color:var(--blue);box-shadow:inset 0 3px 0 var(--blue),0 3px 8px var(--shadow);background:var(--surface)}
.hub-card-top{display:flex;align-items:center;gap:9px;min-height:30px;margin-bottom:12px}
.hub-rule-number{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:6px;background:var(--surface-alt);color:var(--muted);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.hub-drag-handle{width:30px;min-height:30px;border:0;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--muted);cursor:grab;touch-action:none;font-size:19px;line-height:1}
.hub-drag-handle:hover{background:var(--surface-alt);color:var(--ink)}.hub-drag-handle:active{cursor:grabbing}.hub-drag-handle:disabled{cursor:not-allowed}
.hub-current-badge{font-size:12px;color:var(--blue);background:var(--accent-soft);padding:3px 7px;border-radius:5px;line-height:1.5}
.hub-card-menu{position:relative;margin-left:auto;color:var(--ink);z-index:5}
.hub-card-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;min-width:34px;min-height:32px;padding:3px 7px;border:1px solid transparent;border-radius:6px;color:var(--muted);font-size:14px;cursor:pointer}
.hub-card-menu>summary::-webkit-details-marker{display:none}.hub-card-menu>summary:hover,.hub-card-menu[open]>summary{background:var(--surface-alt);border-color:var(--line);color:var(--ink)}
.hub-card-menu-list{position:absolute;right:0;top:calc(100% + 5px);width:170px;display:flex;flex-direction:column;gap:3px;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:0 10px 24px var(--shadow);z-index:20}
.hub-card-menu-list .btn{justify-content:flex-start;border:0;min-height:36px;white-space:normal;background:transparent;color:var(--ink)}
.hub-card-menu-list .btn:hover{background:var(--surface-alt);box-shadow:none}.hub-card-menu-list [data-hub-action=delete]{color:var(--red);border-top:1px solid var(--line);border-radius:0;margin-top:3px;padding-top:10px}
.hub-rule-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 0 14px;min-width:0}
.hub-rule-title h3{font-size:18px;line-height:1.55;font-weight:650;letter-spacing:-.25px;overflow-wrap:anywhere;min-width:0;margin:0;flex:1;text-wrap:wrap}
#flowStudio .hub-rename-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;font-size:12px;font-weight:600;padding:7px 9px;border:1px solid var(--accent-line);border-radius:7px;background:var(--accent-soft);color:var(--blue);min-height:34px;cursor:pointer;white-space:nowrap}
#flowStudio .hub-rename-button:hover{border-color:var(--blue)}.hub-rename-button .icon{width:14px;height:14px}
.hub-rule-preview{position:relative;display:flex;align-items:center;justify-content:center;height:126px;padding:14px 12px 24px;background:var(--bg);border:1px solid var(--line);border-radius:9px;overflow:hidden;margin:0 0 15px}
.hub-rule-preview:before{content:'';position:absolute;inset:0;background-image:radial-gradient(var(--line) .8px,transparent .8px);background-size:16px 16px;opacity:.45;pointer-events:none}
.hub-mini-flow{width:100%;height:100%;position:relative;overflow:visible;color:var(--blue)}
.hub-mini-edge{stroke:var(--blue);stroke-width:1.7;opacity:.75;fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.hub-mini-node :is(rect,circle){fill:var(--surface);stroke:var(--blue);stroke-width:1.3;vector-effect:non-scaling-stroke}.hub-mini-node.is-end circle{stroke:var(--muted)}.hub-mini-node-dot{fill:var(--blue)!important;stroke:none!important}
.hub-preview-caption{position:absolute;bottom:7px;right:11px;font-size:11px;color:var(--muted);line-height:1.5}
.hub-rule-metadata{display:flex;gap:14px;flex-wrap:wrap;align-items:center;font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 9px}.hub-rule-metadata strong{color:var(--ink);font-variant-numeric:tabular-nums}
.hub-rule-schedule{font-size:12px;color:var(--muted);line-height:1.75;min-height:21px;margin:0 0 8px;overflow-wrap:anywhere;display:flex;align-items:flex-start;gap:6px}.hub-rule-schedule .icon{width:14px;height:18px}
.hub-rule-card .hub-draft-state{font-size:12px;line-height:1.7;margin-bottom:14px;min-height:21px}
.hub-rule-actions{display:flex;align-items:center;gap:12px;justify-content:space-between;padding-top:14px;border-top:1px solid var(--line);margin-top:auto}
.hub-rule-actions>[data-hub-action=open]{font-size:13px;min-height:36px;border-color:var(--accent-line);background:var(--accent-soft);color:var(--blue);padding:8px 12px;font-weight:600}
.hub-enable-control{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);flex-shrink:0}
#flowStudio .hub-rule-switch{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;flex-shrink:0;width:43px;min-width:43px;height:25px;min-height:25px;border:1px solid var(--muted);border-radius:16px;background:var(--surface-alt);color:transparent;padding:3px;font-size:0;transition:background .15s}
#flowStudio .hub-rule-switch:before{content:'';display:block;width:17px;height:17px;border-radius:50%;background:var(--muted);transition:transform .15s;box-shadow:0 1px 3px var(--shadow)}
#flowStudio .hub-rule-switch[aria-checked=true]{background:var(--accent);border-color:var(--accent)}#flowStudio .hub-rule-switch[aria-checked=true]:before{background:var(--accent-text);transform:translateX(17px)}
.hub-rule-switch>*{display:none}.hub-rule-switch:disabled{opacity:.45}
.hub-order-buttons{display:flex;align-items:center;gap:5px;justify-content:flex-end;padding-top:12px;font-size:12px;color:var(--muted)}.hub-order-buttons .btn{min-height:28px;border-color:transparent;background:transparent;font-size:12px;padding:4px 7px;color:var(--muted)}.hub-order-buttons .btn:hover:not(:disabled){background:var(--surface-alt);border-color:var(--line)}
.hub-rule-card.is-dragging{opacity:.5}#flowStudio .hub-rule-card.is-drop-before:before,#flowStudio .hub-rule-card.is-drop-after:after{content:'';position:absolute;top:0;bottom:0;width:4px;border-radius:5px;background:var(--blue);z-index:10}#flowStudio .hub-rule-card.is-drop-before:before{left:-12px}#flowStudio .hub-rule-card.is-drop-after:after{right:-12px}
#flowStudio .hub-current-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:13px 17px;background:var(--surface);margin:0 0 16px}
.hub-current-summary{display:flex;align-items:center;gap:12px;min-width:0;flex:1;flex-wrap:wrap}.hub-current-summary>strong,.hub-current-name{font-size:15px;font-weight:650;color:var(--ink);overflow-wrap:anywhere}.hub-current-summary small{color:var(--muted);font-size:12px}.hub-current-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.hub-current-bar .hub-persistence{width:100%;margin:0}.hub-current-bar .hub-draft-state{margin:0}
.hub-library-workspace>.hub-persistence,.hub-console-workspace>.hub-persistence{margin:0 0 18px}
.hub-console-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:0 0 20px}
.hub-console-stat{padding:19px 22px;min-width:0;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;text-align:left;color:var(--ink);display:flex;flex-direction:column;gap:8px;line-height:1.5}
.hub-console-stat:last-child{border-right:0}.hub-console-stat strong{font-size:28px;font-weight:650;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.hub-console-stat span,.hub-console-stat small{font-size:12px;color:var(--muted)}.hub-console-stat[data-hub-count=enabled] strong,.hub-console-stat[data-hub-count=running] strong{color:var(--green)}.hub-console-stat[data-hub-count=outside] strong,.hub-console-stat[data-hub-count=draft] strong{color:var(--amber)}
.hub-console-toolbar{margin-bottom:16px}.hub-console-toolbar [data-hub-debug-count]{font-size:13px;color:var(--blue);margin-left:auto;padding-bottom:10px}
[data-hub-console-list]{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.hub-console-row{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(180px,1.1fr) minmax(145px,1fr) auto;gap:20px;padding:22px;align-items:center;border-bottom:1px solid var(--line)}.hub-console-row:last-child{border-bottom:0}.hub-console-row:hover{background:var(--surface-alt)}
.hub-console-rule{min-width:0}.hub-console-rule strong{font-size:15px;font-weight:650;color:var(--ink);display:block;line-height:1.65;overflow-wrap:anywhere}.hub-console-rule>.hub-rule-number{float:left;margin:3px 10px 0 0}.hub-console-schedule{display:block;margin-top:5px;font-size:12px;color:var(--muted);line-height:1.7;overflow-wrap:anywhere}
.hub-console-state{display:flex;flex-wrap:wrap;gap:7px;align-items:center;min-width:0}.hub-console-state small{display:block;flex-basis:100%;font-size:12px;color:var(--muted);line-height:1.7}.hub-console-state .tag{white-space:normal;line-height:1.6;font-size:12px}
.hub-console-enabled{font-size:12px;color:var(--muted);white-space:nowrap}.hub-console-last{min-width:0;font-variant-numeric:tabular-nums}.hub-console-last strong{display:block;font-size:12px;font-weight:500;color:var(--ink);line-height:1.75}.hub-console-last small{display:block;color:var(--muted);font-size:12px;line-height:1.75;margin-top:5px;overflow-wrap:anywhere}
.hub-console-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.hub-console-actions .btn{font-size:12px;min-height:34px;padding:6px 9px}.hub-console-quick{margin-top:18px;padding:18px 20px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.hub-console-quick p{font-size:13px;color:var(--muted);line-height:1.8}.hub-console-quick h3{font-size:15px;margin:0 0 10px}.hub-console-quick .hub-overview-row:last-child{padding-bottom:0}
#flowStudio .hub-library-workspace .empty-state,#flowStudio .hub-console-workspace .empty-state{grid-column:1/-1;padding:50px 24px;text-align:center;border:1px dashed var(--line);border-radius:12px;background:var(--surface);font-size:14px;line-height:1.8}
@media(min-width:1800px){#flowStudio .hub-rule-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1300px){#flowStudio .hub-rule-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hub-console-row{grid-template-columns:minmax(180px,1.2fr) minmax(160px,1fr) minmax(130px,.8fr);gap:16px}.hub-console-actions{grid-column:1/-1;justify-content:flex-start;padding-top:2px}.hub-console-stat{padding:17px}.hub-order-help{flex-basis:100%;max-width:none;margin:0}}
@media(max-width:900px){.hub-library-heading,.hub-console-heading{flex-wrap:wrap}.hub-console-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.hub-console-stat:nth-child(3){border-right:0}.hub-console-stat:nth-child(-n+3){border-bottom:1px solid var(--line)}.hub-console-row{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}.hub-console-last{grid-column:1}.hub-console-actions{grid-column:2;justify-content:flex-end}.hub-current-summary{flex-basis:100%}.hub-current-actions{width:100%;justify-content:flex-end}}
@media(max-width:620px){#flowStudio .hub-rule-grid{grid-template-columns:minmax(0,1fr);gap:16px}#flowStudio .hub-rule-card{padding:16px;border-radius:12px}.hub-library-heading,.hub-console-heading{gap:16px;margin-bottom:18px}.hub-library-title h2,.hub-console-heading h2{font-size:20px}.hub-library-heading .hub-head-actions{width:100%;justify-content:flex-start}.hub-library-heading .hub-head-actions .btn{flex:1}.hub-library-toolbar,.hub-console-toolbar{padding:14px;gap:12px;border-radius:10px;margin-bottom:16px}.hub-library-toolbar label,.hub-console-toolbar label{width:100%;flex-basis:100%;max-width:none!important;min-width:0!important}#hubLibrarySort,#hubConsoleFilter{width:100%;min-width:0}.hub-library-toolbar .input,.hub-console-toolbar .input{font-size:16px;min-height:44px}.hub-order-help{font-size:12px}.hub-rule-title h3{font-size:18px}.hub-rule-title{gap:8px}.hub-rule-preview{height:138px}.hub-drag-handle,.hub-card-menu>summary{min-height:40px;min-width:36px}.hub-card-menu-list .btn{min-height:44px}#flowStudio .hub-rename-button{min-height:40px}.hub-rule-actions>[data-hub-action=open]{min-height:44px}.hub-order-buttons .btn{min-height:36px}.hub-enable-control{gap:6px}#flowStudio .hub-rule-switch{height:30px;min-height:30px;width:48px;min-width:48px;padding:4px}#flowStudio .hub-rule-switch:before{width:20px;height:20px}#flowStudio .hub-rule-switch[aria-checked=true]:before{transform:translateX(18px)}.hub-rule-switch:after{content:'';position:absolute;inset:-7px 0}#flowStudio .hub-current-bar{padding:13px;gap:12px}.hub-current-summary{gap:8px}.hub-current-actions .btn{flex:1}.hub-current-summary>.tag{font-size:12px}.hub-console-stat{padding:14px 11px}.hub-console-stat strong{font-size:25px}.hub-console-stats{margin-bottom:16px}.hub-console-toolbar [data-hub-debug-count]{margin-left:0;padding:0}.hub-console-row{padding:17px 14px;grid-template-columns:minmax(0,1fr);gap:13px}.hub-console-rule strong{font-size:15px}.hub-console-last,.hub-console-actions{grid-column:1}.hub-console-actions{justify-content:flex-start;padding-top:12px;border-top:1px solid var(--line);gap:10px}.hub-console-actions .btn{min-height:44px;flex:1}.hub-console-quick{padding:16px 14px}#flowStudio .hub-rule-card.is-drop-before:before,#flowStudio .hub-rule-card.is-drop-after:after{left:0;right:0;width:auto;height:4px;bottom:auto}#flowStudio .hub-rule-card.is-drop-before:before{top:-10px}#flowStudio .hub-rule-card.is-drop-after:after{top:auto;bottom:-10px}}
@media(prefers-reduced-motion:reduce){.hub-rule-card,.hub-rule-switch,.hub-rule-switch:before{transition:none!important}}

/* Match final markup without inheriting the old strip layout. */
.hub-library-heading h2.hub-library-title{font-size:22px;line-height:1.4;margin:0 0 7px;letter-spacing:-.3px}.hub-library-heading .hub-subtitle{margin:0;font-size:13px;line-height:1.8}
#flowStudio .hub-rule-card.is-current{border-color:var(--blue);box-shadow:inset 0 3px 0 var(--blue),0 3px 8px var(--shadow)}
.hub-rule-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.hub-rule-title-row h3.hub-rule-title{display:block;flex:1;min-width:0;font-size:18px;line-height:1.55;margin:0;min-height:34px;letter-spacing:-.25px;font-weight:650;overflow-wrap:anywhere;text-wrap:wrap}.hub-rule-card>[data-hub-status]{align-self:flex-start;white-space:normal;line-height:1.6;margin-bottom:14px}
.hub-drag-handle .icon{width:16px;height:16px}.hub-order-button{border:1px solid var(--line);border-radius:5px;min-height:28px;padding:4px 10px;background:transparent;color:var(--muted);font-size:12px}.hub-order-button:hover:not(:disabled){color:var(--ink);background:var(--surface-alt)}.hub-preview-empty{font-size:12px;color:var(--muted);z-index:1}
.hub-current-summary .hub-current-label{font-size:12px;color:var(--muted)}
.hub-console-stat [data-hub-count=enabled],.hub-console-stat [data-hub-count=running]{color:var(--green)}.hub-console-stat [data-hub-count=outside],.hub-console-stat [data-hub-count=draft]{color:var(--amber)}.hub-console-stat:hover,.hub-console-stat.is-selected{background:var(--accent-soft)}.hub-console-stat.is-selected{box-shadow:inset 0 -3px 0 var(--blue)}
.hub-console-note{font-size:12px;line-height:1.8;color:var(--muted);margin:-8px 0 20px}.hub-console-note strong{color:var(--blue)}.hub-console-last>span{font-size:12px;color:var(--muted)}
.hub-console-quick>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}.hub-text-button{font-size:12px;color:var(--blue);border:0;background:transparent;padding:6px 0;min-height:32px}.hub-console-quick-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.hub-console-quick-row:last-child{border-bottom:0;padding-bottom:0}.hub-console-quick-row strong{font-size:13px;font-weight:550;overflow-wrap:anywhere}.hub-console-quick-row .tag{white-space:normal;flex-shrink:0;max-width:50%}
.hub-library-empty{grid-column:1/-1;padding:42px 22px;text-align:center;background:var(--surface);border:1px dashed var(--line);border-radius:12px}.hub-library-empty strong{font-size:16px;display:block;color:var(--ink)}.hub-library-empty p{font-size:13px;color:var(--muted);line-height:1.8;margin:10px 0 0}
@media(max-width:620px){.hub-library-heading h2.hub-library-title{font-size:20px}.hub-order-button{min-height:36px}.hub-rule-title-row{gap:8px}.hub-console-quick>div:first-child{flex-wrap:wrap;gap:4px}.hub-text-button{min-height:44px}.hub-console-note{margin-top:0}}

#flowStudio .hub-rule-card[data-hub-drop-axis=y].is-drop-before:before,#flowStudio .hub-rule-card[data-hub-drop-axis=y].is-drop-after:after{left:0;right:0;width:auto;height:4px;bottom:auto}#flowStudio .hub-rule-card[data-hub-drop-axis=y].is-drop-before:before{top:-12px}#flowStudio .hub-rule-card[data-hub-drop-axis=y].is-drop-after:after{top:auto;bottom:-12px}#flowStudio .hub-rule-card[data-hub-drop-axis=x].is-drop-before:before,#flowStudio .hub-rule-card[data-hub-drop-axis=x].is-drop-after:after{top:0;bottom:0;width:4px;height:auto;right:auto}#flowStudio .hub-rule-card[data-hub-drop-axis=x].is-drop-before:before{left:-12px}#flowStudio .hub-rule-card[data-hub-drop-axis=x].is-drop-after:after{left:auto;right:-12px}
