@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap");
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f2f5fb;
  --text: #1b2230;
  --muted: #5a667a;
  --accent: #2f6fed;
  --accent-2: #0fae9a;
  --border: #e1e7f0;
  --shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at -10% -10%, rgba(47,111,237,0.12), transparent 60%),
    radial-gradient(800px 520px at 110% 10%, rgba(15,174,154,0.10), transparent 60%),
    linear-gradient(180deg, #f6f8fc 0%, #f0f4fb 55%, #eef2f8 100%);
  color: var(--text);
}
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 28px 16px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.title .name {
  font-size: 18px;
  font-weight: 700;
}
.title .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.status {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47,111,237,0.12);
  border: 1px solid rgba(47,111,237,0.28);
  color: #2f6fed;
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
  flex: 1;
  min-height: 0;
}
.chat-area {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.mode-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 8px;
  background: #f7f9fd;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.mode-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}
.mode-text {
  font-size: 12px;
  color: var(--text);
}
.progress-wrap {
  margin-top: 8px;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9eef6;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2f6fed, #0fae9a);
  transition: width 0.2s ease;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #d6dce7;
  transition: .2s;
  border-radius: 999px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: rgba(47,111,237,0.6);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.chat {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 0;
}
.message {
  display: flex;
  margin: 10px 0;
}
.message .bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  line-height: 1.55;
  white-space: pre-wrap;
}
.message.user {
  justify-content: flex-end;
}
.message.user .bubble {
  background: rgba(47,111,237,0.12);
  border: 1px solid rgba(47,111,237,0.28);
}
.composer {
  position: relative;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 42px 1fr 88px;
  gap: 10px;
  align-items: center;
}
.composer textarea {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  resize: none;
}
.plus {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.plus:active { transform: scale(0.96); }
.send {
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2f6fed 0%, #1b56d1 100%);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.send.secondary {
  background: linear-gradient(135deg, #0fae9a 0%, #0a8e7e 100%);
}
.btn-light {
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f4f7fd;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
}
.btn-light.loading::after {
  content: " ";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid rgba(47,111,237,0.4);
  border-top-color: #2f6fed;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.send.loading::after {
  content: " ";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.plus-menu {
  position: absolute;
  left: 0;
  bottom: 54px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}
.hidden {
  display: none;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #f6f8fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}
.menu-item.active {
  border-color: #2f6fed;
  background: rgba(47,111,237,0.12);
  color: #2f6fed;
  font-weight: 600;
}
.msg-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.menu-item select {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
  font-size: 12px;
}
.menu-item input[type="text"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
  font-size: 11px;
  color: var(--muted);
}
.menu-item input[type="file"] {
  display: none;
}
.menu-note {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
}
.menu-note.loading::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border: 2px solid rgba(47,111,237,0.4);
  border-top-color: #2f6fed;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  overflow-y: auto;
  min-height: 0;
}
.panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.session-panel {
  padding: 10px;
}
.session-grid {
  display: grid;
  gap: 10px;
}
.session-new-btn {
  width: 100%;
  height: 36px;
}
.session-current-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
}
.session-label {
  font-size: 12px;
  color: var(--muted);
}
.session-current-title {
  margin-top: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.session-list-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcff;
  padding: 8px;
}
.my-chats-list {
  display: grid;
  gap: 8px;
}
.chat-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}
.chat-session-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}
.chat-session-item.active {
  border-color: rgba(47,111,237,0.45);
  box-shadow: 0 0 0 2px rgba(47,111,237,0.12);
}
.chat-session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}
.chat-session-main {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}
.chat-session-main:hover {
  color: var(--accent);
}
.chat-session-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-mini-btn {
  border: 1px solid var(--border);
  background: #f7f9fd;
  color: var(--muted);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
}
.chat-mini-btn:hover {
  border-color: #9db8f2;
  color: #2f6fed;
}
.chat-mini-btn.favorite.on {
  color: #c77a08;
  border-color: #f5d7a1;
  background: #fff8e7;
}
.chat-session-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.more-section + .more-section {
  border-top: 1px dashed var(--border);
  margin-top: 12px;
  padding-top: 12px;
}
.mindmap-status {
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: #f6f8fc;
  color: var(--muted);
}
.mindmap-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8c2d2;
}
.mindmap-status.loading {
  color: #2f6fed;
  border-color: rgba(47,111,237,0.35);
  background: rgba(47,111,237,0.08);
}
.mindmap-status.loading::before {
  background: #2f6fed;
  animation: pulse 1.2s ease-in-out infinite;
}
.mindmap-status.done {
  color: #0fae9a;
  border-color: rgba(15,174,154,0.35);
  background: rgba(15,174,154,0.08);
}
.mindmap-status.done::before {
  background: #0fae9a;
  animation: pop 0.3s ease-out;
}
.mindmap-status.idle {
  color: var(--muted);
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
.accordion {
  width: 100%;
  background: #f7f9fd;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.accordion:hover {
  box-shadow: var(--shadow);
}
.chevron {
  transition: transform 0.2s ease;
}
.accordion-body {
  margin-top: 10px;
}
.accordion-body.collapsed {
  display: none;
}
.accordion.open .chevron {
  transform: rotate(180deg);
}
.panel-title {
  font-weight: 600;
  margin-bottom: 8px;
}
.panel label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 4px;
}
.panel input {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.panel select {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.mono {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 12px;
  white-space: pre-wrap;
}
.muted {
  color: var(--muted);
}
.error {
  color: #ff9a9a;
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa3b2;
  animation: bounce 1s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

.retrieval-list {
  display: grid;
  gap: 8px;
}
.retrieval-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f9fbff;
  padding: 8px;
}
.retrieval-group-toggle {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.retrieval-group-toggle .chevron {
  transition: transform 0.2s ease;
}
.retrieval-group-toggle.open .chevron {
  transform: rotate(180deg);
}
.retrieval-group-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.retrieval-group-body.collapsed {
  display: none;
}
.entry {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.entry-title {
  font-weight: 600;
  font-size: 13px;
}
.entry-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.entry-body {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  background: #f7f9fd;
  border-radius: 10px;
  padding: 8px;
}
.entry-content {
  white-space: pre-wrap;
}
.entry-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.entry-preview {
  font-size: 12px;
  padding: 4px 8px;
}
.entry::after {
  content: "展开";
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.entry.open::after {
  content: "收起";
  color: var(--accent);
}
.entry.open .entry-body {
  display: block;
}

.search-list {
  display: grid;
  gap: 8px;
}
.search-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}
.search-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-item a {
  color: var(--accent);
  text-decoration: none;
}
.search-snippet {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.hl {
  color: #e11d48;
  font-weight: 600;
}
.case-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.web-link {
  color: #0f766e;
  text-decoration: none;
  font-weight: 600;
}
.web-link:hover {
  text-decoration: underline;
}
.case-link:hover {
  text-decoration: underline;
}
.case-no {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(79,70,229,0.12);
  color: #4338ca;
  font-size: 11px;
  margin-right: 4px;
}
.web-no {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15,118,110,0.12);
  color: #0f766e;
  font-size: 11px;
}
.case-flash {
  background: rgba(16,185,129,0.15);
  border-radius: 6px;
  transition: background 0.4s ease;
}
.web-flash {
  background: rgba(15,118,110,0.15);
  border-radius: 6px;
  transition: background 0.4s ease;
}
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
}
.doc-panel-actions {
  margin-bottom: 8px;
}

.trace-list {
  display: grid;
  gap: 8px;
}
.trace-item {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 8px;
  background: #fbfcff;
}
.trace-item .label {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}
.trace-item .detail {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(47,111,237,0.12);
  color: var(--accent);
  font-size: 12px;
  border: 1px solid rgba(47,111,237,0.25);
}
.status-badge.done {
  background: rgba(16,185,129,0.14);
  color: #059669;
  border-color: rgba(16,185,129,0.35);
}
.status-badge.done .pulse {
  background: #10b981;
  animation: none;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.6; }
}
.conn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}
.modal-card {
  width: min(720px, 92vw);
  max-height: 80vh;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 12px;
  overflow: auto;
}
.doc-modal {
  width: min(860px, 94vw);
}
.doc-modal.readonly .doc-ai,
.doc-modal.readonly .doc-suggest,
.doc-modal.readonly #docGenBtn {
  display: none;
}
.doc-modal.readonly .doc-editor {
  pointer-events: none;
}
.doc-notice {
  border: 1px solid rgba(47,111,237,0.25);
  background: rgba(47,111,237,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.doc-notice-title {
  font-weight: 600;
  color: #1b56d1;
  font-size: 12px;
}
.doc-notice-body {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.doc-title {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}
.doc-sheet {
  background: #e9eef6;
  padding: 14px;
  border-radius: 12px;
}
.doc-editor {
  min-height: 360px;
  border: 1px solid #d8e0ee;
  border-radius: 10px;
  padding: 18px 22px;
  background: #ffffff;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  outline: none;
  font-family: "Georgia", "STSong-Light", "SimSun", serif;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}
.case-section {
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e6f2;
  margin-bottom: 12px;
}
.case-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafe;
}
.case-preview-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.case-preview-meta {
  font-size: 12px;
  color: var(--muted);
}
.case-analysis {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(15,118,110,0.35);
  background: rgba(13,148,136,0.08);
}
.case-analysis-title {
  font-weight: 600;
  color: #0f766e;
  font-size: 12px;
}
.case-analysis-body {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #0f766e;
  white-space: pre-wrap;
}
.case-analysis-body.loading::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border: 2px solid rgba(15,118,110,0.4);
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.case-heading {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 6px;
}
.case-text {
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--text);
}
.doc-ai {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
}
.doc-ai input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.doc-ai textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  resize: none;
}
.doc-suggest {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f6f8fc;
  font-size: 12px;
  cursor: pointer;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}
