.copilot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #735274;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(115, 82, 116, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 10000;
  transition: transform 0.2s, box-shadow 0.2s;
}
.copilot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(115, 82, 116, 0.5);
}
.copilot-fab .fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #22c55e;
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.copilot-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  max-height: 480px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  z-index: 10001;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
}
.copilot-panel.open {
  display: flex;
}
.copilot-header {
  background: #735274;
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.copilot-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.copilot-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
  line-height: 1;
}
.copilot-close:hover {
  opacity: 1;
}
.copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 320px;
}
.copilot-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.copilot-msg.assistant {
  background: #f3e8f4;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.copilot-msg.user {
  background: #735274;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.copilot-msg.typing {
  background: #f3e8f4;
  color: #999;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  font-style: italic;
}
.copilot-input-area {
  border-top: 1px solid #eee;
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.copilot-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  resize: none;
  max-height: 60px;
}
.copilot-input:focus {
  border-color: #735274;
}
.copilot-send {
  background: #735274;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  transition: background 0.2s;
}
.copilot-send:hover {
  background: #5a4160;
}
.copilot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.copilot-upgrade {
  padding: 20px;
  text-align: center;
}
.copilot-upgrade p {
  color: #666;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.copilot-upgrade-btn {
  display: inline-block;
  background: #735274;
  color: white;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.copilot-upgrade-btn:hover {
  background: #5a4160;
}
.copilot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.copilot-suggestion {
  background: white;
  border: 1px solid #d4c4d5;
  color: #735274;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s;
}
.copilot-suggestion:hover {
  background: #f3e8f4;
}
@media (max-width: 480px) {
  .copilot-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 80px;
    max-height: 70vh;
  }
  .copilot-fab {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
