

/* ===== Lingee 项目模块（简化版，参考 Claude Projects） ===== */

.lp-panel {
  position: fixed;
  z-index: 40;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  animation: lp-fade 0.18s ease;
}

@keyframes lp-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lp-scroll {
  flex: 1;
  overflow-y: auto;
}

.lp-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

/* ---- 列表页头部 ---- */
.lp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.lp-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.lp-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 排序下拉 */
.lp-sort {
  position: relative;
}

.lp-sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e6e6e3;
  background: #fff;
  color: #4b4b48;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.lp-sort-btn:hover { background: #faf9f7; }
.lp-sort-btn svg { width: 14px; height: 14px; }

.lp-sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: #fff;
  border: 1px solid #ececea;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 60;
}

.lp-sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 13px;
  color: #4b4b48;
  border-radius: 7px;
  cursor: pointer;
}

.lp-sort-item:hover { background: #f5f4f1; }
.lp-sort-item.active { color: #1a1a1a; font-weight: 600; }
.lp-sort-item.active::after { content: "✓"; color: #1a1a1a; }

/* 主按钮 */
.lp-btn {
  font-family: inherit;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 8px 16px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.lp-btn-primary {
  background: #1a1a1a;
  color: #fff;
}
.lp-btn-primary:hover { background: #343432; }
.lp-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.lp-btn-ghost {
  background: #fff;
  border-color: #e6e6e3;
  color: #4b4b48;
}
.lp-btn-ghost:hover { background: #faf9f7; }

.lp-btn-danger {
  background: #fff;
  border-color: #f0d4d0;
  color: #c0392b;
}
.lp-btn-danger:hover { background: #fdf3f2; }

/* 搜索框 */
.lp-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: #f6f5f3;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 28px;
  transition: background 0.15s, border-color 0.15s;
}

.lp-search:focus-within {
  background: #fff;
  border-color: #e0dfdb;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.03);
}

.lp-search svg { width: 16px; height: 16px; color: #9b9a96; flex-shrink: 0; }

.lp-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #1a1a1a;
  font-family: inherit;
}

.lp-search input::placeholder { color: #a5a39e; }

/* 卡片网格 */
.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 14px;
}

.lp-card {
  position: relative;
  border: 1px solid #ececea;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  min-height: 96px;
  display: flex;
  flex-direction: column;
}

.lp-card:hover {
  border-color: #dcdbd7;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.lp-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lp-card-desc {
  font-size: 13px;
  color: #76746e;
  line-height: 1.45;
  margin-bottom: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lp-card-meta {
  font-size: 12px;
  color: #a5a39e;
  margin-top: 12px;
}

.lp-card-more {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #b6b4af;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.lp-card:hover .lp-card-more { display: flex; }
.lp-card-more:hover { background: #f0efec; color: #555; }
.lp-card-more svg { width: 16px; height: 16px; }

/* 空状态 */
.lp-empty {
  text-align: center;
  padding: 72px 20px;
  color: #b6b4af;
  font-size: 14px;
}

.lp-empty svg { width: 40px; height: 40px; margin-bottom: 14px; color: #d8d6d1; }

/* ---- 弹窗 ---- */
.lp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,30,28,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
  padding: 24px;
  animation: lp-fade 0.15s ease;
}

.lp-modal {
  width: 480px;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  padding: 24px 26px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.lp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lp-modal-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
}

.lp-modal-close {
  border: none;
  background: none;
  color: #9b9a96;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-modal-close:hover { background: #f0efec; color: #555; }
.lp-modal-close svg { width: 18px; height: 18px; }

.lp-field { margin-bottom: 18px; }

.lp-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.lp-input, .lp-textarea {
  width: 100%;
  border: 1px solid #e0dfdb;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lp-input:focus, .lp-textarea:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.lp-input::placeholder, .lp-textarea::placeholder { color: #a5a39e; }

.lp-textarea { min-height: 84px; resize: vertical; line-height: 1.5; }

.lp-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* ---- 详情页 ---- */
.lp-detail-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.lp-back {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid #e6e6e3;
  background: #fff;
  border-radius: 9px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.lp-back:hover { background: #faf9f7; }
.lp-back svg { width: 18px; height: 18px; }

.lp-detail-title { font-size: 24px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.lp-detail-desc { font-size: 14px; color: #76746e; margin-top: 6px; line-height: 1.5; }

.lp-detail-tools {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.lp-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lp-section-h {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.lp-sess-list { display: flex; flex-direction: column; gap: 2px; }

.lp-sess {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.lp-sess:hover { background: #f6f5f3; }

.lp-sess-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0efec;
  color: #76746e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-sess-icon svg { width: 16px; height: 16px; }

.lp-sess-info { flex: 1; min-width: 0; }
.lp-sess-name { font-size: 14px; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-sess-meta { font-size: 12px; color: #a5a39e; margin-top: 2px; }

.lp-sess-del {
  border: none;
  background: transparent;
  color: #b6b4af;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-sess:hover .lp-sess-del { display: flex; }
.lp-sess-del:hover { background: #fdf3f2; color: #c0392b; }
.lp-sess-del svg { width: 15px; height: 15px; }

.lp-add-sess {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed #dcdbd7;
  border-radius: 10px;
  background: #fff;
  color: #76746e;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.lp-add-sess:hover { border-color: #1a1a1a; color: #1a1a1a; background: #faf9f7; }
.lp-add-sess svg { width: 16px; height: 16px; }

/* 项目卡片右键/更多菜单 */
.lp-menu {
  position: fixed;
  background: #fff;
  border: 1px solid #ececea;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  padding: 6px;
  z-index: 2147483100;
  min-width: 140px;
}

.lp-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  font-size: 13px;
  color: #4b4b48;
  border-radius: 7px;
  cursor: pointer;
}
.lp-menu-item:hover { background: #f5f4f1; }
.lp-menu-item.danger { color: #c0392b; }
.lp-menu-item.danger:hover { background: #fdf3f2; }
.lp-menu-item svg { width: 15px; height: 15px; }

/* 侧边栏“项目”导航按钮激活态 */
#lp-nav-btn.lp-nav-active { background: rgba(0,0,0,0.06); }
/* 隐藏“项目”导航模块 */
#lp-nav-btn { display: none !important; }

