/* TASK760 — V category reorder mode: scoped to the existing category dialog */
#verb-category-editor .verb-order-switch-760{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;margin:0 10px 8px;border-radius:12px;background:rgba(27,74,142,.32);border:1px solid rgba(121,166,229,.2);color:#e6efff;cursor:pointer;font-size:12px;font-weight:700}
#verb-category-editor .verb-order-switch-label-760{display:inline-flex;align-items:center;gap:7px}
#verb-category-editor .verb-order-switch-760 input{position:absolute;opacity:0;width:1px;height:1px}
#verb-category-editor .verb-order-track-760{position:relative;display:inline-block;flex:none;width:42px;height:23px;border-radius:999px;background:#405675;border:1px solid #647d9e;transition:background .2s}
#verb-category-editor .verb-order-track-760:after{content:"";position:absolute;top:2px;left:2px;width:17px;height:17px;background:#fff;border-radius:50%;transition:transform .2s}
#verb-category-editor .verb-order-switch-760 input:checked+.verb-order-track-760{background:#2489fa;border-color:#71beff}
#verb-category-editor .verb-order-switch-760 input:checked+.verb-order-track-760:after{transform:translateX(19px)}
#verb-category-editor .verb-order-switch-760 input:focus-visible+.verb-order-track-760{outline:2px solid #fff;outline-offset:3px}
#verb-category-editor .verb-order-help-760{font-size:11px;line-height:1.4;color:#b6d3ff;padding:0 13px;margin:0 7px 8px}
#verb-category-editor .verb-order-help-760[hidden]{display:none!important}
#verb-category-editor.verb-order-enabled-760 .catmgr-row[draggable=true]{cursor:grab;border-radius:8px}
#verb-category-editor.verb-order-enabled-760 .catmgr-row[draggable=true] .catmgr-name{cursor:grab}
#verb-category-editor .catmgr-row.verb-order-dragging-760{opacity:.45}
#verb-category-editor .catmgr-row.verb-order-target-760{outline:2px dashed #6db5ff;outline-offset:-2px;background:rgba(45,134,244,.16)}

/* TASK761: precise insertion location, no bulky target highlight. */
#verb-category-editor .catmgr-row[data-order-id]{position:relative}
#verb-category-editor .catmgr-row.verb-order-target-before-761::before,
#verb-category-editor .catmgr-row.verb-order-target-after-761::after{
 content:"";position:absolute;left:9px;right:9px;height:2px;z-index:3;
 border-radius:999px;pointer-events:none;
 background:linear-gradient(90deg,#9bdbff,#398aff);
 box-shadow:0 0 0 1px rgba(255,255,255,.08),0 0 12px rgba(68,163,255,.5);
}
#verb-category-editor .catmgr-row.verb-order-target-before-761::before{top:-2px}
#verb-category-editor .catmgr-row.verb-order-target-after-761::after{bottom:-2px}
#verb-category-editor .catmgr-row.verb-order-target-before-761,
#verb-category-editor .catmgr-row.verb-order-target-after-761{outline:none;background:rgba(65,133,224,.08)}

/* TASK762 — compact, aligned header toggle before "+ Thêm". */
#verb-category-editor .object-category-manager-browser-head{display:flex;align-items:center;gap:8px}
#verb-category-editor .object-category-manager-browser-head>div:first-child{min-width:0;flex:1}
#verb-category-editor .object-category-manager-browser-head .verb-order-switch-760{flex:0 0 auto;display:inline-flex;justify-content:center;gap:7px;margin:0;padding:6px 8px;min-height:30px;border-radius:9px;white-space:nowrap;font-size:11px;background:rgba(48,95,159,.24);border:1px solid rgba(133,176,229,.24)}
#verb-category-editor .object-category-manager-browser-head .verb-order-switch-label-760{gap:4px}
#verb-category-editor .object-category-manager-browser-head .verb-order-switch-label-760 svg{width:13px;height:13px}
#verb-category-editor .object-category-manager-browser-head .verb-order-track-760{width:31px;height:17px}
#verb-category-editor .object-category-manager-browser-head .verb-order-track-760:after{width:11px;height:11px;top:2px;left:2px}
#verb-category-editor .object-category-manager-browser-head input:checked+.verb-order-track-760:after{transform:translateX(14px)}
#verb-category-editor .object-category-manager-browser-head [data-create]{flex:0 0 auto;white-space:nowrap}
@media(max-width:550px){#verb-category-editor .object-category-manager-browser-head{flex-wrap:wrap}#verb-category-editor .object-category-manager-browser-head>div:first-child{flex-basis:100%}}

/* TASK763 — adjacent toolbar actions share one intrinsic height. */
#verb-category-editor .object-category-manager-browser-head{
  align-items:stretch;
}
#verb-category-editor .object-category-manager-browser-head .verb-order-switch-760,
#verb-category-editor .object-category-manager-browser-head [data-create]{
  box-sizing:border-box;
  height:auto;
  min-height:32px;
  align-self:stretch;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1.2;
}