.tree ul {
  padding-top: 20px;
  position: relative;
  transition: all 0.5s;
}
.tree li {
  float: left;
  text-align: center;
  list-style-type: none;
  position: relative;
  padding: 20px 10px 0 10px;
}
.tree li::before, .tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #cfd6e3;
  width: 50%;
  height: 20px;
}
.tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #cfd6e3;
}
.tree li:only-child::after, .tree li:only-child::before {
  display: none;
}
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after {
  border: 0 none;
}
.tree li:last-child::before {
  border-right: 2px solid #cfd6e3;
  border-radius: 0 5px 0 0;
}
.tree li:first-child::after {
  border-radius: 5px 0 0 0;
}
.tree ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #cfd6e3;
  width: 0;
  height: 20px;
}
.node {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}
.node-detail {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  max-width: 220px;
}
.svg-wrap {
  width: 100%;
  overflow: hidden;
}
.mindmap {
  background: #f8fafe;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: grab;
}
.mindmap:active { cursor: grabbing; }
.mindmap-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}
.mindmap-hint {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px;
}
.mindmap-detail-body {
  display: grid;
  gap: 10px;
}
.mindmap-list {
  display: grid;
  gap: 10px;
}
.mindmap-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fafe;
}
.mindmap-item-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}
.mindmap-item-body {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}
.kw {
  background: rgba(47,111,237,0.18);
  color: #1b56d1;
  padding: 0 2px;
  border-radius: 4px;
}
.node-rect {
  stroke-width: 1.6;
}
.node-rect.root {
  fill: #eef4ff;
  stroke: #9bb7f5;
}
.node-rect.step {
  fill: #f4fffb;
  stroke: #7fd7c9;
}
.node-rect.sub {
  fill: #fff7ef;
  stroke: #f5c59b;
}
.node-rect.kb {
  fill: #fff7ef;
  stroke: #f5c59b;
}
.node-rect.web {
  fill: #f0f7ff;
  stroke: #8bb8ff;
}
.node-rect.case {
  fill: #f3f2ff;
  stroke: #9fa8ff;
}
.node-title {
  font-size: 12px;
  font-weight: 700;
  fill: #1b2230;
}
.node-text {
  font-size: 11px;
  fill: #5a667a;
}
.node-line {
  stroke: #b8c6df;
  stroke-width: 1.6;
}
.plan-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.plan-detail {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fbfcff;
}
.plan-detail-title {
  font-weight: 600;
  margin-bottom: 6px;
}
.plan-detail-section {
  margin-top: 6px;
}
.plan-detail-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.plan-detail-body {
  font-size: 12px;
  color: var(--text);
  margin-top: 6px;
  white-space: pre-wrap;
}
.plan-loading {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-4px); opacity: 1; }
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .composer {
    grid-template-columns: 42px 1fr;
  }
  #sendBtn {
    grid-column: 1 / -1;
  }
  .chat-area {
    height: auto;
    min-height: 70vh;
  }
}

.notify-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  display: inline-block;
  margin-left: 8px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notify-dot.show {
  opacity: 1;
  transform: scale(1);
}

.notify-dot.blink {
  animation: blink-dot 1s infinite;
}

@keyframes blink-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}
