/* 工具箱大类（module-nav 内） */
.tb-wrap { position: relative; display: inline-flex; }
.tb-main {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted); cursor: pointer;
  background: var(--card); border: 1px solid var(--border);
  font-family: inherit; transition: all .15s;
}
.tb-main:hover, .tb-wrap.tb-open .tb-main { border-color: var(--green); color: var(--green); }
.tb-arrow { font-size: 10px; transition: transform .15s; }
.tb-wrap.tb-open .tb-arrow { transform: rotate(180deg); }

.tb-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 220px; max-width: 300px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 10px; display: flex; flex-direction: column; gap: 2px;
}
.tb-hidden { display: none !important; }
.tb-panel-title { font-size: 12px; color: var(--muted); padding: 2px 8px 6px; }
.tb-q {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; font-size: 13px;
  color: var(--text); text-decoration: none; transition: background .15s;
}
.tb-q:hover { background: var(--green-soft); color: var(--green); }
.tb-q-emoji { font-size: 14px; }
.tb-q-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-empty { font-size: 12.5px; color: var(--muted); padding: 8px 10px; }
.tb-add {
  margin-top: 6px; padding: 8px; text-align: center;
  border: 1px dashed var(--border); border-radius: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.tb-add:hover { border-color: var(--green); color: var(--green); }

/* 新增查询弹窗 */
.tb-ovl {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 16px 16px; overflow-y: auto;
}
.tb-modal {
  background: var(--card); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  width: 560px; max-width: 100%; padding: 22px 24px;
}
.tb-modal h2 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; }
.tb-modal .tb-x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 16px; font-weight: 400; }
.tb-modal label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.tb-modal input[type=text], .tb-modal select, .tb-modal textarea {
  width: 100%; padding: 9px 12px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; background: var(--card); color: var(--text); font-family: inherit;
}
.tb-modal textarea {
  min-height: 110px; resize: vertical; font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; background: #fafbfc;
}
.tb-modal input:focus, .tb-modal select:focus, .tb-modal textarea:focus { border-color: var(--green); }
.tb-row { display: flex; gap: 12px; }
.tb-row > div { flex: 1; }
.tb-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.tb-btn-ghost, .tb-btn-primary {
  border: none; cursor: pointer; padding: 8px 18px; border-radius: 10px; font-size: 13.5px;
  font-family: inherit; transition: all .15s;
}
.tb-btn-ghost { border: 1px solid var(--border); background: var(--card); color: var(--text); }
.tb-btn-ghost:hover { border-color: var(--green); color: var(--green); }
.tb-btn-primary { background: var(--green); color: #fff; font-weight: 600; }
.tb-btn-primary:hover { background: #06ad56; }
