/* ===== Related Cases ===== */
.related-cases {
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--slate-100);
  border-radius: 10px;
  background: #F8FAFC;
}
.related-cases-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 8px;
}
.related-cases-title span { display: inline-flex; align-items: center; gap: 6px; }
.related-cases-title i { color: var(--primary); font-size: 15px; }
.related-cases-more {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.related-case-list { display: flex; flex-direction: column; gap: 8px; }
.related-case-card {
  display: flex; gap: 10px; width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--slate-100);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.related-case-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.related-case-img {
  width: 54px; height: 54px; flex: 0 0 54px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--slate-100);
}
.related-case-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-400);
  font-size: 22px;
}
.related-case-body { min-width: 0; flex: 1; max-width: 100%; }
.related-case-name {
  font-size: 13px; font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 2px;
}
.related-case-profile {
  font-size: 11px; color: var(--slate-500);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 4px;
}
.related-case-summary {
  font-size: 12px; line-height: 1.45;
  color: var(--slate-600);
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-case-tags, .case-detail-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
}
.case-tag {
  border: none;
  display: inline-flex; align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  line-height: 1.3;
  font-family: inherit;
}
.case-tag.clickable { cursor: pointer; }
.case-tag.clickable:hover { filter: brightness(0.96); transform: translateY(-1px); }
.case-tag.symptom { background: #FFF1F2; color: #BE123C; }
.case-tag.product { background: #ECFDF5; color: #047857; }
.case-drawer-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15,23,42,0.42);
}
.case-drawer-panel {
  width: min(640px, 100%);
  max-height: 88vh;
  overflow: hidden;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  position: relative;
  box-shadow: 0 -10px 40px rgba(15,23,42,0.18);
  display: flex;
  flex-direction: column;
}
.case-drawer-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--slate-100);
  flex-shrink: 0;
}
.case-drawer-title-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}
.case-drawer-title-wrap h3 {
  font-size: 18px;
  color: var(--slate-900);
  line-height: 1.3;
}
.case-drawer-back {
  width: 32px; height: 32px;
  border: 1px solid var(--slate-200);
  border-radius: 50%;
  background: var(--white);
  color: var(--slate-600);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.case-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.case-detail-close {
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--slate-600);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.case-detail-hero {
  width: 100%; height: 180px;
  object-fit: cover;
  display: block;
}
.case-detail-content { padding: 20px; }
.case-detail-kicker {
  color: var(--primary);
  font-size: 12px; font-weight: 800;
  margin-bottom: 6px;
}
.case-detail-content h3 {
  font-size: 20px;
  color: var(--slate-900);
  margin-bottom: 8px;
}
.case-detail-profile {
  color: var(--slate-500);
  font-size: 13px;
  margin-bottom: 8px;
}
.case-detail-section {
  margin-top: 16px;
  color: var(--slate-700);
  font-size: 14px;
  line-height: 1.65;
}
.case-detail-section strong {
  display: block;
  color: var(--slate-900);
  margin-bottom: 4px;
}
.case-detail-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 18px;
}
.case-primary-btn, .case-secondary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.case-primary-btn {
  border: none;
  color: #fff;
  background: var(--primary);
}
.case-secondary-btn {
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  background: var(--white);
}
.case-list-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}
.case-clear-filter {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start;
  margin: 0 0 10px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-600);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.case-list-body {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#case-list-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-list-item {
  display: flex; gap: 10px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--slate-100);
  border-radius: 10px;
  background: var(--white);
  padding: 10px;
  cursor: pointer;
  text-align: left;
}
.case-list-item:hover { border-color: var(--primary); }
.case-list-img {
  width: 62px; height: 62px; flex: 0 0 62px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--slate-100);
}
.case-list-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-400);
  font-size: 24px;
}
.case-list-info { flex: 1; min-width: 0; }
.case-list-name {
  font-size: 14px; font-weight: 800;
  color: var(--slate-800);
  margin-bottom: 3px;
}
.case-list-profile {
  font-size: 12px;
  color: var(--slate-500);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 4px;
}
.case-list-summary {
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-list-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--slate-400);
  font-size: 13px;
}
.case-drawer-more-wrap {
  justify-content: center;
  padding: 0 18px 16px;
  flex-shrink: 0;
}