/* TASK764 — equal toolbar control geometry; '+ Thêm' is the radius reference. */
#verb-category-editor .object-category-manager-browser-head .verb-order-switch-760{
  border-radius:var(--verb-category-toolbar-radius-764, 10px);
}
#verb-category-editor .object-category-manager-browser-head [data-create]{
  border-radius:var(--verb-category-toolbar-radius-764, 10px);
}


/* TASK799 — The descendant total is right-aligned on each category row,
   vertically centered and intentionally has the same 9px visual typography
   as the existing prefix/level subtitle (no pill, no new background). */
#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] {
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
}
#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > .catmgr-name {
  flex:1 1 auto!important;
  min-width:0!important;
}
#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > .verb-category-descendants-799 {
  display:block!important;
  flex:0 0 auto!important;
  align-self:center!important;
  margin-left:auto!important;
  margin-right:2px;
  padding:0!important;
  min-width:0;
  text-align:right;
  white-space:nowrap;
  font-family:inherit!important;
  font-size:9px!important;
  font-weight:400!important;
  line-height:1.4!important;
  letter-spacing:normal!important;
  color:rgba(215,231,250,.68)!important;
  -webkit-text-fill-color:rgba(215,231,250,.68)!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
}


/* TASK801 — larger open/close arrows ONLY in the Hành động category editor.
 * Canonical category CSS is copied and injected at runtime. Use the row+button
 * specificity to win those late !important rules without touching other trees.
 * Keep the existing 30 × 30px click target, row height and indent unchanged. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-toggle.has-children-801 {
  box-sizing:border-box!important;
  display:inline-flex!important;
  flex:0 0 30px!important;
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  color:rgba(232,245,255,.98)!important;
  -webkit-text-fill-color:rgba(232,245,255,.98)!important;
  font-family:inherit!important;
  font-size:20px!important;
  font-weight:650!important;
  line-height:1!important;
  text-align:center!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-toggle.has-children-801:hover {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-toggle.has-children-801:focus-visible {
  outline:2px solid rgba(127,196,255,.9)!important;
  outline-offset:1px!important;
}
/* Leaf bullets retain the original typography; only parent arrows enlarge. */


/* TASK802 — generous single-click category hit area.
   Preserve tree indentation, arrow size, colors and drag/drop affordances.
   Only the Hành động category-editor list is affected. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] {
  box-sizing:border-box!important;
  min-height:44px!important;
  height:auto!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
  align-items:center!important;
  cursor:pointer!important;
  touch-action:manipulation;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-name {
  align-self:stretch!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  min-height:30px!important;
  padding-top:2px!important;
  padding-bottom:2px!important;
  cursor:pointer!important;
  touch-action:manipulation;
}
/* The visual emphasis follows the whole row, even over its count text. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id]:not(.sel):hover {
  background:rgba(76,149,232,.095)!important;
}
#verb-category-editor#verb-category-editor.verb-order-enabled-760 .catmgr-tree .catmgr-row[data-order-id][draggable="true"] {
  cursor:grab!important;
}
#verb-category-editor#verb-category-editor.verb-order-enabled-760 .catmgr-tree .catmgr-row[data-order-id][draggable="true"]:active {
  cursor:grabbing!important;
}

/* TASK807: conceal scrollbar without disabling wheel, touch or keyboard scrolling. */
#verb-category-editor .catmgr-tree.object-category-manager-list{scrollbar-width:none!important;-ms-overflow-style:none!important;}
#verb-category-editor .catmgr-tree.object-category-manager-list::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}

/* TASK830 — center category titles vertically and group code/level before descendant count. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-name{
 display:flex!important;flex:1 1 auto!important;flex-direction:row!important;
 justify-content:flex-start!important;align-items:center!important;
 min-width:0!important;text-align:left!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-name > strong{
 display:block!important;font-size:12px!important;line-height:1.35!important;
 min-width:0!important;overflow:hidden!important;
 text-overflow:ellipsis!important;white-space:nowrap!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > .verb-category-meta-830{
 display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;
 color:rgba(215,231,250,.72)!important;-webkit-text-fill-color:rgba(215,231,250,.72)!important;
 font-family:inherit!important;font-size:9px!important;font-weight:400!important;line-height:1.4!important;white-space:nowrap!important;
 margin-left:auto!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > .verb-category-descendants-799{
 margin-left:5px!important;margin-right:2px!important;
}

/* TASK831: category names emphasize only level 1; one cohesive metadata string. */
/* TASK871: legacy per-node font overrides removed; weight is set solely by depth. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > .verb-category-meta-830{margin-left:auto!important;white-space:nowrap!important}

/* TASK833: long taxonomy names wrap naturally instead of truncating with ellipsis. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-name{
 height:auto!important;min-height:30px!important;align-self:stretch!important;
 white-space:normal!important;overflow:visible!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-name > .verb-category-name-831{
 display:block!important;white-space:normal!important;text-overflow:clip!important;
 overflow:visible!important;overflow-wrap:anywhere!important;word-break:normal!important;
 line-height:1.4!important;max-width:100%!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id]{
 height:auto!important;min-height:44px!important;align-items:center!important;
}

/* TASK869: obsolete expanded/selected bold override removed; V868 depth-only JS controls weights. */

