/* 可复用 UI 组件：导航按钮、表单、信息框等 */

/* 侧栏导航按钮 */
.nav-btn {
  /* 块级占满侧栏宽 */
  display: block;
  width: 100%;
  /* 内边距 */
  padding: 10px 12px;
  /* 左对齐文字 */
  text-align: left;
  /* 无边框 */
  border: none;
  /* 透明底 */
  background: transparent;
  /* 圆角 */
  border-radius: 6px;
  /* 指针 */
  cursor: pointer;
  /* 字号继承 */
  font-size: 0.95rem;
  /* 过渡 */
  transition: background 0.15s;
}

/* 悬停态 */
.nav-btn:hover {
  background: #f1f5f9;
}

/* 当前激活工具 */
.nav-btn.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}

/* 工具面板默认隐藏 */
.tool-panel {
  display: none;
  padding: 24px;
}

/* 当前显示的面板 */
.tool-panel.show {
  display: block;
}

/* 工具标题 */
.tool-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* 工具描述 */
.tool-desc {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 标题与表单间距 */
.tool-body {
  margin-top: 20px;
}

/* 表单项块 */
.field {
  margin-bottom: 16px;
}

/* 横向排列的表单项 */
.field.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 标签文字 */
.label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* 提示小字 */
.hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #64748b;
}

/* 文件选择框 */
.input-file {
  width: 100%;
  padding: 8px;
}

/* 文本输入框 */
.input-text {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* 较窄数字输入 */
.input-text.narrow {
  max-width: 120px;
}

/* 主按钮 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-right: 8px;
  margin-top: 8px;
}

/* 主色按钮 */
.btn.primary {
  background: #2563eb;
  color: #fff;
}

/* 次要按钮 */
.btn.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

/* 小尺寸按钮 */
.btn.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* 禁用按钮 */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 信息展示框 */
.info-box {
  margin-top: 12px;
  padding: 12px;
  background: #f5f7fa;
  border-radius: 4px;
  line-height: 1.8;
}

/* 十六进制 dump 区域 */
.hex-dump {
  margin-top: 12px;
  padding: 12px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 4px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.4;
  max-height: 400px;
}

/* Base64 输出文本域 */
.code-area {
  width: 100%;
  min-height: 120px;
  margin-top: 12px;
  padding: 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
}

/* 批量重命名列表 */
.rename-list {
  list-style: none;
  margin-top: 16px;
}

/* 列表单项 */
.rename-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}
