/* ============================================
   StarDream · 私人诊所主题
   浅底深字版 | 粉紫+金 | 波浪线内联标签 | 全端适配
   ============================================ */

/* ===== 思维链折叠块（永远关闭，不可交互） ===== */
.think-block {
  display: block;
  margin: 0;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  max-height: 0;
}

.think-block summary {
  display: none;
}

.think-block[open] {
  max-height: 0;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* ===== 焦点角色标记隐藏 ===== */
.focus-ids {
  display: none;
}

/* ===== 顶部状态栏 ===== */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(248, 235, 250, 0.92), rgba(245, 230, 255, 0.88));
  border: 1px solid rgba(180, 120, 200, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(180, 120, 200, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tb-item {
  font-size: 12.5px;
  color: #5a3068;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.4);
}

/* ===== 正文区域 ===== */
text {
  display: block;
  line-height: 1.85;
  font-size: 15px;
  color: #3a2040;
  padding: 4px 2px;
  margin-bottom: 14px;
}

text p {
  text-indent: 2em;
  margin: 0 0 10px 0;
}

/* ===== 内联数值标签(波浪线+点击展开) ===== */
.itag {
  display: inline;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
}

.itag summary {
  display: inline;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  padding: 0;
  transition: all 0.25s ease;
}

.itag summary::-webkit-details-marker {
  display: none;
}

.itag summary::before {
  content: none !important;
}

.itag .tag-detail {
  display: block;
  padding: 6px 14px;
  margin: 4px 0 6px 0;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 8px;
  font-style: italic;
  text-indent: 0;
  animation: tagFadeIn 0.3s ease;
}

@keyframes tagFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 增益: 翠绿波浪线(深色版) --- */
.itag.up summary {
  color: #1a8a45;
  text-decoration: underline wavy rgba(26, 138, 69, 0.5);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.itag.up summary:hover {
  color: #15a050;
  text-decoration-color: rgba(26, 138, 69, 0.8);
}

.itag.up .tag-detail {
  color: #1a7a40;
  background: rgba(26, 138, 69, 0.08);
  border-left: 3px solid rgba(26, 138, 69, 0.4);
}

/* --- 减损: 赤红波浪线(深色版) --- */
.itag.down summary {
  color: #c03040;
  text-decoration: underline wavy rgba(192, 48, 64, 0.5);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.itag.down summary:hover {
  color: #d83848;
  text-decoration-color: rgba(192, 48, 64, 0.8);
}

.itag.down .tag-detail {
  color: #b03040;
  background: rgba(192, 48, 64, 0.08);
  border-left: 3px solid rgba(192, 48, 64, 0.4);
}

/* --- 关系: 粉紫波浪线(深色版) --- */
.itag.rel summary {
  color: #9040a8;
  text-decoration: underline wavy rgba(144, 64, 168, 0.5);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.itag.rel summary:hover {
  color: #a850c0;
  text-decoration-color: rgba(144, 64, 168, 0.8);
}

.itag.rel .tag-detail {
  color: #8038a0;
  background: rgba(144, 64, 168, 0.08);
  border-left: 3px solid rgba(144, 64, 168, 0.4);
}

/* --- 事件: 琥珀金波浪线(深色版) --- */
.itag.evt summary {
  color: #9a7020;
  text-decoration: underline wavy rgba(154, 112, 32, 0.5);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.itag.evt summary:hover {
  color: #b08028;
  text-decoration-color: rgba(154, 112, 32, 0.8);
}

.itag.evt .tag-detail {
  color: #8a6520;
  background: rgba(154, 112, 32, 0.08);
  border-left: 3px solid rgba(154, 112, 32, 0.4);
}

/* ===== 行动选项框 ===== */
.action-box {
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.92), rgba(255, 245, 230, 0.88));
  border: 1px solid rgba(200, 160, 80, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  box-shadow: 0 2px 10px rgba(200, 160, 80, 0.08);
}

.action-title {
  font-size: 15px;
  font-weight: 700;
  color: #8a6020;
  margin: 0 0 10px 0;
  letter-spacing: 1px;
}

.act-opt {
  font-size: 14px;
  color: #4a3050;
  padding: 8px 12px;
  margin: 5px 0;
  border-left: 3px solid rgba(200, 160, 80, 0.4);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.act-opt:hover {
  background: rgba(200, 160, 80, 0.1);
  border-left-color: #b08030;
  color: #3a2040;
  transform: translateX(4px);
}

.act-hint {
  font-size: 12px;
  color: rgba(100, 70, 120, 0.5);
  margin: 8px 0 0 0;
  font-style: italic;
}

/* ===== 折叠块通用样式 ===== */
details {
  background: linear-gradient(180deg, rgba(250, 242, 255, 0.9), rgba(248, 238, 252, 0.85));
  border: 1px solid rgba(180, 140, 220, 0.25);
  border-radius: 10px;
  margin: 8px 0;
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 2px 8px rgba(180, 140, 220, 0.08);
}

details[open] {
  border-color: rgba(180, 120, 220, 0.4);
  box-shadow: 0 2px 15px rgba(180, 140, 220, 0.12);
}

details summary {
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 700;
  color: #6a3080;
  cursor: pointer;
  user-select: none;
  list-style: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "▸ ";
  color: rgba(180, 120, 60, 0.6);
  display: inline-block;
  transition: color 0.3s ease;
}

details[open] summary::before {
  content: "▾ ";
  color: #a07020;
}

details summary:hover {
  color: #8a40a0;
}

/* ===== 内联标签覆盖通用details样式 ===== */
details.itag {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  overflow: visible;
  box-shadow: none;
}

details.itag[open] {
  border-color: transparent;
  box-shadow: none;
}

details.itag summary {
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
}

details.itag summary::before {
  content: none !important;
}

details.itag[open] summary::before {
  content: none !important;
}

/* ===== 状态栏内容块 ===== */
.status-block {
  padding: 12px 16px;
  font-size: 13.5px;
  color: #4a3050;
  line-height: 1.75;
}

.status-block p {
  margin: 3px 0;
}

.status-block strong {
  display: block;
  text-align: center;
  color: #9040a8;
  font-size: 12.5px;
  letter-spacing: 2px;
  padding: 4px 0;
}

.status-block hr {
  border: none;
  border-top: 1px solid rgba(180, 140, 220, 0.25);
  margin: 10px 0;
}

/* ===== 内心想法特殊样式 ===== */
.inner-thought {
  font-style: italic;
  color: #7a3090 !important;
  background: rgba(180, 120, 220, 0.08);
  border-left: 3px solid rgba(180, 120, 220, 0.35);
  border-radius: 0 6px 6px 0;
  padding: 8px 12px !important;
  margin: 8px 0 4px 0 !important;
  line-height: 1.7;
  font-size: 13px;
}

/* ===== 今日预约·客户卡片 ===== */
.biz-board {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biz-card {
  background: linear-gradient(135deg, rgba(255, 248, 252, 0.85), rgba(250, 240, 255, 0.8));
  border: 1px solid rgba(180, 140, 220, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.biz-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #c08030, #a06820);
  border-radius: 4px 0 0 4px;
}

.biz-card:hover {
  border-color: rgba(200, 160, 80, 0.4);
  box-shadow: 0 2px 12px rgba(200, 160, 80, 0.1);
  transform: translateY(-2px);
}

.biz-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #8a6020;
  margin: 0 0 6px 0;
}

.biz-type {
  font-size: 12px;
  color: #6a5080;
  margin: 0 0 4px 0;
}

.biz-pay {
  font-size: 13px;
  color: #1a8a45;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.biz-req {
  font-size: 12px;
  color: #9040a8;
  margin: 0 0 4px 0;
}

.biz-cost {
  font-size: 12px;
  color: #c03040;
  margin: 0 0 4px 0;
}

.biz-fx {
  font-size: 12px;
  color: #2a6a90;
  margin: 0;
  font-style: italic;
}

/* ===== 客户档案表格 ===== */
.biz-history {
  padding: 8px 12px;
  overflow-x: auto;
}

.biz-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #4a3050;
}

.biz-history table th {
  background: rgba(180, 140, 220, 0.15);
  color: #5a3068;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid rgba(180, 140, 220, 0.25);
  white-space: nowrap;
}

.biz-history table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(180, 140, 220, 0.1);
  vertical-align: top;
}

.biz-history table tr:nth-child(even) td {
  background: rgba(180, 140, 220, 0.04);
}

.biz-history table tr:hover td {
  background: rgba(180, 140, 220, 0.08);
}

/* ===== 记忆区 ===== */
.memory-block {
  padding: 8px 12px;
  overflow-x: auto;
  font-size: 13px;
  color: #4a3050;
  line-height: 1.6;
}

.memory-block strong {
  color: #8a6020;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  display: block;
  text-align: center;
  padding: 4px 0;
}

.memory-block hr {
  border: none;
  border-top: 1px dashed rgba(180, 120, 60, 0.25);
  margin: 12px 0;
}

.memory-block table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #4a3050;
  margin: 6px 0;
}

.memory-block table th {
  background: rgba(180, 140, 220, 0.12);
  color: #5a3068;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid rgba(180, 140, 220, 0.2);
  white-space: nowrap;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.memory-block table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(180, 140, 220, 0.08);
  vertical-align: top;
  line-height: 1.5;
}

.memory-block table tr:nth-child(even) td {
  background: rgba(180, 140, 220, 0.03);
}

.memory-block table tr:hover td {
  background: rgba(180, 140, 220, 0.07);
}

/* ===== 记忆区表格列宽控制 ===== */
.memory-block table th:nth-child(1),
.memory-block table td:nth-child(1) {
  width: 8%;
  text-align: center;
}

.memory-block table th:nth-child(2),
.memory-block table td:nth-child(2) {
  width: 25%;
}

.memory-block table th:nth-child(3),
.memory-block table td:nth-child(3) {
  width: 17%;
}

.memory-block table th:nth-child(4),
.memory-block table td:nth-child(4) {
  width: 50%;
}

/* ===== 客户档案表格列宽控制 ===== */
.biz-history table th:nth-child(1),
.biz-history table td:nth-child(1) {
  width: 18%;
}

.biz-history table th:nth-child(2),
.biz-history table td:nth-child(2) {
  width: 20%;
}

.biz-history table th:nth-child(3),
.biz-history table td:nth-child(3) {
  width: 12%;
  text-align: center;
}

.biz-history table th:nth-child(4),
.biz-history table td:nth-child(4) {
  width: 12%;
  text-align: center;
}

.biz-history table th:nth-child(5),
.biz-history table td:nth-child(5) {
  width: 12%;
  text-align: center;
}

.biz-history table th:nth-child(6),
.biz-history table td:nth-child(6) {
  width: 26%;
}

/* ===== 滚动条美化 ===== */
.biz-history::-webkit-scrollbar,
.memory-block::-webkit-scrollbar {
  height: 5px;
}

.biz-history::-webkit-scrollbar-track,
.memory-block::-webkit-scrollbar-track {
  background: rgba(240, 230, 250, 0.5);
  border-radius: 4px;
}

.biz-history::-webkit-scrollbar-thumb,
.memory-block::-webkit-scrollbar-thumb {
  background: rgba(180, 140, 220, 0.3);
  border-radius: 4px;
}

.biz-history::-webkit-scrollbar-thumb:hover,
.memory-block::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 140, 220, 0.5);
}

/* ===== 移动端适配 ===== */
@media screen and (max-width: 480px) {
  .top-bar {
    padding: 8px 10px;
    gap: 4px;
    border-radius: 10px;
  }

  .tb-item {
    font-size: 11px;
    padding: 2px 4px;
  }

  text {
    font-size: 14px;
    line-height: 1.8;
  }

  .action-box {
    padding: 10px 12px;
  }

  .act-opt {
    font-size: 13px;
    padding: 7px 10px;
  }

  details summary {
    padding: 10px 12px;
    font-size: 13.5px;
  }

  details.itag summary {
    padding: 0;
    font-size: inherit;
  }

  .status-block {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  .inner-thought {
    font-size: 12px;
    padding: 6px 10px !important;
  }

  .biz-card {
    padding: 10px 12px;
  }

  .biz-name {
    font-size: 13.5px;
  }

  .biz-type,
  .biz-req,
  .biz-cost,
  .biz-fx {
    font-size: 11px;
  }

  .biz-pay {
    font-size: 12px;
  }

  .biz-history table,
  .memory-block table {
    font-size: 11px;
  }

  .biz-history table th,
  .memory-block table th {
    padding: 6px 7px;
    font-size: 10.5px;
  }

  .biz-history table td,
  .memory-block table td {
    padding: 5px 7px;
  }

  .itag .tag-detail {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* ===== 平板适配 ===== */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .top-bar {
    padding: 10px 12px;
  }

  .tb-item {
    font-size: 12px;
  }

  text {
    font-size: 14.5px;
  }
}

/* ===== 过渡动画 ===== */
.biz-card,
.act-opt {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}