.rows-editor{ display:flex; flex-direction:column; gap:8px; }
.contact-count-row{ margin-bottom:12px; }
#contactAvatarRows{ gap:12px; }
.prop-field-label{ font-size:var(--text-sm); color:var(--ui-muted); display:block; margin-bottom:4px; }
.contact-avatar-row > .contact-avatar-field{ flex:1; min-width:0; }
.row-edit{ display:flex; align-items:center; gap:6px; }
.row-edit input{
  font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text);
  border:1px solid var(--ui-border); border-radius:8px; padding:12px 9px; outline:none; box-sizing:border-box;
}
.row-edit input:focus{ border-color:var(--ui-accent); }
.row-edit select{
  font-family:var(--font-sans); font-size:var(--text-md); color:var(--ui-text);
  border:1px solid var(--ui-border); border-radius:8px; padding:12px 8px; outline:none; background:var(--md-color-grey-white); box-sizing:border-box;
}
.row-edit select:focus{ border-color:var(--ui-accent); }
.bar-row-label{ flex:1; min-width:0; }
.agenda-row-edit > .prop-field{ flex:1; min-width:0; }
.ml-legend-swatch{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
button.ml-legend-swatch{ position:relative; padding:0; border:1px solid rgba(20,30,50,0.15); cursor:pointer; }
button.ml-legend-swatch::before{ content:""; position:absolute; inset:-6px; }
.ml-color-picker{ position:relative; display:inline-flex; }
.ml-color-picker-menu{
  display:none; position:absolute; top:calc(100% + 4px); left:0; z-index:60; gap:4px; padding:12px;
  flex-wrap:wrap; width:200px;
  background:var(--md-color-grey-white); border:1px solid var(--ui-border); border-radius:8px; box-shadow:var(--shadow-soft);
}
.ml-color-picker.open .ml-color-picker-menu{ display:flex; }
.prop-field:has(> span > .ml-color-picker.open) > span:first-child,
.prop-field:has(> span > .color-dot-select.open) > span:first-child{ z-index:500; }
.ml-color-picker-option{
  position:relative; width:20px; height:20px; border-radius:50%; border:1px solid rgba(20,30,50,0.15); padding:0; cursor:pointer;
}
.ml-color-picker-option.active{ box-shadow:0 0 0 2px var(--ui-accent); }
.ml-color-picker-option-taken{ opacity:0.55; cursor:not-allowed; }
.ml-color-picker-option-taken i{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:var(--text-sm);
}
.ml-color-picker-option-remove{
  position:absolute; top:-5px; right:-5px; width:14px; height:14px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:var(--text-2xs); line-height:1;
  background:var(--ui-text); color:var(--md-color-grey-white); border:1px solid var(--md-color-grey-white); cursor:pointer;
}
.ml-color-picker-option-remove:hover{ background:var(--ui-accent); }
.ml-color-picker-add{
  display:flex; align-items:center; justify-content:center; background:var(--md-color-grey-white); border-style:dashed;
  color:var(--ui-muted); font-size:var(--text-xs);
}
.ml-color-picker-add:hover{ border-color:var(--ui-accent); color:var(--ui-accent); }
.ml-color-picker-add-view{ display:flex; flex-direction:column; gap:16px; width:100%; }
.cp-sv{ position:relative; width:100%; height:88px; border-radius:6px; overflow:hidden; cursor:crosshair; }
.cp-sv-white{ position:absolute; inset:0; background:linear-gradient(to right, var(--md-color-grey-white), rgba(255,255,255,0)); }
.cp-sv-black{ position:absolute; inset:0; background:linear-gradient(to top, var(--md-color-grey-black), rgba(0,0,0,0)); }
.cp-sv-thumb{
  position:absolute; width:12px; height:12px; border-radius:50%; border:2px solid var(--md-color-grey-white); box-shadow:0 0 0 1px rgba(var(--shadow-rgb),0.4);
  transform:translate(-50%,-50%); pointer-events:none;
}
.cp-hue{
  position:relative; width:100%; height:10px; border-radius:5px; cursor:pointer;
  background:linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.cp-hue-thumb{
  position:absolute; top:50%; width:14px; height:14px; border-radius:50%; border:2px solid var(--md-color-grey-white); box-shadow:0 0 0 1px rgba(var(--shadow-rgb),0.4);
  transform:translate(-50%,-50%); pointer-events:none;
}
.cp-hex-row{
  display:flex; align-items:center; gap:6px; padding:0 8px;
}
.cp-hex-row span{ font-family:var(--font-sans); font-size:var(--text-md); color:var(--ui-muted); }
.ml-color-picker-custom-hex{
  flex:1; min-width:0; width:100%; font-family:var(--font-sans); font-size:var(--text-md); color:var(--ui-text); text-transform:uppercase;
  border:none; padding:7px 0; outline:none; background:none;
}
.cp-hex-row:focus-within{ border-color:var(--ui-accent); }
.ml-color-picker-add-view .ml-color-picker-custom-confirm{ align-self:stretch; }
.bar-row-add{
  align-self:flex-start; font-family:var(--font-sans); font-size:var(--text-md); color:var(--md-neutral-foreground-3-rest);
  background:none; border:none; border-radius:8px; padding:6px 10px; cursor:pointer;
}
.bar-row-add:hover{ background:var(--md-neutral-background-2-rest); }
.bar-row-add i{ margin-right:6px; }
.bar-row-add.panel-replace-btn{
  align-self:stretch; width:100%; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--ui-border); padding:8px 10px; color:var(--ui-text);
}
.image-card-panel-thumb-wrap.cover-photo-panel-thumb{ height:auto; aspect-ratio:16 / 9; }
.image-card-panel-thumb-wrap.header-logo-panel-thumb{ height:72px; background:#fff; }
.header-logo-panel-thumb .image-card-panel-thumb{ padding:12px 16px; box-sizing:border-box; }
.header-logo-modal-preview{
  width:100%; height:140px; box-sizing:border-box; padding:20px 24px; border-radius:var(--md-radius-160,16px);
  border:1px solid var(--ui-border); background:#fff;
  display:flex; align-items:center; justify-content:center;
}
.header-logo-modal-preview img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }
.legend-header-field{ position:relative; display:flex; align-items:center; width:100%; }
.legend-header-field > input{ flex:1; min-width:0; }
.legend-header-trigger{
  position:absolute; right:6px; top:50%; transform:translateY(-50%); width:20px; height:20px;
  border:none; background:none; color:var(--ui-muted); cursor:pointer; border-radius:5px;
  display:flex; align-items:center; justify-content:center; font-size:var(--text-xs);
}
.legend-header-trigger:hover{ background:var(--md-neutral-background-2-rest); color:var(--ui-accent); }
.legend-header-menu{
  display:none; flex-direction:column; position:absolute; z-index:30; top:calc(100% + 4px); left:0; right:0;
  max-height:220px; overflow-y:auto; background:var(--md-color-grey-white); border:1px solid var(--ui-border); border-radius:10px;
  box-shadow:var(--shadow-soft); padding:6px; gap:2px;
}
.legend-header-field.open .legend-header-menu{ display:flex; }
.legend-header-option{
  display:flex; align-items:center; justify-content:space-between; width:100%; padding:7px 8px; border:none;
  background:none; border-radius:6px; cursor:pointer; font-family:var(--font-sans); font-size:var(--text-base);
  color:var(--ui-text); text-align:left;
}
.legend-header-option:hover{ background:var(--md-neutral-background-2-rest); }
.legend-header-option.is-disabled{ color:var(--ui-muted); cursor:not-allowed; opacity:0.6; }
.legend-header-option.is-disabled:hover{ background:none; }
.legend-header-option .icon-select-option-check{ width:auto; margin-left:8px; color:var(--ui-accent); }
.legend-header-empty{ padding:7px 8px; font-size:var(--text-md); color:var(--ui-muted); }
.legend-field-row{ display:flex; align-items:center; gap:6px; }
.legend-field-row > .prop-field{ flex:1; min-width:0; }
.legend-add-row{ position:relative; display:inline-flex; margin-top:2px; }
.legend-add-row.open .legend-add-menu{ display:flex; }
.prop-field:has(> .legend-header-field > input){ position:relative; display:block; }
.prop-field:has(> .legend-header-field > input) > span:first-child{
  position:absolute; left:9px; top:50%; transform:translateY(-50%); font-size:var(--text-base); line-height:1;
  background:var(--md-color-grey-white); padding:0 3px; margin-left:-3px;
  transition:top .15s ease, font-size .15s ease, color .15s ease;
  pointer-events:none; z-index:1;
}
.prop-field:has(> .legend-header-field > input) > .legend-header-field{ width:100%; }
.prop-field:has(> .legend-header-field > input) > .legend-header-field > input{ box-sizing:border-box; padding:12px 26px 12px 9px; }
.prop-field:has(> .legend-header-field > input:focus) > span:first-child,
.prop-field:has(> .legend-header-field > input:not(:placeholder-shown)) > span:first-child{
  top:0; font-size:var(--text-xs); transform:translateY(-50%);
}
.prop-field:has(> .legend-header-field > input:focus) > span:first-child{ color:var(--ui-accent); }
.prop-field:has(> .icon-select){ position:relative; display:block; }
.prop-field:has(> .icon-select) > span:first-child{
  position:absolute; left:9px; top:0; font-size:var(--text-xs); line-height:1; transform:translateY(-50%);
  background:var(--md-color-grey-white); padding:0 3px; margin-left:-3px; z-index:1; pointer-events:none;
}
.prop-field:has(> .icon-select) > .icon-select{ width:100%; }

.content-row-remove{ flex-shrink:0; width:24px; height:24px; border:none; border-radius:6px; background:none; color:var(--ui-muted); cursor:pointer; font-size:var(--text-lg); line-height:1; }
.content-row-remove:hover{ background:var(--md-neutral-background-2-rest); }
.content-row-grip{ position:relative; flex-shrink:0; width:18px; text-align:center; color:var(--ui-muted); cursor:grab; font-size:var(--text-lg); }
.content-row-grip:focus-visible{ outline:2px solid var(--ui-accent); outline-offset:2px; border-radius:4px; }
.content-row-grip i{ position:relative; }
.content-row-grip::before{
  content:''; position:absolute; top:-8px; bottom:-8px; left:-10px; right:-10px;
}
.content-row-grip:hover{ color:var(--md-neutral-foreground-1-rest); }
.row-edit{ padding:3px 0; border-radius:8px; transition:background .1s ease; position:relative; }
.row-edit:has(.content-row-grip:hover){ background:var(--md-neutral-background-2-rest); }
.row-edit.dragging{ opacity:0.5; }
.content-row-drop-indicator{ height:3px; margin:2px 0; border-radius:2px; background:var(--ui-accent); }
.drag-ghost-preview{ pointer-events:none; z-index:var(--z-float); opacity:0.9; box-shadow:var(--shadow-raised); }
.drag-ghost-count{
  position:absolute; top:-8px; right:-8px; min-width:20px; height:20px; padding:0 5px;
  border-radius:10px; background:var(--ui-accent); color:var(--md-color-grey-white); font-family:var(--font-sans);
  font-size:var(--text-sm); font-weight:var(--font-weight-semibold); display:flex; align-items:center; justify-content:center;
}
.content-row-remove[disabled]{ visibility:hidden; }
.kanban-row-item-fields{ display:flex; flex-direction:column; gap:11px; flex:1; min-width:0; }
.kanban-row-item-fields input{ width:100%; }
.kanban-row-title-line{ display:flex; gap:8px; align-items:flex-start; }
.kanban-row-title-line > .prop-field:first-child{ flex:0 0 64px; width:64px; }
.kanban-row-title-line > .prop-field:last-child{ flex:1; min-width:0; }
.kanban-row-labels{ display:flex; flex-direction:column; gap:8px; }
.kanban-row-label-edit{ display:flex; align-items:flex-start; gap:6px; }
.kanban-row-label-edit > .tag-field-label-icon-row{ flex:1; min-width:0; }
.kanban-row-label-remove{ flex-shrink:0; width:24px; height:24px; margin-top:4px; border:none; border-radius:6px; background:none; color:var(--ui-muted); cursor:pointer; font-size:var(--text-lg); line-height:1; }
.kanban-row-label-remove:hover{ background:var(--md-neutral-background-2-rest); }
.kanban-row-label-add{
  align-self:flex-start; font-family:var(--font-sans); font-size:var(--text-md); color:var(--md-neutral-foreground-3-rest);
  background:none; border:none; border-radius:8px; padding:6px 10px; cursor:pointer;
}
.kanban-row-label-add:hover{ background:var(--md-neutral-background-2-rest); }
.kanban-row-label-add i{ margin-right:6px; }
.kanban-row-edit-item{ align-items:flex-start; border-radius:8px; padding-top:12px; padding-bottom:12px; transition:background .1s ease; }
.kanban-row-edit-item:hover{ background:var(--md-neutral-background-2-rest); }
.kanban-row-edit-item > .content-row-grip{ margin-top:10px; }
.kanban-row-edit-item > .content-row-remove{ margin-top:4px; }
.user-card-row-edit{ align-items:flex-start; }
.user-card-row-edit > .content-row-grip{ margin-top:10px; }
.user-card-row-edit > .content-row-remove{ margin-top:4px; }
.kanban-row-edit.dragging{ background:var(--md-neutral-background-2-rest); border-radius:8px; padding-top:8px; padding-bottom:8px; }


.prop-field{ position:relative; }
.icon-suggest-menu{
  display:none; position:absolute; top:100%; left:0; right:0; min-width:240px; z-index:30; margin-top:4px;
  background:var(--md-color-grey-white); border:1px solid var(--ui-border); border-radius:8px;
  box-shadow:var(--shadow-popover); padding:4px; flex-direction:column; max-height:260px; overflow-y:auto;
}
.icon-suggest-menu.open{ display:flex; }
.icon-suggest-item{
  display:flex; align-items:center; gap:10px; width:100%; padding:7px 10px; border:none; border-radius:6px;
  background:transparent; color:var(--ui-text); font-family:var(--font-sans); font-size:var(--text-base); text-align:left; cursor:pointer;
}
.icon-suggest-item i{ width:18px; text-align:center; color:var(--ui-muted); font-size:var(--text-lg); }
.icon-suggest-item span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.icon-suggest-item:hover, .icon-suggest-item.active{ background:var(--ui-surface-2); }