/* TASK855: one shared grid for every semantic token. No per-row flex auto-packing. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > .verb-category-meta-830{
 display:grid!important;
 grid-template-columns: var(--vcm-prefix-width,18px) 10px max-content var(--vcm-level-number-width,9px) 10px max-content var(--vcm-total-number-width,9px) max-content!important;
 column-gap:1px!important;row-gap:0!important;align-items:baseline!important;
 width:max-content!important;min-width:0!important;flex:0 0 auto!important;
 margin-left:auto!important;justify-content:end!important;text-align:right!important;
 white-space:nowrap!important;font-family:inherit!important;font-size:9px!important;
 font-weight:400!important;line-height:1.45!important;font-variant-numeric:tabular-nums!important;
 color:rgba(215,231,250,.74)!important;-webkit-text-fill-color:rgba(215,231,250,.74)!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 > .vcm-level-842,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 > .vcm-total-842{
 display:contents!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-prefix-842,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-separator-842,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-label-843,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-number-843,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-unit-843{
 display:block!important;min-width:0!important;width:auto!important;margin:0!important;
 padding:0!important;flex:none!important;font-weight:400!important;
 color:inherit!important;-webkit-text-fill-color:inherit!important;white-space:nowrap!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-prefix-842,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-number-843{
 text-align:right!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-separator-842{
 text-align:center!important;font-size:0!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-separator-842::before{
 content:"·";font-size:9px!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-label-843,
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-unit-843{
 text-align:left!important;
}

/* TASK859: natural whitespace between number and trailing unit without moving aligned columns. */
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830 .vcm-unit-843{
 padding-left:3px!important;
}

/* TASK860: slightly more breathing room on both sides of each middle dot. */
#verb-category-editor#verb-category-editor .catmgr-tree .verb-category-meta-830{
 column-gap:2px!important;
}

/* TASK861: vertically center the leading expand/collapse caret with each full row. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-toggle{
 align-self:center!important;
 vertical-align:middle!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-toggle.has-children-801{
 align-self:center!important;
}

/* TASK862: equal-width browser/detail panes inside Hành động category editor. */
@media (min-width:761px){
 #verb-category-editor .ic-body.object-category-manager-body{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 }
 #verb-category-editor .object-category-manager-browser,
 #verb-category-editor .object-category-manager-editor{
  min-width:0!important;width:auto!important;max-width:none!important;
 }
}

/* TASK863: keep the detail pane's level badge on one line at 50/50 split. */
#verb-category-editor .object-category-manager-editor .object-category-manager-level{
 white-space:nowrap!important;
 word-break:keep-all!important;
 overflow-wrap:normal!important;
 flex-shrink:0!important;
 width:max-content!important;
 min-width:max-content!important;
 text-align:center!important;
}

/* TASK864: content-first wrapping in category editor. Preserve compact codes/badges. */
#verb-category-editor .object-category-manager-editor .catmgr-field button[data-parent-trigger]{
 display:block!important;width:100%!important;max-width:100%!important;
 height:auto!important;min-height:44px!important;
 padding-top:12px!important;padding-bottom:12px!important;
 white-space:normal!important;text-overflow:clip!important;
 overflow-wrap:anywhere!important;word-break:normal!important;
 overflow:visible!important;text-align:left!important;line-height:1.5!important;
}
#verb-category-editor .object-category-manager-editor .catmgr-field,
#verb-category-editor .object-category-manager-editor .catmgr-form,
#verb-category-editor .object-category-manager-editor .catmgr-formwrap{
 min-width:0!important;
}
#verb-category-editor .object-category-manager-editor .catmgr-field small,
#verb-category-editor .object-category-manager-editor .ic-validation{
 white-space:normal!important;overflow-wrap:anywhere!important;text-overflow:clip!important;
}


/* TASK870: canonical depth-based typography. No open/selected/children state impacts text weight. */
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-order-id] > button.catmgr-name > span.verb-category-name-831{
 font-synthesis:none!important;
 font-weight:430!important;font-size:12px!important;line-height:1.35!important;
 color:#d5e5f7!important;-webkit-text-fill-color:#d5e5f7!important;
 white-space:normal!important;overflow-wrap:anywhere!important;text-overflow:clip!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-depth="1"] > button.catmgr-name > span.verb-category-name-831{
 font-weight:800!important;font-size:15px!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-depth="2"] > button.catmgr-name > span.verb-category-name-831{
 font-weight:670!important;font-size:14px!important;
}
#verb-category-editor#verb-category-editor .catmgr-tree .catmgr-row[data-depth="3"] > button.catmgr-name > span.verb-category-name-831{
 font-weight:680!important;font-size:13px!important;
}

/* TASK874: optically center × glyph in category modal close button. */
#verb-category-editor .object-category-manager-header > button.ic-close.object-category-manager-close{
 display:flex!important;align-items:center!important;justify-content:center!important;
 padding:0!important;line-height:1!important;text-align:center!important;
 font-family:Arial,sans-serif!important;
}
