.panel-body {
  padding: 14px 14px 10px 14px;
}

#sidebar {
    width: 20%;
    height: 90%;
    min-width:150px;
    background-color: #faf9f4;
    padding: 10px 0 10px 0;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;
    overflow-y: auto;
    position: absolute;
    left: 0;
    margin-bottom:0;
}
/* ----- sidebar内部样式 ----- */
.control-group {
  margin-bottom: 3%;
  padding-bottom: 3.5%;
  border-bottom: 1px solid #e0e0e0b2;
}

.control-group h4 {
  color: #2c3e50;
  font-size: 14px;
  margin: 10px 0;
}

/* 1、模式切换按钮组 (RMP-centric Network / CRG-centric Axis) */
.btn-group .btn-default {
  background: #f8f9fa;
  color: #2c3e50;
  border: 1px solid #ced4da;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-group .btn-default.active {
  background: #388D5D;
  color: white;
  border-color: #2a6745;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.btn-group .btn-default:not(.active):hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

/* 2、选项按钮组 (Show Verified PTM / Axis Mode 等) */
.btn-option {
  background: white;
  color: #2c3e50;
  border: 1px solid #ced4da;
  transition: all 0.2s ease;
  position: relative;
}

.btn-option.active {
  background: #388D5D;
  color: white;
  border-color: #2a6745;
  padding-left: 20px;
}

.btn-option.active:before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.btn-option:not(.active):hover {
  border-color: #388D5D;
  background: #f3faf7;
  color: #2a6745;
}

/* 激活状态指示器 */
.btn-option.active::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  background: #ffa319;
}

.action-buttons {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

/* 在RMP模式下隐藏View Mode选项 */
.network-config + .control-group .view-mode-group {
  display: none;
}

/* 在CRG模式下显示View Mode选项 */
.axis-config + .control-group .view-mode-group {
  display: block;
}
/* 3、复选框 */
.rmp-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-direction: column;
  align-items: center; /* 水平居中 */
  background-color: #d1e7dd;
  border: 2px #d8d8d8;
  border-radius: 8px; /* 圆角边框 */
  margin: 0;
  padding: 5px 5px 4px 5px;
}

/* 复选框行布局 */
.checkbox-row {
  display: flex;
  gap: 15px;
  flex-grow: 1;
  justify-content: center; /* 水平居中 */
}

/* 自定义复选框样式 */
.rmp-checkbox {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  font-size: 0.9em;
  user-select: none;
}

/* 隐藏原生复选框 */
.rmp-checkbox input {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

/* 自定义复选框标记 */
.checkmark {
  position: absolute;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s;
}

/* 选中状态样式 */
.rmp-checkbox input:checked ~ .checkmark {
  background-color: #f8f9fa;
  border-color: #666;
}

/* 创建勾选标记 */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #333;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.rmp-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* 类型颜色标识 */
.rmp-checkbox.writer .checkmark { border-left: 4px solid #2196F3; }
.rmp-checkbox.eraser .checkmark { border-left: 4px solid #2196F3; }
.rmp-checkbox.reader .checkmark { border-left: 4px solid #2196F3; }


/* 响应式布局 */
@media (max-width: 768px) {
  .checkbox-row {
      flex-wrap: wrap;
      gap: 8px;
  }
  .rmp-checkbox {
      flex: 1 1 40%;
  }
}
/* ---------------------------------- */

/* --- 自定义button --- */
.btn-custom {
    color: #fff;
    background-color: #3f8efc;
    border-color: #3f8efc;
  }
  
  .btn-custom:hover {
    color: #fff;
    background-color: #2667ff;
    border-color: #2667ff;
  }
  
  .btn-custom:focus, .btn-primary.focus {
    color: #fff;
    background-color: #2667ff;
    border-color: #2667ff;
    box-shadow: #87bfff;
  }

/* ------------------ 手风琴折叠栏 -------------------- */
.horizontal-accordion {
    position: fixed;
    left: 20%; /* 与sidebar宽度一致 */
    top: 100px; /* 与导航栏下沿对齐 */
    bottom: 0;
    display: flex;
    width: 60px; /* 折叠状态宽度 */
    z-index: 1000;
    background: #f8faf9; /* 浅绿色背景与主色系呼应 */
    border-right: 1px solid rgba(56, 141, 93, 0.15); /* 主色系透明边框 */
    transition: width 0.2s ease;
  }
  
/* 添加初始化状态 */
.accordion-item {
    width: 60px;
    position: relative;
    cursor: pointer;
    background: rgba(56, 141, 93, 0.1); /* 主色10%透明度背景 */
    border-right: 1px solid rgba(56, 141, 93, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
  }
  .accordion-item:hover:not(.active) {
    background: rgba(56, 141, 93, 0.233); /* 悬停加深背景 */
    box-shadow: 2px 0 8px rgba(56, 141, 93, 0.1);
}
  
  .accordion-item.active {
    flex: 1;
    background: #fff;
    width: calc(100% - 60px); /* 剩余宽度 */
  }
  /* 确保非激活项保持最小宽度 */
.accordion-item:not(.active) {
    width: 60px !important;
  }

  .accordion-header {
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: space-between; /* 子元素在容器内均匀分布 */
    background-color: #f0f0f096;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    height: 48px;
    cursor: pointer;
    position: relative; /* 用于绝对定位标题 */
}

.accordion-header i {
    margin-right: 10px; /* 添加一些间距 */
}

.accordion-header h3 {
    font-weight: 600;
    color: #2c3e50;
    margin: 0; /* 移除默认的 margin */
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* 水平居中 */
    width: calc(100% - 40px); /* 为箭头图标留出空间 */
    text-align: center; /* 文本居中 */
}
  /* 标题展开隐藏*/
  .item-title {
    position: absolute;
    left: 20px;
    top: 40%;
    color: #2c3e50;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    font-weight: 600;
    transition: opacity 0.3s ease;
  }
  .accordion-item.active .item-title {
    opacity: 0; /* 在展开状态下隐藏 */
}
  /* .accordion-item.active .item-title {
    writing-mode: horizontal-tb;
    transform: rotate(0);
    left: 30px;
    bottom: auto;
    top: 20px;
  }*/

  /* 内容区域 */
  .item-content {
    pointer-events: none;
    cursor: default; 
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    overflow-y: auto;
    transition: opacity 0.3s 0.2s;
  }
  
  .accordion-item.active .item-content {
    opacity: 1;
    pointer-events: auto; /* 展开后允许内容交互 */
    cursor: auto;
  }
  
  /* 内容标题样式 */
  .content-title {
    font-size: 21px;
    color: #174426;
    cursor: pointer;
  }
/* ------------------------- */

.table-rowsum {
  background-color: #a9c8e73b; /* 浅灰色背景 */
  font-style: italic; /* 斜体文字 */
  font-weight: 300;
  line-height: 0.9;
}

