.workspace.copilot-enabled:not(.expanded) {
  grid-template-columns: 210px minmax(0, 1fr) 44px;
  position: relative;
}
.workspace.copilot-enabled.editing:not(.expanded) {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.workspace.copilot-enabled.copilot-open:not(.expanded) {
  grid-template-columns: 190px minmax(0, 1fr) 360px;
}
.workspace.copilot-enabled.editing.copilot-open:not(.expanded) {
  grid-template-columns: minmax(0, 1fr) 360px;
}
.copilot-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px #27315406;
}
.copilot-shell.collapsed {
  border-color: transparent;
  background: #efedf880;
  align-items: center;
  overflow: visible;
  position: relative;
  padding: 7px 0;
}
.copilot-launch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  border: 0;
  background: transparent;
  color: #7261ce;
  min-width: 40px;
  padding: 12px 6px;
  border-radius: 12px;
}
.copilot-launch > span:first-child {
  font-size: 25px;
}
.copilot-vertical {
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 650;
}
.copilot-unread {
  position: absolute;
  top: 6px;
  right: 4px;
  background: #ef9f56;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.copilot-activity-launch {
  margin-top: auto;
  background: transparent;
  border: 0;
  color: #7e8497;
  font-size: 20px;
  min-width: 38px;
}
.copilot-working {
  margin-top: 8px;
  width: 6px;
  height: 6px;
  background: #7563dd;
  border-radius: 50%;
  animation: copilot-breathe 1.4s ease-in-out infinite;
}
.copilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #f1f1f8;
  flex-shrink: 0;
}
.copilot-header > div {
  display: flex;
  gap: 9px;
  align-items: center;
}
.copilot-header strong {
  font-size: 14px;
  letter-spacing: 0.01em;
}
.copilot-spark {
  color: #7563dd;
  font-size: 22px;
}
.copilot-header .icon-button {
  font-size: 25px;
  min-width: 30px;
  color: #9198aa;
}
.copilot-tabs {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #f0f1f7;
  gap: 18px;
  flex-shrink: 0;
}
.copilot-tabs button {
  padding: 10px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  color: #8b92a5;
  min-height: 36px;
}
.copilot-tabs button.active {
  color: #6654d3;
  border-bottom-color: #7765e3;
  font-weight: 650;
}
.copilot-tabs button span {
  font-size: 10px;
  margin-left: 3px;
  color: #aaaabd;
}
.copilot-tabs .copilot-export {
  font-size: 18px;
  min-width: 28px;
}
.copilot-context {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 10px;
  color: #9298a8;
  background: #fbfbfe;
  flex-shrink: 0;
}
.copilot-context span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copilot-context span:first-child {
  max-width: 70%;
  color: #8677b3;
}
.copilot-messages {
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: #e0deeb transparent;
}
.copilot-welcome {
  padding: 24px 2px;
}
.copilot-orb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f5f1ff, #e8e9ff);
  color: #7c69d9;
  font-size: 27px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 20px #6e5ad21a;
}
.copilot-welcome h3 {
  font-size: 17px;
  margin: 18px 0 8px;
}
.copilot-welcome p {
  font-size: 12px;
  line-height: 1.8;
  color: #9298a9;
  margin-bottom: 25px;
}
.copilot-welcome button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 9px;
  padding: 12px;
  border: 1px solid #eeedf5;
  border-radius: 9px;
  background: #fdfcff;
  text-align: left;
  font-size: 12px;
  color: #667086;
}
.copilot-welcome button:hover {
  background: #f4f1ff;
  border-color: #dcd5f9;
}
.copilot-welcome button span {
  color: #a395ce;
}
.copilot-turn {
  margin-bottom: 25px;
}
.copilot-question {
  margin-left: 26px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f1edfd;
  border: 1px solid #e9e3fb;
  border-radius: 13px 13px 3px 13px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.65;
  color: #554c75;
}
.copilot-answer {
  margin-top: 20px;
}
.copilot-author {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 650;
  color: #6d6487;
}
.copilot-author > span {
  color: #8b73e7;
  font-size: 18px;
}
.copilot-author small {
  margin-left: auto;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 400;
  color: #a0a5b4;
}
.meeting-markdown,
.meeting-plain {
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  color: #45516a;
}
.meeting-plain {
  white-space: pre-wrap;
}
.meeting-markdown > *:first-child {
  margin-top: 0;
}
.meeting-markdown p {
  margin: 10px 0;
}
.meeting-markdown h1,
.meeting-markdown h2,
.meeting-markdown h3,
.meeting-markdown h4 {
  font-size: 13px;
  line-height: 1.5;
  color: #29354f;
  margin: 19px 0 8px;
  font-weight: 700;
}
.meeting-markdown h1 {
  font-size: 16px;
}
.meeting-markdown strong {
  color: #3b4661;
}
.meeting-markdown ul,
.meeting-markdown ol {
  padding-left: 20px;
  margin: 8px 0;
}
.meeting-markdown li {
  padding-left: 2px;
  margin: 5px 0;
}
.meeting-markdown blockquote {
  margin: 12px 0;
  padding: 7px 12px;
  border-left: 3px solid #c9bdf5;
  background: #faf8ff;
  border-radius: 0 7px 7px 0;
  color: #7b7690;
}
.meeting-markdown pre {
  padding: 12px;
  background: #f5f6fa;
  border: 1px solid #e9eaf1;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 11px;
  line-height: 1.6;
}
.meeting-markdown code {
  background: #eeedf7;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
}
.meeting-markdown pre code {
  background: transparent;
  padding: 0;
}
.meeting-markdown table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 11px;
}
.meeting-markdown th,
.meeting-markdown td {
  padding: 7px 9px;
  border: 1px solid #e8e9f0;
  min-width: 65px;
  text-align: left;
}
.meeting-markdown th {
  background: #f6f4fb;
  color: #6e628d;
}
.meeting-markdown a {
  color: #7661cf;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.meeting-markdown hr {
  border: 0;
  border-top: 1px solid #eeeef5;
  margin: 16px 0;
}
.copilot-answer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.copilot-answer-actions button {
  border: 0;
  background: none;
  color: #9298aa;
  font-size: 10px;
  padding: 4px 0;
  min-height: 25px;
}
.copilot-answer-actions button:hover {
  color: #7360c9;
}
.copilot-answer-actions > span {
  font-size: 9px;
  color: #aaa5b9;
  margin-left: auto;
}
.copilot-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9b92b6;
  font-size: 11px;
  margin: 12px 0;
}
.copilot-progress i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aa98e8;
  animation: copilot-breathe 1.4s ease-in-out infinite;
}
.copilot-turn-error {
  color: #a7616a;
  font-size: 11px;
  line-height: 1.7;
  margin: 8px 0;
}
.copilot-muted,
.copilot-empty {
  color: #9da3b2;
  font-size: 12px;
  line-height: 1.8;
}
.copilot-empty {
  padding: 25px 5px;
  text-align: center;
}
.copilot-network {
  color: #9e8e56;
  background: #fffbee;
  padding: 8px 14px;
  font-size: 11px;
}
.copilot-composer {
  flex-shrink: 0;
  padding: 11px;
  margin: 0 10px 10px;
  border: 1px solid #e6e2f1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px #493c7908;
}
.copilot-composer:focus-within {
  border-color: #bcafe9;
  box-shadow: 0 0 0 3px #a68aea0a;
}
.copilot-composer textarea {
  resize: none;
  height: 63px;
  min-height: 63px;
  max-height: 130px;
  width: 100%;
  padding: 1px 1px 8px;
  border: 0;
  outline: 0;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.65;
  background: transparent;
}
.copilot-composer textarea:focus {
  box-shadow: none;
}
.copilot-composer textarea::placeholder {
  color: #b0b3c0;
}
.copilot-composer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.copilot-composer > div > span {
  font-size: 9px;
  color: #abaaba;
}
.copilot-composer .primary {
  border-radius: 9px;
  padding: 0;
  width: 29px;
  height: 29px;
  min-height: 29px;
  font-size: 20px;
  background: #7f6bd7;
  border-color: #7f6bd7;
}
.copilot-history {
  padding: 12px 14px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.activity-row {
  display: flex;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f1f6;
}
.activity-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 1px 5px #30345412;
}
.activity-row p {
  font-size: 11px;
  color: #6c7589;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: anywhere;
}
.activity-row strong,
.activity-toast strong {
  font-weight: 600;
  color: #4f5870;
}
.activity-row small {
  display: block;
  color: #aaaebc;
  font-size: 9px;
  margin-top: 4px;
}
.activity-live {
  position: fixed;
  right: 88px;
  bottom: 50px;
  width: min(330px, calc(100vw - 120px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  z-index: 12;
}
.activity-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #ffffffd9;
  background: #fffffff0;
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 20px #25304f10;
}
.activity-toast p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
  color: #81899b;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.activity-toast:first-child:not(:last-child) {
  opacity: 0.7;
}
.activity-enter-active,
.activity-leave-active,
.activity-move {
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.activity-enter-from,
.activity-leave-to {
  opacity: 0;
  transform: translateY(8px);
}
@keyframes copilot-breathe {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 1250px) {
  .workspace.copilot-enabled.copilot-open:not(.expanded) {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .workspace.copilot-open .diagram-tree {
    display: none;
  }
}
@media (max-width: 950px) {
  .workspace.copilot-enabled:not(.expanded) {
    grid-template-columns: minmax(0, 1fr) 42px;
  }
  .workspace.copilot-enabled .diagram-tree {
    display: none;
  }
  .workspace.copilot-enabled.copilot-open:not(.expanded) {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
@media (max-width: 760px) {
  .workspace.copilot-enabled.copilot-open:not(.expanded) {
    grid-template-columns: minmax(0, 1fr) 42px;
  }
  .copilot-shell:not(.collapsed) {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(340px, calc(100vw - 50px));
    z-index: 20;
    box-shadow: -12px 0 35px #20264412;
  }
  .activity-live {
    right: 70px;
    bottom: 28px;
  }
  .copilot-context {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .activity-enter-active,
  .activity-leave-active,
  .activity-move {
    transition: none;
  }
  .copilot-working,
  .copilot-progress i {
    animation: none;
  }
}
